reactjs-tiptap-editor-pro 0.2.38 → 0.2.39
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/extension-bundle.cjs +1 -1
- package/lib/extension-bundle.d.cts +73 -73
- package/lib/extension-bundle.d.ts +73 -73
- package/lib/extension-bundle.js +7 -6
- package/lib/index.d.cts +73 -73
- package/lib/index.d.ts +73 -73
- package/lib/locale-bundle.d.cts +73 -73
- package/lib/locale-bundle.d.ts +73 -73
- package/package.json +1 -1
package/lib/extension-bundle.cjs
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
1. Must only contain digits, lowercase ASCII letters or "-"
|
|
7
7
|
2. Cannot start or end with "-"
|
|
8
8
|
3. "-" cannot repeat`);Ie.customSchemes.push([e,t])}function Ef(){Ie.scanner=yf(Ie.customSchemes);for(let e=0;e<Ie.tokenQueue.length;e++)Ie.tokenQueue[e][1]({scanner:Ie.scanner});Ie.parser=vf(Ie.scanner.tokens);for(let e=0;e<Ie.pluginQueue.length;e++)Ie.pluginQueue[e][1]({scanner:Ie.scanner,parser:Ie.parser});return Ie.initialized=!0,Ie}function go(e){return Ie.initialized||Ef(),_f(Ie.parser.start,e,Pu(Ie.scanner.start,e))}go.scan=Pu;function qu(e,t=null,n=null){if(t&&typeof t=="object"){if(n)throw Error(`linkifyjs: Invalid link type ${t}; must be a string`);n=t,t=null}const i=new fo(n),r=go(e),a=[];for(let o=0;o<r.length;o++){const s=r[o];s.isLink&&(!t||s.t===t)&&i.check(s)&&a.push(s.toFormattedObject(i))}return a}function Af(e){return e.length===1?e[0].isLink:e.length===3&&e[1].isLink?["()","[]"].includes(e[0].value+e[2].value):!1}function Cf(e){return new T.Plugin({key:new T.PluginKey("autolink"),appendTransaction:(t,n,i)=>{const r=t.some(u=>u.docChanged)&&!n.doc.eq(i.doc),a=t.some(u=>u.getMeta("preventAutolink"));if(!r||a)return;const{tr:o}=i,s=T.combineTransactionSteps(n.doc,[...t]);if(T.getChangedRanges(s).forEach(({newRange:u})=>{const l=T.findChildrenInRange(i.doc,u,d=>d.isTextblock);let f,g;if(l.length>1?(f=l[0],g=i.doc.textBetween(f.pos,f.pos+f.node.nodeSize,void 0," ")):l.length&&i.doc.textBetween(u.from,u.to," "," ").endsWith(" ")&&(f=l[0],g=i.doc.textBetween(f.pos,u.to,void 0," ")),f&&g){const d=g.split(" ").filter(b=>b!=="");if(d.length<=0)return!1;const x=d[d.length-1],m=f.pos+g.lastIndexOf(x);if(!x)return!1;const h=go(x).map(b=>b.toObject(e.defaultProtocol));if(!Af(h))return!1;h.filter(b=>b.isLink).map(b=>({...b,from:m+b.start+1,to:m+b.end+1})).filter(b=>i.schema.marks.code?!i.doc.rangeHasMark(b.from,b.to,i.schema.marks.code):!0).filter(b=>e.validate(b.value)).filter(b=>e.shouldAutoLink(b.value)).forEach(b=>{T.getMarksBetween(b.from,b.to,i.doc).some(p=>p.mark.type===e.type)||o.addMark(b.from,b.to,e.type.create({href:b.href}))})}}),!!o.steps.length)return o}})}function kf(e){return new T.Plugin({key:new T.PluginKey("handleClickLink"),props:{handleClick:(t,n,i)=>{var r,a;if(i.button!==0||!t.editable)return!1;let o=i.target;const s=[];for(;o.nodeName!=="DIV";)s.push(o),o=o.parentNode;if(!s.find(g=>g.nodeName==="A"))return!1;const c=T.getAttributes(t.state,e.type.name),u=i.target,l=(r=u==null?void 0:u.href)!==null&&r!==void 0?r:c.href,f=(a=u==null?void 0:u.target)!==null&&a!==void 0?a:c.target;return u&&l?(window.open(l,f),!0):!1}}})}function Ff(e){return new T.Plugin({key:new T.PluginKey("handlePasteLink"),props:{handlePaste:(t,n,i)=>{const{state:r}=t,{selection:a}=r,{empty:o}=a;if(o)return!1;let s="";i.content.forEach(u=>{s+=u.textContent});const c=qu(s,{defaultProtocol:e.defaultProtocol}).find(u=>u.isLink&&u.value===s);return!s||!c?!1:e.editor.commands.setMark(e.type,{href:c.href})}}})}const Sf=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g;function $t(e,t){const n=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return t&&t.forEach(i=>{const r=typeof i=="string"?i:i.scheme;r&&n.push(r)}),!e||e.replace(Sf,"").match(new RegExp(`^(?:(?:${n.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,"i"))}const Bf=T.Mark.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(e=>{if(typeof e=="string"){Ds(e);return}Ds(e.scheme,e.optionalSlashes)})},onDestroy(){Uf()},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:(e,t)=>!!$t(e,t.protocols),validate:e=>!!e,shouldAutoLink:e=>!!e}},addAttributes(){return{href:{default:null,parseHTML(e){return e.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:e=>{const t=e.getAttribute("href");return!t||!this.options.isAllowedUri(t,{defaultValidate:n=>!!$t(n,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:null}}]},renderHTML({HTMLAttributes:e}){return this.options.isAllowedUri(e.href,{defaultValidate:t=>!!$t(t,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",T.mergeAttributes(this.options.HTMLAttributes,e),0]:["a",T.mergeAttributes(this.options.HTMLAttributes,{...e,href:""}),0]},addCommands(){return{setLink:e=>({chain:t})=>{const{href:n}=e;return this.options.isAllowedUri(n,{defaultValidate:i=>!!$t(i,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?t().setMark(this.name,e).setMeta("preventAutolink",!0).run():!1},toggleLink:e=>({chain:t})=>{const{href:n}=e;return this.options.isAllowedUri(n,{defaultValidate:i=>!!$t(i,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?t().toggleMark(this.name,e,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run():!1},unsetLink:()=>({chain:e})=>e().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[T.markPasteRule({find:e=>{const t=[];if(e){const{protocols:n,defaultProtocol:i}=this.options,r=qu(e).filter(a=>a.isLink&&this.options.isAllowedUri(a.value,{defaultValidate:o=>!!$t(o,n),protocols:n,defaultProtocol:i}));r.length&&r.forEach(a=>t.push({text:a.value,data:{href:a.href},index:a.start}))}return t},type:this.type,getAttributes:e=>{var t;return{href:(t=e.data)===null||t===void 0?void 0:t.href}}})]},addProseMirrorPlugins(){const e=[],{protocols:t,defaultProtocol:n}=this.options;return this.options.autolink&&e.push(Cf({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:i=>this.options.isAllowedUri(i,{defaultValidate:r=>!!$t(r,t),protocols:t,defaultProtocol:n}),shouldAutoLink:this.options.shouldAutoLink})),this.options.openOnClick===!0&&e.push(kf({type:this.type})),this.options.linkOnPaste&&e.push(Ff({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type})),e}});function Nf(e){const[t,n]=pe.useState(!1);function i(r,a,o){e.action&&(e.action({link:r,text:a,openInNewTab:o}),n(!1))}return O.jsxs(T.Popover,{modal:!0,open:t,onOpenChange:n,children:[O.jsx(T.PopoverTrigger,{disabled:e==null?void 0:e.disabled,asChild:!0,children:O.jsx(T.ActionButton,{tooltip:e==null?void 0:e.tooltip,isActive:e==null?void 0:e.isActive,disabled:e==null?void 0:e.disabled,children:O.jsx(T.IconComponent,{name:e==null?void 0:e.icon})})}),O.jsx(T.PopoverContent,{hideWhenDetached:!0,className:"w-full",align:"start",side:"bottom",children:O.jsx(T.LinkEditBlock,{editor:e.editor,onSetLink:i})})]})}const Lf=Bf.extend({inclusive:!1,parseHTML(){return[{tag:'a[href]:not([data-type="button"]):not([href *= "javascript:" i])'}]},renderHTML({HTMLAttributes:e}){return["a",T.mergeAttributes(this.options.HTMLAttributes,e,{class:"link"}),0]},addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),openOnClick:!0,button:({editor:t,t:n})=>({component:Nf,componentProps:{editor:t,action:i=>{const{link:r,text:a,openInNewTab:o}=i;t.chain().extendMarkRange("link").insertContent({type:"text",text:a,marks:[{type:"link",attrs:{href:r,target:o?"_blank":""}}]}).setLink({href:r}).focus().run()},id:"linkk",isActive:()=>t.isActive("link")||!1,disabled:!t.can().setLink({href:""}),icon:"Link",tooltip:n("editor.link.tooltip")}})}},addProseMirrorPlugins(){return[new T.Plugin({props:{handleClick:(e,t)=>{const{schema:n,doc:i,tr:r}=e.state,a=T.getMarkRange(i.resolve(t),n.marks.link);if(!a)return!1;const o=i.resolve(a.from),s=i.resolve(a.to),c=r.setSelection(new T.TextSelection(o,s));e.dispatch(c)}}})]}}),Rf=T.Node.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{}}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:e}){return["hr",T.mergeAttributes(this.options.HTMLAttributes,e)]},addCommands(){return{setHorizontalRule:()=>({chain:e,state:t})=>{const{selection:n}=t,{$from:i,$to:r}=n,a=e();return i.parentOffset===0?a.insertContentAt({from:Math.max(i.pos-1,0),to:r.pos},{type:this.name}):T.isNodeSelection(n)?a.insertContentAt(r.pos,{type:this.name}):a.insertContent({type:this.name}),a.command(({tr:o,dispatch:s})=>{var c;if(s){const{$to:u}=o.selection,l=u.end();if(u.nodeAfter)u.nodeAfter.isTextblock?o.setSelection(T.TextSelection.create(o.doc,u.pos+1)):u.nodeAfter.isBlock?o.setSelection(T.NodeSelection.create(o.doc,u.pos)):o.setSelection(T.TextSelection.create(o.doc,u.pos));else{const f=(c=u.parent.type.contentMatch.defaultType)===null||c===void 0?void 0:c.create();f&&(o.insert(l,f),o.setSelection(T.TextSelection.create(o.doc,l+1)))}o.scrollIntoView()}return!0}).run()}}},addInputRules(){return[T.nodeInputRule({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),If=Rf.extend({renderHTML(){return["div",T.mergeAttributes(this.options.HTMLAttributes,{"data-type":this.name}),["hr"]]},addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),button:({editor:t,t:n})=>({component:T.ActionButton,componentProps:{action:()=>t.commands.setHorizontalRule(),disabled:!t.can().setHorizontalRule(),icon:"Minus",shortcutKeys:["mod","alt","S"],tooltip:n("editor.horizontalrule.tooltip")}})}},addKeyboardShortcuts(){return{"Mod-Alt-s":()=>this.editor.commands.setHorizontalRule()}}});var yr=200,He=function(){};He.prototype.append=function(t){return t.length?(t=He.from(t),!this.length&&t||t.length<yr&&this.leafAppend(t)||this.length<yr&&t.leafPrepend(this)||this.appendInner(t)):this};He.prototype.prepend=function(t){return t.length?He.from(t).append(this):this};He.prototype.appendInner=function(t){return new Wf(this,t)};He.prototype.slice=function(t,n){return t===void 0&&(t=0),n===void 0&&(n=this.length),t>=n?He.empty:this.sliceInner(Math.max(0,t),Math.min(this.length,n))};He.prototype.get=function(t){if(!(t<0||t>=this.length))return this.getInner(t)};He.prototype.forEach=function(t,n,i){n===void 0&&(n=0),i===void 0&&(i=this.length),n<=i?this.forEachInner(t,n,i,0):this.forEachInvertedInner(t,n,i,0)};He.prototype.map=function(t,n,i){n===void 0&&(n=0),i===void 0&&(i=this.length);var r=[];return this.forEach(function(a,o){return r.push(t(a,o))},n,i),r};He.from=function(t){return t instanceof He?t:t&&t.length?new Hu(t):He.empty};var Hu=function(e){function t(i){e.call(this),this.values=i}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(r,a){return r==0&&a==this.length?this:new t(this.values.slice(r,a))},t.prototype.getInner=function(r){return this.values[r]},t.prototype.forEachInner=function(r,a,o,s){for(var c=a;c<o;c++)if(r(this.values[c],s+c)===!1)return!1},t.prototype.forEachInvertedInner=function(r,a,o,s){for(var c=a-1;c>=o;c--)if(r(this.values[c],s+c)===!1)return!1},t.prototype.leafAppend=function(r){if(this.length+r.length<=yr)return new t(this.values.concat(r.flatten()))},t.prototype.leafPrepend=function(r){if(this.length+r.length<=yr)return new t(r.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t}(He);He.empty=new Hu([]);var Wf=function(e){function t(n,i){e.call(this),this.left=n,this.right=i,this.length=n.length+i.length,this.depth=Math.max(n.depth,i.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(i){return i<this.left.length?this.left.get(i):this.right.get(i-this.left.length)},t.prototype.forEachInner=function(i,r,a,o){var s=this.left.length;if(r<s&&this.left.forEachInner(i,r,Math.min(a,s),o)===!1||a>s&&this.right.forEachInner(i,Math.max(r-s,0),Math.min(this.length,a)-s,o+s)===!1)return!1},t.prototype.forEachInvertedInner=function(i,r,a,o){var s=this.left.length;if(r>s&&this.right.forEachInvertedInner(i,r-s,Math.max(a,s)-s,o+s)===!1||a<s&&this.left.forEachInvertedInner(i,Math.min(r,s),a,o)===!1)return!1},t.prototype.sliceInner=function(i,r){if(i==0&&r==this.length)return this;var a=this.left.length;return r<=a?this.left.slice(i,r):i>=a?this.right.slice(i-a,r-a):this.left.slice(i,a).append(this.right.slice(0,r-a))},t.prototype.leafAppend=function(i){var r=this.right.leafAppend(i);if(r)return new t(this.left,r)},t.prototype.leafPrepend=function(i){var r=this.left.leafPrepend(i);if(r)return new t(r,this.right)},t.prototype.appendInner=function(i){return this.left.depth>=Math.max(this.right.depth,i.depth)+1?new t(this.left,new t(this.right,i)):new t(this,i)},t}(He);const Of=500;class ut{constructor(t,n){this.items=t,this.eventCount=n}popEvent(t,n){if(this.eventCount==0)return null;let i=this.items.length;for(;;i--)if(this.items.get(i-1).selection){--i;break}let r,a;n&&(r=this.remapping(i,this.items.length),a=r.maps.length);let o=t.tr,s,c,u=[],l=[];return this.items.forEach((f,g)=>{if(!f.step){r||(r=this.remapping(i,g+1),a=r.maps.length),a--,l.push(f);return}if(r){l.push(new pt(f.map));let d=f.step.map(r.slice(a)),x;d&&o.maybeStep(d).doc&&(x=o.mapping.maps[o.mapping.maps.length-1],u.push(new pt(x,void 0,void 0,u.length+l.length))),a--,x&&r.appendMap(x,a)}else o.maybeStep(f.step);if(f.selection)return s=r?f.selection.map(r.slice(a)):f.selection,c=new ut(this.items.slice(0,i).append(l.reverse().concat(u)),this.eventCount-1),!1},this.items.length,0),{remaining:c,transform:o,selection:s}}addTransform(t,n,i,r){let a=[],o=this.eventCount,s=this.items,c=!r&&s.length?s.get(s.length-1):null;for(let l=0;l<t.steps.length;l++){let f=t.steps[l].invert(t.docs[l]),g=new pt(t.mapping.maps[l],f,n),d;(d=c&&c.merge(g))&&(g=d,l?a.pop():s=s.slice(0,s.length-1)),a.push(g),n&&(o++,n=void 0),r||(c=g)}let u=o-i.depth;return u>Pf&&(s=Mf(s,u),o-=u),new ut(s.append(a),o)}remapping(t,n){let i=new T.Mapping;return this.items.forEach((r,a)=>{let o=r.mirrorOffset!=null&&a-r.mirrorOffset>=t?i.maps.length-r.mirrorOffset:void 0;i.appendMap(r.map,o)},t,n),i}addMaps(t){return this.eventCount==0?this:new ut(this.items.append(t.map(n=>new pt(n))),this.eventCount)}rebased(t,n){if(!this.eventCount)return this;let i=[],r=Math.max(0,this.items.length-n),a=t.mapping,o=t.steps.length,s=this.eventCount;this.items.forEach(g=>{g.selection&&s--},r);let c=n;this.items.forEach(g=>{let d=a.getMirror(--c);if(d==null)return;o=Math.min(o,d);let x=a.maps[d];if(g.step){let m=t.steps[d].invert(t.docs[d]),h=g.selection&&g.selection.map(a.slice(c+1,d));h&&s++,i.push(new pt(x,m,h))}else i.push(new pt(x))},r);let u=[];for(let g=n;g<o;g++)u.push(new pt(a.maps[g]));let l=this.items.slice(0,r).append(u).append(i),f=new ut(l,s);return f.emptyItemCount()>Of&&(f=f.compress(this.items.length-i.length)),f}emptyItemCount(){let t=0;return this.items.forEach(n=>{n.step||t++}),t}compress(t=this.items.length){let n=this.remapping(0,t),i=n.maps.length,r=[],a=0;return this.items.forEach((o,s)=>{if(s>=t)r.push(o),o.selection&&a++;else if(o.step){let c=o.step.map(n.slice(i)),u=c&&c.getMap();if(i--,u&&n.appendMap(u,i),c){let l=o.selection&&o.selection.map(n.slice(i));l&&a++;let f=new pt(u.invert(),c,l),g,d=r.length-1;(g=r.length&&r[d].merge(f))?r[d]=g:r.push(f)}}else o.map&&i--},this.items.length,0),new ut(He.from(r.reverse()),a)}}ut.empty=new ut(He.empty,0);function Mf(e,t){let n;return e.forEach((i,r)=>{if(i.selection&&t--==0)return n=r,!1}),e.slice(n)}class pt{constructor(t,n,i,r){this.map=t,this.step=n,this.selection=i,this.mirrorOffset=r}merge(t){if(this.step&&t.step&&!t.selection){let n=t.step.merge(this.step);if(n)return new pt(n.getMap().invert(),n,this.selection)}}}class Rt{constructor(t,n,i,r,a){this.done=t,this.undone=n,this.prevRanges=i,this.prevTime=r,this.prevComposition=a}}const Pf=20;function jf(e,t,n,i){let r=n.getMeta(tn),a;if(r)return r.historyState;n.getMeta(zf)&&(e=new Rt(e.done,e.undone,null,0,-1));let o=n.getMeta("appendedTransaction");if(n.steps.length==0)return e;if(o&&o.getMeta(tn))return o.getMeta(tn).redo?new Rt(e.done.addTransform(n,void 0,i,Ti(t)),e.undone,vs(n.mapping.maps),e.prevTime,e.prevComposition):new Rt(e.done,e.undone.addTransform(n,void 0,i,Ti(t)),null,e.prevTime,e.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(o&&o.getMeta("addToHistory")===!1)){let s=n.getMeta("composition"),c=e.prevTime==0||!o&&e.prevComposition!=s&&(e.prevTime<(n.time||0)-i.newGroupDelay||!qf(n,e.prevRanges)),u=o?ia(e.prevRanges,n.mapping):vs(n.mapping.maps);return new Rt(e.done.addTransform(n,c?t.selection.getBookmark():void 0,i,Ti(t)),ut.empty,u,n.time,s??e.prevComposition)}else return(a=n.getMeta("rebased"))?new Rt(e.done.rebased(n,a),e.undone.rebased(n,a),ia(e.prevRanges,n.mapping),e.prevTime,e.prevComposition):new Rt(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),ia(e.prevRanges,n.mapping),e.prevTime,e.prevComposition)}function qf(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;return e.mapping.maps[0].forEach((i,r)=>{for(let a=0;a<t.length;a+=2)i<=t[a+1]&&r>=t[a]&&(n=!0)}),n}function vs(e){let t=[];for(let n=e.length-1;n>=0&&t.length==0;n--)e[n].forEach((i,r,a,o)=>t.push(a,o));return t}function ia(e,t){if(!e)return null;let n=[];for(let i=0;i<e.length;i+=2){let r=t.map(e[i],1),a=t.map(e[i+1],-1);r<=a&&n.push(r,a)}return n}function Hf(e,t,n){let i=Ti(t),r=tn.get(t).spec.config,a=(n?e.undone:e.done).popEvent(t,i);if(!a)return null;let o=a.selection.resolve(a.transform.doc),s=(n?e.done:e.undone).addTransform(a.transform,t.selection.getBookmark(),r,i),c=new Rt(n?s:a.remaining,n?a.remaining:s,null,0,-1);return a.transform.setSelection(o).setMeta(tn,{redo:n,historyState:c})}let ra=!1,_s=null;function Ti(e){let t=e.plugins;if(_s!=t){ra=!1,_s=t;for(let n=0;n<t.length;n++)if(t[n].spec.historyPreserveItems){ra=!0;break}}return ra}const tn=new T.PluginKey("history"),zf=new T.PluginKey("closeHistory");function Xf(e={}){return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new T.Plugin({key:tn,state:{init(){return new Rt(ut.empty,ut.empty,null,0,-1)},apply(t,n,i){return jf(n,i,t,e)}},config:e,props:{handleDOMEvents:{beforeinput(t,n){let i=n.inputType,r=i=="historyUndo"?Xu:i=="historyRedo"?Vu:null;return r?(n.preventDefault(),r(t.state,t.dispatch)):!1}}}})}function zu(e,t){return(n,i)=>{let r=tn.getState(n);if(!r||(e?r.undone:r.done).eventCount==0)return!1;if(i){let a=Hf(r,n,e);a&&i(t?a.scrollIntoView():a)}return!0}}const Xu=zu(!1,!0),Vu=zu(!0,!0),Vf=T.Extension.create({name:"history",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:e,dispatch:t})=>Xu(e,t),redo:()=>({state:e,dispatch:t})=>Vu(e,t)}},addProseMirrorPlugins(){return[Xf(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()}}});function $f(e){var u;const{icon:t=void 0,tooltip:n=void 0,customClass:i="",tooltipOptions:r={},action:a=void 0,isActive:o=void 0,children:s}=e,c=T.icons[t];return O.jsxs(T.Tooltip,{children:[O.jsx(T.TooltipTrigger,{asChild:!0,children:O.jsxs(T.Toggle,{size:"sm",className:`w-[32px] h-[32px] ${i}`,disabled:o==null?void 0:o(),onClick:a,children:[c&&O.jsx(c,{className:"w-4 h-4"}),s&&O.jsx(O.Fragment,{children:s})]})}),n&&O.jsx(T.TooltipContent,{...r,children:O.jsxs("div",{className:"flex flex-col items-center text-center max-w-24",children:[O.jsx("div",{children:n}),!!((u=e==null?void 0:e.shortcutKeys)!=null&&u.length)&&O.jsx("span",{children:T.getShortcutKeys(e==null?void 0:e.shortcutKeys)})]})})]})}const Kf=["undo","redo"],Gf=Vf.extend({addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),depth:100,newGroupDelay:500,button:({editor:t,t:n})=>Kf.map(i=>({component:$f,componentProps:{action:()=>{i==="undo"&&t.chain().focus().undo().run(),i==="redo"&&t.chain().focus().redo().run()},shortcutKeys:i==="undo"?["mod","Z"]:["shift","mod","Z"],disabled:i==="undo"?!t.can().undo():!t.can().redo(),isActive:()=>i==="undo"?!t.can().undo():!t.can().redo(),icon:i==="undo"?"Undo2":"Redo2",tooltip:n(`editor.${i}.tooltip`)}}))}}}),Zf=T.Extension.create({name:"characterCount",addOptions(){return{limit:null,mode:"textSize",textCounter:e=>e.length,wordCounter:e=>e.split(" ").filter(t=>t!=="").length}},addStorage(){return{characters:()=>0,words:()=>0}},onBeforeCreate(){this.storage.characters=e=>{const t=(e==null?void 0:e.node)||this.editor.state.doc;if(((e==null?void 0:e.mode)||this.options.mode)==="textSize"){const i=t.textBetween(0,t.content.size,void 0," ");return this.options.textCounter(i)}return t.nodeSize},this.storage.words=e=>{const t=(e==null?void 0:e.node)||this.editor.state.doc,n=t.textBetween(0,t.content.size," "," ");return this.options.wordCounter(n)}},addProseMirrorPlugins(){let e=!1;return[new T.Plugin({key:new T.PluginKey("characterCount"),appendTransaction:(t,n,i)=>{if(e)return;const r=this.options.limit;if(r==null||r===0){e=!0;return}const a=this.storage.characters({node:i.doc});if(a>r){const o=a-r,s=0,c=o;console.warn(`[CharacterCount] Initial content exceeded limit of ${r} characters. Content was automatically trimmed.`);const u=i.tr.deleteRange(s,c);return e=!0,u}e=!0},filterTransaction:(t,n)=>{const i=this.options.limit;if(!t.docChanged||i===0||i===null||i===void 0)return!0;const r=this.storage.characters({node:n.doc}),a=this.storage.characters({node:t.doc});if(a<=i||r>i&&a>i&&a<=r)return!0;if(r>i&&a>i&&a>r||!t.getMeta("paste"))return!1;const s=t.selection.$head.pos,c=a-i,u=s-c,l=s;return t.deleteRange(u,l),!(this.storage.characters({node:t.doc})>i)}})]}});function Yf(e={}){return new T.Plugin({view(t){return new Qf(t,e)}})}class Qf{constructor(t,n){var i;this.editorView=t,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=(i=n.width)!==null&&i!==void 0?i:1,this.color=n.color===!1?void 0:n.color||"black",this.class=n.class,this.handlers=["dragover","dragend","drop","dragleave"].map(r=>{let a=o=>{this[r](o)};return t.dom.addEventListener(r,a),{name:r,handler:a}})}destroy(){this.handlers.forEach(({name:t,handler:n})=>this.editorView.dom.removeEventListener(t,n))}update(t,n){this.cursorPos!=null&&n.doc!=t.state.doc&&(this.cursorPos>t.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(t){t!=this.cursorPos&&(this.cursorPos=t,t==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let t=this.editorView.state.doc.resolve(this.cursorPos),n=!t.parent.inlineContent,i;if(n){let s=t.nodeBefore,c=t.nodeAfter;if(s||c){let u=this.editorView.nodeDOM(this.cursorPos-(s?s.nodeSize:0));if(u){let l=u.getBoundingClientRect(),f=s?l.bottom:l.top;s&&c&&(f=(f+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2),i={left:l.left,right:l.right,top:f-this.width/2,bottom:f+this.width/2}}}}if(!i){let s=this.editorView.coordsAtPos(this.cursorPos);i={left:s.left-this.width/2,right:s.left+this.width/2,top:s.top,bottom:s.bottom}}let r=this.editorView.dom.offsetParent;this.element||(this.element=r.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 a,o;if(!r||r==document.body&&getComputedStyle(r).position=="static")a=-pageXOffset,o=-pageYOffset;else{let s=r.getBoundingClientRect();a=s.left-r.scrollLeft,o=s.top-r.scrollTop}this.element.style.left=i.left-a+"px",this.element.style.top=i.top-o+"px",this.element.style.width=i.right-i.left+"px",this.element.style.height=i.bottom-i.top+"px"}scheduleRemoval(t){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),t)}dragover(t){if(!this.editorView.editable)return;let n=this.editorView.posAtCoords({left:t.clientX,top:t.clientY}),i=n&&n.inside>=0&&this.editorView.state.doc.nodeAt(n.inside),r=i&&i.type.spec.disableDropCursor,a=typeof r=="function"?r(this.editorView,n,t):r;if(n&&!a){let o=n.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let s=T.dropPoint(this.editorView.state.doc,o,this.editorView.dragging.slice);s!=null&&(o=s)}this.setCursor(o),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(t){(t.target==this.editorView.dom||!this.editorView.dom.contains(t.relatedTarget))&&this.setCursor(null)}}const Jf=T.Extension.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[Yf(this.options)]}}),eg=T.Extension.create({name:"focus",addOptions(){return{className:"has-focus",mode:"all"}},addProseMirrorPlugins(){return[new T.Plugin({key:new T.PluginKey("focus"),props:{decorations:({doc:e,selection:t})=>{const{isEditable:n,isFocused:i}=this.editor,{anchor:r}=t,a=[];if(!n||!i)return T.DecorationSet.create(e,[]);let o=0;this.options.mode==="deepest"&&e.descendants((c,u)=>{if(c.isText)return;if(!(r>=u&&r<=u+c.nodeSize-1))return!1;o+=1});let s=0;return e.descendants((c,u)=>{if(c.isText||!(r>=u&&r<=u+c.nodeSize-1))return!1;if(s+=1,this.options.mode==="deepest"&&o-s>0||this.options.mode==="shallowest"&&s>1)return this.options.mode==="deepest";a.push(T.Decoration.node(u,u+c.nodeSize,{class:this.options.className}))}),T.DecorationSet.create(e,a)}}})]}});class Oe extends T.Selection{constructor(t){super(t,t)}map(t,n){let i=t.resolve(n.map(this.head));return Oe.valid(i)?new Oe(i):T.Selection.near(i)}content(){return T.Slice.empty}eq(t){return t instanceof Oe&&t.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(t,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new Oe(t.resolve(n.pos))}getBookmark(){return new po(this.anchor)}static valid(t){let n=t.parent;if(n.isTextblock||!tg(t)||!ng(t))return!1;let i=n.type.spec.allowGapCursor;if(i!=null)return i;let r=n.contentMatchAt(t.index()).defaultType;return r&&r.isTextblock}static findGapCursorFrom(t,n,i=!1){e:for(;;){if(!i&&Oe.valid(t))return t;let r=t.pos,a=null;for(let o=t.depth;;o--){let s=t.node(o);if(n>0?t.indexAfter(o)<s.childCount:t.index(o)>0){a=s.child(n>0?t.indexAfter(o):t.index(o)-1);break}else if(o==0)return null;r+=n;let c=t.doc.resolve(r);if(Oe.valid(c))return c}for(;;){let o=n>0?a.firstChild:a.lastChild;if(!o){if(a.isAtom&&!a.isText&&!T.NodeSelection.isSelectable(a)){t=t.doc.resolve(r+a.nodeSize*n),i=!1;continue e}break}a=o,r+=n;let s=t.doc.resolve(r);if(Oe.valid(s))return s}return null}}}Oe.prototype.visible=!1;Oe.findFrom=Oe.findGapCursorFrom;T.Selection.jsonID("gapcursor",Oe);class po{constructor(t){this.pos=t}map(t){return new po(t.map(this.pos))}resolve(t){let n=t.resolve(this.pos);return Oe.valid(n)?new Oe(n):T.Selection.near(n)}}function tg(e){for(let t=e.depth;t>=0;t--){let n=e.index(t),i=e.node(t);if(n==0){if(i.type.spec.isolating)return!0;continue}for(let r=i.child(n-1);;r=r.lastChild){if(r.childCount==0&&!r.inlineContent||r.isAtom||r.type.spec.isolating)return!0;if(r.inlineContent)return!1}}return!0}function ng(e){for(let t=e.depth;t>=0;t--){let n=e.indexAfter(t),i=e.node(t);if(n==i.childCount){if(i.type.spec.isolating)return!0;continue}for(let r=i.child(n);;r=r.firstChild){if(r.childCount==0&&!r.inlineContent||r.isAtom||r.type.spec.isolating)return!0;if(r.inlineContent)return!1}}return!0}function ig(){return new T.Plugin({props:{decorations:sg,createSelectionBetween(e,t,n){return t.pos==n.pos&&Oe.valid(n)?new Oe(n):null},handleClick:ag,handleKeyDown:rg,handleDOMEvents:{beforeinput:og}}})}const rg=T.keydownHandler({ArrowLeft:si("horiz",-1),ArrowRight:si("horiz",1),ArrowUp:si("vert",-1),ArrowDown:si("vert",1)});function si(e,t){const n=e=="vert"?t>0?"down":"up":t>0?"right":"left";return function(i,r,a){let o=i.selection,s=t>0?o.$to:o.$from,c=o.empty;if(o instanceof T.TextSelection){if(!a.endOfTextblock(n)||s.depth==0)return!1;c=!1,s=i.doc.resolve(t>0?s.after():s.before())}let u=Oe.findGapCursorFrom(s,t,c);return u?(r&&r(i.tr.setSelection(new Oe(u))),!0):!1}}function ag(e,t,n){if(!e||!e.editable)return!1;let i=e.state.doc.resolve(t);if(!Oe.valid(i))return!1;let r=e.posAtCoords({left:n.clientX,top:n.clientY});return r&&r.inside>-1&&T.NodeSelection.isSelectable(e.state.doc.nodeAt(r.inside))?!1:(e.dispatch(e.state.tr.setSelection(new Oe(i))),!0)}function og(e,t){if(t.inputType!="insertCompositionText"||!(e.state.selection instanceof Oe))return!1;let{$from:n}=e.state.selection,i=n.parent.contentMatchAt(n.index()).findWrapping(e.state.schema.nodes.text);if(!i)return!1;let r=T.Fragment.empty;for(let o=i.length-1;o>=0;o--)r=T.Fragment.from(i[o].createAndFill(null,r));let a=e.state.tr.replace(n.pos,n.pos,new T.Slice(r,0,0));return a.setSelection(T.TextSelection.near(a.doc.resolve(n.pos+1))),e.dispatch(a),!1}function sg(e){if(!(e.selection instanceof Oe))return null;let t=document.createElement("div");return t.className="ProseMirror-gapcursor",T.DecorationSet.create(e.doc,[T.Decoration.widget(e.selection.head,t,{key:"gapcursor"})])}const cg=T.Extension.create({name:"gapCursor",addProseMirrorPlugins(){return[ig()]},extendNodeSchema(e){var t;const n={name:e.name,options:e.options,storage:e.storage};return{allowGapCursor:(t=T.callOrReturn(T.getExtensionField(e,"allowGapCursor",n)))!==null&&t!==void 0?t:null}}}),ug=T.Node.create({name:"hardBreak",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:e}){return["br",T.mergeAttributes(this.options.HTMLAttributes,e)]},renderText(){return`
|
|
9
|
-
`},addCommands(){return{setHardBreak:()=>({commands:e,chain:t,state:n,editor:i})=>e.first([()=>e.exitCode(),()=>e.command(()=>{const{selection:r,storedMarks:a}=n;if(r.$from.parent.type.spec.isolating)return!1;const{keepMarks:o}=this.options,{splittableMarks:s}=i.extensionManager,c=a||r.$to.parentOffset&&r.$from.marks();return t().insertContent({type:this.name}).command(({tr:u,dispatch:l})=>{if(l&&c&&o){const f=c.filter(g=>s.includes(g.type.name));u.ensureMarks(f)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),lg=T.Node.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:e}){return["li",T.mergeAttributes(this.options.HTMLAttributes,e),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),dg=T.Node.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:e}){return["p",T.mergeAttributes(this.options.HTMLAttributes,e),0]},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),hg=T.Extension.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){return[new T.Plugin({key:new T.PluginKey("placeholder"),props:{decorations:({doc:e,selection:t})=>{const n=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:i}=t,r=[];if(!n)return null;const a=this.editor.isEmpty;return e.descendants((o,s)=>{const c=i>=s&&i<=s+o.nodeSize,u=!o.isLeaf&&T.isNodeEmpty(o);if((c||!this.options.showOnlyCurrent)&&u){const l=[this.options.emptyNodeClass];a&&l.push(this.options.emptyEditorClass);const f=T.Decoration.node(s,s+o.nodeSize,{class:l.join(" "),"data-placeholder":typeof this.options.placeholder=="function"?this.options.placeholder({editor:this.editor,node:o,pos:s,hasAnchor:c}):this.options.placeholder});r.push(f)}return this.options.includeChildren}),T.DecorationSet.create(e,r)}}})]}}),fg=T.Node.create({name:"text",group:"inline"}),gg=T.Node.create({name:"doc",topNode:!0,content:"block+"}),pg=gg.extend({content:"(block|columns)+"}),mg=T.Extension.create({name:"columnActionButton",addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),button:({editor:t,t:n})=>({component:T.ActionButton,componentProps:{action:()=>{t.chain().focus().insertColumns({cols:2}).run()},icon:"Columns",tooltip:n("editor.columns.tooltip")}})}}}),bg=T.Extension.create({name:"selection",addProseMirrorPlugins(){const{editor:e}=this;return[new T.Plugin({key:new T.PluginKey("selection"),props:{decorations(t){return t.selection.empty||e.isFocused===!0?null:T.DecorationSet.create(t.doc,[T.Decoration.inline(t.selection.from,t.selection.to,{class:"selection"})])}}})]}});function yg(e){const{t}=Ce.useLocale(),n=pe.useMemo(()=>[{name:"paragraph",label:t("editor.paragraph.tooltip"),iconName:"Heading1",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:t("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:t("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:t("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:t("editor.bulletlist.tooltip"),isActive:()=>e.editor.isActive("bulletList"),iconName:"List",action:()=>e.editor.chain().focus().clearNodes().toggleBulletList().run()},{name:"numberedList",label:t("editor.orderedlist.tooltip"),isActive:()=>e.editor.isActive("orderedList"),iconName:"ListOrdered",action:()=>e.editor.chain().focus().clearNodes().toggleOrderedList().run()},{name:"taskList",label:t("editor.tasklist.tooltip"),isActive:()=>e.editor.isActive("taskList"),iconName:"ListTodo",action:()=>e.editor.chain().focus().clearNodes().toggleTaskList().run()},{name:"blockquote",label:t("editor.blockquote.tooltip"),isActive:()=>e.editor.isActive("blockquote"),iconName:"TextQuote",action:()=>e.editor.chain().focus().clearNodes().toggleBlockquote().run()},{name:"codeBlock",label:t("editor.codeblock.tooltip"),isActive:()=>e.editor.isActive("codeBlock"),iconName:"Code2",action:()=>e.editor.chain().focus().clearNodes().toggleCodeBlock().run()}],[e.editor,t]),i=pe.useMemo(()=>n.findLast(r=>r.isActive())??{label:"Empty"},[n]);return O.jsxs(T.DropdownMenu,{children:[O.jsx(T.DropdownMenuTrigger,{asChild:!0,children:O.jsxs(T.Button,{className:"flex h-[32px] gap-1 px-1.5",variant:"ghost",children:[O.jsxs("span",{className:"whitespace-nowrap text-sm font-normal",children:[" ",i==null?void 0:i.label]}),O.jsx($e.ChevronDown,{className:"size-4"})]})}),O.jsx(T.DropdownMenuContent,{align:"start",className:"w-full p-1",hideWhenDetached:!0,sideOffset:5,children:n.map((r,a)=>{var s;const o=T.icons[r.iconName];return O.jsx(T.DropdownMenuCheckboxItem,{checked:((s=r.isActive)==null?void 0:s.call(r))||!1,className:"cursor-pointer",onClick:()=>r.action(),children:O.jsxs("div",{className:"flex items-center gap-2 px-2",children:[O.jsx(o,{className:"h3 w-3"}),O.jsxs("span",{children:[" ",r.label]})]})},`text-bubble-${a}`)})})]})}const xg=T.Extension.create({name:"text-bubble",addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),toolbar:!1,button:()=>({component:yg,componentProps:{}})}}});function ws({types:e,node:t}){return Array.isArray(e)&&e.includes(t.type)||t.type===e}const Dg=T.Extension.create({name:"trailingNode",addOptions(){return{node:"paragraph",notAfter:["paragraph"]}},addProseMirrorPlugins(){const e=new T.PluginKey(this.name),t=Object.entries(this.editor.schema.nodes).map(([,n])=>n).filter(n=>this.options.notAfter.includes(n.name));return[new T.Plugin({key:e,appendTransaction:(n,i,r)=>{const{doc:a,tr:o,schema:s}=r,c=e.getState(r),u=a.content.size,l=s.nodes[this.options.node];if(c)return o.insert(u,l.create())},state:{init:(n,i)=>{const r=i.tr.doc.lastChild;return!ws({node:r,types:t})},apply:(n,i)=>{if(!n.docChanged)return i;const r=n.doc.lastChild;return!ws({node:r,types:t})}}})]}}),vg=T.Extension.create({name:"base-kit",addExtensions(){const e=[];return this.options.document!==!1&&e.push(pg.configure()),this.options.placeholder!==!1&&e.push(hg.configure({placeholder:({node:t,pos:n,editor:i})=>{var r,a,o,s,c;return((r=t==null?void 0:t.type)==null?void 0:r.name)==="columns"||((a=t==null?void 0:t.content)==null?void 0:a.size)!==0?"":((o=t==null?void 0:t.type)==null?void 0:o.name)==="heading"?`${Ce.localeActions.t(`editor.heading.h${t.attrs.level}.tooltip`)}`:((s=t==null?void 0:t.type)==null?void 0:s.name)==="codeBlock"||((c=t==null?void 0:t.type)==null?void 0:c.name)==="table"?"":i.extensionManager.extensions.some(u=>u.name==="slashCommand")?Ce.localeActions.t("editor.slash"):Ce.localeActions.t("editor.content")},...this.options.placeholder})),this.options.focus!==!1&&e.push(eg.configure({className:"focus",...this.options.focus})),this.options.text!==!1&&e.push(fg.configure()),this.options.textBubble!==!1&&e.push(xg.configure()),this.options.gapcursor!==!1&&e.push(cg.configure()),this.options.dropcursor!==!1&&e.push(Jf.configure({...this.options.dropcursor,width:2,class:"ProseMirror-dropcursor border-black"})),this.options.characterCount!==!1&&e.push(Zf.configure(this.options.characterCount)),this.options.paragraph!==!1&&e.push(dg.configure(this.options.paragraph)),this.options.hardBreak!==!1&&e.push(ug.configure(this.options.hardBreak)),this.options.listItem!==!1&&e.push(lg.configure(this.options.listItem)),this.options.textStyle!==!1&&e.push(kh.configure(this.options.textStyle)),this.options.trailingNode!==!1&&e.push(Dg.configure(this.options.trailingNode)),this.options.selection!==!1&&e.push(bg),this.options.multiColumn!==!1&&e.push(T.Column,T.MultiColumn),e}}),$u=T.Mark.create({name:"subscript",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"sub"},{style:"vertical-align",getAttrs(e){return e!=="sub"?!1:null}}]},renderHTML({HTMLAttributes:e}){return["sub",T.mergeAttributes(this.options.HTMLAttributes,e),0]},addCommands(){return{setSubscript:()=>({commands:e})=>e.setMark(this.name),toggleSubscript:()=>({commands:e})=>e.toggleMark(this.name),unsetSubscript:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-,":()=>this.editor.commands.toggleSubscript()}}}),Ku=T.Mark.create({name:"superscript",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"sup"},{style:"vertical-align",getAttrs(e){return e!=="super"?!1:null}}]},renderHTML({HTMLAttributes:e}){return["sup",T.mergeAttributes(this.options.HTMLAttributes,e),0]},addCommands(){return{setSuperscript:()=>({commands:e})=>e.setMark(this.name),toggleSuperscript:()=>({commands:e})=>e.toggleMark(this.name),unsetSuperscript:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-.":()=>this.editor.commands.toggleSuperscript()}}}),_g=T.Extension.create({name:"subAndSuperScript",addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),button:({editor:t,extension:n,t:i})=>{const r=n.options.subscript,a=n.options.superscript,o={component:T.ActionButton,componentProps:{action:()=>t.commands.toggleSubscript(),isActive:()=>t.isActive("subscript")||!1,disabled:!t.can().toggleSubscript(),icon:"Subscript",tooltip:i("editor.subscript.tooltip")}},s={component:T.ActionButton,componentProps:{action:()=>t.commands.toggleSuperscript(),isActive:()=>t.isActive("superscript")||!1,disabled:!t.can().toggleSuperscript(),icon:"Superscript",tooltip:i("editor.superscript.tooltip")}},c=[];return r!==!1&&c.push(o),a!==!1&&c.push(s),c}}},addExtensions(){const e=[];return this.options.subscript!==!1&&e.push($u.configure(this.options.subscript)),this.options.superscript!==!1&&e.push(Ku.configure(this.options.superscript)),e}});function wg(e){var n;const t=pe.useMemo(()=>{var a;const i=(a=e==null?void 0:e.items)==null?void 0:a.find(o=>o.isActive());return i&&!i.default?{...i,icon:i!=null&&i.icon?i==null?void 0:i.icon:e==null?void 0:e.icon}:{title:e.tooltip,icon:e.icon,isActive:()=>!1}},[e]);return O.jsxs(T.DropdownMenu,{children:[O.jsx(T.DropdownMenuTrigger,{asChild:!0,disabled:e==null?void 0:e.disabled,children:O.jsx(T.ActionButton,{customClass:"!w-12 h-12",disabled:e==null?void 0:e.disabled,icon:e==null?void 0:e.icon,tooltip:e==null?void 0:e.tooltip,children:O.jsx(T.MenuDown,{className:"size-3 text-gray-500"})})}),O.jsx(T.DropdownMenuContent,{className:"w-full",children:(n=e==null?void 0:e.items)==null?void 0:n.map((i,r)=>O.jsxs(T.DropdownMenuCheckboxItem,{checked:t.title===i.title,className:"flex items-center gap-3",onClick:i.action,children:[O.jsx(T.IconComponent,{name:i==null?void 0:i.icon}),O.jsx("span",{className:"ml-1",children:i.title}),!!(i!=null&&i.shortcutKeys)&&O.jsx("span",{className:"ml-auto text-xs tracking-widest opacity-60",children:T.getShortcutKeys(i.shortcutKeys)})]},`more-mark-${r}`))})]})}const Tg=T.Extension.create({name:"moreMark",addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),button({editor:t,extension:n,t:i}){const r=n.options.subscript,a=n.options.superscript,o={action:()=>t.commands.toggleSubscript(),isActive:()=>t.isActive("subscript")||!1,disabled:!t.can().toggleSubscript(),icon:"Subscript",title:i("editor.subscript.tooltip"),shortcutKeys:["mod","."]},s={action:()=>t.commands.toggleSuperscript(),isActive:()=>t.isActive("superscript")||!1,disabled:!t.can().toggleSuperscript(),icon:"Superscript",title:i("editor.superscript.tooltip"),shortcutKeys:["mod",","]},c=[];return r!==!1&&c.push(o),a!==!1&&c.push(s),{component:wg,componentProps:{icon:"Type",tooltip:i("editor.moremark"),disabled:!t.isEditable,items:c}}}}},addExtensions(){const e=[];return this.options.subscript!==!1&&e.push($u.configure(this.options.subscript)),this.options.superscript!==!1&&e.push(Ku.configure(this.options.superscript)),e}}),Ug=T.Extension.create({name:"indent",addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),types:["paragraph","heading","blockquote"],minIndent:T.IndentProps.min,maxIndent:T.IndentProps.max,button({editor:t,t:n}){return[{component:T.ActionButton,componentProps:{action:()=>{t.commands.indent()},shortcutKeys:["Tab"],icon:"IndentIncrease",tooltip:n("editor.indent.tooltip")}},{component:T.ActionButton,componentProps:{action:()=>{t.commands.outdent()},shortcutKeys:["Shift","Tab"],icon:"IndentDecrease",tooltip:n("editor.outdent.tooltip")}}]}}},addGlobalAttributes(){return[{types:this.options.types,attributes:{indent:{default:0,parseHTML:e=>{const t=e.dataset.indent;return(t?Number.parseInt(t,10):0)||0},renderHTML:e=>e.indent?{"data-indent":e.indent}:{}}}}]},addCommands(){return{indent:()=>T.createIndentCommand({delta:T.IndentProps.more,types:this.options.types}),outdent:()=>T.createIndentCommand({delta:T.IndentProps.less,types:this.options.types})}},addKeyboardShortcuts(){return{Tab:()=>this.editor.commands.indent(),"Shift-Tab":()=>this.editor.commands.outdent()}}});function Eg(e){return Number.parseFloat(e.replace("%",""))/100}function Ag(e){const{t}=Ce.useLocale(),[n,i]=pe.useState("default");function r(o){o==="default"?e.editor.commands.unsetLineHeight():e.editor.commands.setLineHeight(o),i(o)}const a=pe.useMemo(()=>{const c=e.editor.extensionManager.extensions.find(u=>u.name==="lineHeight").options.lineHeights.map(u=>({label:Eg(u),value:u}));return c.unshift({label:t("editor.default"),value:"default"}),c},[e]);return O.jsxs(T.DropdownMenu,{children:[O.jsx(T.DropdownMenuTrigger,{asChild:!0,disabled:e==null?void 0:e.disabled,children:O.jsx(T.ActionButton,{customClass:"!w-12 h-12",disabled:e==null?void 0:e.disabled,icon:"LineHeight",tooltip:e==null?void 0:e.tooltip,children:O.jsx(T.IconComponent,{className:"ml-1 size-3 text-zinc-500",name:"MenuDown"})})}),O.jsx(T.DropdownMenuContent,{className:"min-w-24",children:a==null?void 0:a.map((o,s)=>O.jsx(T.DropdownMenuCheckboxItem,{checked:o.value===n,onClick:()=>r(o.value),children:o.label},`lineHeight-${s}`))})]})}const Cg=["paragraph","heading","list_item","todo_item"];function kg(e,t){const{selection:n,doc:i}=e;if(!n||!i||!(n instanceof T.TextSelection||n instanceof T.AllSelection))return e;const{from:r,to:a}=n,o=[],s=t&&t!==Ce.DEFAULT_LINE_HEIGHT?t:null;if(i.nodesBetween(r,a,(c,u)=>{const l=c.type;return Cg.includes(l.name)?((c.attrs.lineHeight||null)!==s&&o.push({node:c,pos:u,nodeType:l}),l.name!=="list_item"&&l.name!=="todo_item"):!0}),o.length===0)return e;for(const c of o){const{node:u,pos:l,nodeType:f}=c;let{attrs:g}=u;g={...g,lineHeight:s},e=e.setNodeMarkup(l,f,g,u.marks)}return e}function Fg(e){return({state:t,dispatch:n})=>{const{selection:i}=t;let{tr:r}=t;return r=r.setSelection(i),r=kg(r,e),r.docChanged?(n&&n(r),!0):!1}}const Sg=T.Extension.create({name:"lineHeight",addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),types:["paragraph","heading","list_item","todo_item"],lineHeights:Ce.DEFAULT_LINE_HEIGHT_LIST,defaultHeight:Ce.DEFAULT_LINE_HEIGHT,button({editor:t,t:n}){return{component:Ag,componentProps:{editor:t,tooltip:n("editor.lineheight.tooltip")}}}}},addGlobalAttributes(){return[{types:this.options.types,attributes:{lineHeight:{default:null,parseHTML:e=>e.style.lineHeight||this.options.defaultHeight,renderHTML:e=>e.lineHeight===this.options.defaultHeight||!e.lineHeight?{}:{style:`line-height: ${e.lineHeight}`}}}}]},addCommands(){return{setLineHeight:e=>Fg(e),unsetLineHeight:()=>({commands:e})=>this.options.types.every(t=>e.resetAttributes(t,"lineHeight"))}}});function Bg(e){var t;const{char:n,allowSpaces:i,allowToIncludeChar:r,allowedPrefixes:a,startOfLine:o,$position:s}=e,c=i&&!r,u=T.escapeForRegEx(n),l=new RegExp(`\\s${u}$`),f=o?"^":"",g=r?"":u,d=c?new RegExp(`${f}${u}.*?(?=\\s${g}|$)`,"gm"):new RegExp(`${f}(?:^)?${u}[^\\s${g}]*`,"gm"),x=((t=s.nodeBefore)===null||t===void 0?void 0:t.isText)&&s.nodeBefore.text;if(!x)return null;const m=s.pos-x.length,h=Array.from(x.matchAll(d)).pop();if(!h||h.input===void 0||h.index===void 0)return null;const b=h.input.slice(Math.max(0,h.index-1),h.index),p=new RegExp(`^[${a==null?void 0:a.join("")}\0]?$`).test(b);if(a!==null&&!p)return null;const D=m+h.index;let w=D+h[0].length;return c&&l.test(x.slice(w-1,w+1))&&(h[0]+=" ",w+=1),D<s.pos&&w>=s.pos?{range:{from:D,to:w},query:h[0].slice(n.length),text:h[0]}:null}const Ng=new T.PluginKey("suggestion");function mo({pluginKey:e=Ng,editor:t,char:n="@",allowSpaces:i=!1,allowToIncludeChar:r=!1,allowedPrefixes:a=[" "],startOfLine:o=!1,decorationTag:s="span",decorationClass:c="suggestion",command:u=()=>null,items:l=()=>[],render:f=()=>({}),allow:g=()=>!0,findSuggestionMatch:d=Bg}){let x;const m=f==null?void 0:f(),h=new T.Plugin({key:e,view(){return{update:async(b,p)=>{var D,w,_,U,E,L,A;const W=(D=this.key)===null||D===void 0?void 0:D.getState(p),N=(w=this.key)===null||w===void 0?void 0:w.getState(b.state),F=W.active&&N.active&&W.range.from!==N.range.from,q=!W.active&&N.active,v=W.active&&!N.active,k=!q&&!v&&W.query!==N.query,V=q||F&&k,P=k||F,J=v||F&&k;if(!V&&!P&&!J)return;const K=J&&!V?W:N,re=b.dom.querySelector(`[data-decoration-id="${K.decorationId}"]`);x={editor:t,range:K.range,query:K.query,text:K.text,items:[],command:j=>u({editor:t,range:K.range,props:j}),decorationNode:re,clientRect:re?()=>{var j;const{decorationId:I}=(j=this.key)===null||j===void 0?void 0:j.getState(t.state),oe=b.dom.querySelector(`[data-decoration-id="${I}"]`);return(oe==null?void 0:oe.getBoundingClientRect())||null}:null},V&&((_=m==null?void 0:m.onBeforeStart)===null||_===void 0||_.call(m,x)),P&&((U=m==null?void 0:m.onBeforeUpdate)===null||U===void 0||U.call(m,x)),(P||V)&&(x.items=await l({editor:t,query:K.query})),J&&((E=m==null?void 0:m.onExit)===null||E===void 0||E.call(m,x)),P&&((L=m==null?void 0:m.onUpdate)===null||L===void 0||L.call(m,x)),V&&((A=m==null?void 0:m.onStart)===null||A===void 0||A.call(m,x))},destroy:()=>{var b;x&&((b=m==null?void 0:m.onExit)===null||b===void 0||b.call(m,x))}}},state:{init(){return{active:!1,range:{from:0,to:0},query:null,text:null,composing:!1}},apply(b,p,D,w){const{isEditable:_}=t,{composing:U}=t.view,{selection:E}=b,{empty:L,from:A}=E,W={...p};if(W.composing=U,_&&(L||t.view.composing)){(A<p.range.from||A>p.range.to)&&!U&&!p.composing&&(W.active=!1);const N=d({char:n,allowSpaces:i,allowToIncludeChar:r,allowedPrefixes:a,startOfLine:o,$position:E.$from}),F=`id_${Math.floor(Math.random()*4294967295)}`;N&&g({editor:t,state:w,range:N.range,isActive:p.active})?(W.active=!0,W.decorationId=p.decorationId?p.decorationId:F,W.range=N.range,W.query=N.query,W.text=N.text):W.active=!1}else W.active=!1;return W.active||(W.decorationId=null,W.range={from:0,to:0},W.query=null,W.text=null),W}},props:{handleKeyDown(b,p){var D;const{active:w,range:_}=h.getState(b.state);return w&&((D=m==null?void 0:m.onKeyDown)===null||D===void 0?void 0:D.call(m,{view:b,event:p,range:_}))||!1},decorations(b){const{active:p,range:D,decorationId:w}=h.getState(b);return p?T.DecorationSet.create(b.doc,[T.Decoration.inline(D.from,D.to,{nodeName:s,class:c,"data-decoration-id":w})]):null}}});return h}function Lg(e,t){var h,b;const[n,i]=pe.useState(0),[r,a]=pe.useState(0),o=pe.useRef(null),{t:s}=Ce.useLocale(),c=pe.useRef([]);pe.useImperativeHandle(t,()=>({onKeyDown:u})),pe.useEffect(()=>{if(!o.current)return;const p=r*1e3+n,D=c.current[p];D&&D.scrollIntoView({behavior:"smooth",block:"nearest"})},[n,r]);function u({event:p}){return p.key==="ArrowUp"?(l(),!0):p.key==="ArrowDown"?(f(),!0):p.key==="Enter"?(g(),!0):!1}function l(){var w;if(e.items.length===0)return!1;let p=n-1,D=r;p<0&&(D=r-1,p=((w=e.items[D])==null?void 0:w.commands.length)-1||0),D<0&&(D=e.items.length-1,p=e.items[D].commands.length-1),i(p),a(D)}function f(){if(e.items.length===0)return!1;const p=e.items[r].commands;let D=n+1,w=r;p.length-1<D&&(D=0,w=r+1),e.items.length-1<w&&(w=0),i(D),a(w)}function g(){if(e.items.length===0||r===-1||n===-1)return!1;d(r,n)}function d(p,D){const w=e.items[p].commands[D];e.command(w)}function x(p,D){d(p,D)}function m(p,D,w){c.current[p*1e3+D]=w}return O.jsx("div",{className:"mb-8 max-h-[min(80vh,24rem)] flex-wrap overflow-auto rounded-lg !border !border-neutral-200 !bg-white p-1 !text-black shadow-sm dark:!border-neutral-800 dark:!bg-black",ref:o,children:(h=e==null?void 0:e.items)!=null&&h.length?O.jsx("div",{className:"grid min-w-48 grid-cols-1 gap-0.5",children:(b=e==null?void 0:e.items)==null?void 0:b.map((p,D)=>O.jsxs(pe.Fragment,{children:[O.jsx("div",{className:"col-[1/-1] mx-2 mt-2 select-none text-[0.65rem] font-semibold uppercase tracking-wider !text-neutral-500 first:mt-0.5",children:p.title}),p.commands.map((w,_)=>O.jsxs("button",{onClick:()=>x(D,_),ref:U=>m(D,_,U),className:T.cn("flex items-center gap-3 px-2 py-1.5 text-sm !text-neutral-800 dark:!text-neutral-200 text-left w-full rounded-sm outline-none transition-colors !bg-transparent hover:!bg-accent ",{"slash-command-active":r===D&&n===_}),children:[w.iconUrl&&O.jsx("img",{alt:"",className:"size-6",src:w.iconUrl}),w.iconName&&O.jsx(T.IconComponent,{className:"!mr-1 !text-lg",name:w.iconName}),w.label]},`command-${_}`))]},`slash-${p.title}`))}):O.jsx("div",{className:"p-3",children:O.jsx("span",{className:"text-xs text-gray-800 dark:text-gray-100",children:s("editor.slash.empty")})})})}const Rg=pe.forwardRef(Lg),Ig={setOpen:(e,t)=>{T.dispatchEvent(T.EVENTS.UPLOAD_VIDEO(e),t)}};function Wg(e,t){const n=[{name:"format",title:Ce.localeActions.t("editor.slash.format"),commands:[]},{name:"insert",title:Ce.localeActions.t("editor.slash.insert"),commands:[]}];return e.forEach(i=>{i.name.toLowerCase()==="heading"&&i.options.levels.forEach(r=>{n[0].commands.push({name:`heading${r}`,label:Ce.localeActions.t(`editor.heading.h${r}.tooltip`),aliases:[`h${r}`,"bt",`bt${r}`],iconName:`Heading${r}`,action:({editor:a,range:o})=>{a.chain().focus().deleteRange(o).setHeading({level:r}).run()}})}),i.name.toLowerCase()==="bulletlist"&&n[0].commands.push({name:"bulletList",label:Ce.localeActions.t("editor.bulletlist.tooltip"),aliases:["ul","yxlb"],iconName:"List",action:({editor:r,range:a})=>{r.chain().focus().deleteRange(a).toggleBulletList().run()}}),i.name.toLowerCase()==="orderedlist"&&n[0].commands.push({name:"numberedList",label:Ce.localeActions.t("editor.orderedlist.tooltip"),aliases:["ol","yxlb"],iconName:"ListOrdered",action:({editor:r,range:a})=>{r.chain().focus().deleteRange(a).toggleOrderedList().run()}}),i.name.toLowerCase()==="tasklist"&&n[0].commands.push({name:"taskList",label:Ce.localeActions.t("editor.tasklist.tooltip"),iconName:"ListTodo",description:"Task list with todo items",aliases:["todo"],action:({editor:r,range:a})=>{r.chain().focus().deleteRange(a).toggleTaskList().run()}}),i.name.toLowerCase()==="blockquote"&&n[0].commands.push({name:"blockquote",label:Ce.localeActions.t("editor.blockquote.tooltip"),description:"插入引入格式",aliases:["yr"],iconName:"TextQuote",action:({editor:r,range:a})=>{r.chain().focus().deleteRange(a).setBlockquote().run()}}),i.name.toLowerCase()==="codeblock"&&n[0].commands.push({name:"codeBlock",label:Ce.localeActions.t("editor.codeblock.tooltip"),iconName:"Code2",description:"Code block with syntax highlighting",shouldBeHidden:r=>r.isActive("columns"),action:({editor:r,range:a})=>{r.chain().focus().deleteRange(a).setCodeBlock().run()}}),i.name.toLowerCase()===T.Image.name&&n[1].commands.push({name:"image",label:Ce.localeActions.t("editor.image.tooltip"),iconName:"ImageUp",description:"Insert a image",aliases:["image","tp","tupian"],shouldBeHidden:r=>r.isActive("columns"),action:({editor:r,range:a})=>{r.chain().focus().deleteRange(a).run(),T.actionDialogImage.setOpen(r.id,!0)}}),i.name.toLowerCase()===T.Video.name&&n[1].commands.push({name:"video",label:Ce.localeActions.t("editor.video.tooltip"),iconName:"Video",description:"Insert a video",aliases:["video","sp","shipin"],shouldBeHidden:r=>r.isActive("columns"),action:({editor:r,range:a})=>{r.chain().focus().deleteRange(a).run(),Ig.setOpen(r.id,!0)}}),i.name.toLowerCase()==="table"&&n[1].commands.push({name:"table",label:Ce.localeActions.t("editor.table.tooltip"),iconName:"Table",description:"Insert a table",aliases:["table","bg","biaoge","biao"],shouldBeHidden:r=>r.isActive("columns"),action:({editor:r,range:a})=>{r.chain().focus().deleteRange(a).insertTable({rows:3,cols:3,withHeaderRow:!1}).run()}}),i.name.toLowerCase()==="horizontalrule"&&n[1].commands.push({name:"horizontalRule",label:Ce.localeActions.t("editor.horizontalrule.tooltip"),iconName:"Minus",description:"Insert a horizontal divider",aliases:["hr","fgx","fg"],action:({editor:r,range:a})=>{r.chain().focus().deleteRange(a).setHorizontalRule().run()}}),i.name.toLowerCase()==="columns"&&n[1].commands.push({name:"columns",label:Ce.localeActions.t("editor.columns.tooltip"),iconName:"Columns2",description:"Add two column content",action:({editor:r})=>{r.chain().focus().insertColumns({cols:2}).run()}}),t==null||t(i,n)}),n}const Kt="slashCommand";let Ne;const Og=T.Extension.create({name:Kt,priority:200,onCreate(){Ne=no("body",{interactive:!0,trigger:"manual",placement:"bottom-start",theme:"slash-command",maxWidth:"16rem",offset:[16,8],popperOptions:{strategy:"fixed",modifiers:[{name:"flip",enabled:!1}]}})},addProseMirrorPlugins(){return[mo({editor:this.editor,char:"/",allowSpaces:!0,startOfLine:!0,pluginKey:new T.PluginKey(Kt),allow:({state:e,range:t})=>{var u,l,f;const n=e.doc.resolve(t.from),i=n.depth===1,r=n.parent.type.name==="paragraph",a=((u=n.parent.textContent)==null?void 0:u.charAt(0))==="/",o=this.editor.isActive("column"),s=(f=n.parent.textContent)==null?void 0:f.slice(Math.max(0,(l=n.parent.textContent)==null?void 0:l.indexOf("/"))),c=!(s!=null&&s.endsWith(" "));return(i&&r&&a||o&&r&&a)&&c},command:({editor:e,range:t,props:n})=>{const{view:i}=e;n.action({editor:e,range:t}),i.focus()},items:({query:e,editor:t})=>Wg(t.extensionManager.extensions,this.options.renderGroupItem).map(o=>({...o,commands:o.commands.filter(s=>{const c=s.label.toLowerCase().trim(),u=e.toLowerCase().trim();if(s.aliases){const l=s.aliases.map(d=>d.toLowerCase().trim()),f=c.match(u),g=l.some(d=>d.match(u));return f||g}return c.match(u)}).filter(s=>s.shouldBeHidden?!s.shouldBeHidden(this.editor):!0)})).filter(o=>o.commands.length>0).map(o=>({...o,commands:o.commands.map(s=>({...s,isEnabled:!0}))})),render:()=>{let e,t=null;return{onStart:n=>{var a;e=new T.ReactRenderer(Rg,{props:n,editor:n.editor});const{view:i}=n.editor,r=()=>{if(!n.clientRect)return n.editor.storage[Kt].rect;const o=n.clientRect();if(!o)return n.editor.storage[Kt].rect;let s=o.y;if(o.top+e.element.offsetHeight+40>window.innerHeight){const c=o.top+e.element.offsetHeight-window.innerHeight+40;s=o.y-c}return new DOMRect(o.x,s,o.width,o.height)};t=()=>{Ne==null||Ne[0].setProps({getReferenceClientRect:r})},(a=i.dom.parentElement)==null||a.addEventListener("scroll",t),Ne==null||Ne[0].setProps({getReferenceClientRect:r,appendTo:()=>document.body,content:e.element}),Ne==null||Ne[0].show()},onUpdate(n){var o;e.updateProps(n);const{view:i}=n.editor,r=()=>{if(!n.clientRect)return n.editor.storage[Kt].rect;const s=n.clientRect();return s?new DOMRect(s.x,s.y,s.width,s.height):n.editor.storage[Kt].rect},a=()=>{Ne==null||Ne[0].setProps({getReferenceClientRect:r})};(o=i.dom.parentElement)==null||o.addEventListener("scroll",a),n.editor.storage[Kt].rect=n.clientRect?r():{width:0,height:0,left:0,top:0,right:0,bottom:0},Ne==null||Ne[0].setProps({getReferenceClientRect:r})},onKeyDown(n){var i;return n.event.key==="Escape"?(Ne==null||Ne[0].hide(),!0):(Ne!=null&&Ne[0].state.isShown||Ne==null||Ne[0].show(),(i=e.ref)==null?void 0:i.onKeyDown(n))},onExit(n){var i;if(Ne==null||Ne[0].hide(),t){const{view:r}=n.editor;(i=r.dom.parentElement)==null||i.removeEventListener("scroll",t)}e.destroy()}}}})]},addStorage(){return{rect:{width:0,height:0,left:0,top:0,right:0,bottom:0}}}}),Mg=T.Extension.create({name:"painter",addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),button:({editor:t,t:n})=>({component:T.ActionButton,componentProps:{action:()=>{t.commands.setPainter(t==null?void 0:t.state.selection.$head.marks())},icon:"PaintRoller",tooltip:n("editor.format")}})}},addCommands(){return{setPainter:e=>({view:{dispatch:t,state:{tr:n},dom:i}})=>{const o=`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 i.style.cursor=o,t(n.setMeta("painterAction",{type:"start",marks:e})),!0}}},addProseMirrorPlugins(){return[new T.Plugin({key:new T.PluginKey("format-painter"),state:{init:()=>[],apply:(e,t)=>{const n=e.getMeta("painterAction");return n&&n.type==="start"?t=n.marks:n&&n.type==="end"&&(t=[]),t}},props:{handleDOMEvents:{mousedown(e){const t=this.getState(e.state);if(!t||t.length===0)return e.dom.style.cursor="",!1;const n=()=>{document.removeEventListener("mouseup",n);let{dispatch:i,state:{tr:r,selection:a},dom:o}=e;o.style.cursor="",r=r.removeMark(a.from,a.to);for(const s of t)s.type.name!=="link"&&(r=r.addMark(a.from,a.to,s));i(r.setMeta("painterAction",{type:"end"}))};return document.addEventListener("mouseup",n),!0}}}})]}});function Pg({editor:e,...t}){const{t:n}=Ce.useLocale(),[i,r]=pe.useState(-1),[a,o]=pe.useState([]),[s,c]=pe.useState(""),[u,l]=pe.useState(""),[f,g]=pe.useState(!1),[d,x]=pe.useState(!1);return pe.useEffect(()=>{f||(c(""),l(""),r(-1),o([]),e.commands.setSearchTerm(""),e.commands.setReplaceTerm(""))},[e,f]),pe.useEffect(()=>{f&&e&&e.commands&&e.commands.setSearchTerm&&e.commands.setSearchTerm(s)},[f,s,e]),pe.useEffect(()=>{f&&e&&e.commands&&e.commands.setReplaceTerm&&e.commands.setReplaceTerm(u)},[f,u,e]),pe.useEffect(()=>{if(!e)return;const m=e.extensionManager.extensions.find(b=>b.name===Gu.name);if(!m)return;const h=()=>{if(!f)return;const b=m?m.storage.currentIndex:-1,p=m?m.storage.results:[];r(D=>D!==b?b:D),o(D=>T.deepEqual(D,p)?D:p)};return T.listenEvent(T.EVENTS.SEARCH_REPLCE,h),()=>{m&&T.listenEvent(T.EVENTS.SEARCH_REPLCE,h)}},[f,e]),O.jsxs(T.Popover,{onOpenChange:g,open:f,children:[O.jsx(T.PopoverTrigger,{asChild:!0,disabled:t==null?void 0:t.disabled,children:O.jsx(T.ActionButton,{disabled:t==null?void 0:t.disabled,isActive:t==null?void 0:t.isActive,tooltip:t==null?void 0:t.tooltip,children:O.jsx(T.IconComponent,{name:t==null?void 0:t.icon})})}),O.jsxs(T.PopoverContent,{align:"start",className:"w-full",hideWhenDetached:!0,side:"bottom",children:[O.jsxs("div",{className:"mb-[6px] flex items-center justify-between",children:[O.jsx(T.Label,{children:n("editor.search.dialog.text")}),O.jsx("span",{className:"font-semibold",children:a.length>0?`${i+1}/${a.length}`:"0/0"})]}),O.jsxs("div",{className:"mb-[10px] flex w-full max-w-sm items-center gap-1.5",children:[O.jsx(T.Input,{autoFocus:!0,className:"w-full",onChange:m=>c(m.target.value),placeholder:"Text",required:!0,type:"text",value:s}),O.jsx(T.Button,{className:"flex-1",disabled:a.length===0,onClick:e.commands.goToPrevSearchResult,children:O.jsx(T.IconComponent,{name:"ChevronUp"})}),O.jsx(T.Button,{className:"flex-1",disabled:a.length===0,onClick:e.commands.goToNextSearchResult,children:O.jsx(T.IconComponent,{name:"ChevronDown"})})]}),O.jsx(T.Label,{className:"mb-[6px]",children:n("editor.replace.dialog.text")}),O.jsx("div",{className:"mb-[5px] flex w-full max-w-sm items-center gap-1.5",children:O.jsx("div",{className:"relative w-full max-w-sm items-center",children:O.jsx(T.Input,{className:"w-80",onChange:m=>l(m.target.value),placeholder:"Text",required:!0,type:"text",value:u})})}),O.jsxs("div",{className:"mb-[10px] flex items-center space-x-2",children:[O.jsx(T.Switch,{checked:d,onCheckedChange:m=>{x(m),e.commands.setCaseSensitive(m)}}),O.jsx(T.Label,{children:n("editor.replace.caseSensitive")})]}),O.jsxs("div",{className:"flex items-center gap-[10px]",children:[O.jsx(T.Button,{className:"flex-1",disabled:a.length===0,onClick:e.commands.replace,children:n("editor.replace.dialog.text")}),O.jsx(T.Button,{className:"flex-1",disabled:a.length===0,onClick:e.commands.replaceAll,children:n("editor.replaceAll.dialog.text")})]})]})]})}const En=(e,t)=>t(e.tr);function jg(e,t,n){return RegExp(t?e.replace(/[$()*+./?[\\\]^{|}-]/g,String.raw`\$&`):e,n?"gu":"gui")}function qg(e,t,n){const i=[];let r=[];const a=[];let o=0;if(!t)return{decorationsToReturn:[],results:[]};e==null||e.descendants((s,c)=>{s.isText?r[o]?r[o]={text:r[o].text+s.text,pos:r[o].pos}:r[o]={text:`${s.text}`,pos:c}:o+=1}),r=r.filter(Boolean);for(const{text:s,pos:c}of r){const u=[...s.matchAll(t)];for(const l of u){if(l[0]==="")break;l.index!==void 0&&a.push({from:c+l.index,to:c+l.index+l[0].length})}}for(const s of a)i.push(T.Decoration.inline(s.from,s.to,{class:n}));return{decorationsToReturn:i,results:a}}function Ts(e,t,{state:n,dispatch:i}){if(!t[0])return;const{from:a,to:o}=t[0];i&&i(n.tr.insertText(e,a,o))}function Hg(e,t,n,i){const r=t+1;if(!i[r])return null;const{from:a,to:o}=i[t],s=o-a-e.length+n,{from:c,to:u}=i[r];return i[r]={to:u-s,from:c-s},[s,i]}function zg(e,t,{tr:n,dispatch:i}){let r=0,a=t.slice();if(a.length===0)return!1;for(let o=0;o<a.length;o+=1){const{from:s,to:c}=a[o];n.insertText(e,s,c);const u=Hg(e,o,r,a);u&&(r=u[0],a=u[1])}return i(n),!0}function Us({view:e,tr:t,searchResults:n,searchResultCurrentClass:i,gotoIndex:r}){const a=n[r];if(a){const o=t.setMeta("directDecoration",{fromPos:a.from,toPos:a.to,attrs:{class:i}});return e==null||e.dispatch(o),setTimeout(()=>{const s=window.document.querySelector(`.${i}`);s&&io(s,{behavior:"smooth",scrollMode:"if-needed"})},0),!0}return!1}const Gu=T.Extension.create({name:"search",addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),searchTerm:"",replaceTerm:"",results:[],currentIndex:0,searchResultClass:"search-result",searchResultCurrentClass:"search-result-current",caseSensitive:!1,disableRegex:!1,onChange:()=>{},button:({editor:t,t:n})=>({component:Pg,componentProps:{action:()=>{},icon:"SearchAndReplace",tooltip:n("editor.searchAndReplace.tooltip"),isActive:()=>!1,disabled:!1,editor:t}})}},addStorage(){return{results:[],currentIndex:-1}},addCommands(){return{setSearchTerm:e=>({state:t,dispatch:n})=>(this.options.searchTerm=e,this.storage.results=[],this.storage.currentIndex=0,T.dispatchEvent(T.EVENTS.SEARCH_REPLCE),En(t,n),!1),setReplaceTerm:e=>({state:t,dispatch:n})=>(this.options.replaceTerm=e,En(t,n),!1),setCaseSensitive:e=>({state:t,dispatch:n})=>(this.options.caseSensitive=e,En(t,n),!1),replace:()=>({state:e,dispatch:t})=>{const{replaceTerm:n}=this.options,{currentIndex:i,results:r}=this.storage,a=r[i];return a?(Ts(n,[a],{state:e,dispatch:t}),this.storage.results.splice(i,1)):(Ts(n,r,{state:e,dispatch:t}),this.storage.results.shift()),T.dispatchEvent(T.EVENTS.SEARCH_REPLCE),En(e,t),!1},replaceAll:()=>({state:e,tr:t,dispatch:n})=>{const{replaceTerm:i}=this.options,{results:r}=this.storage;return zg(i,r,{tr:t,dispatch:n}),this.storage.currentIndex=-1,this.storage.results=[],T.dispatchEvent(T.EVENTS.SEARCH_REPLCE),En(e,n),!1},goToPrevSearchResult:()=>({view:e,tr:t})=>{const{searchResultCurrentClass:n}=this.options,{currentIndex:i,results:r}=this.storage,a=(i+r.length-1)%r.length;return this.storage.currentIndex=a,T.dispatchEvent(T.EVENTS.SEARCH_REPLCE),Us({view:e,tr:t,searchResults:r,searchResultCurrentClass:n,gotoIndex:a})},goToNextSearchResult:()=>({view:e,tr:t})=>{const{searchResultCurrentClass:n}=this.options,{currentIndex:i,results:r}=this.storage,a=(i+1)%r.length;return this.storage.currentIndex=a,this.options.onChange&&this.options.onChange(),T.dispatchEvent(T.EVENTS.SEARCH_REPLCE),Us({view:e,tr:t,searchResults:r,searchResultCurrentClass:n,gotoIndex:a})}}},addProseMirrorPlugins(){const e=this;return[new T.Plugin({key:new T.PluginKey("search"),state:{init(){return T.DecorationSet.empty},apply(t){const{doc:n,docChanged:i}=t,{searchTerm:r,searchResultClass:a,searchResultCurrentClass:o,disableRegex:s,caseSensitive:c}=e.options;if(i||r){const{decorationsToReturn:u,results:l}=qg(n,jg(r,s,c),a);if(e.storage.results=l,e.storage.currentIndex>l.length-1&&(e.storage.currentIndex=0),T.dispatchEvent(T.EVENTS.SEARCH_REPLCE),t.getMeta("directDecoration")){const{fromPos:f,toPos:g,attrs:d}=t.getMeta("directDecoration");u.push(T.Decoration.inline(f,g,d))}else l.length>0&&(u[0]=T.Decoration.inline(l[0].from,l[0].to,{class:o}));return T.DecorationSet.create(n,u)}return T.DecorationSet.empty}},props:{decorations(t){return this.getState(t)}}})]}});function Xg({className:e,...t}){return O.jsx(Jt.EmojiPicker.Root,{className:T.cn("bg-popover text-popover-foreground isolate flex h-full w-fit flex-col overflow-hidden rounded-md",e),"data-slot":"emoji-picker",...t})}function Vg({className:e,...t}){return O.jsxs("div",{className:T.cn("flex h-9 items-center gap-2 border-b px-3",e),"data-slot":"emoji-picker-search-wrapper",children:[O.jsx($e.SearchIcon,{className:"size-4 shrink-0 opacity-50"}),O.jsx(Jt.EmojiPicker.Search,{className:"outline-hidden placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm disabled:cursor-not-allowed disabled:opacity-50","data-slot":"emoji-picker-search",...t})]})}function $g({children:e,...t}){return O.jsx("div",{...t,className:"scroll-my-1 px-1","data-slot":"emoji-picker-row",children:e})}function Kg({emoji:e,className:t,...n}){return O.jsx("button",{...n,className:T.cn("data-[active]:bg-accent flex size-7 items-center justify-center rounded-sm text-base",t),"data-slot":"emoji-picker-emoji",children:e.emoji})}function Gg({category:e,...t}){return O.jsx("div",{...t,className:"bg-popover text-muted-foreground px-3 pb-2 pt-3.5 text-xs leading-none","data-slot":"emoji-picker-category-header",children:e.label})}function Zg({className:e,...t}){return O.jsxs(Jt.EmojiPicker.Viewport,{className:T.cn("outline-hidden relative flex-1",e),"data-slot":"emoji-picker-viewport",...t,children:[O.jsx(Jt.EmojiPicker.Loading,{className:"absolute inset-0 flex items-center justify-center text-muted-foreground","data-slot":"emoji-picker-loading",children:O.jsx($e.LoaderIcon,{className:"size-4 animate-spin"})}),O.jsx(Jt.EmojiPicker.Empty,{className:"absolute inset-0 flex items-center justify-center text-muted-foreground text-sm","data-slot":"emoji-picker-empty",children:"No emoji found."}),O.jsx(Jt.EmojiPicker.List,{className:"select-none pb-1",components:{Row:$g,Emoji:Kg,CategoryHeader:Gg},"data-slot":"emoji-picker-list"})]})}function Yg({className:e,...t}){return O.jsx("div",{className:T.cn("max-w-(--frimousse-viewport-width) flex w-full min-w-0 items-center gap-1 border-t p-2",e),"data-slot":"emoji-picker-footer",...t,children:O.jsx(Jt.EmojiPicker.ActiveEmoji,{children:({emoji:n})=>n?O.jsxs(O.Fragment,{children:[O.jsx("div",{className:"flex size-7 flex-none items-center justify-center text-lg",children:n.emoji}),O.jsx("span",{className:"text-secondary-foreground truncate text-xs",children:n.label})]}):O.jsx("span",{className:"text-muted-foreground ml-1.5 flex h-7 items-center truncate text-xs",children:"Select an emoji…"})})})}function Qg({onSelectEmoji:e,children:t}){return O.jsxs(T.Popover,{modal:!0,children:[O.jsx(T.PopoverTrigger,{asChild:!0,children:t}),O.jsx(T.PopoverContent,{align:"start",className:"size-full p-2",hideWhenDetached:!0,side:"bottom",children:O.jsxs(Xg,{className:"!h-[342px]",onEmojiSelect:({emoji:n})=>{e(n)},children:[O.jsx(Vg,{}),O.jsx(Zg,{}),O.jsx(Yg,{})]})})]})}function Jg({editor:e,icon:t,...n}){const i=pe.useCallback(r=>{const{selection:a}=e.state,{$anchor:o}=a;return e.chain().insertContentAt(o.pos,r).run()},[e]);return O.jsx(Qg,{onSelectEmoji:i,children:O.jsx(T.ActionButton,{icon:t,tooltip:n==null?void 0:n.tooltip})})}const Zu=pe.forwardRef((e,t)=>{const n=pe.useRef(null),[i,r]=pe.useState(0),{t:a}=Ce.useLocale(),o=l=>{const f=e.items[l];f&&e.command(f)},s=()=>{r((i+e.items.length-1)%e.items.length)},c=()=>{r((i+1)%e.items.length)},u=()=>{o(i)};return pe.useEffect(()=>r(0),[e.items]),pe.useEffect(()=>{if(Number.isNaN(i+1))return;const l=n.current.querySelector(`span:nth-of-type(${i+1})`);l&&io(l,{behavior:"smooth",scrollMode:"if-needed"})},[i]),pe.useImperativeHandle(t,()=>({onKeyDown:({event:l})=>l.key==="ArrowUp"?(s(),!0):l.key==="ArrowDown"?(c(),!0):l.key==="Enter"?(u(),!0):!1})),O.jsx("div",{className:"max-h-[320px] w-[200px] overflow-y-auto overflow-x-hidden rounded-sm !border bg-popover p-1 text-popover-foreground shadow-md outline-none",children:O.jsx("div",{ref:n,children:e.items.length>0?e.items.map((l,f)=>O.jsxs("span",{className:T.clsx(" relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors hover:bg-accent focus:bg-accent focus:text-accent-foreground",f===i?"bg-accent":""),onClick:()=>o(f),children:[l.fallbackImage?O.jsx("img",{className:"size-[1em]",src:l.fallbackImage}):l.emoji,":",l.name,":"]},`emoji-list-code-${f}`)):O.jsx("div",{className:"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors",children:O.jsx("span",{children:a("no_result_found")})})})})});Zu.displayName="EmojiList";const yn={100:"💯",1234:"🔢",grinning:"😀",smiley:"😃",smile:"😄",grin:"😁",laughing:"😆",satisfied:"😆",sweat_smile:"😅",rofl:"🤣",joy:"😂",slightly_smiling_face:"🙂",upside_down_face:"🙃",wink:"😉",blush:"😊",innocent:"😇",smiling_face_with_three_hearts:"🥰",heart_eyes:"😍",star_struck:"🤩",kissing_heart:"😘",kissing:"😗",relaxed:"☺️",kissing_closed_eyes:"😚",kissing_smiling_eyes:"😙",smiling_face_with_tear:"🥲",yum:"😋",stuck_out_tongue:"😛",stuck_out_tongue_winking_eye:"😜",zany_face:"🤪",stuck_out_tongue_closed_eyes:"😝",money_mouth_face:"🤑",hugs:"🤗",hand_over_mouth:"🤭",shushing_face:"🤫",thinking:"🤔",zipper_mouth_face:"🤐",raised_eyebrow:"🤨",neutral_face:"😐",expressionless:"😑",no_mouth:"😶",smirk:"😏",unamused:"😒",roll_eyes:"🙄",grimacing:"😬",lying_face:"🤥",relieved:"😌",pensive:"😔",sleepy:"😪",drooling_face:"🤤",sleeping:"😴",mask:"😷",face_with_thermometer:"🤒",face_with_head_bandage:"🤕",nauseated_face:"🤢",vomiting_face:"🤮",sneezing_face:"🤧",hot_face:"🥵",cold_face:"🥶",woozy_face:"🥴",dizzy_face:"😵",exploding_head:"🤯",cowboy_hat_face:"🤠",partying_face:"🥳",disguised_face:"🥸",sunglasses:"😎",nerd_face:"🤓",monocle_face:"🧐",confused:"😕",worried:"😟",slightly_frowning_face:"🙁",frowning_face:"☹️",open_mouth:"😮",hushed:"😯",astonished:"😲",flushed:"😳",pleading_face:"🥺",frowning:"😦",anguished:"😧",fearful:"😨",cold_sweat:"😰",disappointed_relieved:"😥",cry:"😢",sob:"😭",scream:"😱",confounded:"😖",persevere:"😣",disappointed:"😞",sweat:"😓",weary:"😩",tired_face:"😫",yawning_face:"🥱",triumph:"😤",rage:"😡",pout:"😡",angry:"😠",cursing_face:"🤬",smiling_imp:"😈",imp:"👿",skull:"💀",skull_and_crossbones:"☠️",hankey:"💩",poop:"💩",shit:"💩",clown_face:"🤡",japanese_ogre:"👹",japanese_goblin:"👺",ghost:"👻",alien:"👽",space_invader:"👾",robot:"🤖",smiley_cat:"😺",smile_cat:"😸",joy_cat:"😹",heart_eyes_cat:"😻",smirk_cat:"😼",kissing_cat:"😽",scream_cat:"🙀",crying_cat_face:"😿",pouting_cat:"😾",see_no_evil:"🙈",hear_no_evil:"🙉",speak_no_evil:"🙊",kiss:"💋",love_letter:"💌",cupid:"💘",gift_heart:"💝",sparkling_heart:"💖",heartpulse:"💗",heartbeat:"💓",revolving_hearts:"💞",two_hearts:"💕",heart_decoration:"💟",heavy_heart_exclamation:"❣️",broken_heart:"💔",heart:"❤️",orange_heart:"🧡",yellow_heart:"💛",green_heart:"💚",blue_heart:"💙",purple_heart:"💜",brown_heart:"🤎",black_heart:"🖤",white_heart:"🤍",anger:"💢",boom:"💥",collision:"💥",dizzy:"💫",sweat_drops:"💦",dash:"💨",hole:"🕳️",bomb:"💣",speech_balloon:"💬",eye_speech_bubble:"👁️🗨️",left_speech_bubble:"🗨️",right_anger_bubble:"🗯️",thought_balloon:"💭",zzz:"💤",wave:"👋",raised_back_of_hand:"🤚",raised_hand_with_fingers_splayed:"🖐️",hand:"✋",raised_hand:"✋",vulcan_salute:"🖖",ok_hand:"👌",pinched_fingers:"🤌",pinching_hand:"🤏",v:"✌️",crossed_fingers:"🤞",love_you_gesture:"🤟",metal:"🤘",call_me_hand:"🤙",point_left:"👈",point_right:"👉",point_up_2:"👆",middle_finger:"🖕",fu:"🖕",point_down:"👇",point_up:"☝️","+1":"👍",thumbsup:"👍","-1":"👎",thumbsdown:"👎",fist_raised:"✊",fist:"✊",fist_oncoming:"👊",facepunch:"👊",punch:"👊",fist_left:"🤛",fist_right:"🤜",clap:"👏",raised_hands:"🙌",open_hands:"👐",palms_up_together:"🤲",handshake:"🤝",pray:"🙏",writing_hand:"✍️",nail_care:"💅",selfie:"🤳",muscle:"💪",mechanical_arm:"🦾",mechanical_leg:"🦿",leg:"🦵",foot:"🦶",ear:"👂",ear_with_hearing_aid:"🦻",nose:"👃",brain:"🧠",anatomical_heart:"🫀",lungs:"🫁",tooth:"🦷",bone:"🦴",eyes:"👀",eye:"👁️",tongue:"👅",lips:"👄",baby:"👶",child:"🧒",boy:"👦",girl:"👧",adult:"🧑",blond_haired_person:"👱",man:"👨",bearded_person:"🧔",red_haired_man:"👨🦰",curly_haired_man:"👨🦱",white_haired_man:"👨🦳",bald_man:"👨🦲",woman:"👩",red_haired_woman:"👩🦰",person_red_hair:"🧑🦰",curly_haired_woman:"👩🦱",person_curly_hair:"🧑🦱",white_haired_woman:"👩🦳",person_white_hair:"🧑🦳",bald_woman:"👩🦲",person_bald:"🧑🦲",blond_haired_woman:"👱♀️",blonde_woman:"👱♀️",blond_haired_man:"👱♂️",older_adult:"🧓",older_man:"👴",older_woman:"👵",frowning_person:"🙍",frowning_man:"🙍♂️",frowning_woman:"🙍♀️",pouting_face:"🙎",pouting_man:"🙎♂️",pouting_woman:"🙎♀️",no_good:"🙅",no_good_man:"🙅♂️",ng_man:"🙅♂️",no_good_woman:"🙅♀️",ng_woman:"🙅♀️",ok_person:"🙆",ok_man:"🙆♂️",ok_woman:"🙆♀️",tipping_hand_person:"💁",information_desk_person:"💁",tipping_hand_man:"💁♂️",sassy_man:"💁♂️",tipping_hand_woman:"💁♀️",sassy_woman:"💁♀️",raising_hand:"🙋",raising_hand_man:"🙋♂️",raising_hand_woman:"🙋♀️",deaf_person:"🧏",deaf_man:"🧏♂️",deaf_woman:"🧏♀️",bow:"🙇",bowing_man:"🙇♂️",bowing_woman:"🙇♀️",facepalm:"🤦",man_facepalming:"🤦♂️",woman_facepalming:"🤦♀️",shrug:"🤷",man_shrugging:"🤷♂️",woman_shrugging:"🤷♀️",health_worker:"🧑⚕️",man_health_worker:"👨⚕️",woman_health_worker:"👩⚕️",student:"🧑🎓",man_student:"👨🎓",woman_student:"👩🎓",teacher:"🧑🏫",man_teacher:"👨🏫",woman_teacher:"👩🏫",judge:"🧑⚖️",man_judge:"👨⚖️",woman_judge:"👩⚖️",farmer:"🧑🌾",man_farmer:"👨🌾",woman_farmer:"👩🌾",cook:"🧑🍳",man_cook:"👨🍳",woman_cook:"👩🍳",mechanic:"🧑🔧",man_mechanic:"👨🔧",woman_mechanic:"👩🔧",factory_worker:"🧑🏭",man_factory_worker:"👨🏭",woman_factory_worker:"👩🏭",office_worker:"🧑💼",man_office_worker:"👨💼",woman_office_worker:"👩💼",scientist:"🧑🔬",man_scientist:"👨🔬",woman_scientist:"👩🔬",technologist:"🧑💻",man_technologist:"👨💻",woman_technologist:"👩💻",singer:"🧑🎤",man_singer:"👨🎤",woman_singer:"👩🎤",artist:"🧑🎨",man_artist:"👨🎨",woman_artist:"👩🎨",pilot:"🧑✈️",man_pilot:"👨✈️",woman_pilot:"👩✈️",astronaut:"🧑🚀",man_astronaut:"👨🚀",woman_astronaut:"👩🚀",firefighter:"🧑🚒",man_firefighter:"👨🚒",woman_firefighter:"👩🚒",police_officer:"👮",cop:"👮",policeman:"👮♂️",policewoman:"👮♀️",detective:"🕵️",male_detective:"🕵️♂️",female_detective:"🕵️♀️",guard:"💂",guardsman:"💂♂️",guardswoman:"💂♀️",ninja:"🥷",construction_worker:"👷",construction_worker_man:"👷♂️",construction_worker_woman:"👷♀️",prince:"🤴",princess:"👸",person_with_turban:"👳",man_with_turban:"👳♂️",woman_with_turban:"👳♀️",man_with_gua_pi_mao:"👲",woman_with_headscarf:"🧕",person_in_tuxedo:"🤵",man_in_tuxedo:"🤵♂️",woman_in_tuxedo:"🤵♀️",person_with_veil:"👰",man_with_veil:"👰♂️",woman_with_veil:"👰♀️",bride_with_veil:"👰♀️",pregnant_woman:"🤰",breast_feeding:"🤱",woman_feeding_baby:"👩🍼",man_feeding_baby:"👨🍼",person_feeding_baby:"🧑🍼",angel:"👼",santa:"🎅",mrs_claus:"🤶",mx_claus:"🧑🎄",superhero:"🦸",superhero_man:"🦸♂️",superhero_woman:"🦸♀️",supervillain:"🦹",supervillain_man:"🦹♂️",supervillain_woman:"🦹♀️",mage:"🧙",mage_man:"🧙♂️",mage_woman:"🧙♀️",fairy:"🧚",fairy_man:"🧚♂️",fairy_woman:"🧚♀️",vampire:"🧛",vampire_man:"🧛♂️",vampire_woman:"🧛♀️",merperson:"🧜",merman:"🧜♂️",mermaid:"🧜♀️",elf:"🧝",elf_man:"🧝♂️",elf_woman:"🧝♀️",genie:"🧞",genie_man:"🧞♂️",genie_woman:"🧞♀️",zombie:"🧟",zombie_man:"🧟♂️",zombie_woman:"🧟♀️",massage:"💆",massage_man:"💆♂️",massage_woman:"💆♀️",haircut:"💇",haircut_man:"💇♂️",haircut_woman:"💇♀️",walking:"🚶",walking_man:"🚶♂️",walking_woman:"🚶♀️",standing_person:"🧍",standing_man:"🧍♂️",standing_woman:"🧍♀️",kneeling_person:"🧎",kneeling_man:"🧎♂️",kneeling_woman:"🧎♀️",person_with_probing_cane:"🧑🦯",man_with_probing_cane:"👨🦯",woman_with_probing_cane:"👩🦯",person_in_motorized_wheelchair:"🧑🦼",man_in_motorized_wheelchair:"👨🦼",woman_in_motorized_wheelchair:"👩🦼",person_in_manual_wheelchair:"🧑🦽",man_in_manual_wheelchair:"👨🦽",woman_in_manual_wheelchair:"👩🦽",runner:"🏃",running:"🏃",running_man:"🏃♂️",running_woman:"🏃♀️",woman_dancing:"💃",dancer:"💃",man_dancing:"🕺",business_suit_levitating:"🕴️",dancers:"👯",dancing_men:"👯♂️",dancing_women:"👯♀️",sauna_person:"🧖",sauna_man:"🧖♂️",sauna_woman:"🧖♀️",climbing:"🧗",climbing_man:"🧗♂️",climbing_woman:"🧗♀️",person_fencing:"🤺",horse_racing:"🏇",skier:"⛷️",snowboarder:"🏂",golfing:"🏌️",golfing_man:"🏌️♂️",golfing_woman:"🏌️♀️",surfer:"🏄",surfing_man:"🏄♂️",surfing_woman:"🏄♀️",rowboat:"🚣",rowing_man:"🚣♂️",rowing_woman:"🚣♀️",swimmer:"🏊",swimming_man:"🏊♂️",swimming_woman:"🏊♀️",bouncing_ball_person:"⛹️",bouncing_ball_man:"⛹️♂️",basketball_man:"⛹️♂️",bouncing_ball_woman:"⛹️♀️",basketball_woman:"⛹️♀️",weight_lifting:"🏋️",weight_lifting_man:"🏋️♂️",weight_lifting_woman:"🏋️♀️",bicyclist:"🚴",biking_man:"🚴♂️",biking_woman:"🚴♀️",mountain_bicyclist:"🚵",mountain_biking_man:"🚵♂️",mountain_biking_woman:"🚵♀️",cartwheeling:"🤸",man_cartwheeling:"🤸♂️",woman_cartwheeling:"🤸♀️",wrestling:"🤼",men_wrestling:"🤼♂️",women_wrestling:"🤼♀️",water_polo:"🤽",man_playing_water_polo:"🤽♂️",woman_playing_water_polo:"🤽♀️",handball_person:"🤾",man_playing_handball:"🤾♂️",woman_playing_handball:"🤾♀️",juggling_person:"🤹",man_juggling:"🤹♂️",woman_juggling:"🤹♀️",lotus_position:"🧘",lotus_position_man:"🧘♂️",lotus_position_woman:"🧘♀️",bath:"🛀",sleeping_bed:"🛌",people_holding_hands:"🧑🤝🧑",two_women_holding_hands:"👭",couple:"👫",two_men_holding_hands:"👬",couplekiss:"💏",couplekiss_man_woman:"👩❤️💋👨",couplekiss_man_man:"👨❤️💋👨",couplekiss_woman_woman:"👩❤️💋👩",couple_with_heart:"💑",couple_with_heart_woman_man:"👩❤️👨",couple_with_heart_man_man:"👨❤️👨",couple_with_heart_woman_woman:"👩❤️👩",family:"👪",family_man_woman_boy:"👨👩👦",family_man_woman_girl:"👨👩👧",family_man_woman_girl_boy:"👨👩👧👦",family_man_woman_boy_boy:"👨👩👦👦",family_man_woman_girl_girl:"👨👩👧👧",family_man_man_boy:"👨👨👦",family_man_man_girl:"👨👨👧",family_man_man_girl_boy:"👨👨👧👦",family_man_man_boy_boy:"👨👨👦👦",family_man_man_girl_girl:"👨👨👧👧",family_woman_woman_boy:"👩👩👦",family_woman_woman_girl:"👩👩👧",family_woman_woman_girl_boy:"👩👩👧👦",family_woman_woman_boy_boy:"👩👩👦👦",family_woman_woman_girl_girl:"👩👩👧👧",family_man_boy:"👨👦",family_man_boy_boy:"👨👦👦",family_man_girl:"👨👧",family_man_girl_boy:"👨👧👦",family_man_girl_girl:"👨👧👧",family_woman_boy:"👩👦",family_woman_boy_boy:"👩👦👦",family_woman_girl:"👩👧",family_woman_girl_boy:"👩👧👦",family_woman_girl_girl:"👩👧👧",speaking_head:"🗣️",bust_in_silhouette:"👤",busts_in_silhouette:"👥",people_hugging:"🫂",footprints:"👣",monkey_face:"🐵",monkey:"🐒",gorilla:"🦍",orangutan:"🦧",dog:"🐶",dog2:"🐕",guide_dog:"🦮",service_dog:"🐕🦺",poodle:"🐩",wolf:"🐺",fox_face:"🦊",raccoon:"🦝",cat:"🐱",cat2:"🐈",black_cat:"🐈⬛",lion:"🦁",tiger:"🐯",tiger2:"🐅",leopard:"🐆",horse:"🐴",racehorse:"🐎",unicorn:"🦄",zebra:"🦓",deer:"🦌",bison:"🦬",cow:"🐮",ox:"🐂",water_buffalo:"🐃",cow2:"🐄",pig:"🐷",pig2:"🐖",boar:"🐗",pig_nose:"🐽",ram:"🐏",sheep:"🐑",goat:"🐐",dromedary_camel:"🐪",camel:"🐫",llama:"🦙",giraffe:"🦒",elephant:"🐘",mammoth:"🦣",rhinoceros:"🦏",hippopotamus:"🦛",mouse:"🐭",mouse2:"🐁",rat:"🐀",hamster:"🐹",rabbit:"🐰",rabbit2:"🐇",chipmunk:"🐿️",beaver:"🦫",hedgehog:"🦔",bat:"🦇",bear:"🐻",polar_bear:"🐻❄️",koala:"🐨",panda_face:"🐼",sloth:"🦥",otter:"🦦",skunk:"🦨",kangaroo:"🦘",badger:"🦡",feet:"🐾",paw_prints:"🐾",turkey:"🦃",chicken:"🐔",rooster:"🐓",hatching_chick:"🐣",baby_chick:"🐤",hatched_chick:"🐥",bird:"🐦",penguin:"🐧",dove:"🕊️",eagle:"🦅",duck:"🦆",swan:"🦢",owl:"🦉",dodo:"🦤",feather:"🪶",flamingo:"🦩",peacock:"🦚",parrot:"🦜",frog:"🐸",crocodile:"🐊",turtle:"🐢",lizard:"🦎",snake:"🐍",dragon_face:"🐲",dragon:"🐉",sauropod:"🦕","t-rex":"🦖",whale:"🐳",whale2:"🐋",dolphin:"🐬",flipper:"🐬",seal:"🦭",fish:"🐟",tropical_fish:"🐠",blowfish:"🐡",shark:"🦈",octopus:"🐙",shell:"🐚",snail:"🐌",butterfly:"🦋",bug:"🐛",ant:"🐜",bee:"🐝",honeybee:"🐝",beetle:"🪲",lady_beetle:"🐞",cricket:"🦗",cockroach:"🪳",spider:"🕷️",spider_web:"🕸️",scorpion:"🦂",mosquito:"🦟",fly:"🪰",worm:"🪱",microbe:"🦠",bouquet:"💐",cherry_blossom:"🌸",white_flower:"💮",rosette:"🏵️",rose:"🌹",wilted_flower:"🥀",hibiscus:"🌺",sunflower:"🌻",blossom:"🌼",tulip:"🌷",seedling:"🌱",potted_plant:"🪴",evergreen_tree:"🌲",deciduous_tree:"🌳",palm_tree:"🌴",cactus:"🌵",ear_of_rice:"🌾",herb:"🌿",shamrock:"☘️",four_leaf_clover:"🍀",maple_leaf:"🍁",fallen_leaf:"🍂",leaves:"🍃",grapes:"🍇",melon:"🍈",watermelon:"🍉",tangerine:"🍊",orange:"🍊",mandarin:"🍊",lemon:"🍋",banana:"🍌",pineapple:"🍍",mango:"🥭",apple:"🍎",green_apple:"🍏",pear:"🍐",peach:"🍑",cherries:"🍒",strawberry:"🍓",blueberries:"🫐",kiwi_fruit:"🥝",tomato:"🍅",olive:"🫒",coconut:"🥥",avocado:"🥑",eggplant:"🍆",potato:"🥔",carrot:"🥕",corn:"🌽",hot_pepper:"🌶️",bell_pepper:"🫑",cucumber:"🥒",leafy_green:"🥬",broccoli:"🥦",garlic:"🧄",onion:"🧅",mushroom:"🍄",peanuts:"🥜",chestnut:"🌰",bread:"🍞",croissant:"🥐",baguette_bread:"🥖",flatbread:"🫓",pretzel:"🥨",bagel:"🥯",pancakes:"🥞",waffle:"🧇",cheese:"🧀",meat_on_bone:"🍖",poultry_leg:"🍗",cut_of_meat:"🥩",bacon:"🥓",hamburger:"🍔",fries:"🍟",pizza:"🍕",hotdog:"🌭",sandwich:"🥪",taco:"🌮",burrito:"🌯",tamale:"🫔",stuffed_flatbread:"🥙",falafel:"🧆",egg:"🥚",fried_egg:"🍳",shallow_pan_of_food:"🥘",stew:"🍲",fondue:"🫕",bowl_with_spoon:"🥣",green_salad:"🥗",popcorn:"🍿",butter:"🧈",salt:"🧂",canned_food:"🥫",bento:"🍱",rice_cracker:"🍘",rice_ball:"🍙",rice:"🍚",curry:"🍛",ramen:"🍜",spaghetti:"🍝",sweet_potato:"🍠",oden:"🍢",sushi:"🍣",fried_shrimp:"🍤",fish_cake:"🍥",moon_cake:"🥮",dango:"🍡",dumpling:"🥟",fortune_cookie:"🥠",takeout_box:"🥡",crab:"🦀",lobster:"🦞",shrimp:"🦐",squid:"🦑",oyster:"🦪",icecream:"🍦",shaved_ice:"🍧",ice_cream:"🍨",doughnut:"🍩",cookie:"🍪",birthday:"🎂",cake:"🍰",cupcake:"🧁",pie:"🥧",chocolate_bar:"🍫",candy:"🍬",lollipop:"🍭",custard:"🍮",honey_pot:"🍯",baby_bottle:"🍼",milk_glass:"🥛",coffee:"☕",teapot:"🫖",tea:"🍵",sake:"🍶",champagne:"🍾",wine_glass:"🍷",cocktail:"🍸",tropical_drink:"🍹",beer:"🍺",beers:"🍻",clinking_glasses:"🥂",tumbler_glass:"🥃",cup_with_straw:"🥤",bubble_tea:"🧋",beverage_box:"🧃",mate:"🧉",ice_cube:"🧊",chopsticks:"🥢",plate_with_cutlery:"🍽️",fork_and_knife:"🍴",spoon:"🥄",hocho:"🔪",knife:"🔪",amphora:"🏺",earth_africa:"🌍",earth_americas:"🌎",earth_asia:"🌏",globe_with_meridians:"🌐",world_map:"🗺️",japan:"🗾",compass:"🧭",mountain_snow:"🏔️",mountain:"⛰️",volcano:"🌋",mount_fuji:"🗻",camping:"🏕️",beach_umbrella:"🏖️",desert:"🏜️",desert_island:"🏝️",national_park:"🏞️",stadium:"🏟️",classical_building:"🏛️",building_construction:"🏗️",bricks:"🧱",rock:"🪨",wood:"🪵",hut:"🛖",houses:"🏘️",derelict_house:"🏚️",house:"🏠",house_with_garden:"🏡",office:"🏢",post_office:"🏣",european_post_office:"🏤",hospital:"🏥",bank:"🏦",hotel:"🏨",love_hotel:"🏩",convenience_store:"🏪",school:"🏫",department_store:"🏬",factory:"🏭",japanese_castle:"🏯",european_castle:"🏰",wedding:"💒",tokyo_tower:"🗼",statue_of_liberty:"🗽",church:"⛪",mosque:"🕌",hindu_temple:"🛕",synagogue:"🕍",shinto_shrine:"⛩️",kaaba:"🕋",fountain:"⛲",tent:"⛺",foggy:"🌁",night_with_stars:"🌃",cityscape:"🏙️",sunrise_over_mountains:"🌄",sunrise:"🌅",city_sunset:"🌆",city_sunrise:"🌇",bridge_at_night:"🌉",hotsprings:"♨️",carousel_horse:"🎠",ferris_wheel:"🎡",roller_coaster:"🎢",barber:"💈",circus_tent:"🎪",steam_locomotive:"🚂",railway_car:"🚃",bullettrain_side:"🚄",bullettrain_front:"🚅",train2:"🚆",metro:"🚇",light_rail:"🚈",station:"🚉",tram:"🚊",monorail:"🚝",mountain_railway:"🚞",train:"🚋",bus:"🚌",oncoming_bus:"🚍",trolleybus:"🚎",minibus:"🚐",ambulance:"🚑",fire_engine:"🚒",police_car:"🚓",oncoming_police_car:"🚔",taxi:"🚕",oncoming_taxi:"🚖",car:"🚗",red_car:"🚗",oncoming_automobile:"🚘",blue_car:"🚙",pickup_truck:"🛻",truck:"🚚",articulated_lorry:"🚛",tractor:"🚜",racing_car:"🏎️",motorcycle:"🏍️",motor_scooter:"🛵",manual_wheelchair:"🦽",motorized_wheelchair:"🦼",auto_rickshaw:"🛺",bike:"🚲",kick_scooter:"🛴",skateboard:"🛹",roller_skate:"🛼",busstop:"🚏",motorway:"🛣️",railway_track:"🛤️",oil_drum:"🛢️",fuelpump:"⛽",rotating_light:"🚨",traffic_light:"🚥",vertical_traffic_light:"🚦",stop_sign:"🛑",construction:"🚧",anchor:"⚓",boat:"⛵",sailboat:"⛵",canoe:"🛶",speedboat:"🚤",passenger_ship:"🛳️",ferry:"⛴️",motor_boat:"🛥️",ship:"🚢",airplane:"✈️",small_airplane:"🛩️",flight_departure:"🛫",flight_arrival:"🛬",parachute:"🪂",seat:"💺",helicopter:"🚁",suspension_railway:"🚟",mountain_cableway:"🚠",aerial_tramway:"🚡",artificial_satellite:"🛰️",rocket:"🚀",flying_saucer:"🛸",bellhop_bell:"🛎️",luggage:"🧳",hourglass:"⌛",hourglass_flowing_sand:"⏳",watch:"⌚",alarm_clock:"⏰",stopwatch:"⏱️",timer_clock:"⏲️",mantelpiece_clock:"🕰️",clock12:"🕛",clock1230:"🕧",clock1:"🕐",clock130:"🕜",clock2:"🕑",clock230:"🕝",clock3:"🕒",clock330:"🕞",clock4:"🕓",clock430:"🕟",clock5:"🕔",clock530:"🕠",clock6:"🕕",clock630:"🕡",clock7:"🕖",clock730:"🕢",clock8:"🕗",clock830:"🕣",clock9:"🕘",clock930:"🕤",clock10:"🕙",clock1030:"🕥",clock11:"🕚",clock1130:"🕦",new_moon:"🌑",waxing_crescent_moon:"🌒",first_quarter_moon:"🌓",moon:"🌔",waxing_gibbous_moon:"🌔",full_moon:"🌕",waning_gibbous_moon:"🌖",last_quarter_moon:"🌗",waning_crescent_moon:"🌘",crescent_moon:"🌙",new_moon_with_face:"🌚",first_quarter_moon_with_face:"🌛",last_quarter_moon_with_face:"🌜",thermometer:"🌡️",sunny:"☀️",full_moon_with_face:"🌝",sun_with_face:"🌞",ringed_planet:"🪐",star:"⭐",star2:"🌟",stars:"🌠",milky_way:"🌌",cloud:"☁️",partly_sunny:"⛅",cloud_with_lightning_and_rain:"⛈️",sun_behind_small_cloud:"🌤️",sun_behind_large_cloud:"🌥️",sun_behind_rain_cloud:"🌦️",cloud_with_rain:"🌧️",cloud_with_snow:"🌨️",cloud_with_lightning:"🌩️",tornado:"🌪️",fog:"🌫️",wind_face:"🌬️",cyclone:"🌀",rainbow:"🌈",closed_umbrella:"🌂",open_umbrella:"☂️",umbrella:"☔",parasol_on_ground:"⛱️",zap:"⚡",snowflake:"❄️",snowman_with_snow:"☃️",snowman:"⛄",comet:"☄️",fire:"🔥",droplet:"💧",ocean:"🌊",jack_o_lantern:"🎃",christmas_tree:"🎄",fireworks:"🎆",sparkler:"🎇",firecracker:"🧨",sparkles:"✨",balloon:"🎈",tada:"🎉",confetti_ball:"🎊",tanabata_tree:"🎋",bamboo:"🎍",dolls:"🎎",flags:"🎏",wind_chime:"🎐",rice_scene:"🎑",red_envelope:"🧧",ribbon:"🎀",gift:"🎁",reminder_ribbon:"🎗️",tickets:"🎟️",ticket:"🎫",medal_military:"🎖️",trophy:"🏆",medal_sports:"🏅","1st_place_medal":"🥇","2nd_place_medal":"🥈","3rd_place_medal":"🥉",soccer:"⚽",baseball:"⚾",softball:"🥎",basketball:"🏀",volleyball:"🏐",football:"🏈",rugby_football:"🏉",tennis:"🎾",flying_disc:"🥏",bowling:"🎳",cricket_game:"🏏",field_hockey:"🏑",ice_hockey:"🏒",lacrosse:"🥍",ping_pong:"🏓",badminton:"🏸",boxing_glove:"🥊",martial_arts_uniform:"🥋",goal_net:"🥅",golf:"⛳",ice_skate:"⛸️",fishing_pole_and_fish:"🎣",diving_mask:"🤿",running_shirt_with_sash:"🎽",ski:"🎿",sled:"🛷",curling_stone:"🥌",dart:"🎯",yo_yo:"🪀",kite:"🪁","8ball":"🎱",crystal_ball:"🔮",magic_wand:"🪄",nazar_amulet:"🧿",video_game:"🎮",joystick:"🕹️",slot_machine:"🎰",game_die:"🎲",jigsaw:"🧩",teddy_bear:"🧸",pinata:"🪅",nesting_dolls:"🪆",spades:"♠️",hearts:"♥️",diamonds:"♦️",clubs:"♣️",chess_pawn:"♟️",black_joker:"🃏",mahjong:"🀄",flower_playing_cards:"🎴",performing_arts:"🎭",framed_picture:"🖼️",art:"🎨",thread:"🧵",sewing_needle:"🪡",yarn:"🧶",knot:"🪢",eyeglasses:"👓",dark_sunglasses:"🕶️",goggles:"🥽",lab_coat:"🥼",safety_vest:"🦺",necktie:"👔",shirt:"👕",tshirt:"👕",jeans:"👖",scarf:"🧣",gloves:"🧤",coat:"🧥",socks:"🧦",dress:"👗",kimono:"👘",sari:"🥻",one_piece_swimsuit:"🩱",swim_brief:"🩲",shorts:"🩳",bikini:"👙",womans_clothes:"👚",purse:"👛",handbag:"👜",pouch:"👝",shopping:"🛍️",school_satchel:"🎒",thong_sandal:"🩴",mans_shoe:"👞",shoe:"👞",athletic_shoe:"👟",hiking_boot:"🥾",flat_shoe:"🥿",high_heel:"👠",sandal:"👡",ballet_shoes:"🩰",boot:"👢",crown:"👑",womans_hat:"👒",tophat:"🎩",mortar_board:"🎓",billed_cap:"🧢",military_helmet:"🪖",rescue_worker_helmet:"⛑️",prayer_beads:"📿",lipstick:"💄",ring:"💍",gem:"💎",mute:"🔇",speaker:"🔈",sound:"🔉",loud_sound:"🔊",loudspeaker:"📢",mega:"📣",postal_horn:"📯",bell:"🔔",no_bell:"🔕",musical_score:"🎼",musical_note:"🎵",notes:"🎶",studio_microphone:"🎙️",level_slider:"🎚️",control_knobs:"🎛️",microphone:"🎤",headphones:"🎧",radio:"📻",saxophone:"🎷",accordion:"🪗",guitar:"🎸",musical_keyboard:"🎹",trumpet:"🎺",violin:"🎻",banjo:"🪕",drum:"🥁",long_drum:"🪘",iphone:"📱",calling:"📲",phone:"☎️",telephone:"☎️",telephone_receiver:"📞",pager:"📟",fax:"📠",battery:"🔋",electric_plug:"🔌",computer:"💻",desktop_computer:"🖥️",printer:"🖨️",keyboard:"⌨️",computer_mouse:"🖱️",trackball:"🖲️",minidisc:"💽",floppy_disk:"💾",cd:"💿",dvd:"📀",abacus:"🧮",movie_camera:"🎥",film_strip:"🎞️",film_projector:"📽️",clapper:"🎬",tv:"📺",camera:"📷",camera_flash:"📸",video_camera:"📹",vhs:"📼",mag:"🔍",mag_right:"🔎",candle:"🕯️",bulb:"💡",flashlight:"🔦",izakaya_lantern:"🏮",lantern:"🏮",diya_lamp:"🪔",notebook_with_decorative_cover:"📔",closed_book:"📕",book:"📖",open_book:"📖",green_book:"📗",blue_book:"📘",orange_book:"📙",books:"📚",notebook:"📓",ledger:"📒",page_with_curl:"📃",scroll:"📜",page_facing_up:"📄",newspaper:"📰",newspaper_roll:"🗞️",bookmark_tabs:"📑",bookmark:"🔖",label:"🏷️",moneybag:"💰",coin:"🪙",yen:"💴",dollar:"💵",euro:"💶",pound:"💷",money_with_wings:"💸",credit_card:"💳",receipt:"🧾",chart:"💹",envelope:"✉️",email:"📧","e-mail":"📧",incoming_envelope:"📨",envelope_with_arrow:"📩",outbox_tray:"📤",inbox_tray:"📥",package:"📦",mailbox:"📫",mailbox_closed:"📪",mailbox_with_mail:"📬",mailbox_with_no_mail:"📭",postbox:"📮",ballot_box:"🗳️",pencil2:"✏️",black_nib:"✒️",fountain_pen:"🖋️",pen:"🖊️",paintbrush:"🖌️",crayon:"🖍️",memo:"📝",pencil:"📝",briefcase:"💼",file_folder:"📁",open_file_folder:"📂",card_index_dividers:"🗂️",date:"📅",calendar:"📆",spiral_notepad:"🗒️",spiral_calendar:"🗓️",card_index:"📇",chart_with_upwards_trend:"📈",chart_with_downwards_trend:"📉",bar_chart:"📊",clipboard:"📋",pushpin:"📌",round_pushpin:"📍",paperclip:"📎",paperclips:"🖇️",straight_ruler:"📏",triangular_ruler:"📐",scissors:"✂️",card_file_box:"🗃️",file_cabinet:"🗄️",wastebasket:"🗑️",lock:"🔒",unlock:"🔓",lock_with_ink_pen:"🔏",closed_lock_with_key:"🔐",key:"🔑",old_key:"🗝️",hammer:"🔨",axe:"🪓",pick:"⛏️",hammer_and_pick:"⚒️",hammer_and_wrench:"🛠️",dagger:"🗡️",crossed_swords:"⚔️",gun:"🔫",boomerang:"🪃",bow_and_arrow:"🏹",shield:"🛡️",carpentry_saw:"🪚",wrench:"🔧",screwdriver:"🪛",nut_and_bolt:"🔩",gear:"⚙️",clamp:"🗜️",balance_scale:"⚖️",probing_cane:"🦯",link:"🔗",chains:"⛓️",hook:"🪝",toolbox:"🧰",magnet:"🧲",ladder:"🪜",alembic:"⚗️",test_tube:"🧪",petri_dish:"🧫",dna:"🧬",microscope:"🔬",telescope:"🔭",satellite:"📡",syringe:"💉",drop_of_blood:"🩸",pill:"💊",adhesive_bandage:"🩹",stethoscope:"🩺",door:"🚪",elevator:"🛗",mirror:"🪞",window:"🪟",bed:"🛏️",couch_and_lamp:"🛋️",chair:"🪑",toilet:"🚽",plunger:"🪠",shower:"🚿",bathtub:"🛁",mouse_trap:"🪤",razor:"🪒",lotion_bottle:"🧴",safety_pin:"🧷",broom:"🧹",basket:"🧺",roll_of_paper:"🧻",bucket:"🪣",soap:"🧼",toothbrush:"🪥",sponge:"🧽",fire_extinguisher:"🧯",shopping_cart:"🛒",smoking:"🚬",coffin:"⚰️",headstone:"🪦",funeral_urn:"⚱️",moyai:"🗿",placard:"🪧",atm:"🏧",put_litter_in_its_place:"🚮",potable_water:"🚰",wheelchair:"♿",mens:"🚹",womens:"🚺",restroom:"🚻",baby_symbol:"🚼",wc:"🚾",passport_control:"🛂",customs:"🛃",baggage_claim:"🛄",left_luggage:"🛅",warning:"⚠️",children_crossing:"🚸",no_entry:"⛔",no_entry_sign:"🚫",no_bicycles:"🚳",no_smoking:"🚭",do_not_litter:"🚯","non-potable_water":"🚱",no_pedestrians:"🚷",no_mobile_phones:"📵",underage:"🔞",radioactive:"☢️",biohazard:"☣️",arrow_up:"⬆️",arrow_upper_right:"↗️",arrow_right:"➡️",arrow_lower_right:"↘️",arrow_down:"⬇️",arrow_lower_left:"↙️",arrow_left:"⬅️",arrow_upper_left:"↖️",arrow_up_down:"↕️",left_right_arrow:"↔️",leftwards_arrow_with_hook:"↩️",arrow_right_hook:"↪️",arrow_heading_up:"⤴️",arrow_heading_down:"⤵️",arrows_clockwise:"🔃",arrows_counterclockwise:"🔄",back:"🔙",end:"🔚",on:"🔛",soon:"🔜",top:"🔝",place_of_worship:"🛐",atom_symbol:"⚛️",om:"🕉️",star_of_david:"✡️",wheel_of_dharma:"☸️",yin_yang:"☯️",latin_cross:"✝️",orthodox_cross:"☦️",star_and_crescent:"☪️",peace_symbol:"☮️",menorah:"🕎",six_pointed_star:"🔯",aries:"♈",taurus:"♉",gemini:"♊",cancer:"♋",leo:"♌",virgo:"♍",libra:"♎",scorpius:"♏",sagittarius:"♐",capricorn:"♑",aquarius:"♒",pisces:"♓",ophiuchus:"⛎",twisted_rightwards_arrows:"🔀",repeat:"🔁",repeat_one:"🔂",arrow_forward:"▶️",fast_forward:"⏩",next_track_button:"⏭️",play_or_pause_button:"⏯️",arrow_backward:"◀️",rewind:"⏪",previous_track_button:"⏮️",arrow_up_small:"🔼",arrow_double_up:"⏫",arrow_down_small:"🔽",arrow_double_down:"⏬",pause_button:"⏸️",stop_button:"⏹️",record_button:"⏺️",eject_button:"⏏️",cinema:"🎦",low_brightness:"🔅",high_brightness:"🔆",signal_strength:"📶",vibration_mode:"📳",mobile_phone_off:"📴",female_sign:"♀️",male_sign:"♂️",transgender_symbol:"⚧️",heavy_multiplication_x:"✖️",heavy_plus_sign:"➕",heavy_minus_sign:"➖",heavy_division_sign:"➗",infinity:"♾️",bangbang:"‼️",interrobang:"⁉️",question:"❓",grey_question:"❔",grey_exclamation:"❕",exclamation:"❗",heavy_exclamation_mark:"❗",wavy_dash:"〰️",currency_exchange:"💱",heavy_dollar_sign:"💲",medical_symbol:"⚕️",recycle:"♻️",fleur_de_lis:"⚜️",trident:"🔱",name_badge:"📛",beginner:"🔰",o:"⭕",white_check_mark:"✅",ballot_box_with_check:"☑️",heavy_check_mark:"✔️",x:"❌",negative_squared_cross_mark:"❎",curly_loop:"➰",loop:"➿",part_alternation_mark:"〽️",eight_spoked_asterisk:"✳️",eight_pointed_black_star:"✴️",sparkle:"❇️",copyright:"©️",registered:"®️",tm:"™️",hash:"#️⃣",asterisk:"*️⃣",zero:"0️⃣",one:"1️⃣",two:"2️⃣",three:"3️⃣",four:"4️⃣",five:"5️⃣",six:"6️⃣",seven:"7️⃣",eight:"8️⃣",nine:"9️⃣",keycap_ten:"🔟",capital_abcd:"🔠",abcd:"🔡",symbols:"🔣",abc:"🔤",a:"🅰️",ab:"🆎",b:"🅱️",cl:"🆑",cool:"🆒",free:"🆓",information_source:"ℹ️",id:"🆔",m:"Ⓜ️",new:"🆕",ng:"🆖",o2:"🅾️",ok:"🆗",parking:"🅿️",sos:"🆘",up:"🆙",vs:"🆚",koko:"🈁",sa:"🈂️",ideograph_advantage:"🉐",accept:"🉑",congratulations:"㊗️",secret:"㊙️",u6e80:"🈵",red_circle:"🔴",orange_circle:"🟠",yellow_circle:"🟡",green_circle:"🟢",large_blue_circle:"🔵",purple_circle:"🟣",brown_circle:"🟤",black_circle:"⚫",white_circle:"⚪",red_square:"🟥",orange_square:"🟧",yellow_square:"🟨",green_square:"🟩",blue_square:"🟦",purple_square:"🟪",brown_square:"🟫",black_large_square:"⬛",white_large_square:"⬜",black_medium_square:"◼️",white_medium_square:"◻️",black_medium_small_square:"◾",white_medium_small_square:"◽",black_small_square:"▪️",white_small_square:"▫️",large_orange_diamond:"🔶",large_blue_diamond:"🔷",small_orange_diamond:"🔸",small_blue_diamond:"🔹",small_red_triangle:"🔺",small_red_triangle_down:"🔻",diamond_shape_with_a_dot_inside:"💠",radio_button:"🔘",white_square_button:"🔳",black_square_button:"🔲",checkered_flag:"🏁",triangular_flag_on_post:"🚩",crossed_flags:"🎌",black_flag:"🏴",white_flag:"🏳️",rainbow_flag:"🏳️🌈",transgender_flag:"🏳️⚧️",pirate_flag:"🏴☠️",ascension_island:"🇦🇨",andorra:"🇦🇩",united_arab_emirates:"🇦🇪",afghanistan:"🇦🇫",antigua_barbuda:"🇦🇬",anguilla:"🇦🇮",albania:"🇦🇱",armenia:"🇦🇲",angola:"🇦🇴",antarctica:"🇦🇶",argentina:"🇦🇷",american_samoa:"🇦🇸",austria:"🇦🇹",australia:"🇦🇺",aruba:"🇦🇼",aland_islands:"🇦🇽",azerbaijan:"🇦🇿",bosnia_herzegovina:"🇧🇦",barbados:"🇧🇧",bangladesh:"🇧🇩",belgium:"🇧🇪",burkina_faso:"🇧🇫",bulgaria:"🇧🇬",bahrain:"🇧🇭",burundi:"🇧🇮",benin:"🇧🇯",st_barthelemy:"🇧🇱",bermuda:"🇧🇲",brunei:"🇧🇳",bolivia:"🇧🇴",caribbean_netherlands:"🇧🇶",brazil:"🇧🇷",bahamas:"🇧🇸",bhutan:"🇧🇹",bouvet_island:"🇧🇻",botswana:"🇧🇼",belarus:"🇧🇾",belize:"🇧🇿",canada:"🇨🇦",cocos_islands:"🇨🇨",congo_kinshasa:"🇨🇩",central_african_republic:"🇨🇫",congo_brazzaville:"🇨🇬",switzerland:"🇨🇭",cote_divoire:"🇨🇮",cook_islands:"🇨🇰",chile:"🇨🇱",cameroon:"🇨🇲",cn:"🇨🇳",colombia:"🇨🇴",clipperton_island:"🇨🇵",costa_rica:"🇨🇷",cuba:"🇨🇺",cape_verde:"🇨🇻",curacao:"🇨🇼",christmas_island:"🇨🇽",cyprus:"🇨🇾",czech_republic:"🇨🇿",de:"🇩🇪",diego_garcia:"🇩🇬",djibouti:"🇩🇯",denmark:"🇩🇰",dominica:"🇩🇲",dominican_republic:"🇩🇴",algeria:"🇩🇿",ceuta_melilla:"🇪🇦",ecuador:"🇪🇨",estonia:"🇪🇪",egypt:"🇪🇬",western_sahara:"🇪🇭",eritrea:"🇪🇷",es:"🇪🇸",ethiopia:"🇪🇹",eu:"🇪🇺",european_union:"🇪🇺",finland:"🇫🇮",fiji:"🇫🇯",falkland_islands:"🇫🇰",micronesia:"🇫🇲",faroe_islands:"🇫🇴",fr:"🇫🇷",gabon:"🇬🇦",gb:"🇬🇧",uk:"🇬🇧",grenada:"🇬🇩",georgia:"🇬🇪",french_guiana:"🇬🇫",guernsey:"🇬🇬",ghana:"🇬🇭",gibraltar:"🇬🇮",greenland:"🇬🇱",gambia:"🇬🇲",guinea:"🇬🇳",guadeloupe:"🇬🇵",equatorial_guinea:"🇬🇶",greece:"🇬🇷",south_georgia_south_sandwich_islands:"🇬🇸",guatemala:"🇬🇹",guam:"🇬🇺",guinea_bissau:"🇬🇼",guyana:"🇬🇾",hong_kong:"🇭🇰",heard_mcdonald_islands:"🇭🇲",honduras:"🇭🇳",croatia:"🇭🇷",haiti:"🇭🇹",hungary:"🇭🇺",canary_islands:"🇮🇨",indonesia:"🇮🇩",ireland:"🇮🇪",israel:"🇮🇱",isle_of_man:"🇮🇲",india:"🇮🇳",british_indian_ocean_territory:"🇮🇴",iraq:"🇮🇶",iran:"🇮🇷",iceland:"🇮🇸",it:"🇮🇹",jersey:"🇯🇪",jamaica:"🇯🇲",jordan:"🇯🇴",jp:"🇯🇵",kenya:"🇰🇪",kyrgyzstan:"🇰🇬",cambodia:"🇰🇭",kiribati:"🇰🇮",comoros:"🇰🇲",st_kitts_nevis:"🇰🇳",north_korea:"🇰🇵",kr:"🇰🇷",kuwait:"🇰🇼",cayman_islands:"🇰🇾",kazakhstan:"🇰🇿",laos:"🇱🇦",lebanon:"🇱🇧",st_lucia:"🇱🇨",liechtenstein:"🇱🇮",sri_lanka:"🇱🇰",liberia:"🇱🇷",lesotho:"🇱🇸",lithuania:"🇱🇹",luxembourg:"🇱🇺",latvia:"🇱🇻",libya:"🇱🇾",morocco:"🇲🇦",monaco:"🇲🇨",moldova:"🇲🇩",montenegro:"🇲🇪",st_martin:"🇲🇫",madagascar:"🇲🇬",marshall_islands:"🇲🇭",macedonia:"🇲🇰",mali:"🇲🇱",myanmar:"🇲🇲",mongolia:"🇲🇳",macau:"🇲🇴",northern_mariana_islands:"🇲🇵",martinique:"🇲🇶",mauritania:"🇲🇷",montserrat:"🇲🇸",malta:"🇲🇹",mauritius:"🇲🇺",maldives:"🇲🇻",malawi:"🇲🇼",mexico:"🇲🇽",malaysia:"🇲🇾",mozambique:"🇲🇿",namibia:"🇳🇦",new_caledonia:"🇳🇨",niger:"🇳🇪",norfolk_island:"🇳🇫",nigeria:"🇳🇬",nicaragua:"🇳🇮",netherlands:"🇳🇱",norway:"🇳🇴",nepal:"🇳🇵",nauru:"🇳🇷",niue:"🇳🇺",new_zealand:"🇳🇿",oman:"🇴🇲",panama:"🇵🇦",peru:"🇵🇪",french_polynesia:"🇵🇫",papua_new_guinea:"🇵🇬",philippines:"🇵🇭",pakistan:"🇵🇰",poland:"🇵🇱",st_pierre_miquelon:"🇵🇲",pitcairn_islands:"🇵🇳",puerto_rico:"🇵🇷",palestinian_territories:"🇵🇸",portugal:"🇵🇹",palau:"🇵🇼",paraguay:"🇵🇾",qatar:"🇶🇦",reunion:"🇷🇪",romania:"🇷🇴",serbia:"🇷🇸",ru:"🇷🇺",rwanda:"🇷🇼",saudi_arabia:"🇸🇦",solomon_islands:"🇸🇧",seychelles:"🇸🇨",sudan:"🇸🇩",sweden:"🇸🇪",singapore:"🇸🇬",st_helena:"🇸🇭",slovenia:"🇸🇮",svalbard_jan_mayen:"🇸🇯",slovakia:"🇸🇰",sierra_leone:"🇸🇱",san_marino:"🇸🇲",senegal:"🇸🇳",somalia:"🇸🇴",suriname:"🇸🇷",south_sudan:"🇸🇸",sao_tome_principe:"🇸🇹",el_salvador:"🇸🇻",sint_maarten:"🇸🇽",syria:"🇸🇾",swaziland:"🇸🇿",tristan_da_cunha:"🇹🇦",turks_caicos_islands:"🇹🇨",chad:"🇹🇩",french_southern_territories:"🇹🇫",togo:"🇹🇬",thailand:"🇹🇭",tajikistan:"🇹🇯",tokelau:"🇹🇰",timor_leste:"🇹🇱",turkmenistan:"🇹🇲",tunisia:"🇹🇳",tonga:"🇹🇴",tr:"🇹🇷",trinidad_tobago:"🇹🇹",tuvalu:"🇹🇻",taiwan:"🇹🇼",tanzania:"🇹🇿",ukraine:"🇺🇦",uganda:"🇺🇬",us_outlying_islands:"🇺🇲",united_nations:"🇺🇳",us:"🇺🇸",uruguay:"🇺🇾",uzbekistan:"🇺🇿",vatican_city:"🇻🇦",st_vincent_grenadines:"🇻🇨",venezuela:"🇻🇪",british_virgin_islands:"🇻🇬",us_virgin_islands:"🇻🇮",vietnam:"🇻🇳",vanuatu:"🇻🇺",wallis_futuna:"🇼🇫",samoa:"🇼🇸",kosovo:"🇽🇰",yemen:"🇾🇪",mayotte:"🇾🇹",south_africa:"🇿🇦",zambia:"🇿🇲",zimbabwe:"🇿🇼",england:"🏴",scotland:"🏴",wales:"🏴"};Object.keys(yn).reduce((e,t)=>{const n=yn[t];return e[n]=t,e},{});const ep=Object.keys(yn).map(e=>e);Object.keys(yn).map(e=>yn[e]);function tp(e){return ep.filter(t=>t.startsWith(e)).map(t=>({name:t,emoji:yn[t]}))}const np=200,ip=new T.PluginKey("emoji"),rp=T.Node.create({name:"emoji",content:"text*",priority:np,addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),HTMLAttributes:{},suggestion:{char:":",pluginKey:ip,command:({editor:t,range:n,props:i})=>{t.chain().focus().insertContentAt(n,`${i.emoji} `).run()}},button:({editor:t,t:n})=>({component:Jg,componentProps:{editor:t,action:()=>{},isActive:()=>!1,disabled:!1,icon:"EmojiIcon",tooltip:n("editor.emoji.tooltip")}})}},addCommands(){return{setEmoji:e=>({commands:t})=>t.insertContent(`${e.emoji} `)}},addProseMirrorPlugins(){return[mo({editor:this.editor,...this.options.suggestion})]}}).configure({suggestion:{items:({query:e})=>tp(e),render:()=>{let e,t,n;return{onStart:i=>{n=i.editor.isEditable,n&&(e=new T.ReactRenderer(Zu,{props:i,editor:i.editor}),t=no("body",{getReferenceClientRect:i.clientRect,appendTo:()=>document.body,content:e.element,showOnCreate:!0,interactive:!0,trigger:"manual",placement:"bottom-start"}))},onUpdate(i){n&&(e.updateProps(i),t[0].setProps({getReferenceClientRect:i.clientRect}))},onKeyDown(i){var r;if(n)return i.event.key==="Escape"?(t[0].hide(),!0):(r=e.ref)==null?void 0:r.onKeyDown(i)},onExit(){n&&(t[0].destroy(),e.destroy())}}}}});function ap(e){const t=document.createElement("iframe");t.setAttribute("style","position: absolute; width: 0; height: 0; top: 0; left: 0;"),document.body.appendChild(t),t.textContent=`
|
|
9
|
+
`},addCommands(){return{setHardBreak:()=>({commands:e,chain:t,state:n,editor:i})=>e.first([()=>e.exitCode(),()=>e.command(()=>{const{selection:r,storedMarks:a}=n;if(r.$from.parent.type.spec.isolating)return!1;const{keepMarks:o}=this.options,{splittableMarks:s}=i.extensionManager,c=a||r.$to.parentOffset&&r.$from.marks();return t().insertContent({type:this.name}).command(({tr:u,dispatch:l})=>{if(l&&c&&o){const f=c.filter(g=>s.includes(g.type.name));u.ensureMarks(f)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),lg=T.Node.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:e}){return["li",T.mergeAttributes(this.options.HTMLAttributes,e),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),dg=T.Node.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:e}){return["p",T.mergeAttributes(this.options.HTMLAttributes,e),0]},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),hg=T.Extension.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){return[new T.Plugin({key:new T.PluginKey("placeholder"),props:{decorations:({doc:e,selection:t})=>{const n=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:i}=t,r=[];if(!n)return null;const a=this.editor.isEmpty;return e.descendants((o,s)=>{const c=i>=s&&i<=s+o.nodeSize,u=!o.isLeaf&&T.isNodeEmpty(o);if((c||!this.options.showOnlyCurrent)&&u){const l=[this.options.emptyNodeClass];a&&l.push(this.options.emptyEditorClass);const f=T.Decoration.node(s,s+o.nodeSize,{class:l.join(" "),"data-placeholder":typeof this.options.placeholder=="function"?this.options.placeholder({editor:this.editor,node:o,pos:s,hasAnchor:c}):this.options.placeholder});r.push(f)}return this.options.includeChildren}),T.DecorationSet.create(e,r)}}})]}}),fg=T.Node.create({name:"text",group:"inline"}),gg=T.Node.create({name:"doc",topNode:!0,content:"block+"}),pg=gg.extend({content:"(block|columns)+"}),mg=T.Extension.create({name:"columnActionButton",addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),button:({editor:t,t:n})=>({component:T.ActionButton,componentProps:{action:()=>{t.chain().focus().insertColumns({cols:2}).run()},icon:"Columns",tooltip:n("editor.columns.tooltip")}})}}}),bg=T.Extension.create({name:"selection",addProseMirrorPlugins(){const{editor:e}=this;return[new T.Plugin({key:new T.PluginKey("selection"),props:{decorations(t){return t.selection.empty||e.isFocused===!0?null:T.DecorationSet.create(t.doc,[T.Decoration.inline(t.selection.from,t.selection.to,{class:"selection"})])}}})]}});function yg(e){const{t}=Ce.useLocale(),n=pe.useMemo(()=>[{name:"paragraph",label:t("editor.paragraph.tooltip"),iconName:"Heading1",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:t("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:t("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:t("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:t("editor.bulletlist.tooltip"),isActive:()=>e.editor.isActive("bulletList"),iconName:"List",action:()=>e.editor.chain().focus().clearNodes().toggleBulletList().run()},{name:"numberedList",label:t("editor.orderedlist.tooltip"),isActive:()=>e.editor.isActive("orderedList"),iconName:"ListOrdered",action:()=>e.editor.chain().focus().clearNodes().toggleOrderedList().run()},{name:"taskList",label:t("editor.tasklist.tooltip"),isActive:()=>e.editor.isActive("taskList"),iconName:"ListTodo",action:()=>e.editor.chain().focus().clearNodes().toggleTaskList().run()},{name:"blockquote",label:t("editor.blockquote.tooltip"),isActive:()=>e.editor.isActive("blockquote"),iconName:"TextQuote",action:()=>e.editor.chain().focus().clearNodes().toggleBlockquote().run()},{name:"codeBlock",label:t("editor.codeblock.tooltip"),isActive:()=>e.editor.isActive("codeBlock"),iconName:"Code2",action:()=>e.editor.chain().focus().clearNodes().toggleCodeBlock().run()}],[e.editor,t]),i=pe.useMemo(()=>n.findLast(r=>r.isActive())??{label:"Empty"},[n]);return O.jsxs(T.DropdownMenu,{children:[O.jsx(T.DropdownMenuTrigger,{asChild:!0,children:O.jsxs(T.Button,{className:"flex h-[32px] gap-1 px-1.5",variant:"ghost",children:[O.jsxs("span",{className:"whitespace-nowrap text-sm font-normal",children:[" ",i==null?void 0:i.label]}),O.jsx($e.ChevronDown,{className:"size-4"})]})}),O.jsx(T.DropdownMenuContent,{align:"start",className:"w-full p-1",hideWhenDetached:!0,sideOffset:5,children:n.map((r,a)=>{var s;const o=T.icons[r.iconName];return O.jsx(T.DropdownMenuCheckboxItem,{checked:((s=r.isActive)==null?void 0:s.call(r))||!1,className:"cursor-pointer",onClick:()=>r.action(),children:O.jsxs("div",{className:"flex items-center gap-2 px-2",children:[O.jsx(o,{className:"h3 w-3"}),O.jsxs("span",{children:[" ",r.label]})]})},`text-bubble-${a}`)})})]})}const xg=T.Extension.create({name:"text-bubble",addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),toolbar:!1,button:()=>({component:yg,componentProps:{}})}}});function ws({types:e,node:t}){return Array.isArray(e)&&e.includes(t.type)||t.type===e}const Dg=T.Extension.create({name:"trailingNode",addOptions(){return{node:"paragraph",notAfter:["paragraph"]}},addProseMirrorPlugins(){const e=new T.PluginKey(this.name),t=Object.entries(this.editor.schema.nodes).map(([,n])=>n).filter(n=>this.options.notAfter.includes(n.name));return[new T.Plugin({key:e,appendTransaction:(n,i,r)=>{const{doc:a,tr:o,schema:s}=r,c=e.getState(r),u=a.content.size,l=s.nodes[this.options.node];if(c)return o.insert(u,l.create())},state:{init:(n,i)=>{const r=i.tr.doc.lastChild;return!ws({node:r,types:t})},apply:(n,i)=>{if(!n.docChanged)return i;const r=n.doc.lastChild;return!ws({node:r,types:t})}}})]}}),vg=T.Extension.create({name:"base-kit",addExtensions(){const e=[];return this.options.document!==!1&&e.push(pg.configure()),this.options.placeholder!==!1&&e.push(hg.configure({placeholder:({node:t,pos:n,editor:i})=>{var r,a,o,s,c;return((r=t==null?void 0:t.type)==null?void 0:r.name)==="columns"||((a=t==null?void 0:t.content)==null?void 0:a.size)!==0?"":((o=t==null?void 0:t.type)==null?void 0:o.name)==="heading"?`${Ce.localeActions.t(`editor.heading.h${t.attrs.level}.tooltip`)}`:((s=t==null?void 0:t.type)==null?void 0:s.name)==="codeBlock"||((c=t==null?void 0:t.type)==null?void 0:c.name)==="table"?"":i.extensionManager.extensions.some(u=>u.name==="slashCommand")?Ce.localeActions.t("editor.slash"):Ce.localeActions.t("editor.content")},...this.options.placeholder})),this.options.focus!==!1&&e.push(eg.configure({className:"focus",...this.options.focus})),this.options.text!==!1&&e.push(fg.configure()),this.options.textBubble!==!1&&e.push(xg.configure()),this.options.gapcursor!==!1&&e.push(cg.configure()),this.options.dropcursor!==!1&&e.push(Jf.configure({...this.options.dropcursor,width:2,class:"ProseMirror-dropcursor border-black"})),this.options.characterCount!==!1&&e.push(Zf.configure(this.options.characterCount)),this.options.paragraph!==!1&&e.push(dg.configure(this.options.paragraph)),this.options.hardBreak!==!1&&e.push(ug.configure(this.options.hardBreak)),this.options.listItem!==!1&&e.push(lg.configure(this.options.listItem)),this.options.textStyle!==!1&&e.push(kh.configure(this.options.textStyle)),this.options.trailingNode!==!1&&e.push(Dg.configure(this.options.trailingNode)),this.options.selection!==!1&&e.push(bg),this.options.multiColumn!==!1&&e.push(T.Column,T.MultiColumn),e}}),$u=T.Mark.create({name:"subscript",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"sub"},{style:"vertical-align",getAttrs(e){return e!=="sub"?!1:null}}]},renderHTML({HTMLAttributes:e}){return["sub",T.mergeAttributes(this.options.HTMLAttributes,e),0]},addCommands(){return{setSubscript:()=>({commands:e})=>e.setMark(this.name),toggleSubscript:()=>({commands:e})=>e.toggleMark(this.name),unsetSubscript:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-,":()=>this.editor.commands.toggleSubscript()}}}),Ku=T.Mark.create({name:"superscript",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"sup"},{style:"vertical-align",getAttrs(e){return e!=="super"?!1:null}}]},renderHTML({HTMLAttributes:e}){return["sup",T.mergeAttributes(this.options.HTMLAttributes,e),0]},addCommands(){return{setSuperscript:()=>({commands:e})=>e.setMark(this.name),toggleSuperscript:()=>({commands:e})=>e.toggleMark(this.name),unsetSuperscript:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-.":()=>this.editor.commands.toggleSuperscript()}}}),_g=T.Extension.create({name:"subAndSuperScript",addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),button:({editor:t,extension:n,t:i})=>{const r=n.options.subscript,a=n.options.superscript,o={component:T.ActionButton,componentProps:{action:()=>t.commands.toggleSubscript(),isActive:()=>t.isActive("subscript")||!1,disabled:!t.can().toggleSubscript(),icon:"Subscript",tooltip:i("editor.subscript.tooltip")}},s={component:T.ActionButton,componentProps:{action:()=>t.commands.toggleSuperscript(),isActive:()=>t.isActive("superscript")||!1,disabled:!t.can().toggleSuperscript(),icon:"Superscript",tooltip:i("editor.superscript.tooltip")}},c=[];return r!==!1&&c.push(o),a!==!1&&c.push(s),c}}},addExtensions(){const e=[];return this.options.subscript!==!1&&e.push($u.configure(this.options.subscript)),this.options.superscript!==!1&&e.push(Ku.configure(this.options.superscript)),e}});function wg(e){var n;const t=pe.useMemo(()=>{var a;const i=(a=e==null?void 0:e.items)==null?void 0:a.find(o=>o.isActive());return i&&!i.default?{...i,icon:i!=null&&i.icon?i==null?void 0:i.icon:e==null?void 0:e.icon}:{title:e.tooltip,icon:e.icon,isActive:()=>!1}},[e]);return O.jsxs(T.DropdownMenu,{children:[O.jsx(T.DropdownMenuTrigger,{asChild:!0,disabled:e==null?void 0:e.disabled,children:O.jsx(T.ActionButton,{customClass:"!w-12 h-12",disabled:e==null?void 0:e.disabled,icon:e==null?void 0:e.icon,tooltip:e==null?void 0:e.tooltip,children:O.jsx(T.MenuDown,{className:"size-3 text-gray-500"})})}),O.jsx(T.DropdownMenuContent,{className:"w-full",children:(n=e==null?void 0:e.items)==null?void 0:n.map((i,r)=>O.jsxs(T.DropdownMenuCheckboxItem,{checked:t.title===i.title,className:"flex items-center gap-3",onClick:i.action,children:[O.jsx(T.IconComponent,{name:i==null?void 0:i.icon}),O.jsx("span",{className:"ml-1",children:i.title}),!!(i!=null&&i.shortcutKeys)&&O.jsx("span",{className:"ml-auto text-xs tracking-widest opacity-60",children:T.getShortcutKeys(i.shortcutKeys)})]},`more-mark-${r}`))})]})}const Tg=T.Extension.create({name:"moreMark",addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),button({editor:t,extension:n,t:i}){const r=n.options.subscript,a=n.options.superscript,o={action:()=>t.commands.toggleSubscript(),isActive:()=>t.isActive("subscript")||!1,disabled:!t.can().toggleSubscript(),icon:"Subscript",title:i("editor.subscript.tooltip"),shortcutKeys:["mod","."]},s={action:()=>t.commands.toggleSuperscript(),isActive:()=>t.isActive("superscript")||!1,disabled:!t.can().toggleSuperscript(),icon:"Superscript",title:i("editor.superscript.tooltip"),shortcutKeys:["mod",","]},c=[];return r!==!1&&c.push(o),a!==!1&&c.push(s),{component:wg,componentProps:{icon:"Type",tooltip:i("editor.moremark"),disabled:!t.isEditable,items:c}}}}},addExtensions(){const e=[];return this.options.subscript!==!1&&e.push($u.configure(this.options.subscript)),this.options.superscript!==!1&&e.push(Ku.configure(this.options.superscript)),e}}),Ug=T.Extension.create({name:"indent",addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),types:["paragraph","heading","blockquote"],minIndent:T.IndentProps.min,maxIndent:T.IndentProps.max,button({editor:t,t:n}){return[{component:T.ActionButton,componentProps:{action:()=>{t.commands.indent()},shortcutKeys:["Tab"],icon:"IndentIncrease",tooltip:n("editor.indent.tooltip")}},{component:T.ActionButton,componentProps:{action:()=>{t.commands.outdent()},shortcutKeys:["Shift","Tab"],icon:"IndentDecrease",tooltip:n("editor.outdent.tooltip")}}]}}},addGlobalAttributes(){return[{types:this.options.types,attributes:{indent:{default:0,parseHTML:e=>{const t=e.dataset.indent;return(t?Number.parseInt(t,10):0)||0},renderHTML:e=>e.indent?{"data-indent":e.indent}:{}}}}]},addCommands(){return{indent:()=>T.createIndentCommand({delta:T.IndentProps.more,types:this.options.types}),outdent:()=>T.createIndentCommand({delta:T.IndentProps.less,types:this.options.types})}},addKeyboardShortcuts(){return{Tab:()=>this.editor.commands.indent(),"Shift-Tab":()=>this.editor.commands.outdent()}}});function Eg(e){return Number.parseFloat(e.replace("%",""))/100}function Ag(e){const{t}=Ce.useLocale(),[n,i]=pe.useState("default");function r(o){o==="default"?e.editor.commands.unsetLineHeight():e.editor.commands.setLineHeight(o),i(o)}const a=pe.useMemo(()=>{const c=e.editor.extensionManager.extensions.find(u=>u.name==="lineHeight").options.lineHeights.map(u=>({label:Eg(u),value:u}));return c.unshift({label:t("editor.default"),value:"default"}),c},[e]);return O.jsxs(T.DropdownMenu,{children:[O.jsx(T.DropdownMenuTrigger,{asChild:!0,disabled:e==null?void 0:e.disabled,children:O.jsx(T.ActionButton,{customClass:"!w-12 h-12",disabled:e==null?void 0:e.disabled,icon:"LineHeight",tooltip:e==null?void 0:e.tooltip,children:O.jsx(T.IconComponent,{className:"ml-1 size-3 text-zinc-500",name:"MenuDown"})})}),O.jsx(T.DropdownMenuContent,{className:"min-w-24",children:a==null?void 0:a.map((o,s)=>O.jsx(T.DropdownMenuCheckboxItem,{checked:o.value===n,onClick:()=>r(o.value),children:o.label},`lineHeight-${s}`))})]})}const Cg=["paragraph","heading","list_item","todo_item"];function kg(e,t){const{selection:n,doc:i}=e;if(!n||!i||!(n instanceof T.TextSelection||n instanceof T.AllSelection))return e;const{from:r,to:a}=n,o=[],s=t&&t!==Ce.DEFAULT_LINE_HEIGHT?t:null;if(i.nodesBetween(r,a,(c,u)=>{const l=c.type;return Cg.includes(l.name)?((c.attrs.lineHeight||null)!==s&&o.push({node:c,pos:u,nodeType:l}),l.name!=="list_item"&&l.name!=="todo_item"):!0}),o.length===0)return e;for(const c of o){const{node:u,pos:l,nodeType:f}=c;let{attrs:g}=u;g={...g,lineHeight:s},e=e.setNodeMarkup(l,f,g,u.marks)}return e}function Fg(e){return({state:t,dispatch:n})=>{const{selection:i}=t;let{tr:r}=t;return r=r.setSelection(i),r=kg(r,e),r.docChanged?(n&&n(r),!0):!1}}const Sg=T.Extension.create({name:"lineHeight",addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),types:["paragraph","heading","list_item","todo_item"],lineHeights:Ce.DEFAULT_LINE_HEIGHT_LIST,defaultHeight:Ce.DEFAULT_LINE_HEIGHT,button({editor:t,t:n}){return{component:Ag,componentProps:{editor:t,tooltip:n("editor.lineheight.tooltip")}}}}},addGlobalAttributes(){return[{types:this.options.types,attributes:{lineHeight:{default:null,parseHTML:e=>e.style.lineHeight||this.options.defaultHeight,renderHTML:e=>e.lineHeight===this.options.defaultHeight||!e.lineHeight?{}:{style:`line-height: ${e.lineHeight}`}}}}]},addCommands(){return{setLineHeight:e=>Fg(e),unsetLineHeight:()=>({commands:e})=>this.options.types.every(t=>e.resetAttributes(t,"lineHeight"))}}});function Bg(e){var t;const{char:n,allowSpaces:i,allowToIncludeChar:r,allowedPrefixes:a,startOfLine:o,$position:s}=e,c=i&&!r,u=T.escapeForRegEx(n),l=new RegExp(`\\s${u}$`),f=o?"^":"",g=r?"":u,d=c?new RegExp(`${f}${u}.*?(?=\\s${g}|$)`,"gm"):new RegExp(`${f}(?:^)?${u}[^\\s${g}]*`,"gm"),x=((t=s.nodeBefore)===null||t===void 0?void 0:t.isText)&&s.nodeBefore.text;if(!x)return null;const m=s.pos-x.length,h=Array.from(x.matchAll(d)).pop();if(!h||h.input===void 0||h.index===void 0)return null;const b=h.input.slice(Math.max(0,h.index-1),h.index),p=new RegExp(`^[${a==null?void 0:a.join("")}\0]?$`).test(b);if(a!==null&&!p)return null;const D=m+h.index;let w=D+h[0].length;return c&&l.test(x.slice(w-1,w+1))&&(h[0]+=" ",w+=1),D<s.pos&&w>=s.pos?{range:{from:D,to:w},query:h[0].slice(n.length),text:h[0]}:null}const Ng=new T.PluginKey("suggestion");function mo({pluginKey:e=Ng,editor:t,char:n="@",allowSpaces:i=!1,allowToIncludeChar:r=!1,allowedPrefixes:a=[" "],startOfLine:o=!1,decorationTag:s="span",decorationClass:c="suggestion",command:u=()=>null,items:l=()=>[],render:f=()=>({}),allow:g=()=>!0,findSuggestionMatch:d=Bg}){let x;const m=f==null?void 0:f(),h=new T.Plugin({key:e,view(){return{update:async(b,p)=>{var D,w,_,U,E,L,A;const W=(D=this.key)===null||D===void 0?void 0:D.getState(p),N=(w=this.key)===null||w===void 0?void 0:w.getState(b.state),F=W.active&&N.active&&W.range.from!==N.range.from,q=!W.active&&N.active,v=W.active&&!N.active,k=!q&&!v&&W.query!==N.query,V=q||F&&k,P=k||F,J=v||F&&k;if(!V&&!P&&!J)return;const K=J&&!V?W:N,re=b.dom.querySelector(`[data-decoration-id="${K.decorationId}"]`);x={editor:t,range:K.range,query:K.query,text:K.text,items:[],command:j=>u({editor:t,range:K.range,props:j}),decorationNode:re,clientRect:re?()=>{var j;const{decorationId:I}=(j=this.key)===null||j===void 0?void 0:j.getState(t.state),oe=b.dom.querySelector(`[data-decoration-id="${I}"]`);return(oe==null?void 0:oe.getBoundingClientRect())||null}:null},V&&((_=m==null?void 0:m.onBeforeStart)===null||_===void 0||_.call(m,x)),P&&((U=m==null?void 0:m.onBeforeUpdate)===null||U===void 0||U.call(m,x)),(P||V)&&(x.items=await l({editor:t,query:K.query})),J&&((E=m==null?void 0:m.onExit)===null||E===void 0||E.call(m,x)),P&&((L=m==null?void 0:m.onUpdate)===null||L===void 0||L.call(m,x)),V&&((A=m==null?void 0:m.onStart)===null||A===void 0||A.call(m,x))},destroy:()=>{var b;x&&((b=m==null?void 0:m.onExit)===null||b===void 0||b.call(m,x))}}},state:{init(){return{active:!1,range:{from:0,to:0},query:null,text:null,composing:!1}},apply(b,p,D,w){const{isEditable:_}=t,{composing:U}=t.view,{selection:E}=b,{empty:L,from:A}=E,W={...p};if(W.composing=U,_&&(L||t.view.composing)){(A<p.range.from||A>p.range.to)&&!U&&!p.composing&&(W.active=!1);const N=d({char:n,allowSpaces:i,allowToIncludeChar:r,allowedPrefixes:a,startOfLine:o,$position:E.$from}),F=`id_${Math.floor(Math.random()*4294967295)}`;N&&g({editor:t,state:w,range:N.range,isActive:p.active})?(W.active=!0,W.decorationId=p.decorationId?p.decorationId:F,W.range=N.range,W.query=N.query,W.text=N.text):W.active=!1}else W.active=!1;return W.active||(W.decorationId=null,W.range={from:0,to:0},W.query=null,W.text=null),W}},props:{handleKeyDown(b,p){var D;const{active:w,range:_}=h.getState(b.state);return w&&((D=m==null?void 0:m.onKeyDown)===null||D===void 0?void 0:D.call(m,{view:b,event:p,range:_}))||!1},decorations(b){const{active:p,range:D,decorationId:w}=h.getState(b);return p?T.DecorationSet.create(b.doc,[T.Decoration.inline(D.from,D.to,{nodeName:s,class:c,"data-decoration-id":w})]):null}}});return h}function Lg(e,t){var h,b;const[n,i]=pe.useState(0),[r,a]=pe.useState(0),o=pe.useRef(null),{t:s}=Ce.useLocale(),c=pe.useRef([]);pe.useImperativeHandle(t,()=>({onKeyDown:u})),pe.useEffect(()=>{if(!o.current)return;const p=r*1e3+n,D=c.current[p];D&&D.scrollIntoView({behavior:"smooth",block:"nearest"})},[n,r]);function u({event:p}){return p.key==="ArrowUp"?(l(),!0):p.key==="ArrowDown"?(f(),!0):p.key==="Enter"?(g(),!0):!1}function l(){var w;if(e.items.length===0)return!1;let p=n-1,D=r;p<0&&(D=r-1,p=((w=e.items[D])==null?void 0:w.commands.length)-1||0),D<0&&(D=e.items.length-1,p=e.items[D].commands.length-1),i(p),a(D)}function f(){if(e.items.length===0)return!1;const p=e.items[r].commands;let D=n+1,w=r;p.length-1<D&&(D=0,w=r+1),e.items.length-1<w&&(w=0),i(D),a(w)}function g(){if(e.items.length===0||r===-1||n===-1)return!1;d(r,n)}function d(p,D){const w=e.items[p].commands[D];e.command(w)}function x(p,D){d(p,D)}function m(p,D,w){c.current[p*1e3+D]=w}return O.jsx("div",{className:"mb-8 max-h-[min(80vh,24rem)] flex-wrap overflow-auto rounded-lg !border !border-neutral-200 !bg-white p-1 !text-black shadow-sm dark:!border-neutral-800 dark:!bg-black",ref:o,children:(h=e==null?void 0:e.items)!=null&&h.length?O.jsx("div",{className:"grid min-w-48 grid-cols-1 gap-0.5",children:(b=e==null?void 0:e.items)==null?void 0:b.map((p,D)=>O.jsxs(pe.Fragment,{children:[O.jsx("div",{className:"col-[1/-1] mx-2 mt-2 select-none text-[0.65rem] font-semibold uppercase tracking-wider !text-neutral-500 first:mt-0.5",children:p.title}),p.commands.map((w,_)=>O.jsxs("button",{onClick:()=>x(D,_),ref:U=>m(D,_,U),className:T.cn("flex items-center gap-3 px-2 py-1.5 text-sm !text-neutral-800 dark:!text-neutral-200 text-left w-full rounded-sm outline-none transition-colors !bg-transparent hover:!bg-accent ",{"slash-command-active":r===D&&n===_}),children:[w.iconUrl&&O.jsx("img",{alt:"",className:"size-6",src:w.iconUrl}),w.iconName&&O.jsx(T.IconComponent,{className:"!mr-1 !text-lg",name:w.iconName}),w.label]},`command-${_}`))]},`slash-${p.title}`))}):O.jsx("div",{className:"p-3",children:O.jsx("span",{className:"text-xs text-gray-800 dark:text-gray-100",children:s("editor.slash.empty")})})})}const Rg=pe.forwardRef(Lg),Ig={setOpen:(e,t)=>{T.dispatchEvent(T.EVENTS.UPLOAD_VIDEO(e),t)}};function Wg(e,t){const n=[{name:"format",title:Ce.localeActions.t("editor.slash.format"),commands:[]},{name:"insert",title:Ce.localeActions.t("editor.slash.insert"),commands:[]}];return e.forEach(i=>{i.name.toLowerCase()==="heading"&&i.options.levels.forEach(r=>{n[0].commands.push({name:`heading${r}`,label:Ce.localeActions.t(`editor.heading.h${r}.tooltip`),aliases:[`h${r}`,"bt",`bt${r}`],iconName:`Heading${r}`,action:({editor:a,range:o})=>{a.chain().focus().deleteRange(o).setHeading({level:r}).run()}})}),i.name.toLowerCase()==="bulletlist"&&n[0].commands.push({name:"bulletList",label:Ce.localeActions.t("editor.bulletlist.tooltip"),aliases:["ul","yxlb"],iconName:"List",action:({editor:r,range:a})=>{r.chain().focus().deleteRange(a).toggleBulletList().run()}}),i.name.toLowerCase()==="orderedlist"&&n[0].commands.push({name:"numberedList",label:Ce.localeActions.t("editor.orderedlist.tooltip"),aliases:["ol","yxlb"],iconName:"ListOrdered",action:({editor:r,range:a})=>{r.chain().focus().deleteRange(a).toggleOrderedList().run()}}),i.name.toLowerCase()==="tasklist"&&n[0].commands.push({name:"taskList",label:Ce.localeActions.t("editor.tasklist.tooltip"),iconName:"ListTodo",description:"Task list with todo items",aliases:["todo"],action:({editor:r,range:a})=>{r.chain().focus().deleteRange(a).toggleTaskList().run()}}),i.name.toLowerCase()==="blockquote"&&n[0].commands.push({name:"blockquote",label:Ce.localeActions.t("editor.blockquote.tooltip"),description:"插入引入格式",aliases:["yr"],iconName:"TextQuote",action:({editor:r,range:a})=>{r.chain().focus().deleteRange(a).setBlockquote().run()}}),i.name.toLowerCase()==="codeblock"&&n[0].commands.push({name:"codeBlock",label:Ce.localeActions.t("editor.codeblock.tooltip"),iconName:"Code2",description:"Code block with syntax highlighting",shouldBeHidden:r=>r.isActive("columns"),action:({editor:r,range:a})=>{r.chain().focus().deleteRange(a).setCodeBlock().run()}}),i.name.toLowerCase()===T.Image.name&&n[1].commands.push({name:"image",label:Ce.localeActions.t("editor.image.tooltip"),iconName:"ImageUp",description:"Insert a image",aliases:["image","tp","tupian"],shouldBeHidden:r=>r.isActive("columns"),action:({editor:r,range:a})=>{r.chain().focus().deleteRange(a).run(),T.actionDialogImage.setOpen(r.id,!0)}}),i.name.toLowerCase()===T.Video.name&&n[1].commands.push({name:"video",label:Ce.localeActions.t("editor.video.tooltip"),iconName:"Video",description:"Insert a video",aliases:["video","sp","shipin"],shouldBeHidden:r=>r.isActive("columns"),action:({editor:r,range:a})=>{r.chain().focus().deleteRange(a).run(),Ig.setOpen(r.id,!0)}}),i.name.toLowerCase()==="table"&&n[1].commands.push({name:"table",label:Ce.localeActions.t("editor.table.tooltip"),iconName:"Table",description:"Insert a table",aliases:["table","bg","biaoge","biao"],shouldBeHidden:r=>r.isActive("columns"),action:({editor:r,range:a})=>{r.chain().focus().deleteRange(a).insertTable({rows:3,cols:3,withHeaderRow:!1}).run()}}),i.name.toLowerCase()==="horizontalrule"&&n[1].commands.push({name:"horizontalRule",label:Ce.localeActions.t("editor.horizontalrule.tooltip"),iconName:"Minus",description:"Insert a horizontal divider",aliases:["hr","fgx","fg"],action:({editor:r,range:a})=>{r.chain().focus().deleteRange(a).setHorizontalRule().run()}}),i.name.toLowerCase()==="columns"&&n[1].commands.push({name:"columns",label:Ce.localeActions.t("editor.columns.tooltip"),iconName:"Columns2",description:"Add two column content",action:({editor:r})=>{r.chain().focus().insertColumns({cols:2}).run()}}),t==null||t(i,n)}),n}const Kt="slashCommand";let Ne;const Og=T.Extension.create({name:Kt,priority:200,onCreate(){Ne=no("body",{interactive:!0,trigger:"manual",placement:"bottom-start",theme:"slash-command",maxWidth:"16rem",offset:[16,8],popperOptions:{strategy:"fixed",modifiers:[{name:"flip",enabled:!1}]}})},addProseMirrorPlugins(){return[mo({editor:this.editor,char:"/",allowSpaces:!0,startOfLine:!1,allowedPrefixes:null,pluginKey:new T.PluginKey(Kt),allow:({state:e,range:t})=>{var a,o;const n=e.doc.resolve(t.from);return((o=n.parent.textContent)==null?void 0:o.slice(Math.max(0,(a=n.parent.textContent)==null?void 0:a.indexOf("/")))).endsWith("/")},command:({editor:e,range:t,props:n})=>{const{view:i}=e;n.action({editor:e,range:t}),i.focus()},items:({query:e,editor:t})=>Wg(t.extensionManager.extensions,this.options.renderGroupItem).map(o=>({...o,commands:o.commands.filter(s=>{const c=s.label.toLowerCase().trim(),u=e.toLowerCase().trim();if(s.aliases){const l=s.aliases.map(d=>d.toLowerCase().trim()),f=c.match(u),g=l.some(d=>d.match(u));return f||g}return c.match(u)}).filter(s=>s.shouldBeHidden?!s.shouldBeHidden(this.editor):!0)})).filter(o=>o.commands.length>0).map(o=>({...o,commands:o.commands.map(s=>({...s,isEnabled:!0}))})),render:()=>{let e,t=null;return{onStart:n=>{var a;e=new T.ReactRenderer(Rg,{props:n,editor:n.editor});const{view:i}=n.editor,r=()=>{if(!n.clientRect)return n.editor.storage[Kt].rect;const o=n.clientRect();if(!o)return n.editor.storage[Kt].rect;let s=o.y;if(o.top+e.element.offsetHeight+40>window.innerHeight){const c=o.top+e.element.offsetHeight-window.innerHeight+40;s=o.y-c}return new DOMRect(o.x,s,o.width,o.height)};t=()=>{Ne==null||Ne[0].setProps({getReferenceClientRect:r})},(a=i.dom.parentElement)==null||a.addEventListener("scroll",t),Ne==null||Ne[0].setProps({getReferenceClientRect:r,appendTo:()=>document.body,content:e.element}),Ne==null||Ne[0].show()},onUpdate(n){var o;e.updateProps(n);const{view:i}=n.editor,r=()=>{if(!n.clientRect)return n.editor.storage[Kt].rect;const s=n.clientRect();return s?new DOMRect(s.x,s.y,s.width,s.height):n.editor.storage[Kt].rect},a=()=>{Ne==null||Ne[0].setProps({getReferenceClientRect:r})};(o=i.dom.parentElement)==null||o.addEventListener("scroll",a),n.editor.storage[Kt].rect=n.clientRect?r():{width:0,height:0,left:0,top:0,right:0,bottom:0},Ne==null||Ne[0].setProps({getReferenceClientRect:r})},onKeyDown(n){var i;return n.event.key==="Escape"?(Ne==null||Ne[0].hide(),!0):(Ne!=null&&Ne[0].state.isShown||Ne==null||Ne[0].show(),(i=e.ref)==null?void 0:i.onKeyDown(n))},onExit(n){var i;if(Ne==null||Ne[0].hide(),t){const{view:r}=n.editor;(i=r.dom.parentElement)==null||i.removeEventListener("scroll",t)}e.destroy()}}}})]},addStorage(){return{rect:{width:0,height:0,left:0,top:0,right:0,bottom:0}}}}),Mg=T.Extension.create({name:"painter",addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),button:({editor:t,t:n})=>({component:T.ActionButton,componentProps:{action:()=>{t.commands.setPainter(t==null?void 0:t.state.selection.$head.marks())},icon:"PaintRoller",tooltip:n("editor.format")}})}},addCommands(){return{setPainter:e=>({view:{dispatch:t,state:{tr:n},dom:i}})=>{const o=`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 i.style.cursor=o,t(n.setMeta("painterAction",{type:"start",marks:e})),!0}}},addProseMirrorPlugins(){return[new T.Plugin({key:new T.PluginKey("format-painter"),state:{init:()=>[],apply:(e,t)=>{const n=e.getMeta("painterAction");return n&&n.type==="start"?t=n.marks:n&&n.type==="end"&&(t=[]),t}},props:{handleDOMEvents:{mousedown(e){const t=this.getState(e.state);if(!t||t.length===0)return e.dom.style.cursor="",!1;const n=()=>{document.removeEventListener("mouseup",n);let{dispatch:i,state:{tr:r,selection:a},dom:o}=e;o.style.cursor="",r=r.removeMark(a.from,a.to);for(const s of t)s.type.name!=="link"&&(r=r.addMark(a.from,a.to,s));i(r.setMeta("painterAction",{type:"end"}))};return document.addEventListener("mouseup",n),!0}}}})]}});function Pg({editor:e,...t}){const{t:n}=Ce.useLocale(),[i,r]=pe.useState(-1),[a,o]=pe.useState([]),[s,c]=pe.useState(""),[u,l]=pe.useState(""),[f,g]=pe.useState(!1),[d,x]=pe.useState(!1);return pe.useEffect(()=>{f||(c(""),l(""),r(-1),o([]),e.commands.setSearchTerm(""),e.commands.setReplaceTerm(""))},[e,f]),pe.useEffect(()=>{f&&e&&e.commands&&e.commands.setSearchTerm&&e.commands.setSearchTerm(s)},[f,s,e]),pe.useEffect(()=>{f&&e&&e.commands&&e.commands.setReplaceTerm&&e.commands.setReplaceTerm(u)},[f,u,e]),pe.useEffect(()=>{if(!e)return;const m=e.extensionManager.extensions.find(b=>b.name===Gu.name);if(!m)return;const h=()=>{if(!f)return;const b=m?m.storage.currentIndex:-1,p=m?m.storage.results:[];r(D=>D!==b?b:D),o(D=>T.deepEqual(D,p)?D:p)};return T.listenEvent(T.EVENTS.SEARCH_REPLCE,h),()=>{m&&T.listenEvent(T.EVENTS.SEARCH_REPLCE,h)}},[f,e]),O.jsxs(T.Popover,{onOpenChange:g,open:f,children:[O.jsx(T.PopoverTrigger,{asChild:!0,disabled:t==null?void 0:t.disabled,children:O.jsx(T.ActionButton,{disabled:t==null?void 0:t.disabled,isActive:t==null?void 0:t.isActive,tooltip:t==null?void 0:t.tooltip,children:O.jsx(T.IconComponent,{name:t==null?void 0:t.icon})})}),O.jsxs(T.PopoverContent,{align:"start",className:"w-full",hideWhenDetached:!0,side:"bottom",children:[O.jsxs("div",{className:"mb-[6px] flex items-center justify-between",children:[O.jsx(T.Label,{children:n("editor.search.dialog.text")}),O.jsx("span",{className:"font-semibold",children:a.length>0?`${i+1}/${a.length}`:"0/0"})]}),O.jsxs("div",{className:"mb-[10px] flex w-full max-w-sm items-center gap-1.5",children:[O.jsx(T.Input,{autoFocus:!0,className:"w-full",onChange:m=>c(m.target.value),placeholder:"Text",required:!0,type:"text",value:s}),O.jsx(T.Button,{className:"flex-1",disabled:a.length===0,onClick:e.commands.goToPrevSearchResult,children:O.jsx(T.IconComponent,{name:"ChevronUp"})}),O.jsx(T.Button,{className:"flex-1",disabled:a.length===0,onClick:e.commands.goToNextSearchResult,children:O.jsx(T.IconComponent,{name:"ChevronDown"})})]}),O.jsx(T.Label,{className:"mb-[6px]",children:n("editor.replace.dialog.text")}),O.jsx("div",{className:"mb-[5px] flex w-full max-w-sm items-center gap-1.5",children:O.jsx("div",{className:"relative w-full max-w-sm items-center",children:O.jsx(T.Input,{className:"w-80",onChange:m=>l(m.target.value),placeholder:"Text",required:!0,type:"text",value:u})})}),O.jsxs("div",{className:"mb-[10px] flex items-center space-x-2",children:[O.jsx(T.Switch,{checked:d,onCheckedChange:m=>{x(m),e.commands.setCaseSensitive(m)}}),O.jsx(T.Label,{children:n("editor.replace.caseSensitive")})]}),O.jsxs("div",{className:"flex items-center gap-[10px]",children:[O.jsx(T.Button,{className:"flex-1",disabled:a.length===0,onClick:e.commands.replace,children:n("editor.replace.dialog.text")}),O.jsx(T.Button,{className:"flex-1",disabled:a.length===0,onClick:e.commands.replaceAll,children:n("editor.replaceAll.dialog.text")})]})]})]})}const En=(e,t)=>t(e.tr);function jg(e,t,n){return RegExp(t?e.replace(/[$()*+./?[\\\]^{|}-]/g,String.raw`\$&`):e,n?"gu":"gui")}function qg(e,t,n){const i=[];let r=[];const a=[];let o=0;if(!t)return{decorationsToReturn:[],results:[]};e==null||e.descendants((s,c)=>{s.isText?r[o]?r[o]={text:r[o].text+s.text,pos:r[o].pos}:r[o]={text:`${s.text}`,pos:c}:o+=1}),r=r.filter(Boolean);for(const{text:s,pos:c}of r){const u=[...s.matchAll(t)];for(const l of u){if(l[0]==="")break;l.index!==void 0&&a.push({from:c+l.index,to:c+l.index+l[0].length})}}for(const s of a)i.push(T.Decoration.inline(s.from,s.to,{class:n}));return{decorationsToReturn:i,results:a}}function Ts(e,t,{state:n,dispatch:i}){if(!t[0])return;const{from:a,to:o}=t[0];i&&i(n.tr.insertText(e,a,o))}function Hg(e,t,n,i){const r=t+1;if(!i[r])return null;const{from:a,to:o}=i[t],s=o-a-e.length+n,{from:c,to:u}=i[r];return i[r]={to:u-s,from:c-s},[s,i]}function zg(e,t,{tr:n,dispatch:i}){let r=0,a=t.slice();if(a.length===0)return!1;for(let o=0;o<a.length;o+=1){const{from:s,to:c}=a[o];n.insertText(e,s,c);const u=Hg(e,o,r,a);u&&(r=u[0],a=u[1])}return i(n),!0}function Us({view:e,tr:t,searchResults:n,searchResultCurrentClass:i,gotoIndex:r}){const a=n[r];if(a){const o=t.setMeta("directDecoration",{fromPos:a.from,toPos:a.to,attrs:{class:i}});return e==null||e.dispatch(o),setTimeout(()=>{const s=window.document.querySelector(`.${i}`);s&&io(s,{behavior:"smooth",scrollMode:"if-needed"})},0),!0}return!1}const Gu=T.Extension.create({name:"search",addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),searchTerm:"",replaceTerm:"",results:[],currentIndex:0,searchResultClass:"search-result",searchResultCurrentClass:"search-result-current",caseSensitive:!1,disableRegex:!1,onChange:()=>{},button:({editor:t,t:n})=>({component:Pg,componentProps:{action:()=>{},icon:"SearchAndReplace",tooltip:n("editor.searchAndReplace.tooltip"),isActive:()=>!1,disabled:!1,editor:t}})}},addStorage(){return{results:[],currentIndex:-1}},addCommands(){return{setSearchTerm:e=>({state:t,dispatch:n})=>(this.options.searchTerm=e,this.storage.results=[],this.storage.currentIndex=0,T.dispatchEvent(T.EVENTS.SEARCH_REPLCE),En(t,n),!1),setReplaceTerm:e=>({state:t,dispatch:n})=>(this.options.replaceTerm=e,En(t,n),!1),setCaseSensitive:e=>({state:t,dispatch:n})=>(this.options.caseSensitive=e,En(t,n),!1),replace:()=>({state:e,dispatch:t})=>{const{replaceTerm:n}=this.options,{currentIndex:i,results:r}=this.storage,a=r[i];return a?(Ts(n,[a],{state:e,dispatch:t}),this.storage.results.splice(i,1)):(Ts(n,r,{state:e,dispatch:t}),this.storage.results.shift()),T.dispatchEvent(T.EVENTS.SEARCH_REPLCE),En(e,t),!1},replaceAll:()=>({state:e,tr:t,dispatch:n})=>{const{replaceTerm:i}=this.options,{results:r}=this.storage;return zg(i,r,{tr:t,dispatch:n}),this.storage.currentIndex=-1,this.storage.results=[],T.dispatchEvent(T.EVENTS.SEARCH_REPLCE),En(e,n),!1},goToPrevSearchResult:()=>({view:e,tr:t})=>{const{searchResultCurrentClass:n}=this.options,{currentIndex:i,results:r}=this.storage,a=(i+r.length-1)%r.length;return this.storage.currentIndex=a,T.dispatchEvent(T.EVENTS.SEARCH_REPLCE),Us({view:e,tr:t,searchResults:r,searchResultCurrentClass:n,gotoIndex:a})},goToNextSearchResult:()=>({view:e,tr:t})=>{const{searchResultCurrentClass:n}=this.options,{currentIndex:i,results:r}=this.storage,a=(i+1)%r.length;return this.storage.currentIndex=a,this.options.onChange&&this.options.onChange(),T.dispatchEvent(T.EVENTS.SEARCH_REPLCE),Us({view:e,tr:t,searchResults:r,searchResultCurrentClass:n,gotoIndex:a})}}},addProseMirrorPlugins(){const e=this;return[new T.Plugin({key:new T.PluginKey("search"),state:{init(){return T.DecorationSet.empty},apply(t){const{doc:n,docChanged:i}=t,{searchTerm:r,searchResultClass:a,searchResultCurrentClass:o,disableRegex:s,caseSensitive:c}=e.options;if(i||r){const{decorationsToReturn:u,results:l}=qg(n,jg(r,s,c),a);if(e.storage.results=l,e.storage.currentIndex>l.length-1&&(e.storage.currentIndex=0),T.dispatchEvent(T.EVENTS.SEARCH_REPLCE),t.getMeta("directDecoration")){const{fromPos:f,toPos:g,attrs:d}=t.getMeta("directDecoration");u.push(T.Decoration.inline(f,g,d))}else l.length>0&&(u[0]=T.Decoration.inline(l[0].from,l[0].to,{class:o}));return T.DecorationSet.create(n,u)}return T.DecorationSet.empty}},props:{decorations(t){return this.getState(t)}}})]}});function Xg({className:e,...t}){return O.jsx(Jt.EmojiPicker.Root,{className:T.cn("bg-popover text-popover-foreground isolate flex h-full w-fit flex-col overflow-hidden rounded-md",e),"data-slot":"emoji-picker",...t})}function Vg({className:e,...t}){return O.jsxs("div",{className:T.cn("flex h-9 items-center gap-2 border-b px-3",e),"data-slot":"emoji-picker-search-wrapper",children:[O.jsx($e.SearchIcon,{className:"size-4 shrink-0 opacity-50"}),O.jsx(Jt.EmojiPicker.Search,{className:"outline-hidden placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm disabled:cursor-not-allowed disabled:opacity-50","data-slot":"emoji-picker-search",...t})]})}function $g({children:e,...t}){return O.jsx("div",{...t,className:"scroll-my-1 px-1","data-slot":"emoji-picker-row",children:e})}function Kg({emoji:e,className:t,...n}){return O.jsx("button",{...n,className:T.cn("data-[active]:bg-accent flex size-7 items-center justify-center rounded-sm text-base",t),"data-slot":"emoji-picker-emoji",children:e.emoji})}function Gg({category:e,...t}){return O.jsx("div",{...t,className:"bg-popover text-muted-foreground px-3 pb-2 pt-3.5 text-xs leading-none","data-slot":"emoji-picker-category-header",children:e.label})}function Zg({className:e,...t}){return O.jsxs(Jt.EmojiPicker.Viewport,{className:T.cn("outline-hidden relative flex-1",e),"data-slot":"emoji-picker-viewport",...t,children:[O.jsx(Jt.EmojiPicker.Loading,{className:"absolute inset-0 flex items-center justify-center text-muted-foreground","data-slot":"emoji-picker-loading",children:O.jsx($e.LoaderIcon,{className:"size-4 animate-spin"})}),O.jsx(Jt.EmojiPicker.Empty,{className:"absolute inset-0 flex items-center justify-center text-muted-foreground text-sm","data-slot":"emoji-picker-empty",children:"No emoji found."}),O.jsx(Jt.EmojiPicker.List,{className:"select-none pb-1",components:{Row:$g,Emoji:Kg,CategoryHeader:Gg},"data-slot":"emoji-picker-list"})]})}function Yg({className:e,...t}){return O.jsx("div",{className:T.cn("max-w-(--frimousse-viewport-width) flex w-full min-w-0 items-center gap-1 border-t p-2",e),"data-slot":"emoji-picker-footer",...t,children:O.jsx(Jt.EmojiPicker.ActiveEmoji,{children:({emoji:n})=>n?O.jsxs(O.Fragment,{children:[O.jsx("div",{className:"flex size-7 flex-none items-center justify-center text-lg",children:n.emoji}),O.jsx("span",{className:"text-secondary-foreground truncate text-xs",children:n.label})]}):O.jsx("span",{className:"text-muted-foreground ml-1.5 flex h-7 items-center truncate text-xs",children:"Select an emoji…"})})})}function Qg({onSelectEmoji:e,children:t}){return O.jsxs(T.Popover,{modal:!0,children:[O.jsx(T.PopoverTrigger,{asChild:!0,children:t}),O.jsx(T.PopoverContent,{align:"start",className:"size-full p-2",hideWhenDetached:!0,side:"bottom",children:O.jsxs(Xg,{className:"!h-[342px]",onEmojiSelect:({emoji:n})=>{e(n)},children:[O.jsx(Vg,{}),O.jsx(Zg,{}),O.jsx(Yg,{})]})})]})}function Jg({editor:e,icon:t,...n}){const i=pe.useCallback(r=>{const{selection:a}=e.state,{$anchor:o}=a;return e.chain().insertContentAt(o.pos,r).run()},[e]);return O.jsx(Qg,{onSelectEmoji:i,children:O.jsx(T.ActionButton,{icon:t,tooltip:n==null?void 0:n.tooltip})})}const Zu=pe.forwardRef((e,t)=>{const n=pe.useRef(null),[i,r]=pe.useState(0),{t:a}=Ce.useLocale(),o=l=>{const f=e.items[l];f&&e.command(f)},s=()=>{r((i+e.items.length-1)%e.items.length)},c=()=>{r((i+1)%e.items.length)},u=()=>{o(i)};return pe.useEffect(()=>r(0),[e.items]),pe.useEffect(()=>{if(Number.isNaN(i+1))return;const l=n.current.querySelector(`span:nth-of-type(${i+1})`);l&&io(l,{behavior:"smooth",scrollMode:"if-needed"})},[i]),pe.useImperativeHandle(t,()=>({onKeyDown:({event:l})=>l.key==="ArrowUp"?(s(),!0):l.key==="ArrowDown"?(c(),!0):l.key==="Enter"?(u(),!0):!1})),O.jsx("div",{className:"max-h-[320px] w-[200px] overflow-y-auto overflow-x-hidden rounded-sm !border bg-popover p-1 text-popover-foreground shadow-md outline-none",children:O.jsx("div",{ref:n,children:e.items.length>0?e.items.map((l,f)=>O.jsxs("span",{className:T.clsx(" relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors hover:bg-accent focus:bg-accent focus:text-accent-foreground",f===i?"bg-accent":""),onClick:()=>o(f),children:[l.fallbackImage?O.jsx("img",{className:"size-[1em]",src:l.fallbackImage}):l.emoji,":",l.name,":"]},`emoji-list-code-${f}`)):O.jsx("div",{className:"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors",children:O.jsx("span",{children:a("no_result_found")})})})})});Zu.displayName="EmojiList";const yn={100:"💯",1234:"🔢",grinning:"😀",smiley:"😃",smile:"😄",grin:"😁",laughing:"😆",satisfied:"😆",sweat_smile:"😅",rofl:"🤣",joy:"😂",slightly_smiling_face:"🙂",upside_down_face:"🙃",wink:"😉",blush:"😊",innocent:"😇",smiling_face_with_three_hearts:"🥰",heart_eyes:"😍",star_struck:"🤩",kissing_heart:"😘",kissing:"😗",relaxed:"☺️",kissing_closed_eyes:"😚",kissing_smiling_eyes:"😙",smiling_face_with_tear:"🥲",yum:"😋",stuck_out_tongue:"😛",stuck_out_tongue_winking_eye:"😜",zany_face:"🤪",stuck_out_tongue_closed_eyes:"😝",money_mouth_face:"🤑",hugs:"🤗",hand_over_mouth:"🤭",shushing_face:"🤫",thinking:"🤔",zipper_mouth_face:"🤐",raised_eyebrow:"🤨",neutral_face:"😐",expressionless:"😑",no_mouth:"😶",smirk:"😏",unamused:"😒",roll_eyes:"🙄",grimacing:"😬",lying_face:"🤥",relieved:"😌",pensive:"😔",sleepy:"😪",drooling_face:"🤤",sleeping:"😴",mask:"😷",face_with_thermometer:"🤒",face_with_head_bandage:"🤕",nauseated_face:"🤢",vomiting_face:"🤮",sneezing_face:"🤧",hot_face:"🥵",cold_face:"🥶",woozy_face:"🥴",dizzy_face:"😵",exploding_head:"🤯",cowboy_hat_face:"🤠",partying_face:"🥳",disguised_face:"🥸",sunglasses:"😎",nerd_face:"🤓",monocle_face:"🧐",confused:"😕",worried:"😟",slightly_frowning_face:"🙁",frowning_face:"☹️",open_mouth:"😮",hushed:"😯",astonished:"😲",flushed:"😳",pleading_face:"🥺",frowning:"😦",anguished:"😧",fearful:"😨",cold_sweat:"😰",disappointed_relieved:"😥",cry:"😢",sob:"😭",scream:"😱",confounded:"😖",persevere:"😣",disappointed:"😞",sweat:"😓",weary:"😩",tired_face:"😫",yawning_face:"🥱",triumph:"😤",rage:"😡",pout:"😡",angry:"😠",cursing_face:"🤬",smiling_imp:"😈",imp:"👿",skull:"💀",skull_and_crossbones:"☠️",hankey:"💩",poop:"💩",shit:"💩",clown_face:"🤡",japanese_ogre:"👹",japanese_goblin:"👺",ghost:"👻",alien:"👽",space_invader:"👾",robot:"🤖",smiley_cat:"😺",smile_cat:"😸",joy_cat:"😹",heart_eyes_cat:"😻",smirk_cat:"😼",kissing_cat:"😽",scream_cat:"🙀",crying_cat_face:"😿",pouting_cat:"😾",see_no_evil:"🙈",hear_no_evil:"🙉",speak_no_evil:"🙊",kiss:"💋",love_letter:"💌",cupid:"💘",gift_heart:"💝",sparkling_heart:"💖",heartpulse:"💗",heartbeat:"💓",revolving_hearts:"💞",two_hearts:"💕",heart_decoration:"💟",heavy_heart_exclamation:"❣️",broken_heart:"💔",heart:"❤️",orange_heart:"🧡",yellow_heart:"💛",green_heart:"💚",blue_heart:"💙",purple_heart:"💜",brown_heart:"🤎",black_heart:"🖤",white_heart:"🤍",anger:"💢",boom:"💥",collision:"💥",dizzy:"💫",sweat_drops:"💦",dash:"💨",hole:"🕳️",bomb:"💣",speech_balloon:"💬",eye_speech_bubble:"👁️🗨️",left_speech_bubble:"🗨️",right_anger_bubble:"🗯️",thought_balloon:"💭",zzz:"💤",wave:"👋",raised_back_of_hand:"🤚",raised_hand_with_fingers_splayed:"🖐️",hand:"✋",raised_hand:"✋",vulcan_salute:"🖖",ok_hand:"👌",pinched_fingers:"🤌",pinching_hand:"🤏",v:"✌️",crossed_fingers:"🤞",love_you_gesture:"🤟",metal:"🤘",call_me_hand:"🤙",point_left:"👈",point_right:"👉",point_up_2:"👆",middle_finger:"🖕",fu:"🖕",point_down:"👇",point_up:"☝️","+1":"👍",thumbsup:"👍","-1":"👎",thumbsdown:"👎",fist_raised:"✊",fist:"✊",fist_oncoming:"👊",facepunch:"👊",punch:"👊",fist_left:"🤛",fist_right:"🤜",clap:"👏",raised_hands:"🙌",open_hands:"👐",palms_up_together:"🤲",handshake:"🤝",pray:"🙏",writing_hand:"✍️",nail_care:"💅",selfie:"🤳",muscle:"💪",mechanical_arm:"🦾",mechanical_leg:"🦿",leg:"🦵",foot:"🦶",ear:"👂",ear_with_hearing_aid:"🦻",nose:"👃",brain:"🧠",anatomical_heart:"🫀",lungs:"🫁",tooth:"🦷",bone:"🦴",eyes:"👀",eye:"👁️",tongue:"👅",lips:"👄",baby:"👶",child:"🧒",boy:"👦",girl:"👧",adult:"🧑",blond_haired_person:"👱",man:"👨",bearded_person:"🧔",red_haired_man:"👨🦰",curly_haired_man:"👨🦱",white_haired_man:"👨🦳",bald_man:"👨🦲",woman:"👩",red_haired_woman:"👩🦰",person_red_hair:"🧑🦰",curly_haired_woman:"👩🦱",person_curly_hair:"🧑🦱",white_haired_woman:"👩🦳",person_white_hair:"🧑🦳",bald_woman:"👩🦲",person_bald:"🧑🦲",blond_haired_woman:"👱♀️",blonde_woman:"👱♀️",blond_haired_man:"👱♂️",older_adult:"🧓",older_man:"👴",older_woman:"👵",frowning_person:"🙍",frowning_man:"🙍♂️",frowning_woman:"🙍♀️",pouting_face:"🙎",pouting_man:"🙎♂️",pouting_woman:"🙎♀️",no_good:"🙅",no_good_man:"🙅♂️",ng_man:"🙅♂️",no_good_woman:"🙅♀️",ng_woman:"🙅♀️",ok_person:"🙆",ok_man:"🙆♂️",ok_woman:"🙆♀️",tipping_hand_person:"💁",information_desk_person:"💁",tipping_hand_man:"💁♂️",sassy_man:"💁♂️",tipping_hand_woman:"💁♀️",sassy_woman:"💁♀️",raising_hand:"🙋",raising_hand_man:"🙋♂️",raising_hand_woman:"🙋♀️",deaf_person:"🧏",deaf_man:"🧏♂️",deaf_woman:"🧏♀️",bow:"🙇",bowing_man:"🙇♂️",bowing_woman:"🙇♀️",facepalm:"🤦",man_facepalming:"🤦♂️",woman_facepalming:"🤦♀️",shrug:"🤷",man_shrugging:"🤷♂️",woman_shrugging:"🤷♀️",health_worker:"🧑⚕️",man_health_worker:"👨⚕️",woman_health_worker:"👩⚕️",student:"🧑🎓",man_student:"👨🎓",woman_student:"👩🎓",teacher:"🧑🏫",man_teacher:"👨🏫",woman_teacher:"👩🏫",judge:"🧑⚖️",man_judge:"👨⚖️",woman_judge:"👩⚖️",farmer:"🧑🌾",man_farmer:"👨🌾",woman_farmer:"👩🌾",cook:"🧑🍳",man_cook:"👨🍳",woman_cook:"👩🍳",mechanic:"🧑🔧",man_mechanic:"👨🔧",woman_mechanic:"👩🔧",factory_worker:"🧑🏭",man_factory_worker:"👨🏭",woman_factory_worker:"👩🏭",office_worker:"🧑💼",man_office_worker:"👨💼",woman_office_worker:"👩💼",scientist:"🧑🔬",man_scientist:"👨🔬",woman_scientist:"👩🔬",technologist:"🧑💻",man_technologist:"👨💻",woman_technologist:"👩💻",singer:"🧑🎤",man_singer:"👨🎤",woman_singer:"👩🎤",artist:"🧑🎨",man_artist:"👨🎨",woman_artist:"👩🎨",pilot:"🧑✈️",man_pilot:"👨✈️",woman_pilot:"👩✈️",astronaut:"🧑🚀",man_astronaut:"👨🚀",woman_astronaut:"👩🚀",firefighter:"🧑🚒",man_firefighter:"👨🚒",woman_firefighter:"👩🚒",police_officer:"👮",cop:"👮",policeman:"👮♂️",policewoman:"👮♀️",detective:"🕵️",male_detective:"🕵️♂️",female_detective:"🕵️♀️",guard:"💂",guardsman:"💂♂️",guardswoman:"💂♀️",ninja:"🥷",construction_worker:"👷",construction_worker_man:"👷♂️",construction_worker_woman:"👷♀️",prince:"🤴",princess:"👸",person_with_turban:"👳",man_with_turban:"👳♂️",woman_with_turban:"👳♀️",man_with_gua_pi_mao:"👲",woman_with_headscarf:"🧕",person_in_tuxedo:"🤵",man_in_tuxedo:"🤵♂️",woman_in_tuxedo:"🤵♀️",person_with_veil:"👰",man_with_veil:"👰♂️",woman_with_veil:"👰♀️",bride_with_veil:"👰♀️",pregnant_woman:"🤰",breast_feeding:"🤱",woman_feeding_baby:"👩🍼",man_feeding_baby:"👨🍼",person_feeding_baby:"🧑🍼",angel:"👼",santa:"🎅",mrs_claus:"🤶",mx_claus:"🧑🎄",superhero:"🦸",superhero_man:"🦸♂️",superhero_woman:"🦸♀️",supervillain:"🦹",supervillain_man:"🦹♂️",supervillain_woman:"🦹♀️",mage:"🧙",mage_man:"🧙♂️",mage_woman:"🧙♀️",fairy:"🧚",fairy_man:"🧚♂️",fairy_woman:"🧚♀️",vampire:"🧛",vampire_man:"🧛♂️",vampire_woman:"🧛♀️",merperson:"🧜",merman:"🧜♂️",mermaid:"🧜♀️",elf:"🧝",elf_man:"🧝♂️",elf_woman:"🧝♀️",genie:"🧞",genie_man:"🧞♂️",genie_woman:"🧞♀️",zombie:"🧟",zombie_man:"🧟♂️",zombie_woman:"🧟♀️",massage:"💆",massage_man:"💆♂️",massage_woman:"💆♀️",haircut:"💇",haircut_man:"💇♂️",haircut_woman:"💇♀️",walking:"🚶",walking_man:"🚶♂️",walking_woman:"🚶♀️",standing_person:"🧍",standing_man:"🧍♂️",standing_woman:"🧍♀️",kneeling_person:"🧎",kneeling_man:"🧎♂️",kneeling_woman:"🧎♀️",person_with_probing_cane:"🧑🦯",man_with_probing_cane:"👨🦯",woman_with_probing_cane:"👩🦯",person_in_motorized_wheelchair:"🧑🦼",man_in_motorized_wheelchair:"👨🦼",woman_in_motorized_wheelchair:"👩🦼",person_in_manual_wheelchair:"🧑🦽",man_in_manual_wheelchair:"👨🦽",woman_in_manual_wheelchair:"👩🦽",runner:"🏃",running:"🏃",running_man:"🏃♂️",running_woman:"🏃♀️",woman_dancing:"💃",dancer:"💃",man_dancing:"🕺",business_suit_levitating:"🕴️",dancers:"👯",dancing_men:"👯♂️",dancing_women:"👯♀️",sauna_person:"🧖",sauna_man:"🧖♂️",sauna_woman:"🧖♀️",climbing:"🧗",climbing_man:"🧗♂️",climbing_woman:"🧗♀️",person_fencing:"🤺",horse_racing:"🏇",skier:"⛷️",snowboarder:"🏂",golfing:"🏌️",golfing_man:"🏌️♂️",golfing_woman:"🏌️♀️",surfer:"🏄",surfing_man:"🏄♂️",surfing_woman:"🏄♀️",rowboat:"🚣",rowing_man:"🚣♂️",rowing_woman:"🚣♀️",swimmer:"🏊",swimming_man:"🏊♂️",swimming_woman:"🏊♀️",bouncing_ball_person:"⛹️",bouncing_ball_man:"⛹️♂️",basketball_man:"⛹️♂️",bouncing_ball_woman:"⛹️♀️",basketball_woman:"⛹️♀️",weight_lifting:"🏋️",weight_lifting_man:"🏋️♂️",weight_lifting_woman:"🏋️♀️",bicyclist:"🚴",biking_man:"🚴♂️",biking_woman:"🚴♀️",mountain_bicyclist:"🚵",mountain_biking_man:"🚵♂️",mountain_biking_woman:"🚵♀️",cartwheeling:"🤸",man_cartwheeling:"🤸♂️",woman_cartwheeling:"🤸♀️",wrestling:"🤼",men_wrestling:"🤼♂️",women_wrestling:"🤼♀️",water_polo:"🤽",man_playing_water_polo:"🤽♂️",woman_playing_water_polo:"🤽♀️",handball_person:"🤾",man_playing_handball:"🤾♂️",woman_playing_handball:"🤾♀️",juggling_person:"🤹",man_juggling:"🤹♂️",woman_juggling:"🤹♀️",lotus_position:"🧘",lotus_position_man:"🧘♂️",lotus_position_woman:"🧘♀️",bath:"🛀",sleeping_bed:"🛌",people_holding_hands:"🧑🤝🧑",two_women_holding_hands:"👭",couple:"👫",two_men_holding_hands:"👬",couplekiss:"💏",couplekiss_man_woman:"👩❤️💋👨",couplekiss_man_man:"👨❤️💋👨",couplekiss_woman_woman:"👩❤️💋👩",couple_with_heart:"💑",couple_with_heart_woman_man:"👩❤️👨",couple_with_heart_man_man:"👨❤️👨",couple_with_heart_woman_woman:"👩❤️👩",family:"👪",family_man_woman_boy:"👨👩👦",family_man_woman_girl:"👨👩👧",family_man_woman_girl_boy:"👨👩👧👦",family_man_woman_boy_boy:"👨👩👦👦",family_man_woman_girl_girl:"👨👩👧👧",family_man_man_boy:"👨👨👦",family_man_man_girl:"👨👨👧",family_man_man_girl_boy:"👨👨👧👦",family_man_man_boy_boy:"👨👨👦👦",family_man_man_girl_girl:"👨👨👧👧",family_woman_woman_boy:"👩👩👦",family_woman_woman_girl:"👩👩👧",family_woman_woman_girl_boy:"👩👩👧👦",family_woman_woman_boy_boy:"👩👩👦👦",family_woman_woman_girl_girl:"👩👩👧👧",family_man_boy:"👨👦",family_man_boy_boy:"👨👦👦",family_man_girl:"👨👧",family_man_girl_boy:"👨👧👦",family_man_girl_girl:"👨👧👧",family_woman_boy:"👩👦",family_woman_boy_boy:"👩👦👦",family_woman_girl:"👩👧",family_woman_girl_boy:"👩👧👦",family_woman_girl_girl:"👩👧👧",speaking_head:"🗣️",bust_in_silhouette:"👤",busts_in_silhouette:"👥",people_hugging:"🫂",footprints:"👣",monkey_face:"🐵",monkey:"🐒",gorilla:"🦍",orangutan:"🦧",dog:"🐶",dog2:"🐕",guide_dog:"🦮",service_dog:"🐕🦺",poodle:"🐩",wolf:"🐺",fox_face:"🦊",raccoon:"🦝",cat:"🐱",cat2:"🐈",black_cat:"🐈⬛",lion:"🦁",tiger:"🐯",tiger2:"🐅",leopard:"🐆",horse:"🐴",racehorse:"🐎",unicorn:"🦄",zebra:"🦓",deer:"🦌",bison:"🦬",cow:"🐮",ox:"🐂",water_buffalo:"🐃",cow2:"🐄",pig:"🐷",pig2:"🐖",boar:"🐗",pig_nose:"🐽",ram:"🐏",sheep:"🐑",goat:"🐐",dromedary_camel:"🐪",camel:"🐫",llama:"🦙",giraffe:"🦒",elephant:"🐘",mammoth:"🦣",rhinoceros:"🦏",hippopotamus:"🦛",mouse:"🐭",mouse2:"🐁",rat:"🐀",hamster:"🐹",rabbit:"🐰",rabbit2:"🐇",chipmunk:"🐿️",beaver:"🦫",hedgehog:"🦔",bat:"🦇",bear:"🐻",polar_bear:"🐻❄️",koala:"🐨",panda_face:"🐼",sloth:"🦥",otter:"🦦",skunk:"🦨",kangaroo:"🦘",badger:"🦡",feet:"🐾",paw_prints:"🐾",turkey:"🦃",chicken:"🐔",rooster:"🐓",hatching_chick:"🐣",baby_chick:"🐤",hatched_chick:"🐥",bird:"🐦",penguin:"🐧",dove:"🕊️",eagle:"🦅",duck:"🦆",swan:"🦢",owl:"🦉",dodo:"🦤",feather:"🪶",flamingo:"🦩",peacock:"🦚",parrot:"🦜",frog:"🐸",crocodile:"🐊",turtle:"🐢",lizard:"🦎",snake:"🐍",dragon_face:"🐲",dragon:"🐉",sauropod:"🦕","t-rex":"🦖",whale:"🐳",whale2:"🐋",dolphin:"🐬",flipper:"🐬",seal:"🦭",fish:"🐟",tropical_fish:"🐠",blowfish:"🐡",shark:"🦈",octopus:"🐙",shell:"🐚",snail:"🐌",butterfly:"🦋",bug:"🐛",ant:"🐜",bee:"🐝",honeybee:"🐝",beetle:"🪲",lady_beetle:"🐞",cricket:"🦗",cockroach:"🪳",spider:"🕷️",spider_web:"🕸️",scorpion:"🦂",mosquito:"🦟",fly:"🪰",worm:"🪱",microbe:"🦠",bouquet:"💐",cherry_blossom:"🌸",white_flower:"💮",rosette:"🏵️",rose:"🌹",wilted_flower:"🥀",hibiscus:"🌺",sunflower:"🌻",blossom:"🌼",tulip:"🌷",seedling:"🌱",potted_plant:"🪴",evergreen_tree:"🌲",deciduous_tree:"🌳",palm_tree:"🌴",cactus:"🌵",ear_of_rice:"🌾",herb:"🌿",shamrock:"☘️",four_leaf_clover:"🍀",maple_leaf:"🍁",fallen_leaf:"🍂",leaves:"🍃",grapes:"🍇",melon:"🍈",watermelon:"🍉",tangerine:"🍊",orange:"🍊",mandarin:"🍊",lemon:"🍋",banana:"🍌",pineapple:"🍍",mango:"🥭",apple:"🍎",green_apple:"🍏",pear:"🍐",peach:"🍑",cherries:"🍒",strawberry:"🍓",blueberries:"🫐",kiwi_fruit:"🥝",tomato:"🍅",olive:"🫒",coconut:"🥥",avocado:"🥑",eggplant:"🍆",potato:"🥔",carrot:"🥕",corn:"🌽",hot_pepper:"🌶️",bell_pepper:"🫑",cucumber:"🥒",leafy_green:"🥬",broccoli:"🥦",garlic:"🧄",onion:"🧅",mushroom:"🍄",peanuts:"🥜",chestnut:"🌰",bread:"🍞",croissant:"🥐",baguette_bread:"🥖",flatbread:"🫓",pretzel:"🥨",bagel:"🥯",pancakes:"🥞",waffle:"🧇",cheese:"🧀",meat_on_bone:"🍖",poultry_leg:"🍗",cut_of_meat:"🥩",bacon:"🥓",hamburger:"🍔",fries:"🍟",pizza:"🍕",hotdog:"🌭",sandwich:"🥪",taco:"🌮",burrito:"🌯",tamale:"🫔",stuffed_flatbread:"🥙",falafel:"🧆",egg:"🥚",fried_egg:"🍳",shallow_pan_of_food:"🥘",stew:"🍲",fondue:"🫕",bowl_with_spoon:"🥣",green_salad:"🥗",popcorn:"🍿",butter:"🧈",salt:"🧂",canned_food:"🥫",bento:"🍱",rice_cracker:"🍘",rice_ball:"🍙",rice:"🍚",curry:"🍛",ramen:"🍜",spaghetti:"🍝",sweet_potato:"🍠",oden:"🍢",sushi:"🍣",fried_shrimp:"🍤",fish_cake:"🍥",moon_cake:"🥮",dango:"🍡",dumpling:"🥟",fortune_cookie:"🥠",takeout_box:"🥡",crab:"🦀",lobster:"🦞",shrimp:"🦐",squid:"🦑",oyster:"🦪",icecream:"🍦",shaved_ice:"🍧",ice_cream:"🍨",doughnut:"🍩",cookie:"🍪",birthday:"🎂",cake:"🍰",cupcake:"🧁",pie:"🥧",chocolate_bar:"🍫",candy:"🍬",lollipop:"🍭",custard:"🍮",honey_pot:"🍯",baby_bottle:"🍼",milk_glass:"🥛",coffee:"☕",teapot:"🫖",tea:"🍵",sake:"🍶",champagne:"🍾",wine_glass:"🍷",cocktail:"🍸",tropical_drink:"🍹",beer:"🍺",beers:"🍻",clinking_glasses:"🥂",tumbler_glass:"🥃",cup_with_straw:"🥤",bubble_tea:"🧋",beverage_box:"🧃",mate:"🧉",ice_cube:"🧊",chopsticks:"🥢",plate_with_cutlery:"🍽️",fork_and_knife:"🍴",spoon:"🥄",hocho:"🔪",knife:"🔪",amphora:"🏺",earth_africa:"🌍",earth_americas:"🌎",earth_asia:"🌏",globe_with_meridians:"🌐",world_map:"🗺️",japan:"🗾",compass:"🧭",mountain_snow:"🏔️",mountain:"⛰️",volcano:"🌋",mount_fuji:"🗻",camping:"🏕️",beach_umbrella:"🏖️",desert:"🏜️",desert_island:"🏝️",national_park:"🏞️",stadium:"🏟️",classical_building:"🏛️",building_construction:"🏗️",bricks:"🧱",rock:"🪨",wood:"🪵",hut:"🛖",houses:"🏘️",derelict_house:"🏚️",house:"🏠",house_with_garden:"🏡",office:"🏢",post_office:"🏣",european_post_office:"🏤",hospital:"🏥",bank:"🏦",hotel:"🏨",love_hotel:"🏩",convenience_store:"🏪",school:"🏫",department_store:"🏬",factory:"🏭",japanese_castle:"🏯",european_castle:"🏰",wedding:"💒",tokyo_tower:"🗼",statue_of_liberty:"🗽",church:"⛪",mosque:"🕌",hindu_temple:"🛕",synagogue:"🕍",shinto_shrine:"⛩️",kaaba:"🕋",fountain:"⛲",tent:"⛺",foggy:"🌁",night_with_stars:"🌃",cityscape:"🏙️",sunrise_over_mountains:"🌄",sunrise:"🌅",city_sunset:"🌆",city_sunrise:"🌇",bridge_at_night:"🌉",hotsprings:"♨️",carousel_horse:"🎠",ferris_wheel:"🎡",roller_coaster:"🎢",barber:"💈",circus_tent:"🎪",steam_locomotive:"🚂",railway_car:"🚃",bullettrain_side:"🚄",bullettrain_front:"🚅",train2:"🚆",metro:"🚇",light_rail:"🚈",station:"🚉",tram:"🚊",monorail:"🚝",mountain_railway:"🚞",train:"🚋",bus:"🚌",oncoming_bus:"🚍",trolleybus:"🚎",minibus:"🚐",ambulance:"🚑",fire_engine:"🚒",police_car:"🚓",oncoming_police_car:"🚔",taxi:"🚕",oncoming_taxi:"🚖",car:"🚗",red_car:"🚗",oncoming_automobile:"🚘",blue_car:"🚙",pickup_truck:"🛻",truck:"🚚",articulated_lorry:"🚛",tractor:"🚜",racing_car:"🏎️",motorcycle:"🏍️",motor_scooter:"🛵",manual_wheelchair:"🦽",motorized_wheelchair:"🦼",auto_rickshaw:"🛺",bike:"🚲",kick_scooter:"🛴",skateboard:"🛹",roller_skate:"🛼",busstop:"🚏",motorway:"🛣️",railway_track:"🛤️",oil_drum:"🛢️",fuelpump:"⛽",rotating_light:"🚨",traffic_light:"🚥",vertical_traffic_light:"🚦",stop_sign:"🛑",construction:"🚧",anchor:"⚓",boat:"⛵",sailboat:"⛵",canoe:"🛶",speedboat:"🚤",passenger_ship:"🛳️",ferry:"⛴️",motor_boat:"🛥️",ship:"🚢",airplane:"✈️",small_airplane:"🛩️",flight_departure:"🛫",flight_arrival:"🛬",parachute:"🪂",seat:"💺",helicopter:"🚁",suspension_railway:"🚟",mountain_cableway:"🚠",aerial_tramway:"🚡",artificial_satellite:"🛰️",rocket:"🚀",flying_saucer:"🛸",bellhop_bell:"🛎️",luggage:"🧳",hourglass:"⌛",hourglass_flowing_sand:"⏳",watch:"⌚",alarm_clock:"⏰",stopwatch:"⏱️",timer_clock:"⏲️",mantelpiece_clock:"🕰️",clock12:"🕛",clock1230:"🕧",clock1:"🕐",clock130:"🕜",clock2:"🕑",clock230:"🕝",clock3:"🕒",clock330:"🕞",clock4:"🕓",clock430:"🕟",clock5:"🕔",clock530:"🕠",clock6:"🕕",clock630:"🕡",clock7:"🕖",clock730:"🕢",clock8:"🕗",clock830:"🕣",clock9:"🕘",clock930:"🕤",clock10:"🕙",clock1030:"🕥",clock11:"🕚",clock1130:"🕦",new_moon:"🌑",waxing_crescent_moon:"🌒",first_quarter_moon:"🌓",moon:"🌔",waxing_gibbous_moon:"🌔",full_moon:"🌕",waning_gibbous_moon:"🌖",last_quarter_moon:"🌗",waning_crescent_moon:"🌘",crescent_moon:"🌙",new_moon_with_face:"🌚",first_quarter_moon_with_face:"🌛",last_quarter_moon_with_face:"🌜",thermometer:"🌡️",sunny:"☀️",full_moon_with_face:"🌝",sun_with_face:"🌞",ringed_planet:"🪐",star:"⭐",star2:"🌟",stars:"🌠",milky_way:"🌌",cloud:"☁️",partly_sunny:"⛅",cloud_with_lightning_and_rain:"⛈️",sun_behind_small_cloud:"🌤️",sun_behind_large_cloud:"🌥️",sun_behind_rain_cloud:"🌦️",cloud_with_rain:"🌧️",cloud_with_snow:"🌨️",cloud_with_lightning:"🌩️",tornado:"🌪️",fog:"🌫️",wind_face:"🌬️",cyclone:"🌀",rainbow:"🌈",closed_umbrella:"🌂",open_umbrella:"☂️",umbrella:"☔",parasol_on_ground:"⛱️",zap:"⚡",snowflake:"❄️",snowman_with_snow:"☃️",snowman:"⛄",comet:"☄️",fire:"🔥",droplet:"💧",ocean:"🌊",jack_o_lantern:"🎃",christmas_tree:"🎄",fireworks:"🎆",sparkler:"🎇",firecracker:"🧨",sparkles:"✨",balloon:"🎈",tada:"🎉",confetti_ball:"🎊",tanabata_tree:"🎋",bamboo:"🎍",dolls:"🎎",flags:"🎏",wind_chime:"🎐",rice_scene:"🎑",red_envelope:"🧧",ribbon:"🎀",gift:"🎁",reminder_ribbon:"🎗️",tickets:"🎟️",ticket:"🎫",medal_military:"🎖️",trophy:"🏆",medal_sports:"🏅","1st_place_medal":"🥇","2nd_place_medal":"🥈","3rd_place_medal":"🥉",soccer:"⚽",baseball:"⚾",softball:"🥎",basketball:"🏀",volleyball:"🏐",football:"🏈",rugby_football:"🏉",tennis:"🎾",flying_disc:"🥏",bowling:"🎳",cricket_game:"🏏",field_hockey:"🏑",ice_hockey:"🏒",lacrosse:"🥍",ping_pong:"🏓",badminton:"🏸",boxing_glove:"🥊",martial_arts_uniform:"🥋",goal_net:"🥅",golf:"⛳",ice_skate:"⛸️",fishing_pole_and_fish:"🎣",diving_mask:"🤿",running_shirt_with_sash:"🎽",ski:"🎿",sled:"🛷",curling_stone:"🥌",dart:"🎯",yo_yo:"🪀",kite:"🪁","8ball":"🎱",crystal_ball:"🔮",magic_wand:"🪄",nazar_amulet:"🧿",video_game:"🎮",joystick:"🕹️",slot_machine:"🎰",game_die:"🎲",jigsaw:"🧩",teddy_bear:"🧸",pinata:"🪅",nesting_dolls:"🪆",spades:"♠️",hearts:"♥️",diamonds:"♦️",clubs:"♣️",chess_pawn:"♟️",black_joker:"🃏",mahjong:"🀄",flower_playing_cards:"🎴",performing_arts:"🎭",framed_picture:"🖼️",art:"🎨",thread:"🧵",sewing_needle:"🪡",yarn:"🧶",knot:"🪢",eyeglasses:"👓",dark_sunglasses:"🕶️",goggles:"🥽",lab_coat:"🥼",safety_vest:"🦺",necktie:"👔",shirt:"👕",tshirt:"👕",jeans:"👖",scarf:"🧣",gloves:"🧤",coat:"🧥",socks:"🧦",dress:"👗",kimono:"👘",sari:"🥻",one_piece_swimsuit:"🩱",swim_brief:"🩲",shorts:"🩳",bikini:"👙",womans_clothes:"👚",purse:"👛",handbag:"👜",pouch:"👝",shopping:"🛍️",school_satchel:"🎒",thong_sandal:"🩴",mans_shoe:"👞",shoe:"👞",athletic_shoe:"👟",hiking_boot:"🥾",flat_shoe:"🥿",high_heel:"👠",sandal:"👡",ballet_shoes:"🩰",boot:"👢",crown:"👑",womans_hat:"👒",tophat:"🎩",mortar_board:"🎓",billed_cap:"🧢",military_helmet:"🪖",rescue_worker_helmet:"⛑️",prayer_beads:"📿",lipstick:"💄",ring:"💍",gem:"💎",mute:"🔇",speaker:"🔈",sound:"🔉",loud_sound:"🔊",loudspeaker:"📢",mega:"📣",postal_horn:"📯",bell:"🔔",no_bell:"🔕",musical_score:"🎼",musical_note:"🎵",notes:"🎶",studio_microphone:"🎙️",level_slider:"🎚️",control_knobs:"🎛️",microphone:"🎤",headphones:"🎧",radio:"📻",saxophone:"🎷",accordion:"🪗",guitar:"🎸",musical_keyboard:"🎹",trumpet:"🎺",violin:"🎻",banjo:"🪕",drum:"🥁",long_drum:"🪘",iphone:"📱",calling:"📲",phone:"☎️",telephone:"☎️",telephone_receiver:"📞",pager:"📟",fax:"📠",battery:"🔋",electric_plug:"🔌",computer:"💻",desktop_computer:"🖥️",printer:"🖨️",keyboard:"⌨️",computer_mouse:"🖱️",trackball:"🖲️",minidisc:"💽",floppy_disk:"💾",cd:"💿",dvd:"📀",abacus:"🧮",movie_camera:"🎥",film_strip:"🎞️",film_projector:"📽️",clapper:"🎬",tv:"📺",camera:"📷",camera_flash:"📸",video_camera:"📹",vhs:"📼",mag:"🔍",mag_right:"🔎",candle:"🕯️",bulb:"💡",flashlight:"🔦",izakaya_lantern:"🏮",lantern:"🏮",diya_lamp:"🪔",notebook_with_decorative_cover:"📔",closed_book:"📕",book:"📖",open_book:"📖",green_book:"📗",blue_book:"📘",orange_book:"📙",books:"📚",notebook:"📓",ledger:"📒",page_with_curl:"📃",scroll:"📜",page_facing_up:"📄",newspaper:"📰",newspaper_roll:"🗞️",bookmark_tabs:"📑",bookmark:"🔖",label:"🏷️",moneybag:"💰",coin:"🪙",yen:"💴",dollar:"💵",euro:"💶",pound:"💷",money_with_wings:"💸",credit_card:"💳",receipt:"🧾",chart:"💹",envelope:"✉️",email:"📧","e-mail":"📧",incoming_envelope:"📨",envelope_with_arrow:"📩",outbox_tray:"📤",inbox_tray:"📥",package:"📦",mailbox:"📫",mailbox_closed:"📪",mailbox_with_mail:"📬",mailbox_with_no_mail:"📭",postbox:"📮",ballot_box:"🗳️",pencil2:"✏️",black_nib:"✒️",fountain_pen:"🖋️",pen:"🖊️",paintbrush:"🖌️",crayon:"🖍️",memo:"📝",pencil:"📝",briefcase:"💼",file_folder:"📁",open_file_folder:"📂",card_index_dividers:"🗂️",date:"📅",calendar:"📆",spiral_notepad:"🗒️",spiral_calendar:"🗓️",card_index:"📇",chart_with_upwards_trend:"📈",chart_with_downwards_trend:"📉",bar_chart:"📊",clipboard:"📋",pushpin:"📌",round_pushpin:"📍",paperclip:"📎",paperclips:"🖇️",straight_ruler:"📏",triangular_ruler:"📐",scissors:"✂️",card_file_box:"🗃️",file_cabinet:"🗄️",wastebasket:"🗑️",lock:"🔒",unlock:"🔓",lock_with_ink_pen:"🔏",closed_lock_with_key:"🔐",key:"🔑",old_key:"🗝️",hammer:"🔨",axe:"🪓",pick:"⛏️",hammer_and_pick:"⚒️",hammer_and_wrench:"🛠️",dagger:"🗡️",crossed_swords:"⚔️",gun:"🔫",boomerang:"🪃",bow_and_arrow:"🏹",shield:"🛡️",carpentry_saw:"🪚",wrench:"🔧",screwdriver:"🪛",nut_and_bolt:"🔩",gear:"⚙️",clamp:"🗜️",balance_scale:"⚖️",probing_cane:"🦯",link:"🔗",chains:"⛓️",hook:"🪝",toolbox:"🧰",magnet:"🧲",ladder:"🪜",alembic:"⚗️",test_tube:"🧪",petri_dish:"🧫",dna:"🧬",microscope:"🔬",telescope:"🔭",satellite:"📡",syringe:"💉",drop_of_blood:"🩸",pill:"💊",adhesive_bandage:"🩹",stethoscope:"🩺",door:"🚪",elevator:"🛗",mirror:"🪞",window:"🪟",bed:"🛏️",couch_and_lamp:"🛋️",chair:"🪑",toilet:"🚽",plunger:"🪠",shower:"🚿",bathtub:"🛁",mouse_trap:"🪤",razor:"🪒",lotion_bottle:"🧴",safety_pin:"🧷",broom:"🧹",basket:"🧺",roll_of_paper:"🧻",bucket:"🪣",soap:"🧼",toothbrush:"🪥",sponge:"🧽",fire_extinguisher:"🧯",shopping_cart:"🛒",smoking:"🚬",coffin:"⚰️",headstone:"🪦",funeral_urn:"⚱️",moyai:"🗿",placard:"🪧",atm:"🏧",put_litter_in_its_place:"🚮",potable_water:"🚰",wheelchair:"♿",mens:"🚹",womens:"🚺",restroom:"🚻",baby_symbol:"🚼",wc:"🚾",passport_control:"🛂",customs:"🛃",baggage_claim:"🛄",left_luggage:"🛅",warning:"⚠️",children_crossing:"🚸",no_entry:"⛔",no_entry_sign:"🚫",no_bicycles:"🚳",no_smoking:"🚭",do_not_litter:"🚯","non-potable_water":"🚱",no_pedestrians:"🚷",no_mobile_phones:"📵",underage:"🔞",radioactive:"☢️",biohazard:"☣️",arrow_up:"⬆️",arrow_upper_right:"↗️",arrow_right:"➡️",arrow_lower_right:"↘️",arrow_down:"⬇️",arrow_lower_left:"↙️",arrow_left:"⬅️",arrow_upper_left:"↖️",arrow_up_down:"↕️",left_right_arrow:"↔️",leftwards_arrow_with_hook:"↩️",arrow_right_hook:"↪️",arrow_heading_up:"⤴️",arrow_heading_down:"⤵️",arrows_clockwise:"🔃",arrows_counterclockwise:"🔄",back:"🔙",end:"🔚",on:"🔛",soon:"🔜",top:"🔝",place_of_worship:"🛐",atom_symbol:"⚛️",om:"🕉️",star_of_david:"✡️",wheel_of_dharma:"☸️",yin_yang:"☯️",latin_cross:"✝️",orthodox_cross:"☦️",star_and_crescent:"☪️",peace_symbol:"☮️",menorah:"🕎",six_pointed_star:"🔯",aries:"♈",taurus:"♉",gemini:"♊",cancer:"♋",leo:"♌",virgo:"♍",libra:"♎",scorpius:"♏",sagittarius:"♐",capricorn:"♑",aquarius:"♒",pisces:"♓",ophiuchus:"⛎",twisted_rightwards_arrows:"🔀",repeat:"🔁",repeat_one:"🔂",arrow_forward:"▶️",fast_forward:"⏩",next_track_button:"⏭️",play_or_pause_button:"⏯️",arrow_backward:"◀️",rewind:"⏪",previous_track_button:"⏮️",arrow_up_small:"🔼",arrow_double_up:"⏫",arrow_down_small:"🔽",arrow_double_down:"⏬",pause_button:"⏸️",stop_button:"⏹️",record_button:"⏺️",eject_button:"⏏️",cinema:"🎦",low_brightness:"🔅",high_brightness:"🔆",signal_strength:"📶",vibration_mode:"📳",mobile_phone_off:"📴",female_sign:"♀️",male_sign:"♂️",transgender_symbol:"⚧️",heavy_multiplication_x:"✖️",heavy_plus_sign:"➕",heavy_minus_sign:"➖",heavy_division_sign:"➗",infinity:"♾️",bangbang:"‼️",interrobang:"⁉️",question:"❓",grey_question:"❔",grey_exclamation:"❕",exclamation:"❗",heavy_exclamation_mark:"❗",wavy_dash:"〰️",currency_exchange:"💱",heavy_dollar_sign:"💲",medical_symbol:"⚕️",recycle:"♻️",fleur_de_lis:"⚜️",trident:"🔱",name_badge:"📛",beginner:"🔰",o:"⭕",white_check_mark:"✅",ballot_box_with_check:"☑️",heavy_check_mark:"✔️",x:"❌",negative_squared_cross_mark:"❎",curly_loop:"➰",loop:"➿",part_alternation_mark:"〽️",eight_spoked_asterisk:"✳️",eight_pointed_black_star:"✴️",sparkle:"❇️",copyright:"©️",registered:"®️",tm:"™️",hash:"#️⃣",asterisk:"*️⃣",zero:"0️⃣",one:"1️⃣",two:"2️⃣",three:"3️⃣",four:"4️⃣",five:"5️⃣",six:"6️⃣",seven:"7️⃣",eight:"8️⃣",nine:"9️⃣",keycap_ten:"🔟",capital_abcd:"🔠",abcd:"🔡",symbols:"🔣",abc:"🔤",a:"🅰️",ab:"🆎",b:"🅱️",cl:"🆑",cool:"🆒",free:"🆓",information_source:"ℹ️",id:"🆔",m:"Ⓜ️",new:"🆕",ng:"🆖",o2:"🅾️",ok:"🆗",parking:"🅿️",sos:"🆘",up:"🆙",vs:"🆚",koko:"🈁",sa:"🈂️",ideograph_advantage:"🉐",accept:"🉑",congratulations:"㊗️",secret:"㊙️",u6e80:"🈵",red_circle:"🔴",orange_circle:"🟠",yellow_circle:"🟡",green_circle:"🟢",large_blue_circle:"🔵",purple_circle:"🟣",brown_circle:"🟤",black_circle:"⚫",white_circle:"⚪",red_square:"🟥",orange_square:"🟧",yellow_square:"🟨",green_square:"🟩",blue_square:"🟦",purple_square:"🟪",brown_square:"🟫",black_large_square:"⬛",white_large_square:"⬜",black_medium_square:"◼️",white_medium_square:"◻️",black_medium_small_square:"◾",white_medium_small_square:"◽",black_small_square:"▪️",white_small_square:"▫️",large_orange_diamond:"🔶",large_blue_diamond:"🔷",small_orange_diamond:"🔸",small_blue_diamond:"🔹",small_red_triangle:"🔺",small_red_triangle_down:"🔻",diamond_shape_with_a_dot_inside:"💠",radio_button:"🔘",white_square_button:"🔳",black_square_button:"🔲",checkered_flag:"🏁",triangular_flag_on_post:"🚩",crossed_flags:"🎌",black_flag:"🏴",white_flag:"🏳️",rainbow_flag:"🏳️🌈",transgender_flag:"🏳️⚧️",pirate_flag:"🏴☠️",ascension_island:"🇦🇨",andorra:"🇦🇩",united_arab_emirates:"🇦🇪",afghanistan:"🇦🇫",antigua_barbuda:"🇦🇬",anguilla:"🇦🇮",albania:"🇦🇱",armenia:"🇦🇲",angola:"🇦🇴",antarctica:"🇦🇶",argentina:"🇦🇷",american_samoa:"🇦🇸",austria:"🇦🇹",australia:"🇦🇺",aruba:"🇦🇼",aland_islands:"🇦🇽",azerbaijan:"🇦🇿",bosnia_herzegovina:"🇧🇦",barbados:"🇧🇧",bangladesh:"🇧🇩",belgium:"🇧🇪",burkina_faso:"🇧🇫",bulgaria:"🇧🇬",bahrain:"🇧🇭",burundi:"🇧🇮",benin:"🇧🇯",st_barthelemy:"🇧🇱",bermuda:"🇧🇲",brunei:"🇧🇳",bolivia:"🇧🇴",caribbean_netherlands:"🇧🇶",brazil:"🇧🇷",bahamas:"🇧🇸",bhutan:"🇧🇹",bouvet_island:"🇧🇻",botswana:"🇧🇼",belarus:"🇧🇾",belize:"🇧🇿",canada:"🇨🇦",cocos_islands:"🇨🇨",congo_kinshasa:"🇨🇩",central_african_republic:"🇨🇫",congo_brazzaville:"🇨🇬",switzerland:"🇨🇭",cote_divoire:"🇨🇮",cook_islands:"🇨🇰",chile:"🇨🇱",cameroon:"🇨🇲",cn:"🇨🇳",colombia:"🇨🇴",clipperton_island:"🇨🇵",costa_rica:"🇨🇷",cuba:"🇨🇺",cape_verde:"🇨🇻",curacao:"🇨🇼",christmas_island:"🇨🇽",cyprus:"🇨🇾",czech_republic:"🇨🇿",de:"🇩🇪",diego_garcia:"🇩🇬",djibouti:"🇩🇯",denmark:"🇩🇰",dominica:"🇩🇲",dominican_republic:"🇩🇴",algeria:"🇩🇿",ceuta_melilla:"🇪🇦",ecuador:"🇪🇨",estonia:"🇪🇪",egypt:"🇪🇬",western_sahara:"🇪🇭",eritrea:"🇪🇷",es:"🇪🇸",ethiopia:"🇪🇹",eu:"🇪🇺",european_union:"🇪🇺",finland:"🇫🇮",fiji:"🇫🇯",falkland_islands:"🇫🇰",micronesia:"🇫🇲",faroe_islands:"🇫🇴",fr:"🇫🇷",gabon:"🇬🇦",gb:"🇬🇧",uk:"🇬🇧",grenada:"🇬🇩",georgia:"🇬🇪",french_guiana:"🇬🇫",guernsey:"🇬🇬",ghana:"🇬🇭",gibraltar:"🇬🇮",greenland:"🇬🇱",gambia:"🇬🇲",guinea:"🇬🇳",guadeloupe:"🇬🇵",equatorial_guinea:"🇬🇶",greece:"🇬🇷",south_georgia_south_sandwich_islands:"🇬🇸",guatemala:"🇬🇹",guam:"🇬🇺",guinea_bissau:"🇬🇼",guyana:"🇬🇾",hong_kong:"🇭🇰",heard_mcdonald_islands:"🇭🇲",honduras:"🇭🇳",croatia:"🇭🇷",haiti:"🇭🇹",hungary:"🇭🇺",canary_islands:"🇮🇨",indonesia:"🇮🇩",ireland:"🇮🇪",israel:"🇮🇱",isle_of_man:"🇮🇲",india:"🇮🇳",british_indian_ocean_territory:"🇮🇴",iraq:"🇮🇶",iran:"🇮🇷",iceland:"🇮🇸",it:"🇮🇹",jersey:"🇯🇪",jamaica:"🇯🇲",jordan:"🇯🇴",jp:"🇯🇵",kenya:"🇰🇪",kyrgyzstan:"🇰🇬",cambodia:"🇰🇭",kiribati:"🇰🇮",comoros:"🇰🇲",st_kitts_nevis:"🇰🇳",north_korea:"🇰🇵",kr:"🇰🇷",kuwait:"🇰🇼",cayman_islands:"🇰🇾",kazakhstan:"🇰🇿",laos:"🇱🇦",lebanon:"🇱🇧",st_lucia:"🇱🇨",liechtenstein:"🇱🇮",sri_lanka:"🇱🇰",liberia:"🇱🇷",lesotho:"🇱🇸",lithuania:"🇱🇹",luxembourg:"🇱🇺",latvia:"🇱🇻",libya:"🇱🇾",morocco:"🇲🇦",monaco:"🇲🇨",moldova:"🇲🇩",montenegro:"🇲🇪",st_martin:"🇲🇫",madagascar:"🇲🇬",marshall_islands:"🇲🇭",macedonia:"🇲🇰",mali:"🇲🇱",myanmar:"🇲🇲",mongolia:"🇲🇳",macau:"🇲🇴",northern_mariana_islands:"🇲🇵",martinique:"🇲🇶",mauritania:"🇲🇷",montserrat:"🇲🇸",malta:"🇲🇹",mauritius:"🇲🇺",maldives:"🇲🇻",malawi:"🇲🇼",mexico:"🇲🇽",malaysia:"🇲🇾",mozambique:"🇲🇿",namibia:"🇳🇦",new_caledonia:"🇳🇨",niger:"🇳🇪",norfolk_island:"🇳🇫",nigeria:"🇳🇬",nicaragua:"🇳🇮",netherlands:"🇳🇱",norway:"🇳🇴",nepal:"🇳🇵",nauru:"🇳🇷",niue:"🇳🇺",new_zealand:"🇳🇿",oman:"🇴🇲",panama:"🇵🇦",peru:"🇵🇪",french_polynesia:"🇵🇫",papua_new_guinea:"🇵🇬",philippines:"🇵🇭",pakistan:"🇵🇰",poland:"🇵🇱",st_pierre_miquelon:"🇵🇲",pitcairn_islands:"🇵🇳",puerto_rico:"🇵🇷",palestinian_territories:"🇵🇸",portugal:"🇵🇹",palau:"🇵🇼",paraguay:"🇵🇾",qatar:"🇶🇦",reunion:"🇷🇪",romania:"🇷🇴",serbia:"🇷🇸",ru:"🇷🇺",rwanda:"🇷🇼",saudi_arabia:"🇸🇦",solomon_islands:"🇸🇧",seychelles:"🇸🇨",sudan:"🇸🇩",sweden:"🇸🇪",singapore:"🇸🇬",st_helena:"🇸🇭",slovenia:"🇸🇮",svalbard_jan_mayen:"🇸🇯",slovakia:"🇸🇰",sierra_leone:"🇸🇱",san_marino:"🇸🇲",senegal:"🇸🇳",somalia:"🇸🇴",suriname:"🇸🇷",south_sudan:"🇸🇸",sao_tome_principe:"🇸🇹",el_salvador:"🇸🇻",sint_maarten:"🇸🇽",syria:"🇸🇾",swaziland:"🇸🇿",tristan_da_cunha:"🇹🇦",turks_caicos_islands:"🇹🇨",chad:"🇹🇩",french_southern_territories:"🇹🇫",togo:"🇹🇬",thailand:"🇹🇭",tajikistan:"🇹🇯",tokelau:"🇹🇰",timor_leste:"🇹🇱",turkmenistan:"🇹🇲",tunisia:"🇹🇳",tonga:"🇹🇴",tr:"🇹🇷",trinidad_tobago:"🇹🇹",tuvalu:"🇹🇻",taiwan:"🇹🇼",tanzania:"🇹🇿",ukraine:"🇺🇦",uganda:"🇺🇬",us_outlying_islands:"🇺🇲",united_nations:"🇺🇳",us:"🇺🇸",uruguay:"🇺🇾",uzbekistan:"🇺🇿",vatican_city:"🇻🇦",st_vincent_grenadines:"🇻🇨",venezuela:"🇻🇪",british_virgin_islands:"🇻🇬",us_virgin_islands:"🇻🇮",vietnam:"🇻🇳",vanuatu:"🇻🇺",wallis_futuna:"🇼🇫",samoa:"🇼🇸",kosovo:"🇽🇰",yemen:"🇾🇪",mayotte:"🇾🇹",south_africa:"🇿🇦",zambia:"🇿🇲",zimbabwe:"🇿🇼",england:"🏴",scotland:"🏴",wales:"🏴"};Object.keys(yn).reduce((e,t)=>{const n=yn[t];return e[n]=t,e},{});const ep=Object.keys(yn).map(e=>e);Object.keys(yn).map(e=>yn[e]);function tp(e){return ep.filter(t=>t.startsWith(e)).map(t=>({name:t,emoji:yn[t]}))}const np=200,ip=new T.PluginKey("emoji"),rp=T.Node.create({name:"emoji",content:"text*",priority:np,addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),HTMLAttributes:{},suggestion:{char:":",pluginKey:ip,command:({editor:t,range:n,props:i})=>{t.chain().focus().insertContentAt(n,`${i.emoji} `).run()}},button:({editor:t,t:n})=>({component:Jg,componentProps:{editor:t,action:()=>{},isActive:()=>!1,disabled:!1,icon:"EmojiIcon",tooltip:n("editor.emoji.tooltip")}})}},addCommands(){return{setEmoji:e=>({commands:t})=>t.insertContent(`${e.emoji} `)}},addProseMirrorPlugins(){return[mo({editor:this.editor,...this.options.suggestion})]}}).configure({suggestion:{items:({query:e})=>tp(e),render:()=>{let e,t,n;return{onStart:i=>{n=i.editor.isEditable,n&&(e=new T.ReactRenderer(Zu,{props:i,editor:i.editor}),t=no("body",{getReferenceClientRect:i.clientRect,appendTo:()=>document.body,content:e.element,showOnCreate:!0,interactive:!0,trigger:"manual",placement:"bottom-start"}))},onUpdate(i){n&&(e.updateProps(i),t[0].setProps({getReferenceClientRect:i.clientRect}))},onKeyDown(i){var r;if(n)return i.event.key==="Escape"?(t[0].hide(),!0):(r=e.ref)==null?void 0:r.onKeyDown(i)},onExit(){n&&(t[0].destroy(),e.destroy())}}}}});function ap(e){const t=document.createElement("iframe");t.setAttribute("style","position: absolute; width: 0; height: 0; top: 0; left: 0;"),document.body.appendChild(t),t.textContent=`
|
|
10
10
|
<!DOCTYPE html>
|
|
11
11
|
<html lang="en">
|
|
12
12
|
<head>
|