vdc-editor 0.1.145 → 0.1.146
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-6BODtdJF.mjs +657 -0
- package/lib/BulkSpellChecker-6BODtdJF.mjs.map +1 -0
- package/lib/index-B5dqkb8m.mjs +56241 -0
- package/lib/index-B5dqkb8m.mjs.map +1 -0
- package/lib/style.css +1 -1
- package/lib/vdc-editor.mjs +1 -1
- package/lib/vdc-editor.umd.js +2 -2
- package/lib/vdc-editor.umd.js.map +1 -1
- package/package.json +1 -1
package/lib/vdc-editor.umd.js
CHANGED
|
@@ -158,7 +158,7 @@ ${c}`:u)}else throw a},onCacheKey:a=>uP(e,n,a)}}function NV(t){if(_e(t))return t
|
|
|
158
158
|
* vue-i18n v10.0.6
|
|
159
159
|
* (c) 2025 kazuya kawaguchi
|
|
160
160
|
* Released under the MIT License.
|
|
161
|
-
*/const uF="10.0.6";function cF(){typeof __VUE_I18N_FULL_INSTALL__!="boolean"&&(qs().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!="boolean"&&(qs().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(qs().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(qs().__INTLIFY_PROD_DEVTOOLS__=!1)}const Zi={FALLBACK_TO_ROOT:MV,NOT_FOUND_PARENT_SCOPE:9,IGNORE_OBJ_FLATTEN:10,DEPRECATE_TC:11},dF={[Zi.FALLBACK_TO_ROOT]:"Fall back to {type} '{key}' with root locale.",[Zi.NOT_FOUND_PARENT_SCOPE]:"Not found parent scope. use the global scope.",[Zi.IGNORE_OBJ_FLATTEN]:"Ignore object flatten: '{key}' key has an string value",[Zi.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 af(dF[t],...e)}const Vt={UNEXPECTED_RETURN_TYPE:bV,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 Jn(t,...e){return rl(t,null,process.env.NODE_ENV!=="production"?{messages:fF,args:e}:void 0)}const fF={[Vt.UNEXPECTED_RETURN_TYPE]:"Unexpected return type in composer",[Vt.INVALID_ARGUMENT]:"Invalid argument",[Vt.MUST_BE_CALL_SETUP_TOP]:"Must be called at the top of a `setup` function",[Vt.NOT_INSTALLED]:"Need to install with `app.use` function",[Vt.UNEXPECTED_ERROR]:"Unexpected error",[Vt.REQUIRED_VALUE]:"Required in value: {0}",[Vt.INVALID_VALUE]:"Invalid value",[Vt.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN]:"Cannot setup vue-devtools plugin",[Vt.NOT_INSTALLED_WITH_PROVIDE]:"Need to install with `provide` function",[Vt.NOT_COMPATIBLE_LEGACY_VUE_I18N]:"Not compatible legacy VueI18n.",[Vt.NOT_AVAILABLE_COMPOSITION_IN_LEGACY]:"Not available Compostion API in Legacy API mode. Please make sure that the legacy API mode is working properly"},w1=Io("__translateVNode"),x1=Io("__datetimeParts"),C1=Io("__numberParts"),Gs=Io("__enableEmitter"),Du=Io("__disableEmitter"),f6=Io("__setPluralRules"),p6=Io("__injectWithOption"),E1=Io("__dispose");function Pu(t){if(!xt(t))return t;for(const e in t)if(so(t,e))if(!e.includes("."))xt(t[e])&&Pu(t[e]);else{const n=e.split("."),r=n.length-1;let o=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 o||(o[n[a]]=It()),!xt(o[n[a]])){process.env.NODE_ENV!=="production"&&Ki(gf(Zi.IGNORE_OBJ_FLATTEN,{key:n[a]})),s=!0;break}o=o[n[a]]}s||(o[n[r]]=t[e],delete t[e]),xt(o[n[r]])&&Pu(o[n[r]])}return t}function k1(t,e){const{messages:n,__i18n:r,messageResolver:o,flatJson:s}=e,a=lt(n)?n:Jt(r)?It():{[t]:It()};if(Jt(r)&&r.forEach(l=>{if("locale"in l&&"resource"in l){const{locale:u,resource:c}=l;u?(a[u]=a[u]||It(),cf(c,a[u])):cf(c,a)}else _e(l)&&cf(JSON.parse(l),a)}),o==null&&s)for(const l in a)so(a,l)&&Pu(a[l]);return a}function h6(t){return t.type}function m6(t,e,n){let r=xt(e.messages)?e.messages:It();"__i18nGlobal"in n&&(r=k1(t.locale.value,{messages:r,__i18n:n.__i18nGlobal}));const o=Object.keys(r);o.length&&o.forEach(s=>{t.mergeLocaleMessage(s,r[s])});{if(xt(e.datetimeFormats)){const s=Object.keys(e.datetimeFormats);s.length&&s.forEach(a=>{t.mergeDateTimeFormat(a,e.datetimeFormats[a])})}if(xt(e.numberFormats)){const s=Object.keys(e.numberFormats);s.length&&s.forEach(a=>{t.mergeNumberFormat(a,e.numberFormats[a])})}}}function g6(t){return i.createVNode(i.Text,null,t,0)}const b6="__INTLIFY_META__",v6=()=>[],pF=()=>!1;let y6=0;function w6(t){return(e,n,r,o)=>t(n,r,i.getCurrentInstance()||void 0,o)}const hF=()=>{const t=i.getCurrentInstance();let e=null;return t&&(e=h6(t)[b6])?{[b6]:e}:null};function S1(t={}){const{__root:e,__injectWithOption:n}=t,r=e===void 0,o=t.flatJson,s=io?i.ref:i.shallowRef;let a=Ct(t.inheritLocale)?t.inheritLocale:!0;const l=s(e&&a?e.locale.value:_e(t.locale)?t.locale:Ru),u=s(e&&a?e.fallbackLocale.value:_e(t.fallbackLocale)||Jt(t.fallbackLocale)||lt(t.fallbackLocale)||t.fallbackLocale===!1?t.fallbackLocale:l.value),c=s(k1(l.value,t)),f=s(lt(t.datetimeFormats)?t.datetimeFormats:{[l.value]:{}}),p=s(lt(t.numberFormats)?t.numberFormats:{[l.value]:{}});let m=e?e.missingWarn:Ct(t.missingWarn)||nl(t.missingWarn)?t.missingWarn:!0,g=e?e.fallbackWarn:Ct(t.fallbackWarn)||nl(t.fallbackWarn)?t.fallbackWarn:!0,b=e?e.fallbackRoot:Ct(t.fallbackRoot)?t.fallbackRoot:!0,y=!!t.fallbackFormat,w=Pt(t.missing)?t.missing:null,x=Pt(t.missing)?w6(t.missing):null,S=Pt(t.postTranslation)?t.postTranslation:null,E=e?e.warnHtmlMessage:Ct(t.warnHtmlMessage)?t.warnHtmlMessage:!0,C=!!t.escapeParameter;const T=e?e.modifiers:lt(t.modifiers)?t.modifiers:{};let _=t.pluralRules||e&&e.pluralRules,A;A=(()=>{r&&Xx(null);const te={version:uF,locale:l.value,fallbackLocale:u.value,messages:c.value,modifiers:T,pluralRules:_,missing:x===null?void 0:x,missingWarn:m,fallbackWarn:g,fallbackFormat:y,unresolving:!0,postTranslation:S===null?void 0:S,warnHtmlMessage:E,escapeParameter:C,messageResolver:t.messageResolver,messageCompiler:t.messageCompiler,__meta:{framework:"vue"}};te.datetimeFormats=f.value,te.numberFormats=p.value,te.__datetimeFormatters=lt(A)?A.__datetimeFormatters:void 0,te.__numberFormatters=lt(A)?A.__numberFormatters:void 0,process.env.NODE_ENV!=="production"&&(te.__v_emitter=lt(A)?A.__v_emitter:void 0);const ge=zV(te);return r&&Xx(ge),ge})(),Lu(A,l.value,u.value);function L(){return[l.value,u.value,c.value,f.value,p.value]}const B=i.computed({get:()=>l.value,set:te=>{l.value=te,A.locale=l.value}}),W=i.computed({get:()=>u.value,set:te=>{u.value=te,A.fallbackLocale=u.value,Lu(A,l.value,te)}}),J=i.computed(()=>c.value),ue=i.computed(()=>f.value),X=i.computed(()=>p.value);function H(){return Pt(S)?S:null}function F(te){S=te,A.postTranslation=te}function R(){return w}function G(te){te!==null&&(x=w6(te)),w=te,A.missing=x}function N(te,ge){return te!=="translate"||!ge.resolvedMessage}const oe=(te,ge,le,we,$e,ct)=>{L();let Ot;try{process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__,r||(A.fallbackContext=e?$V():void 0),Ot=te(A)}finally{process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__,r||(A.fallbackContext=void 0)}if(le!=="translate exists"&&ln(Ot)&&Ot===pf||le==="translate exists"&&!Ot){const[Nt,pi]=ge();if(process.env.NODE_ENV!=="production"&&e&&_e(Nt)&&N(le,pi)&&(b&&(mf(g,Nt)||Jx(m,Nt))&&Ki(gf(Zi.FALLBACK_TO_ROOT,{key:Nt,type:le})),process.env.NODE_ENV!=="production")){const{__v_emitter:ie}=A;ie&&b&&ie.emit("fallback",{type:le,key:Nt,to:"global",groupId:`${le}:${Nt}`})}return e&&b?we(e):$e(Nt)}else{if(ct(Ot))return Ot;throw Jn(Vt.UNEXPECTED_RETURN_TYPE)}};function ne(...te){return oe(ge=>Reflect.apply(l6,null,[ge,...te]),()=>v1(...te),"translate",ge=>Reflect.apply(ge.t,ge,[...te]),ge=>ge,ge=>_e(ge))}function xe(...te){const[ge,le,we]=te;if(we&&!xt(we))throw Jn(Vt.INVALID_ARGUMENT);return ne(ge,le,hn({resolvedMessage:!0},we||{}))}function Ee(...te){return oe(ge=>Reflect.apply(e6,null,[ge,...te]),()=>g1(...te),"datetime format",ge=>Reflect.apply(ge.d,ge,[...te]),()=>hf,ge=>_e(ge))}function ze(...te){return oe(ge=>Reflect.apply(r6,null,[ge,...te]),()=>b1(...te),"number format",ge=>Reflect.apply(ge.n,ge,[...te]),()=>hf,ge=>_e(ge))}function ke(te){return te.map(ge=>_e(ge)||ln(ge)||Ct(ge)?g6(String(ge)):ge)}const q={normalize:ke,interpolate:te=>te,type:"vnode"};function Z(...te){return oe(ge=>{let le;const we=ge;try{we.processor=q,le=Reflect.apply(l6,null,[we,...te])}finally{we.processor=null}return le},()=>v1(...te),"translate",ge=>ge[w1](...te),ge=>[g6(ge)],ge=>Jt(ge))}function fe(...te){return oe(ge=>Reflect.apply(r6,null,[ge,...te]),()=>b1(...te),"number format",ge=>ge[C1](...te),v6,ge=>_e(ge)||Jt(ge))}function j(...te){return oe(ge=>Reflect.apply(e6,null,[ge,...te]),()=>g1(...te),"datetime format",ge=>ge[x1](...te),v6,ge=>_e(ge)||Jt(ge))}function ee(te){_=te,A.pluralRules=_}function U(te,ge){return oe(()=>{if(!te)return!1;const le=_e(ge)?ge:l.value,we=Xe(le),$e=A.messageResolver(we,te);return Yi($e)||Vr($e)||_e($e)},()=>[te],"translate exists",le=>Reflect.apply(le.te,le,[te,ge]),pF,le=>Ct(le))}function de(te){let ge=null;const le=$x(A,u.value,l.value);for(let we=0;we<le.length;we++){const $e=c.value[le[we]]||{},ct=A.messageResolver($e,te);if(ct!=null){ge=ct;break}}return ge}function Se(te){const ge=de(te);return ge??(e?e.tm(te)||{}:{})}function Xe(te){return c.value[te]||{}}function ft(te,ge){if(o){const le={[te]:ge};for(const we in le)so(le,we)&&Pu(le[we]);ge=le[te]}c.value[te]=ge,A.messages=c.value}function pt(te,ge){c.value[te]=c.value[te]||{};const le={[te]:ge};if(o)for(const we in le)so(le,we)&&Pu(le[we]);ge=le[te],cf(ge,c.value[te]),A.messages=c.value}function $(te){return f.value[te]||{}}function P(te,ge){f.value[te]=ge,A.datetimeFormats=f.value,n6(A,te,ge)}function ae(te,ge){f.value[te]=hn(f.value[te]||{},ge),A.datetimeFormats=f.value,n6(A,te,ge)}function ve(te){return p.value[te]||{}}function Ie(te,ge){p.value[te]=ge,A.numberFormats=p.value,i6(A,te,ge)}function Je(te,ge){p.value[te]=hn(p.value[te]||{},ge),A.numberFormats=p.value,i6(A,te,ge)}y6++,e&&io&&(i.watch(e.locale,te=>{a&&(l.value=te,A.locale=te,Lu(A,l.value,u.value))}),i.watch(e.fallbackLocale,te=>{a&&(u.value=te,A.fallbackLocale=te,Lu(A,l.value,u.value))}));const He={id:y6,locale:B,fallbackLocale:W,get inheritLocale(){return a},set inheritLocale(te){a=te,te&&e&&(l.value=e.locale.value,u.value=e.fallbackLocale.value,Lu(A,l.value,u.value))},get availableLocales(){return Object.keys(c.value).sort()},messages:J,get modifiers(){return T},get pluralRules(){return _||{}},get isGlobal(){return r},get missingWarn(){return m},set missingWarn(te){m=te,A.missingWarn=m},get fallbackWarn(){return g},set fallbackWarn(te){g=te,A.fallbackWarn=g},get fallbackRoot(){return b},set fallbackRoot(te){b=te},get fallbackFormat(){return y},set fallbackFormat(te){y=te,A.fallbackFormat=y},get warnHtmlMessage(){return E},set warnHtmlMessage(te){E=te,A.warnHtmlMessage=te},get escapeParameter(){return C},set escapeParameter(te){C=te,A.escapeParameter=te},t:ne,getLocaleMessage:Xe,setLocaleMessage:ft,mergeLocaleMessage:pt,getPostTranslationHandler:H,setPostTranslationHandler:F,getMissingHandler:R,setMissingHandler:G,[f6]:ee};return He.datetimeFormats=ue,He.numberFormats=X,He.rt=xe,He.te=U,He.tm=Se,He.d=Ee,He.n=ze,He.getDateTimeFormat=$,He.setDateTimeFormat=P,He.mergeDateTimeFormat=ae,He.getNumberFormat=ve,He.setNumberFormat=Ie,He.mergeNumberFormat=Je,He[p6]=n,He[w1]=Z,He[x1]=j,He[C1]=fe,process.env.NODE_ENV!=="production"&&(He[Gs]=te=>{A.__v_emitter=te},He[Du]=()=>{A.__v_emitter=void 0}),He}const x6="vue-i18n: composer properties",_1={"vue-devtools-plugin-vue-i18n":"Vue I18n DevTools","vue-i18n-resource-inspector":"Vue I18n DevTools","vue-i18n-timeline":"Vue I18n"},mF={"vue-i18n-resource-inspector":"Search for scopes ..."},gF={"vue-i18n-timeline":16764185};let T1;async function bF(t,e){return new Promise((n,r)=>{try{lF({id:"vue-devtools-plugin-vue-i18n",label:_1["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:[x6],app:t},o=>{T1=o,o.on.visitComponentTree(({componentInstance:a,treeNode:l})=>{vF(a,l,e)}),o.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&&E6(l,a.vnode.el.__VUE_I18N__):E6(l,a.vnode.el.__VUE_I18N__))}),o.addInspector({id:"vue-i18n-resource-inspector",label:_1["vue-i18n-resource-inspector"],icon:"language",treeFilterPlaceholder:mF["vue-i18n-resource-inspector"]}),o.on.getInspectorTree(a=>{a.app===t&&a.inspectorId==="vue-i18n-resource-inspector"&&EF(a,e)});const s=new Map;o.on.getInspectorState(async a=>{if(a.app===t&&a.inspectorId==="vue-i18n-resource-inspector")if(o.unhighlightElement(),SF(a,e),a.nodeId==="global"){if(!s.has(a.app)){const[l]=await o.getComponentInstances(a.app);s.set(a.app,l)}o.highlightElement(s.get(a.app))}else{const l=kF(a.nodeId,e);l&&o.highlightElement(l)}}),o.on.editInspectorState(a=>{a.app===t&&a.inspectorId==="vue-i18n-resource-inspector"&&TF(a,e)}),o.addTimelineLayer({id:"vue-i18n-timeline",label:_1["vue-i18n-timeline"],color:gF["vue-i18n-timeline"]}),n(!0)})}catch(o){console.error(o),r(!1)}})}function C6(t){return t.type.name||t.type.displayName||t.type.__file||"Anonymous"}function vF(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 o={label:`i18n (${C6(t)} Scope)`,textColor:0,backgroundColor:16764185};e.tags.push(o)}}function E6(t,e){const n=x6;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:A1(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 A1(t){const e={};return Object.keys(t).forEach(n=>{const r=t[n];Pt(r)&&"source"in r?e[n]=CF(r):Yi(r)&&r.loc&&r.loc.source?e[n]=r.loc.source:xt(r)?e[n]=A1(r):e[n]=r}),e}const yF={"<":"<",">":">",'"':""","&":"&"};function wF(t){return t.replace(/[<>"&]/g,xF)}function xF(t){return yF[t]||t}function CF(t){return{_custom:{type:"function",display:`<span>ƒ</span> ${t.source?`("${wF(t.source)}")`:"(?)"}`}}}function EF(t,e){t.rootNodes.push({id:"global",label:"Global Scope"});const n=e.mode==="composition"?e.global:e.global.__composer;for(const[r,o]of e.__instances){const s=e.mode==="composition"?o:o.__composer;n!==s&&t.rootNodes.push({id:s.id.toString(),label:`${C6(r)} Scope`})}}function kF(t,e){let n=null;if(t!=="global"){for(const[r,o]of e.__instances.entries())if(o.id.toString()===t){n=r;break}}return n}function k6(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 SF(t,e){const n=k6(t.nodeId,e);return n&&(t.state=_F(n)),null}function _F(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 o="Locale messages info",s=[{type:o,key:"messages",editable:!1,value:A1(t.messages.value)}];e[o]=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 Vu(t,e){if(T1){let n;e&&"groupId"in e&&(n=e.groupId,delete e.groupId),T1.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 TF(t,e){const n=k6(t.nodeId,e);if(n){const[r]=t.path;r==="locale"&&_e(t.state.value)?n.locale.value=t.state.value:r==="fallbackLocale"&&(_e(t.state.value)||Jt(t.state.value)||xt(t.state.value))?n.fallbackLocale.value=t.state.value:r==="inheritLocale"&&Ct(t.state.value)&&(n.inheritLocale=t.state.value)}}function AF(t){const e=_e(t.locale)?t.locale:Ru,n=_e(t.fallbackLocale)||Jt(t.fallbackLocale)||lt(t.fallbackLocale)||t.fallbackLocale===!1?t.fallbackLocale:e,r=Pt(t.missing)?t.missing:void 0,o=Ct(t.silentTranslationWarn)||nl(t.silentTranslationWarn)?!t.silentTranslationWarn:!0,s=Ct(t.silentFallbackWarn)||nl(t.silentFallbackWarn)?!t.silentFallbackWarn:!0,a=Ct(t.fallbackRoot)?t.fallbackRoot:!0,l=!!t.formatFallbackMessages,u=lt(t.modifiers)?t.modifiers:{},c=t.pluralizationRules,f=Pt(t.postTranslation)?t.postTranslation:void 0,p=_e(t.warnHtmlInMessage)?t.warnHtmlInMessage!=="off":!0,m=!!t.escapeParameterHtml,g=Ct(t.sync)?t.sync:!0;let b=t.messages;if(lt(t.sharedMessages)){const T=t.sharedMessages;b=Object.keys(T).reduce((A,D)=>{const L=A[D]||(A[D]={});return hn(L,T[D]),A},b||{})}const{__i18n:y,__root:w,__injectWithOption:x}=t,S=t.datetimeFormats,E=t.numberFormats,C=t.flatJson;return{locale:e,fallbackLocale:n,messages:b,flatJson:C,datetimeFormats:S,numberFormats:E,missing:r,missingWarn:o,fallbackWarn:s,fallbackRoot:a,fallbackFormat:l,modifiers:u,pluralRules:c,postTranslation:f,warnHtmlMessage:p,escapeParameter:m,messageResolver:t.messageResolver,inheritLocale:g,__i18n:y,__root:w,__injectWithOption:x}}function O1(t={}){const e=S1(AF(t)),{__extender:n}=t,r={id:e.id,get locale(){return e.locale.value},set locale(o){e.locale.value=o},get fallbackLocale(){return e.fallbackLocale.value},set fallbackLocale(o){e.fallbackLocale.value=o},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(o){e.setMissingHandler(o)},get silentTranslationWarn(){return Ct(e.missingWarn)?!e.missingWarn:e.missingWarn},set silentTranslationWarn(o){e.missingWarn=Ct(o)?!o:o},get silentFallbackWarn(){return Ct(e.fallbackWarn)?!e.fallbackWarn:e.fallbackWarn},set silentFallbackWarn(o){e.fallbackWarn=Ct(o)?!o:o},get modifiers(){return e.modifiers},get formatFallbackMessages(){return e.fallbackFormat},set formatFallbackMessages(o){e.fallbackFormat=o},get postTranslation(){return e.getPostTranslationHandler()},set postTranslation(o){e.setPostTranslationHandler(o)},get sync(){return e.inheritLocale},set sync(o){e.inheritLocale=o},get warnHtmlInMessage(){return e.warnHtmlMessage?"warn":"off"},set warnHtmlInMessage(o){e.warnHtmlMessage=o!=="off"},get escapeParameterHtml(){return e.escapeParameter},set escapeParameterHtml(o){e.escapeParameter=o},get pluralizationRules(){return e.pluralRules||{}},__composer:e,t(...o){return Reflect.apply(e.t,e,[...o])},rt(...o){return Reflect.apply(e.rt,e,[...o])},tc(...o){const[s,a,l]=o,u={plural:1};let c=null,f=null;if(process.env.NODE_ENV!=="production"&&Rx(gf(Zi.DEPRECATE_TC)),!_e(s))throw Jn(Vt.INVALID_ARGUMENT);const p=s;return _e(a)?u.locale=a:ln(a)?u.plural=a:Jt(a)?c=a:lt(a)&&(f=a),_e(l)?u.locale=l:Jt(l)?c=l:lt(l)&&(f=l),Reflect.apply(e.t,e,[p,c||f||{},u])},te(o,s){return e.te(o,s)},tm(o){return e.tm(o)},getLocaleMessage(o){return e.getLocaleMessage(o)},setLocaleMessage(o,s){e.setLocaleMessage(o,s)},mergeLocaleMessage(o,s){e.mergeLocaleMessage(o,s)},d(...o){return Reflect.apply(e.d,e,[...o])},getDateTimeFormat(o){return e.getDateTimeFormat(o)},setDateTimeFormat(o,s){e.setDateTimeFormat(o,s)},mergeDateTimeFormat(o,s){e.mergeDateTimeFormat(o,s)},n(...o){return Reflect.apply(e.n,e,[...o])},getNumberFormat(o){return e.getNumberFormat(o)},setNumberFormat(o,s){e.setNumberFormat(o,s)},mergeNumberFormat(o,s){e.mergeNumberFormat(o,s)}};return r.__extender=n,process.env.NODE_ENV!=="production"&&(r.__enableEmitter=o=>{const s=e;s[Gs]&&s[Gs](o)},r.__disableEmitter=()=>{const o=e;o[Du]&&o[Du]()}),r}function OF(t,e,n){return{beforeCreate(){const r=i.getCurrentInstance();if(!r)throw Jn(Vt.UNEXPECTED_ERROR);const o=this.$options;if(o.i18n){const s=o.i18n;if(o.__i18n&&(s.__i18n=o.__i18n),s.__root=e,this===this.$root)this.$i18n=S6(t,s);else{s.__injectWithOption=!0,s.__extender=n.__vueI18nExtend,this.$i18n=O1(s);const a=this.$i18n;a.__extender&&(a.__disposer=a.__extender(this.$i18n))}}else if(o.__i18n)if(this===this.$root)this.$i18n=S6(t,o);else{this.$i18n=O1({__i18n:o.__i18n,__injectWithOption:!0,__extender:n.__vueI18nExtend,__root:e});const s=this.$i18n;s.__extender&&(s.__disposer=s.__extender(this.$i18n))}else this.$i18n=t;o.__i18nGlobal&&m6(e,o,o),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 o=this.__v_emitter=s1();r.__enableEmitter&&r.__enableEmitter(o),o.on("*",Vu)}},unmounted(){const r=i.getCurrentInstance();if(!r)throw Jn(Vt.UNEXPECTED_ERROR);const o=this.$i18n;process.env.NODE_ENV!=="production"&&this.$el&&this.$el.__VUE_I18N__&&(this.__v_emitter&&(this.__v_emitter.off("*",Vu),delete this.__v_emitter),this.$i18n&&(o.__disableEmitter&&o.__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,o.__disposer&&(o.__disposer(),delete o.__disposer,delete o.__extender),n.__deleteInstance(r),delete this.$i18n}}}function S6(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[f6](e.pluralizationRules||t.pluralizationRules);const n=k1(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 M1={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:t=>t==="parent"||t==="global",default:"parent"},i18n:{type:Object}};function MF({slots:t},e){return e.length===1&&e[0]==="default"?(t.default?t.default():[]).reduce((r,o)=>[...r,...o.type===i.Fragment?o.children:[o]],[]):e.reduce((n,r)=>{const o=t[r];return o&&(n[r]=o()),n},It())}function _6(){return i.Fragment}const T6=i.defineComponent({name:"i18n-t",props:hn({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:t=>ln(t)||!isNaN(t)}},M1),setup(t,e){const{slots:n,attrs:r}=e,o=t.i18n||St({useScope:t.scope,__useComponent:!0});return()=>{const s=Object.keys(n).filter(p=>p!=="_"),a=It();t.locale&&(a.locale=t.locale),t.plural!==void 0&&(a.plural=_e(t.plural)?+t.plural:t.plural);const l=MF(e,s),u=o[w1](t.keypath,l,a),c=hn(It(),r),f=_e(t.tag)||xt(t.tag)?t.tag:_6();return i.h(f,c,u)}}});function BF(t){return Jt(t)&&!_e(t[0])}function A6(t,e,n,r){const{slots:o,attrs:s}=e;return()=>{const a={part:!0};let l=It();t.locale&&(a.locale=t.locale),_e(t.format)?a.key=t.format:xt(t.format)&&(_e(t.format.key)&&(a.key=t.format.key),l=Object.keys(t.format).reduce((m,g)=>n.includes(g)?hn(It(),m,{[g]:t.format[g]}):m,It()));const u=r(t.value,a,l);let c=[a.key];Jt(u)?c=u.map((m,g)=>{const b=o[m.type],y=b?b({[m.type]:m.value,index:g,parts:u}):[m.value];return BF(y)&&(y[0].key=`${m.type}-${g}`),y}):_e(u)&&(c=[u]);const f=hn(It(),s),p=_e(t.tag)||xt(t.tag)?t.tag:_6();return i.h(p,f,c)}}const O6=i.defineComponent({name:"i18n-n",props:hn({value:{type:Number,required:!0},format:{type:[String,Object]}},M1),setup(t,e){const n=t.i18n||St({useScope:t.scope,__useComponent:!0});return A6(t,e,o6,(...r)=>n[C1](...r))}}),M6=i.defineComponent({name:"i18n-d",props:hn({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},M1),setup(t,e){const n=t.i18n||St({useScope:t.scope,__useComponent:!0});return A6(t,e,t6,(...r)=>n[x1](...r))}});function IF(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 RF(t){const e=a=>{const{instance:l,value:u}=a;if(!l||!l.$)throw Jn(Vt.UNEXPECTED_ERROR);const c=IF(t,l.$),f=B6(u);return[Reflect.apply(c.t,c,[...I6(f)]),c]};return{created:(a,l)=>{const[u,c]=e(l);io&&t.global===c&&(a.__i18nWatcher=i.watch(c.locale,()=>{l.instance&&l.instance.$forceUpdate()})),a.__composer=c,a.textContent=u},unmounted:a=>{io&&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=B6(l);a.textContent=Reflect.apply(u.t,u,[...I6(c)])}},getSSRProps:a=>{const[l]=e(a);return{textContent:l}}}}function B6(t){if(_e(t))return{path:t};if(lt(t)){if(!("path"in t))throw Jn(Vt.REQUIRED_VALUE,"path");return t}else throw Jn(Vt.INVALID_VALUE)}function I6(t){const{path:e,locale:n,args:r,choice:o,plural:s}=t,a={},l=r||{};return _e(n)&&(a.locale=n),ln(o)&&(a.plural=o),ln(s)&&(a.plural=s),[e,l,a]}function LF(t,e,...n){const r=lt(n[0])?n[0]:{};(Ct(r.globalInstall)?r.globalInstall:!0)&&([T6.name,"I18nT"].forEach(s=>t.component(s,T6)),[O6.name,"I18nN"].forEach(s=>t.component(s,O6)),[M6.name,"I18nD"].forEach(s=>t.component(s,M6))),t.directive("t",RF(e))}const DF=Io("global-vue-i18n");function PF(t={},e){const n=__VUE_I18N_LEGACY_API__&&Ct(t.legacy)?t.legacy:__VUE_I18N_LEGACY_API__,r=Ct(t.globalInjection)?t.globalInjection:!0,o=new Map,[s,a]=VF(t,n),l=Io(process.env.NODE_ENV!=="production"?"vue-i18n":"");function u(m){return o.get(m)||null}function c(m,g){o.set(m,g)}function f(m){o.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),lt(g[0])){const w=g[0];p.__composerExtend=w.__composerExtend,p.__vueI18nExtend=w.__vueI18nExtend}let b=null;!n&&r&&(b=qF(m,p.global)),__VUE_I18N_FULL_INSTALL__&&LF(m,p,...g),__VUE_I18N_LEGACY_API__&&n&&m.mixin(OF(a,a.__composer,p));const y=m.unmount;if(m.unmount=()=>{b&&b(),p.dispose(),y()},process.env.NODE_ENV!=="production"){if(!await bF(m,p))throw Jn(Vt.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN);const x=s1();if(n){const S=a;S.__enableEmitter&&S.__enableEmitter(x)}else{const S=a;S[Gs]&&S[Gs](x)}x.on("*",Vu)}},get global(){return a},dispose(){s.stop()},__instances:o,__getInstance:u,__setInstance:c,__deleteInstance:f};return p}function St(t={}){const e=i.getCurrentInstance();if(e==null)throw Jn(Vt.MUST_BE_CALL_SETUP_TOP);if(!e.isCE&&e.appContext.app!=null&&!e.appContext.app.__VUE_I18N_SYMBOL__)throw Jn(Vt.NOT_INSTALLED);const n=FF(e),r=zF(n),o=h6(e),s=$F(t,o);if(s==="global")return m6(r,t,o),r;if(s==="parent"){let u=HF(n,e,t.__useComponent);return u==null&&(process.env.NODE_ENV!=="production"&&Ki(gf(Zi.NOT_FOUND_PARENT_SCOPE)),u=r),u}const a=n;let l=a.__getInstance(e);if(l==null){const u=hn({},t);"__i18n"in o&&(u.__i18n=o.__i18n),r&&(u.__root=r),l=S1(u),a.__composerExtend&&(l[E1]=a.__composerExtend(l)),WF(a,e,l),a.__setInstance(e,l)}return l}function VF(t,e,n){const r=i.effectScope(),o=__VUE_I18N_LEGACY_API__&&e?r.run(()=>O1(t)):r.run(()=>S1(t));if(o==null)throw Jn(Vt.UNEXPECTED_ERROR);return[r,o]}function FF(t){const e=i.inject(t.isCE?DF:t.appContext.app.__VUE_I18N_SYMBOL__);if(!e)throw Jn(t.isCE?Vt.NOT_INSTALLED_WITH_PROVIDE:Vt.UNEXPECTED_ERROR);return e}function $F(t,e){return lf(t)?"__i18n"in e?"local":"global":t.useScope?t.useScope:"local"}function zF(t){return t.mode==="composition"?t.global:t.global.__composer}function HF(t,e,n=!1){let r=null;const o=e.root;let s=UF(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[p6]&&(r=null))}if(r!=null||o===s)break;s=s.parent}return r}function UF(t,e=!1){return t==null?null:e&&t.vnode.ctx||t.parent}function WF(t,e,n){let r=null;i.onMounted(()=>{if(process.env.NODE_ENV!=="production"&&e.vnode.el){e.vnode.el.__VUE_I18N__=n,r=s1();const o=n;o[Gs]&&o[Gs](r),r.on("*",Vu)}},e),i.onUnmounted(()=>{const o=n;process.env.NODE_ENV!=="production"&&e.vnode.el&&e.vnode.el.__VUE_I18N__&&(r&&r.off("*",Vu),o[Du]&&o[Du](),delete e.vnode.el.__VUE_I18N__),t.__deleteInstance(e);const s=o[E1];s&&(s(),delete o[E1])},e)}const jF=["locale","fallbackLocale","availableLocales"],R6=["t","rt","d","n","tm","te"];function qF(t,e){const n=Object.create(null);return jF.forEach(o=>{const s=Object.getOwnPropertyDescriptor(e,o);if(!s)throw Jn(Vt.UNEXPECTED_ERROR);const a=i.isRef(s.value)?{get(){return s.value.value},set(l){s.value.value=l}}:{get(){return s.get&&s.get()}};Object.defineProperty(n,o,a)}),t.config.globalProperties.$i18n=n,R6.forEach(o=>{const s=Object.getOwnPropertyDescriptor(e,o);if(!s||!s.value)throw Jn(Vt.UNEXPECTED_ERROR);Object.defineProperty(t.config.globalProperties,`$${o}`,s)}),()=>{delete t.config.globalProperties.$i18n,R6.forEach(o=>{delete t.config.globalProperties[`$${o}`]})}}if(cF(),LV(fV),DV(OV),PV($x),process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__){const t=qs();t.__INTLIFY__=!0,pV(t.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}process.env.NODE_ENV;const KF={class:"flex gap-2 items-center overflow-x-auto overflow-y-hidden [&::-webkit-scrollbar]:h-1.5"},GF={class:"flex-1 flex justify-end items-center gap-x-3"},XF=i.defineComponent({__name:"Toolbar",props:{editor:{},editorComment:{},disabled:{type:Boolean,default:!1},mode:{}},setup(t){const e=i.defineAsyncComponent(()=>Promise.resolve().then(()=>CQ)),{t:n}=St(),r=t,o=i.inject("isEditable",i.ref(!0)),s=["fontSize","fontFamily","superText","spellchecker","fontSizeIncreaseDecrease"],a=i.computed(()=>{const p=[...r.editor.extensionManager.extensions].sort((g,b)=>g.name==="superText"?1:b.name==="superText"?-1:0);let m=[];for(const g of p){const{button:b,divider:y=!1,spacer:w=!1,toolbar:x=!0}=g.options;if(!b||!y0(b)||!x)continue;const S=b({editor:r.editor,extension:g,t:i.unref(n)});if(Array.isArray(S)){const E=S.map((C,T)=>({id:`${g.name}`,button:C,divider:T===S.length-1?y:!1,spacer:T===0?w:!1}));m=[...m,...E];continue}m.push({button:S,divider:y,spacer:w,id:`${g.name}`})}if(r.mode!==Fe.EDITOR)return m.filter(g=>g.id&&s.includes(g.id));if(m=m.filter(g=>g.id!=="superText"),!o.value){m=m.map(b=>(b.button.componentProps.disabled=!0,b));const g=m.find(b=>b.id==="spellchecker");g&&(g.button.componentProps.disabled=!1)}return m}),l=f=>f.id==="spellchecker"?"!text-[#2977D9] border border-gray-300 bg-[#F2F2F7] 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=i.computed(()=>{var f;return(f=r.editor)==null?void 0:f.extensionManager.extensions.find(p=>p.name==="spellchecker")});return(f,p)=>{var m;return i.openBlock(),i.createElementBlock("div",{id:"tool-bar",class:i.normalizeClass(i.unref(Ae)("z-10",i.unref(Mu)()&&"top-16"))},[i.createElementVNode("div",KF,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(a.value,(g,b)=>{var y;return i.openBlock(),i.createElementBlock(i.Fragment,{key:b},[g.spacer&&b!==0?(i.openBlock(),i.createBlock(i.unref(oi),{key:0,orientation:"vertical",class:"h-[16px] mx-[10px]"})):i.createCommentVNode("",!0),(i.openBlock(),i.createBlock(i.resolveDynamicComponent(g.button.component),i.mergeProps({id:g.id,ref_for:!0},g.button.componentProps,{editor:f.editor,disabled:f.disabled||((y=g.button.componentProps)==null?void 0:y.disabled),"custom-class":l(g),icon:u(g)}),i.createSlots({_:2},[i.renderList(g.button.componentSlots,(w,x,S)=>({name:`${x}`,fn:i.withCtx(E=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(w),i.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?(i.openBlock(),i.createBlock(i.unref(oi),{key:1,orientation:"vertical",class:"mx-2 h-auto"})):i.createCommentVNode("",!0)],64)}),128)),i.createElementVNode("div",GF,[p[0]||(p[0]=i.createElementVNode("div",{id:"tool-bar-auto-save"},null,-1)),c.value?(i.openBlock(),i.createBlock(i.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"])):i.createCommentVNode("",!0)])])],2)}}}),al=i.defineComponent({__name:"Popover",props:{defaultOpen:{type:Boolean},open:{type:Boolean},modal:{type:Boolean}},emits:["update:open"],setup(t,{emit:e}){const o=Dt(t,e);return(s,a)=>(i.openBlock(),i.createBlock(i.unref(qL),i.normalizeProps(i.guardReactiveProps(i.unref(o))),{default:i.withCtx(()=>[i.renderSlot(s.$slots,"default")]),_:3},16))}}),ll=i.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,o=i.computed(()=>{const{class:a,...l}=n;return l}),s=Dt(o,r);return(a,l)=>(i.openBlock(),i.createBlock(i.unref(GL),null,{default:i.withCtx(()=>[i.createVNode(i.unref(JL),i.mergeProps({...i.unref(s),...a.$attrs},{class:i.unref(Ae)("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:i.withCtx(()=>[i.renderSlot(a.$slots,"default")]),_:3},16,["class"])]),_:3}))}}),B1=i.defineComponent({__name:"Tabs",props:{defaultValue:{},orientation:{},dir:{},activationMode:{},modelValue:{},asChild:{type:Boolean},as:{}},emits:["update:modelValue"],setup(t,{emit:e}){const o=Dt(t,e);return(s,a)=>(i.openBlock(),i.createBlock(i.unref(KD),i.normalizeProps(i.guardReactiveProps(i.unref(o))),{default:i.withCtx(()=>[i.renderSlot(s.$slots,"default")]),_:3},16))}}),I1=i.defineComponent({__name:"TabsList",props:{loop:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(t){const e=t,n=i.computed(()=>{const{class:r,...o}=e;return o});return(r,o)=>(i.openBlock(),i.createBlock(i.unref(GD),i.mergeProps(n.value,{class:i.unref(Ae)("inline-flex items-center justify-center rounded-md bg-ed-muted p-1 text-ed-muted-foreground",e.class)}),{default:i.withCtx(()=>[i.renderSlot(r.$slots,"default")]),_:3},16,["class"]))}}),YF={class:"truncate"},Fu=i.defineComponent({__name:"TabsTrigger",props:{value:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(t){const e=t,n=i.computed(()=>{const{class:o,...s}=e;return s}),r=Xn(n);return(o,s)=>(i.openBlock(),i.createBlock(i.unref(YD),i.mergeProps(i.unref(r),{class:i.unref(Ae)("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:i.withCtx(()=>[i.createElementVNode("span",YF,[i.renderSlot(o.$slots,"default")])]),_:3},16,["class"]))}}),ul=i.defineComponent({__name:"Input",props:{defaultValue:{},modelValue:{},class:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,r=e,o=et.useVModel(n,"modelValue",r,{passive:!0,defaultValue:n.defaultValue});return(s,a)=>i.withDirectives((i.openBlock(),i.createElementBlock("input",{"onUpdate:modelValue":a[0]||(a[0]=l=>i.isRef(o)?o.value=l:null),class:i.normalizeClass(i.unref(Ae)("flex h-9 w-full rounded-md border border-ed-input bg-transparent px-3 py-1 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)),[[i.vModelText,i.unref(o)]])}}),R1=i.defineComponent({__name:"Label",props:{for:{},asChild:{type:Boolean},as:{},class:{}},setup(t){const e=t,n=i.computed(()=>{const{class:r,...o}=e;return o});return(r,o)=>(i.openBlock(),i.createBlock(i.unref(WL),i.mergeProps(n.value,{class:i.unref(Ae)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",e.class)}),{default:i.withCtx(()=>[i.renderSlot(r.$slots,"default")]),_:3},16,["class"]))}}),cl=i.defineComponent({__name:"PopoverTrigger",props:{asChild:{type:Boolean},as:{}},setup(t){const e=t;return(n,r)=>(i.openBlock(),i.createBlock(i.unref(KL),i.normalizeProps(i.guardReactiveProps(e)),{default:i.withCtx(()=>[i.renderSlot(n.$slots,"default")]),_:3},16))}});let L1;function D1(){return L1===void 0&&(L1=navigator.platform.includes("Mac")),L1}function bf(t){return t.toLowerCase()==="mod"?D1()?"⌘":"Ctrl":t.toLowerCase()==="alt"?D1()?"⌥":"Alt":t.toLowerCase()==="shift"?D1()?"⇧":"Shift":t}function L6(t){return t.map(bf).join(" ")}const D6=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,P6=u2,P1=(t,e)=>n=>{var r;if((e==null?void 0:e.variants)==null)return P6(t,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:s}=e,a=Object.keys(o).map(c=>{const f=n==null?void 0:n[c],p=s==null?void 0:s[c];if(f===null)return null;const m=D6(f)||D6(p);return o[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[y,w]=b;return Array.isArray(w)?w.includes({...s,...l}[y]):{...s,...l}[y]===w})?[...c,p,m]:c},[]);return P6(t,a,u,n==null?void 0:n.class,n==null?void 0:n.className)},V6=i.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,o=i.computed(()=>{const{class:a,size:l,variant:u,...c}=n;return c}),s=Dt(o,r);return(a,l)=>(i.openBlock(),i.createBlock(i.unref(JD),i.mergeProps(i.unref(s),{class:i.unref(Ae)(i.unref(JF)({variant:a.variant,size:a.size}),n.class)}),{default:i.withCtx(()=>[i.renderSlot(a.$slots,"default")]),_:3},16,["class"]))}}),JF=P1("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"}}),dl=i.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 o=Dt(t,e);return(s,a)=>(i.openBlock(),i.createBlock(i.unref(eP),i.normalizeProps(i.guardReactiveProps(i.unref(o))),{default:i.withCtx(()=>[i.renderSlot(s.$slots,"default")]),_:3},16))}}),Xs=i.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,o=i.computed(()=>{const{class:a,...l}=n;return l}),s=Dt(o,r);return(a,l)=>(i.openBlock(),i.createBlock(i.unref(oP),null,{default:i.withCtx(()=>[i.createVNode(i.unref(rP),i.mergeProps({...i.unref(s),...a.$attrs},{class:i.unref(Ae)(`z-50 overflow-hidden rounded-md bg-ed-primary px-3 py-1.5 text-xs text-ed-primary-foreground
|
|
161
|
+
*/const uF="10.0.6";function cF(){typeof __VUE_I18N_FULL_INSTALL__!="boolean"&&(qs().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!="boolean"&&(qs().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(qs().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(qs().__INTLIFY_PROD_DEVTOOLS__=!1)}const Zi={FALLBACK_TO_ROOT:MV,NOT_FOUND_PARENT_SCOPE:9,IGNORE_OBJ_FLATTEN:10,DEPRECATE_TC:11},dF={[Zi.FALLBACK_TO_ROOT]:"Fall back to {type} '{key}' with root locale.",[Zi.NOT_FOUND_PARENT_SCOPE]:"Not found parent scope. use the global scope.",[Zi.IGNORE_OBJ_FLATTEN]:"Ignore object flatten: '{key}' key has an string value",[Zi.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 af(dF[t],...e)}const Vt={UNEXPECTED_RETURN_TYPE:bV,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 Jn(t,...e){return rl(t,null,process.env.NODE_ENV!=="production"?{messages:fF,args:e}:void 0)}const fF={[Vt.UNEXPECTED_RETURN_TYPE]:"Unexpected return type in composer",[Vt.INVALID_ARGUMENT]:"Invalid argument",[Vt.MUST_BE_CALL_SETUP_TOP]:"Must be called at the top of a `setup` function",[Vt.NOT_INSTALLED]:"Need to install with `app.use` function",[Vt.UNEXPECTED_ERROR]:"Unexpected error",[Vt.REQUIRED_VALUE]:"Required in value: {0}",[Vt.INVALID_VALUE]:"Invalid value",[Vt.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN]:"Cannot setup vue-devtools plugin",[Vt.NOT_INSTALLED_WITH_PROVIDE]:"Need to install with `provide` function",[Vt.NOT_COMPATIBLE_LEGACY_VUE_I18N]:"Not compatible legacy VueI18n.",[Vt.NOT_AVAILABLE_COMPOSITION_IN_LEGACY]:"Not available Compostion API in Legacy API mode. Please make sure that the legacy API mode is working properly"},w1=Io("__translateVNode"),x1=Io("__datetimeParts"),C1=Io("__numberParts"),Gs=Io("__enableEmitter"),Du=Io("__disableEmitter"),f6=Io("__setPluralRules"),p6=Io("__injectWithOption"),E1=Io("__dispose");function Pu(t){if(!xt(t))return t;for(const e in t)if(so(t,e))if(!e.includes("."))xt(t[e])&&Pu(t[e]);else{const n=e.split("."),r=n.length-1;let o=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 o||(o[n[a]]=It()),!xt(o[n[a]])){process.env.NODE_ENV!=="production"&&Ki(gf(Zi.IGNORE_OBJ_FLATTEN,{key:n[a]})),s=!0;break}o=o[n[a]]}s||(o[n[r]]=t[e],delete t[e]),xt(o[n[r]])&&Pu(o[n[r]])}return t}function k1(t,e){const{messages:n,__i18n:r,messageResolver:o,flatJson:s}=e,a=lt(n)?n:Jt(r)?It():{[t]:It()};if(Jt(r)&&r.forEach(l=>{if("locale"in l&&"resource"in l){const{locale:u,resource:c}=l;u?(a[u]=a[u]||It(),cf(c,a[u])):cf(c,a)}else _e(l)&&cf(JSON.parse(l),a)}),o==null&&s)for(const l in a)so(a,l)&&Pu(a[l]);return a}function h6(t){return t.type}function m6(t,e,n){let r=xt(e.messages)?e.messages:It();"__i18nGlobal"in n&&(r=k1(t.locale.value,{messages:r,__i18n:n.__i18nGlobal}));const o=Object.keys(r);o.length&&o.forEach(s=>{t.mergeLocaleMessage(s,r[s])});{if(xt(e.datetimeFormats)){const s=Object.keys(e.datetimeFormats);s.length&&s.forEach(a=>{t.mergeDateTimeFormat(a,e.datetimeFormats[a])})}if(xt(e.numberFormats)){const s=Object.keys(e.numberFormats);s.length&&s.forEach(a=>{t.mergeNumberFormat(a,e.numberFormats[a])})}}}function g6(t){return i.createVNode(i.Text,null,t,0)}const b6="__INTLIFY_META__",v6=()=>[],pF=()=>!1;let y6=0;function w6(t){return(e,n,r,o)=>t(n,r,i.getCurrentInstance()||void 0,o)}const hF=()=>{const t=i.getCurrentInstance();let e=null;return t&&(e=h6(t)[b6])?{[b6]:e}:null};function S1(t={}){const{__root:e,__injectWithOption:n}=t,r=e===void 0,o=t.flatJson,s=io?i.ref:i.shallowRef;let a=Ct(t.inheritLocale)?t.inheritLocale:!0;const l=s(e&&a?e.locale.value:_e(t.locale)?t.locale:Ru),u=s(e&&a?e.fallbackLocale.value:_e(t.fallbackLocale)||Jt(t.fallbackLocale)||lt(t.fallbackLocale)||t.fallbackLocale===!1?t.fallbackLocale:l.value),c=s(k1(l.value,t)),f=s(lt(t.datetimeFormats)?t.datetimeFormats:{[l.value]:{}}),p=s(lt(t.numberFormats)?t.numberFormats:{[l.value]:{}});let m=e?e.missingWarn:Ct(t.missingWarn)||nl(t.missingWarn)?t.missingWarn:!0,g=e?e.fallbackWarn:Ct(t.fallbackWarn)||nl(t.fallbackWarn)?t.fallbackWarn:!0,b=e?e.fallbackRoot:Ct(t.fallbackRoot)?t.fallbackRoot:!0,y=!!t.fallbackFormat,w=Pt(t.missing)?t.missing:null,x=Pt(t.missing)?w6(t.missing):null,S=Pt(t.postTranslation)?t.postTranslation:null,E=e?e.warnHtmlMessage:Ct(t.warnHtmlMessage)?t.warnHtmlMessage:!0,C=!!t.escapeParameter;const T=e?e.modifiers:lt(t.modifiers)?t.modifiers:{};let _=t.pluralRules||e&&e.pluralRules,A;A=(()=>{r&&Xx(null);const te={version:uF,locale:l.value,fallbackLocale:u.value,messages:c.value,modifiers:T,pluralRules:_,missing:x===null?void 0:x,missingWarn:m,fallbackWarn:g,fallbackFormat:y,unresolving:!0,postTranslation:S===null?void 0:S,warnHtmlMessage:E,escapeParameter:C,messageResolver:t.messageResolver,messageCompiler:t.messageCompiler,__meta:{framework:"vue"}};te.datetimeFormats=f.value,te.numberFormats=p.value,te.__datetimeFormatters=lt(A)?A.__datetimeFormatters:void 0,te.__numberFormatters=lt(A)?A.__numberFormatters:void 0,process.env.NODE_ENV!=="production"&&(te.__v_emitter=lt(A)?A.__v_emitter:void 0);const ge=zV(te);return r&&Xx(ge),ge})(),Lu(A,l.value,u.value);function L(){return[l.value,u.value,c.value,f.value,p.value]}const B=i.computed({get:()=>l.value,set:te=>{l.value=te,A.locale=l.value}}),W=i.computed({get:()=>u.value,set:te=>{u.value=te,A.fallbackLocale=u.value,Lu(A,l.value,te)}}),J=i.computed(()=>c.value),ue=i.computed(()=>f.value),X=i.computed(()=>p.value);function H(){return Pt(S)?S:null}function F(te){S=te,A.postTranslation=te}function R(){return w}function G(te){te!==null&&(x=w6(te)),w=te,A.missing=x}function N(te,ge){return te!=="translate"||!ge.resolvedMessage}const oe=(te,ge,le,we,$e,ct)=>{L();let Ot;try{process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__,r||(A.fallbackContext=e?$V():void 0),Ot=te(A)}finally{process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__,r||(A.fallbackContext=void 0)}if(le!=="translate exists"&&ln(Ot)&&Ot===pf||le==="translate exists"&&!Ot){const[Nt,pi]=ge();if(process.env.NODE_ENV!=="production"&&e&&_e(Nt)&&N(le,pi)&&(b&&(mf(g,Nt)||Jx(m,Nt))&&Ki(gf(Zi.FALLBACK_TO_ROOT,{key:Nt,type:le})),process.env.NODE_ENV!=="production")){const{__v_emitter:ie}=A;ie&&b&&ie.emit("fallback",{type:le,key:Nt,to:"global",groupId:`${le}:${Nt}`})}return e&&b?we(e):$e(Nt)}else{if(ct(Ot))return Ot;throw Jn(Vt.UNEXPECTED_RETURN_TYPE)}};function ne(...te){return oe(ge=>Reflect.apply(l6,null,[ge,...te]),()=>v1(...te),"translate",ge=>Reflect.apply(ge.t,ge,[...te]),ge=>ge,ge=>_e(ge))}function xe(...te){const[ge,le,we]=te;if(we&&!xt(we))throw Jn(Vt.INVALID_ARGUMENT);return ne(ge,le,hn({resolvedMessage:!0},we||{}))}function Ee(...te){return oe(ge=>Reflect.apply(e6,null,[ge,...te]),()=>g1(...te),"datetime format",ge=>Reflect.apply(ge.d,ge,[...te]),()=>hf,ge=>_e(ge))}function ze(...te){return oe(ge=>Reflect.apply(r6,null,[ge,...te]),()=>b1(...te),"number format",ge=>Reflect.apply(ge.n,ge,[...te]),()=>hf,ge=>_e(ge))}function ke(te){return te.map(ge=>_e(ge)||ln(ge)||Ct(ge)?g6(String(ge)):ge)}const q={normalize:ke,interpolate:te=>te,type:"vnode"};function Z(...te){return oe(ge=>{let le;const we=ge;try{we.processor=q,le=Reflect.apply(l6,null,[we,...te])}finally{we.processor=null}return le},()=>v1(...te),"translate",ge=>ge[w1](...te),ge=>[g6(ge)],ge=>Jt(ge))}function fe(...te){return oe(ge=>Reflect.apply(r6,null,[ge,...te]),()=>b1(...te),"number format",ge=>ge[C1](...te),v6,ge=>_e(ge)||Jt(ge))}function j(...te){return oe(ge=>Reflect.apply(e6,null,[ge,...te]),()=>g1(...te),"datetime format",ge=>ge[x1](...te),v6,ge=>_e(ge)||Jt(ge))}function ee(te){_=te,A.pluralRules=_}function U(te,ge){return oe(()=>{if(!te)return!1;const le=_e(ge)?ge:l.value,we=Xe(le),$e=A.messageResolver(we,te);return Yi($e)||Vr($e)||_e($e)},()=>[te],"translate exists",le=>Reflect.apply(le.te,le,[te,ge]),pF,le=>Ct(le))}function de(te){let ge=null;const le=$x(A,u.value,l.value);for(let we=0;we<le.length;we++){const $e=c.value[le[we]]||{},ct=A.messageResolver($e,te);if(ct!=null){ge=ct;break}}return ge}function Se(te){const ge=de(te);return ge??(e?e.tm(te)||{}:{})}function Xe(te){return c.value[te]||{}}function ft(te,ge){if(o){const le={[te]:ge};for(const we in le)so(le,we)&&Pu(le[we]);ge=le[te]}c.value[te]=ge,A.messages=c.value}function pt(te,ge){c.value[te]=c.value[te]||{};const le={[te]:ge};if(o)for(const we in le)so(le,we)&&Pu(le[we]);ge=le[te],cf(ge,c.value[te]),A.messages=c.value}function $(te){return f.value[te]||{}}function P(te,ge){f.value[te]=ge,A.datetimeFormats=f.value,n6(A,te,ge)}function ae(te,ge){f.value[te]=hn(f.value[te]||{},ge),A.datetimeFormats=f.value,n6(A,te,ge)}function ve(te){return p.value[te]||{}}function Ie(te,ge){p.value[te]=ge,A.numberFormats=p.value,i6(A,te,ge)}function Je(te,ge){p.value[te]=hn(p.value[te]||{},ge),A.numberFormats=p.value,i6(A,te,ge)}y6++,e&&io&&(i.watch(e.locale,te=>{a&&(l.value=te,A.locale=te,Lu(A,l.value,u.value))}),i.watch(e.fallbackLocale,te=>{a&&(u.value=te,A.fallbackLocale=te,Lu(A,l.value,u.value))}));const He={id:y6,locale:B,fallbackLocale:W,get inheritLocale(){return a},set inheritLocale(te){a=te,te&&e&&(l.value=e.locale.value,u.value=e.fallbackLocale.value,Lu(A,l.value,u.value))},get availableLocales(){return Object.keys(c.value).sort()},messages:J,get modifiers(){return T},get pluralRules(){return _||{}},get isGlobal(){return r},get missingWarn(){return m},set missingWarn(te){m=te,A.missingWarn=m},get fallbackWarn(){return g},set fallbackWarn(te){g=te,A.fallbackWarn=g},get fallbackRoot(){return b},set fallbackRoot(te){b=te},get fallbackFormat(){return y},set fallbackFormat(te){y=te,A.fallbackFormat=y},get warnHtmlMessage(){return E},set warnHtmlMessage(te){E=te,A.warnHtmlMessage=te},get escapeParameter(){return C},set escapeParameter(te){C=te,A.escapeParameter=te},t:ne,getLocaleMessage:Xe,setLocaleMessage:ft,mergeLocaleMessage:pt,getPostTranslationHandler:H,setPostTranslationHandler:F,getMissingHandler:R,setMissingHandler:G,[f6]:ee};return He.datetimeFormats=ue,He.numberFormats=X,He.rt=xe,He.te=U,He.tm=Se,He.d=Ee,He.n=ze,He.getDateTimeFormat=$,He.setDateTimeFormat=P,He.mergeDateTimeFormat=ae,He.getNumberFormat=ve,He.setNumberFormat=Ie,He.mergeNumberFormat=Je,He[p6]=n,He[w1]=Z,He[x1]=j,He[C1]=fe,process.env.NODE_ENV!=="production"&&(He[Gs]=te=>{A.__v_emitter=te},He[Du]=()=>{A.__v_emitter=void 0}),He}const x6="vue-i18n: composer properties",_1={"vue-devtools-plugin-vue-i18n":"Vue I18n DevTools","vue-i18n-resource-inspector":"Vue I18n DevTools","vue-i18n-timeline":"Vue I18n"},mF={"vue-i18n-resource-inspector":"Search for scopes ..."},gF={"vue-i18n-timeline":16764185};let T1;async function bF(t,e){return new Promise((n,r)=>{try{lF({id:"vue-devtools-plugin-vue-i18n",label:_1["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:[x6],app:t},o=>{T1=o,o.on.visitComponentTree(({componentInstance:a,treeNode:l})=>{vF(a,l,e)}),o.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&&E6(l,a.vnode.el.__VUE_I18N__):E6(l,a.vnode.el.__VUE_I18N__))}),o.addInspector({id:"vue-i18n-resource-inspector",label:_1["vue-i18n-resource-inspector"],icon:"language",treeFilterPlaceholder:mF["vue-i18n-resource-inspector"]}),o.on.getInspectorTree(a=>{a.app===t&&a.inspectorId==="vue-i18n-resource-inspector"&&EF(a,e)});const s=new Map;o.on.getInspectorState(async a=>{if(a.app===t&&a.inspectorId==="vue-i18n-resource-inspector")if(o.unhighlightElement(),SF(a,e),a.nodeId==="global"){if(!s.has(a.app)){const[l]=await o.getComponentInstances(a.app);s.set(a.app,l)}o.highlightElement(s.get(a.app))}else{const l=kF(a.nodeId,e);l&&o.highlightElement(l)}}),o.on.editInspectorState(a=>{a.app===t&&a.inspectorId==="vue-i18n-resource-inspector"&&TF(a,e)}),o.addTimelineLayer({id:"vue-i18n-timeline",label:_1["vue-i18n-timeline"],color:gF["vue-i18n-timeline"]}),n(!0)})}catch(o){console.error(o),r(!1)}})}function C6(t){return t.type.name||t.type.displayName||t.type.__file||"Anonymous"}function vF(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 o={label:`i18n (${C6(t)} Scope)`,textColor:0,backgroundColor:16764185};e.tags.push(o)}}function E6(t,e){const n=x6;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:A1(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 A1(t){const e={};return Object.keys(t).forEach(n=>{const r=t[n];Pt(r)&&"source"in r?e[n]=CF(r):Yi(r)&&r.loc&&r.loc.source?e[n]=r.loc.source:xt(r)?e[n]=A1(r):e[n]=r}),e}const yF={"<":"<",">":">",'"':""","&":"&"};function wF(t){return t.replace(/[<>"&]/g,xF)}function xF(t){return yF[t]||t}function CF(t){return{_custom:{type:"function",display:`<span>ƒ</span> ${t.source?`("${wF(t.source)}")`:"(?)"}`}}}function EF(t,e){t.rootNodes.push({id:"global",label:"Global Scope"});const n=e.mode==="composition"?e.global:e.global.__composer;for(const[r,o]of e.__instances){const s=e.mode==="composition"?o:o.__composer;n!==s&&t.rootNodes.push({id:s.id.toString(),label:`${C6(r)} Scope`})}}function kF(t,e){let n=null;if(t!=="global"){for(const[r,o]of e.__instances.entries())if(o.id.toString()===t){n=r;break}}return n}function k6(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 SF(t,e){const n=k6(t.nodeId,e);return n&&(t.state=_F(n)),null}function _F(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 o="Locale messages info",s=[{type:o,key:"messages",editable:!1,value:A1(t.messages.value)}];e[o]=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 Vu(t,e){if(T1){let n;e&&"groupId"in e&&(n=e.groupId,delete e.groupId),T1.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 TF(t,e){const n=k6(t.nodeId,e);if(n){const[r]=t.path;r==="locale"&&_e(t.state.value)?n.locale.value=t.state.value:r==="fallbackLocale"&&(_e(t.state.value)||Jt(t.state.value)||xt(t.state.value))?n.fallbackLocale.value=t.state.value:r==="inheritLocale"&&Ct(t.state.value)&&(n.inheritLocale=t.state.value)}}function AF(t){const e=_e(t.locale)?t.locale:Ru,n=_e(t.fallbackLocale)||Jt(t.fallbackLocale)||lt(t.fallbackLocale)||t.fallbackLocale===!1?t.fallbackLocale:e,r=Pt(t.missing)?t.missing:void 0,o=Ct(t.silentTranslationWarn)||nl(t.silentTranslationWarn)?!t.silentTranslationWarn:!0,s=Ct(t.silentFallbackWarn)||nl(t.silentFallbackWarn)?!t.silentFallbackWarn:!0,a=Ct(t.fallbackRoot)?t.fallbackRoot:!0,l=!!t.formatFallbackMessages,u=lt(t.modifiers)?t.modifiers:{},c=t.pluralizationRules,f=Pt(t.postTranslation)?t.postTranslation:void 0,p=_e(t.warnHtmlInMessage)?t.warnHtmlInMessage!=="off":!0,m=!!t.escapeParameterHtml,g=Ct(t.sync)?t.sync:!0;let b=t.messages;if(lt(t.sharedMessages)){const T=t.sharedMessages;b=Object.keys(T).reduce((A,D)=>{const L=A[D]||(A[D]={});return hn(L,T[D]),A},b||{})}const{__i18n:y,__root:w,__injectWithOption:x}=t,S=t.datetimeFormats,E=t.numberFormats,C=t.flatJson;return{locale:e,fallbackLocale:n,messages:b,flatJson:C,datetimeFormats:S,numberFormats:E,missing:r,missingWarn:o,fallbackWarn:s,fallbackRoot:a,fallbackFormat:l,modifiers:u,pluralRules:c,postTranslation:f,warnHtmlMessage:p,escapeParameter:m,messageResolver:t.messageResolver,inheritLocale:g,__i18n:y,__root:w,__injectWithOption:x}}function O1(t={}){const e=S1(AF(t)),{__extender:n}=t,r={id:e.id,get locale(){return e.locale.value},set locale(o){e.locale.value=o},get fallbackLocale(){return e.fallbackLocale.value},set fallbackLocale(o){e.fallbackLocale.value=o},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(o){e.setMissingHandler(o)},get silentTranslationWarn(){return Ct(e.missingWarn)?!e.missingWarn:e.missingWarn},set silentTranslationWarn(o){e.missingWarn=Ct(o)?!o:o},get silentFallbackWarn(){return Ct(e.fallbackWarn)?!e.fallbackWarn:e.fallbackWarn},set silentFallbackWarn(o){e.fallbackWarn=Ct(o)?!o:o},get modifiers(){return e.modifiers},get formatFallbackMessages(){return e.fallbackFormat},set formatFallbackMessages(o){e.fallbackFormat=o},get postTranslation(){return e.getPostTranslationHandler()},set postTranslation(o){e.setPostTranslationHandler(o)},get sync(){return e.inheritLocale},set sync(o){e.inheritLocale=o},get warnHtmlInMessage(){return e.warnHtmlMessage?"warn":"off"},set warnHtmlInMessage(o){e.warnHtmlMessage=o!=="off"},get escapeParameterHtml(){return e.escapeParameter},set escapeParameterHtml(o){e.escapeParameter=o},get pluralizationRules(){return e.pluralRules||{}},__composer:e,t(...o){return Reflect.apply(e.t,e,[...o])},rt(...o){return Reflect.apply(e.rt,e,[...o])},tc(...o){const[s,a,l]=o,u={plural:1};let c=null,f=null;if(process.env.NODE_ENV!=="production"&&Rx(gf(Zi.DEPRECATE_TC)),!_e(s))throw Jn(Vt.INVALID_ARGUMENT);const p=s;return _e(a)?u.locale=a:ln(a)?u.plural=a:Jt(a)?c=a:lt(a)&&(f=a),_e(l)?u.locale=l:Jt(l)?c=l:lt(l)&&(f=l),Reflect.apply(e.t,e,[p,c||f||{},u])},te(o,s){return e.te(o,s)},tm(o){return e.tm(o)},getLocaleMessage(o){return e.getLocaleMessage(o)},setLocaleMessage(o,s){e.setLocaleMessage(o,s)},mergeLocaleMessage(o,s){e.mergeLocaleMessage(o,s)},d(...o){return Reflect.apply(e.d,e,[...o])},getDateTimeFormat(o){return e.getDateTimeFormat(o)},setDateTimeFormat(o,s){e.setDateTimeFormat(o,s)},mergeDateTimeFormat(o,s){e.mergeDateTimeFormat(o,s)},n(...o){return Reflect.apply(e.n,e,[...o])},getNumberFormat(o){return e.getNumberFormat(o)},setNumberFormat(o,s){e.setNumberFormat(o,s)},mergeNumberFormat(o,s){e.mergeNumberFormat(o,s)}};return r.__extender=n,process.env.NODE_ENV!=="production"&&(r.__enableEmitter=o=>{const s=e;s[Gs]&&s[Gs](o)},r.__disableEmitter=()=>{const o=e;o[Du]&&o[Du]()}),r}function OF(t,e,n){return{beforeCreate(){const r=i.getCurrentInstance();if(!r)throw Jn(Vt.UNEXPECTED_ERROR);const o=this.$options;if(o.i18n){const s=o.i18n;if(o.__i18n&&(s.__i18n=o.__i18n),s.__root=e,this===this.$root)this.$i18n=S6(t,s);else{s.__injectWithOption=!0,s.__extender=n.__vueI18nExtend,this.$i18n=O1(s);const a=this.$i18n;a.__extender&&(a.__disposer=a.__extender(this.$i18n))}}else if(o.__i18n)if(this===this.$root)this.$i18n=S6(t,o);else{this.$i18n=O1({__i18n:o.__i18n,__injectWithOption:!0,__extender:n.__vueI18nExtend,__root:e});const s=this.$i18n;s.__extender&&(s.__disposer=s.__extender(this.$i18n))}else this.$i18n=t;o.__i18nGlobal&&m6(e,o,o),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 o=this.__v_emitter=s1();r.__enableEmitter&&r.__enableEmitter(o),o.on("*",Vu)}},unmounted(){const r=i.getCurrentInstance();if(!r)throw Jn(Vt.UNEXPECTED_ERROR);const o=this.$i18n;process.env.NODE_ENV!=="production"&&this.$el&&this.$el.__VUE_I18N__&&(this.__v_emitter&&(this.__v_emitter.off("*",Vu),delete this.__v_emitter),this.$i18n&&(o.__disableEmitter&&o.__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,o.__disposer&&(o.__disposer(),delete o.__disposer,delete o.__extender),n.__deleteInstance(r),delete this.$i18n}}}function S6(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[f6](e.pluralizationRules||t.pluralizationRules);const n=k1(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 M1={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:t=>t==="parent"||t==="global",default:"parent"},i18n:{type:Object}};function MF({slots:t},e){return e.length===1&&e[0]==="default"?(t.default?t.default():[]).reduce((r,o)=>[...r,...o.type===i.Fragment?o.children:[o]],[]):e.reduce((n,r)=>{const o=t[r];return o&&(n[r]=o()),n},It())}function _6(){return i.Fragment}const T6=i.defineComponent({name:"i18n-t",props:hn({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:t=>ln(t)||!isNaN(t)}},M1),setup(t,e){const{slots:n,attrs:r}=e,o=t.i18n||St({useScope:t.scope,__useComponent:!0});return()=>{const s=Object.keys(n).filter(p=>p!=="_"),a=It();t.locale&&(a.locale=t.locale),t.plural!==void 0&&(a.plural=_e(t.plural)?+t.plural:t.plural);const l=MF(e,s),u=o[w1](t.keypath,l,a),c=hn(It(),r),f=_e(t.tag)||xt(t.tag)?t.tag:_6();return i.h(f,c,u)}}});function BF(t){return Jt(t)&&!_e(t[0])}function A6(t,e,n,r){const{slots:o,attrs:s}=e;return()=>{const a={part:!0};let l=It();t.locale&&(a.locale=t.locale),_e(t.format)?a.key=t.format:xt(t.format)&&(_e(t.format.key)&&(a.key=t.format.key),l=Object.keys(t.format).reduce((m,g)=>n.includes(g)?hn(It(),m,{[g]:t.format[g]}):m,It()));const u=r(t.value,a,l);let c=[a.key];Jt(u)?c=u.map((m,g)=>{const b=o[m.type],y=b?b({[m.type]:m.value,index:g,parts:u}):[m.value];return BF(y)&&(y[0].key=`${m.type}-${g}`),y}):_e(u)&&(c=[u]);const f=hn(It(),s),p=_e(t.tag)||xt(t.tag)?t.tag:_6();return i.h(p,f,c)}}const O6=i.defineComponent({name:"i18n-n",props:hn({value:{type:Number,required:!0},format:{type:[String,Object]}},M1),setup(t,e){const n=t.i18n||St({useScope:t.scope,__useComponent:!0});return A6(t,e,o6,(...r)=>n[C1](...r))}}),M6=i.defineComponent({name:"i18n-d",props:hn({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},M1),setup(t,e){const n=t.i18n||St({useScope:t.scope,__useComponent:!0});return A6(t,e,t6,(...r)=>n[x1](...r))}});function IF(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 RF(t){const e=a=>{const{instance:l,value:u}=a;if(!l||!l.$)throw Jn(Vt.UNEXPECTED_ERROR);const c=IF(t,l.$),f=B6(u);return[Reflect.apply(c.t,c,[...I6(f)]),c]};return{created:(a,l)=>{const[u,c]=e(l);io&&t.global===c&&(a.__i18nWatcher=i.watch(c.locale,()=>{l.instance&&l.instance.$forceUpdate()})),a.__composer=c,a.textContent=u},unmounted:a=>{io&&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=B6(l);a.textContent=Reflect.apply(u.t,u,[...I6(c)])}},getSSRProps:a=>{const[l]=e(a);return{textContent:l}}}}function B6(t){if(_e(t))return{path:t};if(lt(t)){if(!("path"in t))throw Jn(Vt.REQUIRED_VALUE,"path");return t}else throw Jn(Vt.INVALID_VALUE)}function I6(t){const{path:e,locale:n,args:r,choice:o,plural:s}=t,a={},l=r||{};return _e(n)&&(a.locale=n),ln(o)&&(a.plural=o),ln(s)&&(a.plural=s),[e,l,a]}function LF(t,e,...n){const r=lt(n[0])?n[0]:{};(Ct(r.globalInstall)?r.globalInstall:!0)&&([T6.name,"I18nT"].forEach(s=>t.component(s,T6)),[O6.name,"I18nN"].forEach(s=>t.component(s,O6)),[M6.name,"I18nD"].forEach(s=>t.component(s,M6))),t.directive("t",RF(e))}const DF=Io("global-vue-i18n");function PF(t={},e){const n=__VUE_I18N_LEGACY_API__&&Ct(t.legacy)?t.legacy:__VUE_I18N_LEGACY_API__,r=Ct(t.globalInjection)?t.globalInjection:!0,o=new Map,[s,a]=VF(t,n),l=Io(process.env.NODE_ENV!=="production"?"vue-i18n":"");function u(m){return o.get(m)||null}function c(m,g){o.set(m,g)}function f(m){o.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),lt(g[0])){const w=g[0];p.__composerExtend=w.__composerExtend,p.__vueI18nExtend=w.__vueI18nExtend}let b=null;!n&&r&&(b=qF(m,p.global)),__VUE_I18N_FULL_INSTALL__&&LF(m,p,...g),__VUE_I18N_LEGACY_API__&&n&&m.mixin(OF(a,a.__composer,p));const y=m.unmount;if(m.unmount=()=>{b&&b(),p.dispose(),y()},process.env.NODE_ENV!=="production"){if(!await bF(m,p))throw Jn(Vt.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN);const x=s1();if(n){const S=a;S.__enableEmitter&&S.__enableEmitter(x)}else{const S=a;S[Gs]&&S[Gs](x)}x.on("*",Vu)}},get global(){return a},dispose(){s.stop()},__instances:o,__getInstance:u,__setInstance:c,__deleteInstance:f};return p}function St(t={}){const e=i.getCurrentInstance();if(e==null)throw Jn(Vt.MUST_BE_CALL_SETUP_TOP);if(!e.isCE&&e.appContext.app!=null&&!e.appContext.app.__VUE_I18N_SYMBOL__)throw Jn(Vt.NOT_INSTALLED);const n=FF(e),r=zF(n),o=h6(e),s=$F(t,o);if(s==="global")return m6(r,t,o),r;if(s==="parent"){let u=HF(n,e,t.__useComponent);return u==null&&(process.env.NODE_ENV!=="production"&&Ki(gf(Zi.NOT_FOUND_PARENT_SCOPE)),u=r),u}const a=n;let l=a.__getInstance(e);if(l==null){const u=hn({},t);"__i18n"in o&&(u.__i18n=o.__i18n),r&&(u.__root=r),l=S1(u),a.__composerExtend&&(l[E1]=a.__composerExtend(l)),WF(a,e,l),a.__setInstance(e,l)}return l}function VF(t,e,n){const r=i.effectScope(),o=__VUE_I18N_LEGACY_API__&&e?r.run(()=>O1(t)):r.run(()=>S1(t));if(o==null)throw Jn(Vt.UNEXPECTED_ERROR);return[r,o]}function FF(t){const e=i.inject(t.isCE?DF:t.appContext.app.__VUE_I18N_SYMBOL__);if(!e)throw Jn(t.isCE?Vt.NOT_INSTALLED_WITH_PROVIDE:Vt.UNEXPECTED_ERROR);return e}function $F(t,e){return lf(t)?"__i18n"in e?"local":"global":t.useScope?t.useScope:"local"}function zF(t){return t.mode==="composition"?t.global:t.global.__composer}function HF(t,e,n=!1){let r=null;const o=e.root;let s=UF(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[p6]&&(r=null))}if(r!=null||o===s)break;s=s.parent}return r}function UF(t,e=!1){return t==null?null:e&&t.vnode.ctx||t.parent}function WF(t,e,n){let r=null;i.onMounted(()=>{if(process.env.NODE_ENV!=="production"&&e.vnode.el){e.vnode.el.__VUE_I18N__=n,r=s1();const o=n;o[Gs]&&o[Gs](r),r.on("*",Vu)}},e),i.onUnmounted(()=>{const o=n;process.env.NODE_ENV!=="production"&&e.vnode.el&&e.vnode.el.__VUE_I18N__&&(r&&r.off("*",Vu),o[Du]&&o[Du](),delete e.vnode.el.__VUE_I18N__),t.__deleteInstance(e);const s=o[E1];s&&(s(),delete o[E1])},e)}const jF=["locale","fallbackLocale","availableLocales"],R6=["t","rt","d","n","tm","te"];function qF(t,e){const n=Object.create(null);return jF.forEach(o=>{const s=Object.getOwnPropertyDescriptor(e,o);if(!s)throw Jn(Vt.UNEXPECTED_ERROR);const a=i.isRef(s.value)?{get(){return s.value.value},set(l){s.value.value=l}}:{get(){return s.get&&s.get()}};Object.defineProperty(n,o,a)}),t.config.globalProperties.$i18n=n,R6.forEach(o=>{const s=Object.getOwnPropertyDescriptor(e,o);if(!s||!s.value)throw Jn(Vt.UNEXPECTED_ERROR);Object.defineProperty(t.config.globalProperties,`$${o}`,s)}),()=>{delete t.config.globalProperties.$i18n,R6.forEach(o=>{delete t.config.globalProperties[`$${o}`]})}}if(cF(),LV(fV),DV(OV),PV($x),process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__){const t=qs();t.__INTLIFY__=!0,pV(t.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}process.env.NODE_ENV;const KF={class:"flex gap-2 items-center overflow-x-auto overflow-y-hidden [&::-webkit-scrollbar]:h-1.5"},GF={class:"flex-1 flex justify-end items-center gap-x-3"},XF=i.defineComponent({__name:"Toolbar",props:{editor:{},editorComment:{},disabled:{type:Boolean,default:!1},mode:{}},setup(t){const e=i.defineAsyncComponent(()=>Promise.resolve().then(()=>CQ)),{t:n}=St(),r=t,o=i.inject("isEditable",i.ref(!0)),s=["fontSize","fontFamily","superText","spellchecker","fontSizeIncreaseDecrease"],a=i.computed(()=>{const p=[...r.editor.extensionManager.extensions].sort((g,b)=>g.name==="superText"?1:b.name==="superText"?-1:0);let m=[];for(const g of p){const{button:b,divider:y=!1,spacer:w=!1,toolbar:x=!0}=g.options;if(!b||!y0(b)||!x)continue;const S=b({editor:r.editor,extension:g,t:i.unref(n)});if(Array.isArray(S)){const E=S.map((C,T)=>({id:`${g.name}`,button:C,divider:T===S.length-1?y:!1,spacer:T===0?w:!1}));m=[...m,...E];continue}m.push({button:S,divider:y,spacer:w,id:`${g.name}`})}if(r.mode!==Fe.EDITOR)return m.filter(g=>g.id&&s.includes(g.id));if(m=m.filter(g=>g.id!=="superText"),!o.value){m=m.map(b=>(b.button.componentProps.disabled=!0,b));const g=m.find(b=>b.id==="spellchecker");g&&(g.button.componentProps.disabled=!1)}return m}),l=f=>f.id==="spellchecker"?"!text-[#2977D9] border border-gray-300 bg-[#F2F2F7] 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=i.computed(()=>{var f;return(f=r.editor)==null?void 0:f.extensionManager.extensions.find(p=>p.name==="spellchecker")});return(f,p)=>{var m;return i.openBlock(),i.createElementBlock("div",{id:"tool-bar",class:i.normalizeClass(i.unref(Ae)("z-10",i.unref(Mu)()&&"top-16"))},[i.createElementVNode("div",KF,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(a.value,(g,b)=>{var y;return i.openBlock(),i.createElementBlock(i.Fragment,{key:b},[g.spacer&&b!==0?(i.openBlock(),i.createBlock(i.unref(oi),{key:0,orientation:"vertical",class:"h-[16px] mx-[10px]"})):i.createCommentVNode("",!0),(i.openBlock(),i.createBlock(i.resolveDynamicComponent(g.button.component),i.mergeProps({id:g.id,ref_for:!0},g.button.componentProps,{editor:f.editor,disabled:f.disabled||((y=g.button.componentProps)==null?void 0:y.disabled),"custom-class":l(g),icon:u(g)}),i.createSlots({_:2},[i.renderList(g.button.componentSlots,(w,x,S)=>({name:`${x}`,fn:i.withCtx(E=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(w),i.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?(i.openBlock(),i.createBlock(i.unref(oi),{key:1,orientation:"vertical",class:"mx-2 h-auto"})):i.createCommentVNode("",!0)],64)}),128)),i.createElementVNode("div",GF,[p[0]||(p[0]=i.createElementVNode("div",{id:"tool-bar-auto-save"},null,-1)),c.value?(i.openBlock(),i.createBlock(i.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"])):i.createCommentVNode("",!0)])])],2)}}}),al=i.defineComponent({__name:"Popover",props:{defaultOpen:{type:Boolean},open:{type:Boolean},modal:{type:Boolean}},emits:["update:open"],setup(t,{emit:e}){const o=Dt(t,e);return(s,a)=>(i.openBlock(),i.createBlock(i.unref(qL),i.normalizeProps(i.guardReactiveProps(i.unref(o))),{default:i.withCtx(()=>[i.renderSlot(s.$slots,"default")]),_:3},16))}}),ll=i.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,o=i.computed(()=>{const{class:a,...l}=n;return l}),s=Dt(o,r);return(a,l)=>(i.openBlock(),i.createBlock(i.unref(GL),null,{default:i.withCtx(()=>[i.createVNode(i.unref(JL),i.mergeProps({...i.unref(s),...a.$attrs},{class:i.unref(Ae)("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:i.withCtx(()=>[i.renderSlot(a.$slots,"default")]),_:3},16,["class"])]),_:3}))}}),B1=i.defineComponent({__name:"Tabs",props:{defaultValue:{},orientation:{},dir:{},activationMode:{},modelValue:{},asChild:{type:Boolean},as:{}},emits:["update:modelValue"],setup(t,{emit:e}){const o=Dt(t,e);return(s,a)=>(i.openBlock(),i.createBlock(i.unref(KD),i.normalizeProps(i.guardReactiveProps(i.unref(o))),{default:i.withCtx(()=>[i.renderSlot(s.$slots,"default")]),_:3},16))}}),I1=i.defineComponent({__name:"TabsList",props:{loop:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(t){const e=t,n=i.computed(()=>{const{class:r,...o}=e;return o});return(r,o)=>(i.openBlock(),i.createBlock(i.unref(GD),i.mergeProps(n.value,{class:i.unref(Ae)("inline-flex items-center justify-center rounded-md bg-ed-muted p-1 text-ed-muted-foreground",e.class)}),{default:i.withCtx(()=>[i.renderSlot(r.$slots,"default")]),_:3},16,["class"]))}}),YF={class:"truncate"},Fu=i.defineComponent({__name:"TabsTrigger",props:{value:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(t){const e=t,n=i.computed(()=>{const{class:o,...s}=e;return s}),r=Xn(n);return(o,s)=>(i.openBlock(),i.createBlock(i.unref(YD),i.mergeProps(i.unref(r),{class:i.unref(Ae)("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:i.withCtx(()=>[i.createElementVNode("span",YF,[i.renderSlot(o.$slots,"default")])]),_:3},16,["class"]))}}),ul=i.defineComponent({__name:"Input",props:{defaultValue:{},modelValue:{},class:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,r=e,o=et.useVModel(n,"modelValue",r,{passive:!0,defaultValue:n.defaultValue});return(s,a)=>i.withDirectives((i.openBlock(),i.createElementBlock("input",{"onUpdate:modelValue":a[0]||(a[0]=l=>i.isRef(o)?o.value=l:null),class:i.normalizeClass(i.unref(Ae)("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)),[[i.vModelText,i.unref(o)]])}}),R1=i.defineComponent({__name:"Label",props:{for:{},asChild:{type:Boolean},as:{},class:{}},setup(t){const e=t,n=i.computed(()=>{const{class:r,...o}=e;return o});return(r,o)=>(i.openBlock(),i.createBlock(i.unref(WL),i.mergeProps(n.value,{class:i.unref(Ae)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",e.class)}),{default:i.withCtx(()=>[i.renderSlot(r.$slots,"default")]),_:3},16,["class"]))}}),cl=i.defineComponent({__name:"PopoverTrigger",props:{asChild:{type:Boolean},as:{}},setup(t){const e=t;return(n,r)=>(i.openBlock(),i.createBlock(i.unref(KL),i.normalizeProps(i.guardReactiveProps(e)),{default:i.withCtx(()=>[i.renderSlot(n.$slots,"default")]),_:3},16))}});let L1;function D1(){return L1===void 0&&(L1=navigator.platform.includes("Mac")),L1}function bf(t){return t.toLowerCase()==="mod"?D1()?"⌘":"Ctrl":t.toLowerCase()==="alt"?D1()?"⌥":"Alt":t.toLowerCase()==="shift"?D1()?"⇧":"Shift":t}function L6(t){return t.map(bf).join(" ")}const D6=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,P6=u2,P1=(t,e)=>n=>{var r;if((e==null?void 0:e.variants)==null)return P6(t,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:s}=e,a=Object.keys(o).map(c=>{const f=n==null?void 0:n[c],p=s==null?void 0:s[c];if(f===null)return null;const m=D6(f)||D6(p);return o[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[y,w]=b;return Array.isArray(w)?w.includes({...s,...l}[y]):{...s,...l}[y]===w})?[...c,p,m]:c},[]);return P6(t,a,u,n==null?void 0:n.class,n==null?void 0:n.className)},V6=i.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,o=i.computed(()=>{const{class:a,size:l,variant:u,...c}=n;return c}),s=Dt(o,r);return(a,l)=>(i.openBlock(),i.createBlock(i.unref(JD),i.mergeProps(i.unref(s),{class:i.unref(Ae)(i.unref(JF)({variant:a.variant,size:a.size}),n.class)}),{default:i.withCtx(()=>[i.renderSlot(a.$slots,"default")]),_:3},16,["class"]))}}),JF=P1("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"}}),dl=i.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 o=Dt(t,e);return(s,a)=>(i.openBlock(),i.createBlock(i.unref(eP),i.normalizeProps(i.guardReactiveProps(i.unref(o))),{default:i.withCtx(()=>[i.renderSlot(s.$slots,"default")]),_:3},16))}}),Xs=i.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,o=i.computed(()=>{const{class:a,...l}=n;return l}),s=Dt(o,r);return(a,l)=>(i.openBlock(),i.createBlock(i.unref(oP),null,{default:i.withCtx(()=>[i.createVNode(i.unref(rP),i.mergeProps({...i.unref(s),...a.$attrs},{class:i.unref(Ae)(`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
|
|
@@ -270,7 +270,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`),ne=R,oe=G),N===void 0&
|
|
|
270
270
|
`,lW="️",uW="",_g="";let op=null,ip=null;function cW(t=[]){const e={};ir.groups=e;const n=new ir;op==null&&(op=m8(nW)),ip==null&&(ip=m8(rW)),ye(n,"'",vg),ye(n,"{",Nu),ye(n,"}",ec),ye(n,"[",If),ye(n,"]",Rf),ye(n,"(",Lf),ye(n,")",Df),ye(n,"<",Pf),ye(n,">",Vf),ye(n,"(",Ff),ye(n,")",$f),ye(n,"「",zf),ye(n,"」",Hf),ye(n,"『",Uf),ye(n,"』",Wf),ye(n,"<",jf),ye(n,">",qf),ye(n,"&",Kf),ye(n,"*",Gf),ye(n,"@",es),ye(n,"`",Yf),ye(n,"^",Jf),ye(n,":",ts),ye(n,",",yg),ye(n,"$",Zf),ye(n,".",Do),ye(n,"=",Qf),ye(n,"!",wg),ye(n,"-",Fr),ye(n,"%",tc),ye(n,"|",Nf),ye(n,"+",ep),ye(n,"#",tp),ye(n,"?",nc),ye(n,'"',xg),ye(n,"/",Po),ye(n,";",Cg),ye(n,"~",rc),ye(n,"_",np),ye(n,"\\",Xf),ye(n,"・",c8);const r=tn(n,ci,mg,{[ag]:!0});tn(r,ci,r);const o=tn(r,ui,l8,{[Ju]:!0}),s=tn(r,oc,u8,{[Zu]:!0}),a=tn(n,ui,li,{[lg]:!0});tn(a,ci,o),tn(a,ui,a),tn(o,ci,o),tn(o,ui,o);const l=tn(n,oc,fg,{[ug]:!0});tn(l,ui),tn(l,ci,s),tn(l,oc,l),tn(s,ci,s),tn(s,ui),tn(s,oc,s);const u=ye(n,Sg,bg,{[dg]:!0}),c=ye(n,p8,gg,{[dg]:!0}),f=tn(n,kg,gg,{[dg]:!0});ye(n,_g,f),ye(c,Sg,u),ye(c,_g,f),tn(c,kg,f),ye(f,p8),ye(f,Sg),tn(f,kg,f),ye(f,_g,f);const p=tn(n,Eg,d8,{[s8]:!0});ye(p,"#"),tn(p,Eg,p),ye(p,lW,p);const m=ye(p,uW);ye(m,"#"),tn(m,Eg,p);const g=[[ui,a],[ci,o]],b=[[ui,null],[oc,l],[ci,s]];for(let y=0;y<op.length;y++)ns(n,op[y],pg,li,g);for(let y=0;y<ip.length;y++)ns(n,ip[y],hg,fg,b);Ns(pg,{tld:!0,ascii:!0},e),Ns(hg,{utld:!0,alpha:!0},e),ns(n,"file",Bf,li,g),ns(n,"mailto",Bf,li,g),ns(n,"http",yl,li,g),ns(n,"https",yl,li,g),ns(n,"ftp",yl,li,g),ns(n,"ftps",yl,li,g),Ns(Bf,{scheme:!0,ascii:!0},e),Ns(yl,{slashscheme:!0,ascii:!0},e),t=t.sort((y,w)=>y[0]>w[0]?1:-1);for(let y=0;y<t.length;y++){const w=t[y][0],S=t[y][1]?{[oW]:!0}:{[iW]:!0};w.indexOf("-")>=0?S[cg]=!0:ui.test(w)?ci.test(w)?S[Ju]=!0:S[lg]=!0:S[ag]=!0,a8(n,w,w,S)}return a8(n,"localhost",Qu,{ascii:!0}),n.jd=new ir(rp),{start:n,tokens:vl({groups:e},f8)}}function h8(t,e){const n=dW(e.replace(/[A-Z]/g,l=>l.toLowerCase())),r=n.length,o=[];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,o.push({t:f.t,v:e.slice(s-c,s),s:s-c,e:s})}return o}function dW(t){const e=[],n=t.length;let r=0;for(;r<n;){let o=t.charCodeAt(r),s,a=o<55296||o>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 ns(t,e,n,r,o){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 ir(r),s.jr=o.slice(),t.j[u]=s),t=s}return s=new ir(n),s.jr=o.slice(),t.j[e[a-1]]=s,s}function m8(t){const e=[],n=[];let r=0,o="0123456789";for(;r<t.length;){let s=0;for(;o.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 ic={defaultProtocol:"http",events:null,format:g8,formatHref:g8,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function Tg(t,e=null){let n=vl({},ic);t&&(n=vl(n,t instanceof Tg?t.o:t));const r=n.ignoreTags,o=[];for(let s=0;s<r.length;s++)o.push(r[s].toUpperCase());this.o=n,e&&(this.defaultRender=e),this.ignoreTags=o}Tg.prototype={o:ic,ignoreTags:[],defaultRender(t){return t},check(t){return this.get("validate",t.toString(),t)},get(t,e,n){const r=e!=null;let o=this.o[t];return o&&(typeof o=="object"?(o=n.t in o?o[n.t]:ic[t],typeof o=="function"&&r&&(o=o(e,n))):typeof o=="function"&&r&&(o=o(e,n.t,n)),o)},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 g8(t){return t}function b8(t,e){this.t="token",this.v=t,this.tk=e}b8.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=ic.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),o=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&&vl(a,f),{tagName:o,attributes:a,content:s,eventListeners:p}}};function sp(t,e){class n extends b8{constructor(o,s){super(o,s),this.t=t}}for(const r in e)n.prototype[r]=e[r];return n.t=t,n}const v8=sp("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),y8=sp("text"),fW=sp("nl"),ap=sp("url",{isLink:!0,toHref(t=ic.defaultProtocol){return this.hasProtocol()?this.v:`${t}://${this.v}`},hasProtocol(){const t=this.tk;return t.length>=2&&t[0].t!==Qu&&t[1].t===ts}}),$r=t=>new ir(t);function pW({groups:t}){const e=t.domain.concat([Kf,Gf,es,Xf,Yf,Jf,Zf,Qf,Fr,mg,tc,Nf,ep,tp,Po,rp,rc,np]),n=[ts,yg,Do,wg,tc,nc,xg,Cg,Pf,Vf,Nu,ec,Rf,If,Lf,Df,Ff,$f,zf,Hf,Uf,Wf,jf,qf],r=[Kf,vg,Gf,Xf,Yf,Jf,Zf,Qf,Fr,Nu,ec,tc,Nf,ep,tp,nc,Po,rp,rc,np],o=$r(),s=ye(o,rc);ut(s,r,s),ut(s,t.domain,s);const a=$r(),l=$r(),u=$r();ut(o,t.domain,a),ut(o,t.scheme,l),ut(o,t.slashscheme,u),ut(a,r,s),ut(a,t.domain,a);const c=ye(a,es);ye(s,es,c),ye(l,es,c),ye(u,es,c);const f=ye(s,Do);ut(f,r,s),ut(f,t.domain,s);const p=$r();ut(c,t.domain,p),ut(p,t.domain,p);const m=ye(p,Do);ut(m,t.domain,p);const g=$r(v8);ut(m,t.tld,g),ut(m,t.utld,g),ye(c,Qu,g);const b=ye(p,Fr);ye(b,Fr,b),ut(b,t.domain,p),ut(g,t.domain,p),ye(g,Do,m),ye(g,Fr,b);const y=ye(g,ts);ut(y,t.numeric,v8);const w=ye(a,Fr),x=ye(a,Do);ye(w,Fr,w),ut(w,t.domain,a),ut(x,r,s),ut(x,t.domain,a);const S=$r(ap);ut(x,t.tld,S),ut(x,t.utld,S),ut(S,t.domain,a),ut(S,r,s),ye(S,Do,x),ye(S,Fr,w),ye(S,es,c);const E=ye(S,ts),C=$r(ap);ut(E,t.numeric,C);const T=$r(ap),_=$r();ut(T,e,T),ut(T,n,_),ut(_,e,T),ut(_,n,_),ye(S,Po,T),ye(C,Po,T);const A=ye(l,ts),D=ye(u,ts),L=ye(D,Po),B=ye(L,Po);ut(l,t.domain,a),ye(l,Do,x),ye(l,Fr,w),ut(u,t.domain,a),ye(u,Do,x),ye(u,Fr,w),ut(A,t.domain,T),ye(A,Po,T),ye(A,nc,T),ut(B,t.domain,T),ut(B,e,T),ye(B,Po,T);const W=[[Nu,ec],[If,Rf],[Lf,Df],[Pf,Vf],[Ff,$f],[zf,Hf],[Uf,Wf],[jf,qf]];for(let J=0;J<W.length;J++){const[ue,X]=W[J],H=ye(T,ue);ye(_,ue,H),ye(H,X,T);const F=$r(ap);ut(H,e,F);const R=$r();ut(H,n),ut(F,e,F),ut(F,n,R),ut(R,e,F),ut(R,n,R),ye(F,X,T),ye(R,X,T)}return ye(o,Qu,S),ye(o,bg,fW),{start:o,tokens:f8}}function hW(t,e,n){let r=n.length,o=0,s=[],a=[];for(;o<r;){let l=t,u=null,c=null,f=0,p=null,m=-1;for(;o<r&&!(u=l.go(n[o].t));)a.push(n[o++]);for(;o<r&&(c=u||l.go(n[o].t));)u=null,l=c,l.accepts()?(m=0,p=l):m>=0&&m++,o++,f++;if(m<0)o-=f,o<r&&(a.push(n[o]),o++);else{a.length>0&&(s.push(Ag(y8,e,a)),a=[]),o-=m,f-=m;const g=p.t,b=n.slice(o-f,o);s.push(Ag(g,e,b))}}return a.length>0&&s.push(Ag(y8,e,a)),s}function Ag(t,e,n){const r=n[0].s,o=n[n.length-1].e,s=e.slice(r,o);return new t(s,n)}const mW=typeof console<"u"&&console&&console.warn||(()=>{}),gW="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",qt={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function bW(){return ir.groups={},qt.scanner=null,qt.parser=null,qt.tokenQueue=[],qt.pluginQueue=[],qt.customSchemes=[],qt.initialized=!1,qt}function w8(t,e=!1){if(qt.initialized&&mW(`linkifyjs: already initialized - will not register custom scheme "${t}" ${gW}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(t))throw new Error(`linkifyjs: incorrect scheme format.
|
|
271
271
|
1. Must only contain digits, lowercase ASCII letters or "-"
|
|
272
272
|
2. Cannot start or end with "-"
|
|
273
|
-
3. "-" cannot repeat`);qt.customSchemes.push([t,e])}function vW(){qt.scanner=cW(qt.customSchemes);for(let t=0;t<qt.tokenQueue.length;t++)qt.tokenQueue[t][1]({scanner:qt.scanner});qt.parser=pW(qt.scanner.tokens);for(let t=0;t<qt.pluginQueue.length;t++)qt.pluginQueue[t][1]({scanner:qt.scanner,parser:qt.parser});return qt.initialized=!0,qt}function Og(t){return qt.initialized||vW(),hW(qt.parser.start,t,h8(qt.scanner.start,t))}Og.scan=h8;function x8(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 Tg(n),o=Og(t),s=[];for(let a=0;a<o.length;a++){const l=o[a];l.isLink&&(!e||l.t===e)&&r.check(l)&&s.push(l.toFormattedObject(r))}return s}function yW(t){return t.length===1?t[0].isLink:t.length===3&&t[1].isLink?["()","[]"].includes(t[0].value+t[2].value):!1}function wW(t){return new tt({key:new kt("autolink"),appendTransaction:(e,n,r)=>{const o=e.some(c=>c.docChanged)&&!n.doc.eq(r.doc),s=e.some(c=>c.getMeta("preventAutolink"));if(!o||s)return;const{tr:a}=r,l=cO(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],y=p.pos+m.lastIndexOf(b);if(!b)return!1;const w=Og(b).map(x=>x.toObject(t.defaultProtocol));if(!yW(w))return!1;w.filter(x=>x.isLink).map(x=>({...x,from:y+x.start+1,to:y+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=>{Xm(x.from,x.to,r.doc).some(S=>S.mark.type===t.type)||a.addMark(x.from,x.to,t.type.create({href:x.href}))})}}),!!a.steps.length)return a}})}function xW(t){return new tt({key:new kt("handleClickLink"),props:{handleClick:(e,n,r)=>{var o,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=(o=c==null?void 0:c.href)!==null&&o!==void 0?o: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 CW(t){return new tt({key:new kt("handlePasteLink"),props:{handlePaste:(e,n,r)=>{const{state:o}=e,{selection:s}=o,{empty:a}=s;if(a)return!1;let l="";r.content.forEach(c=>{l+=c.textContent});const u=x8(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 EW=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g;function ea(t,e){const n=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return e&&e.forEach(r=>{const o=typeof r=="string"?r:r.scheme;o&&n.push(o)}),!t||t.replace(EW,"").match(new RegExp(`^(?:(?:${n.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,"i"))}const kW=Gn.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"){w8(t);return}w8(t.scheme,t.optionalSlashes)})},onDestroy(){bW()},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)=>!!ea(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=>!!ea(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=>!!ea(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",bt(this.options.HTMLAttributes,t),0]:["a",bt(this.options.HTMLAttributes,{...t,href:""}),0]},addCommands(){return{setLink:t=>({chain:e})=>{const{href:n}=t;return this.options.isAllowedUri(n,{defaultValidate:r=>!!ea(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=>!!ea(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[zi({find:t=>{const e=[];if(t){const{protocols:n,defaultProtocol:r}=this.options,o=x8(t).filter(s=>s.isLink&&this.options.isAllowedUri(s.value,{defaultValidate:a=>!!ea(a,n),protocols:n,defaultProtocol:r}));o.length&&o.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(wW({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:r=>this.options.isAllowedUri(r,{defaultValidate:o=>!!ea(o,e),protocols:e,defaultProtocol:n}),shouldAutoLink:this.options.shouldAutoLink})),this.options.openOnClick===!0&&t.push(xW({type:this.type})),this.options.linkOnPaste&&t.push(CW({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type})),t}}),SW={class:"flex w-full max-w-sm items-center gap-1.5"},_W={class:"relative w-full max-w-sm items-center"},TW={class:"flex w-full max-w-sm items-center gap-1.5"},AW={class:"relative w-full max-w-sm items-center"},OW={class:"absolute start-0 inset-y-0 flex items-center justify-center px-2"},C8=i.defineComponent({__name:"LinkEditBlock",props:{editor:{}},emits:["onSetLink","onClickOutside"],setup(t,{emit:e}){const n=t,r=e,{t:o}=St();let s=i.reactive({text:"",link:""});const a=i.ref(null),{focused:l}=et.useFocus(a),u=i.ref(!0),c=i.ref(null);et.onClickOutside(c,p=>r("onClickOutside",p)),i.watchEffect(()=>{const{href:p,target:m}=n.editor.getAttributes("link"),{from:g,to:b}=n.editor.state.selection,y=n.editor.state.doc.textBetween(g,b," ");s={link:p,text:y}});function f(){r("onSetLink",s.link,s.text,u.value)}return i.onMounted(()=>{l.value=!0}),(p,m)=>(i.openBlock(),i.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"},[i.createElementVNode("form",{class:"flex flex-col gap-2",onSubmit:i.withModifiers(f,["prevent"])},[i.createVNode(i.unref(R1),null,{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(o)("editor.link.dialog.text")),1)]),_:1}),i.createElementVNode("div",SW,[i.createElementVNode("div",_W,[i.createVNode(i.unref(ul),{modelValue:i.unref(s).text,"onUpdate:modelValue":m[0]||(m[0]=g=>i.unref(s).text=g),type:"text",required:"",placeholder:"텍스트"},null,8,["modelValue"])])]),i.createVNode(i.unref(R1),null,{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(o)("editor.link.dialog.link")),1)]),_:1}),i.createElementVNode("div",TW,[i.createElementVNode("div",AW,[i.createVNode(i.unref(ul),{ref_key:"inputRef",ref:a,modelValue:i.unref(s).link,"onUpdate:modelValue":m[1]||(m[1]=g=>i.unref(s).link=g),type:"url",required:"",class:"pl-10"},null,8,["modelValue"]),i.createElementVNode("span",OW,[i.createVNode(i.unref(jt),{class:"size-5 text-ed-muted-foreground",name:"Link"})])])]),i.createVNode(i.unref(_n),{class:"mt-2 self-end"},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(o)("editor.link.dialog.button.apply")),1)]),_:1})],32)],512))}}),MW=i.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,o,s){e.action&&e.action({link:r,text:o,openInNewTab:s})}return(r,o)=>(i.openBlock(),i.createBlock(i.unref(al),null,{default:i.withCtx(()=>[i.createVNode(i.unref(cl),{disabled:r.disabled},{default:i.withCtx(()=>[i.createVNode(je,{icon:r.icon,tooltip:r.tooltip,"is-active":r.isActive,disabled:r.disabled},null,8,["icon","tooltip","is-active","disabled"])]),_:1},8,["disabled"]),i.createVNode(i.unref(ll),{"hide-when-detached":"","as-child":"",class:"w-full sm:w-80",align:"start",side:"bottom"},{default:i.withCtx(()=>[i.createVNode(C8,{editor:r.editor,onOnSetLink:n},null,8,["editor"])]),_:1})]),_:1}))}}),Mg=kW.extend({inclusive:!1,parseHTML(){return[{tag:'a[href]:not([data-type="button"]):not([href *= "javascript:" i])'}]},renderHTML({HTMLAttributes:t}){return["a",bt(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:MW,componentProps:{action:r=>{const{link:o,text:s,openInNewTab:a}=r;e.chain().extendMarkRange("link").insertContent({type:"text",text:s,marks:[{type:"link",attrs:{href:o,target:a?"_blank":""}}]}).setLink({href:o}).focus().run()},isActive:()=>e.isActive("link")||!1,disabled:!e.can().setLink({href:""}),icon:"Link",tooltip:n("editor.link.tooltip")}})}},addProseMirrorPlugins(){return[new tt({props:{handleClick:(t,e)=>{const{schema:n,doc:r,tr:o}=t.state,s=fd(r.resolve(e),n.marks.link);if(!s)return!1;const a=r.resolve(s.from),l=r.resolve(s.to),u=o.setSelection(new Be(a,l));t.dispatch(u)}}})]}}),BW=Bt.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{}}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:t}){return["hr",bt(this.options.HTMLAttributes,t)]},addCommands(){return{setHorizontalRule:()=>({chain:t,state:e})=>{const{selection:n}=e,{$from:r,$to:o}=n,s=t();return r.parentOffset===0?s.insertContentAt({from:Math.max(r.pos-1,0),to:o.pos},{type:this.name}):i4(n)?s.insertContentAt(o.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(Be.create(a.doc,c.pos+1)):c.nodeAfter.isBlock?a.setSelection(De.create(a.doc,c.pos)):a.setSelection(Be.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(Be.create(a.doc,f+1)))}a.scrollIntoView()}return!0}).run()}}},addInputRules(){return[u4({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}).extend({renderHTML(){return["div",bt(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:je,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 lp=200,yn=function(){};yn.prototype.append=function(e){return e.length?(e=yn.from(e),!this.length&&e||e.length<lp&&this.leafAppend(e)||this.length<lp&&e.leafPrepend(this)||this.appendInner(e)):this},yn.prototype.prepend=function(e){return e.length?yn.from(e).append(this):this},yn.prototype.appendInner=function(e){return new IW(this,e)},yn.prototype.slice=function(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.length),e>=n?yn.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,n))},yn.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)},yn.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)},yn.prototype.map=function(e,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length);var o=[];return this.forEach(function(s,a){return o.push(e(s,a))},n,r),o},yn.from=function(e){return e instanceof yn?e:e&&e.length?new E8(e):yn.empty};var E8=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(o,s){return o==0&&s==this.length?this:new e(this.values.slice(o,s))},e.prototype.getInner=function(o){return this.values[o]},e.prototype.forEachInner=function(o,s,a,l){for(var u=s;u<a;u++)if(o(this.values[u],l+u)===!1)return!1},e.prototype.forEachInvertedInner=function(o,s,a,l){for(var u=s-1;u>=a;u--)if(o(this.values[u],l+u)===!1)return!1},e.prototype.leafAppend=function(o){if(this.length+o.length<=lp)return new e(this.values.concat(o.flatten()))},e.prototype.leafPrepend=function(o){if(this.length+o.length<=lp)return new e(o.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(e.prototype,n),e}(yn);yn.empty=new E8([]);var IW=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,o,s,a){var l=this.left.length;if(o<l&&this.left.forEachInner(r,o,Math.min(s,l),a)===!1||s>l&&this.right.forEachInner(r,Math.max(o-l,0),Math.min(this.length,s)-l,a+l)===!1)return!1},e.prototype.forEachInvertedInner=function(r,o,s,a){var l=this.left.length;if(o>l&&this.right.forEachInvertedInner(r,o-l,Math.max(s,l)-l,a+l)===!1||s<l&&this.left.forEachInvertedInner(r,Math.min(o,l),s,a)===!1)return!1},e.prototype.sliceInner=function(r,o){if(r==0&&o==this.length)return this;var s=this.left.length;return o<=s?this.left.slice(r,o):r>=s?this.right.slice(r-s,o-s):this.left.slice(r,s).append(this.right.slice(0,o-s))},e.prototype.leafAppend=function(r){var o=this.right.leafAppend(r);if(o)return new e(this.left,o)},e.prototype.leafPrepend=function(r){var o=this.left.leafPrepend(r);if(o)return new e(o,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}(yn);const RW=500;class lo{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 o,s;n&&(o=this.remapping(r,this.items.length),s=o.maps.length);let a=e.tr,l,u,c=[],f=[];return this.items.forEach((p,m)=>{if(!p.step){o||(o=this.remapping(r,m+1),s=o.maps.length),s--,f.push(p);return}if(o){f.push(new Vo(p.map));let g=p.step.map(o.slice(s)),b;g&&a.maybeStep(g).doc&&(b=a.mapping.maps[a.mapping.maps.length-1],c.push(new Vo(b,void 0,void 0,c.length+f.length))),s--,b&&o.appendMap(b,s)}else a.maybeStep(p.step);if(p.selection)return l=o?p.selection.map(o.slice(s)):p.selection,u=new lo(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,o){let s=[],a=this.eventCount,l=this.items,u=!o&&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 Vo(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),o||(u=m)}let c=a-r.depth;return c>DW&&(l=LW(l,c),a-=c),new lo(l.append(s),a)}remapping(e,n){let r=new Jl;return this.items.forEach((o,s)=>{let a=o.mirrorOffset!=null&&s-o.mirrorOffset>=e?r.maps.length-o.mirrorOffset:void 0;r.appendMap(o.map,a)},e,n),r}addMaps(e){return this.eventCount==0?this:new lo(this.items.append(e.map(n=>new Vo(n))),this.eventCount)}rebased(e,n){if(!this.eventCount)return this;let r=[],o=Math.max(0,this.items.length-n),s=e.mapping,a=e.steps.length,l=this.eventCount;this.items.forEach(m=>{m.selection&&l--},o);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 y=e.steps[g].invert(e.docs[g]),w=m.selection&&m.selection.map(s.slice(u+1,g));w&&l++,r.push(new Vo(b,y,w))}else r.push(new Vo(b))},o);let c=[];for(let m=n;m<a;m++)c.push(new Vo(s.maps[m]));let f=this.items.slice(0,o).append(c).append(r),p=new lo(f,l);return p.emptyItemCount()>RW&&(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,o=[],s=0;return this.items.forEach((a,l)=>{if(l>=e)o.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 Vo(c.invert(),u,f),m,g=o.length-1;(m=o.length&&o[g].merge(p))?o[g]=m:o.push(p)}}else a.map&&r--},this.items.length,0),new lo(yn.from(o.reverse()),s)}}lo.empty=new lo(yn.empty,0);function LW(t,e){let n;return t.forEach((r,o)=>{if(r.selection&&e--==0)return n=o,!1}),t.slice(n)}class Vo{constructor(e,n,r,o){this.map=e,this.step=n,this.selection=r,this.mirrorOffset=o}merge(e){if(this.step&&e.step&&!e.selection){let n=e.step.merge(this.step);if(n)return new Vo(n.getMap().invert(),n,this.selection)}}}class rs{constructor(e,n,r,o,s){this.done=e,this.undone=n,this.prevRanges=r,this.prevTime=o,this.prevComposition=s}}const DW=20;function PW(t,e,n,r){let o=n.getMeta(ta),s;if(o)return o.historyState;n.getMeta($W)&&(t=new rs(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 rs(t.done.addTransform(n,void 0,r,up(e)),t.undone,k8(n.mapping.maps),t.prevTime,t.prevComposition):new rs(t.done,t.undone.addTransform(n,void 0,r,up(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||!VW(n,t.prevRanges)),c=a?Bg(t.prevRanges,n.mapping):k8(n.mapping.maps);return new rs(t.done.addTransform(n,u?e.selection.getBookmark():void 0,r,up(e)),lo.empty,c,n.time,l??t.prevComposition)}else return(s=n.getMeta("rebased"))?new rs(t.done.rebased(n,s),t.undone.rebased(n,s),Bg(t.prevRanges,n.mapping),t.prevTime,t.prevComposition):new rs(t.done.addMaps(n.mapping.maps),t.undone.addMaps(n.mapping.maps),Bg(t.prevRanges,n.mapping),t.prevTime,t.prevComposition)}function VW(t,e){if(!e)return!1;if(!t.docChanged)return!0;let n=!1;return t.mapping.maps[0].forEach((r,o)=>{for(let s=0;s<e.length;s+=2)r<=e[s+1]&&o>=e[s]&&(n=!0)}),n}function k8(t){let e=[];for(let n=t.length-1;n>=0&&e.length==0;n--)t[n].forEach((r,o,s,a)=>e.push(s,a));return e}function Bg(t,e){if(!t)return null;let n=[];for(let r=0;r<t.length;r+=2){let o=e.map(t[r],1),s=e.map(t[r+1],-1);o<=s&&n.push(o,s)}return n}function FW(t,e,n){let r=up(e),o=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(),o,r),u=new rs(n?l:s.remaining,n?s.remaining:l,null,0,-1);return s.transform.setSelection(a).setMeta(ta,{redo:n,historyState:u})}let Ig=!1,S8=null;function up(t){let e=t.plugins;if(S8!=e){Ig=!1,S8=e;for(let n=0;n<e.length;n++)if(e[n].spec.historyPreserveItems){Ig=!0;break}}return Ig}const ta=new kt("history"),$W=new kt("closeHistory");function zW(t={}){return t={depth:t.depth||100,newGroupDelay:t.newGroupDelay||500},new tt({key:ta,state:{init(){return new rs(lo.empty,lo.empty,null,0,-1)},apply(e,n,r){return PW(n,r,e,t)}},config:t,props:{handleDOMEvents:{beforeinput(e,n){let r=n.inputType,o=r=="historyUndo"?T8:r=="historyRedo"?A8:null;return o?(n.preventDefault(),o(e.state,e.dispatch)):!1}}}})}function _8(t,e){return(n,r)=>{let o=ta.getState(n);if(!o||(t?o.undone:o.done).eventCount==0)return!1;if(r){let s=FW(o,n,t);s&&r(e?s.scrollIntoView():s)}return!0}}const T8=_8(!1,!0),A8=_8(!0,!0),HW=Qe.create({name:"history",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:t,dispatch:e})=>T8(t,e),redo:()=>({state:t,dispatch:e})=>A8(t,e)}},addProseMirrorPlugins(){return[zW(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()}}}),O8={HISTORY_TRANSACTION:"history$",ADD_TO_HISTORY_TRANSACTION:"addToHistory"},Rg=HW.extend({addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),depth:10,button:({editor:e,t:n})=>["undo","redo"].map(o=>({component:je,componentProps:{action:()=>{o==="undo"&&e.commands.undo(),o==="redo"&&e.commands.redo()},shortcutKeys:o==="undo"?["mod","Z"]:["shift","mod","Z"],disabled:!e.can()[o](),icon:o==="undo"?"Undo2":"Redo2",tooltip:n(`editor.${o}.tooltip`)}}))}}}),{isFullscreen:Lg,toggleFullscreen:Dg}=vn(),UW=Qe.create({name:"fullscreen",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),button:({editor:e,extension:n,t:r})=>({component:je,componentProps:{tooltip:Lg.value?r("editor.fullscreen.tooltip.exit"):r("editor.fullscreen.tooltip.fullscreen"),action:()=>Dg(),icon:Lg.value?"Minimize":"Maximize",isActive:()=>Lg.value}})}},addKeyboardShortcuts(){return{F11:()=>(Dg(),!0),"Mod-F11":()=>(Dg(),!0)}}}),WW=Qe.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 tt({key:new kt("characterCount"),appendTransaction:(e,n,r)=>{if(t)return;const o=this.options.limit;if(o==null||o===0){t=!0;return}const s=this.storage.characters({node:r.doc});if(s>o){const a=s-o,l=0,u=a;console.warn(`[CharacterCount] Initial content exceeded limit of ${o} 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 o=this.storage.characters({node:n.doc}),s=this.storage.characters({node:e.doc});if(s<=r||o>r&&s>r&&s<=o)return!0;if(o>r&&s>r&&s>o||!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 jW(t={}){return new tt({view(e){return new qW(e,t)}})}class qW{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(o=>{let s=a=>{this[o](a)};return e.dom.addEventListener(o,s),{name:o,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 o=this.editorView.dom.offsetParent;this.element||(this.element=o.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(!o||o==document.body&&getComputedStyle(o).position=="static")s=-pageXOffset,a=-pageYOffset;else{let l=o.getBoundingClientRect();s=l.left-o.scrollLeft,a=l.top-o.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),o=r&&r.type.spec.disableDropCursor,s=typeof o=="function"?o(this.editorView,n,e):o;if(n&&!s){let a=n.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let l=ty(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 KW=Qe.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[jW(this.options)]}}),GW=Qe.create({name:"focus",addOptions(){return{className:"has-focus",mode:"all"}},addProseMirrorPlugins(){return[new tt({key:new kt("focus"),props:{decorations:({doc:t,selection:e})=>{const{isEditable:n,isFocused:r}=this.editor,{anchor:o}=e,s=[];if(!n||!r)return mt.create(t,[]);let a=0;this.options.mode==="deepest"&&t.descendants((u,c)=>{if(u.isText)return;if(!(o>=c&&o<=c+u.nodeSize-1))return!1;a+=1});let l=0;return t.descendants((u,c)=>{if(u.isText||!(o>=c&&o<=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(Wt.node(c,c+u.nodeSize,{class:this.options.className}))}),mt.create(t,s)}}})]}});class nn extends Ve{constructor(e){super(e,e)}map(e,n){let r=e.resolve(n.map(this.head));return nn.valid(r)?new nn(r):Ve.near(r)}content(){return Ce.empty}eq(e){return e instanceof nn&&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 nn(e.resolve(n.pos))}getBookmark(){return new Pg(this.anchor)}static valid(e){let n=e.parent;if(n.isTextblock||!XW(e)||!YW(e))return!1;let r=n.type.spec.allowGapCursor;if(r!=null)return r;let o=n.contentMatchAt(e.index()).defaultType;return o&&o.isTextblock}static findGapCursorFrom(e,n,r=!1){e:for(;;){if(!r&&nn.valid(e))return e;let o=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;o+=n;let u=e.doc.resolve(o);if(nn.valid(u))return u}for(;;){let a=n>0?s.firstChild:s.lastChild;if(!a){if(s.isAtom&&!s.isText&&!De.isSelectable(s)){e=e.doc.resolve(o+s.nodeSize*n),r=!1;continue e}break}s=a,o+=n;let l=e.doc.resolve(o);if(nn.valid(l))return l}return null}}}nn.prototype.visible=!1,nn.findFrom=nn.findGapCursorFrom,Ve.jsonID("gapcursor",nn);class Pg{constructor(e){this.pos=e}map(e){return new Pg(e.map(this.pos))}resolve(e){let n=e.resolve(this.pos);return nn.valid(n)?new nn(n):Ve.near(n)}}function XW(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 o=r.child(n-1);;o=o.lastChild){if(o.childCount==0&&!o.inlineContent||o.isAtom||o.type.spec.isolating)return!0;if(o.inlineContent)return!1}}return!0}function YW(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 o=r.child(n);;o=o.firstChild){if(o.childCount==0&&!o.inlineContent||o.isAtom||o.type.spec.isolating)return!0;if(o.inlineContent)return!1}}return!0}function JW(){return new tt({props:{decorations:ej,createSelectionBetween(t,e,n){return e.pos==n.pos&&nn.valid(n)?new nn(n):null},handleClick:QW,handleKeyDown:ZW,handleDOMEvents:{beforeinput:NW}}})}const ZW=Lm({ArrowLeft:cp("horiz",-1),ArrowRight:cp("horiz",1),ArrowUp:cp("vert",-1),ArrowDown:cp("vert",1)});function cp(t,e){const n=t=="vert"?e>0?"down":"up":e>0?"right":"left";return function(r,o,s){let a=r.selection,l=e>0?a.$to:a.$from,u=a.empty;if(a instanceof Be){if(!s.endOfTextblock(n)||l.depth==0)return!1;u=!1,l=r.doc.resolve(e>0?l.after():l.before())}let c=nn.findGapCursorFrom(l,e,u);return c?(o&&o(r.tr.setSelection(new nn(c))),!0):!1}}function QW(t,e,n){if(!t||!t.editable)return!1;let r=t.state.doc.resolve(e);if(!nn.valid(r))return!1;let o=t.posAtCoords({left:n.clientX,top:n.clientY});return o&&o.inside>-1&&De.isSelectable(t.state.doc.nodeAt(o.inside))?!1:(t.dispatch(t.state.tr.setSelection(new nn(r))),!0)}function NW(t,e){if(e.inputType!="insertCompositionText"||!(t.state.selection instanceof nn))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 o=ce.empty;for(let a=r.length-1;a>=0;a--)o=ce.from(r[a].createAndFill(null,o));let s=t.state.tr.replace(n.pos,n.pos,new Ce(o,0,0));return s.setSelection(Be.near(s.doc.resolve(n.pos+1))),t.dispatch(s),!1}function ej(t){if(!(t.selection instanceof nn))return null;let e=document.createElement("div");return e.className="ProseMirror-gapcursor",mt.create(t.doc,[Wt.widget(t.selection.head,e,{key:"gapcursor"})])}const tj=Qe.create({name:"gapCursor",addProseMirrorPlugins(){return[JW()]},extendNodeSchema(t){var e;const n={name:t.name,options:t.options,storage:t.storage};return{allowGapCursor:(e=at(Re(t,"allowGapCursor",n)))!==null&&e!==void 0?e:null}}}),nj=Bt.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",bt(this.options.HTMLAttributes,t)]},renderText(){return`
|
|
273
|
+
3. "-" cannot repeat`);qt.customSchemes.push([t,e])}function vW(){qt.scanner=cW(qt.customSchemes);for(let t=0;t<qt.tokenQueue.length;t++)qt.tokenQueue[t][1]({scanner:qt.scanner});qt.parser=pW(qt.scanner.tokens);for(let t=0;t<qt.pluginQueue.length;t++)qt.pluginQueue[t][1]({scanner:qt.scanner,parser:qt.parser});return qt.initialized=!0,qt}function Og(t){return qt.initialized||vW(),hW(qt.parser.start,t,h8(qt.scanner.start,t))}Og.scan=h8;function x8(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 Tg(n),o=Og(t),s=[];for(let a=0;a<o.length;a++){const l=o[a];l.isLink&&(!e||l.t===e)&&r.check(l)&&s.push(l.toFormattedObject(r))}return s}function yW(t){return t.length===1?t[0].isLink:t.length===3&&t[1].isLink?["()","[]"].includes(t[0].value+t[2].value):!1}function wW(t){return new tt({key:new kt("autolink"),appendTransaction:(e,n,r)=>{const o=e.some(c=>c.docChanged)&&!n.doc.eq(r.doc),s=e.some(c=>c.getMeta("preventAutolink"));if(!o||s)return;const{tr:a}=r,l=cO(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],y=p.pos+m.lastIndexOf(b);if(!b)return!1;const w=Og(b).map(x=>x.toObject(t.defaultProtocol));if(!yW(w))return!1;w.filter(x=>x.isLink).map(x=>({...x,from:y+x.start+1,to:y+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=>{Xm(x.from,x.to,r.doc).some(S=>S.mark.type===t.type)||a.addMark(x.from,x.to,t.type.create({href:x.href}))})}}),!!a.steps.length)return a}})}function xW(t){return new tt({key:new kt("handleClickLink"),props:{handleClick:(e,n,r)=>{var o,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=(o=c==null?void 0:c.href)!==null&&o!==void 0?o: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 CW(t){return new tt({key:new kt("handlePasteLink"),props:{handlePaste:(e,n,r)=>{const{state:o}=e,{selection:s}=o,{empty:a}=s;if(a)return!1;let l="";r.content.forEach(c=>{l+=c.textContent});const u=x8(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 EW=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g;function ea(t,e){const n=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return e&&e.forEach(r=>{const o=typeof r=="string"?r:r.scheme;o&&n.push(o)}),!t||t.replace(EW,"").match(new RegExp(`^(?:(?:${n.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,"i"))}const kW=Gn.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"){w8(t);return}w8(t.scheme,t.optionalSlashes)})},onDestroy(){bW()},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)=>!!ea(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=>!!ea(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=>!!ea(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",bt(this.options.HTMLAttributes,t),0]:["a",bt(this.options.HTMLAttributes,{...t,href:""}),0]},addCommands(){return{setLink:t=>({chain:e})=>{const{href:n}=t;return this.options.isAllowedUri(n,{defaultValidate:r=>!!ea(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=>!!ea(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[zi({find:t=>{const e=[];if(t){const{protocols:n,defaultProtocol:r}=this.options,o=x8(t).filter(s=>s.isLink&&this.options.isAllowedUri(s.value,{defaultValidate:a=>!!ea(a,n),protocols:n,defaultProtocol:r}));o.length&&o.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(wW({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:r=>this.options.isAllowedUri(r,{defaultValidate:o=>!!ea(o,e),protocols:e,defaultProtocol:n}),shouldAutoLink:this.options.shouldAutoLink})),this.options.openOnClick===!0&&t.push(xW({type:this.type})),this.options.linkOnPaste&&t.push(CW({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type})),t}}),SW={class:"flex w-full max-w-sm items-center gap-1.5"},_W={class:"relative w-full max-w-sm items-center"},TW={class:"flex w-full max-w-sm items-center gap-1.5"},AW={class:"relative w-full max-w-sm items-center"},OW={class:"absolute start-0 inset-y-0 flex items-center justify-center px-2"},C8=i.defineComponent({__name:"LinkEditBlock",props:{editor:{}},emits:["onSetLink","onClickOutside"],setup(t,{emit:e}){const n=t,r=e,{t:o}=St();let s=i.reactive({text:"",link:""});const a=i.ref(null),{focused:l}=et.useFocus(a),u=i.ref(!0),c=i.ref(null);et.onClickOutside(c,p=>r("onClickOutside",p)),i.watchEffect(()=>{const{href:p,target:m}=n.editor.getAttributes("link"),{from:g,to:b}=n.editor.state.selection,y=n.editor.state.doc.textBetween(g,b," ");s={link:p,text:y}});function f(){r("onSetLink",s.link,s.text,u.value)}return i.onMounted(()=>{l.value=!0}),(p,m)=>(i.openBlock(),i.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"},[i.createElementVNode("form",{class:"flex flex-col gap-2",onSubmit:i.withModifiers(f,["prevent"])},[i.createVNode(i.unref(R1),null,{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(o)("editor.link.dialog.text")),1)]),_:1}),i.createElementVNode("div",SW,[i.createElementVNode("div",_W,[i.createVNode(i.unref(ul),{modelValue:i.unref(s).text,"onUpdate:modelValue":m[0]||(m[0]=g=>i.unref(s).text=g),type:"text",required:"",placeholder:"텍스트"},null,8,["modelValue"])])]),i.createVNode(i.unref(R1),null,{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(o)("editor.link.dialog.link")),1)]),_:1}),i.createElementVNode("div",TW,[i.createElementVNode("div",AW,[i.createVNode(i.unref(ul),{ref_key:"inputRef",ref:a,modelValue:i.unref(s).link,"onUpdate:modelValue":m[1]||(m[1]=g=>i.unref(s).link=g),type:"url",required:"",class:"pl-10"},null,8,["modelValue"]),i.createElementVNode("span",OW,[i.createVNode(i.unref(jt),{class:"size-5 text-ed-muted-foreground",name:"Link"})])])]),i.createVNode(i.unref(_n),{class:"mt-2 self-end"},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(o)("editor.link.dialog.button.apply")),1)]),_:1})],32)],512))}}),MW=i.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,o,s){e.action&&e.action({link:r,text:o,openInNewTab:s})}return(r,o)=>(i.openBlock(),i.createBlock(i.unref(al),null,{default:i.withCtx(()=>[i.createVNode(i.unref(cl),{disabled:r.disabled},{default:i.withCtx(()=>[i.createVNode(je,{icon:r.icon,tooltip:r.tooltip,"is-active":r.isActive,disabled:r.disabled},null,8,["icon","tooltip","is-active","disabled"])]),_:1},8,["disabled"]),i.createVNode(i.unref(ll),{"hide-when-detached":"","as-child":"",class:"w-80",align:"start",side:"bottom"},{default:i.withCtx(()=>[i.createVNode(C8,{editor:r.editor,onOnSetLink:n},null,8,["editor"])]),_:1})]),_:1}))}}),Mg=kW.extend({inclusive:!1,parseHTML(){return[{tag:'a[href]:not([data-type="button"]):not([href *= "javascript:" i])'}]},renderHTML({HTMLAttributes:t}){return["a",bt(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:MW,componentProps:{action:r=>{const{link:o,text:s,openInNewTab:a}=r;e.chain().extendMarkRange("link").insertContent({type:"text",text:s,marks:[{type:"link",attrs:{href:o,target:a?"_blank":""}}]}).setLink({href:o}).focus().run()},isActive:()=>e.isActive("link")||!1,disabled:!e.can().setLink({href:""}),icon:"Link",tooltip:n("editor.link.tooltip")}})}},addProseMirrorPlugins(){return[new tt({props:{handleClick:(t,e)=>{const{schema:n,doc:r,tr:o}=t.state,s=fd(r.resolve(e),n.marks.link);if(!s)return!1;const a=r.resolve(s.from),l=r.resolve(s.to),u=o.setSelection(new Be(a,l));t.dispatch(u)}}})]}}),BW=Bt.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{}}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:t}){return["hr",bt(this.options.HTMLAttributes,t)]},addCommands(){return{setHorizontalRule:()=>({chain:t,state:e})=>{const{selection:n}=e,{$from:r,$to:o}=n,s=t();return r.parentOffset===0?s.insertContentAt({from:Math.max(r.pos-1,0),to:o.pos},{type:this.name}):i4(n)?s.insertContentAt(o.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(Be.create(a.doc,c.pos+1)):c.nodeAfter.isBlock?a.setSelection(De.create(a.doc,c.pos)):a.setSelection(Be.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(Be.create(a.doc,f+1)))}a.scrollIntoView()}return!0}).run()}}},addInputRules(){return[u4({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}).extend({renderHTML(){return["div",bt(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:je,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 lp=200,yn=function(){};yn.prototype.append=function(e){return e.length?(e=yn.from(e),!this.length&&e||e.length<lp&&this.leafAppend(e)||this.length<lp&&e.leafPrepend(this)||this.appendInner(e)):this},yn.prototype.prepend=function(e){return e.length?yn.from(e).append(this):this},yn.prototype.appendInner=function(e){return new IW(this,e)},yn.prototype.slice=function(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.length),e>=n?yn.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,n))},yn.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)},yn.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)},yn.prototype.map=function(e,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length);var o=[];return this.forEach(function(s,a){return o.push(e(s,a))},n,r),o},yn.from=function(e){return e instanceof yn?e:e&&e.length?new E8(e):yn.empty};var E8=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(o,s){return o==0&&s==this.length?this:new e(this.values.slice(o,s))},e.prototype.getInner=function(o){return this.values[o]},e.prototype.forEachInner=function(o,s,a,l){for(var u=s;u<a;u++)if(o(this.values[u],l+u)===!1)return!1},e.prototype.forEachInvertedInner=function(o,s,a,l){for(var u=s-1;u>=a;u--)if(o(this.values[u],l+u)===!1)return!1},e.prototype.leafAppend=function(o){if(this.length+o.length<=lp)return new e(this.values.concat(o.flatten()))},e.prototype.leafPrepend=function(o){if(this.length+o.length<=lp)return new e(o.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(e.prototype,n),e}(yn);yn.empty=new E8([]);var IW=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,o,s,a){var l=this.left.length;if(o<l&&this.left.forEachInner(r,o,Math.min(s,l),a)===!1||s>l&&this.right.forEachInner(r,Math.max(o-l,0),Math.min(this.length,s)-l,a+l)===!1)return!1},e.prototype.forEachInvertedInner=function(r,o,s,a){var l=this.left.length;if(o>l&&this.right.forEachInvertedInner(r,o-l,Math.max(s,l)-l,a+l)===!1||s<l&&this.left.forEachInvertedInner(r,Math.min(o,l),s,a)===!1)return!1},e.prototype.sliceInner=function(r,o){if(r==0&&o==this.length)return this;var s=this.left.length;return o<=s?this.left.slice(r,o):r>=s?this.right.slice(r-s,o-s):this.left.slice(r,s).append(this.right.slice(0,o-s))},e.prototype.leafAppend=function(r){var o=this.right.leafAppend(r);if(o)return new e(this.left,o)},e.prototype.leafPrepend=function(r){var o=this.left.leafPrepend(r);if(o)return new e(o,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}(yn);const RW=500;class lo{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 o,s;n&&(o=this.remapping(r,this.items.length),s=o.maps.length);let a=e.tr,l,u,c=[],f=[];return this.items.forEach((p,m)=>{if(!p.step){o||(o=this.remapping(r,m+1),s=o.maps.length),s--,f.push(p);return}if(o){f.push(new Vo(p.map));let g=p.step.map(o.slice(s)),b;g&&a.maybeStep(g).doc&&(b=a.mapping.maps[a.mapping.maps.length-1],c.push(new Vo(b,void 0,void 0,c.length+f.length))),s--,b&&o.appendMap(b,s)}else a.maybeStep(p.step);if(p.selection)return l=o?p.selection.map(o.slice(s)):p.selection,u=new lo(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,o){let s=[],a=this.eventCount,l=this.items,u=!o&&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 Vo(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),o||(u=m)}let c=a-r.depth;return c>DW&&(l=LW(l,c),a-=c),new lo(l.append(s),a)}remapping(e,n){let r=new Jl;return this.items.forEach((o,s)=>{let a=o.mirrorOffset!=null&&s-o.mirrorOffset>=e?r.maps.length-o.mirrorOffset:void 0;r.appendMap(o.map,a)},e,n),r}addMaps(e){return this.eventCount==0?this:new lo(this.items.append(e.map(n=>new Vo(n))),this.eventCount)}rebased(e,n){if(!this.eventCount)return this;let r=[],o=Math.max(0,this.items.length-n),s=e.mapping,a=e.steps.length,l=this.eventCount;this.items.forEach(m=>{m.selection&&l--},o);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 y=e.steps[g].invert(e.docs[g]),w=m.selection&&m.selection.map(s.slice(u+1,g));w&&l++,r.push(new Vo(b,y,w))}else r.push(new Vo(b))},o);let c=[];for(let m=n;m<a;m++)c.push(new Vo(s.maps[m]));let f=this.items.slice(0,o).append(c).append(r),p=new lo(f,l);return p.emptyItemCount()>RW&&(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,o=[],s=0;return this.items.forEach((a,l)=>{if(l>=e)o.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 Vo(c.invert(),u,f),m,g=o.length-1;(m=o.length&&o[g].merge(p))?o[g]=m:o.push(p)}}else a.map&&r--},this.items.length,0),new lo(yn.from(o.reverse()),s)}}lo.empty=new lo(yn.empty,0);function LW(t,e){let n;return t.forEach((r,o)=>{if(r.selection&&e--==0)return n=o,!1}),t.slice(n)}class Vo{constructor(e,n,r,o){this.map=e,this.step=n,this.selection=r,this.mirrorOffset=o}merge(e){if(this.step&&e.step&&!e.selection){let n=e.step.merge(this.step);if(n)return new Vo(n.getMap().invert(),n,this.selection)}}}class rs{constructor(e,n,r,o,s){this.done=e,this.undone=n,this.prevRanges=r,this.prevTime=o,this.prevComposition=s}}const DW=20;function PW(t,e,n,r){let o=n.getMeta(ta),s;if(o)return o.historyState;n.getMeta($W)&&(t=new rs(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 rs(t.done.addTransform(n,void 0,r,up(e)),t.undone,k8(n.mapping.maps),t.prevTime,t.prevComposition):new rs(t.done,t.undone.addTransform(n,void 0,r,up(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||!VW(n,t.prevRanges)),c=a?Bg(t.prevRanges,n.mapping):k8(n.mapping.maps);return new rs(t.done.addTransform(n,u?e.selection.getBookmark():void 0,r,up(e)),lo.empty,c,n.time,l??t.prevComposition)}else return(s=n.getMeta("rebased"))?new rs(t.done.rebased(n,s),t.undone.rebased(n,s),Bg(t.prevRanges,n.mapping),t.prevTime,t.prevComposition):new rs(t.done.addMaps(n.mapping.maps),t.undone.addMaps(n.mapping.maps),Bg(t.prevRanges,n.mapping),t.prevTime,t.prevComposition)}function VW(t,e){if(!e)return!1;if(!t.docChanged)return!0;let n=!1;return t.mapping.maps[0].forEach((r,o)=>{for(let s=0;s<e.length;s+=2)r<=e[s+1]&&o>=e[s]&&(n=!0)}),n}function k8(t){let e=[];for(let n=t.length-1;n>=0&&e.length==0;n--)t[n].forEach((r,o,s,a)=>e.push(s,a));return e}function Bg(t,e){if(!t)return null;let n=[];for(let r=0;r<t.length;r+=2){let o=e.map(t[r],1),s=e.map(t[r+1],-1);o<=s&&n.push(o,s)}return n}function FW(t,e,n){let r=up(e),o=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(),o,r),u=new rs(n?l:s.remaining,n?s.remaining:l,null,0,-1);return s.transform.setSelection(a).setMeta(ta,{redo:n,historyState:u})}let Ig=!1,S8=null;function up(t){let e=t.plugins;if(S8!=e){Ig=!1,S8=e;for(let n=0;n<e.length;n++)if(e[n].spec.historyPreserveItems){Ig=!0;break}}return Ig}const ta=new kt("history"),$W=new kt("closeHistory");function zW(t={}){return t={depth:t.depth||100,newGroupDelay:t.newGroupDelay||500},new tt({key:ta,state:{init(){return new rs(lo.empty,lo.empty,null,0,-1)},apply(e,n,r){return PW(n,r,e,t)}},config:t,props:{handleDOMEvents:{beforeinput(e,n){let r=n.inputType,o=r=="historyUndo"?T8:r=="historyRedo"?A8:null;return o?(n.preventDefault(),o(e.state,e.dispatch)):!1}}}})}function _8(t,e){return(n,r)=>{let o=ta.getState(n);if(!o||(t?o.undone:o.done).eventCount==0)return!1;if(r){let s=FW(o,n,t);s&&r(e?s.scrollIntoView():s)}return!0}}const T8=_8(!1,!0),A8=_8(!0,!0),HW=Qe.create({name:"history",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:t,dispatch:e})=>T8(t,e),redo:()=>({state:t,dispatch:e})=>A8(t,e)}},addProseMirrorPlugins(){return[zW(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()}}}),O8={HISTORY_TRANSACTION:"history$",ADD_TO_HISTORY_TRANSACTION:"addToHistory"},Rg=HW.extend({addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),depth:10,button:({editor:e,t:n})=>["undo","redo"].map(o=>({component:je,componentProps:{action:()=>{o==="undo"&&e.commands.undo(),o==="redo"&&e.commands.redo()},shortcutKeys:o==="undo"?["mod","Z"]:["shift","mod","Z"],disabled:!e.can()[o](),icon:o==="undo"?"Undo2":"Redo2",tooltip:n(`editor.${o}.tooltip`)}}))}}}),{isFullscreen:Lg,toggleFullscreen:Dg}=vn(),UW=Qe.create({name:"fullscreen",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),button:({editor:e,extension:n,t:r})=>({component:je,componentProps:{tooltip:Lg.value?r("editor.fullscreen.tooltip.exit"):r("editor.fullscreen.tooltip.fullscreen"),action:()=>Dg(),icon:Lg.value?"Minimize":"Maximize",isActive:()=>Lg.value}})}},addKeyboardShortcuts(){return{F11:()=>(Dg(),!0),"Mod-F11":()=>(Dg(),!0)}}}),WW=Qe.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 tt({key:new kt("characterCount"),appendTransaction:(e,n,r)=>{if(t)return;const o=this.options.limit;if(o==null||o===0){t=!0;return}const s=this.storage.characters({node:r.doc});if(s>o){const a=s-o,l=0,u=a;console.warn(`[CharacterCount] Initial content exceeded limit of ${o} 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 o=this.storage.characters({node:n.doc}),s=this.storage.characters({node:e.doc});if(s<=r||o>r&&s>r&&s<=o)return!0;if(o>r&&s>r&&s>o||!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 jW(t={}){return new tt({view(e){return new qW(e,t)}})}class qW{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(o=>{let s=a=>{this[o](a)};return e.dom.addEventListener(o,s),{name:o,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 o=this.editorView.dom.offsetParent;this.element||(this.element=o.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(!o||o==document.body&&getComputedStyle(o).position=="static")s=-pageXOffset,a=-pageYOffset;else{let l=o.getBoundingClientRect();s=l.left-o.scrollLeft,a=l.top-o.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),o=r&&r.type.spec.disableDropCursor,s=typeof o=="function"?o(this.editorView,n,e):o;if(n&&!s){let a=n.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let l=ty(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 KW=Qe.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[jW(this.options)]}}),GW=Qe.create({name:"focus",addOptions(){return{className:"has-focus",mode:"all"}},addProseMirrorPlugins(){return[new tt({key:new kt("focus"),props:{decorations:({doc:t,selection:e})=>{const{isEditable:n,isFocused:r}=this.editor,{anchor:o}=e,s=[];if(!n||!r)return mt.create(t,[]);let a=0;this.options.mode==="deepest"&&t.descendants((u,c)=>{if(u.isText)return;if(!(o>=c&&o<=c+u.nodeSize-1))return!1;a+=1});let l=0;return t.descendants((u,c)=>{if(u.isText||!(o>=c&&o<=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(Wt.node(c,c+u.nodeSize,{class:this.options.className}))}),mt.create(t,s)}}})]}});class nn extends Ve{constructor(e){super(e,e)}map(e,n){let r=e.resolve(n.map(this.head));return nn.valid(r)?new nn(r):Ve.near(r)}content(){return Ce.empty}eq(e){return e instanceof nn&&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 nn(e.resolve(n.pos))}getBookmark(){return new Pg(this.anchor)}static valid(e){let n=e.parent;if(n.isTextblock||!XW(e)||!YW(e))return!1;let r=n.type.spec.allowGapCursor;if(r!=null)return r;let o=n.contentMatchAt(e.index()).defaultType;return o&&o.isTextblock}static findGapCursorFrom(e,n,r=!1){e:for(;;){if(!r&&nn.valid(e))return e;let o=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;o+=n;let u=e.doc.resolve(o);if(nn.valid(u))return u}for(;;){let a=n>0?s.firstChild:s.lastChild;if(!a){if(s.isAtom&&!s.isText&&!De.isSelectable(s)){e=e.doc.resolve(o+s.nodeSize*n),r=!1;continue e}break}s=a,o+=n;let l=e.doc.resolve(o);if(nn.valid(l))return l}return null}}}nn.prototype.visible=!1,nn.findFrom=nn.findGapCursorFrom,Ve.jsonID("gapcursor",nn);class Pg{constructor(e){this.pos=e}map(e){return new Pg(e.map(this.pos))}resolve(e){let n=e.resolve(this.pos);return nn.valid(n)?new nn(n):Ve.near(n)}}function XW(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 o=r.child(n-1);;o=o.lastChild){if(o.childCount==0&&!o.inlineContent||o.isAtom||o.type.spec.isolating)return!0;if(o.inlineContent)return!1}}return!0}function YW(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 o=r.child(n);;o=o.firstChild){if(o.childCount==0&&!o.inlineContent||o.isAtom||o.type.spec.isolating)return!0;if(o.inlineContent)return!1}}return!0}function JW(){return new tt({props:{decorations:ej,createSelectionBetween(t,e,n){return e.pos==n.pos&&nn.valid(n)?new nn(n):null},handleClick:QW,handleKeyDown:ZW,handleDOMEvents:{beforeinput:NW}}})}const ZW=Lm({ArrowLeft:cp("horiz",-1),ArrowRight:cp("horiz",1),ArrowUp:cp("vert",-1),ArrowDown:cp("vert",1)});function cp(t,e){const n=t=="vert"?e>0?"down":"up":e>0?"right":"left";return function(r,o,s){let a=r.selection,l=e>0?a.$to:a.$from,u=a.empty;if(a instanceof Be){if(!s.endOfTextblock(n)||l.depth==0)return!1;u=!1,l=r.doc.resolve(e>0?l.after():l.before())}let c=nn.findGapCursorFrom(l,e,u);return c?(o&&o(r.tr.setSelection(new nn(c))),!0):!1}}function QW(t,e,n){if(!t||!t.editable)return!1;let r=t.state.doc.resolve(e);if(!nn.valid(r))return!1;let o=t.posAtCoords({left:n.clientX,top:n.clientY});return o&&o.inside>-1&&De.isSelectable(t.state.doc.nodeAt(o.inside))?!1:(t.dispatch(t.state.tr.setSelection(new nn(r))),!0)}function NW(t,e){if(e.inputType!="insertCompositionText"||!(t.state.selection instanceof nn))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 o=ce.empty;for(let a=r.length-1;a>=0;a--)o=ce.from(r[a].createAndFill(null,o));let s=t.state.tr.replace(n.pos,n.pos,new Ce(o,0,0));return s.setSelection(Be.near(s.doc.resolve(n.pos+1))),t.dispatch(s),!1}function ej(t){if(!(t.selection instanceof nn))return null;let e=document.createElement("div");return e.className="ProseMirror-gapcursor",mt.create(t.doc,[Wt.widget(t.selection.head,e,{key:"gapcursor"})])}const tj=Qe.create({name:"gapCursor",addProseMirrorPlugins(){return[JW()]},extendNodeSchema(t){var e;const n={name:t.name,options:t.options,storage:t.storage};return{allowGapCursor:(e=at(Re(t,"allowGapCursor",n)))!==null&&e!==void 0?e:null}}}),nj=Bt.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",bt(this.options.HTMLAttributes,t)]},renderText(){return`
|
|
274
274
|
`},addCommands(){return{setHardBreak:()=>({commands:t,chain:e,state:n,editor:r})=>t.first([()=>t.exitCode(),()=>t.command(()=>{const{selection:o,storedMarks:s}=n;if(o.$from.parent.type.spec.isolating)return!1;const{keepMarks:a}=this.options,{splittableMarks:l}=r.extensionManager,u=s||o.$to.parentOffset&&o.$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()}}}),rj=Bt.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:t}){return["li",bt(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)}}}),M8=Bt.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:t}){return["p",bt(this.options.HTMLAttributes,t),0]},addCommands(){return{setParagraph:()=>({commands:t})=>t.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),oj=Qe.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){return[new tt({key:new kt("placeholder"),props:{decorations:({doc:t,selection:e})=>{const n=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:r}=e,o=[];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&&yd(a);if((u||!this.options.showOnlyCurrent)&&c){const f=[this.options.emptyNodeClass];s&&f.push(this.options.emptyEditorClass);const p=Wt.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});o.push(p)}return this.options.includeChildren}),mt.create(t,o)}}})]}}),B8=Bt.create({name:"text",group:"inline"}),I8=Bt.create({name:"doc",topNode:!0,content:"block+"}),R8=I8.extend({content(){var e;return!!((e=this.editor)!=null&&e.options.extensions.find(n=>n.name==="columns"))?"(block|columns)+":"block+"}}),ij=Qe.create({name:"selection",addProseMirrorPlugins(){const{editor:t}=this;return[new tt({key:new kt("selection"),props:{decorations(e){return e.selection.empty?null:mt.create(e.doc,[Wt.inline(e.selection.from,e.selection.to,{class:"selection"})])}}})]}}),sj=t=>{const e=["size-small","size-medium","size-large"],n=["SizeS","SizeM","SizeL"];return e.map((r,o)=>({type:`video-${r}`,component:je,componentProps:{tooltip:`editor.${r.replace("-",".")}.tooltip`,icon:n[o],action:()=>t.commands.updateVideo({width:Bd[r]}),isActive:()=>t.isActive("video",{width:Bd[r]})}}))},aj=t=>[...sj(t),{type:"remove",component:je,componentProps:{tooltip:"editor.remove",icon:"Trash2",action:()=>{const{state:e,dispatch:n}=t.view;cu(e,n)}}}],lj=(t,e,{editor:n,extension:r,t:o})=>{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 y=c[c.length-1];if((y==null?void 0:y.type)==="divider")continue;c.push({type:"divider",component:void 0,componentProps:{}});continue}const g=e.find(y=>y.type===m);if(g){c.push({...g,componentProps:{...g.componentProps,tooltip:g.componentProps.tooltip?o(g.componentProps.tooltip):void 0},componentSlots:g.componentSlots});continue}const b=s.find(y=>y.name===m);if(b){const{button:y}=b.options,w=y({editor:n,extension:b,t:o});c.push({type:m,component:w.component,componentProps:w.componentProps,componentSlots:w.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},uj=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))),cj=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(t=>t.charCodeAt(0)));var Vg;const dj=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]]),fj=(Vg=String.fromCodePoint)!==null&&Vg!==void 0?Vg: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 pj(t){var e;return t>=55296&&t<=57343||t>1114111?65533:(e=dj.get(t))!==null&&e!==void 0?e:t}var wn;(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"})(wn||(wn={}));const hj=32;var is;(function(t){t[t.VALUE_LENGTH=49152]="VALUE_LENGTH",t[t.BRANCH_LENGTH=16256]="BRANCH_LENGTH",t[t.JUMP_TABLE=127]="JUMP_TABLE"})(is||(is={}));function Fg(t){return t>=wn.ZERO&&t<=wn.NINE}function mj(t){return t>=wn.UPPER_A&&t<=wn.UPPER_F||t>=wn.LOWER_A&&t<=wn.LOWER_F}function gj(t){return t>=wn.UPPER_A&&t<=wn.UPPER_Z||t>=wn.LOWER_A&&t<=wn.LOWER_Z||Fg(t)}function bj(t){return t===wn.EQUALS||gj(t)}var xn;(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"})(xn||(xn={}));var ss;(function(t){t[t.Legacy=0]="Legacy",t[t.Strict=1]="Strict",t[t.Attribute=2]="Attribute"})(ss||(ss={}));class vj{constructor(e,n,r){this.decodeTree=e,this.emitCodePoint=n,this.errors=r,this.state=xn.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=ss.Strict}startEntity(e){this.decodeMode=e,this.state=xn.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,n){switch(this.state){case xn.EntityStart:return e.charCodeAt(n)===wn.NUM?(this.state=xn.NumericStart,this.consumed+=1,this.stateNumericStart(e,n+1)):(this.state=xn.NamedEntity,this.stateNamedEntity(e,n));case xn.NumericStart:return this.stateNumericStart(e,n);case xn.NumericDecimal:return this.stateNumericDecimal(e,n);case xn.NumericHex:return this.stateNumericHex(e,n);case xn.NamedEntity:return this.stateNamedEntity(e,n)}}stateNumericStart(e,n){return n>=e.length?-1:(e.charCodeAt(n)|hj)===wn.LOWER_X?(this.state=xn.NumericHex,this.consumed+=1,this.stateNumericHex(e,n+1)):(this.state=xn.NumericDecimal,this.stateNumericDecimal(e,n))}addToNumericResult(e,n,r,o){if(n!==r){const s=r-n;this.result=this.result*Math.pow(o,s)+Number.parseInt(e.substr(n,s),o),this.consumed+=s}}stateNumericHex(e,n){const r=n;for(;n<e.length;){const o=e.charCodeAt(n);if(Fg(o)||mj(o))n+=1;else return this.addToNumericResult(e,r,n,16),this.emitNumericEntity(o,3)}return this.addToNumericResult(e,r,n,16),-1}stateNumericDecimal(e,n){const r=n;for(;n<e.length;){const o=e.charCodeAt(n);if(Fg(o))n+=1;else return this.addToNumericResult(e,r,n,10),this.emitNumericEntity(o,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===wn.SEMI)this.consumed+=1;else if(this.decodeMode===ss.Strict)return 0;return this.emitCodePoint(pj(this.result),this.consumed),this.errors&&(e!==wn.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,n){const{decodeTree:r}=this;let o=r[this.treeIndex],s=(o&is.VALUE_LENGTH)>>14;for(;n<e.length;n++,this.excess++){const a=e.charCodeAt(n);if(this.treeIndex=yj(r,o,this.treeIndex+Math.max(1,s),a),this.treeIndex<0)return this.result===0||this.decodeMode===ss.Attribute&&(s===0||bj(a))?0:this.emitNotTerminatedNamedEntity();if(o=r[this.treeIndex],s=(o&is.VALUE_LENGTH)>>14,s!==0){if(a===wn.SEMI)return this.emitNamedEntityData(this.treeIndex,s,this.consumed+this.excess);this.decodeMode!==ss.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;const{result:n,decodeTree:r}=this,o=(r[n]&is.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,o,this.consumed),(e=this.errors)===null||e===void 0||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,n,r){const{decodeTree:o}=this;return this.emitCodePoint(n===1?o[e]&~is.VALUE_LENGTH:o[e+1],r),n===3&&this.emitCodePoint(o[e+2],r),r}end(){var e;switch(this.state){case xn.NamedEntity:return this.result!==0&&(this.decodeMode!==ss.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case xn.NumericDecimal:return this.emitNumericEntity(0,2);case xn.NumericHex:return this.emitNumericEntity(0,3);case xn.NumericStart:return(e=this.errors)===null||e===void 0||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case xn.EntityStart:return 0}}}function L8(t){let e="";const n=new vj(t,r=>e+=fj(r));return function(o,s){let a=0,l=0;for(;(l=o.indexOf("&",l))>=0;){e+=o.slice(a,l),n.startEntity(s);const c=n.write(o,l+1);if(c<0){a=l+n.end();break}a=l+c,l=c===0?a+1:a}const u=e+o.slice(a);return e="",u}}function yj(t,e,n,r){const o=(e&is.BRANCH_LENGTH)>>7,s=e&is.JUMP_TABLE;if(o===0)return s!==0&&r===s?n:-1;if(s){const u=r-s;return u<0||u>=o?-1:t[n+u]-1}let a=n,l=a+o-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+o]}return-1}const wj=L8(uj);L8(cj);function xj(t,e=ss.Legacy){return wj(t,e)}var Qt;(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"})(Qt||(Qt={}));var zr;(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"})(zr||(zr={}));const D8=/^[^\\#]?(?:\\(?:[\da-f]{1,6}\s?|.)|[\w\-\u00b0-\uFFFF])+/,Cj=/\\([\da-f]{1,6}\s?|(\s)|.)/gi,Ej=new Map([[126,zr.Element],[94,zr.Start],[36,zr.End],[42,zr.Any],[33,zr.Not],[124,zr.Hyphen]]),kj=new Set(["has","not","matches","is","where","host","host-context"]);function Sj(t){switch(t.type){case Qt.Adjacent:case Qt.Child:case Qt.Descendant:case Qt.Parent:case Qt.Sibling:case Qt.ColumnCombinator:return!0;default:return!1}}const _j=new Set(["contains","icontains"]);function Tj(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 sc(t){return t.replace(Cj,Tj)}function $g(t){return t===39||t===34}function P8(t){return t===32||t===9||t===10||t===12||t===13}function Aj(t){const e=[],n=V8(e,`${t}`,0);if(n<t.length)throw new Error(`Unmatched selector: ${t.slice(n)}`);return e}function V8(t,e,n){let r=[];function o(m){const g=e.slice(n+m).match(D8);if(!g)throw new Error(`Expected name, found ${e.slice(n)}`);const[b]=g;return n+=m+b.length,sc(b)}function s(m){for(n+=m;n<e.length&&P8(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 sc(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&&Sj(r[r.length-1]))throw new Error("Did not expect successive traversals.")}function c(m){if(r.length>0&&r[r.length-1].type===Qt.Descendant){r[r.length-1].type=m;return}u(),r.push({type:m})}function f(m,g){r.push({type:Qt.Attribute,name:m,action:g,value:o(1),namespace:null,ignoreCase:"quirks"})}function p(){if(r.length&&r[r.length-1].type===Qt.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!==Qt.Descendant)&&(u(),r.push({type:Qt.Descendant})),s(1);break}case 62:{c(Qt.Child),s(1);break}case 60:{c(Qt.Parent),s(1);break}case 126:{c(Qt.Sibling),s(1);break}case 43:{c(Qt.Adjacent),s(1);break}case 46:{f("class",zr.Element);break}case 35:{f("id",zr.Equals);break}case 91:{s(1);let g,b=null;e.charCodeAt(n)===124?g=o(1):e.startsWith("*|",n)?(b="*",g=o(2)):(g=o(0),e.charCodeAt(n)===124&&e.charCodeAt(n+1)!==61&&(b=g,g=o(1))),s(0);let y=zr.Exists;const w=Ej.get(e.charCodeAt(n));if(w){if(y=w,e.charCodeAt(n+1)!==61)throw new Error("Expected `=`");s(2)}else e.charCodeAt(n)===61&&(y=zr.Equals,s(1));let x="",S=null;if(y!=="exists"){if($g(e.charCodeAt(n))){const T=e.charCodeAt(n);let _=n+1;for(;_<e.length&&(e.charCodeAt(_)!==T||l(_));)_+=1;if(e.charCodeAt(_)!==T)throw new Error("Attribute value didn't end");x=sc(e.slice(n+1,_)),n=_+1}else{const T=n;for(;n<e.length&&(!P8(e.charCodeAt(n))&&e.charCodeAt(n)!==93||l(n));)n+=1;x=sc(e.slice(T,n))}s(0);const C=e.charCodeAt(n)|32;C===115?(S=!1,s(1)):C===105&&(S=!0,s(1))}if(e.charCodeAt(n)!==93)throw new Error("Attribute selector didn't terminate");n+=1;const E={type:Qt.Attribute,name:g,action:y,value:x,namespace:b,ignoreCase:S};r.push(E);break}case 58:{if(e.charCodeAt(n+1)===58){r.push({type:Qt.PseudoElement,name:o(2).toLowerCase(),data:e.charCodeAt(n)===40?a():null});continue}const g=o(1).toLowerCase();let b=null;if(e.charCodeAt(n)===40)if(kj.has(g)){if($g(e.charCodeAt(n+1)))throw new Error(`Pseudo-selector ${g} cannot be quoted`);if(b=[],n=V8(b,e,n+1),e.charCodeAt(n)!==41)throw new Error(`Missing closing parenthesis in :${g} (${e})`);n+=1}else{if(b=a(),_j.has(g)){const y=b.charCodeAt(0);y===b.charCodeAt(b.length-1)&&$g(y)&&(b=b.slice(1,-1))}b=sc(b)}r.push({type:Qt.Pseudo,name:g,data:b});break}case 44:{p(),r=[],s(1);break}default:{if(e.startsWith("/*",n)){const y=e.indexOf("*/",n+2);if(y<0)throw new Error("Comment was not terminated");n=y+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(Qt.ColumnCombinator),s(2);break}}else if(D8.test(e.slice(n)))b=o(0);else break e;e.charCodeAt(n)===124&&e.charCodeAt(n+1)!==124&&(g=b,e.charCodeAt(n+1)===42?(b="*",n+=2):b=o(1)),r.push(b==="*"?{type:Qt.Universal,namespace:g}:{type:Qt.Tag,name:b,namespace:g})}}}return p(),n}function zg(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/'/g,"'").replace(/"/g,""").replace(/\xA0/g," ").replace(/\xAD/g,"­")}var F8=t=>xj(t);function Oj(t,e,n,r){if(typeof e=="function")return e({props:{...n,children:r},attrs:n,children:r,h:t.h,context:t});{let o=!0,s;if(e?e.toLowerCase()==="fragment"?(s=t.document.createDocumentFragment(),o=!1):s=t.document.createElement(e):s=t.document.createElement("div"),n&&o){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 $8(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 Mj(t){return t.h=function(n,r,...o){const{tag:s,attrs:a,children:l}=$8(n,r,o);return Oj(t,s,a,l)},t.h}var z8={};function Bj(t){let e=z8[t];return e==null&&(e=Aj(t),z8[t]=e),e}function Ij(t,e,{debug:n=!1}={}){for(const r of Bj(t)){const o=(s,a)=>{var u,c,f,p;let l=!1;for(const m of a){const{type:g,name:b,action:y,value:w,_ignoreCase:x=!0,data:S}=m;if(g==="attribute")y==="equals"?l=s.getAttribute(b)===w:y==="start"?l=!!((u=s.getAttribute(b))!=null&&u.startsWith(w)):y==="end"?l=!!((c=s.getAttribute(b))!=null&&c.endsWith(w)):y==="element"?b==="class"?l=s.classList.contains(w):l=!!((f=s.getAttribute(b))!=null&&f.includes(w)):y==="exists"?l=s.hasAttribute(b):y==="any"?l=!!((p=s.getAttribute(b))!=null&&p.includes(w)):console.warn("Unknown CSS selector action",y);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;S.forEach(C=>{o(s,C)||(E=!1)}),l=!E}}else console.warn("Unknown CSS selector type",g,t,a);if(!l)break}return l};if(o(e,r))return!0}return!1}var Rj=Symbol.for("nodejs.util.inspect.custom"),H8={fontWeight:"bold"},U8={fontStyle:"italic"},W8={backgroundColor:"rgb(255, 250, 165)"},j8={textDecorations:"underline"},Hg={textDecorations:"line-through"},Lj={b:H8,strong:H8,em:U8,i:U8,mark:W8,u:j8,a:j8,s:Hg,del:Hg,ins:W8,strike:Hg};function q8(t){return t.toLowerCase().replace(/[^a-z0-9]+(.)/gi,(e,n)=>n.toUpperCase())}var di=class zh{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 Wg&&console.warn("No defined how to append a document to a node!",e),e instanceof Ug)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 zh)e.remove(),this._childNodes.push(e);else try{const n=typeof e=="string"?e:JSON.stringify(e,null,2);this._childNodes.push(new wl(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 wl(n):n.remove()),this._fixChildNodesParent()}replaceWith(...e){const n=this._parentNode;if(n){const r=this._indexInParent();r>=0&&(e=e.map(o=>typeof o=="string"?new wl(o):o.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 uo&&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 wl(e.toString()))}contains(e){return e===this?!0:this._childNodes.some(n=>n.contains(e))}get ownerDocument(){var e;return this.nodeType===zh.DOCUMENT_NODE||this.nodeType===zh.DOCUMENT_FRAGMENT_NODE?this:(e=this==null?void 0:this._parentNode)==null?void 0:e.ownerDocument}toString(){return`${this.nodeName}`}[Rj](){return`${this.constructor.name} "${this.render()}"`}};di.ELEMENT_NODE=1,di.TEXT_NODE=3,di.CDATA_SECTION_NODE=4,di.PROCESSING_INSTRUCTION_NODE=7,di.COMMENT_NODE=8,di.DOCUMENT_NODE=9,di.DOCUMENT_TYPE_NODE=10,di.DOCUMENT_FRAGMENT_NODE=11;var as=di,wl=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:zg(this._text)}cloneNode(t=!1){const e=super.cloneNode(t);return e._text=this._text,e}},K8=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 Ij(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++)}},uo=class extends K8{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 o=/\s*([\w-]+)\s*:\s*((url\(.*?\)[^;]*|[^;]+))/gi;for(;r=o.exec(n);){++e;const s=r[1],a=r[2].trim();t[s]=a,t[q8(s)]=a}}this._styles={get length(){return e},getPropertyValue(r){return t[r]},...Lj[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[q8(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(dp)).join("")}set innerHTML(t){this.setInnerHTML(t)}get outerHTML(){return this.render(fp)}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=fp){return t(this._originalTagName||this.tagName,this._attributes,this._childNodes.map(e=>e.render(t)).join(""))}},G8=class w_ extends as{get nodeName(){return super.nodeName}get nodeValue(){return super.nodeValue}get nodeType(){return w_.DOCUMENT_TYPE_NODE}render(){return"<!DOCTYPE html>"}},Ug=class x_ extends K8{get nodeType(){return as.DOCUMENT_FRAGMENT_NODE}get nodeName(){return"#document-fragment"}render(e=fp){return this._childNodes.map(n=>n.render(e)||[]).join("")}get innerHTML(){return this._childNodes.map(e=>e.render(dp)).join("")}createElement(e,n={}){return new uo(e,n)}createDocumentFragment(){return new x_}createTextNode(e){return new wl(e)}},Wg=class extends Ug{get nodeType(){return as.DOCUMENT_NODE}get nodeName(){return"#document"}get documentElement(){return this.firstChild}render(t=fp){let e=super.render(t);return this.docType&&(e=this.docType.render()+e),e}},X8=class extends Wg{constructor(t=!1){if(super(),this.docType=new G8,!t){const e=new uo("html"),n=new uo("body"),r=new uo("head"),o=new uo("title");e.appendChild(r),r.appendChild(o),e.appendChild(n),this.appendChild(e)}}get body(){let t=this.querySelector("body");if(!t){let e=this.querySelector("html");e||(e=new uo("html"),this.appendChild(e)),t=new uo("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 uo("html"),this.appendChild(e)),t=new uo("head"),e.insertBefore(e)}return t}};function Dj(){return new Wg}function Pj(){return new X8}var Y8=Dj();Mj({document:Y8});var Vj={},Fj=Vj.hasOwnProperty;function J8(t,e){return Fj.call(t,e)}var Z8=["area","base","br","col","embed","hr","img","input","keygen","link","meta","param","source","track","wbr","command"];function Q8(t,e,n={},r){const o=!(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&&J8(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}="${zg(l.toString())}"`)}if(e!=="cdata"){if(t&&!o)return s.push(" />"),s.join("");s.push(">")}if(!t&&Z8.includes(e))return s.join("")}if(o){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(zg(l.toString()))}}}return n.html&&s.push(n.html),e!=="noop"&&e!==""&&(e!=="cdata"?s.push(`</${e}>`):s.push("]]>")),s.join("")}function dp(t,e,...n){const{tag:r,attrs:o,children:s}=$8(t,e,n);return Q8(!1,r,o,s)}var fp=Q8.bind(null,!1);dp.firstLine="<!DOCTYPE html>",dp.html=!0;var $j=/([^=\s]+)(\s*=\s*(("([^"]*)")|('([^']*)')|[^>\s]+))?/g,zj=/^<\/([^>\s]+)[^>]*>/m,Hj=/^<([^>\s/]+)((\s+[^=>\s]+(\s*=\s*(("[^"]*")|('[^']*')|[^>\s]+))?)*)\s*(?:\/\s*)?>/m,Uj=/\s*\/\s*>\s*$/m,Wj=class{constructor(t={}){this.attrRe=$j,this.endTagRe=zj,this.startTagRe=Hj,this.defaults={ignoreWhitespaceText:!1},t.scanner&&(this.scanner=t.scanner),this.options=Object.assign({},this.defaults,t)}parse(t){let e=!1,n,r,o;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?(o=t,t=""):(o=t.substring(0,s),t=t.substring(s)),(!this.options.ignoreWhitespaceText||!/^\s*$/.test(o))&&this.scanner.characters(o)}e=!0,r=null}}parseStartTag(t,e,n){const r=Uj.test(t);let o=n[2];r&&(o=o.replace(/\s*\/\s*$/,""));const s=this.parseAttributes(e,o);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[o,s,a,l,u,c,f,p]=r;n[s]=p??c??l??!0}),n}};function jj(t){if(typeof t!="string")throw console.error("parseHTML requires string, found",t),new Error("parseHTML requires string");const e=t.indexOf("<!")===0?new X8(!0):new Ug,n=[e];return new Wj({scanner:{startElement(o,s,a){if(o.toLowerCase()==="!doctype"){e.docType=new G8;return}for(const c in s)if(J8(s,c)){const f=s[c];typeof f=="string"&&(s[c]=F8(f))}const u=n[n.length-1];if(u){const c=Y8.createElement(o,s);u.appendChild(c),Z8.includes(o.toLowerCase())||a||n.push(c)}},endElement(o){n.pop()},characters(o){var a;o=F8(o);const s=n[n.length-1];((a=s==null?void 0:s.lastChild)==null?void 0:a.nodeType)===as.TEXT_NODE?s.lastChild._text+=o:s&&s.appendChild(new wl(o))},comment(o){}}}).parse(t),e}uo.prototype.setInnerHTML=function(t){const e=jj(t);this._childNodes=e._childNodes,this._fixChildNodesParent()};function qj(t,e,n){return vo.fromSchema(e).serializeFragment(t.content,{document:Pj()}).render()}function Kj(t,e){const n=Jr.fromJSON(e,t);return qj(n,e)}function Gj(t,e){const n=document.getElementById(t.attrs.id)??jg.getElementById(t.attrs.id);if(!n)return null;const r=N8(n),{lastChild:o}=t,{childCount:s}=t,a=t.content.content.slice(0,s);if(!o)return!1;o.isText&&a.push(e.text("gg"));const l=Kj(Xj(t.type.create(t.attrs,a,t.marks)),e);return Jj(l,t.attrs.id,!1)>r}function Xj(t){return{type:"doc",content:[t.toJSON()]}}let Yj=null,jg=null;const qg=new Map;function Jj(t,e,n=!0){if(n&&qg.has(t))return qg.get(t);const r=jg.getElementById("computeddiv");if(r){r.innerHTML=`<p> </p>${t}`;const o=jg.getElementById(e),{height:s}=N8(o);return r.innerHTML=" ",n&&qg.set(t,s),s}return 0}function N8(t){const e=window.getComputedStyle(t)||Yj.contentWindow.getComputedStyle(t),n=e.getPropertyValue("margin-top"),r=e.getPropertyValue("margin-bottom"),o=parseFloat(n)+parseFloat(r),{height:s}=t.getBoundingClientRect();return{margin:o,height:o+t.offsetHeight+parseFloat(e.borderWidth)}}function Kg(){return Qi(10)}const pp="paragraph",Hr="page",eE="Extend",xl="Node",Zj=xl+eE,Qj="CC",Gg="heading",hp="bulletList",Xg="listItem",tE="taskList",Nj="taskItem",mp="orderedList",na="table",Yg="tableHeader",Jg="tableRow",eq="tableCell",Zg="column",Cl="columns",Qg="textBox",ra="image",oa="imageUpload",tq="iframe",nq="file",Ng="codeBlock",eb="blockquote",rq="audio",oq="toc",nE="video",iq="horizontalrule",tb="pagination",sq=[na,mp,hp,tE],aq=[nE,ra],gp="link",lq="placeholder",uq="focus",cq="text",dq="text-bubble",fq="gapCursor",pq="dropCursor",hq="characterCount",mq="hardBreak",gq="textStyle",bq="selection",rE="superText",nb="configPlan",vq="fontSize",yq="fontFamily",wq="bold",xq="italic",Cq="underline",Eq="strike",kq="color",Sq="highlight",_q="moreMark",Tq="textAlign",Aq="indent",Oq="lineHeight",Mq="painter",Bq="clear",bp="spellchecker",oE="fontSizeIncreaseDecrease",Iq=Object.freeze(Object.defineProperty({__proto__:null,AUDIO:rq,BLOCKQUOTE:eb,BOLD:wq,BULLETLIST:hp,CASSIE_BLOCK:xl,CASSIE_BLOCK_EXTEND:Zj,CC:Qj,CHARACTER_COUNT:hq,CLEAR:Bq,CODE_BLOCK:Ng,COLOR:kq,COLUMN:Zg,COLUMNS:Cl,CONFIG_PLAN:nb,DROP_CURSOR:pq,EXTEND:eE,FILE:nq,FOCUS:uq,FONTSIZEINCREASEDECREASE:oE,FONT_FAMILY:yq,FONT_SIZE:vq,GAP_CURSOR:fq,HARD_BREAK:mq,HEADING:Gg,HIGHLIGHT:Sq,HORIZONTALRULE:iq,IFRAME:tq,IMAGE:ra,IMAGE_UPLOAD:oa,INDENT:Aq,ITALIC:xq,LINE_HEIGHT:Oq,LINK:gp,LISTITEM:Xg,LIST_MEDIA:aq,LIST_TYPE:sq,MORE_MARK:_q,ORDEREDLIST:mp,PAGE:Hr,PAGEBREAK:tb,PAINTER:Mq,PARAGRAPH:pp,PLACEHOLDER:lq,SELECTION:bq,SPELLCHECKER:bp,STRIKE:Eq,SUPER_TEXT:rE,TABLE:na,TABLEHEADER:Yg,TABLE_CELL:eq,TABLE_ROW:Jg,TASKITEM:Nj,TASKLIST:tE,TEXT:cq,TEXT_ALIGN:Tq,TEXT_BOX:Qg,TEXT_BUBBLE:dq,TEXT_STYLE:gq,TOC:oq,UNDERLINE:Cq,VIDEO:nE},Symbol.toStringTag,{value:"Module"})),vp=i.defineComponent({__name:"ContextMenu",props:{dir:{},modal:{type:Boolean}},emits:["update:open"],setup(t,{emit:e}){const o=Dt(t,e);return(s,a)=>(i.openBlock(),i.createBlock(i.unref(OL),i.normalizeProps(i.guardReactiveProps(i.unref(o))),{default:i.withCtx(()=>[i.renderSlot(s.$slots,"default")]),_:3},16))}}),yp=i.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,o=i.computed(()=>{const{class:a,...l}=n;return l}),s=Dt(o,r);return(a,l)=>(i.openBlock(),i.createBlock(i.unref(BL),null,{default:i.withCtx(()=>[i.createVNode(i.unref(IL),i.mergeProps(i.unref(s),{class:i.unref(Ae)("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:i.withCtx(()=>[i.renderSlot(a.$slots,"default")]),_:3},16,["class"])]),_:3}))}}),wp=i.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,o=i.computed(()=>{const{class:a,...l}=n;return l}),s=Dt(o,r);return(a,l)=>(i.openBlock(),i.createBlock(i.unref(RL),i.mergeProps(i.unref(s),{class:i.unref(Ae)("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:i.withCtx(()=>[i.renderSlot(a.$slots,"default")]),_:3},16,["class"]))}}),xp=i.defineComponent({__name:"ContextMenuTrigger",props:{disabled:{type:Boolean},asChild:{type:Boolean},as:{}},setup(t){const n=Xn(t);return(r,o)=>(i.openBlock(),i.createBlock(i.unref(ML),i.normalizeProps(i.guardReactiveProps(i.unref(n))),{default:i.withCtx(()=>[i.renderSlot(r.$slots,"default")]),_:3},16))}}),Cp=i.defineComponent({__name:"Dialog",props:{open:{type:Boolean},defaultOpen:{type:Boolean},modal:{type:Boolean}},emits:["update:open"],setup(t,{emit:e}){const o=Dt(t,e);return(s,a)=>(i.openBlock(),i.createBlock(i.unref(yR),i.normalizeProps(i.guardReactiveProps(i.unref(o))),{default:i.withCtx(()=>[i.renderSlot(s.$slots,"default")]),_:3},16))}}),Ep=i.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,o=i.computed(()=>{const{isOverlayTransparent:a,class:l,...u}=n;return u}),s=Dt(o,r);return(a,l)=>(i.openBlock(),i.createBlock(i.unref(W0),null,{default:i.withCtx(()=>[i.createVNode(i.unref(Y0),{class:i.normalizeClass(i.unref(Ae)("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"]),i.createVNode(i.unref(UR),i.mergeProps(i.unref(s),{class:i.unref(Ae)("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:i.withCtx(()=>[i.renderSlot(a.$slots,"default")]),_:3},16,["class"])]),_:3}))}}),rb=i.defineComponent({__name:"DialogFooter",props:{class:{}},setup(t){const e=t;return(n,r)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(i.unref(Ae)("flex flex-col-reverse sm:flex-row sm:justify-end sm:gap-x-2",e.class))},[i.renderSlot(n.$slots,"default")],2))}}),kp=i.defineComponent({__name:"DialogHeader",props:{class:{}},setup(t){const e=t;return(n,r)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(i.unref(Ae)("flex flex-col gap-y-1.5 text-center sm:text-left",e.class))},[i.renderSlot(n.$slots,"default")],2))}}),Sp=i.defineComponent({__name:"DialogClose",props:{asChild:{type:Boolean},as:{}},setup(t){const e=t;return(n,r)=>(i.openBlock(),i.createBlock(i.unref(jR),i.normalizeProps(i.guardReactiveProps(e)),{default:i.withCtx(()=>[i.renderSlot(n.$slots,"default")]),_:3},16))}}),_p=i.defineComponent({__name:"DialogTitle",props:{asChild:{type:Boolean},as:{},class:{}},setup(t){const e=t,n=i.computed(()=>{const{class:o,...s}=e;return s}),r=Xn(n);return(o,s)=>(i.openBlock(),i.createBlock(i.unref(qR),i.mergeProps(i.unref(r),{class:i.unref(Ae)("text-lg font-semibold leading-none tracking-tight",e.class)}),{default:i.withCtx(()=>[i.renderSlot(o.$slots,"default")]),_:3},16,["class"]))}}),Rq={class:"m-2.5 p-2.5 space-y-2.5"},Lq=i.defineComponent({__name:"SuperInputDialogAlert",props:{open:{type:Boolean}},emits:["close"],setup(t,{emit:e}){const n=e,{t:r}=St(),o=vn(),s=t,a=i.computed(()=>r(o.textAlert.value||"editor.alert")),l=i.reactive({x:0,y:0}),u=i.ref(!1),c={x:0,y:0},f=()=>{n("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 i.watch(()=>s.open,async b=>{if(b){await i.nextTick();const y=document.querySelector(".draggable-dialog");if(y){const{width:w,height:x}=y.getBoundingClientRect(),S=window.innerWidth,E=window.innerHeight;l.x=(S-w)/2+250,l.y=(E-x)/2-50}}},{immediate:!0}),i.onUnmounted(()=>{document.removeEventListener("mousemove",m),document.removeEventListener("mouseup",g)}),(b,y)=>{const w=_p,x=Sp,S=kp,E=rb,C=Ep,T=Cp;return i.openBlock(),i.createBlock(T,{open:b.open},{default:i.withCtx(()=>[i.createVNode(i.unref(W0),null,{default:i.withCtx(()=>[i.createVNode(i.unref(Y0),{class:"!pointer-events-none bg-black/30"}),i.createVNode(C,{"is-overlay-transparent":"",class:"p-0 gap-0 !animate-none !transition-none","as-child":""},{default:i.withCtx(()=>[i.createElementVNode("div",{class:"draggable-dialog fixed z-[70] pointer-events-auto",style:i.normalizeStyle({transform:`translate(${i.unref(l).x}px, ${i.unref(l).y}px)`,top:"0px",left:"0px"})},[i.createVNode(S,{class:"bg-blue-500 text-white p-2.5 rounded-t-[5px] cursor-move",onMousedown:i.withModifiers(p,["prevent"])},{default:i.withCtx(()=>[i.createVNode(w,null,{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(r)("editor.alertConfirm")),1)]),_:1}),i.createVNode(x,{class:"absolute right-3 top-3 text-white",onClick:f},{default:i.withCtx(()=>[i.createVNode(i.unref(Mf),{class:"w-5 h-5"}),y[0]||(y[0]=i.createElementVNode("span",{class:"sr-only"},"Close",-1))]),_:1})]),_:1}),i.createElementVNode("div",Rq,i.toDisplayString(i.unref(a)),1),i.createVNode(E,{class:"sm:justify-center pb-3.5 pt-1"},{default:i.withCtx(()=>[i.createVNode(_n,{as:"button",variant:"default",class:"bg-blue-500 hover:bg-blue-500/90",onClick:f},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(r)("editor.alertYes")),1)]),_:1})]),_:1})],4)]),_:1})]),_:1})]),_:1},8,["open"])}}});function Dq(t,e){return i.openBlock(),i.createElementBlock("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[i.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z",fill:"currentColor"})])}const Pq=i.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,o=i.computed(()=>{const{class:a,...l}=n;return l}),s=Dt(o,r);return(a,l)=>(i.openBlock(),i.createBlock(i.unref(JR),i.mergeProps(i.unref(s),{class:i.unref(Ae)("peer h-4 w-4 shrink-0 rounded-sm border border-ed-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ed-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-ed-primary data-[state=checked]:text-ed-primary-foreground",n.class)}),{default:i.withCtx(()=>[i.createVNode(i.unref(ZR),{class:"flex h-full w-full items-center justify-center text-current"},{default:i.withCtx(()=>[i.renderSlot(a.$slots,"default",{},()=>[i.createVNode(i.unref(Dq),{class:"h-4 w-4"})])]),_:3})]),_:3},16,["class"]))}}),iE=i.defineComponent({__name:"SimpleEditor",props:{modelValue:{default:""},parentEditor:{},isReadOnly:{type:Boolean}},emits:["update:modelValue"],setup(t,{expose:e,emit:n}){const r=t,o=n,s=i.inject("isMobile",!1),a=[I8,M8,B8],l=i.ref(!0),u=i.computed(()=>{var g;return(g=r.parentEditor)==null?void 0:g.extensionManager.extensions.find(b=>b.name==="spellchecker")}),c=i.computed(()=>{var g,b,y,w,x,S,E;return YE.configure({proofreader:new I5({api:(b=(g=u.value)==null?void 0:g.options.proofreader)==null?void 0:b.api,limit:(w=(y=u.value)==null?void 0:y.options.proofreader)==null?void 0:w.limit,transfer:(S=(x=u.value)==null?void 0:x.options.proofreader)==null?void 0:S.transfer,enabled:l.value}),uiStrings:(E=u.value)==null?void 0:E.options.uiStrings})}),f=new No({enablePasteRules:!1,enableInputRules:!1,content:r.modelValue,extensions:a.concat(c.value),editable:!r.isReadOnly,autofocus:!0,onUpdate:({editor:g})=>{o("update:modelValue",g.getHTML())}});i.watch(()=>r.isReadOnly,g=>{f.setEditable(!g)});function p(g){const{view:b}=f,{from:y}=b.state.selection;f.commands.insertContentAt(y,g),f.commands.focus()}function m(){var g;f.commands.handleActiveSpellCheck(!1),l.value=!l.value,(g=f==null?void 0:f.commands)!=null&&g.setIsEnableSuggestion&&f.commands.setIsEnableSuggestion(!1)}return e({insertSpecialCharater:p,isChecked:l,toggleSpellCheck:m}),(g,b)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(i.unref(Ae)("h-40 overflow-y-auto",i.unref(s)&&"h-20 rounded-[5px]"))},[i.createVNode(i.unref(ko),{id:"editor-panel",editor:i.unref(f),class:i.normalizeClass(i.unref(Ae)(" vdc-editor break-all [&_.tiptap.ProseMirror-focused]:border-ed-input-focus [&_.tiptap]:min-h-40 [&_.tiptap]:border-[inherit] relative",i.unref(s)&&"[&_.tiptap]:border-ed-gray [&_.tiptap]:min-h-20",g.isReadOnly&&"[&_.tiptap]:border-none"))},null,8,["editor","class"])],2))}}),Vq={class:"m-2.5 p-2.5 space-y-2.5 rounded border border-gray-200"},Fq={class:"flex gap-x-2"},$q={class:"flex gap-x-7 flex-1"},zq={class:"flex items-center space-x-2 text-xs font-normal"},Hq={for:"spellcheck",class:"select-none whitespace-nowrap"},Uq={class:"flex gap-x-1"},Wq={class:"flex gap-x-2"},jq={class:"w-1/6 text-right text-sm p-2"},qq={class:"flex gap-x-2"},ac=i.defineComponent({__name:"SuperInputDialog",props:{editor:{},open:{type:Boolean},superTextInit:{},superTextElementId:{}},emits:["close","save"],setup(t,{emit:e}){var W,J;const n=e,r=t,{t:o}=St(),s=i.ref(""),a=i.ref(""),l=i.ref(null),u=i.ref(!1),c=i.reactive({x:0,y:0}),f=i.ref(!1),p={x:0,y:0},m=i.ref(!1),g=i.ref(!1),b=ue=>{f.value=!0,p.x=ue.clientX-c.x,p.y=ue.clientY-c.y,document.addEventListener("mousemove",y),document.addEventListener("mouseup",w)},y=ue=>{f.value&&(c.x=ue.clientX-p.x,c.y=ue.clientY-p.y)},w=()=>{f.value=!1,document.removeEventListener("mousemove",y),document.removeEventListener("mouseup",w)};i.watch(()=>r.open,async ue=>{if(ue){g.value=!1,r.superTextInit&&(s.value=r.superTextInit,r.superTextElementId&&(a.value=r.superTextElementId)),await i.nextTick();const X=document.querySelector(".draggable-dialog");if(X){const{width:H,height:F}=X.getBoundingClientRect(),R=window.innerWidth,G=window.innerHeight;c.x=(R-H)/2,c.y=(G-F)/2}}},{immediate:!0});const x=()=>{n("close"),s.value="",a.value="",u.value=!1},S=()=>{g.value?(m.value=!0,a.value=""):n("close"),n("save",s.value),s.value=""},E=()=>{m.value=!1,n("close")},C=(J=(W=r.editor)==null?void 0:W.extensionManager.extensions.find(ue=>ue.name==="superText"))==null?void 0:J.options.specialCharModal,T=et.useLocalStorage("recentSpecialChars",[]),_=ue=>{if(!ue)return;const X=(T.value??[]).filter(H=>H!==ue);X.unshift(ue),T.value=X.slice(0,5)},A=ue=>{var X;(X=l.value)==null||X.insertSpecialCharater(ue)},D=(ue,X)=>{var H;X&&((H=l.value)==null||H.insertSpecialCharater(ue),_(ue))},L=i.computed(()=>{var ue;return(ue=l.value)==null?void 0:ue.isChecked}),B=()=>{var ue;(ue=l.value)==null||ue.toggleSpellCheck()};return i.onUnmounted(()=>{document.removeEventListener("mousemove",y),document.removeEventListener("mouseup",w)}),i.watch(s,ue=>{!r.superTextElementId||r.superTextElementId===""||(g.value=ue!==(r.superTextInit??""))}),(ue,X)=>{const H=_p,F=Sp,R=kp,G=rb,N=Ep,oe=Cp,ne=Lq;return i.openBlock(),i.createElementBlock(i.Fragment,null,[i.createVNode(oe,{open:ue.open},{default:i.withCtx(()=>[i.createVNode(i.unref(W0),null,{default:i.withCtx(()=>[i.createVNode(i.unref(Y0),{class:"!pointer-events-none bg-black/30"}),i.createVNode(N,{"is-overlay-transparent":"",class:"p-0 gap-0 !animate-none !transition-none","as-child":""},{default:i.withCtx(()=>{var xe,Ee,ze;return[i.createElementVNode("div",{class:"draggable-dialog fixed z-[70] pointer-events-auto",style:i.normalizeStyle({transform:`translate(${c.x}px, ${c.y}px)`,top:"0px",left:"0px"})},[i.createVNode(R,{class:"bg-blue-500 text-white p-2.5 rounded-t-[5px] cursor-move",onMousedown:i.withModifiers(b,["prevent"])},{default:i.withCtx(()=>[i.createVNode(H,null,{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(o)("editor.superinput")),1)]),_:1}),i.createVNode(F,{class:"absolute right-3 top-3 text-white",onClick:x},{default:i.withCtx(()=>[i.createVNode(i.unref(Mf),{class:"w-5 h-5"}),X[4]||(X[4]=i.createElementVNode("span",{class:"sr-only"},"Close",-1))]),_:1})]),_:1}),i.createElementVNode("div",Vq,[i.createElementVNode("div",Fq,[X[5]||(X[5]=i.createElementVNode("label",{class:"w-1/6"}," ",-1)),i.createElementVNode("div",$q,[i.createVNode(_n,{class:"text-[#65558F] bg-[#ECE6F0] hover:bg-[#ECE6F0]/90 shadow text-xs rounded font-normal h-[25px] px-3",onClick:X[0]||(X[0]=ke=>u.value=!0)},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(o)("editor.insert.symbol")),1)]),_:1}),i.createElementVNode("div",zq,[i.createVNode(Pq,{id:"spellcheck",checked:i.unref(L),class:"border-gray-300","onUpdate:checked":B},null,8,["checked"]),i.createElementVNode("label",Hq,i.toDisplayString(i.unref(o)("editor.menubar.menu.spellCheck")),1)]),i.createElementVNode("div",Uq,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(T),ke=>(i.openBlock(),i.createBlock(_n,{key:ke,variant:"outline",size:"xs",class:"h-[25px] w-[25px] p-0",onClick:me=>A(ke)},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(ke),1)]),_:2},1032,["onClick"]))),128))])]),u.value?(i.openBlock(),i.createBlock(i.resolveDynamicComponent((xe=i.unref(C))==null?void 0:xe.component),{key:0,"custom-class":"!z-[70] !pointer-events-auto",class:i.normalizeClass((ze=(Ee=i.unref(C))==null?void 0:Ee.componentProps)==null?void 0:ze.class),onSelectedChar:D,onClose:X[1]||(X[1]=ke=>u.value=!1)},null,40,["class"])):i.createCommentVNode("",!0)]),i.createElementVNode("div",Wq,[i.createElementVNode("label",jq,i.toDisplayString(i.unref(o)("editor.detail")),1),i.createVNode(iE,{ref_key:"simpleEditorRef",ref:l,modelValue:s.value,"onUpdate:modelValue":X[2]||(X[2]=ke=>s.value=ke),"parent-editor":ue.editor,class:"flex-1"},null,8,["modelValue","parent-editor"])]),i.createElementVNode("div",qq,[X[6]||(X[6]=i.createElementVNode("label",{class:"w-1/6 text-right text-sm p-2"},"ID",-1)),i.createVNode(ul,{modelValue:a.value,"onUpdate:modelValue":X[3]||(X[3]=ke=>a.value=ke),class:"flex-1 rounded-none","default-value":a.value,disabled:""},null,8,["modelValue","default-value"])])]),i.createVNode(G,{class:"sm:justify-center pb-3.5 pt-1"},{default:i.withCtx(()=>[i.createVNode(_n,{as:"button",variant:"default",class:"bg-blue-500 hover:bg-blue-500/90",onClick:S},{default:i.withCtx(()=>[i.createVNode(i.unref(ng),{class:"w-5 h-5 mr-2"}),i.createTextVNode(" "+i.toDisplayString(i.unref(o)("editor.check")),1)]),_:1}),i.createVNode(_n,{as:"button",variant:"destructive",onClick:x},{default:i.withCtx(()=>[i.createVNode(i.unref(Mf),{class:"w-5 h-5 mr-2"}),X[7]||(X[7]=i.createTextVNode(" Close "))]),_:1})]),_:1})],4)]}),_:1})]),_:1})]),_:1},8,["open"]),i.createVNode(ne,{open:m.value,onClose:E},null,8,["open"])],64)}}}),ob=i.defineComponent({__name:"SelectContextMenu",props:{editor:{},mode:{},superTextStore:{},disabled:{type:Boolean},disableSuperInput:{type:Boolean}},setup(t,{expose:e}){const n=t,{t:r}=St(),o=i.ref(!1),s=i.reactive({from:0,to:0,text:""}),a=i.ref(!0);let l=0;const u=i.inject("isEditable",i.ref(!0)),c=i.inject("canEditSuper",i.ref(!0)),f=i.computed(()=>n.mode===Fe.EDITOR||n.mode===Fe.PLAIN_TEXT||!c.value||n.disableSuperInput);function p(){if(!n.editor)return"";const{from:E,to:C}=n.editor.state.selection,T=n.editor.state.doc.cut(E,C),A=vo.fromSchema(n.editor.schema).serializeFragment(T.content),D=document.createElement("div");return D.appendChild(A),D.innerHTML}const m=()=>{const{view:E}=n.editor,{from:C,to:T}=E.state.selection,_=p();s.text=_,s.from=C,s.to=T},g=()=>o.value=!o.value,b=()=>{f.value||(o.value=!0,m())},y=()=>o.value=!1,w=E=>{const C=n==null?void 0:n.superTextStore.addMoreSuperText(E);n.editor&&n.editor.commands.insertContentAt(s.from,{type:"superText",attrs:{"data-id":C,"data-text":E}}),o.value=!1,requestAnimationFrame(()=>{var _,A;const T=(_=n.editor)==null?void 0:_.view.dom.parentElement;T&&((A=n.editor)==null||A.view.focus(),T.scrollTop=l)})},x=async E=>{if(E)try{const C=await navigator.clipboard.readText();a.value=!C.trim()}catch{a.value=!0}},S=()=>{var A,D;if(f.value||!n.editor)return;const{view:E,state:C}=n.editor,{from:T,to:_}=C.selection;s.from=T,s.to=_,s.text="",l=((D=(A=n.editor)==null?void 0:A.view.dom.parentElement)==null?void 0:D.scrollTop)||0,E.dom.blur(),o.value=!0};return e({toggleDialog:g,openDialog:b,closeDialog:y}),(E,C)=>{const T=ac,_=xp,A=wp,D=yp,L=vp;return i.openBlock(),i.createElementBlock(i.Fragment,null,[i.createVNode(T,{open:o.value,editor:E.editor,"super-text-init":s.text,onClose:g,onSave:w},null,8,["open","editor","super-text-init"]),i.createVNode(L,{"onUpdate:open":x},{default:i.withCtx(()=>[i.createVNode(_,{as:"template",class:"relative",disabled:i.unref(f),onDblclick:i.withModifiers(S,["prevent","stop"])},{default:i.withCtx(()=>[i.renderSlot(E.$slots,"default")]),_:3},8,["disabled"]),i.createVNode(D,null,{default:i.withCtx(()=>[E.disableSuperInput?i.createCommentVNode("",!0):(i.openBlock(),i.createBlock(A,{key:0,onSelect:b},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(r)("editor.inputSuper")),1)]),_:1})),i.unref(u)?(i.openBlock(),i.createBlock(A,{key:1,onSelect:C[0]||(C[0]=B=>{var W;return(W=E.editor)==null?void 0:W.commands.cutContent()})},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(r)("editor.cut")),1)]),_:1})):i.createCommentVNode("",!0),i.unref(u)?(i.openBlock(),i.createBlock(A,{key:2,onSelect:C[1]||(C[1]=B=>{var W;return(W=E.editor)==null?void 0:W.commands.copyContent()})},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(r)("editor.copy")),1)]),_:1})):i.createCommentVNode("",!0),i.unref(u)?(i.openBlock(),i.createBlock(A,{key:3,disabled:a.value,onSelect:C[2]||(C[2]=B=>{var W;return(W=E.editor)==null?void 0:W.commands.pasteContent()})},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(r)("editor.paste")),1)]),_:1},8,["disabled"])):i.createCommentVNode("",!0)]),_:1})]),_:3})],64)}}});var Fn=(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))(Fn||{});const Kq={id:"editor-panel",class:"flex relative w-full h-full"},Gq=eo(i.defineComponent({__name:"PageNode",props:Ps,setup(t){const{state:e,page:n,superTextStore:r}=vn(),{size:o,pagination:s,margin:a}=n.value,l=i.ref(null),u=i.ref(t.node.attrs.viewSuperTextArea),c=i.computed(()=>u.value&&t.editor.storage.page.mode!=="editor"),f=i.computed(()=>t.editor.storage.page.mode===Fe.REPORT),{width:p,height:m}=o,g=i.computed(()=>s?`calc(${m} - ${(a==null?void 0:a.top)??0} - ${(a==null?void 0:a.bottom)??0}`:"max-content"),b=et.useEventBus(Fn.SUPER_VIEW_PAGE);return i.watch(()=>t.node.attrs,y=>{b.emit(y.pageNumber)},{immediate:!0}),(y,w)=>{var S,E,C,T;const x=ob;return i.openBlock(),i.createBlock(i.unref(Ds),{id:y.node.attrs.id,ref_key:"containerRef",ref:l,"page-number":y.node.attrs.pageNumber,class:"overflow-hidden umo-page-node-view w-full border rounded-[3px] border-[#999999]",style:i.normalizeStyle({"--umo-page-margin-top":((S=i.unref(a))==null?void 0:S.top)??"0","--umo-page-margin-bottom":((E=i.unref(a))==null?void 0:E.bottom)??"0","--umo-page-margin-left":((C=i.unref(a))==null?void 0:C.left)??"0","--umo-page-margin-right":((T=i.unref(a))==null?void 0:T.right)??"0","--umo-page-width":i.unref(p),"--umo-page-height":i.unref(m),"--empty-node-left":"0px",left:100,"min-height":typeof i.unref(m)=="number"?`${i.unref(m)}px`:i.unref(m),height:f.value?typeof i.unref(m)=="number"?`${i.unref(m)}px`:i.unref(m):"auto"})},{default:i.withCtx(()=>[i.createElementVNode("div",Kq,[i.createVNode(x,{mode:c.value?i.unref(Fe).REPORT:i.unref(Fe).EDITOR,editor:y.editor,"super-text-store":i.unref(r)},{default:i.withCtx(()=>[i.createVNode(i.unref(ew),{class:"umo-page-node-content",style:i.normalizeStyle({height:g.value})},null,8,["style"])]),_:1},8,["mode","editor","super-text-store"])])]),_:1},8,["id","page-number","style"])}}}),[["__scopeId","data-v-b5bf1538"]]);function sE(t,e){const n=t.storedMarks??(t.selection.$to.parentOffset&&t.selection.$from.marks());if(n){const r=n.filter(o=>e==null?void 0:e.includes(o.type.name));t.tr.ensureMarks(r)}}const Xq=({keepMarks:t=!0}={})=>({tr:e,state:n,dispatch:r,editor:o})=>{const{selection:s,doc:a}=e,{$from:l,$to:u}=s,c=o.extensionManager.attributes,f=Tp(c,l.node().type.name,l.node().attrs);if(f.id=Kg(),f.extend&&(f.extend=!1),s instanceof De&&s.node.isBlock)return!l.parentOffset||!pr(a,l.pos)?!1:(r&&(t&&sE(n,o.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 Be&&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=pr(e.doc,e.mapping.map(l.pos),1,g);if(!g&&!b&&pr(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 y=e.mapping.map(l.before()),w=e.doc.resolve(y);l.node(-1).canReplaceWith(w.index(),w.index()+1,m)&&e.setNodeMarkup(e.mapping.map(l.before()),m)}t&&sE(n,o.extensionManager.splittableMarks),e.scrollIntoView()}return!0},Yq=t=>({tr:e,state:n,dispatch:r,editor:o})=>{var y;const s=pn(t,n.schema),{$from:a,$to:l}=n.selection,u=n.selection instanceof De?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=o.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 w=ce.empty;const x=a.index(-1)?1:a.index(-2)?2:3;for(let A=a.depth-x;A>=a.depth-3;A-=1)w=ce.from(a.node(A).copy(w));const S=a.indexAfter(-1)<a.node(-2).childCount?1:a.indexAfter(-2)<a.node(-3).childCount?2:3,E=Tp(f,a.node().type.name,a.node().attrs),C=((y=s.contentMatch.defaultType)==null?void 0:y.createAndFill(E))??void 0;w=w.append(ce.from(s.createAndFill(null,C)??void 0));const T=a.before(a.depth-(x-1));e.replace(T,a.after(-S),new Ce(w,4-x,0));let _=-1;e.doc.nodesBetween(T,e.doc.content.size,(A,D)=>{if(_>-1)return!1;A.isTextblock&&A.content.size===0&&(_=D+1)}),_>-1&&e.setSelection(Be.near(e.doc.resolve(_))),e.scrollIntoView()}return!0}const p=l.pos===a.end()?c.contentMatchAt(0).defaultType:null,m=Tp(f,c.type.name,c.attrs),g=Tp(f,a.node().type.name,a.node().attrs);m.id=Kg(),g.id=Kg(),e.delete(a.pos,l.pos);const b=p?[{type:s,attrs:m},{type:p,attrs:g}]:[{type:s,attrs:m}];if(!pr(e.doc,a.pos,2))return!1;if(r){const{selection:w,storedMarks:x}=n,{splittableMarks:S}=o.extensionManager,E=x??(w.$to.parentOffset&&w.$from.marks());if(e.split(a.pos,2,b).scrollIntoView(),!E||!r)return!0;const C=E.filter(T=>S.includes(T.type.name));e.ensureMarks(C)}return!0},Jq=[Gg,pp,hp,Xg,mp,na,Jg,xl,Qg,eb,Zg,Cl,ra,oa,Ng,tb,Yg,Hr],Zq=Bt.create({priority:200,name:`${Hr}`,content:"block*",group:`${Hr}`,isolating:!0,selectable:!1,draggable:!1,isLeaf:!0,addOptions(){return{SystemAttributes:{},nodesComputed:{},View:Vs(Gq),types:[],slots:{}}},addAttributes(){return{HTMLAttributes:{},id:{default:Qi(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",{...bt(e),"data-type":this.name},0]},addCommands(){return{splitBlock:Xq,splitListItem:Yq,autoPaging:(t=!0)=>({tr:e,state:n,dispatch:r,editor:o})=>(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:Jq.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:o})=>{const{selection:s,doc:a}=o,{empty:l,$anchor:u}=s,{pos:c,parent:f}=u,p=Ve.atStart(a).from===c;return!l||!p||!f.type.isTextblock||f.textContent.length?!1:r.clearNodes()}),()=>aE(r),()=>r.joinBackward(),()=>r.selectNodeBackward(),()=>r.command(({editor:o,tr:s})=>{const{selection:a,doc:l}=s,{$anchor:u}=a,{pos:c}=u;if(l.childCount===1)return!1;if(Ve.atEnd(l).from===c&&!u.parentOffset)return r.deleteNode(Hr);const f=Jo(p=>p.type.name===Hr)(a);if(f){if(!f.node.firstChild)return r.deleteNode(Hr);const p=f.node.firstChild.type;if(f.start+Ve.atStart(f.node).from===c){const g=Be.create(l,f.start-2,f.start-2),b=Jo(y=>y.type.name===Hr)(g);if(b){const y=Ve.atEnd(b.node).from+b.start,w=Be.create(l,y,y);if(p===b.node.lastChild.type){const{parent:x}=w.$anchor;return Gj(x,o.schema)?s.setSelection(w):s.step(new fn(y,c,Ce.empty)),!0}s.setSelection(w)}return!0}}return!1})]),Delete:()=>this.editor.commands.first(({commands:r})=>[()=>aE(r),()=>r.command(({tr:o})=>{const{selection:s,doc:a}=o,{$anchor:l}=s,u=l.node(),c=Jo(f=>f.type.name===xl)(s);return c&&c.start+Ve.atStart(c.node).from===l.pos&&c.node.childCount===1&&u.content.size===0?!0:r.joinForward()}),()=>r.selectNodeForward(),()=>r.command(({tr:o})=>{const{selection:s,doc:a}=o,{$anchor:l}=s,{pos:u}=l;if(a.childCount===1)return!1;if(Ve.atEnd(a).from===u)return r.deleteNode(Hr);const c=Jo(f=>f.type.name===Hr)(s);if(c&&c.start+Ve.atEnd(c.node).from===u){const p=Be.create(a,u+2,u+2),m=Jo(g=>g.type.name===Hr)(p);if(m){const g=Ve.atStart(m.node).from+m.start,b=Be.create(a,g,g);if(Jo(w=>w.attrs.extend)(b))return o.step(new fn(u,g,Ce.empty)),!0}}return!1})]),Tab:()=>this.editor.commands.first(({commands:r})=>[()=>!0]),"Mod-Enter":()=>this.editor.commands.setPageBreak()}},addNodeView(){return this.options.View}});function Tp(t,e,n){return Object.fromEntries(Object.entries(n).filter(([r])=>{const o=t.find(s=>s.type===e&&s.name===r);return o?o.attribute.keepOnSplit:!1}))}const aE=t=>t.command(({tr:e})=>{const{selection:n,doc:r}=e,o=t4(r,{from:n.from,to:n.to},s=>s.type.name===xl);for(const s of o){const a=s.pos+s.node.nodeSize;if(n.from<s.pos||n.to>a)return!0}return t.deleteSelection()}),Qq=Qe.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()}}}),Nq=["data-font"],eK=i.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:""}},setup(t){const e=t,n=i.computed(()=>e.editor.extensionStorage["base-kit"].mode===Fe.EDITOR),{t:r}=St(),o=[{label:r("editor.fontFamily.gulim"),value:"Gulim"},{label:r("editor.fontFamily.dotum"),value:"Dotum"},{label:r("editor.fontFamily.gungsuh"),value:"Gungsuh"}],s=i.inject("fontFamily"),a=i.computed(()=>{const p=e.editor.extensionManager.extensions.find(g=>g.name==="fontFamily").options;return nt.isEmpty(p.fontFamilyMap)&&(p.fontFamilyMap=o),[{label:r("editor.fontFamily.default"),value:r("editor.fontFamily.default")},...p.fontFamilyMap]}),l=i.computed(()=>{const p={label:r("editor.fontFamily.default"),value:r("editor.fontFamily.default")};return n.value?Km(e.editor.state,"textStyle").fontFamily||p.value:s.value||p.value}),u=et.useEventBus("fontFamily");function c(p){p.value===l.value||p.value===r("editor.fontFamily.default")?(e.editor.commands.unsetFontFamily(),s.value=null):(s.value=p.value,e.editor.commands.setFontFamily(p.value),u.emit())}const f=i.computed(()=>{var p;return(p=a.value.find(m=>m.value===l.value))==null?void 0:p.label});return(p,m)=>(i.openBlock(),i.createBlock(Qs,{disabled:p.disabled,tooltip:p.tooltip,title:f.value,btn_class:`min-w-24 ${p.customClass}`},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(a.value,(g,b)=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:b},[i.createVNode(i.unref(bl),{checked:l.value===g.value,onClick:y=>c(g)},{default:i.withCtx(()=>[i.createElementVNode("span",{class:"ml-1 h-full","data-font":g.label,style:i.normalizeStyle({fontFamily:g.value??void 0})},i.toDisplayString(g.label),13,Nq)]),_:2},1032,["checked","onClick"]),g.label===i.unref(r)("editor.fontFamily.default")?(i.openBlock(),i.createBlock(i.unref(ig),{key:0})):i.createCommentVNode("",!0)],64))),128))]),_:1},8,["disabled","tooltip","title","btn_class"]))}}),lE=Qq.extend({name:"fontFamily",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),types:["textStyle"],fontFamilyMap:[],button({editor:e,extension:n,t:r}){return{component:eK,componentProps:{editor:e,disabled:!e.can().setFontFamily(""),tooltip:r("editor.fontFamily.tooltip"),customClass:"border border-gray-300 rounded-none text-gray-500 px-2.5 h-[26px]"}}}}},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}}),tK={class:"flex gap-2"},nK=["disabled"],rK=eo(i.defineComponent({__name:"FontSizeIncreaseDecrease",props:{editor:Object},setup(t){const e=i.inject("fontSize"),n=i.computed(()=>e.value?parseInt(e.value)===parseInt(b0[0])||parseInt(e.value)<parseInt(b0[0]):!1),r=et.useEventBus(Fn.INCREASE_DECREASE_FONTSIZE),o=s=>{r.emit(s)};return(s,a)=>{const l=fl,u=dl,c=pl;return i.openBlock(),i.createElementBlock("div",tK,[i.createVNode(c,null,{default:i.withCtx(()=>[i.createVNode(u,{"delay-duration":0},{default:i.withCtx(()=>[i.createVNode(l,null,{default:i.withCtx(()=>[i.createElementVNode("button",{class:"btn",onClick:a[0]||(a[0]=f=>o(!0))},[i.createVNode(i.unref(jt),{name:"Plus",class:"w-6 h-6"})])]),_:1}),i.createVNode(i.unref(Xs),null,{default:i.withCtx(()=>a[2]||(a[2]=[i.createTextVNode(" 글꼴 크기 크게 ")])),_:1})]),_:1})]),_:1}),i.createVNode(c,null,{default:i.withCtx(()=>[i.createVNode(u,{"delay-duration":0},{default:i.withCtx(()=>[i.createVNode(l,null,{default:i.withCtx(()=>[i.createElementVNode("button",{class:"btn",onClick:a[1]||(a[1]=f=>o(!1)),disabled:i.unref(n)},[i.createVNode(i.unref(jt),{name:"Minus",class:"w-6 h-6"})],8,nK)]),_:1}),i.createVNode(i.unref(Xs),null,{default:i.withCtx(()=>a[3]||(a[3]=[i.createTextVNode(" 글꼴 크기 작게 ")])),_:1})]),_:1})]),_:1})])}}}),[["__scopeId","data-v-8403813a"]]),oK=Gn.create({name:"fontSizeIncreaseDecrease",addOptions(){return{defaultSize:"14px",button({editor:t}){return{component:rK,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})}}}),ib=Qe.create({name:"painter",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),button:({editor:e,extension:n,t:r})=>({component:je,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 tt({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:o,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));o(l.setMeta("painterAction",{type:"end"}))};return document.addEventListener("mouseup",r),!0}}}})]}}),sb=()=>Qi(10),uE=new kt("attrkey"),iK=t=>new tt({key:uE,state:{init:()=>!1,apply:n=>n.getMeta("initSplit")},appendTransaction(n,r,o){const{tr:s}=o;let a=!1;const l=uE.getState(o);if(n.some(c=>c.getMeta("composition")))return null;if(l||n.some(c=>c.docChanged)){const c=[];o.doc.descendants((f,p,m,g)=>{const{attrs:b}=f,y=c.includes(b.id)?sb():b.id||sb();t.includes(f.type.name)&&(s.setNodeMarkup(p,void 0,{...b,id:y,"number-line":g+1}),a=!0),c.push(y)})}return a?s:null}}),cE=[Gg,pp,hp,Xg,mp,na,Jg,xl,Qg,eb,Zg,Cl,ra,oa,Ng,tb,Yg,Hr],sK=Qe.create({name:"autoId",addGlobalAttributes(){return[{types:cE.concat(this.options.types||[]),attributes:{id:{default:sb()},extend:{default:!1},class:{default:null},"number-line":{default:null}}}]},addProseMirrorPlugins(){return[iK(cE.concat(this.options.types||[]))]}}),aK=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,lK=Bt.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",bt(this.options.HTMLAttributes,t)]},addCommands(){return{setImage:t=>({commands:e})=>e.insertContent({type:this.name,attrs:t})}},addInputRules(){return[u4({find:aK,type:this.type,getAttributes:t=>{const[,,e,n,r]=t;return{src:n,alt:e,title:r}}})]}}),uK=["src","alt"],cK={key:0,class:"image-resizer"},dK=["onMousedown"],fK=i.defineComponent({__name:"ImageView",props:{...Ps,selected:{type:Boolean,required:!0}},setup(t){const e=t,n={TOP_LEFT:"tl",TOP_RIGHT:"tr",BOTTOM_LEFT:"bl",BOTTOM_RIGHT:"br"},r=i.ref({width:nw,height:nw}),o=i.ref({width:0,height:0}),s=i.ref(!1),a=i.ref({x:0,y:0,w:0,h:0,dir:""}),l=i.computed(()=>{const{src:C,alt:T,width:_,height:A,flipX:D,flipY:L}=e.node.attrs,B=[];D&&B.push("rotateX(180deg)"),L&&B.push("rotateY(180deg)");const W=B.join(" ");return{src:C||void 0,alt:T||void 0,style:{width:v0(_)?`${_}px`:_,height:v0(A)?`${A}px`:A,transform:W||"none"}}}),u=i.computed(()=>({width:i.unref(l).style.width==="100%"?"100%":void 0})),c=i.ref(null),f=new ResizeObserver(C=>{for(const T of C){const{width:_,height:A}=T.contentRect;o.value={width:_,height:A},e.updateAttributes({originWidth:_,originHeight:A})}});function p(){const{editor:C,getPos:T}=e;C.commands.setNodeSelection(T())}const m=nt.throttle(()=>{const{editor:C}=e;r.value.width=parseInt(getComputedStyle(C.view.dom).width,10)},rw);function g(C,T){C.preventDefault(),C.stopPropagation();const{width:_,height:A}=i.unref(o),D=_/A;let L=Number(e.node.attrs.width)||_,B=Number(e.node.attrs.height)||Math.round(L/D);const W=i.unref(r).width;L=Math.min(L>W?W:L,W),B=Math.round(L/D),Object.assign(a.value,{x:C.clientX,y:C.clientY,w:L,h:B,dir:T}),s.value=!0,w()}const b=nt.throttle(C=>{if(!i.unref(s))return;const{x:T,y:_,w:A,dir:D}=i.unref(a),L=(C.clientX-T)*(/l/.test(D)?-1:1),B=MB(A+L,CB,i.unref(r).width);e.updateAttributes({width:B})},rw);function y(C){C.preventDefault(),C.stopPropagation(),i.unref(s)&&(s.value=!1,Object.assign(a.value,{x:0,y:0,w:0,h:0,dir:""}),x(),p())}function w(){document.addEventListener("mousemove",b,!0),document.addEventListener("mouseup",y,!0)}function x(){document.removeEventListener("mousemove",b,!0),document.removeEventListener("mouseup",y,!0)}const S=new ResizeObserver(m),E=i.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 i.onMounted(()=>{c.value&&f.observe(c.value),S.observe(e.editor.view.dom)}),i.onBeforeUnmount(()=>{x(),f.disconnect(),S.disconnect()}),(C,T)=>(i.openBlock(),i.createBlock(i.unref(Ds),{class:"node-image"},{default:i.withCtx(()=>[i.createElementVNode("div",{class:"image-view",style:i.normalizeStyle([l.value.style,E.value])},[i.createElementVNode("div",{draggable:"true","data-drag-handle":"",class:i.normalizeClass([{"image-view__body--focused":t.selected,"image-view__body--resizing":s.value},"image-view__body"]),style:i.normalizeStyle(u.value)},[i.createElementVNode("img",{ref_key:"imageRef",ref:c,src:l.value.src,alt:l.value.alt,class:"block w-full image-view__body__image",onClick:p},null,8,uK),C.editor.view.editable?i.withDirectives((i.openBlock(),i.createElementBlock("div",cK,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(Object.values(n),_=>(i.openBlock(),i.createElementBlock("span",{key:_,class:i.normalizeClass([`image-resizer__handler--${_}`,"image-resizer__handler"]),onMousedown:A=>g(A,_)},null,42,dK))),128))],512)),[[i.vShow,t.selected||s.value]]):i.createCommentVNode("",!0)],6)],4)]),_:1}))}}),pK=eo(fK,[["__scopeId","data-v-dbc7ca58"]]),ab=lK.extend({group:"block",defining:!0,isolating:!0,addAttributes(){var t;return{...(t=this.parent)==null?void 0:t.call(this),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.style.width||e.getAttribute("width")||null;return n&&n.endsWith("%")?n:n==null?null:parseInt(n,10)},renderHTML:e=>({width:e.width})}}},addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this)}},addNodeView(){return Vs(pK)},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:o}=t.attrs,l=`${{left:"margin-right: auto;",right:"margin-left: auto;",center:"margin-left: auto; margin-right: auto;"}[n]||""} ${r||o?`transform: rotateX(${r?"180":"0"}deg) rotateY(${o?"180":"0"}deg);`:""}`;return["img",bt({height:"auto",style:l},this.options.HTMLAttributes,e)]},parseHTML(){return[{tag:"img[src]"}]},addProseMirrorPlugins(){return[new tt({props:{handleTextInput(t){const{selection:e}=t.state;return e instanceof De&&e.node.type.name==="image"},handlePaste(t){const{selection:e}=t.state;return e instanceof De&&e.node.type.name==="image"}}})]}}),hK=["paragraph","heading","list_item","todo_item"];function mK(t,e){const{selection:n,doc:r}=t;if(!n||!r||!(n instanceof Be||n instanceof In))return t;const{from:o,to:s}=n,a=[],l=e&&e!==ow?e:null;return r.nodesBetween(o,s,(u,c)=>{const f=u.type;return hK.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 gK(t){return({state:e,dispatch:n})=>{const{selection:r}=e;let{tr:o}=e;return o=o.setSelection(r),o=mK(o,t),o.docChanged?(n&&n(o),!0):!1}}const bK=i.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}=St();function n(l){return parseFloat(l.replace("%",""))/100}const r=i.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:i.unref(e)("editor.default"),value:"default"}),c}),o=i.ref("default"),s=t;function a(l){l==="default"?s.editor.commands.unsetLineHeight():s.editor.commands.setLineHeight(l),o.value=l}return(l,u)=>(i.openBlock(),i.createBlock(Qs,{icon:l.icon,tooltip:l.tooltip,disabled:l.disabled},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.value,(c,f)=>(i.openBlock(),i.createBlock(i.unref(bl),{key:f,checked:c.value===o.value,onClick:p=>a(c.value)},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(c.label),1)]),_:2},1032,["checked","onClick"]))),128))]),_:1},8,["icon","tooltip","disabled"]))}}),dE=Qe.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:ow,button({editor:e,t:n}){return{component:bK,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=>gK(t),unsetLineHeight:()=>({commands:t})=>this.options.types.every(e=>t.resetAttributes(e,"lineHeight"))}}}),vK=Bt.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",bt(t,{"data-type":"column"}),0]},parseHTML(){return[{tag:'div[data-type="column"]'}]}});var ia=(t=>(t.SidebarLeft="sidebar-left",t.SidebarRight="sidebar-right",t.TwoColumn="two-column",t))(ia||{});const lb=Bt.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[vK.configure(this.options.columnOptions)]}}),fE=i.defineComponent({__name:"DialogDescription",props:{asChild:{type:Boolean},as:{},class:{}},setup(t){const e=t,n=i.computed(()=>{const{class:o,...s}=e;return s}),r=Xn(n);return(o,s)=>(i.openBlock(),i.createBlock(i.unref(KR),i.mergeProps(i.unref(r),{class:i.unref(Ae)("text-sm text-ed-muted-foreground",e.class)}),{default:i.withCtx(()=>[i.renderSlot(o.$slots,"default")]),_:3},16,["class"]))}}),yK={class:"flex gap-x-2 items-center"},wK={class:"sr-only"},xK={class:"flex justify-end gap-x-2.5 flex-1"},CK=["disabled"],Ap=i.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:o}=St(),s=i.ref(""),a=i.ref(!1),l=i.ref(r.isViewMode??!1),u=i.ref(!1);i.watch(()=>r.isViewMode,g=>{l.value=g,g||(s.value="")});const c=i.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())===""});i.watch(()=>r.open,()=>{r.open&&r.superTextInit&&(s.value=r.superTextInit)});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 y=_p,w=Sp,x=kp,S=fE,E=rb,C=Ep,T=Cp;return i.openBlock(),i.createBlock(T,{open:g.open},{default:i.withCtx(()=>[i.createVNode(C,{isOverlayTransparent:"",class:"p-2.5 gap-0 gap-y-2.5 border-none w-[calc(100%-40px)] !shadow-ed rounded-[5px]"},{default:i.withCtx(()=>[i.createVNode(x,{class:"text-left flex-row justify-between"},{default:i.withCtx(()=>[i.createVNode(y,{class:"text-base font-normal"},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(g.title?g.title:i.unref(o)("editor.superinput")),1)]),_:1}),i.createElementVNode("div",yK,[i.withDirectives(i.createElementVNode("button",{onClick:m},[i.createVNode(i.unref(lC),{icon:"lucide:edit-2"})],512),[[i.vShow,l.value]]),i.createVNode(w,{class:"outline-none",onClick:f},{default:i.withCtx(()=>[i.createVNode(i.unref(Mf),{class:"w-5 h-5"}),i.createElementVNode("span",wK,i.toDisplayString(i.unref(o)("editor.close")),1)]),_:1})])]),_:1}),i.createVNode(S,{class:"hidden"}),i.createVNode(iE,{isReadOnly:l.value,modelValue:s.value,"onUpdate:modelValue":b[0]||(b[0]=_=>s.value=_)},null,8,["isReadOnly","modelValue"]),i.createVNode(E,{class:"flex-row justify-between"},{default:i.withCtx(()=>[i.withDirectives(i.createElementVNode("button",{onClick:b[1]||(b[1]=_=>n("delete"))},i.toDisplayString(i.unref(o)("editor.delete")),513),[[i.vShow,u.value]]),i.withDirectives(i.createElementVNode("div",xK,[i.createElementVNode("button",{onClick:f},i.toDisplayString(i.unref(o)("editor.menubar.menu.cancel")),1),i.createElementVNode("button",{onClick:p,disabled:i.unref(c),class:i.normalizeClass({"cursor-not-allowed":i.unref(c)})},i.toDisplayString(i.unref(o)("editor.menubar.menu.save")),11,CK)],512),[[i.vShow,u.value||!l.value]])]),_:1})]),_:1})]),_:1},8,["open"])}}});function EK(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 pE=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())===""},kK=["book-mark-node-id","page-id","page-number","book-mark-content","node-id","element-id","line-id"],SK=i.defineComponent({__name:"SuperText",props:Ps,setup(t){const e=t,n=i.ref(!1),r=i.ref(null),{selection:o,doc:s}=e.editor.state,a=i.ref(!1),l=i.inject("isMobile",!1),u=et.useEventBus(Fn.RENDER_SUPER_TEXT),c=i.computed(()=>{var A,D;const E=s.resolve(o.from),C=E==null?void 0:E.node(-1),T=(A=C==null?void 0:C.attrs)==null?void 0:A.id,_=(D=C==null?void 0:C.attrs)==null?void 0:D.pageNumber;return{pageId:T,pageNumber:_}}),f=i.computed(()=>{const E=e.getPos(),C=e.editor.state.doc.resolve(E);for(let T=C.depth;T>0;T--){const _=C.node(T);if(_.type.name==="paragraph")return _}return null}),p=i.computed(()=>{var E;return((E=f.value)==null?void 0:E.attrs.id)||""}),m=i.inject("canEditSuper",i.ref(!0));function g(E){var D,L,B,W;if(pE(E)){w();return}const C=e.getPos(),T=(D=e.editor)==null?void 0:D.state.doc.nodeAt(C),_=E.trim();if((((B=(L=T==null?void 0:T.attrs)==null?void 0:L[it.TEXT])==null?void 0:B.trim())||"")!==_){const{[it.ELEMENT_ID]:J,...ue}=(T==null?void 0:T.attrs)||{};(W=e.editor)==null||W.view.dispatch(e.editor.state.tr.setNodeMarkup(C,void 0,{...ue,[it.TEXT]:_}))}requestAnimationFrame(()=>{e.editor.commands.setTextSelection(C+1),e.editor.view.focus()})}function b(E){const C=e.node.attrs[it.TEXT],T=e.node.attrs[it.ID],A={lineId:E.target.querySelector(`[node-id="${T}"]`).getAttribute("line-id"),dataId:T,text:C};u.emit({action:"hover",payload:A})}function y(E){const C=e.node.attrs[it.ID],_={lineId:E.target.querySelector(`[node-id="${C}"]`).getAttribute("line-id"),dataId:C,text:""};u.emit({action:"hover",payload:_})}function w(){const{getPos:E,node:C,editor:T}=e,_=E(),A=_+1;T.commands.deleteRange({from:_,to:A})}function x(){if(!m.value)return;const{attributes:E}=e.editor.options.editorProps;if(E&&E.id===rr.COMMENT){const C=document.getElementById(rr.COMMENT);if((C==null?void 0:C.getAttribute(rr.DISABLE_SUPER_INPUT))==="true")return}e.editor.view.dom.blur(),n.value=!0}function S(){l&&(a.value=!0,x())}return(E,C)=>{const T=_n,_=xp,A=wp,D=yp,L=vp,B=ac;return i.openBlock(),i.createBlock(i.unref(Ds),{as:"span",class:i.normalizeClass(["w-fit text-inherit super-text align-middle",{"text-red-600 !leading-[13px]":i.unref(l)}]),"data-drag-handle":"",draggable:i.unref(m),contenteditable:"false"},{default:i.withCtx(()=>[i.createVNode(L,null,{default:i.withCtx(()=>[i.createVNode(_,{as:"template",class:"relative",disabled:!i.unref(m)},{default:i.withCtx(()=>[i.createVNode(T,{class:i.normalizeClass([{"pointer-events-none":!i.unref(m)},"!p-0 !m-0 !h-fit"]),variant:"ghost",onDblclick:i.withModifiers(x,["stop"]),onClick:S,onMouseenter:b,onMouseleave:y},{default:i.withCtx(()=>[i.createVNode(i.unref(jt),{name:"fileEdit",class:i.normalizeClass({"w-[13px] h-auto":i.unref(l)})},null,8,["class"]),i.createElementVNode("div",{ref_key:"bookMarkRef",ref:r,"book-mark-node-id":e.node.attrs[i.unref(it).ID],"page-id":c.value.pageId,"page-number":c.value.pageNumber,"book-mark-content":e.node.attrs[i.unref(it).TEXT],"node-id":e.node.attrs[i.unref(it).ID],"element-id":e.node.attrs[i.unref(it).ELEMENT_ID],"line-id":p.value},null,8,kK)]),_:1},8,["class"])]),_:1},8,["disabled"]),i.createVNode(D,null,{default:i.withCtx(()=>[i.createVNode(A,{onSelect:C[0]||(C[0]=W=>n.value=!0)},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(E.$t("editor.super.edit")),1)]),_:1}),i.createVNode(A,{onSelect:w},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(E.$t("editor.super.delete")),1)]),_:1})]),_:1})]),_:1}),i.unref(l)?(i.openBlock(),i.createBlock(Ap,{key:1,open:n.value,"is-view-mode":a.value,editor:e.editor,"super-text-init":e.node.attrs[i.unref(it).TEXT],"super-text-id":e.node.attrs[i.unref(it).ID],"super-text-element-id":e.node.attrs[i.unref(it).ELEMENT_ID],onClose:C[2]||(C[2]=W=>n.value=!1),onSave:g,onDelete:w},null,8,["open","is-view-mode","editor","super-text-init","super-text-id","super-text-element-id"])):(i.openBlock(),i.createBlock(B,{key:0,open:n.value,editor:e.editor,"super-text-init":e.node.attrs[i.unref(it).TEXT],"super-text-element-id":e.node.attrs[i.unref(it).ELEMENT_ID],onClose:C[1]||(C[1]=W=>n.value=!1),onSave:g},null,8,["open","editor","super-text-init","super-text-element-id"]))]),_:1},8,["class","draggable"])}}}),_K=new tt({props:{handleKeyDown(t,e){var n;if(e.key==="Backspace"){const{state:r,dispatch:o}=t,{$from:s}=r.selection;if(s.parentOffset===1){const u=s.nodeAfter;if(u&&u.type.name==="superText"){const c=r.tr;c.delete(s.pos-1,s.pos);const f=r.schema.text("");return c.insert(s.pos-1,ce.from(f)),c.setSelection(Be.create(c.doc,s.pos)),o(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(Be.create(c.doc,s.pos-1)),o(c),e.preventDefault(),!0}}}return!1}}}),Op="superText",hE={UPDATE:"superTextUpdate"},mE=Bt.create({name:"superText",inline:!0,group:"inline",selectable:!1,defining:!0,draggable:!0,addStorage(){return{enable:!0,isShowSuperInputMoblie:!1,view:!0,items:[],toggleSuperViewMobileCallBack:this.options.toggleSuperViewMobileCallBack}},addOptions(){return{specialCharModal:null,button:({editor:t,t:e,isMobile:n})=>[...n?[{component:je,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 !text-white !font-normal rounded-[3px] h-[26px] ml-auto",customClassTooltip:"ml-auto"}}]:[],{component:je,componentProps:{action:()=>t.commands.toggleSuperText(n),isActive:()=>t.storage.superText.enable,title:e("editor.menubar.menu.superView"),customClass:`whitespace-nowrap !text-white !font-normal rounded-[3px] h-[26px]
|
|
275
275
|
${n?"!bg-ed-blue":t.storage.superText.enable?"!bg-blue-700":"!bg-blue-500"}
|
|
276
276
|
`,tooltip:"수퍼 보기"}}]}},addAttributes(){return{[it.ID]:{default:null},[it.TEXT]:{default:""},[it.POSITION]:{default:"0"},[it.ELEMENT_ID]:{default:""}}},addCommands(){return{toggleSuperText:t=>({editor:e})=>t?e.storage.superText.toggleSuperViewMobileCallBack():e.storage.superText.enable=!e.storage.superText.enable,toggleSuperInputMoblie:()=>({editor:t})=>t.storage.superText.isShowSuperInputMoblie=!t.storage.superText.isShowSuperInputMoblie}},parseHTML(){return[{tag:"button.super-text"}]},renderHTML({HTMLAttributes:t}){return["button",bt(t,{class:"super-text"})]},addNodeView(){return Vs(SK)},addProseMirrorPlugins(){return[new tt({appendTransaction(t,e,n){let r=n.tr,o=!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}),o=!0)}}),o?r:null}}),new tt({filterTransaction(t,e){return t.steps.some(r=>{if(r.toJSON&&r.toJSON().stepType==="replace"){const o=r.toJSON();return o.slice&&o.slice.content&&o.slice.content.some(s=>s.type===Op)}return!1})&&t.setMeta(hE.UPDATE,!0),!0}}),_K]}}),TK=["innerHTML"],AK=["book-mark-node-id","page-id","page-number","book-mark-content","node-id","line-id"],OK=i.defineComponent({__name:"ConfigPlan",props:Ps,setup(t){const e=t,n=i.ref(!1),r=i.ref(null),{selection:o,doc:s}=e.editor.state,a=i.inject("isMobile"),l=i.ref(!1),u=et.useEventBus(Fn.RENDER_SUPER_TEXT),c=i.computed(()=>{var T,_;const x=s.resolve(o.from),S=x==null?void 0:x.node(-1),E=(T=S==null?void 0:S.attrs)==null?void 0:T.id,C=(_=S==null?void 0:S.attrs)==null?void 0:_.pageNumber;return{pageId:E,pageNumber:C}}),f=i.computed(()=>{const x=e.getPos(),S=e.editor.state.doc.resolve(x);for(let E=S.depth;E>0;E--){const C=S.node(E);if(C.type.name==="paragraph")return C}return null}),p=i.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 S=e.node.attrs[it.TEXT],E=e.node.attrs[it.ID],T={lineId:x.target.querySelector(`[node-id="${E}"]`).getAttribute("line-id"),text:S};u.emit({action:"hover",payload:T})}function b(x){const S=e.node.attrs[it.ID],C={lineId:x.target.querySelector(`[node-id="${S}"]`).getAttribute("line-id"),text:""};u.emit({action:"hover",payload:C})}function y(){const{getPos:x,node:S,editor:E}=e,C=x(),T=C+1;E.commands.deleteRange({from:C,to:T})}function w(){n.value=!0,a&&(l.value=!0)}return(x,S)=>{const E=_n,C=xp,T=wp,_=yp,A=vp,D=ac;return i.openBlock(),i.createBlock(i.unref(Ds),{as:"span",class:i.normalizeClass(["w-fit text-inherit super-text align-middle",{"!leading-[9px] [&_*]:!leading-[9px]":i.unref(a)}]),"data-drag-handle":"",draggable:"true",contenteditable:"false"},{default:i.withCtx(()=>[i.createVNode(A,null,{default:i.withCtx(()=>[i.createVNode(C,{as:"template",class:"relative"},{default:i.withCtx(()=>[i.createVNode(E,{variant:"ghost",class:"!p-0 !m-0 !h-fit font-normal !text-ed-blue",onClick:w,onMouseenter:g,onMouseleave:b},{default:i.withCtx(()=>[i.createVNode(i.unref(jt),{name:"plan",class:i.normalizeClass({"w-[18px] h-auto pr-1":i.unref(a)})},null,8,["class"]),S[3]||(S[3]=i.createTextVNode(" [")),i.createElementVNode("span",{class:"[&_*]:inline",innerHTML:e.node.attrs[i.unref(it).TEXT]},null,8,TK),S[4]||(S[4]=i.createTextVNode("] ")),i.createElementVNode("div",{ref_key:"bookMarkRef",ref:r,"book-mark-node-id":e.node.attrs[i.unref(it).ID],"page-id":c.value.pageId,"page-number":c.value.pageNumber,"book-mark-content":e.node.attrs[i.unref(it).TEXT],"node-id":e.node.attrs[i.unref(it).ID],"line-id":p.value},null,8,AK)]),_:1})]),_:1}),i.createVNode(_,null,{default:i.withCtx(()=>[i.createVNode(T,{onSelect:S[0]||(S[0]=L=>n.value=!0)},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(x.$t("editor.configPlan.edit")),1)]),_:1}),i.createVNode(T,{onSelect:y},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(x.$t("editor.configPlan.delete")),1)]),_:1})]),_:1})]),_:1}),i.unref(a)?(i.openBlock(),i.createBlock(Ap,{key:1,title:x.$t("editor.configPlan"),open:n.value,"is-view-mode":l.value,editor:e.editor,"super-text-init":e.node.attrs[i.unref(it).TEXT],"super-text-id":e.node.attrs[i.unref(it).ID],onClose:S[2]||(S[2]=L=>n.value=!1),onSave:m,onDelete:y},null,8,["title","open","is-view-mode","editor","super-text-init","super-text-id"])):(i.openBlock(),i.createBlock(D,{key:0,open:n.value,editor:e.editor,"super-text-init":e.node.attrs[i.unref(it).TEXT],"super-text-element-id":e.node.attrs[i.unref(it).ELEMENT_ID],onClose:S[1]||(S[1]=L=>n.value=!1),onSave:m},null,8,["open","editor","super-text-init","super-text-element-id"]))]),_:1},8,["class"])}}}),gE=Bt.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:je,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",bt(t,{class:"config-plan"})]},addNodeView(){return Vs(OK)},addProseMirrorPlugins(){return[new tt({appendTransaction(t,e,n){let r=n.tr,o=!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}),o=!0)}}),o?r:null}})]}});var ub,cb;if(typeof WeakMap<"u"){let t=new WeakMap;ub=e=>t.get(e),cb=(e,n)=>(t.set(e,n),n)}else{const t=[];let n=0;ub=r=>{for(let o=0;o<t.length;o+=2)if(t[o]==r)return t[o+1]},cb=(r,o)=>(n==10&&(n=0),t[n++]=r,t[n++]=o)}var rn=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,o=e/this.width|0;let s=r+1,a=o+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:o,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:o,top:s,bottom:a}=this.findCell(t);return e=="horiz"?(n<0?r==0:o==this.width)?null:this.map[s*this.width+(n<0?r-1:o)]:(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:o,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(o,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 o=t.left;o<t.right;o++){const s=r*this.width+o,a=this.map[s];n[a]||(n[a]=!0,!(o==t.left&&o&&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,o=0;;r++){const s=o+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]<o;)a++;return a==l?s-1:this.map[a]}o=s}}static get(t){return ub(t)||cb(t,MK(t))}};function MK(t){if(t.type.spec.tableRole!="table")throw new RangeError("Not a table node: "+t.type.name);const e=BK(t),n=t.childCount,r=[];let o=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(;o<r.length&&r[o]!=0;)o++;if(b==p.childCount)break;const y=p.child(b),{colspan:w,rowspan:x,colwidth:S}=y.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=o+E*e;for(let T=0;T<w;T++){r[C+T]==0?r[C+T]=f:(s||(s=[])).push({type:"collision",row:c,pos:f,n:w-T});const _=S&&S[T];if(_){const A=(C+T)%e*2,D=a[A];D==null||D!=_&&a[A+1]==1?(a[A]=_,a[A+1]=1):D==_&&a[A+1]++}}}o+=w,f+=y.nodeSize}const m=(c+1)*e;let g=0;for(;o<m;)r[o++]==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 rn(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&&IK(l,a,t),l}function BK(t){let e=-1,n=!1;for(let r=0;r<t.childCount;r++){const o=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<o.childCount;a++){const l=o.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 IK(t,e,n){t.problems||(t.problems=[]);const r={};for(let o=0;o<t.map.length;o++){const s=t.map[o];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=(o+c)%t.width,p=e[f*2];p!=null&&(!u.colwidth||u.colwidth[c]!=p)&&((l||(l=RK(u)))[c]=p)}l&&t.problems.unshift({type:"colwidth mismatch",pos:s,colwidth:l})}}function RK(t){if(t.colwidth)return t.colwidth.slice();const e=[];for(let n=0;n<t.colspan;n++)e.push(0);return e}function $n(t){let e=t.cached.tableNodeTypes;if(!e){e=t.cached.tableNodeTypes={};for(const n in t.nodes){const r=t.nodes[n],o=r.spec.tableRole;o&&(e[o]=r)}}return e}var ls=new kt("selectingCells");function El(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 LK(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 co(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 Mp(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=El(e.$head)||DK(e.$head);if(n)return n;throw new RangeError(`No cell found around position ${e.head}`)}function DK(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 db(t){return t.parent.type.spec.tableRole=="row"&&!!t.nodeAfter}function PK(t){return t.node(0).resolve(t.pos+t.nodeAfter.nodeSize)}function fb(t,e){return t.depth==e.depth&&t.pos>=e.start(-1)&&t.pos<=e.end(-1)}function bE(t,e,n){const r=t.node(-1),o=rn.get(r),s=t.start(-1),a=o.nextCell(t.pos-s,e,n);return a==null?null:t.node(0).resolve(s+a)}function sa(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(o=>o>0)||(r.colwidth=null)),r}function vE(t,e,n=1){const r={...t,colspan:t.colspan+n};if(r.colwidth){r.colwidth=r.colwidth.slice();for(let o=0;o<n;o++)r.colwidth.splice(e,0,0)}return r}function VK(t,e,n){const r=$n(e.type.schema).header_cell;for(let o=0;o<t.height;o++)if(e.nodeAt(t.map[n+o*t.width]).type!=r)return!1;return!0}var Ft=class Si extends Ve{constructor(e,n=e){const r=e.node(-1),o=rn.get(r),s=e.start(-1),a=o.rectBetween(e.pos-s,n.pos-s),l=e.node(0),u=o.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 sy(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)),o=e.resolve(n.map(this.$headCell.pos));if(db(r)&&db(o)&&fb(r,o)){const s=this.$anchorCell.node(-1)!=r.node(-1);return s&&this.isRowSelection()?Si.rowSelection(r,o):s&&this.isColSelection()?Si.colSelection(r,o):new Si(r,o)}return Be.between(r,o)}content(){const e=this.$anchorCell.node(-1),n=rn.get(e),r=this.$anchorCell.start(-1),o=n.rectBetween(this.$anchorCell.pos-r,this.$headCell.pos-r),s={},a=[];for(let u=o.top;u<o.bottom;u++){const c=[];for(let f=u*n.width+o.left,p=o.left;p<o.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 y=o.left-g.left,w=g.right-o.right;if(y>0||w>0){let x=b.attrs;if(y>0&&(x=sa(x,0,y)),w>0&&(x=sa(x,x.colspan-w,w)),g.left<o.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<o.top||g.bottom>o.bottom){const x={...b.attrs,rowspan:Math.min(g.bottom,o.bottom)-Math.max(g.top,o.top)};g.top<o.top?b=b.type.createAndFill(x):b=b.type.create(x,b.content)}c.push(b)}a.push(e.child(u).copy(ce.from(c)))}const l=this.isColSelection()&&this.isRowSelection()?e:a;return new Ce(ce.from(l),1,1)}replace(e,n=Ce.empty){const r=e.steps.length,o=this.ranges;for(let a=0;a<o.length;a++){const{$from:l,$to:u}=o[a],c=e.mapping.slice(r);e.replace(c.map(l.pos),c.map(u.pos),a?Ce.empty:n)}const s=Ve.findFrom(e.doc.resolve(e.mapping.slice(r).map(this.to)),-1);s&&e.setSelection(s)}replaceWith(e,n){this.replace(e,new Ce(ce.from(n),0,0))}forEachCell(e){const n=this.$anchorCell.node(-1),r=rn.get(n),o=this.$anchorCell.start(-1),s=r.cellsInRect(r.rectBetween(this.$anchorCell.pos-o,this.$headCell.pos-o));for(let a=0;a<s.length;a++)e(n.nodeAt(s[a]),o+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,o=n+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(r,o)==this.$headCell.node(-1).childCount}static colSelection(e,n=e){const r=e.node(-1),o=rn.get(r),s=e.start(-1),a=o.findCell(e.pos-s),l=o.findCell(n.pos-s),u=e.node(0);return a.top<=l.top?(a.top>0&&(e=u.resolve(s+o.map[a.left])),l.bottom<o.height&&(n=u.resolve(s+o.map[o.width*(o.height-1)+l.right-1]))):(l.top>0&&(n=u.resolve(s+o.map[l.left])),a.bottom<o.height&&(e=u.resolve(s+o.map[o.width*(o.height-1)+a.right-1]))),new Si(e,n)}isRowSelection(){const e=this.$anchorCell.node(-1),n=rn.get(e),r=this.$anchorCell.start(-1),o=n.colCount(this.$anchorCell.pos-r),s=n.colCount(this.$headCell.pos-r);if(Math.min(o,s)>0)return!1;const a=o+this.$anchorCell.nodeAfter.attrs.colspan,l=s+this.$headCell.nodeAfter.attrs.colspan;return Math.max(a,l)==n.width}eq(e){return e instanceof Si&&e.$anchorCell.pos==this.$anchorCell.pos&&e.$headCell.pos==this.$headCell.pos}static rowSelection(e,n=e){const r=e.node(-1),o=rn.get(r),s=e.start(-1),a=o.findCell(e.pos-s),l=o.findCell(n.pos-s),u=e.node(0);return a.left<=l.left?(a.left>0&&(e=u.resolve(s+o.map[a.top*o.width])),l.right<o.width&&(n=u.resolve(s+o.map[o.width*(l.top+1)-1]))):(l.left>0&&(n=u.resolve(s+o.map[l.top*o.width])),a.right<o.width&&(e=u.resolve(s+o.map[o.width*(a.top+1)-1]))),new Si(e,n)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(e,n){return new Si(e.resolve(n.anchor),e.resolve(n.head))}static create(e,n,r=n){return new Si(e.resolve(n),e.resolve(r))}getBookmark(){return new FK(this.$anchorCell.pos,this.$headCell.pos)}};Ft.prototype.visible=!1,Ve.jsonID("cell",Ft);var FK=class C_{constructor(e,n){this.anchor=e,this.head=n}map(e){return new C_(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&&fb(n,r)?new Ft(n,r):Ve.near(r,1)}};function $K(t){if(!(t.selection instanceof Ft))return null;const e=[];return t.selection.forEachCell((n,r)=>{e.push(Wt.node(r,r+n.nodeSize,{class:"selectedCell"}))}),mt.create(t.doc,e)}function zK({$from:t,$to:e}){if(t.pos==e.pos||t.pos<e.pos-6)return!1;let n=t.pos,r=e.pos,o=t.depth;for(;o>=0&&!(t.after(o+1)<t.end(o));o--,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(o).type.spec.tableRole)}function HK({$from:t,$to:e}){let n,r;for(let o=t.depth;o>0;o--){const s=t.node(o);if(s.type.spec.tableRole==="cell"||s.type.spec.tableRole==="header_cell"){n=s;break}}for(let o=e.depth;o>0;o--){const s=e.node(o);if(s.type.spec.tableRole==="cell"||s.type.spec.tableRole==="header_cell"){r=s;break}}return n!==r&&e.parentOffset===0}function UK(t,e,n){const r=(e||t).selection,o=(e||t).doc;let s,a;if(r instanceof De&&(a=r.node.type.spec.tableRole)){if(a=="cell"||a=="header_cell")s=Ft.create(o,r.from);else if(a=="row"){const l=o.resolve(r.from+1);s=Ft.rowSelection(l,l)}else if(!n){const l=rn.get(r.node),u=r.from+1,c=u+l.map[l.width*l.height-1];s=Ft.create(o,u+1,c)}}else r instanceof Be&&zK(r)?s=Be.create(o,r.from):r instanceof Be&&HK(r)&&(s=Be.create(o,r.$from.start(),r.$from.end()));return s&&(e||(e=t.tr)).setSelection(s),e}var WK=new kt("fix-tables");function yE(t,e,n,r){const o=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(o,a+3);c<f;c++)if(t.child(c)==u){l=c+1,n+=u.nodeSize;continue e}r(u,n),l<o&&t.child(l).sameMarkup(u)?yE(t.child(l),u,n+1,r):u.nodesBetween(0,u.content.size,r,n+1),n+=u.nodeSize}}function wE(t,e){let n;const r=(o,s)=>{o.type.spec.tableRole=="table"&&(n=jK(t,o,s,n))};return e?e.doc!=t.doc&&yE(e.doc,t.doc,0,r):t.doc.descendants(r),n}function jK(t,e,n,r){const o=rn.get(e);if(!o.problems)return r;r||(r=t.tr);const s=[];for(let u=0;u<o.height;u++)s.push(0);for(let u=0;u<o.problems.length;u++){const c=o.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,sa(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<o.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 w=0;w<m;w++){const x=$n(t.schema)[g].createAndFill();x&&b.push(x)}const y=(u==0||a==u-1)&&l==u?c+1:p-1;r.insert(r.mapping.map(y),b)}c=p}return r.setMeta(WK,{fixTables:!0})}function Fo(t){const e=t.selection,n=Mp(t),r=n.node(-1),o=n.start(-1),s=rn.get(r);return{...e instanceof Ft?s.rectBetween(e.$anchorCell.pos-o,e.$headCell.pos-o):s.findCell(n.pos-o),tableStart:o,map:s,table:r}}function xE(t,{map:e,tableStart:n,table:r},o){let s=o>0?-1:0;VK(e,r,o+s)&&(s=o==0||o==e.width?null:0);for(let a=0;a<e.height;a++){const l=a*e.width+o;if(o>0&&o<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,vE(c.attrs,o-e.colCount(u))),a+=c.attrs.rowspan-1}else{const u=s==null?$n(r.type.schema).cell:r.nodeAt(e.map[l+s]).type,c=e.positionAt(a,o,r);t.insert(t.mapping.map(n+c),u.createAndFill())}}return t}function qK(t,e){if(!co(t))return!1;if(e){const n=Fo(t);e(xE(t.tr,n,n.left))}return!0}function KK(t,e){if(!co(t))return!1;if(e){const n=Fo(t);e(xE(t.tr,n,n.right))}return!0}function GK(t,{map:e,table:n,tableStart:r},o){const s=t.mapping.maps.length;for(let a=0;a<e.height;){const l=a*e.width+o,u=e.map[l],c=n.nodeAt(u),f=c.attrs;if(o>0&&e.map[l-1]==u||o<e.width-1&&e.map[l+1]==u)t.setNodeMarkup(t.mapping.slice(s).map(r+u),null,sa(f,o-e.colCount(u)));else{const p=t.mapping.slice(s).map(r+u);t.delete(p,p+c.nodeSize)}a+=f.rowspan}}function XK(t,e){if(!co(t))return!1;if(e){const n=Fo(t),r=t.tr;if(n.left==0&&n.right==n.map.width)return!1;for(let o=n.right-1;GK(r,n,o),o!=n.left;o--){const s=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!s)throw RangeError("No table found");n.table=s,n.map=rn.get(s)}e(r)}return!0}function YK(t,e,n){var r;const o=$n(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)!=o)return!1;return!0}function CE(t,{map:e,tableStart:n,table:r},o){var s;let a=n;for(let c=0;c<o;c++)a+=r.child(c).nodeSize;const l=[];let u=o>0?-1:0;YK(e,r,o+u)&&(u=o==0||o==e.height?null:0);for(let c=0,f=e.width*o;c<e.width;c++,f++)if(o>0&&o<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?$n(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,$n(r.type.schema).row.create(null,l)),t}function JK(t,e){if(!co(t))return!1;if(e){const n=Fo(t);e(CE(t.tr,n,n.top))}return!0}function ZK(t,e){if(!co(t))return!1;if(e){const n=Fo(t);e(CE(t.tr,n,n.bottom))}return!0}function QK(t,{map:e,table:n,tableStart:r},o){let s=0;for(let c=0;c<o;c++)s+=n.child(c).nodeSize;const a=s+n.child(o).nodeSize,l=t.mapping.maps.length;t.delete(s+r,a+r);const u=new Set;for(let c=0,f=o*e.width;c<e.width;c++,f++){const p=e.map[f];if(!u.has(p)){if(u.add(p),o>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(o<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),y=e.positionAt(o+1,c,n);t.insert(t.mapping.slice(l).map(r+y),b),c+=g.colspan-1}}}}function NK(t,e){if(!co(t))return!1;if(e){const n=Fo(t),r=t.tr;if(n.top==0&&n.bottom==n.map.height)return!1;for(let o=n.bottom-1;QK(r,n,o),o!=n.top;o--){const s=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!s)throw RangeError("No table found");n.table=s,n.map=rn.get(n.table)}e(r)}return!0}function EE(t){const e=t.content;return e.childCount==1&&e.child(0).isTextblock&&e.child(0).childCount==0}function eG({width:t,height:e,map:n},r){let o=r.top*t+r.left,s=o,a=(r.bottom-1)*t+r.left,l=o+(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[o]==n[o-t]||r.bottom<e&&n[a]==n[a+t])return!0;o++,a++}return!1}function kE(t,e){const n=t.selection;if(!(n instanceof Ft)||n.$anchorCell.pos==n.$headCell.pos)return!1;const r=Fo(t),{map:o}=r;if(eG(o,r))return!1;if(e){const s=t.tr,a={};let l=ce.empty,u,c;for(let f=r.top;f<r.bottom;f++)for(let p=r.left;p<r.right;p++){const m=o.map[f*o.width+p],g=r.table.nodeAt(m);if(!(a[m]||!g))if(a[m]=!0,u==null)u=m,c=g;else{EE(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,{...vE(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=EE(c)?u+1:f;s.replaceWith(p+r.tableStart,f+r.tableStart,l)}s.setSelection(new Ft(s.doc.resolve(u+r.tableStart))),e(s)}return!0}function SE(t,e){const n=$n(t.schema);return tG(({node:r})=>n[r.type.spec.tableRole])(t,e)}function tG(t){return(e,n)=>{var r;const o=e.selection;let s,a;if(o instanceof Ft){if(o.$anchorCell.pos!=o.$headCell.pos)return!1;s=o.$anchorCell.nodeAfter,a=o.$anchorCell.pos}else{if(s=LK(o.$from),!s)return!1;a=(r=El(o.$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=Fo(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 y=f.left,w=0;y<f.right;y++,w++)y==f.left&&g==f.top||p.insert(m=p.mapping.map(b+f.tableStart,1),t({node:s,row:g,col:y}).createAndFill(u[w]))}p.setNodeMarkup(a,t({node:s,row:f.top,col:f.left}),u[0]),o instanceof Ft&&p.setSelection(new Ft(p.doc.resolve(o.$anchorCell.pos),m?p.doc.resolve(m):void 0)),n(p)}return!0}}function nG(t,e){return function(n,r){if(!co(n))return!1;const o=Mp(n);if(o.nodeAfter.attrs[t]===e)return!1;if(r){const s=n.tr;n.selection instanceof Ft?n.selection.forEachCell((a,l)=>{a.attrs[t]!==e&&s.setNodeMarkup(l,null,{...a.attrs,[t]:e})}):s.setNodeMarkup(o.pos,null,{...o.nodeAfter.attrs,[t]:e}),r(s)}return!0}}function rG(t){return function(e,n){if(!co(e))return!1;if(n){const r=$n(e.schema),o=Fo(e),s=e.tr,a=o.map.cellsInRect(t=="column"?{left:o.left,top:0,right:o.right,bottom:o.map.height}:t=="row"?{left:0,top:o.top,right:o.map.width,bottom:o.bottom}:o),l=a.map(u=>o.table.nodeAt(u));for(let u=0;u<a.length;u++)l[u].type==r.header_cell&&s.setNodeMarkup(o.tableStart+a[u],r.cell,l[u].attrs);if(s.steps.length==0)for(let u=0;u<a.length;u++)s.setNodeMarkup(o.tableStart+a[u],r.header_cell,l[u].attrs);n(s)}return!0}}function _E(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 o=0;o<r.length;o++){const s=e.table.nodeAt(r[o]);if(s&&s.type!==n.header_cell)return!1}return!0}function lc(t,e){return e=e||{useDeprecatedLogic:!1},e.useDeprecatedLogic?rG(t):function(n,r){if(!co(n))return!1;if(r){const o=$n(n.schema),s=Fo(n),a=n.tr,l=_E("row",s,o),u=_E("column",s,o),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?o.cell:o.header_cell:t=="row"?l?o.cell:o.header_cell:o.cell;s.map.cellsInRect(p).forEach(g=>{const b=g+s.tableStart,y=a.doc.nodeAt(b);y&&a.setNodeMarkup(b,m,y.attrs)}),r(a)}return!0}}lc("row",{useDeprecatedLogic:!0}),lc("column",{useDeprecatedLogic:!0});var oG=lc("cell",{useDeprecatedLogic:!0});function iG(t,e){if(e<0){const n=t.nodeBefore;if(n)return t.pos-n.nodeSize;for(let r=t.index(-1)-1,o=t.before();r>=0;r--){const s=t.node(-1).child(r),a=s.lastChild;if(a)return o-1-a.nodeSize;o-=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),o=t.after();r<n.childCount;r++){const s=n.child(r);if(s.childCount)return o+1;o+=s.nodeSize}}return null}function TE(t){return function(e,n){if(!co(e))return!1;const r=iG(Mp(e),t);if(r==null)return!1;if(n){const o=e.doc.resolve(r);n(e.tr.setSelection(Be.between(o,PK(o))).scrollIntoView())}return!0}}function sG(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 Bp(t,e){const n=t.selection;if(!(n instanceof Ft))return!1;if(e){const r=t.tr,o=$n(t.schema).cell.createAndFill().content;n.forEachCell((s,a)=>{s.content.eq(o)||r.replace(r.mapping.map(a+1),r.mapping.map(a+s.nodeSize-1),new Ce(o,0,0))}),r.docChanged&&e(r)}return!0}function aG(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 o=e.child(0),s=o.type.spec.tableRole,a=o.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=pb($n(a).row,new Ce(c,f,p)).content),l.push(c)}else if(s=="cell"||s=="header_cell")l.push(n||r?pb($n(a).row,new Ce(e,n,r)).content:e);else return null;return lG(a,l)}function lG(t,e){const n=[];for(let o=0;o<e.length;o++){const s=e[o];for(let a=s.childCount-1;a>=0;a--){const{rowspan:l,colspan:u}=s.child(a).attrs;for(let c=o;c<o+l;c++)n[c]=(n[c]||0)+u}}let r=0;for(let o=0;o<n.length;o++)r=Math.max(r,n[o]);for(let o=0;o<n.length;o++)if(o>=e.length&&e.push(ce.empty),n[o]<r){const s=$n(t).cell.createAndFill(),a=[];for(let l=n[o];l<r;l++)a.push(s);e[o]=e[o].append(ce.from(a))}return{height:e.length,width:r,rows:e}}function pb(t,e){const n=t.createAndFill();return new rm(n).replace(0,n.content.size,e).doc}function uG({width:t,height:e,rows:n},r,o){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(sa(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(ce.from(c))}n=a,t=r}if(e!=o){const s=[];for(let a=0,l=0;a<o;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>o&&(p=p.type.create({...p.attrs,rowspan:Math.max(1,o-p.attrs.rowspan)},p.content)),u.push(p)}s.push(ce.from(u))}n=s,e=o}return{width:t,height:e,rows:n}}function cG(t,e,n,r,o,s,a){const l=t.doc.type.schema,u=$n(l);let c,f;if(o>e.width)for(let p=0,m=0;p<e.height;p++){const g=n.child(p);m+=g.nodeSize;const b=[];let y;g.lastChild==null||g.lastChild.type==u.cell?y=c||(c=u.cell.createAndFill()):y=f||(f=u.header_cell.createAndFill());for(let w=e.width;w<o;w++)b.push(y);t.insert(t.mapping.slice(a).map(m-1+r),b)}if(s>e.height){const p=[];for(let b=0,y=(e.height-1)*e.width;b<Math.max(e.width,o);b++){const w=b>=e.width?!1:n.nodeAt(e.map[y+b]).type==u.header_cell;p.push(w?f||(f=u.header_cell.createAndFill()):c||(c=u.cell.createAndFill()))}const m=u.row.create(null,ce.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 AE(t,e,n,r,o,s,a,l){if(a==0||a==e.height)return!1;let u=!1;for(let c=o;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 OE(t,e,n,r,o,s,a,l){if(a==0||a==e.width)return!1;let u=!1;for(let c=o;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,sa(m.attrs,a-g,m.attrs.colspan-(a-g))),t.insert(b+m.nodeSize,m.type.createAndFill(sa(m.attrs,0,a-g))),c+=m.attrs.rowspan-1}}return u}function ME(t,e,n,r,o){let s=n?t.doc.nodeAt(n-1):t.doc;if(!s)throw new Error("No table found");let a=rn.get(s);const{top:l,left:u}=r,c=u+o.width,f=l+o.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=rn.get(s),m=p.mapping.maps.length}cG(p,a,s,n,c,f,m)&&g(),AE(p,a,s,n,u,c,l,m)&&g(),AE(p,a,s,n,u,c,f,m)&&g(),OE(p,a,s,n,l,f,u,m)&&g(),OE(p,a,s,n,l,f,c,m)&&g();for(let b=l;b<f;b++){const y=a.positionAt(b,u,s),w=a.positionAt(b,c,s);p.replace(p.mapping.slice(m).map(y+n),p.mapping.slice(m).map(w+n),new Ce(o.rows[b-l],0,0))}g(),p.setSelection(new Ft(p.doc.resolve(n+a.positionAt(l,u,s)),p.doc.resolve(n+a.positionAt(f-1,c-1,s)))),e(p)}var dG=Lm({ArrowLeft:Rp("horiz",-1),ArrowRight:Rp("horiz",1),ArrowUp:Rp("vert",-1),ArrowDown:Rp("vert",1),"Shift-ArrowLeft":Lp("horiz",-1),"Shift-ArrowRight":Lp("horiz",1),"Shift-ArrowUp":Lp("vert",-1),"Shift-ArrowDown":Lp("vert",1),Backspace:Bp,"Mod-Backspace":Bp,Delete:Bp,"Mod-Delete":Bp});function Ip(t,e,n){return n.eq(t.selection)?!1:(e&&e(t.tr.setSelection(n).scrollIntoView()),!0)}function Rp(t,e){return(n,r,o)=>{if(!o)return!1;const s=n.selection;if(s instanceof Ft)return Ip(n,r,Ve.near(s.$headCell,e));if(t!="horiz"&&!s.empty)return!1;const a=BE(o,t,e);if(a==null)return!1;if(t=="horiz")return Ip(n,r,Ve.near(n.doc.resolve(s.head+e),e));{const l=n.doc.resolve(a),u=bE(l,t,e);let c;return u?c=Ve.near(u,1):e<0?c=Ve.near(n.doc.resolve(l.before(-1)),-1):c=Ve.near(n.doc.resolve(l.after(-1)),1),Ip(n,r,c)}}}function Lp(t,e){return(n,r,o)=>{if(!o)return!1;const s=n.selection;let a;if(s instanceof Ft)a=s;else{const u=BE(o,t,e);if(u==null)return!1;a=new Ft(n.doc.resolve(u))}const l=bE(a.$headCell,t,e);return l?Ip(n,r,new Ft(a.$anchorCell,l)):!1}}function fG(t,e){const n=t.state.doc,r=El(n.resolve(e));return r?(t.dispatch(t.state.tr.setSelection(new Ft(r))),!0):!1}function pG(t,e,n){if(!co(t.state))return!1;let r=aG(n);const o=t.state.selection;if(o instanceof Ft){r||(r={width:1,height:1,rows:[ce.from(pb($n(t.state.schema).cell,n))]});const s=o.$anchorCell.node(-1),a=o.$anchorCell.start(-1),l=rn.get(s).rectBetween(o.$anchorCell.pos-a,o.$headCell.pos-a);return r=uG(r,l.right-l.left,l.bottom-l.top),ME(t.state,t.dispatch,a,l,r),!0}else if(r){const s=Mp(t.state),a=s.start(-1);return ME(t.state,t.dispatch,a,rn.get(s.node(-1)).findCell(s.pos-a),r),!0}else return!1}function hG(t,e){var n;if(e.ctrlKey||e.metaKey)return;const r=IE(t,e.target);let o;if(e.shiftKey&&t.state.selection instanceof Ft)s(t.state.selection.$anchorCell,e),e.preventDefault();else if(e.shiftKey&&r&&(o=El(t.state.selection.$anchor))!=null&&((n=hb(t,e))==null?void 0:n.pos)!=o.pos)s(o,e),e.preventDefault();else if(!r)return;function s(u,c){let f=hb(t,c);const p=ls.getState(t.state)==null;if(!f||!fb(u,f))if(p)f=u;else return;const m=new Ft(u,f);if(p||!t.state.selection.eq(m)){const g=t.state.tr.setSelection(m);p&&g.setMeta(ls,u.pos),t.dispatch(g)}}function a(){t.root.removeEventListener("mouseup",a),t.root.removeEventListener("dragstart",a),t.root.removeEventListener("mousemove",l),ls.getState(t.state)!=null&&t.dispatch(t.state.tr.setMeta(ls,-1))}function l(u){const c=u,f=ls.getState(t.state);let p;if(f!=null)p=t.state.doc.resolve(f);else if(IE(t,c.target)!=r&&(p=hb(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 BE(t,e,n){if(!(t.state.selection instanceof Be))return null;const{$head:r}=t.state.selection;for(let o=r.depth-1;o>=0;o--){const s=r.node(o);if((n<0?r.index(o):r.indexAfter(o))!=(n<0?0:s.childCount))return null;if(s.type.spec.tableRole=="cell"||s.type.spec.tableRole=="header_cell"){const l=r.before(o),u=e=="vert"?n>0?"down":"up":n>0?"right":"left";return t.endOfTextblock(u)?l:null}}return null}function IE(t,e){for(;e&&e!=t.dom;e=e.parentNode)if(e.nodeName=="TD"||e.nodeName=="TH")return e;return null}function hb(t,e){const n=t.posAtCoords({left:e.clientX,top:e.clientY});return n&&n?El(t.state.doc.resolve(n.pos)):null}var mG=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")),mb(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,mb(e,this.colgroup,this.table,this.defaultCellMinWidth),!0)}ignoreMutation(e){return e.type=="attributes"&&(e.target==this.table||this.colgroup.contains(e.target))}};function mb(t,e,n,r,o,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 y=0;y<g;y++,m++){const w=o==m?s:b&&b[y],x=w?w+"px":"";if(l+=w||r,w||(u=!1),c)c.style.width!=x&&(c.style.width=x),c=c.nextSibling;else{const S=document.createElement("col");S.style.width=x,e.appendChild(S)}}}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 yr=new kt("tableColumnResizing");function gG({handleWidth:t=5,cellMinWidth:e=25,defaultCellMinWidth:n=100,View:r=mG,lastColumnResizable:o=!0}={}){const s=new tt({key:yr,state:{init(a,l){var u,c;const f=(c=(u=s.spec)==null?void 0:u.props)==null?void 0:c.nodeViews,p=$n(l.schema).table.name;return r&&f&&(f[p]=(m,g)=>new r(m,n,g)),new bG(-1,!1)},apply(a,l){return l.apply(a)}},props:{attributes:a=>{const l=yr.getState(a);return l&&l.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(a,l)=>{vG(a,l,t,o)},mouseleave:a=>{yG(a)},mousedown:(a,l)=>{wG(a,l,e,n)}},decorations:a=>{const l=yr.getState(a);if(l&&l.activeHandle>-1)return SG(a,l.activeHandle)},nodeViews:{}}});return s}var bG=class Hh{constructor(e,n){this.activeHandle=e,this.dragging=n}apply(e){const n=this,r=e.getMeta(yr);if(r&&r.setHandle!=null)return new Hh(r.setHandle,!1);if(r&&r.setDragging!==void 0)return new Hh(n.activeHandle,r.setDragging);if(n.activeHandle>-1&&e.docChanged){let o=e.mapping.map(n.activeHandle,-1);return db(e.doc.resolve(o))||(o=-1),new Hh(o,n.dragging)}return n}};function vG(t,e,n,r){if(!t.editable)return;const o=yr.getState(t.state);if(o&&!o.dragging){const s=CG(e.target);let a=-1;if(s){const{left:l,right:u}=s.getBoundingClientRect();e.clientX-l<=n?a=RE(t,e,"left",n):u-e.clientX<=n&&(a=RE(t,e,"right",n))}if(a!=o.activeHandle){if(!r&&a!==-1){const l=t.state.doc.resolve(a),u=l.node(-1),c=rn.get(u),f=l.start(-1);if(c.colCount(l.pos-f)+l.nodeAfter.attrs.colspan-1==c.width-1)return}DE(t,a)}}}function yG(t){if(!t.editable)return;const e=yr.getState(t.state);e&&e.activeHandle>-1&&!e.dragging&&DE(t,-1)}function wG(t,e,n,r){var o;if(!t.editable)return!1;const s=(o=t.dom.ownerDocument.defaultView)!=null?o:window,a=yr.getState(t.state);if(!a||a.activeHandle==-1||a.dragging)return!1;const l=t.state.doc.nodeAt(a.activeHandle),u=xG(t,a.activeHandle,l.attrs);t.dispatch(t.state.tr.setMeta(yr,{setDragging:{startX:e.clientX,startWidth:u}}));function c(p){s.removeEventListener("mouseup",c),s.removeEventListener("mousemove",f);const m=yr.getState(t.state);m!=null&&m.dragging&&(EG(t,m.activeHandle,LE(m.dragging,p,n)),t.dispatch(t.state.tr.setMeta(yr,{setDragging:null})))}function f(p){if(!p.which)return c(p);const m=yr.getState(t.state);if(m&&m.dragging){const g=LE(m.dragging,p,n);PE(t,m.activeHandle,g,r)}}return PE(t,a.activeHandle,u,r),s.addEventListener("mouseup",c),s.addEventListener("mousemove",f),e.preventDefault(),!0}function xG(t,e,{colspan:n,colwidth:r}){const o=r&&r[r.length-1];if(o)return o;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 CG(t){for(;t&&t.nodeName!="TD"&&t.nodeName!="TH";)t=t.classList&&t.classList.contains("ProseMirror")?null:t.parentNode;return t}function RE(t,e,n,r){const o=n=="right"?-r:r,s=t.posAtCoords({left:e.clientX+o,top:e.clientY});if(!s)return-1;const{pos:a}=s,l=El(t.state.doc.resolve(a));if(!l)return-1;if(n=="right")return l.pos;const u=rn.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 LE(t,e,n){const r=e.clientX-t.startX;return Math.max(n,t.startWidth+r)}function DE(t,e){t.dispatch(t.state.tr.setMeta(yr,{setHandle:e}))}function EG(t,e,n){const r=t.state.doc.resolve(e),o=r.node(-1),s=rn.get(o),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=o.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():kG(m.colspan);b[g]=n,u.setNodeMarkup(a+p,null,{...m,colwidth:b})}u.docChanged&&t.dispatch(u)}function PE(t,e,n,r){const o=t.state.doc.resolve(e),s=o.node(-1),a=o.start(-1),l=rn.get(s).colCount(o.pos-a)+o.nodeAfter.attrs.colspan-1;let u=t.domAtPos(o.start(-1)).node;for(;u&&u.nodeName!="TABLE";)u=u.parentNode;u&&mb(s,u.firstChild,u,r,l,n)}function kG(t){return Array(t).fill(0)}function SG(t,e){var n;const r=[],o=t.doc.resolve(e),s=o.node(-1);if(!s)return mt.empty;const a=rn.get(s),l=o.start(-1),u=a.colCount(o.pos-l)+o.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=yr.getState(t))!=null&&n.dragging&&r.push(Wt.node(l+p,l+p+s.nodeAt(p).nodeSize,{class:"column-resize-dragging"})),r.push(Wt.widget(m,g))}}return mt.create(t.doc,r)}function _G({allowTableNodeSelection:t=!1}={}){return new tt({key:ls,state:{init(){return null},apply(e,n){const r=e.getMeta(ls);if(r!=null)return r==-1?null:r;if(n==null||!e.docChanged)return n;const{deleted:o,pos:s}=e.mapping.mapResult(n);return o?null:s}},props:{decorations:$K,handleDOMEvents:{mousedown:hG},createSelectionBetween(e){return ls.getState(e.state)!=null?e.state.selection:null},handleTripleClick:fG,handleKeyDown:dG,handlePaste:pG},appendTransaction(e,n,r){return UK(r,wE(r,n),t)}})}const TG=(t,e,n)=>{if(!t.doc)return t;const r=t.doc.nodeAt(e);if(!r||n===r.attrs.backgroundColor)return t;const o={...r.attrs,backgroundColor:n};return t.setNodeMarkup(e,r.type,o,r.marks)},AG=(t,e,n)=>{const{doc:r,selection:o}=t;return!r||!o||!(o instanceof Ft)||o.forEachCell((s,a)=>{t=TG(t,a,n)}),t},VE=(t,e)=>({tr:n,state:r,dispatch:o})=>{const{selection:s}=r;return n=n.setSelection(s),n=AG(n,e,t),n.docChanged?(o==null||o(n),!0):!1},OG=Qe.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=>VE(t,this.options),unsetTableCellBackground:()=>VE("",this.options)}}}),MG=Bt.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",bt(this.options.HTMLAttributes,t),0]}}),BG=Bt.create({name:"tableRow",addOptions(){return{HTMLAttributes:{}}},content:"(tableCell | tableHeader)*",tableRole:"row",parseHTML(){return[{tag:"tr"}]},renderHTML({HTMLAttributes:t}){return["tr",bt(this.options.HTMLAttributes,t),0]}}),IG=Bt.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",bt(this.options.HTMLAttributes,t),0]}});function gb(t,e){return e?["width",`${Math.max(e,t)}px`]:["min-width",`${t}px`]}function FE(t,e,n,r,o,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 y=0;y<g;y+=1,m+=1){const w=o===m?s:b&&b[y],x=w?`${w}px`:"";if(l+=w||r,w||(u=!1),c){if(c.style.width!==x){const[S,E]=gb(r,w);c.style.setProperty(S,E)}c=c.nextSibling}else{const S=document.createElement("col"),[E,C]=gb(r,w);S.style.setProperty(E,C),e.appendChild(S)}}}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 RG{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")),FE(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,FE(e,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(e){return e.type==="attributes"&&(e.target===this.table||this.colgroup.contains(e.target))}}function LG(t,e,n,r){let o=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 y=0;y<g;y+=1,m+=1){const w=n===m?r:b&&b[y];o+=w||e,w||(s=!1);const[x,S]=gb(e,w);a.push(["col",{style:`${x}: ${S}`}])}}const u=s?`${o}px`:"",c=s?"":`${o}px`;return{colgroup:["colgroup",{},...a],tableWidth:u,tableMinWidth:c}}function $E(t,e){return t.createAndFill()}function DG(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 PG(t,e,n,r,o){const s=DG(t),a=[],l=[];for(let c=0;c<n;c+=1){const f=$E(s.cell);if(f&&l.push(f),r){const p=$E(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 VG(t){return t instanceof Ft}const Dp=({editor:t})=>{const{selection:e}=t.state;if(!VG(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},FG=Bt.create({name:"table",addOptions(){return{HTMLAttributes:{},resizable:!1,handleWidth:5,cellMinWidth:25,View:RG,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:o}=LG(t,this.options.cellMinWidth);return["table",bt(this.options.HTMLAttributes,e,{style:r?`width: ${r}`:`min-width: ${o}`}),n,["tbody",0]]},addCommands(){return{insertTable:({rows:t=3,cols:e=3,withHeaderRow:n=!0}={})=>({tr:r,dispatch:o,editor:s})=>{const a=PG(s.schema,t,e,n);if(o){const l=r.selection.from+1;r.replaceSelectionWith(a).scrollIntoView().setSelection(Be.near(r.doc.resolve(l)))}return!0},addColumnBefore:()=>({state:t,dispatch:e})=>qK(t,e),addColumnAfter:()=>({state:t,dispatch:e})=>KK(t,e),deleteColumn:()=>({state:t,dispatch:e})=>XK(t,e),addRowBefore:()=>({state:t,dispatch:e})=>JK(t,e),addRowAfter:()=>({state:t,dispatch:e})=>ZK(t,e),deleteRow:()=>({state:t,dispatch:e})=>NK(t,e),deleteTable:()=>({state:t,dispatch:e})=>sG(t,e),mergeCells:()=>({state:t,dispatch:e})=>kE(t,e),splitCell:()=>({state:t,dispatch:e})=>SE(t,e),toggleHeaderColumn:()=>({state:t,dispatch:e})=>lc("column")(t,e),toggleHeaderRow:()=>({state:t,dispatch:e})=>lc("row")(t,e),toggleHeaderCell:()=>({state:t,dispatch:e})=>oG(t,e),mergeOrSplit:()=>({state:t,dispatch:e})=>kE(t,e)?!0:SE(t,e),setCellAttribute:(t,e)=>({state:n,dispatch:r})=>nG(t,e)(n,r),goToNextCell:()=>({state:t,dispatch:e})=>TE(1)(t,e),goToPreviousCell:()=>({state:t,dispatch:e})=>TE(-1)(t,e),fixTables:()=>({state:t,dispatch:e})=>(e&&wE(t),!0),setCellSelection:t=>({tr:e,dispatch:n})=>{if(n){const r=Ft.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:Dp,"Mod-Backspace":Dp,Delete:Dp,"Mod-Delete":Dp}},addProseMirrorPlugins(){return[...this.options.resizable&&this.editor.isEditable?[gG({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,defaultCellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[],_G({allowTableNodeSelection:this.options.allowTableNodeSelection})]},extendNodeSchema(t){const e={name:t.name,options:t.options,storage:t.storage};return{tableRole:at(Re(t,"tableRole",e))}}}),$G=["disabled"],zG={"content-class":"table-grid-size-editor","content-style":"padding:0"},HG={class:"flex flex-col flex-wrap gap-1 justify-between"},UG=["onMouseover","onMousedown"],WG={class:"text-center text-sm text-zinc-600 mt-2"},jG=i.defineComponent({__name:"CreateTablePopover",props:{disabled:{type:Boolean,default:!1}},emits:["create-table"],setup(t,{emit:e}){const n=e,r=i.ref(!1),o=i.ref(!0),s=i.reactive({rows:Mu()?Od:Ad,cols:Mu()?Od:Ad}),a=i.reactive({rows:Md,cols:Md});function l(f,p){f===s.rows&&(s.rows=Math.min(f+1,Od)),p===s.cols&&(s.cols=Math.min(p+1,Od)),a.rows=f,a.cols=p}function u(f,p){n("create-table",{rows:f,cols:p,withHeaderRow:i.unref(o)}),c()}function c(){r.value=!1,o.value=!1,s.rows=Ad,s.cols=Ad,a.rows=Md,a.cols=Md}return(f,p)=>(i.openBlock(),i.createBlock(i.unref(al),null,{default:i.withCtx(()=>[i.createVNode(i.unref(cl),{"as-child":""},{default:i.withCtx(()=>[i.createElementVNode("button",{disabled:t.disabled,class:"m-0 p-0"},[i.renderSlot(f.$slots,"trigger")],8,$G)]),_:3}),i.createVNode(i.unref(ll),{class:"w-full",align:"start",side:"bottom"},{default:i.withCtx(()=>[i.createElementVNode("div",zG,[i.createElementVNode("div",HG,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(s.rows,m=>(i.openBlock(),i.createElementBlock("div",{key:"r"+m,class:"flex gap-1"},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(s.cols,g=>(i.openBlock(),i.createElementBlock("div",{key:"c"+g,class:i.normalizeClass([[g<=a.cols&&m<=a.rows&&"bg-ed-foreground border-ed-border","cursor-pointer"],"pa-1"]),onMouseover:b=>l(m,g),onMousedown:b=>u(m,g)},p[0]||(p[0]=[i.createElementVNode("div",{class:"w-4 h-4 p-1 border box-border"},null,-1)]),42,UG))),128))]))),128))]),i.createElementVNode("div",WG,i.toDisplayString(a.rows)+" x "+i.toDisplayString(a.cols),1)])]),_:1})]),_:3}))}}),qG={style:{display:"flex"}},KG=i.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.disabled||e.editor.chain().focus().insertTable({...r,withHeaderRow:!1}).run()}return(r,o)=>(i.openBlock(),i.createBlock(jG,{disabled:r.disabled,onCreateTable:n},{trigger:i.withCtx(()=>[i.createElementVNode("div",qG,[i.createVNode(je,{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"]))}}),bb=FG.extend({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:KG,componentProps:{disabled:e.isActive("table")||!1,icon:"Table",tooltip:n("editor.table.tooltip")}})}},addExtensions(){return[BG.configure(this.options.tableRow),MG.configure(this.options.tableHeader),IG.configure(this.options.tableCell),OG.configure(this.options.tableCellBackground)]}}),GG={class:"flex items-center gap-2 px-2"},XG=i.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}=St(),r=i.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()}]),o=i.computed(()=>r.value.filter(s=>s.isActive()).pop()??{label:n("editor.modify")});return(s,a)=>{var l;return i.openBlock(),i.createBlock(Qs,{title:(l=o.value)==null?void 0:l.label,"side-offset":5},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.value,(u,c)=>{var f;return i.openBlock(),i.createBlock(i.unref(bl),{key:c,class:"cursor-pointer",checked:((f=u.isActive)==null?void 0:f.call(u))||!1,onClick:u.action},{default:i.withCtx(()=>[i.createElementVNode("div",GG,[i.createVNode(i.unref(jt),{name:u.iconName,class:"h3 w-3"},null,8,["name"]),i.createElementVNode("span",null,i.toDisplayString(u.label),1)])]),_:2},1032,["checked","onClick"])}),128))]),_:1},8,["title"])}}}),YG=Qe.create({name:"text-bubble",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),toolbar:!1,button:()=>({component:XG,componentProps:{}})}}}),JG=[{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}년"}],ZG=t=>{const e=[...t||[],...JG.map(n=>n.pattern)].join("|");return new RegExp(e,"gu")},QG=Qe.create({name:"time-highlighter",addOptions(){return{additionalTimeWords:[]}},addStorage(){return{cachedRegex:null,cachedAdditionalWords:null}},addProseMirrorPlugins(){return[new tt({props:{decorations:t=>{const e=[];return(this.storage.cachedAdditionalWords!==this.options.additionalTimeWords||!this.storage.cachedRegex)&&(this.storage.cachedAdditionalWords=this.options.additionalTimeWords,this.storage.cachedRegex=ZG(this.options.additionalTimeWords)),t.doc.descendants((n,r)=>{if(!n.isText)return;let o;const s=this.storage.cachedRegex;for(;o=s.exec(n.text||"");){const a=r+o.index,l=a+o[0].length;e.push(Wt.inline(a,l,{class:"time-highlight"}))}}),mt.create(t.doc,e)}}})]}}),NG=Qe.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 o=t.tr.setSelection(Be.create(t.doc,r));return e&&e(o.scrollIntoView()),n&&n.focus(),!0}}}}),eX=Qe.create({name:"clipboard",addCommands(){return{copyContent:()=>({editor:t,state:e})=>{const{from:n,to:r}=e.selection;return n===r?!1:((async()=>{const o=e.doc.slice(n,r),a=vo.fromSchema(t.schema).serializeFragment(o.content),l=document.createElement("div");l.appendChild(a);const u=l.innerHTML,c=e.doc.textBetween(n,r,`
|