PluginProbe
FluentCommunity – Ultra-Fast High-Performance Social Network, Community, LMS & Online Courses / 2.11.0
FluentCommunity – Ultra-Fast High-Performance Social Network, Community, LMS & Online Courses v2.11.0
2.11.0 2.10.0 2.10.01 2.9.1 2.9.0 2.8.1 2.8.0 2.7.7 2.7.5 2.7.0 2.6.01 2.6.0 2.5.0 2.4.01 trunk 1.0.90 1.0.91 1.0.92 1.0.93 1.0.94 1.0.95 1.0.96 1.0.97 1.0.98 1.0.99 All 78 releases
← All changes | assets/index2.js +14 -14 2.7.02.11.0 View file →
@@ -1,20 +1,20 @@
1 -var W=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)};var h=(t,e,r)=>(W(t,e,"read from private field"),r?r.call(t):e.get(t)),C=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},x=(t,e,r,u)=>(W(t,e,"write to private field"),u?u.call(t,r):e.set(t,r),r);import{d as K,i as _,a as X}from"./index6.js?ver=2.7.0";import{bT as Y,b3 as Z,ba as j,b9 as f,b6 as g,b5 as ee,bU as G,b7 as Q,b4 as O}from"./vendor.js?ver=2.7.0";import{t as te,h as se,a as re,b as ne,q as ae,d as ue,f as oe,o as le,i as de}from"./todoList.js?ver=2.7.0";import{L as w,i as me,j as q,q as pe,k as he,n as ce,T as ie,o as ye,J as Ie,p as be,Q as xe,t as ve}from"./milkdown.js?ver=2.7.0";import"./vue.js?ver=2.7.0";import"./dayjs.js?ver=2.7.0";import"./lodash.js?ver=2.7.0";function U(t){const{$from:e,$to:r}=t.selection,{pos:u}=e,{pos:d}=r;return t=t.deleteRange(u-e.node().content.size,d),t}function we(t,e,r=null){const{from:u,to:d}=t.selection;return t.setBlockType(u,d,e,r)}function Me(t,e,r=null){const{$from:u,$to:d}=t.selection,o=u.blockRange(d),c=o&&Y(o,e,r);return c?t.wrap(o,c):null}function ke(t,e,r=null){const u=e.createAndFill(r);return u?t.replaceSelectionWith(u):null}function D(t,e=null){return(r,u)=>{if(u){const d=we(U(r.tr),t,e);u(d.scrollIntoView())}return!0}}function P(t,e=null){return(r,u)=>{const d=Me(U(r.tr),t,e);return d?(u&&u(d.scrollIntoView()),!0):!1}}function V(t,e=null){return(r,u)=>{const d=ke(U(r.tr),t,e);return d?(u&&u(d.scrollIntoView()),!0):!1}}var L,A;class Le{constructor(){C(this,L,void 0);C(this,A,void 0);x(this,L,[]),this.clear=()=>(x(this,L,[]),this),x(this,A,e=>{const r={group:e,addItem:(u,d)=>{const o={key:u,...d};return e.items.push(o),r},clear:()=>(e.items=[],r)};return r}),this.addGroup=(e,r)=>{const d={key:e,label:r,items:[]};return h(this,L).push(d),h(this,A).call(this,d)},this.getGroup=e=>{const r=h(this,L).find(u=>u.key===e);if(!r)throw new Error(`Group with key ${e} not found`);return h(this,A).call(this,r)},this.build=()=>h(this,L)}}L=new WeakMap,A=new WeakMap;function b(t){return window.fluentComAdmin.i18n[t]||t}typeof crypto<"u"&&!crypto.randomUUID&&(crypto.randomUUID=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){const e=Math.random()*16|0;return(t==="x"?e:e&3|8).toString(16)})});function $e(t,e){var o,c,y,M,H,R,E,S,k,B;const r=new Le;r.addGroup("text",(e==null?void 0:e.slashMenuTextGroupLabel)??b("Text")).addItem("text",{label:(e==null?void 0:e.slashMenuTextGroupLabel)??b("Text"),icon:((o=e==null?void 0:e.slashMenuTextIcon)==null?void 0:o.call(e))??te,onRun:a=>{const l=a.get(w),{dispatch:p,state:n}=l;D(me.type(a))(n,p)}}).addItem("h2",{label:(e==null?void 0:e.slashMenuH2Label)??b("Heading 2"),icon:((c=e==null?void 0:e.slashMenuH2Icon)==null?void 0:c.call(e))??se,onRun:a=>{const l=a.get(w),{dispatch:p,state:n}=l;D(q.type(a),{level:2})(n,p)}}).addItem("h3",{label:(e==null?void 0:e.slashMenuH3Label)??b("Heading 3"),icon:((y=e==null?void 0:e.slashMenuH3Icon)==null?void 0:y.call(e))??re,onRun:a=>{const l=a.get(w),{dispatch:p,state:n}=l;D(q.type(a),{level:3})(n,p)}}).addItem("h4",{label:(e==null?void 0:e.slashMenuH4Label)??b("Heading 4"),icon:((M=e==null?void 0:e.slashMenuH4Icon)==null?void 0:M.call(e))??ne,onRun:a=>{const l=a.get(w),{dispatch:p,state:n}=l;D(q.type(a),{level:4})(n,p)}}).addItem("quote",{label:(e==null?void 0:e.slashMenuQuoteLabel)??b("Quote"),icon:((H=e==null?void 0:e.slashMenuQuoteIcon)==null?void 0:H.call(e))??ae,onRun:a=>{const l=a.get(w),{dispatch:p,state:n}=l;P(pe.type(a))(n,p)}}).addItem("code",{label:(e==null?void 0:e.slashMenuCodeBlockLabel)??b("Code"),icon:((R=e==null?void 0:e.slashMenuCodeBlockIcon)==null?void 0:R.call(e))??ue,onRun:a=>{const l=a.get(w),{dispatch:p,state:n}=l;V(he.type(a))(n,p)}}),r.addGroup("list",(e==null?void 0:e.slashMenuListGroupLabel)??b("List")).addItem("bullet-list",{label:(e==null?void 0:e.slashMenuBulletListLabel)??b("Bullet List"),icon:((E=e==null?void 0:e.slashMenuBulletListIcon)==null?void 0:E.call(e))??oe,onRun:a=>{const l=a.get(w),{dispatch:p,state:n}=l;P(ce.type(a))(n,p)}}).addItem("ordered-list",{label:(e==null?void 0:e.slashMenuOrderedListLabel)??b("Ordered List"),icon:((S=e==null?void 0:e.slashMenuOrderedListIcon)==null?void 0:S.call(e))??le,onRun:a=>{const l=a.get(w),{dispatch:p,state:n}=l;P(ie.type(a))(n,p)}}),(e==null?void 0:e.hasImageBlock)!==!1&&r.addGroup("media",(e==null?void 0:e.slashMenuMediaGroupLabel)??b("Media")).addItem("image",{label:(e==null?void 0:e.slashMenuImageLabel)??b("Image"),icon:((k=e==null?void 0:e.slashMenuImageIcon)==null?void 0:k.call(e))??de,onRun:a=>{if(e!=null&&e.canAddImage&&!e.canAddImage())return;const l=a.get(w),{dispatch:p,state:n}=l;V(ye.type(a))(n,p)}}),(B=e==null?void 0:e.buildMenu)==null||B.call(e,r);let u=r.build();t&&(u=u.map(a=>{const l=a.items.filter(p=>p.label.toLowerCase().includes(t.toLowerCase()));return{...a,items:l}}).filter(a=>a.items.length>0));const d=u.flatMap(a=>a.items);return d.forEach((a,l)=>{Object.assign(a,{index:l})}),u.reduce((a,l)=>{const p=a+l.items.length;return Object.assign(l,{range:[a,p]}),p},0),{groups:u,size:d.length}}const z=({show:t,hide:e,ctx:r,filter:u,config:d})=>{const{groups:o,size:c}=j(()=>$e(u,d),[u]),y=f(),[M,H]=g(0),R=j(()=>y.current.getRootNode(),[y]),E=ee({x:-999,y:-999}),S=G(n=>{const s=E.current;if(!s)return;const{x:m,y:I}=n;s.x=m,s.y=I},[]);Q(()=>{c===0&&t&&(e==null||e())},[c,t]);const k=G((n,s)=>{H(m=>{const I=typeof n=="function"?n(m):n;return s==null||s(I),I})},[]),B=G(n=>{const s=y.current.querySelector(`[data-index="${n}"]`),m=y.current.querySelector(".menu-groups");!s||!m||(m.scrollTop=s.offsetTop-m.offsetTop)},[]),a=G(n=>{const s=o.flatMap(m=>m.items).at(n);s&&r&&s.onRun(r),e==null||e()},[o]),l=G(n=>{if(n.key==="Escape"){n.preventDefault(),e==null||e();return}if(n.key==="ArrowDown")return n.preventDefault(),k(s=>s<c-1?s+1:s,B);if(n.key==="ArrowUp")return n.preventDefault(),k(s=>s<=0?s:s-1,B);if(n.key==="ArrowLeft")return n.preventDefault(),k(s=>{const m=o.find(T=>T.range[0]<=s&&T.range[1]>s);if(!m)return s;const I=o[o.indexOf(m)-1];return I?I.range[1]-1:s},B);if(n.key==="ArrowRight")return n.preventDefault(),k(s=>{const m=o.find(T=>T.range[0]<=s&&T.range[1]>s);if(!m)return s;const I=o[o.indexOf(m)+1];return I?I.range[0]:s},B);n.key==="Enter"&&(n.preventDefault(),a(M))},[e,o,M]),p=G(n=>s=>{const m=E.current;if(!m)return;const{x:I,y:T}=s;I===m.x&&T===m.y||k(n)},[]);return Q(()=>(t?R.addEventListener("keydown",l,{capture:!0}):R.removeEventListener("keydown",l,{capture:!0}),()=>{R.removeEventListener("keydown",l,{capture:!0})}),[t,l]),O`
2 - <host onmousedown=${n=>n.preventDefault()}>
1 +var j=(r,e,n)=>{if(!e.has(r))throw TypeError("Cannot "+n)};var p=(r,e,n)=>(j(r,e,"read from private field"),n?n.call(r):e.get(r)),R=(r,e,n)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,n)},v=(r,e,n,u)=>(j(r,e,"write to private field"),u?u.call(r,n):e.set(r,n),n);import{d as K,i as _,a as X}from"./index6.js?ver=2.11.0";import{bT as Y,az as Z,b3 as f,ba as V,b9 as g,b6 as ee,b5 as te,bU as C,b7 as z,b4 as O}from"./vendor.js?ver=2.11.0";import{t as se,h as re,a as ne,b as ae,q as ue,d as le,f as oe,g as de,o as me,i as pe}from"./todoList.js?ver=2.11.0";import{L as b,i as he,j as q,q as ce,k as ie,F as ye,n as Ie,T as ve,o as be,J as we,p as xe,Q as Me,t as Le}from"./milkdown.js?ver=2.11.0";import"./vue.js?ver=2.11.0";import"./dayjs.js?ver=2.11.0";import"./fcom-utils.js?ver=2.11.0";function W(r){const{$from:e,$to:n}=r.selection,{pos:u}=e,{pos:m}=n;return r=r.deleteRange(u-e.node().content.size,m),r}function ke(r,e,n=null){const{from:u,to:m}=r.selection;return r.setBlockType(u,m,e,n)}function $e(r,e,n=null){const{$from:u,$to:m}=r.selection,o=u.blockRange(m),h=o&&Y(o,e,n);return h?r.wrap(o,h):null}function Te(r,e,n=null){const u=e.createAndFill(n);return u?r.replaceSelectionWith(u):null}function D(r,e=null){return(n,u)=>{if(u){const m=ke(W(n.tr),r,e);u(m.scrollIntoView())}return!0}}function P(r,e=null){return(n,u)=>{const m=$e(W(n.tr),r,e);return m?(u&&u(m.scrollIntoView()),!0):!1}}function U(r,e=null){return(n,u)=>{const m=Te(W(n.tr),r,e);return m?(u&&u(m.scrollIntoView()),!0):!1}}var L,G;class Be{constructor(){R(this,L,void 0);R(this,G,void 0);v(this,L,[]),this.clear=()=>(v(this,L,[]),this),v(this,G,e=>{const n={group:e,addItem:(u,m)=>{const o={key:u,...m};return e.items.push(o),n},clear:()=>(e.items=[],n)};return n}),this.addGroup=(e,n)=>{const m={key:e,label:n,items:[]};return p(this,L).push(m),p(this,G).call(this,m)},this.getGroup=e=>{const n=p(this,L).find(u=>u.key===e);if(!n)throw new Error(`Group with key ${e} not found`);return p(this,G).call(this,n)},this.build=()=>p(this,L)}}L=new WeakMap,G=new WeakMap;function c(r){return window.fluentComAdmin.i18n[r]||r}typeof crypto<"u"&&!crypto.randomUUID&&(crypto.randomUUID=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(r){const e=Math.random()*16|0;return(r==="x"?e:e&3|8).toString(16)})});function Re(r,e){var o,h,y,x,H,B,A,S,M,$,E;const n=new Be;n.addGroup("text",(e==null?void 0:e.slashMenuTextGroupLabel)??c("Text")).addItem("text",{label:(e==null?void 0:e.slashMenuTextGroupLabel)??c("Text"),icon:((o=e==null?void 0:e.slashMenuTextIcon)==null?void 0:o.call(e))??se,onRun:a=>{const d=a.get(b),{dispatch:s,state:t}=d;D(he.type(a))(t,s)}}).addItem("h2",{label:(e==null?void 0:e.slashMenuH2Label)??c("Heading 2"),icon:((h=e==null?void 0:e.slashMenuH2Icon)==null?void 0:h.call(e))??re,onRun:a=>{const d=a.get(b),{dispatch:s,state:t}=d;D(q.type(a),{level:2})(t,s)}}).addItem("h3",{label:(e==null?void 0:e.slashMenuH3Label)??c("Heading 3"),icon:((y=e==null?void 0:e.slashMenuH3Icon)==null?void 0:y.call(e))??ne,onRun:a=>{const d=a.get(b),{dispatch:s,state:t}=d;D(q.type(a),{level:3})(t,s)}}).addItem("h4",{label:(e==null?void 0:e.slashMenuH4Label)??c("Heading 4"),icon:((x=e==null?void 0:e.slashMenuH4Icon)==null?void 0:x.call(e))??ae,onRun:a=>{const d=a.get(b),{dispatch:s,state:t}=d;D(q.type(a),{level:4})(t,s)}}).addItem("quote",{label:(e==null?void 0:e.slashMenuQuoteLabel)??c("Quote"),icon:((H=e==null?void 0:e.slashMenuQuoteIcon)==null?void 0:H.call(e))??ue,onRun:a=>{const d=a.get(b),{dispatch:s,state:t}=d;P(ce.type(a))(t,s)}}).addItem("code",{label:(e==null?void 0:e.slashMenuCodeBlockLabel)??c("Code"),icon:((B=e==null?void 0:e.slashMenuCodeBlockIcon)==null?void 0:B.call(e))??le,onRun:a=>{const d=a.get(b),{dispatch:s,state:t}=d;U(ie.type(a))(t,s)}}).addItem("divider",{label:(e==null?void 0:e.slashMenuDividerLabel)??c("Divider"),icon:((A=e==null?void 0:e.slashMenuDividerIcon)==null?void 0:A.call(e))??oe,onRun:a=>{const d=a.get(b);U(ye.type(a))(d.state,d.dispatch);const{state:s}=d,t=Z.near(s.doc.resolve(s.selection.to));d.dispatch(s.tr.setSelection(t).scrollIntoView()),d.focus()}}),n.addGroup("list",(e==null?void 0:e.slashMenuListGroupLabel)??c("List")).addItem("bullet-list",{label:(e==null?void 0:e.slashMenuBulletListLabel)??c("Bullet List"),icon:((S=e==null?void 0:e.slashMenuBulletListIcon)==null?void 0:S.call(e))??de,onRun:a=>{const d=a.get(b),{dispatch:s,state:t}=d;P(Ie.type(a))(t,s)}}).addItem("ordered-list",{label:(e==null?void 0:e.slashMenuOrderedListLabel)??c("Ordered List"),icon:((M=e==null?void 0:e.slashMenuOrderedListIcon)==null?void 0:M.call(e))??me,onRun:a=>{const d=a.get(b),{dispatch:s,state:t}=d;P(ve.type(a))(t,s)}}),(e==null?void 0:e.hasImageBlock)!==!1&&n.addGroup("media",(e==null?void 0:e.slashMenuMediaGroupLabel)??c("Media")).addItem("image",{label:(e==null?void 0:e.slashMenuImageLabel)??c("Image"),icon:(($=e==null?void 0:e.slashMenuImageIcon)==null?void 0:$.call(e))??pe,onRun:a=>{if(e!=null&&e.canAddImage&&!e.canAddImage())return;const d=a.get(b),{dispatch:s,state:t}=d;U(be.type(a))(t,s)}}),(E=e==null?void 0:e.buildMenu)==null||E.call(e,n);let u=n.build();r&&(u=u.map(a=>{const d=a.items.filter(s=>s.label.toLowerCase().includes(r.toLowerCase()));return{...a,items:d}}).filter(a=>a.items.length>0));const m=u.flatMap(a=>a.items);return m.forEach((a,d)=>{Object.assign(a,{index:d})}),u.reduce((a,d)=>{const s=a+d.items.length;return Object.assign(d,{range:[a,s]}),s},0),{groups:u,size:m.length}}const F=({show:r,hide:e,ctx:n,filter:u,config:m})=>{const{groups:o,size:h}=V(()=>Re(u,m),[u]),y=g(),[x,H]=ee(0),B=V(()=>y.current.getRootNode(),[y]),A=te({x:-999,y:-999}),S=C(s=>{const t=A.current;if(!t)return;const{x:l,y:I}=s;t.x=l,t.y=I},[]);z(()=>{h===0&&r&&(e==null||e())},[h,r]);const M=C((s,t)=>{H(l=>{const I=typeof s=="function"?s(l):s;return t==null||t(I),I})},[]),$=C(s=>{const t=y.current.querySelector(`[data-index="${s}"]`),l=y.current.querySelector(".menu-groups");!t||!l||(l.scrollTop=t.offsetTop-l.offsetTop)},[]),E=C(s=>{const t=o.flatMap(l=>l.items).at(s);t&&n&&t.onRun(n),e==null||e()},[o]),a=C(s=>{if(s.key==="Escape"){s.preventDefault(),e==null||e();return}if(s.key==="ArrowDown")return s.preventDefault(),M(t=>t<h-1?t+1:t,$);if(s.key==="ArrowUp")return s.preventDefault(),M(t=>t<=0?t:t-1,$);if(s.key==="ArrowLeft")return s.preventDefault(),M(t=>{const l=o.find(T=>T.range[0]<=t&&T.range[1]>t);if(!l)return t;const I=o[o.indexOf(l)-1];return I?I.range[1]-1:t},$);if(s.key==="ArrowRight")return s.preventDefault(),M(t=>{const l=o.find(T=>T.range[0]<=t&&T.range[1]>t);if(!l)return t;const I=o[o.indexOf(l)+1];return I?I.range[0]:t},$);s.key==="Enter"&&(s.preventDefault(),E(x))},[e,o,x]),d=C(s=>t=>{const l=A.current;if(!l)return;const{x:I,y:T}=t;I===l.x&&T===l.y||M(s)},[]);return z(()=>(r?B.addEventListener("keydown",a,{capture:!0}):B.removeEventListener("keydown",a,{capture:!0}),()=>{B.removeEventListener("keydown",a,{capture:!0})}),[r,a]),O`
2 + <host onmousedown=${s=>s.preventDefault()}>
3 3 <div class="menu-groups" onmousemove=${S}>
4 - ${o.map(n=>O`
5 - <div key=${n.key} class="menu-group">
4 + ${o.map(s=>O`
5 + <div key=${s.key} class="menu-group">
6 6 <ul>
7 - ${n.items.map(s=>O`<li
8 - key=${s.key}
9 - data-index=${s.index}
10 - class=${M===s.index?"hover":""}
11 - onmouseenter=${p(s.index)}
12 - onmousedown=${()=>{var m;(m=y.current.querySelector(`[data-index="${s.index}"]`))==null||m.classList.add("active")}}
13 - onmouseup=${()=>{var m;(m=y.current.querySelector(`[data-index="${s.index}"]`))==null||m.classList.remove("active"),a(s.index)}}
7 + ${s.items.map(t=>O`<li
8 + key=${t.key}
9 + data-index=${t.index}
10 + class=${x===t.index?"hover":""}
11 + onmouseenter=${d(t.index)}
12 + onmousedown=${()=>{var l;(l=y.current.querySelector(`[data-index="${t.index}"]`))==null||l.classList.add("active")}}
13 + onmouseup=${()=>{var l;(l=y.current.querySelector(`[data-index="${t.index}"]`))==null||l.classList.remove("active"),E(t.index)}}
14 14 >
15 - ${s.icon}
16 - <span>${s.label}</span>
15 + ${t.icon}
16 + <span>${t.label}</span>
17 17 </li>`)}
18 18 </ul>
19 19 </div>
20 20 `)}
@@ -19,5 +19,5 @@
19 19 </div>
20 20 `)}
21 21 </div>
22 22 </host>
23 - `};z.props={ctx:Object,config:Object,show:Boolean,filter:String,hide:Function};const F=Z(z),N=Ie("CREPE_MENU"),J=be({show:()=>{},hide:()=>{}},"menuAPICtx");K("milkdown-slash-menu",F);function Be(t,e){t.set(N.key,{view:r=>new Te(t,r,e)})}var i,v,$;class Te{constructor(e,r,u){C(this,i,void 0);C(this,v,void 0);C(this,$,void 0);x(this,$,null),this.update=o=>{h(this,v).update(o)},this.show=o=>{x(this,$,o),h(this,i).filter="",h(this,v).show()},this.hide=()=>{x(this,$,null),h(this,v).hide()},this.destroy=()=>{h(this,v).destroy(),h(this,i).remove()},x(this,i,new F),h(this,i).hide=this.hide,h(this,i).ctx=e,h(this,i).config=u;const d=this;x(this,v,new xe({content:h(this,i),debounce:20,shouldShow(o){if(_(o.state.selection)||X(o.state.selection))return!1;const c=this.getContent(o,M=>["paragraph","heading"].includes(M.type.name));if(c==null)return!1;const y=h(d,$);return h(d,i).filter=c.startsWith("/")?c.slice(1):c,typeof y=="number"?o.state.doc.resolve(y).node()!==o.state.doc.resolve(o.state.selection.from).node()?(x(d,$,null),!1):!0:!!c.startsWith("/")},offset:10})),h(this,v).onShow=()=>{h(this,i).show=!0},h(this,v).onHide=()=>{h(this,i).show=!1},this.update(r),e.set(J.key,{show:o=>this.show(o),hide:()=>this.hide()})}}i=new WeakMap,v=new WeakMap,$=new WeakMap;const Oe=(t,e)=>{t.config(r=>Be(r,e)).use(J).use(ve).use(N)};export{Oe as defineFeature};
23 + `};F.props={ctx:Object,config:Object,show:Boolean,filter:String,hide:Function};const Q=f(F),N=we("CREPE_MENU"),J=xe({show:()=>{},hide:()=>{}},"menuAPICtx");K("milkdown-slash-menu",Q);function Ce(r,e){r.set(N.key,{view:n=>new Ge(r,n,e)})}var i,w,k;class Ge{constructor(e,n,u){R(this,i,void 0);R(this,w,void 0);R(this,k,void 0);v(this,k,null),this.update=o=>{p(this,w).update(o)},this.show=o=>{v(this,k,o),p(this,i).filter="",p(this,w).show()},this.hide=()=>{v(this,k,null),p(this,w).hide()},this.destroy=()=>{p(this,w).destroy(),p(this,i).remove()},v(this,i,new Q),p(this,i).hide=this.hide,p(this,i).ctx=e,p(this,i).config=u;const m=this;v(this,w,new Me({content:p(this,i),debounce:20,shouldShow(o){if(_(o.state.selection)||X(o.state.selection))return!1;const h=this.getContent(o,x=>["paragraph","heading"].includes(x.type.name));if(h==null)return!1;const y=p(m,k);return p(m,i).filter=h.startsWith("/")?h.slice(1):h,typeof y=="number"?o.state.doc.resolve(y).node()!==o.state.doc.resolve(o.state.selection.from).node()?(v(m,k,null),!1):!0:!!h.startsWith("/")},offset:10})),p(this,w).onShow=()=>{p(this,i).show=!0},p(this,w).onHide=()=>{p(this,i).show=!1},this.update(n),e.set(J.key,{show:o=>this.show(o),hide:()=>this.hide()})}}i=new WeakMap,w=new WeakMap,k=new WeakMap;const Ue=(r,e)=>{r.config(n=>Ce(n,e)).use(J).use(Le).use(N)};export{Ue as defineFeature};