leksy-editor 3.0.1 → 3.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
- function Ze(t,{insertAt:e}={}){if(!t||typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",e==="top"&&n.firstChild?n.insertBefore(o,n.firstChild):n.appendChild(o),o.styleSheet?o.styleSheet.cssText=t:o.appendChild(document.createTextNode(t))}Ze(`.leksy-editor-container *,*:before,*:after{box-sizing:border-box}.leksy-editor-container body,.leksy-editor-container p,.leksy-editor-container ul,.leksy-editor-container ol,.leksy-editor-container li{margin:0;padding:0;color:#000;font-weight:400}.leksy-editor-container button{appearance:auto;text-rendering:auto;color:unset;letter-spacing:normal;word-spacing:normal;line-height:normal;text-transform:none;text-indent:0px;text-shadow:none;display:inline-block;text-align:center;align-items:center;cursor:pointer;box-sizing:border-box;background-color:unset;padding-block:unset;border-width:0px;border-style:outset;border-color:unset;border-image:initial}.leksy-editor-container{width:100%;min-height:400px;border:1px solid black;border-radius:6px;display:flex;flex-direction:column;position:relative}.leksy-editor-container.fullscreen{position:fixed;top:0;left:0;height:100vh;background-color:#fff;z-index:1000;border-radius:0}.leksy-editor-toolbar{padding:6px;border-bottom:1px solid black;background-color:#f8f8ff;flex:0 1 auto;display:flex;flex-wrap:wrap;border-radius:6px 6px 0 0;align-items:center}.leksy-editor-toolbar-items{outline:1px solid gray;display:flex;border-radius:4px;margin:2px}.leksy-editor-toolbar-items span{font-size:14px;white-space:nowrap}.leksy-editor-toolbar-item{margin:1px;padding:6px 0;height:34px;width:34px;background:transparent;border-radius:4px;position:relative;user-select:none;vertical-align:top;font-size:1rem;cursor:pointer;outline:0px;text-align:center;transition:.3s}.leksy-editor-toolbar-item.active{color:#4592ff;fill:#4592ff}.leksy-editor-toolbar-item.disabled{cursor:not-allowed;color:#bdbdbd;fill:#bdbdbd}.leksy-editor-toolbar-item svg{width:14px;height:14px}.leksy-editor-toolbar-item.select{padding:0 8px;width:unset}.leksy-editor-toolbar-item.button-select{border-radius:4px 0 0 4px;margin-right:0}.leksy-editor-toolbar-item.select.button-select{padding:0;border-radius:0 4px 4px 0;margin-left:0;margin-right:1px}.leksy-editor-toolbar-item.select.button-select svg{width:18px;height:18px}.leksy-editor-toolbar-item.reset-color,.leksy-editor-toolbar-item.color{width:unset;padding:4px 8px}.leksy-editor-toolbar-item.color input{border:none;width:25px;height:25px;background:none}.leksy-editor-toolbar-item.color div{display:inline}.leksy-editor-toolbar-item:hover{background-color:#d3d3d3;border:pink}.leksy-editor-toolbar-item:hover:after{opacity:1;visibility:visible}.leksy-editor-toolbar-item:after{content:attr(data-title);position:fixed;top:var(--leksy-editor-top, 0);left:var(--leksy-editor-left, 0);opacity:0;visibility:hidden;transition:opacity .3s,visibility .3s;background-color:gray;box-shadow:0 0 24px #0003;color:#000;padding:5px 10px;border-radius:5px;transform:translate(-50%);white-space:nowrap;z-index:1;pointer-events:none;font-size:.875rem}.leksy-editor-toolbar-table{display:grid;grid-template-columns:repeat(10,20px);grid-template-rows:repeat(10,20px)}.leksy-editor-toolbar-table .cell{width:16px;height:16px;border:1px solid gray;background-color:#d3d3d3}.leksy-editor-toolbar-table .cell.selected{background-color:#0c8}.leksy-editor-placeholder{user-select:none;opacity:.5;padding:4px;position:absolute}.leksy-editor-resize-items{margin-top:4px;width:235px}.leksy-editor-resize-item{margin:1px;padding:6px;height:34px;background:transparent;border-radius:4px;position:relative;user-select:none;vertical-align:top;font-size:1rem;cursor:pointer;outline:0px;text-align:center}.leksy-editor-resize-item svg{width:15px}.leksy-editor-resize-item:hover{background-color:#d3d3d3;border:pink}.leksy-editor-resize-item:hover:after{opacity:1;visibility:visible}.leksy-editor-resize-item:not([data-title]):after,.leksy-editor-resize-item[data-title=""]:after{display:none}.leksy-editor-resize-item:after{content:attr(data-title);position:absolute;opacity:0;visibility:hidden;transition:opacity .3s,visibility .3s;background-color:gray;box-shadow:0 0 24px #0003;color:#000;padding:5px 10px;border-radius:5px;bottom:-90%;left:60%;transform:translate(-50%);white-space:nowrap;z-index:1;pointer-events:none;font-size:.875rem}.leksy-editor-dropdown-content{display:none;position:absolute;min-width:160px;box-shadow:0 4px 12px #00000026;border-radius:6px;overflow:hidden;padding:4px;z-index:2000;background-color:#fff}.leksy-editor-dropdown-content>button{display:block;width:100%;margin:0;text-align:left;padding:8px 16px;cursor:pointer;white-space:nowrap;transition:.3s;border-radius:6px}.leksy-editor-dropdown-content>button svg{width:10px;margin-right:2px}.leksy-editor-dropdown-content>button:hover{background-color:#28a745;color:#fff}.leksy-editor-dropdown-content.gallery{width:266px;height:350px;padding:0;overflow-y:auto}.leksy-editor-dropdown-content.gallery img{width:100%}.leksy-editor-dropdown-content.gallery input{width:100%;line-height:1.5rem;padding:2px 8px;border:1px solid #ccc;border-radius:6px;transition:all .3s ease-in-out;box-shadow:0 2px 4px #0000001a;font-size:14px;position:sticky;top:0}.leksy-editor-dropdown-content.gallery input:focus{border-color:#4592ff;box-shadow:0 4px 8px #4592ff4d;outline:none}.leksy-editor-dropdown-content.category{width:300px;height:350px;padding:6px;overflow-y:auto;user-select:none}.leksy-editor-dropdown-content.category div{font-weight:700;margin-top:8px;margin-bottom:4px}.leksy-editor-dropdown-content.category span{padding:4px;cursor:pointer}.leksy-editor-dropdown-content.mention{width:250px;height:350px;padding:6px;overflow-y:auto;user-select:none}.leksy-editor-dropdown-content.mention input{width:100%;line-height:1.5rem;margin:4px 0}.leksy-editor-dropdown-content.mention button{display:block;width:100%;margin:0;text-align:left;padding:8px 16px;cursor:pointer;white-space:nowrap}.leksy-editor-dropdown-content.mention button:hover{background-color:green}.leksy-editor-popover-content{display:none;position:absolute;min-width:160px;box-shadow:0 0 10px gray;border-radius:6px;padding:4px;z-index:2000;background-color:#fff}.leksy-editor-popover-tabs{display:flex;background:#f1f1f1;border-bottom:1px solid #ccc}button.leksy-editor-popover-tab{padding:8px 12px;border:none;background:transparent;cursor:pointer}button.leksy-editor-popover-tab.active{border-bottom:2px solid black;font-weight:700}.leksy-editor-popover-tabs .leksy-editor-popover-tab:not(:last-child){border-right:1px solid #ccc}.leksy-editor-codeview{flex:1 1 auto;padding:4px;background-color:#1f1f1f;color:#74bed8;border:0;outline:0;display:none;resize:none;height:400px}.leksy-editor-stepper{height:24px;border-top:1px solid black;border-radius:0 0 4px 4px;background-color:#f8f8ff;padding:2px 5px;text-transform:uppercase;display:flex;justify-content:space-between;font-size:14px;user-select:none}.leksy-editor-stepper .breadcrumb{list-style:none;display:flex;overflow:hidden;justify-content:end}.leksy-editor-stepper .breadcrumb li{margin-left:5px}.leksy-editor-stepper .breadcrumb li:after{content:">";margin-left:5px}.leksy-editor-stepper .breadcrumb li:last-child:after{content:""}.leksy-editor-modal{position:fixed;z-index:100;left:0;top:0;width:100%;height:100%;overflow:auto;background-color:#00000080}.leksy-editor-modal.leksy-editor-draggable-modal{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);background:inherit;width:fit-content;height:inherit}.leksy-editor-modal-content{margin:10% auto;border:1px solid #898f9f;max-width:500px;border-radius:12px}.leksy-editor-modal.leksy-editor-draggable-modal .leksy-editor-modal-content{margin:unset;width:fit-content}.leksy-editor-modal-header{padding:1.25rem;display:flex;align-items:center;justify-content:space-between;background-color:#fff;border-bottom:1px solid #d4d5d8;border-radius:12px 12px 0 0;overflow:hidden}.leksy-editor-modal-body{background-color:#fff;padding:1.5rem;width:100%}.leksy-editor-modal-body .warning{color:red}.leksy-editor-modal-footer{background-color:#f2f2f3;padding:1.25rem;display:flex;justify-content:flex-end;gap:12px;border-radius:0 0 12px 12px;width:100%}.leksy-editor-modal input{width:100%;font-size:1rem;padding:10px 12px;border:1px solid #ccc;border-radius:6px;outline:none;transition:all .3s ease-in-out;color:#333}.leksy-editor-modal input:focus{border-color:#4592ff;background-color:#fff}.leksy-editor-modal input::placeholder{color:#bdbdbd}.leksy-editor-modal input:hover{border-color:#555}.leksy-editor-modal button.submit{height:2rem;padding:.75rem 1rem;background-color:#00b377;display:flex;align-items:center;justify-content:center;flex-direction:row;text-align:center;text-decoration:none;cursor:pointer;border:1px solid hsl(160,100%,40%);border-radius:6px;color:#fff;white-space:nowrap;gap:.5rem;transition:.5s;font-size:1rem}.leksy-editor-preview-modal-overlay{position:fixed;top:0;left:0;width:100%;height:100%;background:#000000b9;display:block;align-items:center;justify-content:center;z-index:1000}.leksy-editor-preview-modal-content{height:100%;padding:20px;border-radius:8px;box-shadow:0 4px 6px #0000001a;position:relative;text-align:center}.leksy-editor-preview-modal-close{position:absolute;top:10px;right:20px;cursor:pointer;color:#fff;font-size:20px}.leksy-editor-preview-modal-close svg{width:28px}.leksy-editor-preview-modal-body{display:flex;height:100%;width:100%;align-items:center;justify-content:center}.leksy-editor-preview-modal-body img{object-fit:contain;max-width:90%;max-height:90%}.leksy-editor-spinner{animation:leksy-editor-rotate 1s linear infinite;margin-right:8px;vertical-align:middle}.leksy-editor-spinner .leksy-editor-path{stroke:#fff;stroke-linecap:round;animation:leksy-editor-dash 1.5s ease-in-out infinite}.leksy-editor-upload-img-box{height:180px;border:2px dashed #d1d5db;border-radius:12px;background:#f9fafb;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:border-color .2s ease}.leksy-editor-upload-img-box:hover{border-color:gray}.leksy-editor-upload-img-preview-box{height:180px;border:2px solid grey;margin-bottom:8px;border-radius:8px}.leksy-editor-upload-img-preview{width:100%;height:100%;border-radius:8px;object-fit:cover;object-position:top}.leksy-editor-find-and-replace-modal-tab-btn{background:transparent;border:none;cursor:pointer;font-size:16px;padding:0;color:var(--primary)}.leksy-editor-find-and-replace-modal-tab-btn.active{font-weight:700;border-bottom:2px solid black}.leksy-editor-find-and-replace-modal-label{padding-left:4px;margin-bottom:10px}.leksy-editor-find-and-replace-modal-count{position:absolute;right:8px;top:50%;transform:translateY(-50%);font-size:12px;color:#585555;pointer-events:none;user-select:none}@keyframes leksy-editor-rotate{to{transform:rotate(360deg)}}@keyframes leksy-editor-dash{0%{stroke-dasharray:1,150;stroke-dashoffset:0}50%{stroke-dasharray:90,150;stroke-dashoffset:-35}to{stroke-dasharray:90,150;stroke-dashoffset:-124}}
2
- `);var gn="br|p|div|pre|blockquote|h|h1|h2|h3|h4|h5|h6|ol|ul|li|hr|figure|figcaption|img|iframe|audio|video|source|table|thead|tbody|tr|th|td|a|b|strong|var|i|em|u|ins|s|span|strike|del|sub|sup|code|svg|path|details|summary|font|article|section|main|header|footer|aside|mark|cite|abbr|dfn|nav|caption|picture|dl|dt|dd|time|label|kbd|samp|wbr",fn="align|alt|bgcolor|border|cellpadding|cellspacing|color|colspan|contenteditable|dir|download|face|height|href|lang|name|rowspan|size|src|style|target|title|valign|width|background|media|sizes|srcset|spellcheck",bn=["position","inset","top","right","bottom","left","z-index","float","clear","overflow","overflow-x","overflow-y","transform","transform-origin","perspective","transition","transition-property","transition-duration","transition-timing-function","transition-delay","animation","animation-name","animation-duration","animation-timing-function","animation-delay","animation-iteration-count","animation-direction","animation-fill-mode","animation-play-state","flex-basis","flex-grow","flex-shrink","order","place-self","grid-column","grid-row"].join("|"),F={TEXT_URL:/(https?:\/\/[^\s]+|www\.[^\s]+)$/i,URL:/^(https?:\/\/)([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}(\/.*)?$/,MAILTO:/^mailto:[\w.-]+@[\w.-]+\.\w+$/,TEL:/^tel:\+?[0-9\s()-]+$/,EMAIL:/^[\w.-]+@[\w.-]+\.\w+$/,MOBILE:/^\+?[0-9\s()-]+$/,WHILE_LISTED_TAG:new RegExp("^("+gn.replace(/\|/g,"\\b|\\b")+")$","i"),WHILE_LISTED_ATTRIBUTES:new RegExp("^("+fn.replace(/\|/g,"\\b|\\b")+")$","i"),BLOCKED_STYLES:new RegExp("^("+bn.replace(/\|/g,"\\b|\\b")+")$","i")},fe={INVALID_ELEMENT:"Invalid argument: Element must be an instance of HTMLElement.",INVALID_PLUGIN:"Invalid plugin: Plugin not found.",GIPHY_KEY_NOT_FOUND:"GIPHY key not found.",PEXELS_KEY_NOT_FOUND:"Pexels key not found.",TENOR_KEY_NOT_FOUND:"Tenor key not found."},A={PREFIX:"leksy-editor",CONTAINER:"-container",TOOLBAR:"-toolbar",TOOLBAR_TABLE:"-toolbar-table",TOOLBAR_ITEM:"-toolbar-item",TOOLBAR_ITEM_SELECT:"select",TOOLBAR_ITEM_BUTTON_SELECT:"button-select",TOOLBAR_ITEM_COLOR:"color",TOOLBAR_ITEMS:"-toolbar-items",PLACEHOLDER:"-placeholder",CODEVIEW:"-codeview",STEPPER:"-stepper",DROPDOWN_CONTENT:"-dropdown-content",POPOVER_CONTENT:"-popover-content",POPOVER_TABS:"-popover-tabs",POPOVER_TAB:"-popover-tab",POPOVER_TAB_CONTENT:"-popover-tab-content",RESIZE_ITEMS:"-resize-items",RESIZE_ITEM:"-resize-item",MODAL:"-modal",DRAGGABLE_MODAL:"-draggable-modal",MODAL_CONTENT:"-modal-content",MODAL_HEADER:"-modal-header",MODAL_BODY:"-modal-body",MODAL_FOOTER:"-modal-footer",RESIZER:"-resizer",PREVIEW_MODAL_OVERLAY:"-preview-modal-overlay",PREVIEW_MODAL_CONTENT:"-preview-modal-content",PREVIEW_MODAL_CLOSE:"-preview-modal-close",PREVIEW_MODAL_BODY:"-preview-modal-body",UPLOAD_IMG_BOX:"-upload-img-box",UPLOAD_IMG_PREVIEW_BOX:"-upload-img-preview-box",UPLOAD_IMG_PREVIEW:"-upload-img-preview"},L={REDO:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.59 14.18"><g><path d="M11.58,18.48a6.84,6.84,0,1,1,6.85-6.85s0,.26,0,.67a8,8,0,0,1-.22,1.44l.91-.55a.51.51,0,0,1,.36,0,.45.45,0,0,1,.29.22.47.47,0,0,1,.06.36.45.45,0,0,1-.22.29L17.42,15.3l-.12,0h-.25l-.12-.06-.09-.09-.06-.07,0-.06-.87-2.12a.43.43,0,0,1,0-.37.49.49,0,0,1,.27-.26.41.41,0,0,1,.36,0,.53.53,0,0,1,.27.26l.44,1.09a6.51,6.51,0,0,0,.24-1.36,4.58,4.58,0,0,0,0-.64,5.83,5.83,0,0,0-1.73-4.17,5.88,5.88,0,0,0-8.34,0,5.9,5.9,0,0,0,4.17,10.06.51.51,0,0,1,.33.15.48.48,0,0,1,0,.68.53.53,0,0,1-.33.12Z" transform="translate(-4.48 -4.54)"/></g></svg>',UNDO:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.59 14.18"><g><path d="M5,14a.43.43,0,0,1-.22-.29.46.46,0,0,1,.06-.36.43.43,0,0,1,.29-.22.56.56,0,0,1,.36,0l.91.55a8.27,8.27,0,0,1-.22-1.45,5.07,5.07,0,0,1,0-.67A6.85,6.85,0,1,1,13,18.47a.44.44,0,0,1-.33-.13.48.48,0,0,1,0-.68.51.51,0,0,1,.33-.15A5.89,5.89,0,0,0,17.15,7.45a5.88,5.88,0,0,0-8.33,0,5.84,5.84,0,0,0-1.73,4.17s0,.25,0,.65a6.49,6.49,0,0,0,.24,1.37l.44-1.09a.57.57,0,0,1,.27-.26.41.41,0,0,1,.36,0,.53.53,0,0,1,.27.26.43.43,0,0,1,0,.37L7.82,15l0,.09-.09.09-.1.07-.06,0H7.28l-.13,0-1.09-.63c-.65-.36-1-.57-1.1-.63Z" transform="translate(-4.49 -4.53)"/></g></svg>',BOLD:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 11.76 15.75"><g><path d="M6.4,3.76V19.5h6.76a5.55,5.55,0,0,0,2-.32,4.93,4.93,0,0,0,1.52-1,4.27,4.27,0,0,0,1.48-3.34,3.87,3.87,0,0,0-.69-2.37,5.74,5.74,0,0,0-.71-.83,3.44,3.44,0,0,0-1.1-.65,3.6,3.6,0,0,0,1.58-1.36,3.66,3.66,0,0,0,.53-1.93,3.7,3.7,0,0,0-1.21-2.87,4.65,4.65,0,0,0-3.25-1.1H6.4Zm2.46,6.65V5.57h3.52a4.91,4.91,0,0,1,1.36.15,2.3,2.3,0,0,1,.85.45,2.06,2.06,0,0,1,.74,1.71,2.3,2.3,0,0,1-.78,1.92,2.54,2.54,0,0,1-.86.46,4.7,4.7,0,0,1-1.32.15H8.86Zm0,7.27V12.15H12.7a4.56,4.56,0,0,1,1.38.17,3.43,3.43,0,0,1,.95.49,2.29,2.29,0,0,1,.92,2,2.73,2.73,0,0,1-.83,2.1,2.66,2.66,0,0,1-.83.58,3.25,3.25,0,0,1-1.26.2H8.86Z" transform="translate(-6.4 -3.75)"/></g></svg>',UNDERLINE:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 9.78 15.74"><g><path d="M14.64,3.76h2.52v7.72a4.51,4.51,0,0,1-.59,2.31,3.76,3.76,0,0,1-1.71,1.53,6.12,6.12,0,0,1-2.64.53,5,5,0,0,1-3.57-1.18,4.17,4.17,0,0,1-1.27-3.24V3.76H9.9v7.3a3,3,0,0,0,.55,2,2.3,2.3,0,0,0,1.83.65,2.26,2.26,0,0,0,1.8-.65,3.09,3.09,0,0,0,.55-2V3.76Zm2.52,13.31V19.5H7.39V17.08h9.77Z" transform="translate(-7.38 -3.76)"/></g></svg>',ITALIC:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10.49 15.76"><g><path d="M17.16,3.79l.37,0-.06.38-.14.52A10,10,0,0,1,16.21,5a9.37,9.37,0,0,0-1,.32,6.68,6.68,0,0,0-.25.89c-.06.31-.11.59-.14.85-.3,1.36-.52,2.41-.68,3.14l-.61,3.18L13.1,15l-.43,2.4-.12.46a.62.62,0,0,0,0,.28c.44.1.85.17,1.23.22l.68.11a4.51,4.51,0,0,1-.08.6l-.09.42a.92.92,0,0,0-.23,0l-.43,0a1.37,1.37,0,0,1-.29,0c-.13,0-.63-.08-1.49-.16l-2,0c-.28,0-.87,0-1.78.12L7,19.5l.17-.88.8-.2A6.61,6.61,0,0,0,9.19,18,2.62,2.62,0,0,0,9.61,17l.28-1.41.58-2.75.12-.66c.05-.3.11-.58.17-.86s.12-.51.17-.69l.12-.48.12-.43.31-1.6.15-.65.31-1.91V5.14a3.86,3.86,0,0,0-1.48-.29l-.38,0,.2-1.06,3.24.14.75,0c.45,0,1.18,0,2.18-.09.23,0,.46,0,.71,0Z" transform="translate(-7.04 -3.76)"/></g></svg>',STRIKE:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.74 14.9"><g><path d="M12.94,13a4.27,4.27,0,0,1,1.32.58,1.46,1.46,0,0,1,.55,1.2,1.87,1.87,0,0,1-.88,1.64,4.17,4.17,0,0,1-2.35.59,4.44,4.44,0,0,1-2.74-.71,2.72,2.72,0,0,1-1-2.17H5.57a4.56,4.56,0,0,0,1.55,3.7,7,7,0,0,0,4.47,1.23,6,6,0,0,0,4.07-1.3,4.24,4.24,0,0,0,1.52-3.37,4,4,0,0,0-.26-1.4h-4ZM6.37,10.24A3.27,3.27,0,0,1,6,8.68a4,4,0,0,1,1.48-3.3,5.92,5.92,0,0,1,3.88-1.21,5.58,5.58,0,0,1,3.91,1.24,4.36,4.36,0,0,1,1.45,3.17H14.44a2.12,2.12,0,0,0-.91-1.81,4.45,4.45,0,0,0-2.44-.55,3.69,3.69,0,0,0-2,.51A1.64,1.64,0,0,0,8.3,8.22a1.3,1.3,0,0,0,.48,1.11,7,7,0,0,0,2.1.78l.28.06.28.08H6.37Zm13.09.68a.73.73,0,0,1,.49.21.66.66,0,0,1,.2.48.64.64,0,0,1-.2.48.71.71,0,0,1-.49.19H5.1a.67.67,0,0,1-.49-.19.66.66,0,0,1-.2-.48.64.64,0,0,1,.2-.48.73.73,0,0,1,.49-.21H19.46Z" transform="translate(-4.41 -4.17)"/></g></svg>',ALIGN_JUSTIFY:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.74 13.77"><g><path d="M4.41,4.74v2H20.15v-2H4.41Zm0,5.9H20.15v-2H4.41v2Zm0,3.94H20.15v-2H4.41v2Zm0,3.93h7.87v-2H4.41v2Z" transform="translate(-4.41 -4.74)"/></g></svg>',ALIGN_LEFT:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.74 13.77"><g><path d="M4.41,4.74v2H20.15v-2H4.41Zm11.8,3.94H4.41v2H16.22v-2Zm-11.8,5.9H18.18v-2H4.41v2Zm0,3.93h9.84v-2H4.41v2Z" transform="translate(-4.41 -4.74)"/></g></svg>',ALIGN_RIGHT:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.74 13.77"><g><path d="M4.41,4.74v2H20.15v-2H4.41Zm3.93,5.9H20.15v-2H8.34v2Zm-2,3.94H20.14v-2H6.37v2Zm3.94,3.93h9.84v-2H10.31v2Z" transform="translate(-4.41 -4.74)"/></g></svg>',ALIGN_CENTER:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.74 13.77"><g><path d="M4.41,4.74v2H20.15v-2H4.41Zm2,3.94v2H18.18v-2H6.37Zm-1,5.9H19.16v-2H5.39v2Zm2,3.93H17.2v-2H7.36v2Z" transform="translate(-4.41 -4.74)"/></g></svg>',CODE_VIEW:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.73 11.8"><g><path d="M8.09,7.94a.76.76,0,0,1,.53.22.72.72,0,0,1,.21.52.76.76,0,0,1-.22.54L6.18,11.63l2.43,2.44a.69.69,0,0,1,.2.51.66.66,0,0,1-.21.51.75.75,0,0,1-.51.22.63.63,0,0,1-.51-.21h0L4.63,12.15a.7.7,0,0,1-.22-.53.67.67,0,0,1,.25-.55L7.57,8.16a.82.82,0,0,1,.52-.22Zm12.05,3.69a.7.7,0,0,1-.23.52L17,15.1h0a.66.66,0,0,1-.51.21.73.73,0,0,1-.51-.22.75.75,0,0,1-.22-.51.63.63,0,0,1,.21-.51l2.43-2.44L15.92,9.22a.73.73,0,0,1-.22-.53A.74.74,0,0,1,17,8.18h0l2.91,2.91a.67.67,0,0,1,.27.54Zm-5.9-5.9a.73.73,0,0,1,.61.32.71.71,0,0,1,.07.68L11,17a1,1,0,0,1-.22.32.6.6,0,0,1-.35.16.75.75,0,0,1-.69-.26.69.69,0,0,1-.12-.72L13.56,6.23a.75.75,0,0,1,.26-.35.74.74,0,0,1,.42-.15Z" transform="translate(-4.41 -5.73)"/></g></svg>',ATTACHMENT:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 8.38 15.68"><g><path d="M15.23,6h1v9.78a3.88,3.88,0,0,1-1.31,2.45,4,4,0,0,1-6.57-2.45V7A3,3,0,0,1,9.2,4.89a3,3,0,0,1,5,2.09v8.31a1.92,1.92,0,0,1-.58,1.39,2,2,0,0,1-1.39.58,1.92,1.92,0,0,1-1.39-.58,2,2,0,0,1-.58-1.39V8h1v7.32a1,1,0,0,0,.29.69,1,1,0,0,0,.69.28A.9.9,0,0,0,13,16a1,1,0,0,0,.29-.69V7a1.92,1.92,0,0,0-.58-1.39A2,2,0,0,0,11.27,5a1.92,1.92,0,0,0-1.39.58A2,2,0,0,0,9.33,7v8.31a3,3,0,1,0,5.9,0V6Z" transform="translate(-8.08 -3.78)"/></g></svg>',LIST_BULLETS:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.74 12.37"><g><path d="M7.77,16.12a1.59,1.59,0,0,0-.49-1.18,1.62,1.62,0,0,0-1.19-.49,1.68,1.68,0,1,0,0,3.36,1.67,1.67,0,0,0,1.68-1.69Zm0-4.48A1.67,1.67,0,0,0,6.09,10,1.68,1.68,0,0,0,4.9,12.82a1.62,1.62,0,0,0,1.19.49,1.67,1.67,0,0,0,1.68-1.67Zm12.38,3.64a.27.27,0,0,0-.08-.19.28.28,0,0,0-.2-.09H9.19a.28.28,0,0,0-.2.08.29.29,0,0,0-.08.19V17a.27.27,0,0,0,.28.28H19.87a.27.27,0,0,0,.19-.08.24.24,0,0,0,.08-.2V15.28ZM7.77,7.13a1.63,1.63,0,0,0-.49-1.2,1.61,1.61,0,0,0-1.19-.49,1.61,1.61,0,0,0-1.19.49,1.71,1.71,0,0,0,0,2.4,1.62,1.62,0,0,0,1.19.49,1.61,1.61,0,0,0,1.19-.49,1.63,1.63,0,0,0,.49-1.2Zm12.38,3.66a.28.28,0,0,0-.08-.2.29.29,0,0,0-.19-.08H9.19a.27.27,0,0,0-.28.28v1.69a.27.27,0,0,0,.08.19.24.24,0,0,0,.2.08H19.87a.27.27,0,0,0,.19-.08.25.25,0,0,0,.08-.19V10.79Zm0-4.5a.27.27,0,0,0-.08-.19A.25.25,0,0,0,19.88,6H9.19A.28.28,0,0,0,9,6.1a.26.26,0,0,0-.08.19V8A.27.27,0,0,0,9,8.17a.24.24,0,0,0,.2.08H19.87a.27.27,0,0,0,.19-.08A.25.25,0,0,0,20.14,8V6.29Z" transform="translate(-4.41 -5.44)"/></g></svg>',LIST_NUMBER:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.69 15.74"><g><path d="M7.66,18a1.24,1.24,0,0,0-.26-.78,1.17,1.17,0,0,0-.72-.42l.85-1V15H4.58v1.34h.94v-.46l.85,0h0c-.11.11-.22.23-.32.35s-.23.27-.37.47L5.39,17l.23.51c.61-.05.92.11.92.49a.42.42,0,0,1-.18.37.79.79,0,0,1-.45.12A1.41,1.41,0,0,1,5,18.15l-.51.77A2.06,2.06,0,0,0,6,19.5a1.8,1.8,0,0,0,1.2-.41A1.38,1.38,0,0,0,7.66,18Zm0-5.54H6.75V13H5.63A.72.72,0,0,1,6,12.51a5.45,5.45,0,0,1,.66-.45,2.71,2.71,0,0,0,.67-.57,1.19,1.19,0,0,0,.31-.81,1.29,1.29,0,0,0-.45-1,1.86,1.86,0,0,0-2-.11,1.51,1.51,0,0,0-.62.7l.74.52A.87.87,0,0,1,6,10.28a.51.51,0,0,1,.35.12.42.42,0,0,1,.13.33.55.55,0,0,1-.21.4,3,3,0,0,1-.5.38c-.19.13-.39.27-.58.42a2,2,0,0,0-.5.6,1.63,1.63,0,0,0-.21.81,3.89,3.89,0,0,0,.05.48h3.2V12.44Zm12.45,2.82a.27.27,0,0,0-.08-.19.28.28,0,0,0-.21-.08H9.1a.32.32,0,0,0-.21.08.24.24,0,0,0-.08.2V17a.27.27,0,0,0,.08.19.3.3,0,0,0,.21.08H19.83a.32.32,0,0,0,.21-.08.25.25,0,0,0,.08-.19V15.26ZM7.69,7.32h-1V3.76H5.8L4.6,4.88l.63.68a1.85,1.85,0,0,0,.43-.48h0l0,2.24H4.74V8.2h3V7.32Zm12.43,3.42a.27.27,0,0,0-.08-.19.28.28,0,0,0-.21-.08H9.1a.32.32,0,0,0-.21.08.24.24,0,0,0-.08.2v1.71a.27.27,0,0,0,.08.19.3.3,0,0,0,.21.08H19.83a.32.32,0,0,0,.21-.08.25.25,0,0,0,.08-.19V10.74Zm0-4.52A.27.27,0,0,0,20,6,.28.28,0,0,0,19.83,6H9.1A.32.32,0,0,0,8.89,6a.24.24,0,0,0-.08.19V7.93a.27.27,0,0,0,.08.19.32.32,0,0,0,.21.08H19.83A.32.32,0,0,0,20,8.12a.26.26,0,0,0,.08-.2V6.22Z" transform="translate(-4.43 -3.76)"/></g></svg>',NEW_LIST_NUMBER:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256"><path d="M144,48V208a8,8,0,0,1-16,0V62.13L100.12,78.86a8,8,0,1,1-8.24-13.72l40-24A8,8,0,0,1,144,48Z"></path></svg>',LIST_SQUARE:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256"><path d="M224,48V208a16,16,0,0,1-16,16H48a16,16,0,0,1-16-16V48A16,16,0,0,1,48,32H208A16,16,0,0,1,224,48Z"></path></svg>',LIST_DISC:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z"></path></svg>',LIST_CIRCLE:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256"><rect width="256" height="256" fill="none"/><circle cx="128" cy="128" r="96" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/></svg>',LIST_LOWER_ALPHA:'<svg viewBox="-6 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg"><title>a</title><path d="M15.969 12.094v-2.938h2.25v16.438h-2.25v-2.313c-1.563 1.719-3.875 2.844-6.438 2.844-4.75 0-8.906-3.75-8.906-8.438s4.156-8.438 8.906-8.438c2.563 0 4.875 1.125 6.438 2.844zM15.969 17.875v-0.375c-0.125-3.438-2.969-6.188-6.469-6.188-3.594 0-6.719 2.844-6.719 6.375s3.125 6.375 6.719 6.375c3.5 0 6.344-2.75 6.469-6.188z"></path></svg>',LIST_LOWER_ROMAN:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><path d="M272 112C272 85.5 293.5 64 320 64C346.5 64 368 85.5 368 112C368 138.5 346.5 160 320 160C293.5 160 272 138.5 272 112zM224 256C224 238.3 238.3 224 256 224L320 224C337.7 224 352 238.3 352 256L352 512L384 512C401.7 512 416 526.3 416 544C416 561.7 401.7 576 384 576L256 576C238.3 576 224 561.7 224 544C224 526.3 238.3 512 256 512L288 512L288 288L256 288C238.3 288 224 273.7 224 256z"/></svg>',LIST_UPPER_ALPHA:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><path d="M349.5 115.7C344.6 103.8 332.9 96 320 96C307.1 96 295.4 103.8 290.5 115.7C197.2 339.7 143.8 467.7 130.5 499.7C123.7 516 131.4 534.7 147.7 541.5C164 548.3 182.7 540.6 189.5 524.3L221.3 448L418.6 448L450.4 524.3C457.2 540.6 475.9 548.3 492.2 541.5C508.5 534.7 516.2 516 509.4 499.7C496.1 467.7 442.7 339.7 349.4 115.7zM392 384L248 384L320 211.2L392 384z"/></svg>',SUBSCRIPT:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.75 14.61"><g><path d="M15.38,4.33H12.74L11.19,7c-.28.46-.51.87-.69,1.21L10.07,9h0l-.44-.8c-.22-.4-.45-.81-.71-1.23L7.34,4.33H4.68L8.26,10,4.4,16.08H7.1l1.69-2.83c.38-.63.72-1.22,1-1.78l.25-.46h0l.49.92c.24.45.48.89.74,1.32L13,16.08h2.61L11.84,10l1.77-2.84,1.77-2.85Zm4.77,13.75H17v-.15c0-.4.05-.64.16-.72a4.42,4.42,0,0,1,1.16-.31,3.3,3.3,0,0,0,1.54-.56A1.84,1.84,0,0,0,20.15,15a1.78,1.78,0,0,0-.44-1.41A2.8,2.8,0,0,0,18,13.25a2.71,2.71,0,0,0-1.69.37,1.83,1.83,0,0,0-.44,1.43v.23H17v-.23q0-.63.18-.78a1.62,1.62,0,0,1,.88-.15,1.59,1.59,0,0,1,.88.15q.18.15.18.75t-.18.75a3.58,3.58,0,0,1-1.18.33,3.33,3.33,0,0,0-1.52.51,1.57,1.57,0,0,0-.32,1.18v1.15h4.27v-.86Z" transform="translate(-4.4 -4.33)"/></g></svg>',SUPERSCRIPT:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.75 15.42"><g><path d="M12,13.14l3.61-5.81H12.94L11.33,10c-.28.46-.51.88-.69,1.25l-.45.83h0l-.45-.85c-.22-.41-.45-.82-.71-1.24L7.4,7.33H4.68l3.66,5.81L4.4,19.33H7.14l1.74-2.87q.58-1,1-1.83l.25-.48h0l.51.94.75,1.37,1.72,2.87h2.67l-1.92-3.09c-1.12-1.8-1.76-2.83-1.92-3.1Zm4.84-4.41h0l0,.15h3.27v.86H15.77V8.58a1.66,1.66,0,0,1,.33-1.22,3.51,3.51,0,0,1,1.56-.51,3.68,3.68,0,0,0,1.21-.34c.13-.1.19-.36.19-.77S19,5.07,18.87,5A1.63,1.63,0,0,0,18,4.8a1.58,1.58,0,0,0-.91.17c-.13.11-.19.38-.19.8V6H15.78V5.76a1.87,1.87,0,0,1,.45-1.47A2.84,2.84,0,0,1,18,3.91a2.8,2.8,0,0,1,1.72.38,1.84,1.84,0,0,1,.45,1.44,1.91,1.91,0,0,1-.34,1.35,3.24,3.24,0,0,1-1.58.57A3.69,3.69,0,0,0,17,8c-.12.1-.17.35-.17.76Z" transform="translate(-4.4 -3.91)"/></g></svg>',INDENT:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.74 12.36"><g><path d="M4.68,14.45a.27.27,0,0,1-.19-.08.3.3,0,0,1-.08-.21V9.1a.27.27,0,0,1,.08-.19.28.28,0,0,1,.2-.08.25.25,0,0,1,.19.07l2.54,2.54a.29.29,0,0,1,0,.4L4.88,14.36a.24.24,0,0,1-.2.09Zm15.19,1.12a.27.27,0,0,1,.19.08.25.25,0,0,1,.08.19v1.69a.27.27,0,0,1-.08.19.25.25,0,0,1-.19.08H4.68a.27.27,0,0,1-.19-.08.25.25,0,0,1-.08-.19V15.84a.27.27,0,0,1,.27-.27H19.87Zm0-3.38a.27.27,0,0,1,.19.08.28.28,0,0,1,.08.21v1.68a.32.32,0,0,1-.08.21.25.25,0,0,1-.19.08H10.31a.27.27,0,0,1-.19-.08.3.3,0,0,1-.08-.21V12.48a.32.32,0,0,1,.08-.21.24.24,0,0,1,.19-.08h9.56Zm0-3.37a.27.27,0,0,1,.19.08.25.25,0,0,1,.08.19v1.69a.27.27,0,0,1-.08.19.25.25,0,0,1-.19.08H10.31a.27.27,0,0,1-.27-.27V9.1a.27.27,0,0,1,.27-.27h9.56Zm.2-3.29a.28.28,0,0,1,.08.2V7.41a.32.32,0,0,1-.08.21.25.25,0,0,1-.19.08H4.68a.27.27,0,0,1-.19-.08.3.3,0,0,1-.08-.21V5.73a.32.32,0,0,1,.08-.21.25.25,0,0,1,.19-.08H19.87a.28.28,0,0,1,.2.09Z" transform="translate(-4.41 -5.44)"/></g></svg>',OUTDENT:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.74 12.36"><g><path d="M19.87,15.57a.27.27,0,0,1,.19.08.25.25,0,0,1,.08.19v1.69a.27.27,0,0,1-.08.19.25.25,0,0,1-.19.08H4.68a.27.27,0,0,1-.19-.08.25.25,0,0,1-.08-.19V15.84a.27.27,0,0,1,.27-.27H19.87ZM7.5,14.45a.25.25,0,0,1-.2-.09L4.76,11.84a.29.29,0,0,1,0-.4L7.3,8.9a.29.29,0,0,1,.4,0,.31.31,0,0,1,.07.2v5.06a.32.32,0,0,1-.08.21.26.26,0,0,1-.19.08ZM19.87,8.82a.27.27,0,0,1,.19.08.25.25,0,0,1,.08.19v1.69a.27.27,0,0,1-.08.19.25.25,0,0,1-.19.08H10.31a.27.27,0,0,1-.27-.27V9.1a.27.27,0,0,1,.27-.27h9.56Zm0,3.37a.27.27,0,0,1,.19.08.28.28,0,0,1,.08.21v1.68a.32.32,0,0,1-.08.21.25.25,0,0,1-.19.08H10.31a.27.27,0,0,1-.19-.08.3.3,0,0,1-.08-.21V12.48a.32.32,0,0,1,.08-.21.24.24,0,0,1,.19-.08h9.56Zm.2-6.66a.28.28,0,0,1,.08.2V7.41a.32.32,0,0,1-.08.21.25.25,0,0,1-.19.08H4.68a.27.27,0,0,1-.19-.08.3.3,0,0,1-.08-.21V5.73a.32.32,0,0,1,.08-.21.25.25,0,0,1,.19-.08H19.87a.28.28,0,0,1,.2.09Z" transform="translate(-4.41 -5.44)"/></g></svg>',LINE_HEIGHT:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.76 13.56"><g><path d="M4.4,4.88V8.26a2,2,0,0,0,.5.39s.1,0,.18-.12a.62.62,0,0,0,.17-.28c.06-.19.13-.44.21-.74s.14-.52.19-.66a.58.58,0,0,1,.21-.3,2.41,2.41,0,0,1,.63-.21,3.83,3.83,0,0,1,.88-.12,9.15,9.15,0,0,1,1.31.06.16.16,0,0,1,.11,0,.26.26,0,0,1,.06.14,4,4,0,0,1,0,.49v2l.05,3.77c0,1.41,0,2.68-.05,3.81a1.79,1.79,0,0,1-.11.49,10.68,10.68,0,0,1-1.4.45,1.12,1.12,0,0,0-.69.43v.31l0,.22.61,0c.85-.08,1.54-.12,2.06-.12a19.76,19.76,0,0,1,2.09.08,15.08,15.08,0,0,0,1.64.08,1.4,1.4,0,0,0,.29,0,1.58,1.58,0,0,0,0-.26l-.05-.43a2.26,2.26,0,0,0-.43-.17l-.77-.22-.15,0a2.55,2.55,0,0,1-.78-.28,2.56,2.56,0,0,1-.11-.75l0-1.29,0-3.15V7.53a10.51,10.51,0,0,1,.06-1.2,3.83,3.83,0,0,1,.6,0l1.88,0a2.18,2.18,0,0,1,.38,0,.45.45,0,0,1,.23.17.9.9,0,0,1,.05.25c0,.16.06.35.1.58a3.33,3.33,0,0,0,.14.55A6.39,6.39,0,0,0,15,9a2.91,2.91,0,0,0,.6-.15,2.77,2.77,0,0,0,0-.46l0-.51,0-2.95-.25,0-.38,0L15,4.94a.71.71,0,0,1-.18.15.45.45,0,0,1-.25.07l-.29,0H8.75l-.15,0H7.45a17,17,0,0,1-1.86,0L5.36,5l-.25-.13ZM19.75,16.14h-.69v-9h.69A.4.4,0,0,0,20.13,7c.06-.11,0-.24-.1-.39L18.92,5.15a.52.52,0,0,0-.86,0L17,6.58c-.12.15-.16.28-.1.39s.18.16.38.16h.69v9h-.69a.4.4,0,0,0-.38.16c-.06.11,0,.24.1.39l1.11,1.43a.52.52,0,0,0,.86,0L20,16.69c.12-.15.16-.28.1-.39a.4.4,0,0,0-.38-.16Z" transform="translate(-4.4 -4.86)"/></g></svg>',PARAGRAPH_STYLE:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 11.81 15.74"><g><path d="M18.18,3.76v2h-2V19.5h-2V5.73h-2V19.5h-2V11.63a3.94,3.94,0,0,1,0-7.87h7.87Z" transform="translate(-6.37 -3.76)"/></g></svg>',TEXT_STYLE:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 13.76 15.74"><g><path d="M17.68,6.71a2.22,2.22,0,0,0,1.06-.22.74.74,0,0,0,.42-.7.73.73,0,0,0-.08-.33.67.67,0,0,0-.17-.22,1,1,0,0,0-.31-.15L18.26,5l-.45-.09A15.27,15.27,0,0,0,13.26,5V4.74c0-.66-.63-1-1.92-1-.24,0-.43.15-.59.46a4,4,0,0,0-.36,1.14h0v0a26.45,26.45,0,0,1-3.5.35A2,2,0,0,0,5.77,6a.84.84,0,0,0-.37.79,2.14,2.14,0,0,0,.41,1.29,1.23,1.23,0,0,0,1.05.63,16.62,16.62,0,0,0,3.29-.45l-.34,3.35c-.16,1.61-.29,2.9-.37,3.86s-.12,1.66-.12,2.09l0,.65a5.15,5.15,0,0,0,.05.6,1.28,1.28,0,0,0,.16.54.34.34,0,0,0,.28.18,1.16,1.16,0,0,0,.79-.46,3.66,3.66,0,0,0,.68-1,22.08,22.08,0,0,0,1-4.33q.49-3.1.78-6.15a24.69,24.69,0,0,1,4.62-.84Z" transform="translate(-5.4 -3.76)"/></g></svg>',FONT_COLOR:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.74 14.61"><g><path d="M18.5,15.57,14.28,4.32h-3.4L6.65,15.57h3l.8-2.26h4.23l.8,2.26h3ZM14,11.07H11.14L12.54,7,13.25,9c.41,1.18.64,1.86.7,2ZM4.41,16.69v2.24H20.15V16.69H4.41Z" transform="translate(-4.41 -4.32)"/></g></svg>',HIGHLIGHT_COLOR:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.66 15.74"><g><path d="M12.32,9.31,13.38,13H11.21l.52-1.83q.46-1.61.54-1.83ZM4.44,3.76H20.1V19.5H4.44V3.76ZM14.71,17.32h2.63L13.7,6H10.89L7.26,17.32H9.89l.63-2.24h3.55l.32,1.12c.18.65.29,1,.32,1.12Z" transform="translate(-4.44 -3.76)"/></g></svg>',TABLE:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.74 15.74"><g><path d="M4.41,8.05V3.76H8.7V8.05H4.41Zm5.71,0V3.76h4.3V8.05h-4.3Zm5.74-4.29h4.29V8.05H15.86V3.76Zm-11.45,10V9.48H8.7v4.3H4.41Zm5.71,0V9.48h4.3v4.3h-4.3Zm5.74,0V9.48h4.29v4.3H15.86ZM4.41,19.5V15.21H8.7V19.5H4.41Zm5.71,0V15.21h4.3V19.5h-4.3Zm5.74,0V15.21h4.29V19.5H15.86Z" transform="translate(-4.41 -3.76)"/></g></svg>',HORIZONTAL_RULE:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.74 2.24"><g><path d="M20.15,12.75V10.51H4.41v2.24H20.15Z" transform="translate(-4.41 -10.51)"/></g></svg>',SHOW_BLOCKS:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.66 15.67"><g><path d="M19.72,5.58a1.64,1.64,0,0,0-1.64-1.64H6.23a1.62,1.62,0,0,0-1.16.48,1.63,1.63,0,0,0-.48,1.16V9.63a1.6,1.6,0,0,0,.48,1.16,1.62,1.62,0,0,0,1.16.47H18.09a1.67,1.67,0,0,0,1.16-.47,1.62,1.62,0,0,0,.48-1.16V5.58Zm-.94,4.05a.68.68,0,0,1-.7.7H6.23a.66.66,0,0,1-.48-.2.74.74,0,0,1-.21-.5V5.58a.66.66,0,0,1,.2-.48.71.71,0,0,1,.48-.21H18.08a.74.74,0,0,1,.5.21.66.66,0,0,1,.2.48ZM6.48,7.72a.21.21,0,0,0,.17-.07.22.22,0,0,0,.07-.17V7.06a1.27,1.27,0,0,1,.11-.52.37.37,0,0,1,.36-.23H8.77A.25.25,0,0,0,9,6.17a.19.19,0,0,0,0-.23.27.27,0,0,0-.2-.12H7.19a.88.88,0,0,0-.72.39,1.51,1.51,0,0,0-.23.85v.42a.24.24,0,0,0,.24.24Zm-.19.81a.21.21,0,0,0,.17-.07.26.26,0,0,0,.07-.17.24.24,0,0,0-.24-.24.2.2,0,0,0-.16.09.2.2,0,0,0-.07.16.22.22,0,0,0,.07.17.23.23,0,0,0,.16.06Zm8.46,5.1a1.63,1.63,0,0,0-.47-1.16A1.61,1.61,0,0,0,13.12,12H6.23a1.6,1.6,0,0,0-1.16.46,1.62,1.62,0,0,0-.48,1.16v4.05a1.64,1.64,0,0,0,1.64,1.64h6.89a1.6,1.6,0,0,0,1.16-.48,1.62,1.62,0,0,0,.47-1.16Zm-.94,4a.7.7,0,0,1-.2.49.65.65,0,0,1-.5.2H6.23a.66.66,0,0,1-.48-.2.75.75,0,0,1-.21-.49v-4a.74.74,0,0,1,.21-.5.66.66,0,0,1,.48-.2h6.89a.68.68,0,0,1,.7.7v4Zm6.15,0v-4a1.6,1.6,0,0,0-.48-1.16A1.67,1.67,0,0,0,18.32,12H17.1a1.63,1.63,0,0,0-1.16.47,1.61,1.61,0,0,0-.47,1.16v4a1.67,1.67,0,0,0,.47,1.16,1.62,1.62,0,0,0,1.16.48h1.22A1.64,1.64,0,0,0,20,17.68Zm-.94-4v4a.75.75,0,0,1-.21.49.62.62,0,0,1-.48.2H17.11a.69.69,0,0,1-.5-.2.7.7,0,0,1-.2-.49v-4a.68.68,0,0,1,.7-.7h1.22a.66.66,0,0,1,.48.2.72.72,0,0,1,.21.5Z" transform="translate(-4.44 -3.79)"/></g></svg>',IMAGE:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.75 15.77"><g><path d="M8.77,8.72a.88.88,0,0,1-.61-.27.82.82,0,0,1-.25-.61.89.89,0,0,1,.25-.62A.82.82,0,0,1,8.77,7a.81.81,0,0,1,.61.25.83.83,0,0,1,.27.62.81.81,0,0,1-.25.61.91.91,0,0,1-.63.27Zm9.62-5a1.74,1.74,0,0,1,1.76,1.76V17.76a1.74,1.74,0,0,1-1.76,1.76H6.16A1.74,1.74,0,0,1,4.4,17.76V5.51A1.74,1.74,0,0,1,6.16,3.75H18.39Zm0,1.75H6.16v8L8.53,11.8a.94.94,0,0,1,.54-.17.86.86,0,0,1,.54.2L11.09,13l3.64-4.55a.78.78,0,0,1,.34-.25.85.85,0,0,1,.42-.07.89.89,0,0,1,.39.12.78.78,0,0,1,.28.29l2.24,3.67V5.51Zm0,12.24V15.6L15.3,10.53,11.89,14.8a.89.89,0,0,1-.59.32.82.82,0,0,1-.64-.18L9,13.62,6.16,15.74v2Z" transform="translate(-4.4 -3.75)"/></g></svg>',VIDEO:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.74 14.55"><g><path d="M20.15,10.26V18.9l-3.94-1.57v1.2H4.41V10.66H16.22v1.23l2-.81,2-.82ZM14.64,17h0V12.54h0v-.31H6V17h8.67Zm3.94-.37v-4l-2.37,1v2l1.18.48,1.19.48ZM7.94,9.86A2.77,2.77,0,0,1,5.19,7.11a2.76,2.76,0,0,1,5.51,0A2.78,2.78,0,0,1,7.94,9.86Zm0-3.93a1.21,1.21,0,0,0-.83.35,1.15,1.15,0,0,0-.34.84A1.09,1.09,0,0,0,7.11,8,1.15,1.15,0,0,0,8,8.28,1.13,1.13,0,0,0,9.11,7.12,1.16,1.16,0,0,0,7.94,5.93Zm5.9,3.93a2.34,2.34,0,0,1-1.67-.68,2.3,2.3,0,0,1-.68-1.67,2.35,2.35,0,0,1,4-1.67,2.37,2.37,0,0,1,0,3.34,2.33,2.33,0,0,1-1.68.68Zm0-3.14a.75.75,0,1,0,.55.22.73.73,0,0,0-.55-.22Z" transform="translate(-4.41 -4.35)"/></g></svg>',LINK:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.74 15.72"><g><path d="M13.05,13.63a.24.24,0,0,1,.15.22L13.42,16a.19.19,0,0,1-.08.18l-2.12,2.14a4.08,4.08,0,0,1-1.29.85A4,4,0,0,1,4.71,17a3.92,3.92,0,0,1-.3-1.52A4,4,0,0,1,4.71,14a3.91,3.91,0,0,1,.87-1.3L7.7,10.56a.25.25,0,0,1,.2-.06l2.17.22a.21.21,0,0,1,.19.15.24.24,0,0,1,0,.25L7.12,14.23a1.81,1.81,0,0,0,0,2.58,1.78,1.78,0,0,0,1.29.52,1.74,1.74,0,0,0,1.28-.52L12.8,13.7a.24.24,0,0,1,.25-.07ZM19,4.92a4,4,0,0,1,0,5.66L16.86,12.7a.25.25,0,0,1-.17.08l-2.2-.23a.21.21,0,0,1-.19-.15.22.22,0,0,1,0-.25L17.44,9a1.81,1.81,0,0,0,0-2.58,1.78,1.78,0,0,0-1.29-.52,1.74,1.74,0,0,0-1.28.52L11.76,9.57a.21.21,0,0,1-.25,0,.24.24,0,0,1-.16-.21l-.22-2.17a.19.19,0,0,1,.08-.18l2.12-2.14a4.08,4.08,0,0,1,1.29-.85,4.05,4.05,0,0,1,3.06,0,3.85,3.85,0,0,1,1.3.85ZM5.84,9.82a.25.25,0,0,1-.18-.08.19.19,0,0,1-.07-.19l.11-.77a.2.2,0,0,1,.11-.17.24.24,0,0,1,.2,0l2.5.72a.25.25,0,0,1,.15.27.22.22,0,0,1-.23.21l-2.59,0Zm4.12-2-.73-2.5a.27.27,0,0,1,0-.2A.21.21,0,0,1,9.41,5L10.19,5a.25.25,0,0,1,.19,0,.23.23,0,0,1,.08.18l-.05,2.61a.2.2,0,0,1-.19.23h0A.22.22,0,0,1,10,7.85Zm8.76,5.58a.25.25,0,0,1,.18.08.23.23,0,0,1,.06.2l-.11.77a.25.25,0,0,1-.11.17.21.21,0,0,1-.12,0l-.08,0L16,14a.25.25,0,0,1-.15-.27.22.22,0,0,1,.22-.21l1.29,0,1.33,0Zm-4.12,2,.74,2.51a.28.28,0,0,1,0,.2.23.23,0,0,1-.18.11l-.8.11a.23.23,0,0,1-.17-.07.25.25,0,0,1-.08-.18l0-2.61a.22.22,0,0,1,.22-.22.21.21,0,0,1,.26.15Z" transform="translate(-4.41 -3.77)"/></g></svg>',UNLINK:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.74 15.72"><g><path d="M19,18.32a4,4,0,0,0,0-5.68L15.85,9.5l-1.17,1.55L17.57,14a2,2,0,0,1,.61,1.47,2.08,2.08,0,0,1-2.09,2.09,2,2,0,0,1-1.47-.61l-.38-.37-1.74,1,.8.78a4,4,0,0,0,5.68,0ZM8,9.77a2,2,0,0,1-1.27-1,1.89,1.89,0,0,1-.21-1.57A2.1,2.1,0,0,1,7.45,6,2,2,0,0,1,9,5.76L12.27,7.2l.49-2L9.48,3.9a4,4,0,0,0-3.06.41A3.82,3.82,0,0,0,4.56,6.73a3.8,3.8,0,0,0,.4,3A3.78,3.78,0,0,0,7.39,11.6l5.38,2,.49-2-2.64-.94L8,9.77Z" transform="translate(-4.41 -3.76)"/></g></svg>',REMOVE_FORMAT:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.74 13.76"><g><path d="M13.69,17.2h6.46v1.31H8.56L4.41,14.37,14,4.75l6.06,6.06L16.89,14l-3.2,3.19Zm-4.61,0h2.77L14.09,15,9.88,10.75,6.25,14.38l1.41,1.41c.84.82,1.31,1.29,1.42,1.41Z" transform="translate(-4.41 -4.75)"/></g></svg>',EDIT:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.74 15.73"><g><path d="M7.51,5.68h6l1.52-1.57H6.94a2.4,2.4,0,0,0-1.79.82A2.8,2.8,0,0,0,4.41,6.8V17a2.55,2.55,0,0,0,.75,1.8A2.48,2.48,0,0,0,7,19.5H17.22a2.57,2.57,0,0,0,1.83-.74,2.52,2.52,0,0,0,.77-1.8V8.83l-1.58,1.54v6a1.54,1.54,0,0,1-1.53,1.53H7.51A1.54,1.54,0,0,1,6,16.41V7.21A1.52,1.52,0,0,1,7.51,5.68Zm5.63,7.47h0L10.7,10.74l-1,3.38,1.71-.48,1.7-.49Zm.34-.34h0l5.36-5.32L16.4,5.08,11,10.4l1.23,1.21,1.21,1.2ZM19.93,6.4a.82.82,0,0,0,.22-.48A.54.54,0,0,0,20,5.47L18.45,4A.67.67,0,0,0,18,3.77a.7.7,0,0,0-.48.21l-.74.72,2.44,2.43.37-.37.35-.36Z" transform="translate(-4.41 -3.77)"/></g></svg>',DELETE:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.73 15.74"><g><path d="M19.16,6.71a.94.94,0,0,0,.69-.28.91.91,0,0,0,.29-.68A1,1,0,0,0,19.85,5a.93.93,0,0,0-.69-.3H14.24A.94.94,0,0,0,14,4.06a.92.92,0,0,0-.7-.3h-2a1,1,0,0,0-.7.3.93.93,0,0,0-.28.68H5.39A.92.92,0,0,0,4.7,5a1,1,0,0,0-.29.71.91.91,0,0,0,.29.68,1,1,0,0,0,.69.28H19.16Zm-12.79,1a1,1,0,0,0-.7.3.94.94,0,0,0-.28.69v8.85A1.88,1.88,0,0,0,6,18.93a1.9,1.9,0,0,0,1.39.57H17.2a1.87,1.87,0,0,0,1.39-.58,1.91,1.91,0,0,0,.58-1.39V8.68A1,1,0,0,0,18.88,8a.89.89,0,0,0-.7-.29,1,1,0,0,0-.69.29.92.92,0,0,0-.29.68v7.87a1,1,0,0,1-1,1H8.34a.94.94,0,0,1-.69-.28,1,1,0,0,1-.29-.71V8.68a1,1,0,0,0-1-1Z" transform="translate(-4.41 -3.76)"/></g></svg>',REVERT:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.76 14.69"><g><path d="M18.26,15V12.3l1.89-2V15a2.58,2.58,0,0,1-.24,1c-.2.58-.75.92-1.65,1H7.56v2L4.41,15.63,7.56,13v2h10.7ZM6.3,8.28V11L4.41,13V8.28a2.58,2.58,0,0,1,.24-1c.2-.58.75-.92,1.65-1H17v-2l3.15,3.34L17,10.3v-2H6.3Z" transform="translate(-4.4 -4.28)"/></g></svg>',AUTO_SIZE:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.74 15.74"><g><path d="M6.71,17.19,6.89,16l1.21-.15A6,6,0,0,1,6.81,13.9a5.78,5.78,0,0,1-.45-2.27A6,6,0,0,1,8.1,7.45a5.83,5.83,0,0,1,4.17-1.73l1-1-1-1A7.89,7.89,0,0,0,5,14.64a7.73,7.73,0,0,0,1.71,2.55Zm5.57,2.31h0A7.86,7.86,0,0,0,17.85,6.07L17.67,7.3l-1.21.15a5.9,5.9,0,0,1,1.29,1.92,5.81,5.81,0,0,1,.45,2.26,5.91,5.91,0,0,1-5.9,5.9l-1,1,.49.49.47.5Z" transform="translate(-4.41 -3.76)"/></g></svg>',PLUS:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" width="16" height="16" ><path d="M11 11V5H13V11H19V13H13V19H11V13H5V11H11Z"></path></svg>',ARROW_DOWN:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.73 8.67"><g><path d="M18.79,7.52a.8.8,0,0,1,.56-.23.82.82,0,0,1,.79.79.8.8,0,0,1-.23.56l-7.07,7.07a.79.79,0,0,1-.57.25.77.77,0,0,1-.57-.25h0L4.64,8.65a.8.8,0,0,1-.23-.57.82.82,0,0,1,.79-.79.8.8,0,0,1,.56.23L12.28,14l3.26-3.26,3.25-3.26Z" transform="translate(-4.41 -7.29)"/></g></svg>',ARROW_LEFT:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="currentColor"><path d="M7.82843 10.9999H20V12.9999H7.82843L13.1924 18.3638L11.7782 19.778L4 11.9999L11.7782 4.22168L13.1924 5.63589L7.82843 10.9999Z"></path></svg>',ARROW_UP:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M13.0001 22.0003L11.0002 22.0004L11.0002 5.82845L7.05044 9.77817L5.63623 8.36396L12.0002 2L18.3642 8.36396L16.9499 9.77817L13.0002 5.8284L13.0001 22.0003Z"></path></svg>',ARROW_DOWN_LONG:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M13.0001 1.99974L11.0002 1.9996L11.0002 18.1715L7.05044 14.2218L5.63623 15.636L12.0002 22L18.3642 15.636L16.9499 14.2218L13.0002 18.1716L13.0001 1.99974Z"></path></svg>',ARROW_DROP_DOWN_FILL:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" ><path d="M12 14L8 10H16L12 14Z"></path></svg>',ARROW_DROP_RIGHT:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M16 12L10 18V6L16 12Z"></path></svg>',GIPHY_SVG:'<svg xmlns="http://www.w3.org/2000/svg" width="12px" viewBox="0 0 28 35"><g fill-rule="evenodd" clip-rule="evenodd"><path fill="#00ff99" d="M0 3h4v29H0z"></path><path fill="#9933ff" d="M24 11h4v21h-4z"></path><path fill="#00ccff" d="M0 31h28v4H0z"></path><path fill="#fff35c" d="M0 0h16v4H0z"></path><path fill="#ff6666" d="M24 8V4h-4V0h-4v12h12V8"></path><path class="shadow" d="M24 16v-4h4M16 0v4h-4"></path></g></svg>',PEXELS:'<svg viewBox="0 0 17 22" fill="none" xmlns="http://www.w3.org/2000/svg"><g> <path fill-rule="evenodd" clip-rule="evenodd" d="M12 5C12.7111 5 13.3875 5.14845 14 5.41604C15.7659 6.1876 17 7.94968 17 10C17 12.0503 15.7659 13.8124 14 14.584C13.3875 14.8516 12.7111 15 12 15V19H6V5H12ZM8 7V17H10V13H12L12.0032 12.9988C13.6427 13.0303 15.0746 11.6934 15.0443 9.95469L15.0375 9.56529C15.0121 8.10183 13.7882 6.94549 12.3257 7.00299L12.0203 7.00762L12 7H8Z" fill="#07a081"></path> </g></svg>',EMOJI:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M10.5199 19.8634C10.5955 18.6615 10.8833 17.5172 11.3463 16.4676C9.81124 16.3252 8.41864 15.6867 7.33309 14.7151L8.66691 13.2248C9.55217 14.0172 10.7188 14.4978 12 14.4978C12.1763 14.4978 12.3501 14.4887 12.5211 14.471C14.227 12.2169 16.8661 10.7083 19.8634 10.5199C19.1692 6.80877 15.9126 4 12 4C7.58172 4 4 7.58172 4 12C4 15.9126 6.80877 19.1692 10.5199 19.8634ZM19.0233 12.636C15.7891 13.2396 13.2396 15.7891 12.636 19.0233L19.0233 12.636ZM22 12C22 12.1677 21.9959 12.3344 21.9877 12.5L12.5 21.9877C12.3344 21.9959 12.1677 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12ZM10 10C10 10.8284 9.32843 11.5 8.5 11.5C7.67157 11.5 7 10.8284 7 10C7 9.17157 7.67157 8.5 8.5 8.5C9.32843 8.5 10 9.17157 10 10ZM17 10C17 10.8284 16.3284 11.5 15.5 11.5C14.6716 11.5 14 10.8284 14 10C14 9.17157 14.6716 8.5 15.5 8.5C16.3284 8.5 17 9.17157 17 10Z"></path></svg>',MENTION:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20C13.6418 20 15.1681 19.5054 16.4381 18.6571L17.5476 20.3214C15.9602 21.3818 14.0523 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12V13.5C22 15.433 20.433 17 18.5 17C17.2958 17 16.2336 16.3918 15.6038 15.4659C14.6942 16.4115 13.4158 17 12 17C9.23858 17 7 14.7614 7 12C7 9.23858 9.23858 7 12 7C13.1258 7 14.1647 7.37209 15.0005 8H17V13.5C17 14.3284 17.6716 15 18.5 15C19.3284 15 20 14.3284 20 13.5V12ZM12 9C10.3431 9 9 10.3431 9 12C9 13.6569 10.3431 15 12 15C13.6569 15 15 13.6569 15 12C15 10.3431 13.6569 9 12 9Z"></path></svg>',INSERT_ROW_BELOW:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.8 15.8"><g><path d="M15.7,1.3c-0.1-0.1-0.1-0.2-0.2-0.2L15.3,1H0.4L0.3,1.1c0,0-0.1,0.1-0.1,0.1c0,0-0.1,0.1-0.1,0.1L0,1.4v7.7l0.1,0.1c0,0.1,0.1,0.1,0.2,0.2l0.1,0.1h2.3V9.3l0.1-0.5L3,8.5l0.1-0.2c-0.1,0-0.2,0-0.3,0H1.2v-6h13.3v6h-1.6c-0.1,0-0.2,0-0.3,0l0.1,0.2l0.2,0.4C12.9,9,13,9.2,13,9.3v0.1h2.3l0.2-0.1c0.1,0,0.1-0.1,0.2-0.2l0.1-0.1V1.4L15.7,1.3z"/><path d="M10.5,7.5C9.9,7.1,9.3,6.8,8.6,6.7c-0.2,0-0.5-0.1-0.7,0c-0.2,0-0.5,0-0.7,0C6.6,6.7,6.1,6.9,5.6,7.3C5.2,7.6,4.7,8,4.4,8.4C4.3,8.6,4.2,8.8,4.2,8.9C4.1,9.1,4,9.3,3.9,9.4C3.9,9.6,3.8,9.7,3.8,9.9c0,0.2-0.1,0.3-0.1,0.5v-0.1c-0.1,0.8,0.1,1.6,0.5,2.4c0.4,0.7,1,1.3,1.7,1.7c0.3,0.2,0.6,0.3,0.9,0.3c0.3,0.1,0.7,0.1,1,0.1c0.3,0,0.7,0,1-0.1c0.3-0.1,0.6-0.2,0.9-0.3c0.5-0.3,0.9-0.6,1.3-1c0.3-0.4,0.6-0.8,0.8-1.3c0.1-0.4,0.2-0.9,0.2-1.4c0-0.5-0.1-1-0.3-1.4C11.5,8.6,11.1,8,10.5,7.5z M10.1,11.3H8.5v1.6H8H7.9H7.3v0v-0.1v-1.4H5.7v-0.4v-0.2v-0.6h0h1.5V8.5h1.2v1.6h1.6V11.3z"/></g></svg>',INSERT_ROW_ABOVE:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.8 15.8"><g><path d="M0.1,14.5c0.1,0.1,0.1,0.2,0.2,0.2l0.1,0.1h14.9l0.1-0.1c0,0,0.1-0.1,0.1-0.1c0,0,0.1-0.1,0.1-0.1l0.1-0.1V6.7l-0.1-0.1c0-0.1-0.1-0.1-0.2-0.2l-0.1-0.1h-2.3v0.1l-0.1,0.5l-0.2,0.4l-0.1,0.2c0.1,0,0.2,0,0.3,0h1.6v6H1.3v-6h1.6c0.1,0,0.2,0,0.3,0L3.1,7.3L2.9,6.9C2.8,6.8,2.8,6.6,2.7,6.5V6.3H0.4L0.3,6.4c-0.1,0-0.1,0.1-0.2,0.2L0,6.7v7.7L0.1,14.5z"/><path d="M5.3,8.3c0.6,0.5,1.2,0.8,1.9,0.9c0.2,0,0.5,0.1,0.7,0c0.2,0,0.5,0,0.7,0c0.6-0.1,1.1-0.3,1.6-0.6c0.5-0.3,0.9-0.7,1.2-1.2c0.1-0.2,0.2-0.3,0.3-0.5c0.1-0.2,0.2-0.4,0.2-0.5c0.1-0.1,0.1-0.3,0.1-0.4C12,5.8,12,5.6,12,5.4v0.1c0.1-0.8-0.1-1.6-0.5-2.4c-0.4-0.7-1-1.3-1.7-1.7C9.5,1.3,9.2,1.2,8.9,1.1C8.5,1,8.2,1,7.9,1c-0.3,0-0.7,0-1,0.1C6.6,1.2,6.3,1.3,6,1.4C5.5,1.7,5.1,2,4.7,2.4C4.4,2.8,4.1,3.3,3.9,3.8C3.8,4.2,3.7,4.7,3.7,5.2c0,0.5,0.1,1,0.3,1.4C4.3,7.2,4.7,7.8,5.3,8.3z M5.7,4.5h1.6V2.9h0.5h0.1h0.6v0v0.1v1.4H10v0.4v0.2v0.6h0H8.5v1.6H7.3V5.7H5.7V4.5z"/></g></svg>',INSERT_COLUMN_LEFT:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.8 15.8"><g><path d="M14.5,15.7c0.1-0.1,0.2-0.1,0.2-0.2l0.1-0.1V0.4l-0.1-0.1c0,0-0.1-0.1-0.1-0.1c0,0-0.1-0.1-0.1-0.1L14.4,0H6.7L6.6,0.1c-0.1,0-0.1,0.1-0.2,0.2L6.3,0.4v2.3h0.1l0.5,0.1L7.3,3l0.2,0.1c0-0.1,0-0.2,0-0.3V1.2h6v13.3h-6v-1.6c0-0.1,0-0.2,0-0.3l-0.2,0.1l-0.4,0.2C6.7,12.9,6.6,13,6.4,13H6.3v2.3l0.1,0.2c0,0.1,0.1,0.1,0.2,0.2l0.1,0.1h7.7L14.5,15.7z"/><path d="M8.3,10.5C8.7,10,9,9.3,9.1,8.6c0-0.2,0.1-0.5,0-0.7c0-0.2,0-0.5,0-0.7C9,6.7,8.8,6.1,8.5,5.7C8.2,5.2,7.8,4.8,7.3,4.5C7.2,4.4,7,4.3,6.9,4.2C6.7,4.1,6.5,4,6.4,4C6.2,3.9,6.1,3.9,5.9,3.8c-0.2,0-0.3-0.1-0.5-0.1h0.1C4.7,3.7,3.8,3.9,3.1,4.3C2.4,4.7,1.8,5.3,1.4,6C1.3,6.3,1.2,6.6,1.1,6.9C1,7.2,1,7.6,1,7.9c0,0.3,0,0.7,0.1,1c0.1,0.3,0.2,0.6,0.3,0.9c0.3,0.5,0.6,0.9,1,1.3c0.4,0.3,0.8,0.6,1.3,0.8C4.2,12,4.7,12.1,5.1,12c0.5,0,1-0.1,1.4-0.3C7.2,11.5,7.8,11.1,8.3,10.5zM4.5,10.1V8.5H2.9V8V7.9V7.3h0H3h1.4V5.7h0.4h0.2h0.6v0v1.5h1.6v1.2H5.7v1.6H4.5z"/></g></svg>',INSERT_COLUMN_RIGHT:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.8 15.8"><g><path d="M1.3,0.1C1.2,0.2,1.1,0.2,1.1,0.3L1,0.4v14.9l0.1,0.1c0,0,0.1,0.1,0.1,0.1c0,0,0.1,0.1,0.1,0.1l0.1,0.1h7.7l0.1-0.1c0.1,0,0.1-0.1,0.2-0.2l0.1-0.1v-2.3H9.3l-0.5-0.1l-0.4-0.2l-0.2-0.1c0,0.1,0,0.2,0,0.3v1.6h-6V1.3h6v1.6c0,0.1,0,0.2,0,0.3l0.2-0.1l0.4-0.2C9,2.9,9.2,2.8,9.3,2.8h0.1V0.5L9.4,0.3c0-0.1-0.1-0.1-0.2-0.2L9.1,0H1.4L1.3,0.1z"/><path d="M7.5,5.3C7,5.8,6.7,6.5,6.6,7.2c0,0.2-0.1,0.5,0,0.7c0,0.2,0,0.5,0,0.7c0.1,0.6,0.3,1.1,0.6,1.6c0.3,0.5,0.7,0.9,1.2,1.2c0.2,0.1,0.3,0.2,0.5,0.3c0.2,0.1,0.4,0.2,0.5,0.2c0.1,0.1,0.3,0.1,0.4,0.1c0.2,0,0.3,0.1,0.5,0.1h-0.1c0.8,0.1,1.6-0.1,2.4-0.5c0.7-0.4,1.3-1,1.7-1.7c0.2-0.3,0.3-0.6,0.3-0.9c0.1-0.3,0.1-0.7,0.1-1c0-0.3,0-0.7-0.1-1c-0.1-0.3-0.2-0.6-0.3-0.9c-0.3-0.5-0.6-0.9-1-1.3C13,4.4,12.5,4.2,12,4c-0.4-0.1-0.9-0.2-1.4-0.2c-0.5,0-1,0.1-1.4,0.2C8.5,4.3,7.9,4.7,7.5,5.3z M11.3,5.7v1.6h1.6v0.5v0.1v0.6h0h-0.1h-1.4v1.6h-0.4h-0.2h-0.6v0V8.5H8.5V7.3h1.6V5.7H11.3z"/></g></svg>',DELETE_ROW:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.75 13.83"><g><path d="M4.7,18.46l.12.08H19.73l.12-.08a.58.58,0,0,0,.22-.22l.08-.12,0-7.69-.08-.11a.77.77,0,0,0-.18-.18l-.11-.08-2.31,0-.08.28-.1.29a1.58,1.58,0,0,1-.12.29l-.14.34s0,0,.18,0H18.9v6H5.64v-6H7.35c.14,0,.2,0,.18,0l-.14-.34a2.85,2.85,0,0,1-.12-.29l-.1-.29-.07-.27-2.31,0-.11.08a.77.77,0,0,0-.18.18l-.08.11,0,7.69.08.12a.47.47,0,0,0,.09.12l.13.09ZM12.11,13a4,4,0,0,0,1.46-.21,4.51,4.51,0,0,0,1.31-.71A4,4,0,0,0,16.26,10a4.32,4.32,0,0,0-.08-2.54,4.34,4.34,0,0,0-1-1.52,4.15,4.15,0,0,0-1.54-1,4.34,4.34,0,0,0-1.35-.22A4.07,4.07,0,0,0,11,4.93,3.94,3.94,0,0,0,9.24,6.07,3.92,3.92,0,0,0,8.15,8.88a3.91,3.91,0,0,0,.12.95A4.16,4.16,0,0,0,12.11,13Zm2.35-4.14v.58H10.09V8.27h4.37v.58Z" transform="translate(-4.4 -4.71)"/></g></svg>',DELETE_COLUMN:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 13.81 15.74"><g><path d="M5.66,19.42l.12.08,7.69,0,.11-.08a.77.77,0,0,0,.18-.18l.08-.11,0-2.32-.15,0-.45-.15-.42-.18-.17-.07a1,1,0,0,0,0,.27v1.63h-6V5h6V6.62a.9.9,0,0,0,0,.26l.17-.07.42-.17a3.91,3.91,0,0,1,.45-.15l.15,0,0-2.32L13.75,4a.77.77,0,0,0-.18-.18l-.11-.08H5.79l-.13.07a.63.63,0,0,0-.21.22l-.08.12V19.08l.08.12a.47.47,0,0,0,.09.12.35.35,0,0,0,.12.1Zm9-3.67a4.16,4.16,0,0,0,2.36-.51,4.08,4.08,0,0,0,1.67-1.72,4,4,0,0,0,.35-.91,3.79,3.79,0,0,0,.1-1,4.71,4.71,0,0,0-.11-1,5,5,0,0,0-.3-.87,4.25,4.25,0,0,0-1-1.25,4.49,4.49,0,0,0-1.34-.81A4.26,4.26,0,0,0,15,7.48a3.88,3.88,0,0,0-1.41.25A4.32,4.32,0,0,0,11.86,9,4,4,0,0,0,11,10.94a4.4,4.4,0,0,0-.05.68,4.5,4.5,0,0,0,.05.68,3.93,3.93,0,0,0,.61,1.57,4.22,4.22,0,0,0,1.18,1.2,4.59,4.59,0,0,0,.48.27c.2.1.37.17.5.22a2.44,2.44,0,0,0,.45.12,4.61,4.61,0,0,0,.5.07Zm2.54-4.12v.58H12.87V11h4.37v.59Z" transform="translate(-5.37 -3.76)"/></g></svg>',MERGE_CELLS_HORIZONTAL:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 3C20.5523 3 21 3.44772 21 4V20C21 20.5523 20.5523 21 20 21H4C3.44772 21 3 20.5523 3 20V4C3 3.44772 3.44772 3 4 3H20ZM11 5H5V10.999H7V9L10 12L7 15V13H5V19H11V17H13V19H19V13H17V15L14 12L17 9V10.999H19V5H13V7H11V5ZM13 13V15H11V13H13ZM13 9V11H11V9H13Z"></path></svg>',MERGE_CELLS_VERTICAL:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M21 20C21 20.5523 20.5523 21 20 21H4C3.44772 21 3 20.5523 3 20V4C3 3.44772 3.44772 3 4 3H20C20.5523 3 21 3.44772 21 4V20ZM19 11V5H13.001V7H15L12 10L9 7H11V5H5V11H7V13H5V19H11V17H9L12 14L15 17H13.001V19H19V13H17V11H19ZM11 13H9V11H11V13ZM15 13H13V11H15V13Z"></path></svg>',SPLIT_CELLS_HORIZONTAL:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 3C20.5523 3 21 3.44772 21 4V20C21 20.5523 20.5523 21 20 21H4C3.44772 21 3 20.5523 3 20V4C3 3.44772 3.44772 3 4 3H20ZM11 5H5V19H11V15H13V19H19V5H13V9H11V5ZM15 9L18 12L15 15V13H9V15L6 12L9 9V11H15V9Z"></path></svg>',SPLIT_CELLS_VERTICAL:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 3C20.5523 3 21 3.44772 21 4V20C21 20.5523 20.5523 21 20 21H4C3.44772 21 3 20.5523 3 20V4C3 3.44772 3.44772 3 4 3H20ZM19 5H5V10.999L9 11V13H5V19H19V13H15V11L19 10.999V5ZM12 6L15 9H13V15H15L12 18L9 15H11V9H9L12 6Z"></path></svg>',CELL_WIDTH:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M4 12H20M4 12L8 8M4 12L8 16M20 12L16 8M20 12L16 16" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>',CELL_HEIGHT:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 4V20M12 4L8 8M12 4L16 8M12 20L8 16M12 20L16 16" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>',CELL_PADDING:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><rect x="3" y="3" width="18" height="18" rx="2" stroke="currentColor" stroke-width="2"/><path d="M7 7H17V17H7V7Z" stroke="currentColor" stroke-width="2" stroke-dasharray="2 2"/></svg>',CELL_BORDER_BOTTOM:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M13,19 L19.5,19 C19.7761424,19 20,19.2238576 20,19.5 C20,19.7761424 19.7761424,20 19.5,20 L5.5,20 C5.22385763,20 5,19.7761424 5,19.5 C5,19.2238576 5.22385763,19 5.5,19 L12,19 L12,18.5 C12,18.2238576 12.2238576,18 12.5,18 C12.7761424,18 13,18.2238576 13,18.5 L13,19 Z M13,12 L13.5,12 C13.7761424,12 14,12.2238576 14,12.5 C14,12.7761424 13.7761424,13 13.5,13 L13,13 L13,13.5 C13,13.7761424 12.7761424,14 12.5,14 C12.2238576,14 12,13.7761424 12,13.5 L12,13 L11.5,13 C11.2238576,13 11,12.7761424 11,12.5 C11,12.2238576 11.2238576,12 11.5,12 L12,12 L12,11.5 C12,11.2238576 12.2238576,11 12.5,11 C12.7761424,11 13,11.2238576 13,11.5 L13,12 Z M15.5,13 C15.2238576,13 15,12.7761424 15,12.5 C15,12.2238576 15.2238576,12 15.5,12 L16.5,12 C16.7761424,12 17,12.2238576 17,12.5 C17,12.7761424 16.7761424,13 16.5,13 L15.5,13 Z M18.5,13 C18.2238576,13 18,12.7761424 18,12.5 C18,12.2238576 18.2238576,12 18.5,12 L19.5,12 C19.7761424,12 20,12.2238576 20,12.5 C20,12.7761424 19.7761424,13 19.5,13 L18.5,13 Z M5.5,13 C5.22385763,13 5,12.7761424 5,12.5 C5,12.2238576 5.22385763,12 5.5,12 L6.5,12 C6.77614237,12 7,12.2238576 7,12.5 C7,12.7761424 6.77614237,13 6.5,13 L5.5,13 Z M8.5,13 C8.22385763,13 8,12.7761424 8,12.5 C8,12.2238576 8.22385763,12 8.5,12 L9.5,12 C9.77614237,12 10,12.2238576 10,12.5 C10,12.7761424 9.77614237,13 9.5,13 L8.5,13 Z M12,5.5 C12,5.22385763 12.2238576,5 12.5,5 C12.7761424,5 13,5.22385763 13,5.5 L13,6.5 C13,6.77614237 12.7761424,7 12.5,7 C12.2238576,7 12,6.77614237 12,6.5 L12,5.5 Z M12,8.5 C12,8.22385763 12.2238576,8 12.5,8 C12.7761424,8 13,8.22385763 13,8.5 L13,9.5 C13,9.77614237 12.7761424,10 12.5,10 C12.2238576,10 12,9.77614237 12,9.5 L12,8.5 Z M12,15.5 C12,15.2238576 12.2238576,15 12.5,15 C12.7761424,15 13,15.2238576 13,15.5 L13,16.5 C13,16.7761424 12.7761424,17 12.5,17 C12.2238576,17 12,16.7761424 12,16.5 L12,15.5 Z M5.5,3 C5.77614237,3 6,3.22385763 6,3.5 C6,3.77614237 5.77614237,4 5.5,4 C4.67157288,4 4,4.67157288 4,5.5 C4,5.77614237 3.77614237,6 3.5,6 C3.22385763,6 3,5.77614237 3,5.5 C3,4.11928813 4.11928813,3 5.5,3 Z M16.5,4 C16.2238576,4 16,3.77614237 16,3.5 C16,3.22385763 16.2238576,3 16.5,3 L17.5,3 C17.7761424,3 18,3.22385763 18,3.5 C18,3.77614237 17.7761424,4 17.5,4 L16.5,4 Z M13.5,4 C13.2238576,4 13,3.77614237 13,3.5 C13,3.22385763 13.2238576,3 13.5,3 L14.5,3 C14.7761424,3 15,3.22385763 15,3.5 C15,3.77614237 14.7761424,4 14.5,4 L13.5,4 Z M10.5,4 C10.2238576,4 10,3.77614237 10,3.5 C10,3.22385763 10.2238576,3 10.5,3 L11.5,3 C11.7761424,3 12,3.22385763 12,3.5 C12,3.77614237 11.7761424,4 11.5,4 L10.5,4 Z M7.5,4 C7.22385763,4 7,3.77614237 7,3.5 C7,3.22385763 7.22385763,3 7.5,3 L8.5,3 C8.77614237,3 9,3.22385763 9,3.5 C9,3.77614237 8.77614237,4 8.5,4 L7.5,4 Z M19.5,4 C19.2238576,4 19,3.77614237 19,3.5 C19,3.22385763 19.2238576,3 19.5,3 C20.8807119,3 22,4.11928813 22,5.5 L22,5.56155281 C22,5.83769519 21.7761424,6.06155281 21.5,6.06155281 C21.2238576,6.06155281 21,5.83769519 21,5.56155281 L21,5.5 C21,4.67157288 20.3284271,4 19.5,4 Z M21,7.5 C21,7.22385763 21.2238576,7 21.5,7 C21.7761424,7 22,7.22385763 22,7.5 L22,8.5 C22,8.77614237 21.7761424,9 21.5,9 C21.2238576,9 21,8.77614237 21,8.5 L21,7.5 Z M21,10.5 C21,10.2238576 21.2238576,10 21.5,10 C21.7761424,10 22,10.2238576 22,10.5 L22,11.5 C22,11.7761424 21.7761424,12 21.5,12 C21.2238576,12 21,11.7761424 21,11.5 L21,10.5 Z M21,13.5 C21,13.2238576 21.2238576,13 21.5,13 C21.7761424,13 22,13.2238576 22,13.5 L22,14.5 C22,14.7761424 21.7761424,15 21.5,15 C21.2238576,15 21,14.7761424 21,14.5 L21,13.5 Z M21,16.5 C21,16.2238576 21.2238576,16 21.5,16 C21.7761424,16 22,16.2238576 22,16.5 L22,17.5 C22,17.7761424 21.7761424,18 21.5,18 C21.2238576,18 21,17.7761424 21,17.5 L21,16.5 Z M3,7.5 C3,7.22385763 3.22385763,7 3.5,7 C3.77614237,7 4,7.22385763 4,7.5 L4,8.5 C4,8.77614237 3.77614237,9 3.5,9 C3.22385763,9 3,8.77614237 3,8.5 L3,7.5 Z M3,10.5 C3,10.2238576 3.22385763,10 3.5,10 C3.77614237,10 4,10.2238576 4,10.5 L4,11.5 C4,11.7761424 3.77614237,12 3.5,12 C3.22385763,12 3,11.7761424 3,11.5 L3,10.5 Z M3,13.5 C3,13.2238576 3.22385763,13 3.5,13 C3.77614237,13 4,13.2238576 4,13.5 L4,14.5 C4,14.7761424 3.77614237,15 3.5,15 C3.22385763,15 3,14.7761424 3,14.5 L3,13.5 Z M3,16.5 C3,16.2238576 3.22385763,16 3.5,16 C3.77614237,16 4,16.2238576 4,16.5 L4,17.5 C4,17.7761424 3.77614237,18 3.5,18 C3.22385763,18 3,17.7761424 3,17.5 L3,16.5 Z M21,19.5 C21,19.2238576 21.2238576,19 21.5,19 C21.7761424,19 22,19.2238576 22,19.5 C22,20.8807119 20.8807119,22 19.5,22 L5.5,22 C4.11928813,22 3,20.8807119 3,19.5 C3,19.2238576 3.22385763,19 3.5,19 C3.77614237,19 4,19.2238576 4,19.5 C4,20.3284271 4.67157288,21 5.5,21 L19.5,21 C20.3284271,21 21,20.3284271 21,19.5 Z"/></svg>',CELL_BORDER_LEFT:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M13,13 L13,13.5 C13,13.7761424 12.7761424,14 12.5,14 C12.2238576,14 12,13.7761424 12,13.5 L12,13 L11.5,13 C11.2238576,13 11,12.7761424 11,12.5 C11,12.2238576 11.2238576,12 11.5,12 L12,12 L12,11.5 C12,11.2238576 12.2238576,11 12.5,11 C12.7761424,11 13,11.2238576 13,11.5 L13,12 L13.5,12 C13.7761424,12 14,12.2238576 14,12.5 C14,12.7761424 13.7761424,13 13.5,13 L13,13 L13,13 Z M6,12 L6.5,12 C6.77614237,12 7,12.2238576 7,12.5 C7,12.7761424 6.77614237,13 6.5,13 L6,13 L6,19.5 C6,19.7761424 5.77614237,20 5.5,20 C5.22385763,20 5,19.7761424 5,19.5 L5,5.5 C5,5.22385763 5.22385763,5 5.5,5 C5.77614237,5 6,5.22385763 6,5.5 L6,12 Z M22,5.5 C22,5.77614237 21.7761424,6 21.5,6 C21.2238576,6 21,5.77614237 21,5.5 C21,4.67157288 20.3284271,4 19.5,4 C19.2238576,4 19,3.77614237 19,3.5 C19,3.22385763 19.2238576,3 19.5,3 C20.8807119,3 22,4.11928813 22,5.5 Z M21,19.5 C21,19.2238576 21.2238576,19 21.5,19 C21.7761424,19 22,19.2238576 22,19.5 C22,20.8807119 20.8807119,22 19.5,22 L19.4384472,22 C19.1623048,22 18.9384472,21.7761424 18.9384472,21.5 C18.9384472,21.2238576 19.1623048,21 19.4384472,21 L19.5,21 C20.3284271,21 21,20.3284271 21,19.5 Z M5.5,21 C5.77614237,21 6,21.2238576 6,21.5 C6,21.7761424 5.77614237,22 5.5,22 C4.11928813,22 3,20.8807119 3,19.5 L3,5.5 C3,4.11928813 4.11928813,3 5.5,3 C5.77614237,3 6,3.22385763 6,3.5 C6,3.77614237 5.77614237,4 5.5,4 C4.67157288,4 4,4.67157288 4,5.5 L4,19.5 C4,20.3284271 4.67157288,21 5.5,21 Z M7.5,22 C7.22385763,22 7,21.7761424 7,21.5 C7,21.2238576 7.22385763,21 7.5,21 L8.5,21 C8.77614237,21 9,21.2238576 9,21.5 C9,21.7761424 8.77614237,22 8.5,22 L7.5,22 Z M10.5,22 C10.2238576,22 10,21.7761424 10,21.5 C10,21.2238576 10.2238576,21 10.5,21 L11.5,21 C11.7761424,21 12,21.2238576 12,21.5 C12,21.7761424 11.7761424,22 11.5,22 L10.5,22 Z M13.5,22 C13.2238576,22 13,21.7761424 13,21.5 C13,21.2238576 13.2238576,21 13.5,21 L14.5,21 C14.7761424,21 15,21.2238576 15,21.5 C15,21.7761424 14.7761424,22 14.5,22 L13.5,22 Z M16.5,22 C16.2238576,22 16,21.7761424 16,21.5 C16,21.2238576 16.2238576,21 16.5,21 L17.5,21 C17.7761424,21 18,21.2238576 18,21.5 C18,21.7761424 17.7761424,22 17.5,22 L16.5,22 Z M7.5,4 C7.22385763,4 7,3.77614237 7,3.5 C7,3.22385763 7.22385763,3 7.5,3 L8.5,3 C8.77614237,3 9,3.22385763 9,3.5 C9,3.77614237 8.77614237,4 8.5,4 L7.5,4 Z M10.5,4 C10.2238576,4 10,3.77614237 10,3.5 C10,3.22385763 10.2238576,3 10.5,3 L11.5,3 C11.7761424,3 12,3.22385763 12,3.5 C12,3.77614237 11.7761424,4 11.5,4 L10.5,4 Z M13.5,4 C13.2238576,4 13,3.77614237 13,3.5 C13,3.22385763 13.2238576,3 13.5,3 L14.5,3 C14.7761424,3 15,3.22385763 15,3.5 C15,3.77614237 14.7761424,4 14.5,4 L13.5,4 Z M16.5,4 C16.2238576,4 16,3.77614237 16,3.5 C16,3.22385763 16.2238576,3 16.5,3 L17.5,3 C17.7761424,3 18,3.22385763 18,3.5 C18,3.77614237 17.7761424,4 17.5,4 L16.5,4 Z M12,5.5 C12,5.22385763 12.2238576,5 12.5,5 C12.7761424,5 13,5.22385763 13,5.5 L13,6.5 C13,6.77614237 12.7761424,7 12.5,7 C12.2238576,7 12,6.77614237 12,6.5 L12,5.5 Z M21,7.5 C21,7.22385763 21.2238576,7 21.5,7 C21.7761424,7 22,7.22385763 22,7.5 L22,8.5 C22,8.77614237 21.7761424,9 21.5,9 C21.2238576,9 21,8.77614237 21,8.5 L21,7.5 Z M21,10.5 C21,10.2238576 21.2238576,10 21.5,10 C21.7761424,10 22,10.2238576 22,10.5 L22,11.5 C22,11.7761424 21.7761424,12 21.5,12 C21.2238576,12 21,11.7761424 21,11.5 L21,10.5 Z M21,13.5 C21,13.2238576 21.2238576,13 21.5,13 C21.7761424,13 22,13.2238576 22,13.5 L22,14.5 C22,14.7761424 21.7761424,15 21.5,15 C21.2238576,15 21,14.7761424 21,14.5 L21,13.5 Z M21,16.5 C21,16.2238576 21.2238576,16 21.5,16 C21.7761424,16 22,16.2238576 22,16.5 L22,17.5 C22,17.7761424 21.7761424,18 21.5,18 C21.2238576,18 21,17.7761424 21,17.5 L21,16.5 Z M12,8.5 C12,8.22385763 12.2238576,8 12.5,8 C12.7761424,8 13,8.22385763 13,8.5 L13,9.5 C13,9.77614237 12.7761424,10 12.5,10 C12.2238576,10 12,9.77614237 12,9.5 L12,8.5 Z M12,15.5 C12,15.2238576 12.2238576,15 12.5,15 C12.7761424,15 13,15.2238576 13,15.5 L13,16.5 C13,16.7761424 12.7761424,17 12.5,17 C12.2238576,17 12,16.7761424 12,16.5 L12,15.5 Z M12,18.5 C12,18.2238576 12.2238576,18 12.5,18 C12.7761424,18 13,18.2238576 13,18.5 L13,19.5 C13,19.7761424 12.7761424,20 12.5,20 C12.2238576,20 12,19.7761424 12,19.5 L12,18.5 Z M8.5,13 C8.22385763,13 8,12.7761424 8,12.5 C8,12.2238576 8.22385763,12 8.5,12 L9.5,12 C9.77614237,12 10,12.2238576 10,12.5 C10,12.7761424 9.77614237,13 9.5,13 L8.5,13 Z M15.5,13 C15.2238576,13 15,12.7761424 15,12.5 C15,12.2238576 15.2238576,12 15.5,12 L16.5,12 C16.7761424,12 17,12.2238576 17,12.5 C17,12.7761424 16.7761424,13 16.5,13 L15.5,13 Z M18.5,13 C18.2238576,13 18,12.7761424 18,12.5 C18,12.2238576 18.2238576,12 18.5,12 L19.5,12 C19.7761424,12 20,12.2238576 20,12.5 C20,12.7761424 19.7761424,13 19.5,13 L18.5,13 Z"/></svg>',CELL_BORDER_FULL:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M13,12 L13.5,12 C13.7761424,12 14,12.2238576 14,12.5 C14,12.7761424 13.7761424,13 13.5,13 L13,13 L13,13.5 C13,13.7761424 12.7761424,14 12.5,14 C12.2238576,14 12,13.7761424 12,13.5 L12,13 L11.5,13 C11.2238576,13 11,12.7761424 11,12.5 C11,12.2238576 11.2238576,12 11.5,12 L12,12 L12,11.5 C12,11.2238576 12.2238576,11 12.5,11 C12.7761424,11 13,11.2238576 13,11.5 L13,12 Z M3,5.5 C3,4.11928813 4.11928813,3 5.5,3 L19.5000013,3 C20.8807132,3 22.0000013,4.11928813 22.0000013,5.5 L22.0000013,19.5069431 C22.0000013,20.887655 20.8807132,22.0069431 19.5000013,22.0069431 L5.5,22.0069431 C4.11928813,22.0069431 3,20.887655 3,19.5069431 L3,5.5 Z M4,5.5 L4,19.5069431 C4,20.3353702 4.67157288,21.0069431 5.5,21.0069431 L19.5000013,21.0069431 C20.3284285,21.0069431 21.0000013,20.3353702 21.0000013,19.5069431 L21.0000013,5.5 C21.0000013,4.67157288 20.3284285,4 19.5000013,4 L5.5,4 C4.67157288,4 4,4.67157288 4,5.5 Z M15.5,13 C15.2238576,13 15,12.7761424 15,12.5 C15,12.2238576 15.2238576,12 15.5,12 L16.5,12 C16.7761424,12 17,12.2238576 17,12.5 C17,12.7761424 16.7761424,13 16.5,13 L15.5,13 Z M18.5,13 C18.2238576,13 18,12.7761424 18,12.5 C18,12.2238576 18.2238576,12 18.5,12 L19.5,12 C19.7761424,12 20,12.2238576 20,12.5 C20,12.7761424 19.7761424,13 19.5,13 L18.5,13 Z M5.5,13 C5.22385763,13 5,12.7761424 5,12.5 C5,12.2238576 5.22385763,12 5.5,12 L6.5,12 C6.77614237,12 7,12.2238576 7,12.5 C7,12.7761424 6.77614237,13 6.5,13 L5.5,13 Z M8.5,13 C8.22385763,13 8,12.7761424 8,12.5 C8,12.2238576 8.22385763,12 8.5,12 L9.5,12 C9.77614237,12 10,12.2238576 10,12.5 C10,12.7761424 9.77614237,13 9.5,13 L8.5,13 Z M12,5.5 C12,5.22385763 12.2238576,5 12.5,5 C12.7761424,5 13,5.22385763 13,5.5 L13,6.5 C13,6.77614237 12.7761424,7 12.5,7 C12.2238576,7 12,6.77614237 12,6.5 L12,5.5 Z M12,8.5 C12,8.22385763 12.2238576,8 12.5,8 C12.7761424,8 13,8.22385763 13,8.5 L13,9.5 C13,9.77614237 12.7761424,10 12.5,10 C12.2238576,10 12,9.77614237 12,9.5 L12,8.5 Z M12,18.5 C12,18.2238576 12.2238576,18 12.5,18 C12.7761424,18 13,18.2238576 13,18.5 L13,19.5 C13,19.7761424 12.7761424,20 12.5,20 C12.2238576,20 12,19.7761424 12,19.5 L12,18.5 Z M12,15.5 C12,15.2238576 12.2238576,15 12.5,15 C12.7761424,15 13,15.2238576 13,15.5 L13,16.5 C13,16.7761424 12.7761424,17 12.5,17 C12.2238576,17 12,16.7761424 12,16.5 L12,15.5 Z"/></svg>',CELL_BORDER_RIGHT:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M19,13 L18.5,13 C18.2238576,13 18,12.7761424 18,12.5 C18,12.2238576 18.2238576,12 18.5,12 L19,12 L19,5.5 C19,5.22385763 19.2238576,5 19.5,5 C19.7761424,5 20,5.22385763 20,5.5 L20,19.5 C20,19.7761424 19.7761424,20 19.5,20 C19.2238576,20 19,19.7761424 19,19.5 L19,13 Z M13,12 L13.5,12 C13.7761424,12 14,12.2238576 14,12.5 C14,12.7761424 13.7761424,13 13.5,13 L13,13 L13,13.5 C13,13.7761424 12.7761424,14 12.5,14 C12.2238576,14 12,13.7761424 12,13.5 L12,13 L11.5,13 C11.2238576,13 11,12.7761424 11,12.5 C11,12.2238576 11.2238576,12 11.5,12 L12,12 L12,11.5 C12,11.2238576 12.2238576,11 12.5,11 C12.7761424,11 13,11.2238576 13,11.5 L13,12 Z M3,19.5 C3,19.2238576 3.22385763,19 3.5,19 C3.77614237,19 4,19.2238576 4,19.5 C4,20.3284271 4.67157288,21 5.5,21 C5.77614237,21 6,21.2238576 6,21.5 C6,21.7761424 5.77614237,22 5.5,22 C4.11928813,22 3,20.8807119 3,19.5 Z M4,5.5 C4,5.77614237 3.77614237,6 3.5,6 C3.22385763,6 3,5.77614237 3,5.5 C3,4.11928813 4.11928813,3 5.5,3 L5.56155281,3 C5.83769519,3 6.06155281,3.22385763 6.06155281,3.5 C6.06155281,3.77614237 5.83769519,4 5.56155281,4 L5.5,4 C4.67157288,4 4,4.67157288 4,5.5 Z M19.5,4 C19.2238576,4 19,3.77614237 19,3.5 C19,3.22385763 19.2238576,3 19.5,3 C20.8807119,3 22,4.11928813 22,5.5 L22,19.5 C22,20.8807119 20.8807119,22 19.5,22 C19.2238576,22 19,21.7761424 19,21.5 C19,21.2238576 19.2238576,21 19.5,21 C20.3284271,21 21,20.3284271 21,19.5 L21,5.5 C21,4.67157288 20.3284271,4 19.5,4 Z M17.5,21 C17.7761424,21 18,21.2238576 18,21.5 C18,21.7761424 17.7761424,22 17.5,22 L16.5,22 C16.2238576,22 16,21.7761424 16,21.5 C16,21.2238576 16.2238576,21 16.5,21 L17.5,21 Z M14.5,21 C14.7761424,21 15,21.2238576 15,21.5 C15,21.7761424 14.7761424,22 14.5,22 L13.5,22 C13.2238576,22 13,21.7761424 13,21.5 C13,21.2238576 13.2238576,21 13.5,21 L14.5,21 Z M11.5,21 C11.7761424,21 12,21.2238576 12,21.5 C12,21.7761424 11.7761424,22 11.5,22 L10.5,22 C10.2238576,22 10,21.7761424 10,21.5 C10,21.2238576 10.2238576,21 10.5,21 L11.5,21 Z M8.5,21 C8.77614237,21 9,21.2238576 9,21.5 C9,21.7761424 8.77614237,22 8.5,22 L7.5,22 C7.22385763,22 7,21.7761424 7,21.5 C7,21.2238576 7.22385763,21 7.5,21 L8.5,21 Z M17.5,3 C17.7761424,3 18,3.22385763 18,3.5 C18,3.77614237 17.7761424,4 17.5,4 L16.5,4 C16.2238576,4 16,3.77614237 16,3.5 C16,3.22385763 16.2238576,3 16.5,3 L17.5,3 Z M14.5,3 C14.7761424,3 15,3.22385763 15,3.5 C15,3.77614237 14.7761424,4 14.5,4 L13.5,4 C13.2238576,4 13,3.77614237 13,3.5 C13,3.22385763 13.2238576,3 13.5,3 L14.5,3 Z M11.5,3 C11.7761424,3 12,3.22385763 12,3.5 C12,3.77614237 11.7761424,4 11.5,4 L10.5,4 C10.2238576,4 10,3.77614237 10,3.5 C10,3.22385763 10.2238576,3 10.5,3 L11.5,3 Z M8.5,3 C8.77614237,3 9,3.22385763 9,3.5 C9,3.77614237 8.77614237,4 8.5,4 L7.5,4 C7.22385763,4 7,3.77614237 7,3.5 C7,3.22385763 7.22385763,3 7.5,3 L8.5,3 Z M12,5.5 C12,5.22385763 12.2238576,5 12.5,5 C12.7761424,5 13,5.22385763 13,5.5 L13,6.5 C13,6.77614237 12.7761424,7 12.5,7 C12.2238576,7 12,6.77614237 12,6.5 L12,5.5 Z M12,8.5 C12,8.22385763 12.2238576,8 12.5,8 C12.7761424,8 13,8.22385763 13,8.5 L13,9.5 C13,9.77614237 12.7761424,10 12.5,10 C12.2238576,10 12,9.77614237 12,9.5 L12,8.5 Z M3,7.5 C3,7.22385763 3.22385763,7 3.5,7 C3.77614237,7 4,7.22385763 4,7.5 L4,8.5 C4,8.77614237 3.77614237,9 3.5,9 C3.22385763,9 3,8.77614237 3,8.5 L3,7.5 Z M3,10.5 C3,10.2238576 3.22385763,10 3.5,10 C3.77614237,10 4,10.2238576 4,10.5 L4,11.5 C4,11.7761424 3.77614237,12 3.5,12 C3.22385763,12 3,11.7761424 3,11.5 L3,10.5 Z M3,13.5 C3,13.2238576 3.22385763,13 3.5,13 C3.77614237,13 4,13.2238576 4,13.5 L4,14.5 C4,14.7761424 3.77614237,15 3.5,15 C3.22385763,15 3,14.7761424 3,14.5 L3,13.5 Z M3,16.5 C3,16.2238576 3.22385763,16 3.5,16 C3.77614237,16 4,16.2238576 4,16.5 L4,17.5 C4,17.7761424 3.77614237,18 3.5,18 C3.22385763,18 3,17.7761424 3,17.5 L3,16.5 Z M12,15.5 C12,15.2238576 12.2238576,15 12.5,15 C12.7761424,15 13,15.2238576 13,15.5 L13,16.5 C13,16.7761424 12.7761424,17 12.5,17 C12.2238576,17 12,16.7761424 12,16.5 L12,15.5 Z M12,18.5 C12,18.2238576 12.2238576,18 12.5,18 C12.7761424,18 13,18.2238576 13,18.5 L13,19.5 C13,19.7761424 12.7761424,20 12.5,20 C12.2238576,20 12,19.7761424 12,19.5 L12,18.5 Z M15.5,13 C15.2238576,13 15,12.7761424 15,12.5 C15,12.2238576 15.2238576,12 15.5,12 L16.5,12 C16.7761424,12 17,12.2238576 17,12.5 C17,12.7761424 16.7761424,13 16.5,13 L15.5,13 Z M8.5,13 C8.22385763,13 8,12.7761424 8,12.5 C8,12.2238576 8.22385763,12 8.5,12 L9.5,12 C9.77614237,12 10,12.2238576 10,12.5 C10,12.7761424 9.77614237,13 9.5,13 L8.5,13 Z M5.5,13 C5.22385763,13 5,12.7761424 5,12.5 C5,12.2238576 5.22385763,12 5.5,12 L6.5,12 C6.77614237,12 7,12.2238576 7,12.5 C7,12.7761424 6.77614237,13 6.5,13 L5.5,13 Z"/></svg>',CELL_BORDER_TOP:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M13,12 L13.5,12 C13.7761424,12 14,12.2238576 14,12.5 C14,12.7761424 13.7761424,13 13.5,13 L13,13 L13,13.5 C13,13.7761424 12.7761424,14 12.5,14 C12.2238576,14 12,13.7761424 12,13.5 L12,13 L11.5,13 C11.2238576,13 11,12.7761424 11,12.5 C11,12.2238576 11.2238576,12 11.5,12 L12,12 L12,11.5 C12,11.2238576 12.2238576,11 12.5,11 C12.7761424,11 13,11.2238576 13,11.5 L13,12 Z M13,6 L13,6.5 C13,6.77614237 12.7761424,7 12.5,7 C12.2238576,7 12,6.77614237 12,6.5 L12,6 L5.5,6 C5.22385763,6 5,5.77614237 5,5.5 C5,5.22385763 5.22385763,5 5.5,5 L19.5,5 C19.7761424,5 20,5.22385763 20,5.5 C20,5.77614237 19.7761424,6 19.5,6 L13,6 Z M19.5,22 C19.2238576,22 19,21.7761424 19,21.5 C19,21.2238576 19.2238576,21 19.5,21 C20.3284271,21 21,20.3284271 21,19.5 C21,19.2238576 21.2238576,19 21.5,19 C21.7761424,19 22,19.2238576 22,19.5 C22,20.8807119 20.8807119,22 19.5,22 Z M5.5,21 C5.77614237,21 6,21.2238576 6,21.5 C6,21.7761424 5.77614237,22 5.5,22 C4.11928813,22 3,20.8807119 3,19.5 L3,19.4384472 C3,19.1623048 3.22385763,18.9384472 3.5,18.9384472 C3.77614237,18.9384472 4,19.1623048 4,19.4384472 L4,19.5 C4,20.3284271 4.67157288,21 5.5,21 Z M4,5.5 C4,5.77614237 3.77614237,6 3.5,6 C3.22385763,6 3,5.77614237 3,5.5 C3,4.11928813 4.11928813,3 5.5,3 L19.5,3 C20.8807119,3 22,4.11928813 22,5.5 C22,5.77614237 21.7761424,6 21.5,6 C21.2238576,6 21,5.77614237 21,5.5 C21,4.67157288 20.3284271,4 19.5,4 L5.5,4 C4.67157288,4 4,4.67157288 4,5.5 Z M3,7.5 C3,7.22385763 3.22385763,7 3.5,7 C3.77614237,7 4,7.22385763 4,7.5 L4,8.5 C4,8.77614237 3.77614237,9 3.5,9 C3.22385763,9 3,8.77614237 3,8.5 L3,7.5 Z M3,10.5 C3,10.2238576 3.22385763,10 3.5,10 C3.77614237,10 4,10.2238576 4,10.5 L4,11.5 C4,11.7761424 3.77614237,12 3.5,12 C3.22385763,12 3,11.7761424 3,11.5 L3,10.5 Z M3,13.5 C3,13.2238576 3.22385763,13 3.5,13 C3.77614237,13 4,13.2238576 4,13.5 L4,14.5 C4,14.7761424 3.77614237,15 3.5,15 C3.22385763,15 3,14.7761424 3,14.5 L3,13.5 Z M3,16.5 C3,16.2238576 3.22385763,16 3.5,16 C3.77614237,16 4,16.2238576 4,16.5 L4,17.5 C4,17.7761424 3.77614237,18 3.5,18 C3.22385763,18 3,17.7761424 3,17.5 L3,16.5 Z M21,7.5 C21,7.22385763 21.2238576,7 21.5,7 C21.7761424,7 22,7.22385763 22,7.5 L22,8.5 C22,8.77614237 21.7761424,9 21.5,9 C21.2238576,9 21,8.77614237 21,8.5 L21,7.5 Z M21,10.5 C21,10.2238576 21.2238576,10 21.5,10 C21.7761424,10 22,10.2238576 22,10.5 L22,11.5 C22,11.7761424 21.7761424,12 21.5,12 C21.2238576,12 21,11.7761424 21,11.5 L21,10.5 Z M21,13.5 C21,13.2238576 21.2238576,13 21.5,13 C21.7761424,13 22,13.2238576 22,13.5 L22,14.5 C22,14.7761424 21.7761424,15 21.5,15 C21.2238576,15 21,14.7761424 21,14.5 L21,13.5 Z M21,16.5 C21,16.2238576 21.2238576,16 21.5,16 C21.7761424,16 22,16.2238576 22,16.5 L22,17.5 C22,17.7761424 21.7761424,18 21.5,18 C21.2238576,18 21,17.7761424 21,17.5 L21,16.5 Z M12,15.5 C12,15.2238576 12.2238576,15 12.5,15 C12.7761424,15 13,15.2238576 13,15.5 L13,16.5 C13,16.7761424 12.7761424,17 12.5,17 C12.2238576,17 12,16.7761424 12,16.5 L12,15.5 Z M12,8.5 C12,8.22385763 12.2238576,8 12.5,8 C12.7761424,8 13,8.22385763 13,8.5 L13,9.5 C13,9.77614237 12.7761424,10 12.5,10 C12.2238576,10 12,9.77614237 12,9.5 L12,8.5 Z M12,18.5 C12,18.2238576 12.2238576,18 12.5,18 C12.7761424,18 13,18.2238576 13,18.5 L13,19.5 C13,19.7761424 12.7761424,20 12.5,20 C12.2238576,20 12,19.7761424 12,19.5 L12,18.5 Z M17.5,21 C17.7761424,21 18,21.2238576 18,21.5 C18,21.7761424 17.7761424,22 17.5,22 L16.5,22 C16.2238576,22 16,21.7761424 16,21.5 C16,21.2238576 16.2238576,21 16.5,21 L17.5,21 Z M14.5,21 C14.7761424,21 15,21.2238576 15,21.5 C15,21.7761424 14.7761424,22 14.5,22 L13.5,22 C13.2238576,22 13,21.7761424 13,21.5 C13,21.2238576 13.2238576,21 13.5,21 L14.5,21 Z M11.5,21 C11.7761424,21 12,21.2238576 12,21.5 C12,21.7761424 11.7761424,22 11.5,22 L10.5,22 C10.2238576,22 10,21.7761424 10,21.5 C10,21.2238576 10.2238576,21 10.5,21 L11.5,21 Z M8.5,21 C8.77614237,21 9,21.2238576 9,21.5 C9,21.7761424 8.77614237,22 8.5,22 L7.5,22 C7.22385763,22 7,21.7761424 7,21.5 C7,21.2238576 7.22385763,21 7.5,21 L8.5,21 Z M5.5,13 C5.22385763,13 5,12.7761424 5,12.5 C5,12.2238576 5.22385763,12 5.5,12 L6.5,12 C6.77614237,12 7,12.2238576 7,12.5 C7,12.7761424 6.77614237,13 6.5,13 L5.5,13 Z M8.5,13 C8.22385763,13 8,12.7761424 8,12.5 C8,12.2238576 8.22385763,12 8.5,12 L9.5,12 C9.77614237,12 10,12.2238576 10,12.5 C10,12.7761424 9.77614237,13 9.5,13 L8.5,13 Z M15.5,13 C15.2238576,13 15,12.7761424 15,12.5 C15,12.2238576 15.2238576,12 15.5,12 L16.5,12 C16.7761424,12 17,12.2238576 17,12.5 C17,12.7761424 16.7761424,13 16.5,13 L15.5,13 Z M18.5,13 C18.2238576,13 18,12.7761424 18,12.5 C18,12.2238576 18.2238576,12 18.5,12 L19.5,12 C19.7761424,12 20,12.2238576 20,12.5 C20,12.7761424 19.7761424,13 19.5,13 L18.5,13 Z"/></svg>',CELL_BORDER_NONE:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M32 480a32 32 0 1 1 0-64 32 32 0 1 1 0 64zm96-64a32 32 0 1 1 0 64 32 32 0 1 1 0-64zm0-384a32 32 0 1 1 0 64 32 32 0 1 1 0-64zm0 256a32 32 0 1 1 0-64 32 32 0 1 1 0 64zM320 416a32 32 0 1 1 0 64 32 32 0 1 1 0-64zm0-320a32 32 0 1 1 0-64 32 32 0 1 1 0 64zm0 128a32 32 0 1 1 0 64 32 32 0 1 1 0-64zM224 480a32 32 0 1 1 0-64 32 32 0 1 1 0 64zm0-448a32 32 0 1 1 0 64 32 32 0 1 1 0-64zm0 256a32 32 0 1 1 0-64 32 32 0 1 1 0 64zM416 416a32 32 0 1 1 0 64 32 32 0 1 1 0-64zm0-384a32 32 0 1 1 0 64 32 32 0 1 1 0-64zM32 96a32 32 0 1 1 0-64 32 32 0 1 1 0 64zM416 224a32 32 0 1 1 0 64 32 32 0 1 1 0-64zM32 288a32 32 0 1 1 0-64 32 32 0 1 1 0 64zm192 32a32 32 0 1 1 0 64 32 32 0 1 1 0-64zm192 64a32 32 0 1 1 0-64 32 32 0 1 1 0 64zM32 320a32 32 0 1 1 0 64 32 32 0 1 1 0-64zM416 192a32 32 0 1 1 0-64 32 32 0 1 1 0 64zM32 128a32 32 0 1 1 0 64 32 32 0 1 1 0-64zm192 64a32 32 0 1 1 0-64 32 32 0 1 1 0 64z"/></svg>',FIXED_COLUMN_WIDTH:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M6,5H18A1,1 0 0,1 19,6A1,1 0 0,1 18,7H6A1,1 0 0,1 5,6A1,1 0 0,1 6,5M21,2V4H3V2H21M15,8H17V22H15V8M7,8H9V22H7V8M11,8H13V22H11V8Z" /></svg>',COLOR:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M512 256c0 .9 0 1.8 0 2.7c-.4 36.5-33.6 61.3-70.1 61.3L344 320c-26.5 0-48 21.5-48 48c0 3.4 .4 6.7 1 9.9c2.1 10.2 6.5 20 10.8 29.9c6.1 13.8 12.1 27.5 12.1 42c0 31.8-21.6 60.7-53.4 62c-3.5 .1-7 .2-10.6 .2C114.6 512 0 397.4 0 256S114.6 0 256 0S512 114.6 512 256zM128 288a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm0-96a32 32 0 1 0 0-64 32 32 0 1 0 0 64zM288 96a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm96 96a32 32 0 1 0 0-64 32 32 0 1 0 0 64z" /></svg>',CUT:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256"><rect width="256" height="256" fill="none"/><circle cx="60" cy="76" r="28" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/><circle cx="60" cy="180" r="28" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/><line x1="136" y1="128" x2="83.11" y2="164.19" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/><line x1="232" y1="62.32" x2="164.33" y2="108.61" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/><line x1="232" y1="193.68" x2="83.11" y2="91.81" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/></svg>',COPY:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256"><rect width="256" height="256" fill="none"/><polyline points="168 168 216 168 216 40 88 40 88 88" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/><rect x="40" y="88" width="128" height="128" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/></svg>',PASTE:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256"><rect width="256" height="256" fill="none"/><polyline points="48 139.59 48 216 208 216 208 139.59" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/><path d="M54,40H202a8,8,0,0,1,7.69,5.8L224,96H32L46.34,45.8A8,8,0,0,1,54,40Z" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/><path d="M96,96v16a32,32,0,0,1-64,0V96" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/><path d="M160,96v16a32,32,0,0,1-64,0V96" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/><path d="M224,96v16a32,32,0,0,1-64,0V96" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/></svg>',SELECT_ALL:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256"><rect width="256" height="256" fill="none"/><line x1="144" y1="40" x2="112" y2="40" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/><line x1="112" y1="216" x2="144" y2="216" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/><path d="M184,40h24a8,8,0,0,1,8,8V72" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/><line x1="216" y1="144" x2="216" y2="112" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/><path d="M184,216h24a8,8,0,0,0,8-8V184" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/><line x1="40" y1="112" x2="40" y2="144" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/><path d="M72,216H48a8,8,0,0,1-8-8V184" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/><path d="M72,40H48a8,8,0,0,0-8,8V72" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/><rect x="80" y="80" width="96" height="96" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/></svg>',FULLSCREEN:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M8 3V5H4V9H2V3H8ZM2 21V15H4V19H8V21H2ZM22 21H16V19H20V15H22V21ZM22 9H20V5H16V3H22V9Z"></path></svg>',FULLSCREEN_EXIT:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M18 7H22V9H16V3H18V7ZM8 9H2V7H6V3H8V9ZM18 17V21H16V15H22V17H18ZM8 15V21H6V17H2V15H8Z"></path></svg>',PRINT:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16.05 16.04"><g><path d="M19.76,15.84a1.29,1.29,0,0,0,.39-.92V8.35A2.05,2.05,0,0,0,19.57,7a1.93,1.93,0,0,0-1.38-.57H6.37a1.95,1.95,0,0,0-2,2v6.56a1.23,1.23,0,0,0,.38.92,1.35,1.35,0,0,0,.93.38h2V14.9l-2,0V8.35a.67.67,0,0,1,.18-.47.62.62,0,0,1,.48-.19H18.18a.6.6,0,0,1,.46.19.66.66,0,0,1,.18.47V14.9h-2v1.32h2A1.35,1.35,0,0,0,19.76,15.84ZM17.52,7.69V5.06a1.31,1.31,0,0,0-.38-.92,1.34,1.34,0,0,0-.94-.38H8.34A1.3,1.3,0,0,0,7,5.06V7.69H8.34V5.06h7.87V7.69h1.31ZM8.34,12.93h7.87l0,5.26H8.34V12.93Zm7.87,5.26v0Zm.65,1.31a.6.6,0,0,0,.46-.19.72.72,0,0,0,.2-.47V12.29a.74.74,0,0,0-.2-.47.6.6,0,0,0-.46-.19H7.68a.6.6,0,0,0-.46.19.72.72,0,0,0-.2.47v6.55a.74.74,0,0,0,.2.47.6.6,0,0,0,.46.19h9.18ZM16.67,9.28a.7.7,0,0,0-.94,0,.63.63,0,0,0-.18.46.67.67,0,0,0,.18.47.68.68,0,0,0,.94,0,.66.66,0,0,0,.18-.47A.58.58,0,0,0,16.67,9.28Z" transform="translate(-4.25 -3.61)"/></g></svg>',SPECIAL_CHARACTER:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256"><rect width="256" height="256" fill="none"/><line x1="128" y1="40" x2="128" y2="216" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/><line x1="48" y1="80" x2="208" y2="176" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/><line x1="48" y1="176" x2="208" y2="80" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/></svg>',EMBED:'<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 122.88 91.26"><path class="cls-1" d="M8.32,0H114.56a8.34,8.34,0,0,1,8.32,8.32V82.94a8.35,8.35,0,0,1-8.32,8.32H8.32A8.35,8.35,0,0,1,0,82.94V8.32A8.34,8.34,0,0,1,8.32,0ZM88.8,54.44a2.36,2.36,0,0,1,4.6,1.07L88.28,77.44a2.36,2.36,0,0,1-4.6-1.07L88.8,54.44ZM16.18,73.22a2.66,2.66,0,0,1,0-5.32h25a2.66,2.66,0,1,1,0,5.32Zm0-16.61a2.66,2.66,0,0,1,0-5.32H59.62a2.66,2.66,0,1,1,0,5.32Zm0-16.61a2.66,2.66,0,0,1,0-5.32H85A2.66,2.66,0,0,1,85,40Zm64.6,32a2.36,2.36,0,0,1-3.1,3.55l-9-7.85a2.35,2.35,0,0,1-.22-3.32,1.67,1.67,0,0,1,.23-.23l9-7.84a2.35,2.35,0,0,1,3.1,3.54l-6.93,6.08L80.78,72ZM100,75.56A2.36,2.36,0,0,1,96.9,72l6.93-6.07L96.9,59.86a2.35,2.35,0,1,1,3.1-3.54l9,7.84a1.67,1.67,0,0,1,.23.23,2.35,2.35,0,0,1-.22,3.32l-9,7.85Zm18-52.27H5.29V83.75A2.26,2.26,0,0,0,6,85.38a2.28,2.28,0,0,0,1.63.67h108a2.28,2.28,0,0,0,1.63-.67,2.26,2.26,0,0,0,.67-1.63V23.29ZM106.64,9.35a4.11,4.11,0,1,1-4.1,4.11,4.11,4.11,0,0,1,4.1-4.11Zm-27.84,0a4.11,4.11,0,1,1-4.11,4.11A4.11,4.11,0,0,1,78.8,9.35Zm13.92,0a4.11,4.11,0,1,1-4.11,4.11,4.11,4.11,0,0,1,4.11-4.11Z "/></svg>',EDIT_LINK:'<svg xmlns="http://www.w3.org/2000/svg" width="20px" viewBox="0 0 24 24" fill="currentColor"><path d="M15.7279 9.57627L14.3137 8.16206L5 17.4758V18.89H6.41421L15.7279 9.57627ZM17.1421 8.16206L18.5563 6.74785L17.1421 5.33363L15.7279 6.74785L17.1421 8.16206ZM7.24264 20.89H3V16.6473L16.435 3.21231C16.8256 2.82179 17.4587 2.82179 17.8492 3.21231L20.6777 6.04074C21.0682 6.43126 21.0682 7.06443 20.6777 7.45495L7.24264 20.89Z"></path></svg>',COPY_LINK:'<svg xmlns="http://www.w3.org/2000/svg" width="20px" viewBox="0 0 24 24" fill="currentColor"><path d="M6.9998 6V3C6.9998 2.44772 7.44752 2 7.9998 2H19.9998C20.5521 2 20.9998 2.44772 20.9998 3V17C20.9998 17.5523 20.5521 18 19.9998 18H16.9998V20.9991C16.9998 21.5519 16.5499 22 15.993 22H4.00666C3.45059 22 3 21.5554 3 20.9991L3.0026 7.00087C3.0027 6.44811 3.45264 6 4.00942 6H6.9998ZM5.00242 8L5.00019 20H14.9998V8H5.00242ZM8.9998 6H16.9998V16H18.9998V4H8.9998V6Z"></path></svg>',DELETE_LINK:'<svg xmlns="http://www.w3.org/2000/svg" width="20px" viewBox="0 0 24 24" fill="currentColor"><path d="M17 6H22V8H20V21C20 21.5523 19.5523 22 19 22H5C4.44772 22 4 21.5523 4 21V8H2V6H7V3C7 2.44772 7.44772 2 8 2H16C16.5523 2 17 2.44772 17 3V6ZM18 8H6V20H18V8ZM9 11H11V17H9V11ZM13 11H15V17H13V11ZM9 4V6H15V4H9Z"></path></svg>',TENOR:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M17.409 19C16.633 16.6012 15.1323 15.1147 13.1434 13.3979C15.0238 11.8971 17.4071 11 20 11V3H21.0082C21.556 3 22 3.44495 22 3.9934V20.0066C22 20.5552 21.5447 21 21.0082 21H2.9918C2.44405 21 2 20.5551 2 20.0066V3.9934C2 3.44476 2.45531 3 2.9918 3H6V1H8V5H4V12C9.22015 12 13.6618 14.4616 15.3127 19H17.409ZM18 1V5H10V3H16V1H18ZM16.5 10C15.6716 10 15 9.32843 15 8.5C15 7.67157 15.6716 7 16.5 7C17.3284 7 18 7.67157 18 8.5C18 9.32843 17.3284 10 16.5 10Z"></path></svg>',LOADER:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200"><radialGradient id="a12" cx=".66" fx=".66" cy=".3125" fy=".3125" gradientTransform="scale(1.5)"><stop offset="0" stop-color="#000000"></stop><stop offset=".3" stop-color="#000000" stop-opacity=".9"></stop><stop offset=".6" stop-color="#000000" stop-opacity=".6"></stop><stop offset=".8" stop-color="#000000" stop-opacity=".3"></stop><stop offset="1" stop-color="#000000" stop-opacity="0"></stop></radialGradient><circle transform-origin="center" fill="none" stroke="url(#a12)" stroke-width="15" stroke-linecap="round" stroke-dasharray="200 1000" stroke-dashoffset="0" cx="100" cy="100" r="70"><animateTransform type="rotate" attributeName="transform" calcMode="spline" dur="2" values="360;0" keyTimes="0;1" keySplines="0 0 1 1" repeatCount="indefinite"></animateTransform></circle><circle transform-origin="center" fill="none" opacity=".2" stroke="#000000" stroke-width="15" stroke-linecap="round" cx="100" cy="100" r="70"></circle></svg>',FULLSCREEN_IMAGE:'<svg xmlns="http://www.w3.org/2000/svg" width="20px" viewBox="0 0 24 24" fill="currentColor"><path d="M8 3V5H4V9H2V3H8ZM2 21V15H4V19H8V21H2ZM22 21H16V19H20V15H22V21ZM22 9H20V5H16V3H22V9Z"></path></svg>',CLOSE:'<svg xmlns="http://www.w3.org/2000/svg" width="16px" viewBox="0 0 24 24" fill="currentColor"><path d="M10.5859 12L2.79297 4.20706L4.20718 2.79285L12.0001 10.5857L19.793 2.79285L21.2072 4.20706L13.4143 12L21.2072 19.7928L19.793 21.2071L12.0001 13.4142L4.20718 21.2071L2.79297 19.7928L10.5859 12Z"></path></svg>',SPINNER:'<svg class="leksy-editor-spinner" width="16" height="16" viewBox="0 0 50 50"><circle class="leksy-editor-path" cx="25" cy="25" r="20" fill="none" stroke-width="4"></circle></svg>',TABLE_OF_CONTENT:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M20 22H4C3.44772 22 3 21.5523 3 21V3C3 2.44772 3.44772 2 4 2H20C20.5523 2 21 2.44772 21 3V21C21 21.5523 20.5523 22 20 22ZM19 20V4H5V20H19ZM8 7H16V9H8V7ZM8 11H16V13H8V11ZM8 15H16V17H8V15Z"></path></svg>',MORE:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M12 3C10.9 3 10 3.9 10 5C10 6.1 10.9 7 12 7C13.1 7 14 6.1 14 5C14 3.9 13.1 3 12 3ZM12 17C10.9 17 10 17.9 10 19C10 20.1 10.9 21 12 21C13.1 21 14 20.1 14 19C14 17.9 13.1 17 12 17ZM12 10C10.9 10 10 10.9 10 12C10 13.1 10.9 14 12 14C13.1 14 14 13.1 14 12C14 10.9 13.1 10 12 10Z"></path></svg>',PLAY_LIST:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M22 18V20H2V18H22ZM2 3.5L10 8.5L2 13.5V3.5ZM22 11V13H12V11H22ZM22 4V6H12V4H22Z"></path></svg>',PENCIL_LINE:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M15.7279 9.57627L14.3137 8.16206L5 17.4758V18.89H6.41421L15.7279 9.57627ZM17.1421 8.16206L18.5563 6.74785L17.1421 5.33363L15.7279 6.74785L17.1421 8.16206ZM7.24264 20.89H3V16.6473L16.435 3.21231C16.8256 2.82179 17.4587 2.82179 17.8492 3.21231L20.6777 6.04074C21.0682 6.43126 21.0682 7.06443 20.6777 7.45495L7.24264 20.89Z"></path></svg>',FIND_AND_REPLACE:'<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" fill="#000000" viewBox="0 0 256 256"><path d="M229.66,218.34l-50.07-50.06a88.11,88.11,0,1,0-11.31,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z"></path></svg>'},se={IMAGE:"image/png,image/jpg,image/jpeg,image/webp",VIDEO:"video/mp4,video/quicktime"},We={YOUTUBE:/(?:youtube\.com\/(?:.*[?&]v=|embed\/|v\/|watch\?v=|live\/)|youtu\.be\/)([^"&?\/\s]{11})/,REDDIT:/(?:reddit\.com\/r\/[\w-]+\/comments\/|reddit\.com\/comments\/)([\w-]+)/,INSTAGRAM:/(?:instagram\.com\/(?:p|reel|tv|stories\/[\w-]+|[\w-]+\/posts|share\/p)\/|instagr\.am\/p\/)([\w-]+)/,THREADS:/(?:threads\.net\/@[\w-]+\/post\/)([\w-]+)/,PINTEREST:/(?:pinterest\.com\/pin\/)(\d+)/,VIMEO:/vimeo\.com\/(\d+)/,TWITCH:/twitch\.tv\/videos\/(\d+)/,TWITCH_CHANNEL:/twitch\.tv\/([a-zA-Z0-9_]+)/,TIKTOK:/tiktok\.com\/@[^/]+\/video\/(\d+)/},be={YOUTUBE:"https://www.youtube.com/embed/",INSTAGRAM:"https://www.instagram.com/p/",REDDIT:"https://www.redditmedia.com/r/all/comments/",PINTEREST:"https://assets.pinterest.com/ext/embed.html?id=",THREADS:"https://www.threads.net/t/",VIMEO:"https://player.vimeo.com/video/",TWITCH:"https://player.twitch.tv/?video=",TWITCH_CHANNEL:"https://player.twitch.tv/?channel=",TIKTOK:"https://www.tiktok.com/embed/"},Ie={primary:"hsl(160, 100%, 40%)",baseWhite:"hsl(0, 0%, 100%)",whiteDark:"hsl(223, 5%, 92%)",resizer:" #3f9dff",resizerBackground:"hsl(211, 100%, 62%, 0.3)",shadow:"rgba(0, 0, 0, 0.3)",mention:" #efefef",mentionHighlight:"#ddd",dashedBorder:"gray",tableResizer:"cornsilk",tableResizerOutline:"darkblue",textColor:"hsl(216, 10%, 20%)",resizerPosition:"#fff",resizerPositionBackground:"#333",linkColor:"#0000ff",scrollbarThumb:"hsl(160, 100%, 40%)",scrollbarTrack:"hsl(223, 5%, 76%)"},ee={IFRAME_VARIABLES:`
1
+ function We(t,{insertAt:e}={}){if(!t||typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",e==="top"&&n.firstChild?n.insertBefore(o,n.firstChild):n.appendChild(o),o.styleSheet?o.styleSheet.cssText=t:o.appendChild(document.createTextNode(t))}We(`.leksy-editor-container *,*:before,*:after{box-sizing:border-box}.leksy-editor-container body,.leksy-editor-container p,.leksy-editor-container ul,.leksy-editor-container ol,.leksy-editor-container li{margin:0;padding:0;color:#000;font-weight:400}.leksy-editor-container button{appearance:auto;text-rendering:auto;color:unset;letter-spacing:normal;word-spacing:normal;line-height:normal;text-transform:none;text-indent:0px;text-shadow:none;display:inline-block;text-align:center;align-items:center;cursor:pointer;box-sizing:border-box;background-color:unset;padding-block:unset;border-width:0px;border-style:outset;border-color:unset;border-image:initial}.leksy-editor-container{width:100%;min-height:400px;border:1px solid black;border-radius:6px;display:flex;flex-direction:column;position:relative}.leksy-editor-container.fullscreen{position:fixed;top:0;left:0;height:100vh;background-color:#fff;z-index:1000;border-radius:0}.leksy-editor-toolbar{padding:6px;border-bottom:1px solid black;background-color:#f8f8ff;flex:0 1 auto;display:flex;flex-wrap:wrap;border-radius:6px 6px 0 0;align-items:center}.leksy-editor-toolbar-items{outline:1px solid gray;display:flex;border-radius:4px;margin:2px}.leksy-editor-toolbar-items span{font-size:14px;white-space:nowrap}.leksy-editor-toolbar-item{margin:1px;padding:6px 0;height:34px;width:34px;background:transparent;border-radius:4px;position:relative;user-select:none;vertical-align:top;font-size:1rem;cursor:pointer;outline:0px;text-align:center;transition:.3s}.leksy-editor-toolbar-item.active{color:#4592ff;fill:#4592ff}.leksy-editor-toolbar-item.disabled{cursor:not-allowed;color:#bdbdbd;fill:#bdbdbd}.leksy-editor-toolbar-item svg{width:14px;height:14px}.leksy-editor-toolbar-item.select{padding:0 8px;width:unset}.leksy-editor-toolbar-item.button-select{border-radius:4px 0 0 4px;margin-right:0}.leksy-editor-toolbar-item.select.button-select{padding:0;border-radius:0 4px 4px 0;margin-left:0;margin-right:1px}.leksy-editor-toolbar-item.select.button-select svg{width:18px;height:18px}.leksy-editor-toolbar-item.reset-color,.leksy-editor-toolbar-item.color{width:unset;padding:4px 8px}.leksy-editor-toolbar-item.color input{border:none;width:25px;height:25px;background:none}.leksy-editor-toolbar-item.color div{display:inline}.leksy-editor-toolbar-item:hover{background-color:#d3d3d3;border:pink}.leksy-editor-toolbar-item:hover:after{opacity:1;visibility:visible}.leksy-editor-toolbar-item:after{content:attr(data-title);position:fixed;top:var(--leksy-editor-top, 0);left:var(--leksy-editor-left, 0);opacity:0;visibility:hidden;transition:opacity .3s,visibility .3s;background-color:gray;box-shadow:0 0 24px #0003;color:#000;padding:5px 10px;border-radius:5px;transform:translate(-50%);white-space:nowrap;z-index:1;pointer-events:none;font-size:.875rem}.leksy-editor-toolbar-table{display:grid;grid-template-columns:repeat(10,20px);grid-template-rows:repeat(10,20px)}.leksy-editor-toolbar-table .cell{width:16px;height:16px;border:1px solid gray;background-color:#d3d3d3}.leksy-editor-toolbar-table .cell.selected{background-color:#0c8}.leksy-editor-placeholder{user-select:none;opacity:.5;padding:4px;position:absolute}.leksy-editor-resize-items{margin-top:4px;width:235px}.leksy-editor-resize-item{margin:1px;padding:6px;height:34px;background:transparent;border-radius:4px;position:relative;user-select:none;vertical-align:top;font-size:1rem;cursor:pointer;outline:0px;text-align:center}.leksy-editor-resize-item svg{width:15px}.leksy-editor-resize-item:hover{background-color:#d3d3d3;border:pink}.leksy-editor-resize-item:hover:after{opacity:1;visibility:visible}.leksy-editor-resize-item:not([data-title]):after,.leksy-editor-resize-item[data-title=""]:after{display:none}.leksy-editor-resize-item:after{content:attr(data-title);position:absolute;opacity:0;visibility:hidden;transition:opacity .3s,visibility .3s;background-color:gray;box-shadow:0 0 24px #0003;color:#000;padding:5px 10px;border-radius:5px;bottom:-90%;left:60%;transform:translate(-50%);white-space:nowrap;z-index:1;pointer-events:none;font-size:.875rem}.leksy-editor-dropdown-content{display:none;position:absolute;min-width:160px;box-shadow:0 4px 12px #00000026;border-radius:6px;overflow:hidden;padding:4px;z-index:2000;background-color:#fff}.leksy-editor-dropdown-content>button{display:block;width:100%;margin:0;text-align:left;padding:8px 16px;cursor:pointer;white-space:nowrap;transition:.3s;border-radius:6px}.leksy-editor-dropdown-content>button svg{width:10px;margin-right:2px}.leksy-editor-dropdown-content>button:hover{background-color:#28a745;color:#fff}.leksy-editor-dropdown-content.gallery{width:266px;height:350px;padding:0;overflow-y:auto}.leksy-editor-dropdown-content.gallery img{width:100%}.leksy-editor-dropdown-content.gallery input{width:100%;line-height:1.5rem;padding:2px 8px;border:1px solid #ccc;border-radius:6px;transition:all .3s ease-in-out;box-shadow:0 2px 4px #0000001a;font-size:14px;position:sticky;top:0}.leksy-editor-dropdown-content.gallery input:focus{border-color:#4592ff;box-shadow:0 4px 8px #4592ff4d;outline:none}.leksy-editor-dropdown-content.category{width:300px;height:350px;padding:6px;overflow-y:auto;user-select:none}.leksy-editor-dropdown-content.category div{font-weight:700;margin-top:8px;margin-bottom:4px}.leksy-editor-dropdown-content.category span{padding:4px;cursor:pointer}.leksy-editor-dropdown-content.mention{width:250px;height:350px;padding:6px;overflow-y:auto;user-select:none}.leksy-editor-dropdown-content.mention input{width:100%;line-height:1.5rem;margin:4px 0}.leksy-editor-dropdown-content.mention button{display:block;width:100%;margin:0;text-align:left;padding:8px 16px;cursor:pointer;white-space:nowrap}.leksy-editor-dropdown-content.mention button:hover{background-color:green}.leksy-editor-popover-content{display:none;position:absolute;min-width:160px;box-shadow:0 0 10px gray;border-radius:6px;padding:4px;z-index:2000;background-color:#fff}.leksy-editor-popover-tabs{display:flex;background:#f1f1f1;border-bottom:1px solid #ccc}button.leksy-editor-popover-tab{padding:8px 12px;border:none;background:transparent;cursor:pointer}button.leksy-editor-popover-tab.active{border-bottom:2px solid black;font-weight:700}.leksy-editor-popover-tabs .leksy-editor-popover-tab:not(:last-child){border-right:1px solid #ccc}.leksy-editor-codeview{flex:1 1 auto;padding:4px;background-color:#1f1f1f;color:#74bed8;border:0;outline:0;display:none;resize:none;height:400px}.leksy-editor-stepper{height:24px;border-top:1px solid black;border-radius:0 0 4px 4px;background-color:#f8f8ff;padding:2px 5px;text-transform:uppercase;display:flex;justify-content:space-between;font-size:14px;user-select:none}.leksy-editor-stepper .breadcrumb{list-style:none;display:flex;overflow:hidden;justify-content:end}.leksy-editor-stepper .breadcrumb li{margin-left:5px}.leksy-editor-stepper .breadcrumb li:after{content:">";margin-left:5px}.leksy-editor-stepper .breadcrumb li:last-child:after{content:""}.leksy-editor-modal{position:fixed;z-index:100;left:0;top:0;width:100%;height:100%;overflow:auto;background-color:#00000080}.leksy-editor-modal.leksy-editor-draggable-modal{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);background:inherit;width:fit-content;height:inherit}.leksy-editor-modal-content{margin:10% auto;border:1px solid #898f9f;max-width:500px;border-radius:12px}.leksy-editor-modal.leksy-editor-draggable-modal .leksy-editor-modal-content{margin:unset;width:fit-content}.leksy-editor-modal-header{padding:1.25rem;display:flex;align-items:center;justify-content:space-between;background-color:#fff;border-bottom:1px solid #d4d5d8;border-radius:12px 12px 0 0;overflow:hidden}.leksy-editor-modal-body{background-color:#fff;padding:1.5rem;width:100%}.leksy-editor-modal-body .warning{color:red}.leksy-editor-modal-footer{background-color:#f2f2f3;padding:1.25rem;display:flex;justify-content:flex-end;gap:12px;border-radius:0 0 12px 12px;width:100%}.leksy-editor-modal input{width:100%;font-size:1rem;padding:10px 12px;border:1px solid #ccc;border-radius:6px;outline:none;transition:all .3s ease-in-out;color:#333}.leksy-editor-modal input:focus{border-color:#4592ff;background-color:#fff}.leksy-editor-modal input::placeholder{color:#bdbdbd}.leksy-editor-modal input:hover{border-color:#555}.leksy-editor-modal button.submit{height:2rem;padding:.75rem 1rem;background-color:#00b377;display:flex;align-items:center;justify-content:center;flex-direction:row;text-align:center;text-decoration:none;cursor:pointer;border:1px solid hsl(160,100%,40%);border-radius:6px;color:#fff;white-space:nowrap;gap:.5rem;transition:.5s;font-size:1rem}.leksy-editor-preview-modal-overlay{position:fixed;top:0;left:0;width:100%;height:100%;background:#000000b9;display:block;align-items:center;justify-content:center;z-index:1000}.leksy-editor-preview-modal-content{height:100%;padding:20px;border-radius:8px;box-shadow:0 4px 6px #0000001a;position:relative;text-align:center}.leksy-editor-preview-modal-close{position:absolute;top:10px;right:20px;cursor:pointer;color:#fff;font-size:20px}.leksy-editor-preview-modal-close svg{width:28px}.leksy-editor-preview-modal-body{display:flex;height:100%;width:100%;align-items:center;justify-content:center}.leksy-editor-preview-modal-body img{object-fit:contain;max-width:90%;max-height:90%}.leksy-editor-spinner{animation:leksy-editor-rotate 1s linear infinite;margin-right:8px;vertical-align:middle}.leksy-editor-spinner .leksy-editor-path{stroke:#fff;stroke-linecap:round;animation:leksy-editor-dash 1.5s ease-in-out infinite}.leksy-editor-upload-img-box{height:180px;border:2px dashed #d1d5db;border-radius:12px;background:#f9fafb;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:border-color .2s ease}.leksy-editor-upload-img-box:hover{border-color:gray}.leksy-editor-upload-img-preview-box{height:180px;border:2px solid grey;margin-bottom:8px;border-radius:8px}.leksy-editor-upload-img-preview{width:100%;height:100%;border-radius:8px;object-fit:cover;object-position:top}.leksy-editor-find-and-replace-modal-tab-btn{background:transparent;border:none;cursor:pointer;font-size:16px;padding:0;color:var(--primary)}.leksy-editor-find-and-replace-modal-tab-btn.active{font-weight:700;border-bottom:2px solid black}.leksy-editor-find-and-replace-modal-label{padding-left:4px;margin-bottom:10px}.leksy-editor-find-and-replace-modal-count{position:absolute;right:8px;top:50%;transform:translateY(-50%);font-size:12px;color:#585555;pointer-events:none;user-select:none}@keyframes leksy-editor-rotate{to{transform:rotate(360deg)}}@keyframes leksy-editor-dash{0%{stroke-dasharray:1,150;stroke-dashoffset:0}50%{stroke-dasharray:90,150;stroke-dashoffset:-35}to{stroke-dasharray:90,150;stroke-dashoffset:-124}}
2
+ `);var bn="br|p|div|pre|blockquote|h|h1|h2|h3|h4|h5|h6|ol|ul|li|hr|figure|figcaption|img|iframe|audio|video|source|table|thead|tbody|tr|th|td|a|b|strong|var|i|em|u|ins|s|span|strike|del|sub|sup|code|svg|path|details|summary|font|article|section|main|header|footer|aside|mark|cite|abbr|dfn|nav|caption|picture|dl|dt|dd|time|label|kbd|samp|wbr",yn="align|alt|bgcolor|border|cellpadding|cellspacing|color|colspan|contenteditable|dir|download|face|height|href|lang|name|rowspan|size|src|style|target|title|valign|width|background|media|sizes|srcset|spellcheck",Cn=["position","inset","top","right","bottom","left","z-index","float","clear","overflow","overflow-x","overflow-y","transform","transform-origin","perspective","transition","transition-property","transition-duration","transition-timing-function","transition-delay","animation","animation-name","animation-duration","animation-timing-function","animation-delay","animation-iteration-count","animation-direction","animation-fill-mode","animation-play-state","flex-basis","flex-grow","flex-shrink","order","place-self","grid-column","grid-row"].join("|"),F={TEXT_URL:/(https?:\/\/[^\s]+|www\.[^\s]+)$/i,URL:/^(https?:\/\/)([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}(\/.*)?$/,MAILTO:/^mailto:[\w.-]+@[\w.-]+\.\w+$/,TEL:/^tel:\+?[0-9\s()-]+$/,EMAIL:/^[\w.-]+@[\w.-]+\.\w+$/,MOBILE:/^\+?[0-9\s()-]+$/,WHILE_LISTED_TAG:new RegExp("^("+bn.replace(/\|/g,"\\b|\\b")+")$","i"),WHILE_LISTED_ATTRIBUTES:new RegExp("^("+yn.replace(/\|/g,"\\b|\\b")+")$","i"),BLOCKED_STYLES:new RegExp("^("+Cn.replace(/\|/g,"\\b|\\b")+")$","i")},be={INVALID_ELEMENT:"Invalid argument: Element must be an instance of HTMLElement.",INVALID_PLUGIN:"Invalid plugin: Plugin not found.",GIPHY_KEY_NOT_FOUND:"GIPHY key not found.",PEXELS_KEY_NOT_FOUND:"Pexels key not found.",TENOR_KEY_NOT_FOUND:"Tenor key not found."},A={PREFIX:"leksy-editor",CONTAINER:"-container",TOOLBAR:"-toolbar",TOOLBAR_TABLE:"-toolbar-table",TOOLBAR_ITEM:"-toolbar-item",TOOLBAR_ITEM_SELECT:"select",TOOLBAR_ITEM_BUTTON_SELECT:"button-select",TOOLBAR_ITEM_COLOR:"color",TOOLBAR_ITEMS:"-toolbar-items",PLACEHOLDER:"-placeholder",CODEVIEW:"-codeview",STEPPER:"-stepper",DROPDOWN_CONTENT:"-dropdown-content",POPOVER_CONTENT:"-popover-content",POPOVER_TABS:"-popover-tabs",POPOVER_TAB:"-popover-tab",POPOVER_TAB_CONTENT:"-popover-tab-content",RESIZE_ITEMS:"-resize-items",RESIZE_ITEM:"-resize-item",MODAL:"-modal",DRAGGABLE_MODAL:"-draggable-modal",MODAL_CONTENT:"-modal-content",MODAL_HEADER:"-modal-header",MODAL_BODY:"-modal-body",MODAL_FOOTER:"-modal-footer",RESIZER:"-resizer",PREVIEW_MODAL_OVERLAY:"-preview-modal-overlay",PREVIEW_MODAL_CONTENT:"-preview-modal-content",PREVIEW_MODAL_CLOSE:"-preview-modal-close",PREVIEW_MODAL_BODY:"-preview-modal-body",UPLOAD_IMG_BOX:"-upload-img-box",UPLOAD_IMG_PREVIEW_BOX:"-upload-img-preview-box",UPLOAD_IMG_PREVIEW:"-upload-img-preview"},L={REDO:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.59 14.18"><g><path d="M11.58,18.48a6.84,6.84,0,1,1,6.85-6.85s0,.26,0,.67a8,8,0,0,1-.22,1.44l.91-.55a.51.51,0,0,1,.36,0,.45.45,0,0,1,.29.22.47.47,0,0,1,.06.36.45.45,0,0,1-.22.29L17.42,15.3l-.12,0h-.25l-.12-.06-.09-.09-.06-.07,0-.06-.87-2.12a.43.43,0,0,1,0-.37.49.49,0,0,1,.27-.26.41.41,0,0,1,.36,0,.53.53,0,0,1,.27.26l.44,1.09a6.51,6.51,0,0,0,.24-1.36,4.58,4.58,0,0,0,0-.64,5.83,5.83,0,0,0-1.73-4.17,5.88,5.88,0,0,0-8.34,0,5.9,5.9,0,0,0,4.17,10.06.51.51,0,0,1,.33.15.48.48,0,0,1,0,.68.53.53,0,0,1-.33.12Z" transform="translate(-4.48 -4.54)"/></g></svg>',UNDO:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.59 14.18"><g><path d="M5,14a.43.43,0,0,1-.22-.29.46.46,0,0,1,.06-.36.43.43,0,0,1,.29-.22.56.56,0,0,1,.36,0l.91.55a8.27,8.27,0,0,1-.22-1.45,5.07,5.07,0,0,1,0-.67A6.85,6.85,0,1,1,13,18.47a.44.44,0,0,1-.33-.13.48.48,0,0,1,0-.68.51.51,0,0,1,.33-.15A5.89,5.89,0,0,0,17.15,7.45a5.88,5.88,0,0,0-8.33,0,5.84,5.84,0,0,0-1.73,4.17s0,.25,0,.65a6.49,6.49,0,0,0,.24,1.37l.44-1.09a.57.57,0,0,1,.27-.26.41.41,0,0,1,.36,0,.53.53,0,0,1,.27.26.43.43,0,0,1,0,.37L7.82,15l0,.09-.09.09-.1.07-.06,0H7.28l-.13,0-1.09-.63c-.65-.36-1-.57-1.1-.63Z" transform="translate(-4.49 -4.53)"/></g></svg>',BOLD:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 11.76 15.75"><g><path d="M6.4,3.76V19.5h6.76a5.55,5.55,0,0,0,2-.32,4.93,4.93,0,0,0,1.52-1,4.27,4.27,0,0,0,1.48-3.34,3.87,3.87,0,0,0-.69-2.37,5.74,5.74,0,0,0-.71-.83,3.44,3.44,0,0,0-1.1-.65,3.6,3.6,0,0,0,1.58-1.36,3.66,3.66,0,0,0,.53-1.93,3.7,3.7,0,0,0-1.21-2.87,4.65,4.65,0,0,0-3.25-1.1H6.4Zm2.46,6.65V5.57h3.52a4.91,4.91,0,0,1,1.36.15,2.3,2.3,0,0,1,.85.45,2.06,2.06,0,0,1,.74,1.71,2.3,2.3,0,0,1-.78,1.92,2.54,2.54,0,0,1-.86.46,4.7,4.7,0,0,1-1.32.15H8.86Zm0,7.27V12.15H12.7a4.56,4.56,0,0,1,1.38.17,3.43,3.43,0,0,1,.95.49,2.29,2.29,0,0,1,.92,2,2.73,2.73,0,0,1-.83,2.1,2.66,2.66,0,0,1-.83.58,3.25,3.25,0,0,1-1.26.2H8.86Z" transform="translate(-6.4 -3.75)"/></g></svg>',UNDERLINE:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 9.78 15.74"><g><path d="M14.64,3.76h2.52v7.72a4.51,4.51,0,0,1-.59,2.31,3.76,3.76,0,0,1-1.71,1.53,6.12,6.12,0,0,1-2.64.53,5,5,0,0,1-3.57-1.18,4.17,4.17,0,0,1-1.27-3.24V3.76H9.9v7.3a3,3,0,0,0,.55,2,2.3,2.3,0,0,0,1.83.65,2.26,2.26,0,0,0,1.8-.65,3.09,3.09,0,0,0,.55-2V3.76Zm2.52,13.31V19.5H7.39V17.08h9.77Z" transform="translate(-7.38 -3.76)"/></g></svg>',ITALIC:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10.49 15.76"><g><path d="M17.16,3.79l.37,0-.06.38-.14.52A10,10,0,0,1,16.21,5a9.37,9.37,0,0,0-1,.32,6.68,6.68,0,0,0-.25.89c-.06.31-.11.59-.14.85-.3,1.36-.52,2.41-.68,3.14l-.61,3.18L13.1,15l-.43,2.4-.12.46a.62.62,0,0,0,0,.28c.44.1.85.17,1.23.22l.68.11a4.51,4.51,0,0,1-.08.6l-.09.42a.92.92,0,0,0-.23,0l-.43,0a1.37,1.37,0,0,1-.29,0c-.13,0-.63-.08-1.49-.16l-2,0c-.28,0-.87,0-1.78.12L7,19.5l.17-.88.8-.2A6.61,6.61,0,0,0,9.19,18,2.62,2.62,0,0,0,9.61,17l.28-1.41.58-2.75.12-.66c.05-.3.11-.58.17-.86s.12-.51.17-.69l.12-.48.12-.43.31-1.6.15-.65.31-1.91V5.14a3.86,3.86,0,0,0-1.48-.29l-.38,0,.2-1.06,3.24.14.75,0c.45,0,1.18,0,2.18-.09.23,0,.46,0,.71,0Z" transform="translate(-7.04 -3.76)"/></g></svg>',STRIKE:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.74 14.9"><g><path d="M12.94,13a4.27,4.27,0,0,1,1.32.58,1.46,1.46,0,0,1,.55,1.2,1.87,1.87,0,0,1-.88,1.64,4.17,4.17,0,0,1-2.35.59,4.44,4.44,0,0,1-2.74-.71,2.72,2.72,0,0,1-1-2.17H5.57a4.56,4.56,0,0,0,1.55,3.7,7,7,0,0,0,4.47,1.23,6,6,0,0,0,4.07-1.3,4.24,4.24,0,0,0,1.52-3.37,4,4,0,0,0-.26-1.4h-4ZM6.37,10.24A3.27,3.27,0,0,1,6,8.68a4,4,0,0,1,1.48-3.3,5.92,5.92,0,0,1,3.88-1.21,5.58,5.58,0,0,1,3.91,1.24,4.36,4.36,0,0,1,1.45,3.17H14.44a2.12,2.12,0,0,0-.91-1.81,4.45,4.45,0,0,0-2.44-.55,3.69,3.69,0,0,0-2,.51A1.64,1.64,0,0,0,8.3,8.22a1.3,1.3,0,0,0,.48,1.11,7,7,0,0,0,2.1.78l.28.06.28.08H6.37Zm13.09.68a.73.73,0,0,1,.49.21.66.66,0,0,1,.2.48.64.64,0,0,1-.2.48.71.71,0,0,1-.49.19H5.1a.67.67,0,0,1-.49-.19.66.66,0,0,1-.2-.48.64.64,0,0,1,.2-.48.73.73,0,0,1,.49-.21H19.46Z" transform="translate(-4.41 -4.17)"/></g></svg>',ALIGN_JUSTIFY:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.74 13.77"><g><path d="M4.41,4.74v2H20.15v-2H4.41Zm0,5.9H20.15v-2H4.41v2Zm0,3.94H20.15v-2H4.41v2Zm0,3.93h7.87v-2H4.41v2Z" transform="translate(-4.41 -4.74)"/></g></svg>',ALIGN_LEFT:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.74 13.77"><g><path d="M4.41,4.74v2H20.15v-2H4.41Zm11.8,3.94H4.41v2H16.22v-2Zm-11.8,5.9H18.18v-2H4.41v2Zm0,3.93h9.84v-2H4.41v2Z" transform="translate(-4.41 -4.74)"/></g></svg>',ALIGN_RIGHT:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.74 13.77"><g><path d="M4.41,4.74v2H20.15v-2H4.41Zm3.93,5.9H20.15v-2H8.34v2Zm-2,3.94H20.14v-2H6.37v2Zm3.94,3.93h9.84v-2H10.31v2Z" transform="translate(-4.41 -4.74)"/></g></svg>',ALIGN_CENTER:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.74 13.77"><g><path d="M4.41,4.74v2H20.15v-2H4.41Zm2,3.94v2H18.18v-2H6.37Zm-1,5.9H19.16v-2H5.39v2Zm2,3.93H17.2v-2H7.36v2Z" transform="translate(-4.41 -4.74)"/></g></svg>',CODE_VIEW:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.73 11.8"><g><path d="M8.09,7.94a.76.76,0,0,1,.53.22.72.72,0,0,1,.21.52.76.76,0,0,1-.22.54L6.18,11.63l2.43,2.44a.69.69,0,0,1,.2.51.66.66,0,0,1-.21.51.75.75,0,0,1-.51.22.63.63,0,0,1-.51-.21h0L4.63,12.15a.7.7,0,0,1-.22-.53.67.67,0,0,1,.25-.55L7.57,8.16a.82.82,0,0,1,.52-.22Zm12.05,3.69a.7.7,0,0,1-.23.52L17,15.1h0a.66.66,0,0,1-.51.21.73.73,0,0,1-.51-.22.75.75,0,0,1-.22-.51.63.63,0,0,1,.21-.51l2.43-2.44L15.92,9.22a.73.73,0,0,1-.22-.53A.74.74,0,0,1,17,8.18h0l2.91,2.91a.67.67,0,0,1,.27.54Zm-5.9-5.9a.73.73,0,0,1,.61.32.71.71,0,0,1,.07.68L11,17a1,1,0,0,1-.22.32.6.6,0,0,1-.35.16.75.75,0,0,1-.69-.26.69.69,0,0,1-.12-.72L13.56,6.23a.75.75,0,0,1,.26-.35.74.74,0,0,1,.42-.15Z" transform="translate(-4.41 -5.73)"/></g></svg>',ATTACHMENT:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 8.38 15.68"><g><path d="M15.23,6h1v9.78a3.88,3.88,0,0,1-1.31,2.45,4,4,0,0,1-6.57-2.45V7A3,3,0,0,1,9.2,4.89a3,3,0,0,1,5,2.09v8.31a1.92,1.92,0,0,1-.58,1.39,2,2,0,0,1-1.39.58,1.92,1.92,0,0,1-1.39-.58,2,2,0,0,1-.58-1.39V8h1v7.32a1,1,0,0,0,.29.69,1,1,0,0,0,.69.28A.9.9,0,0,0,13,16a1,1,0,0,0,.29-.69V7a1.92,1.92,0,0,0-.58-1.39A2,2,0,0,0,11.27,5a1.92,1.92,0,0,0-1.39.58A2,2,0,0,0,9.33,7v8.31a3,3,0,1,0,5.9,0V6Z" transform="translate(-8.08 -3.78)"/></g></svg>',LIST_BULLETS:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.74 12.37"><g><path d="M7.77,16.12a1.59,1.59,0,0,0-.49-1.18,1.62,1.62,0,0,0-1.19-.49,1.68,1.68,0,1,0,0,3.36,1.67,1.67,0,0,0,1.68-1.69Zm0-4.48A1.67,1.67,0,0,0,6.09,10,1.68,1.68,0,0,0,4.9,12.82a1.62,1.62,0,0,0,1.19.49,1.67,1.67,0,0,0,1.68-1.67Zm12.38,3.64a.27.27,0,0,0-.08-.19.28.28,0,0,0-.2-.09H9.19a.28.28,0,0,0-.2.08.29.29,0,0,0-.08.19V17a.27.27,0,0,0,.28.28H19.87a.27.27,0,0,0,.19-.08.24.24,0,0,0,.08-.2V15.28ZM7.77,7.13a1.63,1.63,0,0,0-.49-1.2,1.61,1.61,0,0,0-1.19-.49,1.61,1.61,0,0,0-1.19.49,1.71,1.71,0,0,0,0,2.4,1.62,1.62,0,0,0,1.19.49,1.61,1.61,0,0,0,1.19-.49,1.63,1.63,0,0,0,.49-1.2Zm12.38,3.66a.28.28,0,0,0-.08-.2.29.29,0,0,0-.19-.08H9.19a.27.27,0,0,0-.28.28v1.69a.27.27,0,0,0,.08.19.24.24,0,0,0,.2.08H19.87a.27.27,0,0,0,.19-.08.25.25,0,0,0,.08-.19V10.79Zm0-4.5a.27.27,0,0,0-.08-.19A.25.25,0,0,0,19.88,6H9.19A.28.28,0,0,0,9,6.1a.26.26,0,0,0-.08.19V8A.27.27,0,0,0,9,8.17a.24.24,0,0,0,.2.08H19.87a.27.27,0,0,0,.19-.08A.25.25,0,0,0,20.14,8V6.29Z" transform="translate(-4.41 -5.44)"/></g></svg>',LIST_NUMBER:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.69 15.74"><g><path d="M7.66,18a1.24,1.24,0,0,0-.26-.78,1.17,1.17,0,0,0-.72-.42l.85-1V15H4.58v1.34h.94v-.46l.85,0h0c-.11.11-.22.23-.32.35s-.23.27-.37.47L5.39,17l.23.51c.61-.05.92.11.92.49a.42.42,0,0,1-.18.37.79.79,0,0,1-.45.12A1.41,1.41,0,0,1,5,18.15l-.51.77A2.06,2.06,0,0,0,6,19.5a1.8,1.8,0,0,0,1.2-.41A1.38,1.38,0,0,0,7.66,18Zm0-5.54H6.75V13H5.63A.72.72,0,0,1,6,12.51a5.45,5.45,0,0,1,.66-.45,2.71,2.71,0,0,0,.67-.57,1.19,1.19,0,0,0,.31-.81,1.29,1.29,0,0,0-.45-1,1.86,1.86,0,0,0-2-.11,1.51,1.51,0,0,0-.62.7l.74.52A.87.87,0,0,1,6,10.28a.51.51,0,0,1,.35.12.42.42,0,0,1,.13.33.55.55,0,0,1-.21.4,3,3,0,0,1-.5.38c-.19.13-.39.27-.58.42a2,2,0,0,0-.5.6,1.63,1.63,0,0,0-.21.81,3.89,3.89,0,0,0,.05.48h3.2V12.44Zm12.45,2.82a.27.27,0,0,0-.08-.19.28.28,0,0,0-.21-.08H9.1a.32.32,0,0,0-.21.08.24.24,0,0,0-.08.2V17a.27.27,0,0,0,.08.19.3.3,0,0,0,.21.08H19.83a.32.32,0,0,0,.21-.08.25.25,0,0,0,.08-.19V15.26ZM7.69,7.32h-1V3.76H5.8L4.6,4.88l.63.68a1.85,1.85,0,0,0,.43-.48h0l0,2.24H4.74V8.2h3V7.32Zm12.43,3.42a.27.27,0,0,0-.08-.19.28.28,0,0,0-.21-.08H9.1a.32.32,0,0,0-.21.08.24.24,0,0,0-.08.2v1.71a.27.27,0,0,0,.08.19.3.3,0,0,0,.21.08H19.83a.32.32,0,0,0,.21-.08.25.25,0,0,0,.08-.19V10.74Zm0-4.52A.27.27,0,0,0,20,6,.28.28,0,0,0,19.83,6H9.1A.32.32,0,0,0,8.89,6a.24.24,0,0,0-.08.19V7.93a.27.27,0,0,0,.08.19.32.32,0,0,0,.21.08H19.83A.32.32,0,0,0,20,8.12a.26.26,0,0,0,.08-.2V6.22Z" transform="translate(-4.43 -3.76)"/></g></svg>',NEW_LIST_NUMBER:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256"><path d="M144,48V208a8,8,0,0,1-16,0V62.13L100.12,78.86a8,8,0,1,1-8.24-13.72l40-24A8,8,0,0,1,144,48Z"></path></svg>',LIST_SQUARE:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256"><path d="M224,48V208a16,16,0,0,1-16,16H48a16,16,0,0,1-16-16V48A16,16,0,0,1,48,32H208A16,16,0,0,1,224,48Z"></path></svg>',LIST_DISC:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z"></path></svg>',LIST_CIRCLE:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256"><rect width="256" height="256" fill="none"/><circle cx="128" cy="128" r="96" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/></svg>',LIST_LOWER_ALPHA:'<svg viewBox="-6 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg"><title>a</title><path d="M15.969 12.094v-2.938h2.25v16.438h-2.25v-2.313c-1.563 1.719-3.875 2.844-6.438 2.844-4.75 0-8.906-3.75-8.906-8.438s4.156-8.438 8.906-8.438c2.563 0 4.875 1.125 6.438 2.844zM15.969 17.875v-0.375c-0.125-3.438-2.969-6.188-6.469-6.188-3.594 0-6.719 2.844-6.719 6.375s3.125 6.375 6.719 6.375c3.5 0 6.344-2.75 6.469-6.188z"></path></svg>',LIST_LOWER_ROMAN:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><path d="M272 112C272 85.5 293.5 64 320 64C346.5 64 368 85.5 368 112C368 138.5 346.5 160 320 160C293.5 160 272 138.5 272 112zM224 256C224 238.3 238.3 224 256 224L320 224C337.7 224 352 238.3 352 256L352 512L384 512C401.7 512 416 526.3 416 544C416 561.7 401.7 576 384 576L256 576C238.3 576 224 561.7 224 544C224 526.3 238.3 512 256 512L288 512L288 288L256 288C238.3 288 224 273.7 224 256z"/></svg>',LIST_UPPER_ALPHA:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><path d="M349.5 115.7C344.6 103.8 332.9 96 320 96C307.1 96 295.4 103.8 290.5 115.7C197.2 339.7 143.8 467.7 130.5 499.7C123.7 516 131.4 534.7 147.7 541.5C164 548.3 182.7 540.6 189.5 524.3L221.3 448L418.6 448L450.4 524.3C457.2 540.6 475.9 548.3 492.2 541.5C508.5 534.7 516.2 516 509.4 499.7C496.1 467.7 442.7 339.7 349.4 115.7zM392 384L248 384L320 211.2L392 384z"/></svg>',SUBSCRIPT:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.75 14.61"><g><path d="M15.38,4.33H12.74L11.19,7c-.28.46-.51.87-.69,1.21L10.07,9h0l-.44-.8c-.22-.4-.45-.81-.71-1.23L7.34,4.33H4.68L8.26,10,4.4,16.08H7.1l1.69-2.83c.38-.63.72-1.22,1-1.78l.25-.46h0l.49.92c.24.45.48.89.74,1.32L13,16.08h2.61L11.84,10l1.77-2.84,1.77-2.85Zm4.77,13.75H17v-.15c0-.4.05-.64.16-.72a4.42,4.42,0,0,1,1.16-.31,3.3,3.3,0,0,0,1.54-.56A1.84,1.84,0,0,0,20.15,15a1.78,1.78,0,0,0-.44-1.41A2.8,2.8,0,0,0,18,13.25a2.71,2.71,0,0,0-1.69.37,1.83,1.83,0,0,0-.44,1.43v.23H17v-.23q0-.63.18-.78a1.62,1.62,0,0,1,.88-.15,1.59,1.59,0,0,1,.88.15q.18.15.18.75t-.18.75a3.58,3.58,0,0,1-1.18.33,3.33,3.33,0,0,0-1.52.51,1.57,1.57,0,0,0-.32,1.18v1.15h4.27v-.86Z" transform="translate(-4.4 -4.33)"/></g></svg>',SUPERSCRIPT:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.75 15.42"><g><path d="M12,13.14l3.61-5.81H12.94L11.33,10c-.28.46-.51.88-.69,1.25l-.45.83h0l-.45-.85c-.22-.41-.45-.82-.71-1.24L7.4,7.33H4.68l3.66,5.81L4.4,19.33H7.14l1.74-2.87q.58-1,1-1.83l.25-.48h0l.51.94.75,1.37,1.72,2.87h2.67l-1.92-3.09c-1.12-1.8-1.76-2.83-1.92-3.1Zm4.84-4.41h0l0,.15h3.27v.86H15.77V8.58a1.66,1.66,0,0,1,.33-1.22,3.51,3.51,0,0,1,1.56-.51,3.68,3.68,0,0,0,1.21-.34c.13-.1.19-.36.19-.77S19,5.07,18.87,5A1.63,1.63,0,0,0,18,4.8a1.58,1.58,0,0,0-.91.17c-.13.11-.19.38-.19.8V6H15.78V5.76a1.87,1.87,0,0,1,.45-1.47A2.84,2.84,0,0,1,18,3.91a2.8,2.8,0,0,1,1.72.38,1.84,1.84,0,0,1,.45,1.44,1.91,1.91,0,0,1-.34,1.35,3.24,3.24,0,0,1-1.58.57A3.69,3.69,0,0,0,17,8c-.12.1-.17.35-.17.76Z" transform="translate(-4.4 -3.91)"/></g></svg>',INDENT:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.74 12.36"><g><path d="M4.68,14.45a.27.27,0,0,1-.19-.08.3.3,0,0,1-.08-.21V9.1a.27.27,0,0,1,.08-.19.28.28,0,0,1,.2-.08.25.25,0,0,1,.19.07l2.54,2.54a.29.29,0,0,1,0,.4L4.88,14.36a.24.24,0,0,1-.2.09Zm15.19,1.12a.27.27,0,0,1,.19.08.25.25,0,0,1,.08.19v1.69a.27.27,0,0,1-.08.19.25.25,0,0,1-.19.08H4.68a.27.27,0,0,1-.19-.08.25.25,0,0,1-.08-.19V15.84a.27.27,0,0,1,.27-.27H19.87Zm0-3.38a.27.27,0,0,1,.19.08.28.28,0,0,1,.08.21v1.68a.32.32,0,0,1-.08.21.25.25,0,0,1-.19.08H10.31a.27.27,0,0,1-.19-.08.3.3,0,0,1-.08-.21V12.48a.32.32,0,0,1,.08-.21.24.24,0,0,1,.19-.08h9.56Zm0-3.37a.27.27,0,0,1,.19.08.25.25,0,0,1,.08.19v1.69a.27.27,0,0,1-.08.19.25.25,0,0,1-.19.08H10.31a.27.27,0,0,1-.27-.27V9.1a.27.27,0,0,1,.27-.27h9.56Zm.2-3.29a.28.28,0,0,1,.08.2V7.41a.32.32,0,0,1-.08.21.25.25,0,0,1-.19.08H4.68a.27.27,0,0,1-.19-.08.3.3,0,0,1-.08-.21V5.73a.32.32,0,0,1,.08-.21.25.25,0,0,1,.19-.08H19.87a.28.28,0,0,1,.2.09Z" transform="translate(-4.41 -5.44)"/></g></svg>',OUTDENT:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.74 12.36"><g><path d="M19.87,15.57a.27.27,0,0,1,.19.08.25.25,0,0,1,.08.19v1.69a.27.27,0,0,1-.08.19.25.25,0,0,1-.19.08H4.68a.27.27,0,0,1-.19-.08.25.25,0,0,1-.08-.19V15.84a.27.27,0,0,1,.27-.27H19.87ZM7.5,14.45a.25.25,0,0,1-.2-.09L4.76,11.84a.29.29,0,0,1,0-.4L7.3,8.9a.29.29,0,0,1,.4,0,.31.31,0,0,1,.07.2v5.06a.32.32,0,0,1-.08.21.26.26,0,0,1-.19.08ZM19.87,8.82a.27.27,0,0,1,.19.08.25.25,0,0,1,.08.19v1.69a.27.27,0,0,1-.08.19.25.25,0,0,1-.19.08H10.31a.27.27,0,0,1-.27-.27V9.1a.27.27,0,0,1,.27-.27h9.56Zm0,3.37a.27.27,0,0,1,.19.08.28.28,0,0,1,.08.21v1.68a.32.32,0,0,1-.08.21.25.25,0,0,1-.19.08H10.31a.27.27,0,0,1-.19-.08.3.3,0,0,1-.08-.21V12.48a.32.32,0,0,1,.08-.21.24.24,0,0,1,.19-.08h9.56Zm.2-6.66a.28.28,0,0,1,.08.2V7.41a.32.32,0,0,1-.08.21.25.25,0,0,1-.19.08H4.68a.27.27,0,0,1-.19-.08.3.3,0,0,1-.08-.21V5.73a.32.32,0,0,1,.08-.21.25.25,0,0,1,.19-.08H19.87a.28.28,0,0,1,.2.09Z" transform="translate(-4.41 -5.44)"/></g></svg>',LINE_HEIGHT:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.76 13.56"><g><path d="M4.4,4.88V8.26a2,2,0,0,0,.5.39s.1,0,.18-.12a.62.62,0,0,0,.17-.28c.06-.19.13-.44.21-.74s.14-.52.19-.66a.58.58,0,0,1,.21-.3,2.41,2.41,0,0,1,.63-.21,3.83,3.83,0,0,1,.88-.12,9.15,9.15,0,0,1,1.31.06.16.16,0,0,1,.11,0,.26.26,0,0,1,.06.14,4,4,0,0,1,0,.49v2l.05,3.77c0,1.41,0,2.68-.05,3.81a1.79,1.79,0,0,1-.11.49,10.68,10.68,0,0,1-1.4.45,1.12,1.12,0,0,0-.69.43v.31l0,.22.61,0c.85-.08,1.54-.12,2.06-.12a19.76,19.76,0,0,1,2.09.08,15.08,15.08,0,0,0,1.64.08,1.4,1.4,0,0,0,.29,0,1.58,1.58,0,0,0,0-.26l-.05-.43a2.26,2.26,0,0,0-.43-.17l-.77-.22-.15,0a2.55,2.55,0,0,1-.78-.28,2.56,2.56,0,0,1-.11-.75l0-1.29,0-3.15V7.53a10.51,10.51,0,0,1,.06-1.2,3.83,3.83,0,0,1,.6,0l1.88,0a2.18,2.18,0,0,1,.38,0,.45.45,0,0,1,.23.17.9.9,0,0,1,.05.25c0,.16.06.35.1.58a3.33,3.33,0,0,0,.14.55A6.39,6.39,0,0,0,15,9a2.91,2.91,0,0,0,.6-.15,2.77,2.77,0,0,0,0-.46l0-.51,0-2.95-.25,0-.38,0L15,4.94a.71.71,0,0,1-.18.15.45.45,0,0,1-.25.07l-.29,0H8.75l-.15,0H7.45a17,17,0,0,1-1.86,0L5.36,5l-.25-.13ZM19.75,16.14h-.69v-9h.69A.4.4,0,0,0,20.13,7c.06-.11,0-.24-.1-.39L18.92,5.15a.52.52,0,0,0-.86,0L17,6.58c-.12.15-.16.28-.1.39s.18.16.38.16h.69v9h-.69a.4.4,0,0,0-.38.16c-.06.11,0,.24.1.39l1.11,1.43a.52.52,0,0,0,.86,0L20,16.69c.12-.15.16-.28.1-.39a.4.4,0,0,0-.38-.16Z" transform="translate(-4.4 -4.86)"/></g></svg>',PARAGRAPH_STYLE:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 11.81 15.74"><g><path d="M18.18,3.76v2h-2V19.5h-2V5.73h-2V19.5h-2V11.63a3.94,3.94,0,0,1,0-7.87h7.87Z" transform="translate(-6.37 -3.76)"/></g></svg>',TEXT_STYLE:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 13.76 15.74"><g><path d="M17.68,6.71a2.22,2.22,0,0,0,1.06-.22.74.74,0,0,0,.42-.7.73.73,0,0,0-.08-.33.67.67,0,0,0-.17-.22,1,1,0,0,0-.31-.15L18.26,5l-.45-.09A15.27,15.27,0,0,0,13.26,5V4.74c0-.66-.63-1-1.92-1-.24,0-.43.15-.59.46a4,4,0,0,0-.36,1.14h0v0a26.45,26.45,0,0,1-3.5.35A2,2,0,0,0,5.77,6a.84.84,0,0,0-.37.79,2.14,2.14,0,0,0,.41,1.29,1.23,1.23,0,0,0,1.05.63,16.62,16.62,0,0,0,3.29-.45l-.34,3.35c-.16,1.61-.29,2.9-.37,3.86s-.12,1.66-.12,2.09l0,.65a5.15,5.15,0,0,0,.05.6,1.28,1.28,0,0,0,.16.54.34.34,0,0,0,.28.18,1.16,1.16,0,0,0,.79-.46,3.66,3.66,0,0,0,.68-1,22.08,22.08,0,0,0,1-4.33q.49-3.1.78-6.15a24.69,24.69,0,0,1,4.62-.84Z" transform="translate(-5.4 -3.76)"/></g></svg>',FONT_COLOR:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.74 14.61"><g><path d="M18.5,15.57,14.28,4.32h-3.4L6.65,15.57h3l.8-2.26h4.23l.8,2.26h3ZM14,11.07H11.14L12.54,7,13.25,9c.41,1.18.64,1.86.7,2ZM4.41,16.69v2.24H20.15V16.69H4.41Z" transform="translate(-4.41 -4.32)"/></g></svg>',HIGHLIGHT_COLOR:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.66 15.74"><g><path d="M12.32,9.31,13.38,13H11.21l.52-1.83q.46-1.61.54-1.83ZM4.44,3.76H20.1V19.5H4.44V3.76ZM14.71,17.32h2.63L13.7,6H10.89L7.26,17.32H9.89l.63-2.24h3.55l.32,1.12c.18.65.29,1,.32,1.12Z" transform="translate(-4.44 -3.76)"/></g></svg>',TABLE:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.74 15.74"><g><path d="M4.41,8.05V3.76H8.7V8.05H4.41Zm5.71,0V3.76h4.3V8.05h-4.3Zm5.74-4.29h4.29V8.05H15.86V3.76Zm-11.45,10V9.48H8.7v4.3H4.41Zm5.71,0V9.48h4.3v4.3h-4.3Zm5.74,0V9.48h4.29v4.3H15.86ZM4.41,19.5V15.21H8.7V19.5H4.41Zm5.71,0V15.21h4.3V19.5h-4.3Zm5.74,0V15.21h4.29V19.5H15.86Z" transform="translate(-4.41 -3.76)"/></g></svg>',HORIZONTAL_RULE:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.74 2.24"><g><path d="M20.15,12.75V10.51H4.41v2.24H20.15Z" transform="translate(-4.41 -10.51)"/></g></svg>',SHOW_BLOCKS:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.66 15.67"><g><path d="M19.72,5.58a1.64,1.64,0,0,0-1.64-1.64H6.23a1.62,1.62,0,0,0-1.16.48,1.63,1.63,0,0,0-.48,1.16V9.63a1.6,1.6,0,0,0,.48,1.16,1.62,1.62,0,0,0,1.16.47H18.09a1.67,1.67,0,0,0,1.16-.47,1.62,1.62,0,0,0,.48-1.16V5.58Zm-.94,4.05a.68.68,0,0,1-.7.7H6.23a.66.66,0,0,1-.48-.2.74.74,0,0,1-.21-.5V5.58a.66.66,0,0,1,.2-.48.71.71,0,0,1,.48-.21H18.08a.74.74,0,0,1,.5.21.66.66,0,0,1,.2.48ZM6.48,7.72a.21.21,0,0,0,.17-.07.22.22,0,0,0,.07-.17V7.06a1.27,1.27,0,0,1,.11-.52.37.37,0,0,1,.36-.23H8.77A.25.25,0,0,0,9,6.17a.19.19,0,0,0,0-.23.27.27,0,0,0-.2-.12H7.19a.88.88,0,0,0-.72.39,1.51,1.51,0,0,0-.23.85v.42a.24.24,0,0,0,.24.24Zm-.19.81a.21.21,0,0,0,.17-.07.26.26,0,0,0,.07-.17.24.24,0,0,0-.24-.24.2.2,0,0,0-.16.09.2.2,0,0,0-.07.16.22.22,0,0,0,.07.17.23.23,0,0,0,.16.06Zm8.46,5.1a1.63,1.63,0,0,0-.47-1.16A1.61,1.61,0,0,0,13.12,12H6.23a1.6,1.6,0,0,0-1.16.46,1.62,1.62,0,0,0-.48,1.16v4.05a1.64,1.64,0,0,0,1.64,1.64h6.89a1.6,1.6,0,0,0,1.16-.48,1.62,1.62,0,0,0,.47-1.16Zm-.94,4a.7.7,0,0,1-.2.49.65.65,0,0,1-.5.2H6.23a.66.66,0,0,1-.48-.2.75.75,0,0,1-.21-.49v-4a.74.74,0,0,1,.21-.5.66.66,0,0,1,.48-.2h6.89a.68.68,0,0,1,.7.7v4Zm6.15,0v-4a1.6,1.6,0,0,0-.48-1.16A1.67,1.67,0,0,0,18.32,12H17.1a1.63,1.63,0,0,0-1.16.47,1.61,1.61,0,0,0-.47,1.16v4a1.67,1.67,0,0,0,.47,1.16,1.62,1.62,0,0,0,1.16.48h1.22A1.64,1.64,0,0,0,20,17.68Zm-.94-4v4a.75.75,0,0,1-.21.49.62.62,0,0,1-.48.2H17.11a.69.69,0,0,1-.5-.2.7.7,0,0,1-.2-.49v-4a.68.68,0,0,1,.7-.7h1.22a.66.66,0,0,1,.48.2.72.72,0,0,1,.21.5Z" transform="translate(-4.44 -3.79)"/></g></svg>',IMAGE:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.75 15.77"><g><path d="M8.77,8.72a.88.88,0,0,1-.61-.27.82.82,0,0,1-.25-.61.89.89,0,0,1,.25-.62A.82.82,0,0,1,8.77,7a.81.81,0,0,1,.61.25.83.83,0,0,1,.27.62.81.81,0,0,1-.25.61.91.91,0,0,1-.63.27Zm9.62-5a1.74,1.74,0,0,1,1.76,1.76V17.76a1.74,1.74,0,0,1-1.76,1.76H6.16A1.74,1.74,0,0,1,4.4,17.76V5.51A1.74,1.74,0,0,1,6.16,3.75H18.39Zm0,1.75H6.16v8L8.53,11.8a.94.94,0,0,1,.54-.17.86.86,0,0,1,.54.2L11.09,13l3.64-4.55a.78.78,0,0,1,.34-.25.85.85,0,0,1,.42-.07.89.89,0,0,1,.39.12.78.78,0,0,1,.28.29l2.24,3.67V5.51Zm0,12.24V15.6L15.3,10.53,11.89,14.8a.89.89,0,0,1-.59.32.82.82,0,0,1-.64-.18L9,13.62,6.16,15.74v2Z" transform="translate(-4.4 -3.75)"/></g></svg>',VIDEO:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.74 14.55"><g><path d="M20.15,10.26V18.9l-3.94-1.57v1.2H4.41V10.66H16.22v1.23l2-.81,2-.82ZM14.64,17h0V12.54h0v-.31H6V17h8.67Zm3.94-.37v-4l-2.37,1v2l1.18.48,1.19.48ZM7.94,9.86A2.77,2.77,0,0,1,5.19,7.11a2.76,2.76,0,0,1,5.51,0A2.78,2.78,0,0,1,7.94,9.86Zm0-3.93a1.21,1.21,0,0,0-.83.35,1.15,1.15,0,0,0-.34.84A1.09,1.09,0,0,0,7.11,8,1.15,1.15,0,0,0,8,8.28,1.13,1.13,0,0,0,9.11,7.12,1.16,1.16,0,0,0,7.94,5.93Zm5.9,3.93a2.34,2.34,0,0,1-1.67-.68,2.3,2.3,0,0,1-.68-1.67,2.35,2.35,0,0,1,4-1.67,2.37,2.37,0,0,1,0,3.34,2.33,2.33,0,0,1-1.68.68Zm0-3.14a.75.75,0,1,0,.55.22.73.73,0,0,0-.55-.22Z" transform="translate(-4.41 -4.35)"/></g></svg>',LINK:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.74 15.72"><g><path d="M13.05,13.63a.24.24,0,0,1,.15.22L13.42,16a.19.19,0,0,1-.08.18l-2.12,2.14a4.08,4.08,0,0,1-1.29.85A4,4,0,0,1,4.71,17a3.92,3.92,0,0,1-.3-1.52A4,4,0,0,1,4.71,14a3.91,3.91,0,0,1,.87-1.3L7.7,10.56a.25.25,0,0,1,.2-.06l2.17.22a.21.21,0,0,1,.19.15.24.24,0,0,1,0,.25L7.12,14.23a1.81,1.81,0,0,0,0,2.58,1.78,1.78,0,0,0,1.29.52,1.74,1.74,0,0,0,1.28-.52L12.8,13.7a.24.24,0,0,1,.25-.07ZM19,4.92a4,4,0,0,1,0,5.66L16.86,12.7a.25.25,0,0,1-.17.08l-2.2-.23a.21.21,0,0,1-.19-.15.22.22,0,0,1,0-.25L17.44,9a1.81,1.81,0,0,0,0-2.58,1.78,1.78,0,0,0-1.29-.52,1.74,1.74,0,0,0-1.28.52L11.76,9.57a.21.21,0,0,1-.25,0,.24.24,0,0,1-.16-.21l-.22-2.17a.19.19,0,0,1,.08-.18l2.12-2.14a4.08,4.08,0,0,1,1.29-.85,4.05,4.05,0,0,1,3.06,0,3.85,3.85,0,0,1,1.3.85ZM5.84,9.82a.25.25,0,0,1-.18-.08.19.19,0,0,1-.07-.19l.11-.77a.2.2,0,0,1,.11-.17.24.24,0,0,1,.2,0l2.5.72a.25.25,0,0,1,.15.27.22.22,0,0,1-.23.21l-2.59,0Zm4.12-2-.73-2.5a.27.27,0,0,1,0-.2A.21.21,0,0,1,9.41,5L10.19,5a.25.25,0,0,1,.19,0,.23.23,0,0,1,.08.18l-.05,2.61a.2.2,0,0,1-.19.23h0A.22.22,0,0,1,10,7.85Zm8.76,5.58a.25.25,0,0,1,.18.08.23.23,0,0,1,.06.2l-.11.77a.25.25,0,0,1-.11.17.21.21,0,0,1-.12,0l-.08,0L16,14a.25.25,0,0,1-.15-.27.22.22,0,0,1,.22-.21l1.29,0,1.33,0Zm-4.12,2,.74,2.51a.28.28,0,0,1,0,.2.23.23,0,0,1-.18.11l-.8.11a.23.23,0,0,1-.17-.07.25.25,0,0,1-.08-.18l0-2.61a.22.22,0,0,1,.22-.22.21.21,0,0,1,.26.15Z" transform="translate(-4.41 -3.77)"/></g></svg>',UNLINK:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.74 15.72"><g><path d="M19,18.32a4,4,0,0,0,0-5.68L15.85,9.5l-1.17,1.55L17.57,14a2,2,0,0,1,.61,1.47,2.08,2.08,0,0,1-2.09,2.09,2,2,0,0,1-1.47-.61l-.38-.37-1.74,1,.8.78a4,4,0,0,0,5.68,0ZM8,9.77a2,2,0,0,1-1.27-1,1.89,1.89,0,0,1-.21-1.57A2.1,2.1,0,0,1,7.45,6,2,2,0,0,1,9,5.76L12.27,7.2l.49-2L9.48,3.9a4,4,0,0,0-3.06.41A3.82,3.82,0,0,0,4.56,6.73a3.8,3.8,0,0,0,.4,3A3.78,3.78,0,0,0,7.39,11.6l5.38,2,.49-2-2.64-.94L8,9.77Z" transform="translate(-4.41 -3.76)"/></g></svg>',REMOVE_FORMAT:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.74 13.76"><g><path d="M13.69,17.2h6.46v1.31H8.56L4.41,14.37,14,4.75l6.06,6.06L16.89,14l-3.2,3.19Zm-4.61,0h2.77L14.09,15,9.88,10.75,6.25,14.38l1.41,1.41c.84.82,1.31,1.29,1.42,1.41Z" transform="translate(-4.41 -4.75)"/></g></svg>',EDIT:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.74 15.73"><g><path d="M7.51,5.68h6l1.52-1.57H6.94a2.4,2.4,0,0,0-1.79.82A2.8,2.8,0,0,0,4.41,6.8V17a2.55,2.55,0,0,0,.75,1.8A2.48,2.48,0,0,0,7,19.5H17.22a2.57,2.57,0,0,0,1.83-.74,2.52,2.52,0,0,0,.77-1.8V8.83l-1.58,1.54v6a1.54,1.54,0,0,1-1.53,1.53H7.51A1.54,1.54,0,0,1,6,16.41V7.21A1.52,1.52,0,0,1,7.51,5.68Zm5.63,7.47h0L10.7,10.74l-1,3.38,1.71-.48,1.7-.49Zm.34-.34h0l5.36-5.32L16.4,5.08,11,10.4l1.23,1.21,1.21,1.2ZM19.93,6.4a.82.82,0,0,0,.22-.48A.54.54,0,0,0,20,5.47L18.45,4A.67.67,0,0,0,18,3.77a.7.7,0,0,0-.48.21l-.74.72,2.44,2.43.37-.37.35-.36Z" transform="translate(-4.41 -3.77)"/></g></svg>',DELETE:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.73 15.74"><g><path d="M19.16,6.71a.94.94,0,0,0,.69-.28.91.91,0,0,0,.29-.68A1,1,0,0,0,19.85,5a.93.93,0,0,0-.69-.3H14.24A.94.94,0,0,0,14,4.06a.92.92,0,0,0-.7-.3h-2a1,1,0,0,0-.7.3.93.93,0,0,0-.28.68H5.39A.92.92,0,0,0,4.7,5a1,1,0,0,0-.29.71.91.91,0,0,0,.29.68,1,1,0,0,0,.69.28H19.16Zm-12.79,1a1,1,0,0,0-.7.3.94.94,0,0,0-.28.69v8.85A1.88,1.88,0,0,0,6,18.93a1.9,1.9,0,0,0,1.39.57H17.2a1.87,1.87,0,0,0,1.39-.58,1.91,1.91,0,0,0,.58-1.39V8.68A1,1,0,0,0,18.88,8a.89.89,0,0,0-.7-.29,1,1,0,0,0-.69.29.92.92,0,0,0-.29.68v7.87a1,1,0,0,1-1,1H8.34a.94.94,0,0,1-.69-.28,1,1,0,0,1-.29-.71V8.68a1,1,0,0,0-1-1Z" transform="translate(-4.41 -3.76)"/></g></svg>',REVERT:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.76 14.69"><g><path d="M18.26,15V12.3l1.89-2V15a2.58,2.58,0,0,1-.24,1c-.2.58-.75.92-1.65,1H7.56v2L4.41,15.63,7.56,13v2h10.7ZM6.3,8.28V11L4.41,13V8.28a2.58,2.58,0,0,1,.24-1c.2-.58.75-.92,1.65-1H17v-2l3.15,3.34L17,10.3v-2H6.3Z" transform="translate(-4.4 -4.28)"/></g></svg>',AUTO_SIZE:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.74 15.74"><g><path d="M6.71,17.19,6.89,16l1.21-.15A6,6,0,0,1,6.81,13.9a5.78,5.78,0,0,1-.45-2.27A6,6,0,0,1,8.1,7.45a5.83,5.83,0,0,1,4.17-1.73l1-1-1-1A7.89,7.89,0,0,0,5,14.64a7.73,7.73,0,0,0,1.71,2.55Zm5.57,2.31h0A7.86,7.86,0,0,0,17.85,6.07L17.67,7.3l-1.21.15a5.9,5.9,0,0,1,1.29,1.92,5.81,5.81,0,0,1,.45,2.26,5.91,5.91,0,0,1-5.9,5.9l-1,1,.49.49.47.5Z" transform="translate(-4.41 -3.76)"/></g></svg>',PLUS:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" width="16" height="16" ><path d="M11 11V5H13V11H19V13H13V19H11V13H5V11H11Z"></path></svg>',ARROW_DOWN:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.73 8.67"><g><path d="M18.79,7.52a.8.8,0,0,1,.56-.23.82.82,0,0,1,.79.79.8.8,0,0,1-.23.56l-7.07,7.07a.79.79,0,0,1-.57.25.77.77,0,0,1-.57-.25h0L4.64,8.65a.8.8,0,0,1-.23-.57.82.82,0,0,1,.79-.79.8.8,0,0,1,.56.23L12.28,14l3.26-3.26,3.25-3.26Z" transform="translate(-4.41 -7.29)"/></g></svg>',ARROW_LEFT:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="currentColor"><path d="M7.82843 10.9999H20V12.9999H7.82843L13.1924 18.3638L11.7782 19.778L4 11.9999L11.7782 4.22168L13.1924 5.63589L7.82843 10.9999Z"></path></svg>',ARROW_UP:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M13.0001 22.0003L11.0002 22.0004L11.0002 5.82845L7.05044 9.77817L5.63623 8.36396L12.0002 2L18.3642 8.36396L16.9499 9.77817L13.0002 5.8284L13.0001 22.0003Z"></path></svg>',ARROW_DOWN_LONG:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M13.0001 1.99974L11.0002 1.9996L11.0002 18.1715L7.05044 14.2218L5.63623 15.636L12.0002 22L18.3642 15.636L16.9499 14.2218L13.0002 18.1716L13.0001 1.99974Z"></path></svg>',ARROW_DROP_DOWN_FILL:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" ><path d="M12 14L8 10H16L12 14Z"></path></svg>',ARROW_DROP_RIGHT:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M16 12L10 18V6L16 12Z"></path></svg>',GIPHY_SVG:'<svg xmlns="http://www.w3.org/2000/svg" width="12px" viewBox="0 0 28 35"><g fill-rule="evenodd" clip-rule="evenodd"><path fill="#00ff99" d="M0 3h4v29H0z"></path><path fill="#9933ff" d="M24 11h4v21h-4z"></path><path fill="#00ccff" d="M0 31h28v4H0z"></path><path fill="#fff35c" d="M0 0h16v4H0z"></path><path fill="#ff6666" d="M24 8V4h-4V0h-4v12h12V8"></path><path class="shadow" d="M24 16v-4h4M16 0v4h-4"></path></g></svg>',PEXELS:'<svg viewBox="0 0 17 22" fill="none" xmlns="http://www.w3.org/2000/svg"><g> <path fill-rule="evenodd" clip-rule="evenodd" d="M12 5C12.7111 5 13.3875 5.14845 14 5.41604C15.7659 6.1876 17 7.94968 17 10C17 12.0503 15.7659 13.8124 14 14.584C13.3875 14.8516 12.7111 15 12 15V19H6V5H12ZM8 7V17H10V13H12L12.0032 12.9988C13.6427 13.0303 15.0746 11.6934 15.0443 9.95469L15.0375 9.56529C15.0121 8.10183 13.7882 6.94549 12.3257 7.00299L12.0203 7.00762L12 7H8Z" fill="#07a081"></path> </g></svg>',EMOJI:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M10.5199 19.8634C10.5955 18.6615 10.8833 17.5172 11.3463 16.4676C9.81124 16.3252 8.41864 15.6867 7.33309 14.7151L8.66691 13.2248C9.55217 14.0172 10.7188 14.4978 12 14.4978C12.1763 14.4978 12.3501 14.4887 12.5211 14.471C14.227 12.2169 16.8661 10.7083 19.8634 10.5199C19.1692 6.80877 15.9126 4 12 4C7.58172 4 4 7.58172 4 12C4 15.9126 6.80877 19.1692 10.5199 19.8634ZM19.0233 12.636C15.7891 13.2396 13.2396 15.7891 12.636 19.0233L19.0233 12.636ZM22 12C22 12.1677 21.9959 12.3344 21.9877 12.5L12.5 21.9877C12.3344 21.9959 12.1677 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12ZM10 10C10 10.8284 9.32843 11.5 8.5 11.5C7.67157 11.5 7 10.8284 7 10C7 9.17157 7.67157 8.5 8.5 8.5C9.32843 8.5 10 9.17157 10 10ZM17 10C17 10.8284 16.3284 11.5 15.5 11.5C14.6716 11.5 14 10.8284 14 10C14 9.17157 14.6716 8.5 15.5 8.5C16.3284 8.5 17 9.17157 17 10Z"></path></svg>',MENTION:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20C13.6418 20 15.1681 19.5054 16.4381 18.6571L17.5476 20.3214C15.9602 21.3818 14.0523 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12V13.5C22 15.433 20.433 17 18.5 17C17.2958 17 16.2336 16.3918 15.6038 15.4659C14.6942 16.4115 13.4158 17 12 17C9.23858 17 7 14.7614 7 12C7 9.23858 9.23858 7 12 7C13.1258 7 14.1647 7.37209 15.0005 8H17V13.5C17 14.3284 17.6716 15 18.5 15C19.3284 15 20 14.3284 20 13.5V12ZM12 9C10.3431 9 9 10.3431 9 12C9 13.6569 10.3431 15 12 15C13.6569 15 15 13.6569 15 12C15 10.3431 13.6569 9 12 9Z"></path></svg>',INSERT_ROW_BELOW:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.8 15.8"><g><path d="M15.7,1.3c-0.1-0.1-0.1-0.2-0.2-0.2L15.3,1H0.4L0.3,1.1c0,0-0.1,0.1-0.1,0.1c0,0-0.1,0.1-0.1,0.1L0,1.4v7.7l0.1,0.1c0,0.1,0.1,0.1,0.2,0.2l0.1,0.1h2.3V9.3l0.1-0.5L3,8.5l0.1-0.2c-0.1,0-0.2,0-0.3,0H1.2v-6h13.3v6h-1.6c-0.1,0-0.2,0-0.3,0l0.1,0.2l0.2,0.4C12.9,9,13,9.2,13,9.3v0.1h2.3l0.2-0.1c0.1,0,0.1-0.1,0.2-0.2l0.1-0.1V1.4L15.7,1.3z"/><path d="M10.5,7.5C9.9,7.1,9.3,6.8,8.6,6.7c-0.2,0-0.5-0.1-0.7,0c-0.2,0-0.5,0-0.7,0C6.6,6.7,6.1,6.9,5.6,7.3C5.2,7.6,4.7,8,4.4,8.4C4.3,8.6,4.2,8.8,4.2,8.9C4.1,9.1,4,9.3,3.9,9.4C3.9,9.6,3.8,9.7,3.8,9.9c0,0.2-0.1,0.3-0.1,0.5v-0.1c-0.1,0.8,0.1,1.6,0.5,2.4c0.4,0.7,1,1.3,1.7,1.7c0.3,0.2,0.6,0.3,0.9,0.3c0.3,0.1,0.7,0.1,1,0.1c0.3,0,0.7,0,1-0.1c0.3-0.1,0.6-0.2,0.9-0.3c0.5-0.3,0.9-0.6,1.3-1c0.3-0.4,0.6-0.8,0.8-1.3c0.1-0.4,0.2-0.9,0.2-1.4c0-0.5-0.1-1-0.3-1.4C11.5,8.6,11.1,8,10.5,7.5z M10.1,11.3H8.5v1.6H8H7.9H7.3v0v-0.1v-1.4H5.7v-0.4v-0.2v-0.6h0h1.5V8.5h1.2v1.6h1.6V11.3z"/></g></svg>',INSERT_ROW_ABOVE:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.8 15.8"><g><path d="M0.1,14.5c0.1,0.1,0.1,0.2,0.2,0.2l0.1,0.1h14.9l0.1-0.1c0,0,0.1-0.1,0.1-0.1c0,0,0.1-0.1,0.1-0.1l0.1-0.1V6.7l-0.1-0.1c0-0.1-0.1-0.1-0.2-0.2l-0.1-0.1h-2.3v0.1l-0.1,0.5l-0.2,0.4l-0.1,0.2c0.1,0,0.2,0,0.3,0h1.6v6H1.3v-6h1.6c0.1,0,0.2,0,0.3,0L3.1,7.3L2.9,6.9C2.8,6.8,2.8,6.6,2.7,6.5V6.3H0.4L0.3,6.4c-0.1,0-0.1,0.1-0.2,0.2L0,6.7v7.7L0.1,14.5z"/><path d="M5.3,8.3c0.6,0.5,1.2,0.8,1.9,0.9c0.2,0,0.5,0.1,0.7,0c0.2,0,0.5,0,0.7,0c0.6-0.1,1.1-0.3,1.6-0.6c0.5-0.3,0.9-0.7,1.2-1.2c0.1-0.2,0.2-0.3,0.3-0.5c0.1-0.2,0.2-0.4,0.2-0.5c0.1-0.1,0.1-0.3,0.1-0.4C12,5.8,12,5.6,12,5.4v0.1c0.1-0.8-0.1-1.6-0.5-2.4c-0.4-0.7-1-1.3-1.7-1.7C9.5,1.3,9.2,1.2,8.9,1.1C8.5,1,8.2,1,7.9,1c-0.3,0-0.7,0-1,0.1C6.6,1.2,6.3,1.3,6,1.4C5.5,1.7,5.1,2,4.7,2.4C4.4,2.8,4.1,3.3,3.9,3.8C3.8,4.2,3.7,4.7,3.7,5.2c0,0.5,0.1,1,0.3,1.4C4.3,7.2,4.7,7.8,5.3,8.3z M5.7,4.5h1.6V2.9h0.5h0.1h0.6v0v0.1v1.4H10v0.4v0.2v0.6h0H8.5v1.6H7.3V5.7H5.7V4.5z"/></g></svg>',INSERT_COLUMN_LEFT:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.8 15.8"><g><path d="M14.5,15.7c0.1-0.1,0.2-0.1,0.2-0.2l0.1-0.1V0.4l-0.1-0.1c0,0-0.1-0.1-0.1-0.1c0,0-0.1-0.1-0.1-0.1L14.4,0H6.7L6.6,0.1c-0.1,0-0.1,0.1-0.2,0.2L6.3,0.4v2.3h0.1l0.5,0.1L7.3,3l0.2,0.1c0-0.1,0-0.2,0-0.3V1.2h6v13.3h-6v-1.6c0-0.1,0-0.2,0-0.3l-0.2,0.1l-0.4,0.2C6.7,12.9,6.6,13,6.4,13H6.3v2.3l0.1,0.2c0,0.1,0.1,0.1,0.2,0.2l0.1,0.1h7.7L14.5,15.7z"/><path d="M8.3,10.5C8.7,10,9,9.3,9.1,8.6c0-0.2,0.1-0.5,0-0.7c0-0.2,0-0.5,0-0.7C9,6.7,8.8,6.1,8.5,5.7C8.2,5.2,7.8,4.8,7.3,4.5C7.2,4.4,7,4.3,6.9,4.2C6.7,4.1,6.5,4,6.4,4C6.2,3.9,6.1,3.9,5.9,3.8c-0.2,0-0.3-0.1-0.5-0.1h0.1C4.7,3.7,3.8,3.9,3.1,4.3C2.4,4.7,1.8,5.3,1.4,6C1.3,6.3,1.2,6.6,1.1,6.9C1,7.2,1,7.6,1,7.9c0,0.3,0,0.7,0.1,1c0.1,0.3,0.2,0.6,0.3,0.9c0.3,0.5,0.6,0.9,1,1.3c0.4,0.3,0.8,0.6,1.3,0.8C4.2,12,4.7,12.1,5.1,12c0.5,0,1-0.1,1.4-0.3C7.2,11.5,7.8,11.1,8.3,10.5zM4.5,10.1V8.5H2.9V8V7.9V7.3h0H3h1.4V5.7h0.4h0.2h0.6v0v1.5h1.6v1.2H5.7v1.6H4.5z"/></g></svg>',INSERT_COLUMN_RIGHT:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.8 15.8"><g><path d="M1.3,0.1C1.2,0.2,1.1,0.2,1.1,0.3L1,0.4v14.9l0.1,0.1c0,0,0.1,0.1,0.1,0.1c0,0,0.1,0.1,0.1,0.1l0.1,0.1h7.7l0.1-0.1c0.1,0,0.1-0.1,0.2-0.2l0.1-0.1v-2.3H9.3l-0.5-0.1l-0.4-0.2l-0.2-0.1c0,0.1,0,0.2,0,0.3v1.6h-6V1.3h6v1.6c0,0.1,0,0.2,0,0.3l0.2-0.1l0.4-0.2C9,2.9,9.2,2.8,9.3,2.8h0.1V0.5L9.4,0.3c0-0.1-0.1-0.1-0.2-0.2L9.1,0H1.4L1.3,0.1z"/><path d="M7.5,5.3C7,5.8,6.7,6.5,6.6,7.2c0,0.2-0.1,0.5,0,0.7c0,0.2,0,0.5,0,0.7c0.1,0.6,0.3,1.1,0.6,1.6c0.3,0.5,0.7,0.9,1.2,1.2c0.2,0.1,0.3,0.2,0.5,0.3c0.2,0.1,0.4,0.2,0.5,0.2c0.1,0.1,0.3,0.1,0.4,0.1c0.2,0,0.3,0.1,0.5,0.1h-0.1c0.8,0.1,1.6-0.1,2.4-0.5c0.7-0.4,1.3-1,1.7-1.7c0.2-0.3,0.3-0.6,0.3-0.9c0.1-0.3,0.1-0.7,0.1-1c0-0.3,0-0.7-0.1-1c-0.1-0.3-0.2-0.6-0.3-0.9c-0.3-0.5-0.6-0.9-1-1.3C13,4.4,12.5,4.2,12,4c-0.4-0.1-0.9-0.2-1.4-0.2c-0.5,0-1,0.1-1.4,0.2C8.5,4.3,7.9,4.7,7.5,5.3z M11.3,5.7v1.6h1.6v0.5v0.1v0.6h0h-0.1h-1.4v1.6h-0.4h-0.2h-0.6v0V8.5H8.5V7.3h1.6V5.7H11.3z"/></g></svg>',DELETE_ROW:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.75 13.83"><g><path d="M4.7,18.46l.12.08H19.73l.12-.08a.58.58,0,0,0,.22-.22l.08-.12,0-7.69-.08-.11a.77.77,0,0,0-.18-.18l-.11-.08-2.31,0-.08.28-.1.29a1.58,1.58,0,0,1-.12.29l-.14.34s0,0,.18,0H18.9v6H5.64v-6H7.35c.14,0,.2,0,.18,0l-.14-.34a2.85,2.85,0,0,1-.12-.29l-.1-.29-.07-.27-2.31,0-.11.08a.77.77,0,0,0-.18.18l-.08.11,0,7.69.08.12a.47.47,0,0,0,.09.12l.13.09ZM12.11,13a4,4,0,0,0,1.46-.21,4.51,4.51,0,0,0,1.31-.71A4,4,0,0,0,16.26,10a4.32,4.32,0,0,0-.08-2.54,4.34,4.34,0,0,0-1-1.52,4.15,4.15,0,0,0-1.54-1,4.34,4.34,0,0,0-1.35-.22A4.07,4.07,0,0,0,11,4.93,3.94,3.94,0,0,0,9.24,6.07,3.92,3.92,0,0,0,8.15,8.88a3.91,3.91,0,0,0,.12.95A4.16,4.16,0,0,0,12.11,13Zm2.35-4.14v.58H10.09V8.27h4.37v.58Z" transform="translate(-4.4 -4.71)"/></g></svg>',DELETE_COLUMN:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 13.81 15.74"><g><path d="M5.66,19.42l.12.08,7.69,0,.11-.08a.77.77,0,0,0,.18-.18l.08-.11,0-2.32-.15,0-.45-.15-.42-.18-.17-.07a1,1,0,0,0,0,.27v1.63h-6V5h6V6.62a.9.9,0,0,0,0,.26l.17-.07.42-.17a3.91,3.91,0,0,1,.45-.15l.15,0,0-2.32L13.75,4a.77.77,0,0,0-.18-.18l-.11-.08H5.79l-.13.07a.63.63,0,0,0-.21.22l-.08.12V19.08l.08.12a.47.47,0,0,0,.09.12.35.35,0,0,0,.12.1Zm9-3.67a4.16,4.16,0,0,0,2.36-.51,4.08,4.08,0,0,0,1.67-1.72,4,4,0,0,0,.35-.91,3.79,3.79,0,0,0,.1-1,4.71,4.71,0,0,0-.11-1,5,5,0,0,0-.3-.87,4.25,4.25,0,0,0-1-1.25,4.49,4.49,0,0,0-1.34-.81A4.26,4.26,0,0,0,15,7.48a3.88,3.88,0,0,0-1.41.25A4.32,4.32,0,0,0,11.86,9,4,4,0,0,0,11,10.94a4.4,4.4,0,0,0-.05.68,4.5,4.5,0,0,0,.05.68,3.93,3.93,0,0,0,.61,1.57,4.22,4.22,0,0,0,1.18,1.2,4.59,4.59,0,0,0,.48.27c.2.1.37.17.5.22a2.44,2.44,0,0,0,.45.12,4.61,4.61,0,0,0,.5.07Zm2.54-4.12v.58H12.87V11h4.37v.59Z" transform="translate(-5.37 -3.76)"/></g></svg>',MERGE_CELLS_HORIZONTAL:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 3C20.5523 3 21 3.44772 21 4V20C21 20.5523 20.5523 21 20 21H4C3.44772 21 3 20.5523 3 20V4C3 3.44772 3.44772 3 4 3H20ZM11 5H5V10.999H7V9L10 12L7 15V13H5V19H11V17H13V19H19V13H17V15L14 12L17 9V10.999H19V5H13V7H11V5ZM13 13V15H11V13H13ZM13 9V11H11V9H13Z"></path></svg>',MERGE_CELLS_VERTICAL:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M21 20C21 20.5523 20.5523 21 20 21H4C3.44772 21 3 20.5523 3 20V4C3 3.44772 3.44772 3 4 3H20C20.5523 3 21 3.44772 21 4V20ZM19 11V5H13.001V7H15L12 10L9 7H11V5H5V11H7V13H5V19H11V17H9L12 14L15 17H13.001V19H19V13H17V11H19ZM11 13H9V11H11V13ZM15 13H13V11H15V13Z"></path></svg>',SPLIT_CELLS_HORIZONTAL:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 3C20.5523 3 21 3.44772 21 4V20C21 20.5523 20.5523 21 20 21H4C3.44772 21 3 20.5523 3 20V4C3 3.44772 3.44772 3 4 3H20ZM11 5H5V19H11V15H13V19H19V5H13V9H11V5ZM15 9L18 12L15 15V13H9V15L6 12L9 9V11H15V9Z"></path></svg>',SPLIT_CELLS_VERTICAL:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 3C20.5523 3 21 3.44772 21 4V20C21 20.5523 20.5523 21 20 21H4C3.44772 21 3 20.5523 3 20V4C3 3.44772 3.44772 3 4 3H20ZM19 5H5V10.999L9 11V13H5V19H19V13H15V11L19 10.999V5ZM12 6L15 9H13V15H15L12 18L9 15H11V9H9L12 6Z"></path></svg>',CELL_WIDTH:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M4 12H20M4 12L8 8M4 12L8 16M20 12L16 8M20 12L16 16" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>',CELL_HEIGHT:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 4V20M12 4L8 8M12 4L16 8M12 20L8 16M12 20L16 16" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>',CELL_PADDING:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><rect x="3" y="3" width="18" height="18" rx="2" stroke="currentColor" stroke-width="2"/><path d="M7 7H17V17H7V7Z" stroke="currentColor" stroke-width="2" stroke-dasharray="2 2"/></svg>',CELL_BORDER_BOTTOM:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M13,19 L19.5,19 C19.7761424,19 20,19.2238576 20,19.5 C20,19.7761424 19.7761424,20 19.5,20 L5.5,20 C5.22385763,20 5,19.7761424 5,19.5 C5,19.2238576 5.22385763,19 5.5,19 L12,19 L12,18.5 C12,18.2238576 12.2238576,18 12.5,18 C12.7761424,18 13,18.2238576 13,18.5 L13,19 Z M13,12 L13.5,12 C13.7761424,12 14,12.2238576 14,12.5 C14,12.7761424 13.7761424,13 13.5,13 L13,13 L13,13.5 C13,13.7761424 12.7761424,14 12.5,14 C12.2238576,14 12,13.7761424 12,13.5 L12,13 L11.5,13 C11.2238576,13 11,12.7761424 11,12.5 C11,12.2238576 11.2238576,12 11.5,12 L12,12 L12,11.5 C12,11.2238576 12.2238576,11 12.5,11 C12.7761424,11 13,11.2238576 13,11.5 L13,12 Z M15.5,13 C15.2238576,13 15,12.7761424 15,12.5 C15,12.2238576 15.2238576,12 15.5,12 L16.5,12 C16.7761424,12 17,12.2238576 17,12.5 C17,12.7761424 16.7761424,13 16.5,13 L15.5,13 Z M18.5,13 C18.2238576,13 18,12.7761424 18,12.5 C18,12.2238576 18.2238576,12 18.5,12 L19.5,12 C19.7761424,12 20,12.2238576 20,12.5 C20,12.7761424 19.7761424,13 19.5,13 L18.5,13 Z M5.5,13 C5.22385763,13 5,12.7761424 5,12.5 C5,12.2238576 5.22385763,12 5.5,12 L6.5,12 C6.77614237,12 7,12.2238576 7,12.5 C7,12.7761424 6.77614237,13 6.5,13 L5.5,13 Z M8.5,13 C8.22385763,13 8,12.7761424 8,12.5 C8,12.2238576 8.22385763,12 8.5,12 L9.5,12 C9.77614237,12 10,12.2238576 10,12.5 C10,12.7761424 9.77614237,13 9.5,13 L8.5,13 Z M12,5.5 C12,5.22385763 12.2238576,5 12.5,5 C12.7761424,5 13,5.22385763 13,5.5 L13,6.5 C13,6.77614237 12.7761424,7 12.5,7 C12.2238576,7 12,6.77614237 12,6.5 L12,5.5 Z M12,8.5 C12,8.22385763 12.2238576,8 12.5,8 C12.7761424,8 13,8.22385763 13,8.5 L13,9.5 C13,9.77614237 12.7761424,10 12.5,10 C12.2238576,10 12,9.77614237 12,9.5 L12,8.5 Z M12,15.5 C12,15.2238576 12.2238576,15 12.5,15 C12.7761424,15 13,15.2238576 13,15.5 L13,16.5 C13,16.7761424 12.7761424,17 12.5,17 C12.2238576,17 12,16.7761424 12,16.5 L12,15.5 Z M5.5,3 C5.77614237,3 6,3.22385763 6,3.5 C6,3.77614237 5.77614237,4 5.5,4 C4.67157288,4 4,4.67157288 4,5.5 C4,5.77614237 3.77614237,6 3.5,6 C3.22385763,6 3,5.77614237 3,5.5 C3,4.11928813 4.11928813,3 5.5,3 Z M16.5,4 C16.2238576,4 16,3.77614237 16,3.5 C16,3.22385763 16.2238576,3 16.5,3 L17.5,3 C17.7761424,3 18,3.22385763 18,3.5 C18,3.77614237 17.7761424,4 17.5,4 L16.5,4 Z M13.5,4 C13.2238576,4 13,3.77614237 13,3.5 C13,3.22385763 13.2238576,3 13.5,3 L14.5,3 C14.7761424,3 15,3.22385763 15,3.5 C15,3.77614237 14.7761424,4 14.5,4 L13.5,4 Z M10.5,4 C10.2238576,4 10,3.77614237 10,3.5 C10,3.22385763 10.2238576,3 10.5,3 L11.5,3 C11.7761424,3 12,3.22385763 12,3.5 C12,3.77614237 11.7761424,4 11.5,4 L10.5,4 Z M7.5,4 C7.22385763,4 7,3.77614237 7,3.5 C7,3.22385763 7.22385763,3 7.5,3 L8.5,3 C8.77614237,3 9,3.22385763 9,3.5 C9,3.77614237 8.77614237,4 8.5,4 L7.5,4 Z M19.5,4 C19.2238576,4 19,3.77614237 19,3.5 C19,3.22385763 19.2238576,3 19.5,3 C20.8807119,3 22,4.11928813 22,5.5 L22,5.56155281 C22,5.83769519 21.7761424,6.06155281 21.5,6.06155281 C21.2238576,6.06155281 21,5.83769519 21,5.56155281 L21,5.5 C21,4.67157288 20.3284271,4 19.5,4 Z M21,7.5 C21,7.22385763 21.2238576,7 21.5,7 C21.7761424,7 22,7.22385763 22,7.5 L22,8.5 C22,8.77614237 21.7761424,9 21.5,9 C21.2238576,9 21,8.77614237 21,8.5 L21,7.5 Z M21,10.5 C21,10.2238576 21.2238576,10 21.5,10 C21.7761424,10 22,10.2238576 22,10.5 L22,11.5 C22,11.7761424 21.7761424,12 21.5,12 C21.2238576,12 21,11.7761424 21,11.5 L21,10.5 Z M21,13.5 C21,13.2238576 21.2238576,13 21.5,13 C21.7761424,13 22,13.2238576 22,13.5 L22,14.5 C22,14.7761424 21.7761424,15 21.5,15 C21.2238576,15 21,14.7761424 21,14.5 L21,13.5 Z M21,16.5 C21,16.2238576 21.2238576,16 21.5,16 C21.7761424,16 22,16.2238576 22,16.5 L22,17.5 C22,17.7761424 21.7761424,18 21.5,18 C21.2238576,18 21,17.7761424 21,17.5 L21,16.5 Z M3,7.5 C3,7.22385763 3.22385763,7 3.5,7 C3.77614237,7 4,7.22385763 4,7.5 L4,8.5 C4,8.77614237 3.77614237,9 3.5,9 C3.22385763,9 3,8.77614237 3,8.5 L3,7.5 Z M3,10.5 C3,10.2238576 3.22385763,10 3.5,10 C3.77614237,10 4,10.2238576 4,10.5 L4,11.5 C4,11.7761424 3.77614237,12 3.5,12 C3.22385763,12 3,11.7761424 3,11.5 L3,10.5 Z M3,13.5 C3,13.2238576 3.22385763,13 3.5,13 C3.77614237,13 4,13.2238576 4,13.5 L4,14.5 C4,14.7761424 3.77614237,15 3.5,15 C3.22385763,15 3,14.7761424 3,14.5 L3,13.5 Z M3,16.5 C3,16.2238576 3.22385763,16 3.5,16 C3.77614237,16 4,16.2238576 4,16.5 L4,17.5 C4,17.7761424 3.77614237,18 3.5,18 C3.22385763,18 3,17.7761424 3,17.5 L3,16.5 Z M21,19.5 C21,19.2238576 21.2238576,19 21.5,19 C21.7761424,19 22,19.2238576 22,19.5 C22,20.8807119 20.8807119,22 19.5,22 L5.5,22 C4.11928813,22 3,20.8807119 3,19.5 C3,19.2238576 3.22385763,19 3.5,19 C3.77614237,19 4,19.2238576 4,19.5 C4,20.3284271 4.67157288,21 5.5,21 L19.5,21 C20.3284271,21 21,20.3284271 21,19.5 Z"/></svg>',CELL_BORDER_LEFT:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M13,13 L13,13.5 C13,13.7761424 12.7761424,14 12.5,14 C12.2238576,14 12,13.7761424 12,13.5 L12,13 L11.5,13 C11.2238576,13 11,12.7761424 11,12.5 C11,12.2238576 11.2238576,12 11.5,12 L12,12 L12,11.5 C12,11.2238576 12.2238576,11 12.5,11 C12.7761424,11 13,11.2238576 13,11.5 L13,12 L13.5,12 C13.7761424,12 14,12.2238576 14,12.5 C14,12.7761424 13.7761424,13 13.5,13 L13,13 L13,13 Z M6,12 L6.5,12 C6.77614237,12 7,12.2238576 7,12.5 C7,12.7761424 6.77614237,13 6.5,13 L6,13 L6,19.5 C6,19.7761424 5.77614237,20 5.5,20 C5.22385763,20 5,19.7761424 5,19.5 L5,5.5 C5,5.22385763 5.22385763,5 5.5,5 C5.77614237,5 6,5.22385763 6,5.5 L6,12 Z M22,5.5 C22,5.77614237 21.7761424,6 21.5,6 C21.2238576,6 21,5.77614237 21,5.5 C21,4.67157288 20.3284271,4 19.5,4 C19.2238576,4 19,3.77614237 19,3.5 C19,3.22385763 19.2238576,3 19.5,3 C20.8807119,3 22,4.11928813 22,5.5 Z M21,19.5 C21,19.2238576 21.2238576,19 21.5,19 C21.7761424,19 22,19.2238576 22,19.5 C22,20.8807119 20.8807119,22 19.5,22 L19.4384472,22 C19.1623048,22 18.9384472,21.7761424 18.9384472,21.5 C18.9384472,21.2238576 19.1623048,21 19.4384472,21 L19.5,21 C20.3284271,21 21,20.3284271 21,19.5 Z M5.5,21 C5.77614237,21 6,21.2238576 6,21.5 C6,21.7761424 5.77614237,22 5.5,22 C4.11928813,22 3,20.8807119 3,19.5 L3,5.5 C3,4.11928813 4.11928813,3 5.5,3 C5.77614237,3 6,3.22385763 6,3.5 C6,3.77614237 5.77614237,4 5.5,4 C4.67157288,4 4,4.67157288 4,5.5 L4,19.5 C4,20.3284271 4.67157288,21 5.5,21 Z M7.5,22 C7.22385763,22 7,21.7761424 7,21.5 C7,21.2238576 7.22385763,21 7.5,21 L8.5,21 C8.77614237,21 9,21.2238576 9,21.5 C9,21.7761424 8.77614237,22 8.5,22 L7.5,22 Z M10.5,22 C10.2238576,22 10,21.7761424 10,21.5 C10,21.2238576 10.2238576,21 10.5,21 L11.5,21 C11.7761424,21 12,21.2238576 12,21.5 C12,21.7761424 11.7761424,22 11.5,22 L10.5,22 Z M13.5,22 C13.2238576,22 13,21.7761424 13,21.5 C13,21.2238576 13.2238576,21 13.5,21 L14.5,21 C14.7761424,21 15,21.2238576 15,21.5 C15,21.7761424 14.7761424,22 14.5,22 L13.5,22 Z M16.5,22 C16.2238576,22 16,21.7761424 16,21.5 C16,21.2238576 16.2238576,21 16.5,21 L17.5,21 C17.7761424,21 18,21.2238576 18,21.5 C18,21.7761424 17.7761424,22 17.5,22 L16.5,22 Z M7.5,4 C7.22385763,4 7,3.77614237 7,3.5 C7,3.22385763 7.22385763,3 7.5,3 L8.5,3 C8.77614237,3 9,3.22385763 9,3.5 C9,3.77614237 8.77614237,4 8.5,4 L7.5,4 Z M10.5,4 C10.2238576,4 10,3.77614237 10,3.5 C10,3.22385763 10.2238576,3 10.5,3 L11.5,3 C11.7761424,3 12,3.22385763 12,3.5 C12,3.77614237 11.7761424,4 11.5,4 L10.5,4 Z M13.5,4 C13.2238576,4 13,3.77614237 13,3.5 C13,3.22385763 13.2238576,3 13.5,3 L14.5,3 C14.7761424,3 15,3.22385763 15,3.5 C15,3.77614237 14.7761424,4 14.5,4 L13.5,4 Z M16.5,4 C16.2238576,4 16,3.77614237 16,3.5 C16,3.22385763 16.2238576,3 16.5,3 L17.5,3 C17.7761424,3 18,3.22385763 18,3.5 C18,3.77614237 17.7761424,4 17.5,4 L16.5,4 Z M12,5.5 C12,5.22385763 12.2238576,5 12.5,5 C12.7761424,5 13,5.22385763 13,5.5 L13,6.5 C13,6.77614237 12.7761424,7 12.5,7 C12.2238576,7 12,6.77614237 12,6.5 L12,5.5 Z M21,7.5 C21,7.22385763 21.2238576,7 21.5,7 C21.7761424,7 22,7.22385763 22,7.5 L22,8.5 C22,8.77614237 21.7761424,9 21.5,9 C21.2238576,9 21,8.77614237 21,8.5 L21,7.5 Z M21,10.5 C21,10.2238576 21.2238576,10 21.5,10 C21.7761424,10 22,10.2238576 22,10.5 L22,11.5 C22,11.7761424 21.7761424,12 21.5,12 C21.2238576,12 21,11.7761424 21,11.5 L21,10.5 Z M21,13.5 C21,13.2238576 21.2238576,13 21.5,13 C21.7761424,13 22,13.2238576 22,13.5 L22,14.5 C22,14.7761424 21.7761424,15 21.5,15 C21.2238576,15 21,14.7761424 21,14.5 L21,13.5 Z M21,16.5 C21,16.2238576 21.2238576,16 21.5,16 C21.7761424,16 22,16.2238576 22,16.5 L22,17.5 C22,17.7761424 21.7761424,18 21.5,18 C21.2238576,18 21,17.7761424 21,17.5 L21,16.5 Z M12,8.5 C12,8.22385763 12.2238576,8 12.5,8 C12.7761424,8 13,8.22385763 13,8.5 L13,9.5 C13,9.77614237 12.7761424,10 12.5,10 C12.2238576,10 12,9.77614237 12,9.5 L12,8.5 Z M12,15.5 C12,15.2238576 12.2238576,15 12.5,15 C12.7761424,15 13,15.2238576 13,15.5 L13,16.5 C13,16.7761424 12.7761424,17 12.5,17 C12.2238576,17 12,16.7761424 12,16.5 L12,15.5 Z M12,18.5 C12,18.2238576 12.2238576,18 12.5,18 C12.7761424,18 13,18.2238576 13,18.5 L13,19.5 C13,19.7761424 12.7761424,20 12.5,20 C12.2238576,20 12,19.7761424 12,19.5 L12,18.5 Z M8.5,13 C8.22385763,13 8,12.7761424 8,12.5 C8,12.2238576 8.22385763,12 8.5,12 L9.5,12 C9.77614237,12 10,12.2238576 10,12.5 C10,12.7761424 9.77614237,13 9.5,13 L8.5,13 Z M15.5,13 C15.2238576,13 15,12.7761424 15,12.5 C15,12.2238576 15.2238576,12 15.5,12 L16.5,12 C16.7761424,12 17,12.2238576 17,12.5 C17,12.7761424 16.7761424,13 16.5,13 L15.5,13 Z M18.5,13 C18.2238576,13 18,12.7761424 18,12.5 C18,12.2238576 18.2238576,12 18.5,12 L19.5,12 C19.7761424,12 20,12.2238576 20,12.5 C20,12.7761424 19.7761424,13 19.5,13 L18.5,13 Z"/></svg>',CELL_BORDER_FULL:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M13,12 L13.5,12 C13.7761424,12 14,12.2238576 14,12.5 C14,12.7761424 13.7761424,13 13.5,13 L13,13 L13,13.5 C13,13.7761424 12.7761424,14 12.5,14 C12.2238576,14 12,13.7761424 12,13.5 L12,13 L11.5,13 C11.2238576,13 11,12.7761424 11,12.5 C11,12.2238576 11.2238576,12 11.5,12 L12,12 L12,11.5 C12,11.2238576 12.2238576,11 12.5,11 C12.7761424,11 13,11.2238576 13,11.5 L13,12 Z M3,5.5 C3,4.11928813 4.11928813,3 5.5,3 L19.5000013,3 C20.8807132,3 22.0000013,4.11928813 22.0000013,5.5 L22.0000013,19.5069431 C22.0000013,20.887655 20.8807132,22.0069431 19.5000013,22.0069431 L5.5,22.0069431 C4.11928813,22.0069431 3,20.887655 3,19.5069431 L3,5.5 Z M4,5.5 L4,19.5069431 C4,20.3353702 4.67157288,21.0069431 5.5,21.0069431 L19.5000013,21.0069431 C20.3284285,21.0069431 21.0000013,20.3353702 21.0000013,19.5069431 L21.0000013,5.5 C21.0000013,4.67157288 20.3284285,4 19.5000013,4 L5.5,4 C4.67157288,4 4,4.67157288 4,5.5 Z M15.5,13 C15.2238576,13 15,12.7761424 15,12.5 C15,12.2238576 15.2238576,12 15.5,12 L16.5,12 C16.7761424,12 17,12.2238576 17,12.5 C17,12.7761424 16.7761424,13 16.5,13 L15.5,13 Z M18.5,13 C18.2238576,13 18,12.7761424 18,12.5 C18,12.2238576 18.2238576,12 18.5,12 L19.5,12 C19.7761424,12 20,12.2238576 20,12.5 C20,12.7761424 19.7761424,13 19.5,13 L18.5,13 Z M5.5,13 C5.22385763,13 5,12.7761424 5,12.5 C5,12.2238576 5.22385763,12 5.5,12 L6.5,12 C6.77614237,12 7,12.2238576 7,12.5 C7,12.7761424 6.77614237,13 6.5,13 L5.5,13 Z M8.5,13 C8.22385763,13 8,12.7761424 8,12.5 C8,12.2238576 8.22385763,12 8.5,12 L9.5,12 C9.77614237,12 10,12.2238576 10,12.5 C10,12.7761424 9.77614237,13 9.5,13 L8.5,13 Z M12,5.5 C12,5.22385763 12.2238576,5 12.5,5 C12.7761424,5 13,5.22385763 13,5.5 L13,6.5 C13,6.77614237 12.7761424,7 12.5,7 C12.2238576,7 12,6.77614237 12,6.5 L12,5.5 Z M12,8.5 C12,8.22385763 12.2238576,8 12.5,8 C12.7761424,8 13,8.22385763 13,8.5 L13,9.5 C13,9.77614237 12.7761424,10 12.5,10 C12.2238576,10 12,9.77614237 12,9.5 L12,8.5 Z M12,18.5 C12,18.2238576 12.2238576,18 12.5,18 C12.7761424,18 13,18.2238576 13,18.5 L13,19.5 C13,19.7761424 12.7761424,20 12.5,20 C12.2238576,20 12,19.7761424 12,19.5 L12,18.5 Z M12,15.5 C12,15.2238576 12.2238576,15 12.5,15 C12.7761424,15 13,15.2238576 13,15.5 L13,16.5 C13,16.7761424 12.7761424,17 12.5,17 C12.2238576,17 12,16.7761424 12,16.5 L12,15.5 Z"/></svg>',CELL_BORDER_RIGHT:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M19,13 L18.5,13 C18.2238576,13 18,12.7761424 18,12.5 C18,12.2238576 18.2238576,12 18.5,12 L19,12 L19,5.5 C19,5.22385763 19.2238576,5 19.5,5 C19.7761424,5 20,5.22385763 20,5.5 L20,19.5 C20,19.7761424 19.7761424,20 19.5,20 C19.2238576,20 19,19.7761424 19,19.5 L19,13 Z M13,12 L13.5,12 C13.7761424,12 14,12.2238576 14,12.5 C14,12.7761424 13.7761424,13 13.5,13 L13,13 L13,13.5 C13,13.7761424 12.7761424,14 12.5,14 C12.2238576,14 12,13.7761424 12,13.5 L12,13 L11.5,13 C11.2238576,13 11,12.7761424 11,12.5 C11,12.2238576 11.2238576,12 11.5,12 L12,12 L12,11.5 C12,11.2238576 12.2238576,11 12.5,11 C12.7761424,11 13,11.2238576 13,11.5 L13,12 Z M3,19.5 C3,19.2238576 3.22385763,19 3.5,19 C3.77614237,19 4,19.2238576 4,19.5 C4,20.3284271 4.67157288,21 5.5,21 C5.77614237,21 6,21.2238576 6,21.5 C6,21.7761424 5.77614237,22 5.5,22 C4.11928813,22 3,20.8807119 3,19.5 Z M4,5.5 C4,5.77614237 3.77614237,6 3.5,6 C3.22385763,6 3,5.77614237 3,5.5 C3,4.11928813 4.11928813,3 5.5,3 L5.56155281,3 C5.83769519,3 6.06155281,3.22385763 6.06155281,3.5 C6.06155281,3.77614237 5.83769519,4 5.56155281,4 L5.5,4 C4.67157288,4 4,4.67157288 4,5.5 Z M19.5,4 C19.2238576,4 19,3.77614237 19,3.5 C19,3.22385763 19.2238576,3 19.5,3 C20.8807119,3 22,4.11928813 22,5.5 L22,19.5 C22,20.8807119 20.8807119,22 19.5,22 C19.2238576,22 19,21.7761424 19,21.5 C19,21.2238576 19.2238576,21 19.5,21 C20.3284271,21 21,20.3284271 21,19.5 L21,5.5 C21,4.67157288 20.3284271,4 19.5,4 Z M17.5,21 C17.7761424,21 18,21.2238576 18,21.5 C18,21.7761424 17.7761424,22 17.5,22 L16.5,22 C16.2238576,22 16,21.7761424 16,21.5 C16,21.2238576 16.2238576,21 16.5,21 L17.5,21 Z M14.5,21 C14.7761424,21 15,21.2238576 15,21.5 C15,21.7761424 14.7761424,22 14.5,22 L13.5,22 C13.2238576,22 13,21.7761424 13,21.5 C13,21.2238576 13.2238576,21 13.5,21 L14.5,21 Z M11.5,21 C11.7761424,21 12,21.2238576 12,21.5 C12,21.7761424 11.7761424,22 11.5,22 L10.5,22 C10.2238576,22 10,21.7761424 10,21.5 C10,21.2238576 10.2238576,21 10.5,21 L11.5,21 Z M8.5,21 C8.77614237,21 9,21.2238576 9,21.5 C9,21.7761424 8.77614237,22 8.5,22 L7.5,22 C7.22385763,22 7,21.7761424 7,21.5 C7,21.2238576 7.22385763,21 7.5,21 L8.5,21 Z M17.5,3 C17.7761424,3 18,3.22385763 18,3.5 C18,3.77614237 17.7761424,4 17.5,4 L16.5,4 C16.2238576,4 16,3.77614237 16,3.5 C16,3.22385763 16.2238576,3 16.5,3 L17.5,3 Z M14.5,3 C14.7761424,3 15,3.22385763 15,3.5 C15,3.77614237 14.7761424,4 14.5,4 L13.5,4 C13.2238576,4 13,3.77614237 13,3.5 C13,3.22385763 13.2238576,3 13.5,3 L14.5,3 Z M11.5,3 C11.7761424,3 12,3.22385763 12,3.5 C12,3.77614237 11.7761424,4 11.5,4 L10.5,4 C10.2238576,4 10,3.77614237 10,3.5 C10,3.22385763 10.2238576,3 10.5,3 L11.5,3 Z M8.5,3 C8.77614237,3 9,3.22385763 9,3.5 C9,3.77614237 8.77614237,4 8.5,4 L7.5,4 C7.22385763,4 7,3.77614237 7,3.5 C7,3.22385763 7.22385763,3 7.5,3 L8.5,3 Z M12,5.5 C12,5.22385763 12.2238576,5 12.5,5 C12.7761424,5 13,5.22385763 13,5.5 L13,6.5 C13,6.77614237 12.7761424,7 12.5,7 C12.2238576,7 12,6.77614237 12,6.5 L12,5.5 Z M12,8.5 C12,8.22385763 12.2238576,8 12.5,8 C12.7761424,8 13,8.22385763 13,8.5 L13,9.5 C13,9.77614237 12.7761424,10 12.5,10 C12.2238576,10 12,9.77614237 12,9.5 L12,8.5 Z M3,7.5 C3,7.22385763 3.22385763,7 3.5,7 C3.77614237,7 4,7.22385763 4,7.5 L4,8.5 C4,8.77614237 3.77614237,9 3.5,9 C3.22385763,9 3,8.77614237 3,8.5 L3,7.5 Z M3,10.5 C3,10.2238576 3.22385763,10 3.5,10 C3.77614237,10 4,10.2238576 4,10.5 L4,11.5 C4,11.7761424 3.77614237,12 3.5,12 C3.22385763,12 3,11.7761424 3,11.5 L3,10.5 Z M3,13.5 C3,13.2238576 3.22385763,13 3.5,13 C3.77614237,13 4,13.2238576 4,13.5 L4,14.5 C4,14.7761424 3.77614237,15 3.5,15 C3.22385763,15 3,14.7761424 3,14.5 L3,13.5 Z M3,16.5 C3,16.2238576 3.22385763,16 3.5,16 C3.77614237,16 4,16.2238576 4,16.5 L4,17.5 C4,17.7761424 3.77614237,18 3.5,18 C3.22385763,18 3,17.7761424 3,17.5 L3,16.5 Z M12,15.5 C12,15.2238576 12.2238576,15 12.5,15 C12.7761424,15 13,15.2238576 13,15.5 L13,16.5 C13,16.7761424 12.7761424,17 12.5,17 C12.2238576,17 12,16.7761424 12,16.5 L12,15.5 Z M12,18.5 C12,18.2238576 12.2238576,18 12.5,18 C12.7761424,18 13,18.2238576 13,18.5 L13,19.5 C13,19.7761424 12.7761424,20 12.5,20 C12.2238576,20 12,19.7761424 12,19.5 L12,18.5 Z M15.5,13 C15.2238576,13 15,12.7761424 15,12.5 C15,12.2238576 15.2238576,12 15.5,12 L16.5,12 C16.7761424,12 17,12.2238576 17,12.5 C17,12.7761424 16.7761424,13 16.5,13 L15.5,13 Z M8.5,13 C8.22385763,13 8,12.7761424 8,12.5 C8,12.2238576 8.22385763,12 8.5,12 L9.5,12 C9.77614237,12 10,12.2238576 10,12.5 C10,12.7761424 9.77614237,13 9.5,13 L8.5,13 Z M5.5,13 C5.22385763,13 5,12.7761424 5,12.5 C5,12.2238576 5.22385763,12 5.5,12 L6.5,12 C6.77614237,12 7,12.2238576 7,12.5 C7,12.7761424 6.77614237,13 6.5,13 L5.5,13 Z"/></svg>',CELL_BORDER_TOP:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M13,12 L13.5,12 C13.7761424,12 14,12.2238576 14,12.5 C14,12.7761424 13.7761424,13 13.5,13 L13,13 L13,13.5 C13,13.7761424 12.7761424,14 12.5,14 C12.2238576,14 12,13.7761424 12,13.5 L12,13 L11.5,13 C11.2238576,13 11,12.7761424 11,12.5 C11,12.2238576 11.2238576,12 11.5,12 L12,12 L12,11.5 C12,11.2238576 12.2238576,11 12.5,11 C12.7761424,11 13,11.2238576 13,11.5 L13,12 Z M13,6 L13,6.5 C13,6.77614237 12.7761424,7 12.5,7 C12.2238576,7 12,6.77614237 12,6.5 L12,6 L5.5,6 C5.22385763,6 5,5.77614237 5,5.5 C5,5.22385763 5.22385763,5 5.5,5 L19.5,5 C19.7761424,5 20,5.22385763 20,5.5 C20,5.77614237 19.7761424,6 19.5,6 L13,6 Z M19.5,22 C19.2238576,22 19,21.7761424 19,21.5 C19,21.2238576 19.2238576,21 19.5,21 C20.3284271,21 21,20.3284271 21,19.5 C21,19.2238576 21.2238576,19 21.5,19 C21.7761424,19 22,19.2238576 22,19.5 C22,20.8807119 20.8807119,22 19.5,22 Z M5.5,21 C5.77614237,21 6,21.2238576 6,21.5 C6,21.7761424 5.77614237,22 5.5,22 C4.11928813,22 3,20.8807119 3,19.5 L3,19.4384472 C3,19.1623048 3.22385763,18.9384472 3.5,18.9384472 C3.77614237,18.9384472 4,19.1623048 4,19.4384472 L4,19.5 C4,20.3284271 4.67157288,21 5.5,21 Z M4,5.5 C4,5.77614237 3.77614237,6 3.5,6 C3.22385763,6 3,5.77614237 3,5.5 C3,4.11928813 4.11928813,3 5.5,3 L19.5,3 C20.8807119,3 22,4.11928813 22,5.5 C22,5.77614237 21.7761424,6 21.5,6 C21.2238576,6 21,5.77614237 21,5.5 C21,4.67157288 20.3284271,4 19.5,4 L5.5,4 C4.67157288,4 4,4.67157288 4,5.5 Z M3,7.5 C3,7.22385763 3.22385763,7 3.5,7 C3.77614237,7 4,7.22385763 4,7.5 L4,8.5 C4,8.77614237 3.77614237,9 3.5,9 C3.22385763,9 3,8.77614237 3,8.5 L3,7.5 Z M3,10.5 C3,10.2238576 3.22385763,10 3.5,10 C3.77614237,10 4,10.2238576 4,10.5 L4,11.5 C4,11.7761424 3.77614237,12 3.5,12 C3.22385763,12 3,11.7761424 3,11.5 L3,10.5 Z M3,13.5 C3,13.2238576 3.22385763,13 3.5,13 C3.77614237,13 4,13.2238576 4,13.5 L4,14.5 C4,14.7761424 3.77614237,15 3.5,15 C3.22385763,15 3,14.7761424 3,14.5 L3,13.5 Z M3,16.5 C3,16.2238576 3.22385763,16 3.5,16 C3.77614237,16 4,16.2238576 4,16.5 L4,17.5 C4,17.7761424 3.77614237,18 3.5,18 C3.22385763,18 3,17.7761424 3,17.5 L3,16.5 Z M21,7.5 C21,7.22385763 21.2238576,7 21.5,7 C21.7761424,7 22,7.22385763 22,7.5 L22,8.5 C22,8.77614237 21.7761424,9 21.5,9 C21.2238576,9 21,8.77614237 21,8.5 L21,7.5 Z M21,10.5 C21,10.2238576 21.2238576,10 21.5,10 C21.7761424,10 22,10.2238576 22,10.5 L22,11.5 C22,11.7761424 21.7761424,12 21.5,12 C21.2238576,12 21,11.7761424 21,11.5 L21,10.5 Z M21,13.5 C21,13.2238576 21.2238576,13 21.5,13 C21.7761424,13 22,13.2238576 22,13.5 L22,14.5 C22,14.7761424 21.7761424,15 21.5,15 C21.2238576,15 21,14.7761424 21,14.5 L21,13.5 Z M21,16.5 C21,16.2238576 21.2238576,16 21.5,16 C21.7761424,16 22,16.2238576 22,16.5 L22,17.5 C22,17.7761424 21.7761424,18 21.5,18 C21.2238576,18 21,17.7761424 21,17.5 L21,16.5 Z M12,15.5 C12,15.2238576 12.2238576,15 12.5,15 C12.7761424,15 13,15.2238576 13,15.5 L13,16.5 C13,16.7761424 12.7761424,17 12.5,17 C12.2238576,17 12,16.7761424 12,16.5 L12,15.5 Z M12,8.5 C12,8.22385763 12.2238576,8 12.5,8 C12.7761424,8 13,8.22385763 13,8.5 L13,9.5 C13,9.77614237 12.7761424,10 12.5,10 C12.2238576,10 12,9.77614237 12,9.5 L12,8.5 Z M12,18.5 C12,18.2238576 12.2238576,18 12.5,18 C12.7761424,18 13,18.2238576 13,18.5 L13,19.5 C13,19.7761424 12.7761424,20 12.5,20 C12.2238576,20 12,19.7761424 12,19.5 L12,18.5 Z M17.5,21 C17.7761424,21 18,21.2238576 18,21.5 C18,21.7761424 17.7761424,22 17.5,22 L16.5,22 C16.2238576,22 16,21.7761424 16,21.5 C16,21.2238576 16.2238576,21 16.5,21 L17.5,21 Z M14.5,21 C14.7761424,21 15,21.2238576 15,21.5 C15,21.7761424 14.7761424,22 14.5,22 L13.5,22 C13.2238576,22 13,21.7761424 13,21.5 C13,21.2238576 13.2238576,21 13.5,21 L14.5,21 Z M11.5,21 C11.7761424,21 12,21.2238576 12,21.5 C12,21.7761424 11.7761424,22 11.5,22 L10.5,22 C10.2238576,22 10,21.7761424 10,21.5 C10,21.2238576 10.2238576,21 10.5,21 L11.5,21 Z M8.5,21 C8.77614237,21 9,21.2238576 9,21.5 C9,21.7761424 8.77614237,22 8.5,22 L7.5,22 C7.22385763,22 7,21.7761424 7,21.5 C7,21.2238576 7.22385763,21 7.5,21 L8.5,21 Z M5.5,13 C5.22385763,13 5,12.7761424 5,12.5 C5,12.2238576 5.22385763,12 5.5,12 L6.5,12 C6.77614237,12 7,12.2238576 7,12.5 C7,12.7761424 6.77614237,13 6.5,13 L5.5,13 Z M8.5,13 C8.22385763,13 8,12.7761424 8,12.5 C8,12.2238576 8.22385763,12 8.5,12 L9.5,12 C9.77614237,12 10,12.2238576 10,12.5 C10,12.7761424 9.77614237,13 9.5,13 L8.5,13 Z M15.5,13 C15.2238576,13 15,12.7761424 15,12.5 C15,12.2238576 15.2238576,12 15.5,12 L16.5,12 C16.7761424,12 17,12.2238576 17,12.5 C17,12.7761424 16.7761424,13 16.5,13 L15.5,13 Z M18.5,13 C18.2238576,13 18,12.7761424 18,12.5 C18,12.2238576 18.2238576,12 18.5,12 L19.5,12 C19.7761424,12 20,12.2238576 20,12.5 C20,12.7761424 19.7761424,13 19.5,13 L18.5,13 Z"/></svg>',CELL_BORDER_NONE:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M32 480a32 32 0 1 1 0-64 32 32 0 1 1 0 64zm96-64a32 32 0 1 1 0 64 32 32 0 1 1 0-64zm0-384a32 32 0 1 1 0 64 32 32 0 1 1 0-64zm0 256a32 32 0 1 1 0-64 32 32 0 1 1 0 64zM320 416a32 32 0 1 1 0 64 32 32 0 1 1 0-64zm0-320a32 32 0 1 1 0-64 32 32 0 1 1 0 64zm0 128a32 32 0 1 1 0 64 32 32 0 1 1 0-64zM224 480a32 32 0 1 1 0-64 32 32 0 1 1 0 64zm0-448a32 32 0 1 1 0 64 32 32 0 1 1 0-64zm0 256a32 32 0 1 1 0-64 32 32 0 1 1 0 64zM416 416a32 32 0 1 1 0 64 32 32 0 1 1 0-64zm0-384a32 32 0 1 1 0 64 32 32 0 1 1 0-64zM32 96a32 32 0 1 1 0-64 32 32 0 1 1 0 64zM416 224a32 32 0 1 1 0 64 32 32 0 1 1 0-64zM32 288a32 32 0 1 1 0-64 32 32 0 1 1 0 64zm192 32a32 32 0 1 1 0 64 32 32 0 1 1 0-64zm192 64a32 32 0 1 1 0-64 32 32 0 1 1 0 64zM32 320a32 32 0 1 1 0 64 32 32 0 1 1 0-64zM416 192a32 32 0 1 1 0-64 32 32 0 1 1 0 64zM32 128a32 32 0 1 1 0 64 32 32 0 1 1 0-64zm192 64a32 32 0 1 1 0-64 32 32 0 1 1 0 64z"/></svg>',FIXED_COLUMN_WIDTH:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M6,5H18A1,1 0 0,1 19,6A1,1 0 0,1 18,7H6A1,1 0 0,1 5,6A1,1 0 0,1 6,5M21,2V4H3V2H21M15,8H17V22H15V8M7,8H9V22H7V8M11,8H13V22H11V8Z" /></svg>',COLOR:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M512 256c0 .9 0 1.8 0 2.7c-.4 36.5-33.6 61.3-70.1 61.3L344 320c-26.5 0-48 21.5-48 48c0 3.4 .4 6.7 1 9.9c2.1 10.2 6.5 20 10.8 29.9c6.1 13.8 12.1 27.5 12.1 42c0 31.8-21.6 60.7-53.4 62c-3.5 .1-7 .2-10.6 .2C114.6 512 0 397.4 0 256S114.6 0 256 0S512 114.6 512 256zM128 288a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm0-96a32 32 0 1 0 0-64 32 32 0 1 0 0 64zM288 96a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm96 96a32 32 0 1 0 0-64 32 32 0 1 0 0 64z" /></svg>',CUT:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256"><rect width="256" height="256" fill="none"/><circle cx="60" cy="76" r="28" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/><circle cx="60" cy="180" r="28" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/><line x1="136" y1="128" x2="83.11" y2="164.19" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/><line x1="232" y1="62.32" x2="164.33" y2="108.61" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/><line x1="232" y1="193.68" x2="83.11" y2="91.81" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/></svg>',COPY:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256"><rect width="256" height="256" fill="none"/><polyline points="168 168 216 168 216 40 88 40 88 88" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/><rect x="40" y="88" width="128" height="128" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/></svg>',PASTE:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256"><rect width="256" height="256" fill="none"/><polyline points="48 139.59 48 216 208 216 208 139.59" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/><path d="M54,40H202a8,8,0,0,1,7.69,5.8L224,96H32L46.34,45.8A8,8,0,0,1,54,40Z" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/><path d="M96,96v16a32,32,0,0,1-64,0V96" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/><path d="M160,96v16a32,32,0,0,1-64,0V96" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/><path d="M224,96v16a32,32,0,0,1-64,0V96" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/></svg>',SELECT_ALL:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256"><rect width="256" height="256" fill="none"/><line x1="144" y1="40" x2="112" y2="40" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/><line x1="112" y1="216" x2="144" y2="216" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/><path d="M184,40h24a8,8,0,0,1,8,8V72" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/><line x1="216" y1="144" x2="216" y2="112" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/><path d="M184,216h24a8,8,0,0,0,8-8V184" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/><line x1="40" y1="112" x2="40" y2="144" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/><path d="M72,216H48a8,8,0,0,1-8-8V184" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/><path d="M72,40H48a8,8,0,0,0-8,8V72" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/><rect x="80" y="80" width="96" height="96" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/></svg>',FULLSCREEN:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M8 3V5H4V9H2V3H8ZM2 21V15H4V19H8V21H2ZM22 21H16V19H20V15H22V21ZM22 9H20V5H16V3H22V9Z"></path></svg>',FULLSCREEN_EXIT:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M18 7H22V9H16V3H18V7ZM8 9H2V7H6V3H8V9ZM18 17V21H16V15H22V17H18ZM8 15V21H6V17H2V15H8Z"></path></svg>',PRINT:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16.05 16.04"><g><path d="M19.76,15.84a1.29,1.29,0,0,0,.39-.92V8.35A2.05,2.05,0,0,0,19.57,7a1.93,1.93,0,0,0-1.38-.57H6.37a1.95,1.95,0,0,0-2,2v6.56a1.23,1.23,0,0,0,.38.92,1.35,1.35,0,0,0,.93.38h2V14.9l-2,0V8.35a.67.67,0,0,1,.18-.47.62.62,0,0,1,.48-.19H18.18a.6.6,0,0,1,.46.19.66.66,0,0,1,.18.47V14.9h-2v1.32h2A1.35,1.35,0,0,0,19.76,15.84ZM17.52,7.69V5.06a1.31,1.31,0,0,0-.38-.92,1.34,1.34,0,0,0-.94-.38H8.34A1.3,1.3,0,0,0,7,5.06V7.69H8.34V5.06h7.87V7.69h1.31ZM8.34,12.93h7.87l0,5.26H8.34V12.93Zm7.87,5.26v0Zm.65,1.31a.6.6,0,0,0,.46-.19.72.72,0,0,0,.2-.47V12.29a.74.74,0,0,0-.2-.47.6.6,0,0,0-.46-.19H7.68a.6.6,0,0,0-.46.19.72.72,0,0,0-.2.47v6.55a.74.74,0,0,0,.2.47.6.6,0,0,0,.46.19h9.18ZM16.67,9.28a.7.7,0,0,0-.94,0,.63.63,0,0,0-.18.46.67.67,0,0,0,.18.47.68.68,0,0,0,.94,0,.66.66,0,0,0,.18-.47A.58.58,0,0,0,16.67,9.28Z" transform="translate(-4.25 -3.61)"/></g></svg>',SPECIAL_CHARACTER:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256"><rect width="256" height="256" fill="none"/><line x1="128" y1="40" x2="128" y2="216" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/><line x1="48" y1="80" x2="208" y2="176" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/><line x1="48" y1="176" x2="208" y2="80" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/></svg>',EMBED:'<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 122.88 91.26"><path class="cls-1" d="M8.32,0H114.56a8.34,8.34,0,0,1,8.32,8.32V82.94a8.35,8.35,0,0,1-8.32,8.32H8.32A8.35,8.35,0,0,1,0,82.94V8.32A8.34,8.34,0,0,1,8.32,0ZM88.8,54.44a2.36,2.36,0,0,1,4.6,1.07L88.28,77.44a2.36,2.36,0,0,1-4.6-1.07L88.8,54.44ZM16.18,73.22a2.66,2.66,0,0,1,0-5.32h25a2.66,2.66,0,1,1,0,5.32Zm0-16.61a2.66,2.66,0,0,1,0-5.32H59.62a2.66,2.66,0,1,1,0,5.32Zm0-16.61a2.66,2.66,0,0,1,0-5.32H85A2.66,2.66,0,0,1,85,40Zm64.6,32a2.36,2.36,0,0,1-3.1,3.55l-9-7.85a2.35,2.35,0,0,1-.22-3.32,1.67,1.67,0,0,1,.23-.23l9-7.84a2.35,2.35,0,0,1,3.1,3.54l-6.93,6.08L80.78,72ZM100,75.56A2.36,2.36,0,0,1,96.9,72l6.93-6.07L96.9,59.86a2.35,2.35,0,1,1,3.1-3.54l9,7.84a1.67,1.67,0,0,1,.23.23,2.35,2.35,0,0,1-.22,3.32l-9,7.85Zm18-52.27H5.29V83.75A2.26,2.26,0,0,0,6,85.38a2.28,2.28,0,0,0,1.63.67h108a2.28,2.28,0,0,0,1.63-.67,2.26,2.26,0,0,0,.67-1.63V23.29ZM106.64,9.35a4.11,4.11,0,1,1-4.1,4.11,4.11,4.11,0,0,1,4.1-4.11Zm-27.84,0a4.11,4.11,0,1,1-4.11,4.11A4.11,4.11,0,0,1,78.8,9.35Zm13.92,0a4.11,4.11,0,1,1-4.11,4.11,4.11,4.11,0,0,1,4.11-4.11Z "/></svg>',EDIT_LINK:'<svg xmlns="http://www.w3.org/2000/svg" width="20px" viewBox="0 0 24 24" fill="currentColor"><path d="M15.7279 9.57627L14.3137 8.16206L5 17.4758V18.89H6.41421L15.7279 9.57627ZM17.1421 8.16206L18.5563 6.74785L17.1421 5.33363L15.7279 6.74785L17.1421 8.16206ZM7.24264 20.89H3V16.6473L16.435 3.21231C16.8256 2.82179 17.4587 2.82179 17.8492 3.21231L20.6777 6.04074C21.0682 6.43126 21.0682 7.06443 20.6777 7.45495L7.24264 20.89Z"></path></svg>',COPY_LINK:'<svg xmlns="http://www.w3.org/2000/svg" width="20px" viewBox="0 0 24 24" fill="currentColor"><path d="M6.9998 6V3C6.9998 2.44772 7.44752 2 7.9998 2H19.9998C20.5521 2 20.9998 2.44772 20.9998 3V17C20.9998 17.5523 20.5521 18 19.9998 18H16.9998V20.9991C16.9998 21.5519 16.5499 22 15.993 22H4.00666C3.45059 22 3 21.5554 3 20.9991L3.0026 7.00087C3.0027 6.44811 3.45264 6 4.00942 6H6.9998ZM5.00242 8L5.00019 20H14.9998V8H5.00242ZM8.9998 6H16.9998V16H18.9998V4H8.9998V6Z"></path></svg>',DELETE_LINK:'<svg xmlns="http://www.w3.org/2000/svg" width="20px" viewBox="0 0 24 24" fill="currentColor"><path d="M17 6H22V8H20V21C20 21.5523 19.5523 22 19 22H5C4.44772 22 4 21.5523 4 21V8H2V6H7V3C7 2.44772 7.44772 2 8 2H16C16.5523 2 17 2.44772 17 3V6ZM18 8H6V20H18V8ZM9 11H11V17H9V11ZM13 11H15V17H13V11ZM9 4V6H15V4H9Z"></path></svg>',TENOR:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M17.409 19C16.633 16.6012 15.1323 15.1147 13.1434 13.3979C15.0238 11.8971 17.4071 11 20 11V3H21.0082C21.556 3 22 3.44495 22 3.9934V20.0066C22 20.5552 21.5447 21 21.0082 21H2.9918C2.44405 21 2 20.5551 2 20.0066V3.9934C2 3.44476 2.45531 3 2.9918 3H6V1H8V5H4V12C9.22015 12 13.6618 14.4616 15.3127 19H17.409ZM18 1V5H10V3H16V1H18ZM16.5 10C15.6716 10 15 9.32843 15 8.5C15 7.67157 15.6716 7 16.5 7C17.3284 7 18 7.67157 18 8.5C18 9.32843 17.3284 10 16.5 10Z"></path></svg>',LOADER:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200"><radialGradient id="a12" cx=".66" fx=".66" cy=".3125" fy=".3125" gradientTransform="scale(1.5)"><stop offset="0" stop-color="#000000"></stop><stop offset=".3" stop-color="#000000" stop-opacity=".9"></stop><stop offset=".6" stop-color="#000000" stop-opacity=".6"></stop><stop offset=".8" stop-color="#000000" stop-opacity=".3"></stop><stop offset="1" stop-color="#000000" stop-opacity="0"></stop></radialGradient><circle transform-origin="center" fill="none" stroke="url(#a12)" stroke-width="15" stroke-linecap="round" stroke-dasharray="200 1000" stroke-dashoffset="0" cx="100" cy="100" r="70"><animateTransform type="rotate" attributeName="transform" calcMode="spline" dur="2" values="360;0" keyTimes="0;1" keySplines="0 0 1 1" repeatCount="indefinite"></animateTransform></circle><circle transform-origin="center" fill="none" opacity=".2" stroke="#000000" stroke-width="15" stroke-linecap="round" cx="100" cy="100" r="70"></circle></svg>',FULLSCREEN_IMAGE:'<svg xmlns="http://www.w3.org/2000/svg" width="20px" viewBox="0 0 24 24" fill="currentColor"><path d="M8 3V5H4V9H2V3H8ZM2 21V15H4V19H8V21H2ZM22 21H16V19H20V15H22V21ZM22 9H20V5H16V3H22V9Z"></path></svg>',CLOSE:'<svg xmlns="http://www.w3.org/2000/svg" width="16px" viewBox="0 0 24 24" fill="currentColor"><path d="M10.5859 12L2.79297 4.20706L4.20718 2.79285L12.0001 10.5857L19.793 2.79285L21.2072 4.20706L13.4143 12L21.2072 19.7928L19.793 21.2071L12.0001 13.4142L4.20718 21.2071L2.79297 19.7928L10.5859 12Z"></path></svg>',SPINNER:'<svg class="leksy-editor-spinner" width="16" height="16" viewBox="0 0 50 50"><circle class="leksy-editor-path" cx="25" cy="25" r="20" fill="none" stroke-width="4"></circle></svg>',TABLE_OF_CONTENT:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M20 22H4C3.44772 22 3 21.5523 3 21V3C3 2.44772 3.44772 2 4 2H20C20.5523 2 21 2.44772 21 3V21C21 21.5523 20.5523 22 20 22ZM19 20V4H5V20H19ZM8 7H16V9H8V7ZM8 11H16V13H8V11ZM8 15H16V17H8V15Z"></path></svg>',MORE:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M12 3C10.9 3 10 3.9 10 5C10 6.1 10.9 7 12 7C13.1 7 14 6.1 14 5C14 3.9 13.1 3 12 3ZM12 17C10.9 17 10 17.9 10 19C10 20.1 10.9 21 12 21C13.1 21 14 20.1 14 19C14 17.9 13.1 17 12 17ZM12 10C10.9 10 10 10.9 10 12C10 13.1 10.9 14 12 14C13.1 14 14 13.1 14 12C14 10.9 13.1 10 12 10Z"></path></svg>',PLAY_LIST:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M22 18V20H2V18H22ZM2 3.5L10 8.5L2 13.5V3.5ZM22 11V13H12V11H22ZM22 4V6H12V4H22Z"></path></svg>',PENCIL_LINE:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M15.7279 9.57627L14.3137 8.16206L5 17.4758V18.89H6.41421L15.7279 9.57627ZM17.1421 8.16206L18.5563 6.74785L17.1421 5.33363L15.7279 6.74785L17.1421 8.16206ZM7.24264 20.89H3V16.6473L16.435 3.21231C16.8256 2.82179 17.4587 2.82179 17.8492 3.21231L20.6777 6.04074C21.0682 6.43126 21.0682 7.06443 20.6777 7.45495L7.24264 20.89Z"></path></svg>',FIND_AND_REPLACE:'<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" fill="#000000" viewBox="0 0 256 256"><path d="M229.66,218.34l-50.07-50.06a88.11,88.11,0,1,0-11.31,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z"></path></svg>'},se={IMAGE:"image/png,image/jpg,image/jpeg,image/webp",VIDEO:"video/mp4,video/quicktime"},ze={YOUTUBE:/(?:youtube\.com\/(?:.*[?&]v=|embed\/|v\/|watch\?v=|live\/)|youtu\.be\/)([^"&?\/\s]{11})/,REDDIT:/(?:reddit\.com\/r\/[\w-]+\/comments\/|reddit\.com\/comments\/)([\w-]+)/,INSTAGRAM:/(?:instagram\.com\/(?:p|reel|tv|stories\/[\w-]+|[\w-]+\/posts|share\/p)\/|instagr\.am\/p\/)([\w-]+)/,THREADS:/(?:threads\.net\/@[\w-]+\/post\/)([\w-]+)/,PINTEREST:/(?:pinterest\.com\/pin\/)(\d+)/,VIMEO:/vimeo\.com\/(\d+)/,TWITCH:/twitch\.tv\/videos\/(\d+)/,TWITCH_CHANNEL:/twitch\.tv\/([a-zA-Z0-9_]+)/,TIKTOK:/tiktok\.com\/@[^/]+\/video\/(\d+)/},ye={YOUTUBE:"https://www.youtube.com/embed/",INSTAGRAM:"https://www.instagram.com/p/",REDDIT:"https://www.redditmedia.com/r/all/comments/",PINTEREST:"https://assets.pinterest.com/ext/embed.html?id=",THREADS:"https://www.threads.net/t/",VIMEO:"https://player.vimeo.com/video/",TWITCH:"https://player.twitch.tv/?video=",TWITCH_CHANNEL:"https://player.twitch.tv/?channel=",TIKTOK:"https://www.tiktok.com/embed/"},Ie={primary:"hsl(160, 100%, 40%)",baseWhite:"hsl(0, 0%, 100%)",whiteDark:"hsl(223, 5%, 92%)",resizer:" #3f9dff",resizerBackground:"hsl(211, 100%, 62%, 0.3)",shadow:"rgba(0, 0, 0, 0.3)",mention:" #efefef",mentionHighlight:"#ddd",dashedBorder:"gray",tableResizer:"cornsilk",tableResizerOutline:"darkblue",textColor:"hsl(216, 10%, 20%)",resizerPosition:"#fff",resizerPositionBackground:"#333",linkColor:"#0000ff",scrollbarThumb:"hsl(160, 100%, 40%)",scrollbarTrack:"hsl(223, 5%, 76%)"},ee={IFRAME_VARIABLES:`
3
3
  :root {
4
4
  --primary: hsl(160, 100%, 40%);
5
5
  --base-white: hsl(0, 0%, 100%);
@@ -375,93 +375,93 @@ function Ze(t,{insertAt:e}={}){if(!t||typeof document>"u")return;let n=document.
375
375
  visibility: visible;
376
376
  }
377
377
  }
378
- `},gt=[{icon:"100%",title:"Resize 100%",event:"100%"},{icon:"75%",title:"Resize 75%",event:"75%"},{icon:"50%",title:"Resize 50%",event:"50%"},{icon:L.ALIGN_LEFT,title:"Left aligned image",event:"wrap-left"},{icon:L.ALIGN_RIGHT,title:"Right aligned image",event:"wrap-right"},{icon:L.REVERT,title:"Revert",event:"revert"},{icon:L.AUTO_SIZE,title:"Auto size",event:"auto"},{icon:L.DELETE,title:"Delete",event:"delete"}],ft=[{icon:L.INSERT_ROW_ABOVE,title:"Insert Row Above",event:"insert-row-above"},{icon:L.INSERT_ROW_BELOW,title:"Insert Row Below",event:"insert-row-below"},{icon:L.DELETE_ROW,title:"Delete Row",event:"delete-row"},{icon:L.MERGE_CELLS_HORIZONTAL,title:"Merge Row",event:"merge-cells-horizontal"},{icon:L.INSERT_COLUMN_LEFT,title:"Insert Column Left",event:"insert-column-left"},{icon:L.INSERT_COLUMN_RIGHT,title:"Insert Column Right",event:"insert-column-right"},{icon:L.DELETE_COLUMN,title:"Delete Column",event:"delete-column"},{icon:L.MERGE_CELLS_VERTICAL,title:"Merge Up",event:"merge-cell-up"},{icon:L.MERGE_CELLS_HORIZONTAL,title:"Merge Right",event:"merge-cell-right"},{icon:L.MERGE_CELLS_VERTICAL,title:"Merge Down",event:"merge-cell-down"},{icon:L.MERGE_CELLS_HORIZONTAL,title:"Merge Left",event:"merge-cell-left"},{icon:L.SPLIT_CELLS_VERTICAL,title:"Split Vertically",event:"split-cell-vertical"},{icon:L.SPLIT_CELLS_HORIZONTAL,title:"Split Horizontally",event:"split-cell-horizontal"},{icon:L.CELL_WIDTH,title:"Cell Width (px)",event:"cell-width"},{icon:L.CELL_HEIGHT,title:"Cell Height (px)",event:"cell-height"},{icon:L.CELL_PADDING,title:"Cell Padding (px)",event:"cell-padding"},{icon:L.ALIGN_LEFT,title:"Align Left",event:"align-left"},{icon:L.ALIGN_CENTER,title:"Align Center",event:"align-center"},{icon:L.ALIGN_RIGHT,title:"Align Right",event:"align-right"},{icon:L.CELL_BORDER_FULL,title:"Border Full",event:"cell-border-full"},{icon:L.CELL_BORDER_TOP,title:"Border Top",event:"cell-border-top"},{icon:L.CELL_BORDER_RIGHT,title:"Border Right",event:"cell-border-right"},{icon:L.CELL_BORDER_BOTTOM,title:"Border Bottom",event:"cell-border-bottom"},{icon:L.CELL_BORDER_LEFT,title:"Border Left",event:"cell-border-left"},{icon:L.CELL_BORDER_FULL,title:"Border None",event:"cell-border-none"},{icon:L.FIXED_COLUMN_WIDTH,title:"Fixed Column",event:"fixed-column-width"},{icon:L.COLOR,title:"Cell Border Color",event:"border-color"},{icon:L.COLOR,title:"Cell Background Color",event:"background-color"},{icon:L.COLOR,title:"Row Background Color",event:"row-background-color"},{icon:L.COLOR,title:"Column Background Color",event:"column-background-color"}],bt=[{label:"Smileys & Emotion",icons:["\u{1F600}","\u{1F603}","\u{1F604}","\u{1F601}","\u{1F606}","\u{1F605}","\u{1F602}","\u{1F923}","\u{1F60A}","\u{1F607}","\u{1F642}","\u{1F643}","\u{1F609}","\u{1F60C}","\u{1F60D}","\u{1F970}","\u{1F618}","\u{1F617}","\u{1F619}","\u{1F61A}","\u{1F60B}","\u{1F61B}","\u{1F61C}","\u{1F61D}","\u{1F911}","\u{1F917}","\u{1F929}","\u{1F914}","\u{1F972}","\u{1F636}\u200D\u{1F32B}\uFE0F","\u{1F614}","\u{1F62A}","\u{1F924}","\u{1F634}","\u{1F637}","\u{1F912}","\u{1F915}","\u{1F922}","\u{1F92E}","\u{1F927}","\u{1F975}","\u{1F976}","\u{1F974}","\u{1F635}","\u{1F92F}","\u{1F920}","\u{1F973}","\u{1F60E}","\u{1F913}","\u{1F9D0}"]},{label:"People & Body",icons:["\u{1F476}","\u{1F9D2}","\u{1F466}","\u{1F467}","\u{1F9D1}","\u{1F471}","\u{1F468}","\u{1F9D4}","\u{1F469}","\u{1F471}\u200D\u2640\uFE0F","\u{1F469}\u200D\u{1F9B0}","\u{1F468}\u200D\u{1F9B0}","\u{1F469}\u200D\u{1F9B1}","\u{1F468}\u200D\u{1F9B1}","\u{1F469}\u200D\u{1F9B2}","\u{1F468}\u200D\u{1F9B2}","\u{1F9D4}","\u{1F475}","\u{1F9D3}","\u{1F474}","\u{1F472}","\u{1F473}\u200D\u2640\uFE0F","\u{1F473}\u200D\u2642\uFE0F","\u{1F9D5}","\u{1F46E}\u200D\u2640\uFE0F","\u{1F46E}\u200D\u2642\uFE0F","\u{1F477}\u200D\u2640\uFE0F","\u{1F477}\u200D\u2642\uFE0F","\u{1F482}\u200D\u2640\uFE0F","\u{1F482}\u200D\u2642\uFE0F","\u{1F575}\uFE0F\u200D\u2640\uFE0F","\u{1F575}\uFE0F\u200D\u2642\uFE0F","\u{1F469}\u200D\u2695\uFE0F","\u{1F468}\u200D\u2695\uFE0F","\u{1F469}\u200D\u{1F33E}","\u{1F468}\u200D\u{1F33E}","\u{1F469}\u200D\u{1F373}","\u{1F468}\u200D\u{1F373}","\u{1F469}\u200D\u{1F393}","\u{1F468}\u200D\u{1F393}","\u{1F469}\u200D\u{1F3A4}","\u{1F468}\u200D\u{1F3A4}","\u{1F469}\u200D\u{1F3EB}","\u{1F468}\u200D\u{1F3EB}","\u{1F469}\u200D\u{1F3ED}","\u{1F468}\u200D\u{1F3ED}","\u{1F469}\u200D\u{1F4BB}","\u{1F468}\u200D\u{1F4BB}","\u{1F469}\u200D\u{1F4BC}","\u{1F468}\u200D\u{1F4BC}","\u{1F469}\u200D\u{1F527}","\u{1F468}\u200D\u{1F527}","\u{1F469}\u200D\u{1F52C}","\u{1F468}\u200D\u{1F52C}","\u{1F469}\u200D\u{1F3A8}","\u{1F468}\u200D\u{1F3A8}","\u{1F469}\u200D\u{1F692}","\u{1F468}\u200D\u{1F692}","\u{1F469}\u200D\u2708\uFE0F","\u{1F468}\u200D\u2708\uFE0F","\u{1F469}\u200D\u{1F680}","\u{1F468}\u200D\u{1F680}","\u{1F469}\u200D\u2696\uFE0F","\u{1F468}\u200D\u2696\uFE0F","\u{1F470}","\u{1F935}","\u{1F478}","\u{1F934}","\u{1F936}","\u{1F385}","\u{1F9D9}\u200D\u2640\uFE0F","\u{1F9D9}\u200D\u2642\uFE0F","\u{1F9DD}\u200D\u2640\uFE0F","\u{1F9DD}\u200D\u2642\uFE0F","\u{1F9DB}\u200D\u2640\uFE0F","\u{1F9DB}\u200D\u2642\uFE0F","\u{1F9DF}\u200D\u2640\uFE0F","\u{1F9DF}\u200D\u2642\uFE0F","\u{1F9DE}\u200D\u2640\uFE0F","\u{1F9DE}\u200D\u2642\uFE0F","\u{1F9DC}\u200D\u2640\uFE0F","\u{1F9DC}\u200D\u2642\uFE0F","\u{1F9DA}\u200D\u2640\uFE0F","\u{1F9DA}\u200D\u2642\uFE0F","\u{1F47C}","\u{1F930}","\u{1F931}","\u{1F647}\u200D\u2640\uFE0F","\u{1F647}\u200D\u2642\uFE0F","\u{1F481}\u200D\u2640\uFE0F","\u{1F481}\u200D\u2642\uFE0F","\u{1F645}\u200D\u2640\uFE0F","\u{1F645}\u200D\u2642\uFE0F","\u{1F646}\u200D\u2640\uFE0F","\u{1F646}\u200D\u2642\uFE0F","\u{1F64B}\u200D\u2640\uFE0F","\u{1F64B}\u200D\u2642\uFE0F","\u{1F9CF}\u200D\u2640\uFE0F","\u{1F9CF}\u200D\u2642\uFE0F","\u{1F64E}\u200D\u2640\uFE0F","\u{1F64E}\u200D\u2642\uFE0F","\u{1F64D}\u200D\u2640\uFE0F","\u{1F64D}\u200D\u2642\uFE0F","\u{1F487}\u200D\u2640\uFE0F","\u{1F487}\u200D\u2642\uFE0F","\u{1F486}\u200D\u2640\uFE0F","\u{1F486}\u200D\u2642\uFE0F","\u{1F9D6}\u200D\u2640\uFE0F","\u{1F9D6}\u200D\u2642\uFE0F","\u{1F485}","\u{1F933}","\u{1F483}","\u{1F57A}","\u{1F46F}\u200D\u2640\uFE0F","\u{1F46F}\u200D\u2642\uFE0F","\u{1F574}\uFE0F","\u{1F6B6}\u200D\u2640\uFE0F","\u{1F6B6}\u200D\u2642\uFE0F","\u{1F3C3}\u200D\u2640\uFE0F","\u{1F3C3}\u200D\u2642\uFE0F","\u{1F46B}","\u{1F46D}","\u{1F46C}","\u{1F491}","\u{1F469}\u200D\u2764\uFE0F\u200D\u{1F469}","\u{1F469}\u200D\u2764\uFE0F\u200D\u{1F468}","\u{1F468}\u200D\u2764\uFE0F\u200D\u{1F468}","\u{1F469}\u200D\u2764\uFE0F\u200D\u{1F48B}\u200D\u{1F469}","\u{1F469}\u200D\u2764\uFE0F\u200D\u{1F48B}\u200D\u{1F468}","\u{1F468}\u200D\u2764\uFE0F\u200D\u{1F48B}\u200D\u{1F468}","\u{1F469}\u200D\u2764\uFE0F\u200D\u{1F48B}\u200D\u{1F468}","\u{1F468}\u200D\u2764\uFE0F\u200D\u{1F48B}\u200D\u{1F468}","\u{1F469}\u200D\u2764\uFE0F\u200D\u{1F48B}\u200D\u{1F469}"]},{label:"Animals & Nature",icons:["\u{1F436}","\u{1F431}","\u{1F42D}","\u{1F439}","\u{1F430}","\u{1F98A}","\u{1F43B}","\u{1F43C}","\u{1F428}","\u{1F42F}","\u{1F981}","\u{1F42E}","\u{1F437}","\u{1F438}","\u{1F419}","\u{1F435}","\u{1F984}","\u{1F41E}","\u{1F98B}","\u{1F41D}","\u{1F993}","\u{1F418}","\u{1F98F}","\u{1F98D}","\u{1F42A}","\u{1F42B}","\u{1F992}","\u{1F998}","\u{1F43F}\uFE0F","\u{1F994}","\u{1F991}","\u{1F99E}","\u{1F980}","\u{1F421}","\u{1F420}","\u{1F41F}","\u{1F42C}","\u{1F433}","\u{1F40B}","\u{1F988}","\u{1F40A}","\u{1F405}","\u{1F406}","\u{1F993}","\u{1F98D}","\u{1F418}","\u{1F98F}","\u{1F99B}","\u{1F9A7}","\u{1F9AE}","\u{1F9A2}","\u{1F9A9}","\u{1F99C}","\u{1F99A}","\u{1F989}","\u{1F9A4}","\u{1F99A}","\u{1F99C}","\u{1F987}","\u{1F43A}","\u{1F417}","\u{1F434}","\u{1F984}","\u{1F41D}","\u{1F98B}","\u{1F40C}","\u{1F980}","\u{1F991}","\u{1F419}","\u{1F99E}","\u{1F990}","\u{1F99E}","\u{1F980}","\u{1F991}","\u{1F421}","\u{1F420}","\u{1F41F}","\u{1F42C}","\u{1F40B}","\u{1F988}","\u{1F40A}","\u{1F405}","\u{1F406}","\u{1F993}","\u{1F98D}","\u{1F418}","\u{1F98F}","\u{1F99B}","\u{1F9A7}","\u{1F9AE}","\u{1F9A2}","\u{1F9A9}","\u{1F99C}","\u{1F99A}","\u{1F989}","\u{1F9A4}","\u{1F99A}","\u{1F99C}","\u{1F987}"]},{label:"Food & Drink",icons:["\u{1F347}","\u{1F348}","\u{1F349}","\u{1F34A}","\u{1F34B}","\u{1F34C}","\u{1F34D}","\u{1F96D}","\u{1F34E}","\u{1F34F}","\u{1F350}","\u{1F351}","\u{1F352}","\u{1F353}","\u{1F95D}","\u{1F345}","\u{1F965}","\u{1F951}","\u{1F346}","\u{1F954}","\u{1F955}","\u{1F33D}","\u{1F336}\uFE0F","\u{1F952}","\u{1F96C}","\u{1F966}","\u{1F9C4}","\u{1F9C5}","\u{1F344}","\u{1F95C}","\u{1F330}","\u{1F35E}","\u{1F950}","\u{1F956}","\u{1F968}","\u{1F96F}","\u{1F95E}","\u{1F9C7}","\u{1F9C0}","\u{1F356}","\u{1F357}","\u{1F969}","\u{1F953}","\u{1F354}","\u{1F35F}","\u{1F355}","\u{1F32D}","\u{1F96A}","\u{1F32E}","\u{1F32F}","\u{1F959}","\u{1F9C6}","\u{1F95A}","\u{1F373}","\u{1F958}","\u{1F372}","\u{1F963}","\u{1F957}","\u{1F37F}","\u{1F9C8}","\u{1F9C2}","\u{1F96B}","\u{1F371}","\u{1F358}","\u{1F359}","\u{1F35A}","\u{1F35B}","\u{1F35C}","\u{1F35D}","\u{1F360}","\u{1F362}","\u{1F363}","\u{1F364}","\u{1F365}","\u{1F96E}","\u{1F361}","\u{1F95F}","\u{1F960}","\u{1F961}","\u{1F980}","\u{1F99E}","\u{1F990}","\u{1F991}","\u{1F366}","\u{1F367}","\u{1F368}","\u{1F369}","\u{1F36A}","\u{1F382}","\u{1F370}","\u{1F9C1}","\u{1F967}","\u{1F36B}","\u{1F36C}","\u{1F36D}","\u{1F36E}","\u{1F36F}","\u{1F37C}","\u{1F95B}","\u2615","\u{1F375}","\u{1F376}","\u{1F37E}","\u{1F377}","\u{1F378}","\u{1F379}","\u{1F37A}","\u{1F37B}","\u{1F942}","\u{1F943}","\u{1F964}","\u{1F9C3}","\u{1F9C9}","\u{1F9CA}","\u{1F962}","\u{1F37D}\uFE0F","\u{1F374}","\u{1F944}","\u{1F52A}","\u{1F3FA}"]},{label:"Activities",icons:["\u26BD","\u{1F3C0}","\u{1F3C8}","\u26BE","\u{1F94E}","\u{1F3BE}","\u{1F3D0}","\u{1F3C9}","\u{1F3B1}","\u{1FA80}","\u{1F3D3}","\u{1F3F8}","\u{1F3D2}","\u{1F3D1}","\u{1F94D}","\u{1F3CF}","\u26F3","\u{1F3F9}","\u{1F3A3}","\u{1F93F}","\u{1F94A}","\u{1F94B}","\u{1F3BD}","\u26F8\uFE0F","\u{1F3BF}","\u{1F6F7}","\u{1FA82}","\u{1F3CB}\uFE0F","\u{1F93C}","\u{1F938}","\u26F9\uFE0F","\u{1F93A}","\u{1F947}","\u{1F948}","\u{1F949}","\u{1F3C5}","\u{1F396}\uFE0F","\u{1F3C6}","\u{1F3F5}\uFE0F","\u{1F397}\uFE0F","\u{1F3AB}","\u{1F39F}\uFE0F","\u{1F3AA}","\u{1F939}","\u{1F3AD}","\u{1FA70}","\u{1F3A8}","\u{1F3AC}","\u{1F3A4}","\u{1F3A7}","\u{1F3BC}","\u{1F3B9}","\u{1F941}","\u{1F3B7}","\u{1F3BA}","\u{1F3B8}","\u{1FA95}","\u{1F3BB}","\u{1F3B2}","\u265F\uFE0F","\u{1F3AF}","\u{1F3B3}","\u{1F3AE}","\u{1F3B0}","\u{1F3B1}","\u{1F9E9}","\u{1F9F8}","\u2660\uFE0F","\u2665\uFE0F","\u2666\uFE0F","\u2663\uFE0F","\u{1F0CF}","\u{1F004}","\u{1F3B4}","\u{1F3AD}","\u{1F5BC}\uFE0F","\u{1F3A8}","\u{1F3BB}","\u{1F3A7}","\u{1F3AE}","\u{1F3A4}","\u{1F3AC}","\u{1F3A5}","\u{1F4F8}","\u{1F4F7}","\u{1F4F9}","\u{1F4FD}\uFE0F","\u{1F39E}\uFE0F","\u{1F4FA}","\u{1F4FB}","\u{1F399}\uFE0F","\u{1F39A}\uFE0F","\u{1F39B}\uFE0F","\u{1F9EF}","\u{1F525}","\u{1FAB5}","\u{1F6E2}\uFE0F","\u{1F489}","\u{1F48A}","\u{1F6AC}","\u26B0\uFE0F","\u{1FAA6}","\u26B1\uFE0F","\u{1F9F3}","\u{1F573}\uFE0F","\u{1F6C1}","\u{1F6C0}","\u{1F6BF}","\u{1FA92}","\u{1F9F4}"]},{label:"Travel & Places",icons:["\u{1F697}","\u{1F695}","\u{1F699}","\u{1F68C}","\u{1F68E}","\u{1F3CE}\uFE0F","\u{1F693}","\u{1F691}","\u{1F692}","\u{1F690}","\u{1F69A}","\u{1F69B}","\u{1F69C}","\u{1F9AF}","\u{1F9BD}","\u{1F9BC}","\u{1F6F4}","\u{1F6B2}","\u{1F6F5}","\u{1F3CD}\uFE0F","\u{1F6FA}","\u{1F6A8}","\u{1F694}","\u2708\uFE0F","\u{1F6E9}\uFE0F","\u{1F6EB}","\u{1F6EC}","\u{1FA82}","\u{1F681}","\u{1F680}","\u{1F6F8}","\u{1F6F0}\uFE0F","\u{1F69F}","\u{1F6A0}","\u{1F6A1}","\u{1F6CE}\uFE0F","\u{1F9F3}","\u231B","\u23F3","\u231A","\u23F0","\u23F1\uFE0F","\u23F2\uFE0F","\u{1F570}\uFE0F","\u{1F55B}","\u{1F567}","\u{1F550}","\u{1F55C}","\u{1F551}","\u{1F55D}","\u{1F552}","\u{1F55E}","\u{1F553}","\u{1F55F}","\u{1F554}","\u{1F560}","\u{1F555}","\u{1F561}","\u{1F556}","\u{1F562}","\u{1F557}","\u{1F563}","\u{1F558}","\u{1F564}","\u{1F559}","\u{1F565}","\u{1F55A}","\u{1F566}","\u{1F311}","\u{1F312}","\u{1F313}","\u{1F314}","\u{1F315}","\u{1F316}","\u{1F317}","\u{1F318}","\u{1F319}","\u{1F31A}","\u{1F31B}","\u{1F31C}","\u{1F321}\uFE0F","\u2600\uFE0F","\u{1F324}\uFE0F","\u26C5","\u{1F325}\uFE0F","\u{1F326}\uFE0F","\u{1F327}\uFE0F","\u26C8\uFE0F","\u{1F329}\uFE0F","\u{1F328}\uFE0F","\u2744\uFE0F","\u2603\uFE0F","\u26C4","\u{1F32C}\uFE0F","\u{1F4A8}","\u{1F300}","\u{1F32A}\uFE0F","\u{1F32B}\uFE0F","\u{1F308}","\u{1F302}","\u2602\uFE0F","\u2614","\u26F1\uFE0F","\u26A1","\u2764\uFE0F\u200D\u{1F525}","\u2764\uFE0F\u200D\u{1FA79}","\u{1F525}","\u{1F4A7}","\u{1F30A}","\u{1F3D6}\uFE0F"]},{label:"Flags",icons:["\u{1F3F3}\uFE0F","\u{1F3F4}","\u{1F3C1}","\u{1F6A9}","\u{1F3F3}\uFE0F\u200D\u{1F308}","\u{1F3F4}\u200D\u2620\uFE0F","\u{1F1E6}\u{1F1EB}","\u{1F1E6}\u{1F1FD}","\u{1F1E6}\u{1F1F1}","\u{1F1E9}\u{1F1FF}","\u{1F1E6}\u{1F1F8}","\u{1F1E6}\u{1F1E9}","\u{1F1E6}\u{1F1F4}","\u{1F1E6}\u{1F1EE}","\u{1F1E6}\u{1F1F6}","\u{1F1E6}\u{1F1EC}","\u{1F1E6}\u{1F1F7}","\u{1F1E6}\u{1F1F2}","\u{1F1E6}\u{1F1FC}","\u{1F1E6}\u{1F1FA}","\u{1F1E6}\u{1F1F9}","\u{1F1E6}\u{1F1FF}","\u{1F1E7}\u{1F1F8}","\u{1F1E7}\u{1F1ED}","\u{1F1E7}\u{1F1E9}","\u{1F1E7}\u{1F1E7}","\u{1F1E7}\u{1F1FE}","\u{1F1E7}\u{1F1EA}","\u{1F1E7}\u{1F1FF}","\u{1F1E7}\u{1F1EF}","\u{1F1E7}\u{1F1F2}","\u{1F1E7}\u{1F1F9}","\u{1F1E7}\u{1F1F4}","\u{1F1E7}\u{1F1E6}","\u{1F1E7}\u{1F1FC}","\u{1F1E7}\u{1F1F7}","\u{1F1EE}\u{1F1F4}","\u{1F1FB}\u{1F1EC}","\u{1F1E7}\u{1F1F3}","\u{1F1E7}\u{1F1EC}","\u{1F1E7}\u{1F1EB}","\u{1F1E7}\u{1F1EE}","\u{1F1F0}\u{1F1ED}","\u{1F1E8}\u{1F1F2}","\u{1F1E8}\u{1F1E6}","\u{1F1EE}\u{1F1E8}","\u{1F1E8}\u{1F1FB}","\u{1F1E7}\u{1F1F6}","\u{1F1F0}\u{1F1FE}","\u{1F1E8}\u{1F1EB}","\u{1F1F9}\u{1F1E9}","\u{1F1E8}\u{1F1F1}","\u{1F1E8}\u{1F1F3}","\u{1F1E8}\u{1F1FD}","\u{1F1E8}\u{1F1E8}","\u{1F1E8}\u{1F1F4}","\u{1F1F0}\u{1F1F2}","\u{1F1E8}\u{1F1EC}","\u{1F1E8}\u{1F1E9}","\u{1F1E8}\u{1F1F0}","\u{1F1E8}\u{1F1F7}","\u{1F1E8}\u{1F1EE}","\u{1F1ED}\u{1F1F7}","\u{1F1E8}\u{1F1FA}","\u{1F1E8}\u{1F1FC}","\u{1F1E8}\u{1F1FE}","\u{1F1E8}\u{1F1FF}","\u{1F1E9}\u{1F1F0}","\u{1F1E9}\u{1F1EF}","\u{1F1E9}\u{1F1F2}","\u{1F1E9}\u{1F1F4}","\u{1F1EA}\u{1F1E8}","\u{1F1EA}\u{1F1EC}","\u{1F1F8}\u{1F1FB}","\u{1F3F4}\u200D\u2620\uFE0F","\u{1F1EC}\u{1F1F6}","\u{1F1EA}\u{1F1F7}","\u{1F1EA}\u{1F1EA}","\u{1F1F8}\u{1F1FF}","\u{1F1EA}\u{1F1F9}","\u{1F1EA}\u{1F1FA}","\u{1F1EB}\u{1F1F0}","\u{1F1EB}\u{1F1F4}","\u{1F1EB}\u{1F1EF}","\u{1F1EB}\u{1F1EE}","\u{1F1EB}\u{1F1F7}","\u{1F1EC}\u{1F1EB}","\u{1F1F5}\u{1F1EB}","\u{1F1F9}\u{1F1EB}","\u{1F1EC}\u{1F1E6}","\u{1F1EC}\u{1F1F2}","\u{1F1EC}\u{1F1EA}","\u{1F1E9}\u{1F1EA}","\u{1F1EC}\u{1F1ED}","\u{1F1EC}\u{1F1EE}","\u{1F1EC}\u{1F1F7}","\u{1F1EC}\u{1F1F1}","\u{1F1EC}\u{1F1E9}","\u{1F1EC}\u{1F1F5}","\u{1F1EC}\u{1F1FA}","\u{1F1EC}\u{1F1F9}","\u{1F1EC}\u{1F1EC}","\u{1F1EC}\u{1F1F3}","\u{1F1EC}\u{1F1FC}","\u{1F1EC}\u{1F1FE}","\u{1F1ED}\u{1F1F9}","\u{1F1ED}\u{1F1F3}","\u{1F1ED}\u{1F1F0}","\u{1F1ED}\u{1F1FA}","\u{1F1EE}\u{1F1F8}","\u{1F1EE}\u{1F1F3}","\u{1F1EE}\u{1F1E9}","\u{1F1EE}\u{1F1F7}","\u{1F1EE}\u{1F1F6}","\u{1F1EE}\u{1F1EA}","\u{1F1EE}\u{1F1F2}","\u{1F1EE}\u{1F1F1}","\u{1F1EE}\u{1F1F9}","\u{1F1EF}\u{1F1F2}","\u{1F1EF}\u{1F1F5}","\u{1F38C}","\u{1F1EF}\u{1F1EA}","\u{1F1EF}\u{1F1F4}","\u{1F1F0}\u{1F1FF}","\u{1F1F0}\u{1F1EA}","\u{1F1F0}\u{1F1EE}","\u{1F1FD}\u{1F1F0}","\u{1F1F0}\u{1F1FC}","\u{1F1F0}\u{1F1EC}","\u{1F1F1}\u{1F1E6}","\u{1F1F1}\u{1F1FB}","\u{1F1F1}\u{1F1E7}","\u{1F1F1}\u{1F1F8}","\u{1F1F1}\u{1F1F7}","\u{1F1F1}\u{1F1FE}","\u{1F1F1}\u{1F1EE}","\u{1F1F1}\u{1F1F9}","\u{1F1F1}\u{1F1FA}","\u{1F1F2}\u{1F1F4}","\u{1F1F2}\u{1F1F0}","\u{1F1F2}\u{1F1EC}","\u{1F1F2}\u{1F1FC}","\u{1F1F2}\u{1F1FE}","\u{1F1F2}\u{1F1FB}","\u{1F1F2}\u{1F1F1}","\u{1F1F2}\u{1F1F9}","\u{1F1F2}\u{1F1ED}","\u{1F1F2}\u{1F1F6}","\u{1F1F2}\u{1F1F7}","\u{1F1F2}\u{1F1FA}","\u{1F1FE}\u{1F1F9}","\u{1F1F2}\u{1F1FD}","\u{1F1EB}\u{1F1F2}","\u{1F1F2}\u{1F1E9}","\u{1F1F2}\u{1F1E8}","\u{1F1F2}\u{1F1F3}","\u{1F1F2}\u{1F1EA}","\u{1F1F2}\u{1F1F8}","\u{1F1F2}\u{1F1E6}","\u{1F1F2}\u{1F1FF}","\u{1F1F2}\u{1F1F2}","\u{1F1F3}\u{1F1E6}","\u{1F1F3}\u{1F1F7}","\u{1F1F3}\u{1F1F5}","\u{1F1F3}\u{1F1F1}","\u{1F1F3}\u{1F1E8}","\u{1F1F3}\u{1F1FF}","\u{1F1F3}\u{1F1EE}","\u{1F1F3}\u{1F1EA}","\u{1F1F3}\u{1F1EC}","\u{1F1F3}\u{1F1FA}","\u{1F1F3}\u{1F1EB}","\u{1F1F0}\u{1F1F5}","\u{1F1F2}\u{1F1F5}","\u{1F1F3}\u{1F1F4}","\u{1F1F4}\u{1F1F2}","\u{1F1F5}\u{1F1F0}","\u{1F1F5}\u{1F1FC}","\u{1F1F5}\u{1F1F8}","\u{1F1F5}\u{1F1E6}","\u{1F1F5}\u{1F1EC}","\u{1F1F5}\u{1F1FE}","\u{1F1F5}\u{1F1EA}","\u{1F1F5}\u{1F1ED}","\u{1F1F5}\u{1F1F3}","\u{1F1F5}\u{1F1F1}"]}],yt=[{label:"Punctuation",icons:["!","@","#","$","%","&","*","+","=","|","-","_",":",";","?","~","`","/","\\"]},{label:"Brackets",icons:["(",")","[","]","{","}"]},{label:"Quotes",icons:["'",'"',"\u2018","\u2019","\u201C","\u201D","\xBB"]},{label:"Currency Symbols",icons:["$","\u20AC","\xA3","\xA5","\xA2","\u20B9"]},{label:"Math Symbols",icons:["\xB1","\xB5","\xB6","\u2122","\xA9","\xAE","\xA7","\xBC","\xBD","\xBE"]},{label:"Comparison & Logic",icons:["<",">"]},{label:"Miscellaneous",icons:["^","\xB5"]}],ae={"arial, sans-serif":"<p style='user-select: none; font-family: arial, sans-serif;'>Sans Serif</p>","times new roman, serif":"<p style='user-select: none; font-family: &quot;times new roman&quot;, serif;'>Times New Roman</p>",monospace:"<p style='user-select: none; font-family: monospace;'>Fixed Width</p>","arial black, sans-serif":"<p style='user-select: none; font-family: &quot;arial black&quot;, sans-serif;'>Wide</p>","arial narrow, sans-serif":"<p style='user-select: none; font-family: &quot;arial narrow&quot;, sans-serif;'>Narrow</p>","comic sans ms, sans-serif":"<p style='user-select: none; font-family: &quot;comic sans ms&quot;, sans-serif;'>Comic Sans MS</p>","garamond, times new roman, serif":"<p style='user-select: none; font-family: garamond, &quot;times new roman&quot;, serif;'>Garamond</p>","georgia, serif":"<p style='user-select: none; font-family: georgia, serif;'>Georgia</p>","tahoma, sans-serif":"<p style='user-select: none; font-family: tahoma, sans-serif;'>Tahoma</p>","trebuchet ms, sans-serif":"<p style='user-select: none; font-family: &quot;trebuchet ms&quot;, sans-serif;'>Trebuchet MS</p>","verdana, sans-serif":"<p style='user-select: none; font-family: verdana, sans-serif;'>Verdana</p>","calibri, sans-serif":"<p style='user-select: none; font-family: calibri, sans-serif;'>Calibri</p>"},ze={1:"<p style='user-select: none; font-size: 10px'>10px</p>",2:"<p style='user-select: none; font-size: 13px'>13px</p>",3:"<p style='user-select: none; font-size: 16px'>16px</p>",4:"<p style='user-select: none; font-size: 18px'>18px</p>",5:"<p style='user-select: none; font-size: 24px'>24px</p>",6:"<p style='user-select: none; font-size: 32px'>32px</p>",7:"<p style='user-select: none; font-size: 48px'>48px</p>"},$e={1:"<p style='user-select: none;'>10px</p>",2:"<p style='user-select: none;'>13px</p>",3:"<p style='user-select: none;'>16px</p>",4:"<p style='user-select: none;'>18px</p>",5:"<p style='user-select: none;'>24px</p>",6:"<p style='user-select: none;'>32px</p>",7:"<p style='user-select: none;'>48px</p>"},Fe={h1:"<h1>Heading 1</h1>",h2:"<h2>Heading 2</h2>",h3:"<h3>Heading 3</h3>",h4:"<h4>Heading 4</h4>",h5:"<h5>Heading 5</h5>",h6:"<h6>Heading 6</h6>",p:"<p>Paragraph<p>"},Ct={h1:"Heading 1",h2:"Heading 2",h3:"Heading 3",h4:"Heading 4",h5:"Heading 5",h6:"Heading 6",p:"Paragraph"},vt="iVBORw0KGgoAAAANSUhEUgAAAMgAAAAqCAIAAAB5toNAAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAABehJREFUeNrsmj9MY0cQxsmJnGhyIF0D5CRAkU5IKTAiBR2kowABTVpTXSiR0tDZNEkVBXfQuaQDKxSkwjQ5ijsBHUeD0Z1OpEACpSHXOD97dJPJPvv5+Q8EXeaTZfbt2zc7b+bbmdk1XV0Oh8PhcDgcDofD4XA4HA6Hw/E/xWduAotyebPxoLM/u34+4++3u7vF9+/daDXxyE3g8Ih15xgu/ch36vhd6vht3TF/PU5fPaVxcnV1/eFD/s2b/NmZmy5At5vAojRUYUwp/3In+2u9MdODg+nZWRpjTyuDm82G09PTw1XQPq6iVCq55T/5Imuz8snOxTFjcLD84oV+inNz2YkJPvGC+/r68vn89fV1OYJisZhKpSzz7N1sNiv9NMp1gNidnR0etDMi1o4J9Inehd+2B22DR5jCDmBJeI11h5gaGMhMTGRiiQVvcFs6ne7t7a0hYWrq6OhoaWmpZR0QOz8/v7+/H2VDcgQKoK1lKm2miBnvxOowjv54Vnz7FZ8YVhEealLKYmVlpX1lYMP6+nprz6JkLpezPSpKwq29tba2Fh+xHE2nwgDfffnLbH+GT4zDgsxFTiGv4TbNPjgJ57WcCgNIAddsKhQCBQlR6B5MnYRSLUasnp4erUAd8aU6mU4vLy4uxsfHFxYWcBU+w4CLi4sHBwcMo05qbj//ESMjIycnJ8GkrWmLDkGCQ0+kZTKZ5Emw8a5Q14rg8PBwb2+PxszMzOTkpHTe3t7SCYWXl5dhmwbP1dVV1gSPSC7AlFtbWzwVcFH0toZgxTASscHs9BONeSWVwBjkM8s/BwHDw/adRTe0QmEaogw6cFmsoiPUefJ44Fl3tfS+XGtYuHAZLPedKtrayZZKcJQCy9qhZWmYpVAoaDlFBreSkyfBBscNsh8WcuAS2qOjozSYnjY+gxOQBhdyicP6+/svLy8Zwy0eEV9yyYDT01Me5K6w00I7kYBR+BZb6+zCEquSyGd2oZeVhigEoonoBkFRgLYqjCc6xaqK6T/vf/7FVN1DL+NjwpXMiw6Bt9RnwXJKCE2jcUk+kg1jqnhMVLMoJDQm1PBRw9hYqkIcj4dkg4OBuIX/iC406FT+yTC+ca28MMaFVcqPkkHQiTRrJp0dMJftRCCDaWjstDSVR66rkKjANySDsnp5T3tGkwc7e141/RHwIKis2yyrowmxqSTY3AGp+A+f4fVAb3wMhyQmQSkoyDdjUlXwCHFCgwoks5SXtlRsErHkxaztbCqMZoFoPWFfXpiKQFaCCEe9ZquZh4maMQ/c3Ny0H49Ze1R+dlU0uxPsTrIslEASeOBBzTgsxGK8MEmylUQOG2+iysFLZQNCNFfaqFaTDYEmQSqESSgjOqOPRNMgb941rHv0FJR3oV+tNzY21sEZqbc6snLwyPn5uc3jTaXppDUWAUnIgaflYEaKHvwn8Uk4QadscBgsPNO7atPoepJoJDU+D2o5FV8MMTWPaJKNpkIZQCwUdqrY+wRTK7GoWvA6+xsMosu1Xr3VAohVsKFeomf/GBTpQUCKah5z2S6xpKAJ4gHaYyCphaUwlxgj2VDrLSnnGWOJZYMTsNmNYVJxa1QTWgSDpROxkn+jzGNS+vuqoPHfJj7cnE6nberHnup7WUstx0LLEhH7cLJ8dzxno4oSDzY2NnA/fhU2aPSSS1uEkXe41DyojYC72i8EFWrWXCJWlERTG4dkE2CVZ4C+Qs3Z74FY7KQ02RG0tre3SSsS+Bsex8dXKX5M+CmfvP/wvLg5UeZTbwAEqvnbcxQSyxOevCc5kWr25D16QmF/KW/KkP5b4Z1DKioKoPhhuVyunZ+QHxr8/7HuiVvUhRSmxKShoaHgbqFQoKLXkGD3jLZqpmH772dL2/LZmP8HaSQVVk5sdrvq/6NfNBXKyfv3rxMZM/iNtYO/ATwoOLH+jd9/qy7Pd131/zU5wNe9M0+6K/uYlz8Nu/2cWHXwqtz6s9+4Mb14dzgcDofD4XA4HA6Hw+FwOBwOh+Nu8LcAAwC2lFXNWxcl3QAAAABJRU5ErkJggg==",Ue={Row:{"":["insert-row-above","insert-row-below","delete-row","row-background-color"]},Column:{"":["insert-column-left","insert-column-right","delete-column","fixed-column-width","column-background-color"]},Merge:{"":["merge-cell-up","merge-cell-right","merge-cell-down","merge-cell-left","split-cell-vertical","split-cell-horizontal"]},"Cell Property":{Dimension:["cell-width","cell-height","cell-padding"],Border:["cell-border-full","cell-border-top","cell-border-right","cell-border-bottom","cell-border-left","cell-border-none","border-color"],Background:["background-color"]},"Table Property":{Alignment:["align-left","align-center","align-right"]}},Ge={1:`${L.NEW_LIST_NUMBER} Number`,a:`${L.LIST_LOWER_ALPHA} Lower Alpha`,i:`${L.LIST_LOWER_ROMAN} Lower Roman`,A:`${L.LIST_UPPER_ALPHA} Upper Alpha`},Ye={Disc:`${L.LIST_DISC} Disc`,Circle:`${L.LIST_CIRCLE} Circle`,Square:`${L.LIST_SQUARE} Square`},je=10,Xe=["H1","H2","H3","H4","H5","H6","P"],qe=["1","a","i","A"],Ke=["disc","circle","square"],Qe=["#E53935","#8E24AA","#1E88E5","#00897B","#6D4C41","#D81B60","#F09300","#00ACC1","#7CB342","#C0CA33","#F4511E","#039BE5","#0B8043","#3F51B5","#E67C73","#33B679","#8D6E63","#616161","#AD1457","#F6BF26"];var Je={search:async(t,e,n=1)=>{try{let o=await fetch(`https://api.giphy.com/v1/gifs/search?api_key=${t.giphyApiKey}&q=${encodeURIComponent(e)}&limit=50&offset=${(n-1)*50}`);if(o.ok){let{data:a,pagination:s}=await o.json();return{images:a.map(i=>({src:i.images.fixed_height_small.url})),totalPages:Math.ceil(s.total_count/50)||1}}return{images:[],totalPages:1}}catch(o){console.error(o)}},suggestions:async(t,e=1)=>{try{let n=await fetch(`https://api.giphy.com/v1/gifs/trending?api_key=${t.giphyApiKey}&limit=10&offset=${(e-1)*10}`);if(n.ok){let{data:o,pagination:a}=await n.json();return{images:o.map(s=>({src:s.images.fixed_height_small.url})),totalPages:Math.ceil(a.total_count/10)||1}}return{images:[],totalPages:1}}catch(n){console.error(n)}}},et={search:async(t,e,n=1)=>{try{let o=await fetch(`https://api.pexels.com/v1/search?query=${encodeURIComponent(e)}&per_page=50&page=${n}`,{headers:{Authorization:t.pexelsApiKey}});if(o.ok){let{photos:a,total_results:s}=await o.json();return{images:a.map(i=>({src:i.src.medium})),totalPages:Math.ceil(s/50)||1}}else return{images:[],totalPages:1}}catch(o){console.error(o)}},suggestions:async(t,e=1)=>{try{let n=await fetch(`https://api.pexels.com/v1/curated?per_page=10&page=${e}`,{headers:{Authorization:t.pexelsApiKey}});if(n.ok){let{photos:o,total_results:a}=await n.json();return{images:o.map(s=>({src:s.src.medium})),totalPages:Math.ceil(a/10)||1}}else return{images:[],totalPages:1}}catch(n){console.error(n)}}},tt={search:async(t,e,n="")=>{try{let o=await fetch(`https://tenor.googleapis.com/v2/search?q=${encodeURIComponent(e)}&key=${t.tenorApiKey}&limit=50&pos=${n}`);if(o.ok){let a=await o.json();return{images:a.results.map(s=>({src:s.media_formats.webp.url})),next:a.next}}else return{images:[],next:""}}catch(o){console.error(o)}},suggestions:async(t,e="")=>{try{let n=await fetch(`https://tenor.googleapis.com/v2/featured?key=${t.tenorApiKey}&limit=10&pos=${e}`);if(n.ok){let o=await n.json();return{images:o.results.map(a=>({src:a.media_formats.webp.url})),next:o.next}}else return{images:[],next:""}}catch(n){console.error(n)}}};import{DiffDOM as En}from"diff-dom";import{v4 as kn}from"uuid";import{v4 as ye}from"uuid";var Et=(t,e)=>{if(!e.showTabs)return;let n=document.createElement("div");n.className="tabs-container",t.elements.tabsContainer=n,t.elements.placeholder.style.visibility="hidden",t.elements.iframeWindow.body.style.display="flex",t.elements.iframeWindow.body.prepend(n),B(t,e)},ce=(t,e,n=null)=>{for(let o=0;o<t.length;o++){if(t[o].tabId===e)return{list:t,index:o,parent:n};if(t[o].children){let a=ce(t[o].children,e,t[o]);if(a)return a}}return null},P=(t,e)=>{for(let n of t){if(n.tabId===e)return n;if(n.children){let o=P(n.children,e);if(o)return o}}return null},wt=(t,e,n)=>{let o=P(t,e);return o!=null&&o.children?P(o.children,n)!==null:!1},B=(t,e)=>{if(!t.elements.tabsContainer)return;t.onChange(t.html),t.elements.tabsContainer.innerHTML="";let n=(m,u,r)=>{m.forEach(c=>{let p=document.createElement("div");p.className="tab-item",p.classList.toggle("active",c.tabId===t.state.currentTabId),p.draggable=!0,p.ondragstart=w=>{w.stopPropagation(),t.state.draggedTabId=c.tabId,w.dataTransfer.effectAllowed="move",p.style.opacity="0.5"},p.ondragend=w=>{w.stopPropagation(),delete t.state.draggedTabId,p.style.opacity="1",B(t,e)},p.ondragover=w=>{w.preventDefault(),w.stopPropagation();let v=t.state.draggedTabId;if(!v||v===c.tabId||wt(t.state.tabs,v,c.tabId))return;let T=p.getBoundingClientRect(),R=w.clientY-T.top,H=T.height;p.style.borderTop="",p.style.borderBottom="1px solid #eee",p.style.background="",R<H*.25?p.style.borderTop="2px solid var(--primary)":R>H*.75?p.style.borderBottom="2px solid var(--primary)":p.style.background="rgba(0,0,0,0.05)"},p.ondragleave=w=>{w.stopPropagation(),p.style.borderTop="",p.style.borderBottom="1px solid #eee",p.style.background=""},p.ondrop=w=>{w.preventDefault(),w.stopPropagation();let v=t.state.draggedTabId;if(!v||v===c.tabId||wt(t.state.tabs,v,c.tabId)||r>1)return;let T=p.getBoundingClientRect(),R=w.clientY-T.top,H=T.height;R<H*.25?Lt(t,v,c.tabId,"before",e):R>H*.75?Lt(t,v,c.tabId,"after",e):Tt(t,v,c.tabId,e)};let g;p.onclick=()=>{clearTimeout(g),g=setTimeout(()=>{c.tabId===t.state.currentTabId&&(c.showOutlines=!c.showOutlines,B(t,e)),me(t,c.tabId,e)},250)},p.ondblclick=()=>{e.disabled||(clearTimeout(g),Rt(t,c.tabId,h,e))};let f=document.createElement("div");f.className="left",f.style.paddingLeft=`${r*12}px`;let b=c.children&&c.children.length>0,y=document.createElement("span");y.style.width="20px",y.style.height="20px",y.style.marginRight="4px",y.style.cursor="pointer",y.style.transition="transform 0.2s",b&&(y.innerHTML=L.ARROW_DROP_DOWN_FILL,y.style.transform=c.isExpanded?"rotate(0deg)":"rotate(-90deg)",y.onclick=w=>{w.stopPropagation(),c.isExpanded=!c.isExpanded,B(t,e)});let h=document.createElement("input");h.value=c.tabTitle||"Untitled Tab",h.disabled=!0,h.className="tab-input";let x=document.createElement("span");x.className="tab-icons tab-dropdown",x.innerHTML=L.MORE,x.onclick=w=>{w.stopPropagation(),yn(t,c,w,r,e)};let C=document.createElement("span");C.className="tab-icons",C.innerHTML=L.TABLE_OF_CONTENT,f.appendChild(y),f.appendChild(C),f.appendChild(h),p.appendChild(f),e.disabled||p.appendChild(x);let E=document.createElement("div");E.id=c.tabId,E.appendChild(p);let k=document.createElement("div");if(k.className="outline-items",k.style.paddingLeft=`${32+r*12}px`,E.appendChild(k),ot(t,e,c,k),u.appendChild(E),t.elements.tabs[c.tabId]=E,c.children&&c.children.length>0&&c.isExpanded){let w=document.createElement("div");n(c.children,w,r+1),u.appendChild(w)}})},o=document.createElement("div");o.className="tab-items",o.addEventListener("scroll",()=>{t.state.tabItemsScrollHeight=o.scrollTop}),n(t.state.tabs,o,0),t.elements.tabsContainer.appendChild(o),o.scrollTop=t.state.tabItemsScrollHeight||0;let a=document.createElement("span");a.className="tab-header";let s=document.createElement("span");s.innerHTML="Tabs";let i=document.createElement("div"),l=document.createElement("button");l.className="tab-add-button",l.type="button",l.innerHTML=L.PLUS,l.onclick=()=>kt(t,e);let d=document.createElement("button");d.className="tab-expand-button",d.type="button",d.innerHTML=L.ARROW_DOWN,d.onclick=()=>{t.state.isTabExpandInResponsive=!t.state.isTabExpandInResponsive,d.classList.toggle("show"),o.classList.toggle("show")},requestAnimationFrame(()=>{o.classList.add("animate")}),t.state.isTabExpandInResponsive&&(d.classList.add("show"),o.classList.add("show")),e.disabled||i.appendChild(l),i.appendChild(d),a.appendChild(s),a.appendChild(i),t.elements.tabsContainer.prepend(a)},yn=(t,e,n,o,a)=>{let s=t.elements.iframeWindow.getElementById("leksy-editor-tab-context-menu");s&&s.remove();let i=document.createElement("div");i.id="leksy-editor-tab-context-menu",i.style.visibility="hidden",i.style.display="block";let l=C=>{i.contains(C.target)||(i.remove(),t.elements.iframeWindow.removeEventListener("click",l))},d=(C,E,k)=>{let w=document.createElement("div");return w.innerHTML=E+C,w.className="tab-menu-item",w.onclick=v=>{v.stopPropagation(),i.remove(),t.elements.iframeWindow.removeEventListener("click",l),k()},w},m=(C,E)=>{let k=document.createElement("div");k.className="tab-menu-item",k.style.position="relative";let w=document.createElement("span");w.innerHTML=L.PLAY_LIST+C;let v=document.createElement("span");v.innerHTML=L.ARROW_DROP_RIGHT,v.style.width="20px",v.style.height="20px",v.style.marginLeft="4px",v.style.display="flex",v.style.alignItems="center",k.appendChild(w),k.appendChild(v);let T;return k.onmouseenter=()=>{T=document.createElement("div"),T.className="tab-submenu",T.style.position="absolute",T.style.left="100%",T.style.top="0",T.style.visibility="hidden",E.forEach(N=>{let _=d(N.tabTitle,L.TABLE_OF_CONTENT,()=>{Tt(t,e.tabId,N.tabId,a)});N.level>0&&(_.style.paddingLeft=`${16+N.level*10}px`),T.appendChild(_)}),k.appendChild(T);let R=T.getBoundingClientRect(),H=k.getBoundingClientRect(),M=t.elements.iframeWindow.documentElement.clientWidth,I=t.elements.iframeWindow.documentElement.clientHeight;R.right>M&&(T.style.left="auto",T.style.right="100%"),R.bottom>I&&(T.style.top=`${I-H.top-R.height}px`),T.style.visibility="visible"},k.onmouseleave=()=>{T&&T.remove(),T=null},k},u=ce(t.state.tabs,e.tabId);o<2&&i.appendChild(d("Add subtab",L.PLUS,()=>wn(t,e,a))),i.appendChild(d("Duplicate",L.COPY,()=>vn(t,e,a))),i.appendChild(d("Rename",L.PENCIL_LINE,()=>{let C=n.target.closest(".tab-item");if(C){let E=C.querySelector("input");E&&Rt(t,e.tabId,E,a)}})),i.appendChild(d("Delete",L.DELETE,()=>Cn(t,e.tabId,a))),i.appendChild(d("Move up",L.ARROW_UP,()=>xt(t,e.tabId,"up",a))),i.appendChild(d("Move down",L.ARROW_DOWN_LONG,()=>xt(t,e.tabId,"down",a)));let r=(C,E,k=0)=>{let w=[];for(let v of C)v.tabId===E||k>1||(w.push({tabId:v.tabId,tabTitle:v.tabTitle,level:k}),v.children&&(w=w.concat(r(v.children,E,k+1))));return w},c=r(t.state.tabs,e.tabId);c.length>0&&i.appendChild(m("Move into",c)),u!=null&&u.parent&&i.appendChild(d("Move out",L.DELETE,()=>xn(t,e.tabId,a))),i.appendChild(d(e.showOutlines?"Hide outlines":"Show outlines",L.LIST_BULLETS,()=>{e.showOutlines=!e.showOutlines,B(t,a),e.showOutlines&&me(t,e.tabId,a)})),t.elements.iframeWindow.body.appendChild(i),t.elements.iframeWindow.addEventListener("click",l);let p=i.getBoundingClientRect(),g=p.width,f=p.height,b=t.elements.iframeWindow.documentElement.clientWidth,y=t.elements.iframeWindow.documentElement.clientHeight,h=n.clientX,x=n.clientY;h+g>b&&(h=n.clientX-g),x+f>y&&(x=n.clientY-f),i.style.left=`${h}px`,i.style.top=`${x}px`,i.style.visibility="visible"},kt=(t,e)=>{if(e.disabled)return;let n=P(t.state.tabs,t.state.currentTabId);n&&(n.content=t.elements.editor.innerHTML);let o={tabTitle:`Tab ${t.state.tabs.length+1}`,tabId:ye(),content:"<div><br></div>",children:[]};t.state.tabs.push(o),t.history.tabs[o.tabId]={stack:[],currentIndex:-1},me(t,o.tabId,e),t.onLocalSyncChanges({type:"tabs:structure",tabs:structuredClone(t.state.tabs)})},me=(t,e,n)=>{if(t.state.currentTabId===e)return;pe(n,t),te(n,t),ie(t);let o=P(t.state.tabs,t.state.currentTabId);o&&(o.content=t.elements.editor.innerHTML),t.state.runtimeDom[t.state.currentTabId]=t.elements.editor.cloneNode(!0);let a=P(t.state.tabs,e);if(a){let s=t.state.runtimeDom[e];t.state.currentTabId=a.tabId,t.elements.editor.innerHTML=s?s.innerHTML:a.content,t.state.previousDOM=t.elements.editor.cloneNode(!0),t.html=t.elements.editor.innerHTML,t.state.runtimeDom[e]||(t.state.runtimeDom[e]=t.elements.editor.cloneNode(!0),t.onLocalSyncChanges({type:"tabs:create",tabId:e,editorHTML:t.elements.editor.outerHTML})),B(t,n),t.updateCaretPosition(),t.elements.editor.focus(),t.elements.editorCursor&&(t.elements.editorCursor.innerHTML=""),t.onLocalSyncChanges({type:"tabs:switch",tabId:a.tabId})}},Cn=(t,e,n)=>{let o=m=>{var u;delete t.state.runtimeDom[m.tabId],(u=m.children)!=null&&u.length&&m.children.forEach(o)},a=m=>{var u;delete t.history.tabs[m.tabId],(u=m.children)!=null&&u.length&&m.children.forEach(a)},s=m=>{let u=m.findIndex(r=>r.tabId===e);if(u>-1)return m.splice(u,1),!0;for(let r of m)if(r.children&&s(r.children))return!0;return!1},i=P(t.state.tabs,e);if(!i)return;o(i),a(i);let l=m=>m.tabId===t.state.currentTabId?!0:m.children?m.children.some(u=>l(u)):!1,d=l(i);s(t.state.tabs),d?t.state.tabs.length>0?me(t,t.state.tabs[0].tabId,n):kt(t,n):B(t,n),t.onLocalSyncChanges({type:"tabs:structure",tabs:structuredClone(t.state.tabs)})},vn=(t,e,n)=>{let o=structuredClone(e);o.tabId=ye(),o.tabTitle=`${o.tabTitle} (Copy)`;let a=i=>{i.tabId=ye(),t.history.tabs[i.tabId]={stack:[],currentIndex:-1},i.children&&i.children.forEach(a)};o.children&&o.children.forEach(a),t.history.tabs[o.tabId]={stack:[],currentIndex:-1};let s=i=>{let l=i.findIndex(d=>d.tabId===e.tabId);if(l>-1)return i.splice(l+1,0,o),!0;for(let d of i)if(d.children&&s(d.children))return!0;return!1};s(t.state.tabs),B(t,n),t.onLocalSyncChanges({type:"tabs:structure",tabs:structuredClone(t.state.tabs)})},wn=(t,e,n)=>{var a;let o={tabTitle:`Subtab ${(((a=e.children)==null?void 0:a.length)||0)+1}`,tabId:ye(),content:"<div><br></div>",children:[]};t.history.tabs[o.tabId]={stack:[],currentIndex:-1},e.children||(e.children=[]),e.children.push(o),e.isExpanded=!0,B(t,n),me(t,o.tabId,n),t.onLocalSyncChanges({type:"tabs:structure",tabs:structuredClone(t.state.tabs)})},xt=(t,e,n,o)=>{let a=s=>{let i=s.findIndex(l=>l.tabId===e);if(i>-1)return n==="up"&&i>0?([s[i-1],s[i]]=[s[i],s[i-1]],!0):n==="down"&&i<s.length-1?([s[i],s[i+1]]=[s[i+1],s[i]],!0):!1;for(let l of s)if(l.children&&a(l.children))return!0;return!1};a(t.state.tabs)&&(B(t,o),t.onLocalSyncChanges({type:"tabs:structure",tabs:structuredClone(t.state.tabs)}))},Lt=(t,e,n,o,a)=>{let s=ce(t.state.tabs,e);if(!s)return;let[i]=s.list.splice(s.index,1),l=ce(t.state.tabs,n);l?o==="before"?l.list.splice(l.index,0,i):l.list.splice(l.index+1,0,i):s.list.splice(s.index,0,i),B(t,a),t.onLocalSyncChanges({type:"tabs:structure",tabs:structuredClone(t.state.tabs)})},Tt=(t,e,n,o)=>{let a=ce(t.state.tabs,e);if(!a)return;let[s]=a.list.splice(a.index,1),i=P(t.state.tabs,n);i&&(i.children||(i.children=[]),i.children.push(s),i.isExpanded=!0),B(t,o),t.onLocalSyncChanges({type:"tabs:structure",tabs:structuredClone(t.state.tabs)})},xn=(t,e,n)=>{let o=ce(t.state.tabs,e);if(!o)return;let{list:a,index:s,parent:i}=o;if(i){let l=ce(t.state.tabs,i.tabId);if(!l)return;let{list:d,index:m}=l,u=a[s];a.splice(s,1),d.splice(m+1,0,u),B(t,n),t.onLocalSyncChanges({type:"tabs:structure",tabs:structuredClone(t.state.tabs)})}},Rt=(t,e,n,o)=>{let a=P(t.state.tabs,e);if(!a)return;n.disabled=!1,n.style.pointerEvents="auto",n.style.outline="1px solid gray",n.onclick=l=>l.stopPropagation();let s=!1,i=()=>{s||(s=!0,n.value.trim()&&(a.tabTitle=n.value.trim()),B(t,o),t.onLocalSyncChanges({type:"tabs:structure",tabs:structuredClone(t.state.tabs)}))};n.onblur=i,n.onkeydown=l=>{l.key==="Enter"&&i()},n.focus(),n.select()},Ln=t=>{let e=new Set,n=o=>{o.forEach(a=>{(!a.tabId||e.has(a.tabId))&&(a.tabId=ye()),a.content||(a.content="<div><br></div>"),a.tabTitle||(a.tabTitle="Untitled Tab"),e.add(a.tabId),a.children&&a.children.length>0&&n(a.children)})};n(t)},nt=t=>{let e=[];return Array.isArray(t)&&t.length?(Ln(t),e=t):e=[{tabTitle:"Tab 1",tabId:ye(),content:typeof t=="string"?t:"<div><br></div>",children:[]}],e};var At=new En,Tn=t=>{var n;if(!(t!=null&&t.style))return;Array.from(t.style).forEach(o=>{F.BLOCKED_STYLES.test(o)&&t.style.removeProperty(o)}),(n=t.getAttribute("style"))!=null&&n.trim()||t.removeAttribute("style")},It=(t,e,n)=>{var a,s;if(!(t!=null&&t.childNodes))return;let o=t.childNodes;for(let i=o.length-1;i>=0;i--){let l=o[i];if(l.nodeType===Node.ELEMENT_NODE)if(!F.WHILE_LISTED_TAG.test(l.tagName))l.parentNode.removeChild(l);else{let d=[];for(let m of l.attributes)(!F.WHILE_LISTED_ATTRIBUTES.test(m.name)||m.value.includes("var("))&&d.push(m.name);if(e!=null&&e.disablePastedColorStyles){let m=l.style,u=m.backgroundColor,r=m.color,c=(s=(a=n==null?void 0:n.state)==null?void 0:a.range)==null?void 0:s.startContainer,p=Rn(c);p&&(p!=null&&p.startsWith("rgb"))&&(p=Ce(p)),u&&(u!=null&&u.startsWith("rgb"))&&(u=Ce(u)),r&&(r!=null&&r.startsWith("rgb"))&&(r=Ce(r)),p===u&&l.style.removeProperty("background-color"),p===r&&l.style.removeProperty("color")}e!=null&&e.removeColorsWhilePasting&&(l.style.removeProperty("background-color"),l.style.removeProperty("color")),Tn(l),d.forEach(m=>l.removeAttribute(m)),It(l,e,n)}}},Rn=t=>{var o,a;if(!(t instanceof Element))return null;let e=t;for(;e;){let s=(o=window==null?void 0:window.getComputedStyle(e))==null?void 0:o.backgroundColor;if(s!=="rgba(0, 0, 0, 0)"&&s!=="transparent"&&s!=="")return s;e=e!==document.body?e.parentElement:null}return(a=window==null?void 0:window.getComputedStyle(document.body))==null?void 0:a.backgroundColor},Ee=(t,e,n)=>{let o=document.createElement("div");return o.innerHTML=t,It(o,e,n),o.innerHTML},ke=(t,e)=>{let n=null;return(...o)=>{n&&clearTimeout(n),n=setTimeout(async()=>{t(...o),n=null},e)}};function Mt(t,e){let n=null,o=!1,a=!1,s=[];function i(...l){if(o){s=l,a=!0;return}else clearTimeout(n),s=[],a=!1;return new Promise(d=>{n=setTimeout(async()=>{o=!0,await t(...l),d(),o=!1,a&&i(...s)},e)})}return i}function Hn(){let t=navigator.userAgent;return/iPad|iPhone|iPod/.test(t)&&!window.MSStream?"IOS":/Android/.test(t)?"ANDROID":/Macintosh/.test(t)?"MAC":/Windows/.test(t)?"WINDOWS":/Linux/.test(t)?"LINUX":"Unknown"}function Me(t){let e=t.parentElement;for(;e&&e!==document.body;){let o=getComputedStyle(e).overflowX;if(o==="auto"||o==="scroll"||o==="hidden")return e;e=e.parentElement}return document.body}var Nt=t=>{document.addEventListener("mouseover",e=>{let n=e.target.closest(`.${t.classPrefix}${A.TOOLBAR_ITEM}`);if(!n)return;let o=n.getBoundingClientRect(),a=o.bottom+2,s=o.left+o.width/2;s=Math.max(68,Math.min(s,window.innerWidth-68)),n.style.setProperty("--leksy-editor-top",`${a}px`),n.style.setProperty("--leksy-editor-left",`${s}px`)})},Te=(t,e)=>{var n;return((n=e==null?void 0:e.customTooltip)==null?void 0:n[t.pluginId])??t.title},Re=(t,e)=>{var n;return((n=e==null?void 0:e.customIcon)==null?void 0:n[t.pluginId])??t.icon},St=(t,e,n)=>{let o=document.createElement("button");o.type="button",o.className=`${e.classPrefix}${A.TOOLBAR_ITEM} ${t.type==="reset-color"?"reset-color":""}`,o.dataset.title=Te(t,e),o.dataset.type="button",o.onclick=s=>{s.preventDefault(),t.click(s,n,e)};let a=document.createElement("div");return a.innerHTML=Re(t,e),o.appendChild(a),o},Ot=(t,e,n)=>{let o=document.createElement("button");o.type="button",o.className=`${e.classPrefix}${A.TOOLBAR_ITEM} ${t.type==="button-select"?A.TOOLBAR_ITEM_BUTTON_SELECT:""}`,o.dataset.title=Te(t,e),o.dataset.type="button",o.onclick=l=>{l.preventDefault(),t.mainClick(l,n,e)};let a=document.createElement("div");a.innerHTML=Re(t,e),o.appendChild(a);let s=st({...t,icon:""},e,n),i=document.createElement("div");return i.dataset.type="button-select",i.style.display="flex",i.appendChild(o),i.appendChild(s),i},_t=(t,e,n)=>{let o=document.createElement("div");o.className=`${e.classPrefix}${A.TOOLBAR_ITEM} ${A.TOOLBAR_ITEM_COLOR}`,o.dataset.title=Te(t,e),o.dataset.type="color";let a=document.createElement("input");a.type="color",a.onclick=()=>{Hn()!=="IOS"&&n.elements.editor.focus()},a.onchange=i=>{i.preventDefault(),t.change(i,n,e)};let s=document.createElement("div");return s.innerHTML=Re(t,e),s.onclick=()=>a.click(),o.append(a,s),o},Bt=(t,e,n)=>{let o=(c,p)=>{!p&&(c.target.getAttribute("data-toolbar-option")||i.contains(c.target))||(m.style.display="none",document.removeEventListener("mousedown",o,!1),n.elements.editor.removeEventListener("click",o,!1))},a=c=>{(n.state.page==1&&!n.state.next||!n.state.page&&!n.state.next)&&(u.innerHTML=""),c.forEach(p=>{let g=document.createElement("img");g.src=p.src,g.style.width="120px",g.style.height="120px",g.style.cursor="pointer",g.style.margin="2px",g.onclick=f=>{let b=document.createElement("img");if(b.src=p.src,p!=null&&p.url){let y=document.createElement("a");y.href=p.url,y.target="_blank",y.appendChild(b),n.insertNode(y)}else n.insertNode(b);n.updateCaretPosition(),n.elements.editor.focus(),e.closePluginOnClick&&o(f,!0)},u.appendChild(g)})},s=c=>{u.innerHTML="",JSON.parse(JSON.stringify(e.labels)).map(g=>(g.fields=g.fields.filter(f=>f.name.toLowerCase().includes(c.toLowerCase())),g)).filter(g=>g.fields.length).forEach(g=>{let f=document.createElement("div");f.textContent=g.name,u.append(f),g.fields.forEach(b=>{let y=document.createElement("button");y.type="button",y.textContent=b.name,y.onclick=h=>{n.elements.editor.focus();let x=document.createElement("span");x.spellcheck=!1,x.contentEditable=!1,x.innerText=b.name,x.setAttribute("data-id",b.value),n.insertNode(x),n.updateCaretPosition(),e.closePluginOnClick&&o(h,!0)},u.append(y)})})},i=document.createElement("div");i.setAttribute("data-type","dropdown");let l=document.createElement("button");l.type="button",l.className=`${e.classPrefix}${A.TOOLBAR_ITEM}`,l.setAttribute("data-title",Te(t,e));let d=document.createElement("div");d.innerHTML=Re(t,e),l.appendChild(d);let m=document.createElement("div");m.className=`${e.classPrefix}${A.DROPDOWN_CONTENT} ${t.type}`;let u=document.createElement("div");if(t.type==="dropdown")t.options.forEach(c=>{let p=document.createElement("button");p.type="button",p.textContent=c.label,p.setAttribute("data-value",c.value),p.setAttribute("data-toolbar-option",!0),p.addEventListener("click",function(g){m.style.display="none",t.click(g,n,e)}),m.appendChild(p)});else if(t.type==="gallery"){let c=document.createElement("input");c.placeholder="Search...";let p=async(b="",y)=>{let h;b?h=await t.search(e,b,y):h=await t.suggestions(e,y),h.totalPages&&(n.state.totalPages=h.totalPages),h.next&&(n.state.next=h.next),a(h.images)},g=Mt(async b=>{n.state.page=1,n.state.next="",n.state.currentSearch=b,t.title=="Tenor"?await p(b,""):await p(b,1)},300);c.oninput=b=>g(b.target.value),m.addEventListener("scroll",async()=>{n.state.isFetching||m.scrollTop+m.clientHeight>=m.scrollHeight-10&&(n.state.next&&(n.state.isFetching=!0,await p(n.state.currentSearch,n.state.next),n.state.isFetching=!1),n.state.totalPages&&n.state.page<n.state.totalPages&&(n.state.isFetching=!0,n.state.page+=1,await p(n.state.currentSearch,n.state.page),n.state.isFetching=!1))});let f=document.createElement("div");if(f.className="footer",t.title==="GIPHY"){let b=document.createElement("img");b.src=`data:image/png;base64,${vt}`,b.alt="Powered By GIPHY",f.append(b)}else f.innerHTML=`<span>Powered By ${t.title}</span>`;f.style.position="sticky",f.style.bottom="0",f.style.width="100%",f.style.background="#f1f1f1",f.style.textAlign="center",f.style.height="44px",f.style.display="flex",f.style.alignItems="center",f.style.justifyContent="center",f.style.overflow="hidden",m.append(c,u,f)}else if(t.type==="category")t.categories.forEach(c=>{let p=document.createElement("div");p.textContent=c.label,m.append(p),c.icons.forEach(g=>{let f=document.createElement("span");f.textContent=g,f.onclick=b=>{n.elements.editor.focus(),n.elements.iframeWindow.execCommand("insertText",!1,g),e.closePluginOnClick&&o(b,!0)},m.append(f)})});else if(t.type==="mention"){let c=document.createElement("input");c.placeholder="Search...",c.oninput=p=>s(p.target.value),m.append(c,u),s("")}else if(t.type==="table"){let g=document.createElement("div");g.className="toolbar-table-wrapper";let f=document.createElement("label");f.style.display="block",f.style.marginBottom="8px";let b=document.createElement("input");b.type="checkbox",b.checked=!0,b.style.marginRight="6px",f.appendChild(b),f.appendChild(document.createTextNode("Include header row")),g.appendChild(f);let y=document.createElement("div");y.className=`${e.classPrefix}${A.TOOLBAR_TABLE}`;for(let h=0;h<10;h++)for(let x=0;x<10;x++){let C=document.createElement("div");C.className="cell",C.setAttribute("data-row",h),C.setAttribute("data-col",x),x===0&&C.setAttribute("tabIndex","0"),C.addEventListener("mouseover",()=>{y.querySelectorAll(".cell").forEach(k=>{let w=parseInt(k.getAttribute("data-row")),v=parseInt(k.getAttribute("data-col"));w<=h&&v<=x?k.classList.add("selected"):k.classList.remove("selected")})}),C.addEventListener("click",()=>{t.create(n,e,{rows:h,cols:x,header:b.checked}),m.style.display="none"}),y.appendChild(C)}g.appendChild(y),m.appendChild(g)}let r=!1;return l.onclick=()=>{if(m.style.display==="block"){m.style.display="none",document.removeEventListener("mousedown",o,!1),n.elements.editor.removeEventListener("click",o,!1);return}m.style.display="block";let p=Me(m).getBoundingClientRect(),g=m.getBoundingClientRect(),f=g.right>p.right,b=g.left<p.left;f?m.style.right="10px":b&&(m.style.left="10px"),!r&&t.type==="gallery"&&t.suggestions(e).then(y=>{r=!0,y.totalPages&&(n.state.totalPages=y.totalPages,n.state.next=""),y.next&&(n.state.next=y.next,n.state.totalPages=null),a(y.images)}),document.addEventListener("mousedown",o),n.elements.editor.addEventListener("click",o)},i.appendChild(l),i.appendChild(m),i},st=(t,e,n)=>{let o=r=>{r.target.getAttribute("data-toolbar-option")||a.contains(r.target)||(m.style.display="none",document.removeEventListener("mousedown",o,!1),n.elements.editor.removeEventListener("click",o,!1))},a=document.createElement("div");a.dataset.type="select";let s=document.createElement("button");s.type="button",s.className=`${e.classPrefix}${A.TOOLBAR_ITEM} ${A.TOOLBAR_ITEM_SELECT} ${t.type==="button-select"?A.TOOLBAR_ITEM_BUTTON_SELECT:""}`,s.dataset.title=t.type=="button-select"?"Options":Te(t,e);let i=document.createElement("div");i.style.width=t.width,i.style.textAlign="left",i.style.display="flex",i.style.justifyContent="space-between";let l=document.createElement("span");l.innerHTML=Re(t,e);let d=document.createElement("span");t.type=="button-select"?d.innerHTML=L.ARROW_DROP_DOWN_FILL:(d.innerHTML=L.ARROW_DOWN,d.style.paddingLeft="8px"),i.append(l,d),s.append(i);let m=document.createElement("div");m.className=`${e.classPrefix}${A.DROPDOWN_CONTENT}`;let u=structuredClone(t.options);if(t.pluginId==="font"&&e.additionalFonts){let r=e.additionalFonts.map(c=>({label:`<span style="font-family: '${c.fontFamily}';">${c.name}</span>`,value:c.fontFamily}));u.push(...r)}return u.forEach(r=>{let c=document.createElement("button");c.type="button",c.innerHTML=r.label,c.setAttribute("data-value",r.value),c.setAttribute("data-toolbar-option",!0),c.addEventListener("click",function(p){m.style.display="none",t.click(r.value,n,e)}),m.appendChild(c)}),s.onclick=()=>{if(m.style.display==="block"){m.style.display="none",document.removeEventListener("mousedown",o,!1),n.elements.editor.removeEventListener("click",o,!1);return}m.style.display="block";let c=Me(m).getBoundingClientRect(),p=m.getBoundingClientRect(),g=p.right>c.right,f=p.left<c.left;g?m.style.right="10px":f&&(m.style.left="10px"),document.addEventListener("mousedown",o),n.elements.editor.addEventListener("click",o)},a.appendChild(s),a.appendChild(m),a},Pt=(t,e,{type:n,td:o,image:a,updateImage:s,updateTable:i})=>{let l=c=>{d.contains(c.target)||(r.style.display="none",document.removeEventListener("mousedown",l,!1),e.elements.editor.removeEventListener("click",l,!1))},d=document.createElement("div");d.setAttribute("data-type","popover");let m=document.createElement("button");m.type="button",m.className=`${t.classPrefix}${A.TOOLBAR_ITEM}`,m.setAttribute("data-title",`Edit ${n==="td"?"Cell":n==="image"?"Image":"Embed"}`);let u=document.createElement("div");u.innerHTML=L.EDIT,m.appendChild(u);let r=document.createElement("div");if(r.className=`${t.classPrefix}${A.POPOVER_CONTENT}`,n==="image"||n==="figure"){let c={byPercentage:Math.random(),byPixels:Math.random(),percentageWidth:Math.random(),percentageHeight:Math.random(),pixelsWidth:Math.random(),pixelsHeight:Math.random(),percentage:Math.random(),pixels:Math.random(),aspectRatio:Math.random(),altText:Math.random(),submit:Math.random()};r.innerHTML=`
378
+ `},ft=[{icon:"100%",title:"Resize 100%",event:"100%"},{icon:"75%",title:"Resize 75%",event:"75%"},{icon:"50%",title:"Resize 50%",event:"50%"},{icon:L.ALIGN_LEFT,title:"Left aligned image",event:"wrap-left"},{icon:L.ALIGN_RIGHT,title:"Right aligned image",event:"wrap-right"},{icon:L.REVERT,title:"Revert",event:"revert"},{icon:L.AUTO_SIZE,title:"Auto size",event:"auto"},{icon:L.DELETE,title:"Delete",event:"delete"}],bt=[{icon:L.INSERT_ROW_ABOVE,title:"Insert Row Above",event:"insert-row-above"},{icon:L.INSERT_ROW_BELOW,title:"Insert Row Below",event:"insert-row-below"},{icon:L.DELETE_ROW,title:"Delete Row",event:"delete-row"},{icon:L.MERGE_CELLS_HORIZONTAL,title:"Merge Row",event:"merge-cells-horizontal"},{icon:L.INSERT_COLUMN_LEFT,title:"Insert Column Left",event:"insert-column-left"},{icon:L.INSERT_COLUMN_RIGHT,title:"Insert Column Right",event:"insert-column-right"},{icon:L.DELETE_COLUMN,title:"Delete Column",event:"delete-column"},{icon:L.MERGE_CELLS_VERTICAL,title:"Merge Up",event:"merge-cell-up"},{icon:L.MERGE_CELLS_HORIZONTAL,title:"Merge Right",event:"merge-cell-right"},{icon:L.MERGE_CELLS_VERTICAL,title:"Merge Down",event:"merge-cell-down"},{icon:L.MERGE_CELLS_HORIZONTAL,title:"Merge Left",event:"merge-cell-left"},{icon:L.SPLIT_CELLS_VERTICAL,title:"Split Vertically",event:"split-cell-vertical"},{icon:L.SPLIT_CELLS_HORIZONTAL,title:"Split Horizontally",event:"split-cell-horizontal"},{icon:L.CELL_WIDTH,title:"Cell Width (px)",event:"cell-width"},{icon:L.CELL_HEIGHT,title:"Cell Height (px)",event:"cell-height"},{icon:L.CELL_PADDING,title:"Cell Padding (px)",event:"cell-padding"},{icon:L.ALIGN_LEFT,title:"Align Left",event:"align-left"},{icon:L.ALIGN_CENTER,title:"Align Center",event:"align-center"},{icon:L.ALIGN_RIGHT,title:"Align Right",event:"align-right"},{icon:L.CELL_BORDER_FULL,title:"Border Full",event:"cell-border-full"},{icon:L.CELL_BORDER_TOP,title:"Border Top",event:"cell-border-top"},{icon:L.CELL_BORDER_RIGHT,title:"Border Right",event:"cell-border-right"},{icon:L.CELL_BORDER_BOTTOM,title:"Border Bottom",event:"cell-border-bottom"},{icon:L.CELL_BORDER_LEFT,title:"Border Left",event:"cell-border-left"},{icon:L.CELL_BORDER_FULL,title:"Border None",event:"cell-border-none"},{icon:L.FIXED_COLUMN_WIDTH,title:"Fixed Column",event:"fixed-column-width"},{icon:L.COLOR,title:"Cell Border Color",event:"border-color"},{icon:L.COLOR,title:"Cell Background Color",event:"background-color"},{icon:L.COLOR,title:"Row Background Color",event:"row-background-color"},{icon:L.COLOR,title:"Column Background Color",event:"column-background-color"}],yt=[{label:"Smileys & Emotion",icons:["\u{1F600}","\u{1F603}","\u{1F604}","\u{1F601}","\u{1F606}","\u{1F605}","\u{1F602}","\u{1F923}","\u{1F60A}","\u{1F607}","\u{1F642}","\u{1F643}","\u{1F609}","\u{1F60C}","\u{1F60D}","\u{1F970}","\u{1F618}","\u{1F617}","\u{1F619}","\u{1F61A}","\u{1F60B}","\u{1F61B}","\u{1F61C}","\u{1F61D}","\u{1F911}","\u{1F917}","\u{1F929}","\u{1F914}","\u{1F972}","\u{1F636}\u200D\u{1F32B}\uFE0F","\u{1F614}","\u{1F62A}","\u{1F924}","\u{1F634}","\u{1F637}","\u{1F912}","\u{1F915}","\u{1F922}","\u{1F92E}","\u{1F927}","\u{1F975}","\u{1F976}","\u{1F974}","\u{1F635}","\u{1F92F}","\u{1F920}","\u{1F973}","\u{1F60E}","\u{1F913}","\u{1F9D0}"]},{label:"People & Body",icons:["\u{1F476}","\u{1F9D2}","\u{1F466}","\u{1F467}","\u{1F9D1}","\u{1F471}","\u{1F468}","\u{1F9D4}","\u{1F469}","\u{1F471}\u200D\u2640\uFE0F","\u{1F469}\u200D\u{1F9B0}","\u{1F468}\u200D\u{1F9B0}","\u{1F469}\u200D\u{1F9B1}","\u{1F468}\u200D\u{1F9B1}","\u{1F469}\u200D\u{1F9B2}","\u{1F468}\u200D\u{1F9B2}","\u{1F9D4}","\u{1F475}","\u{1F9D3}","\u{1F474}","\u{1F472}","\u{1F473}\u200D\u2640\uFE0F","\u{1F473}\u200D\u2642\uFE0F","\u{1F9D5}","\u{1F46E}\u200D\u2640\uFE0F","\u{1F46E}\u200D\u2642\uFE0F","\u{1F477}\u200D\u2640\uFE0F","\u{1F477}\u200D\u2642\uFE0F","\u{1F482}\u200D\u2640\uFE0F","\u{1F482}\u200D\u2642\uFE0F","\u{1F575}\uFE0F\u200D\u2640\uFE0F","\u{1F575}\uFE0F\u200D\u2642\uFE0F","\u{1F469}\u200D\u2695\uFE0F","\u{1F468}\u200D\u2695\uFE0F","\u{1F469}\u200D\u{1F33E}","\u{1F468}\u200D\u{1F33E}","\u{1F469}\u200D\u{1F373}","\u{1F468}\u200D\u{1F373}","\u{1F469}\u200D\u{1F393}","\u{1F468}\u200D\u{1F393}","\u{1F469}\u200D\u{1F3A4}","\u{1F468}\u200D\u{1F3A4}","\u{1F469}\u200D\u{1F3EB}","\u{1F468}\u200D\u{1F3EB}","\u{1F469}\u200D\u{1F3ED}","\u{1F468}\u200D\u{1F3ED}","\u{1F469}\u200D\u{1F4BB}","\u{1F468}\u200D\u{1F4BB}","\u{1F469}\u200D\u{1F4BC}","\u{1F468}\u200D\u{1F4BC}","\u{1F469}\u200D\u{1F527}","\u{1F468}\u200D\u{1F527}","\u{1F469}\u200D\u{1F52C}","\u{1F468}\u200D\u{1F52C}","\u{1F469}\u200D\u{1F3A8}","\u{1F468}\u200D\u{1F3A8}","\u{1F469}\u200D\u{1F692}","\u{1F468}\u200D\u{1F692}","\u{1F469}\u200D\u2708\uFE0F","\u{1F468}\u200D\u2708\uFE0F","\u{1F469}\u200D\u{1F680}","\u{1F468}\u200D\u{1F680}","\u{1F469}\u200D\u2696\uFE0F","\u{1F468}\u200D\u2696\uFE0F","\u{1F470}","\u{1F935}","\u{1F478}","\u{1F934}","\u{1F936}","\u{1F385}","\u{1F9D9}\u200D\u2640\uFE0F","\u{1F9D9}\u200D\u2642\uFE0F","\u{1F9DD}\u200D\u2640\uFE0F","\u{1F9DD}\u200D\u2642\uFE0F","\u{1F9DB}\u200D\u2640\uFE0F","\u{1F9DB}\u200D\u2642\uFE0F","\u{1F9DF}\u200D\u2640\uFE0F","\u{1F9DF}\u200D\u2642\uFE0F","\u{1F9DE}\u200D\u2640\uFE0F","\u{1F9DE}\u200D\u2642\uFE0F","\u{1F9DC}\u200D\u2640\uFE0F","\u{1F9DC}\u200D\u2642\uFE0F","\u{1F9DA}\u200D\u2640\uFE0F","\u{1F9DA}\u200D\u2642\uFE0F","\u{1F47C}","\u{1F930}","\u{1F931}","\u{1F647}\u200D\u2640\uFE0F","\u{1F647}\u200D\u2642\uFE0F","\u{1F481}\u200D\u2640\uFE0F","\u{1F481}\u200D\u2642\uFE0F","\u{1F645}\u200D\u2640\uFE0F","\u{1F645}\u200D\u2642\uFE0F","\u{1F646}\u200D\u2640\uFE0F","\u{1F646}\u200D\u2642\uFE0F","\u{1F64B}\u200D\u2640\uFE0F","\u{1F64B}\u200D\u2642\uFE0F","\u{1F9CF}\u200D\u2640\uFE0F","\u{1F9CF}\u200D\u2642\uFE0F","\u{1F64E}\u200D\u2640\uFE0F","\u{1F64E}\u200D\u2642\uFE0F","\u{1F64D}\u200D\u2640\uFE0F","\u{1F64D}\u200D\u2642\uFE0F","\u{1F487}\u200D\u2640\uFE0F","\u{1F487}\u200D\u2642\uFE0F","\u{1F486}\u200D\u2640\uFE0F","\u{1F486}\u200D\u2642\uFE0F","\u{1F9D6}\u200D\u2640\uFE0F","\u{1F9D6}\u200D\u2642\uFE0F","\u{1F485}","\u{1F933}","\u{1F483}","\u{1F57A}","\u{1F46F}\u200D\u2640\uFE0F","\u{1F46F}\u200D\u2642\uFE0F","\u{1F574}\uFE0F","\u{1F6B6}\u200D\u2640\uFE0F","\u{1F6B6}\u200D\u2642\uFE0F","\u{1F3C3}\u200D\u2640\uFE0F","\u{1F3C3}\u200D\u2642\uFE0F","\u{1F46B}","\u{1F46D}","\u{1F46C}","\u{1F491}","\u{1F469}\u200D\u2764\uFE0F\u200D\u{1F469}","\u{1F469}\u200D\u2764\uFE0F\u200D\u{1F468}","\u{1F468}\u200D\u2764\uFE0F\u200D\u{1F468}","\u{1F469}\u200D\u2764\uFE0F\u200D\u{1F48B}\u200D\u{1F469}","\u{1F469}\u200D\u2764\uFE0F\u200D\u{1F48B}\u200D\u{1F468}","\u{1F468}\u200D\u2764\uFE0F\u200D\u{1F48B}\u200D\u{1F468}","\u{1F469}\u200D\u2764\uFE0F\u200D\u{1F48B}\u200D\u{1F468}","\u{1F468}\u200D\u2764\uFE0F\u200D\u{1F48B}\u200D\u{1F468}","\u{1F469}\u200D\u2764\uFE0F\u200D\u{1F48B}\u200D\u{1F469}"]},{label:"Animals & Nature",icons:["\u{1F436}","\u{1F431}","\u{1F42D}","\u{1F439}","\u{1F430}","\u{1F98A}","\u{1F43B}","\u{1F43C}","\u{1F428}","\u{1F42F}","\u{1F981}","\u{1F42E}","\u{1F437}","\u{1F438}","\u{1F419}","\u{1F435}","\u{1F984}","\u{1F41E}","\u{1F98B}","\u{1F41D}","\u{1F993}","\u{1F418}","\u{1F98F}","\u{1F98D}","\u{1F42A}","\u{1F42B}","\u{1F992}","\u{1F998}","\u{1F43F}\uFE0F","\u{1F994}","\u{1F991}","\u{1F99E}","\u{1F980}","\u{1F421}","\u{1F420}","\u{1F41F}","\u{1F42C}","\u{1F433}","\u{1F40B}","\u{1F988}","\u{1F40A}","\u{1F405}","\u{1F406}","\u{1F993}","\u{1F98D}","\u{1F418}","\u{1F98F}","\u{1F99B}","\u{1F9A7}","\u{1F9AE}","\u{1F9A2}","\u{1F9A9}","\u{1F99C}","\u{1F99A}","\u{1F989}","\u{1F9A4}","\u{1F99A}","\u{1F99C}","\u{1F987}","\u{1F43A}","\u{1F417}","\u{1F434}","\u{1F984}","\u{1F41D}","\u{1F98B}","\u{1F40C}","\u{1F980}","\u{1F991}","\u{1F419}","\u{1F99E}","\u{1F990}","\u{1F99E}","\u{1F980}","\u{1F991}","\u{1F421}","\u{1F420}","\u{1F41F}","\u{1F42C}","\u{1F40B}","\u{1F988}","\u{1F40A}","\u{1F405}","\u{1F406}","\u{1F993}","\u{1F98D}","\u{1F418}","\u{1F98F}","\u{1F99B}","\u{1F9A7}","\u{1F9AE}","\u{1F9A2}","\u{1F9A9}","\u{1F99C}","\u{1F99A}","\u{1F989}","\u{1F9A4}","\u{1F99A}","\u{1F99C}","\u{1F987}"]},{label:"Food & Drink",icons:["\u{1F347}","\u{1F348}","\u{1F349}","\u{1F34A}","\u{1F34B}","\u{1F34C}","\u{1F34D}","\u{1F96D}","\u{1F34E}","\u{1F34F}","\u{1F350}","\u{1F351}","\u{1F352}","\u{1F353}","\u{1F95D}","\u{1F345}","\u{1F965}","\u{1F951}","\u{1F346}","\u{1F954}","\u{1F955}","\u{1F33D}","\u{1F336}\uFE0F","\u{1F952}","\u{1F96C}","\u{1F966}","\u{1F9C4}","\u{1F9C5}","\u{1F344}","\u{1F95C}","\u{1F330}","\u{1F35E}","\u{1F950}","\u{1F956}","\u{1F968}","\u{1F96F}","\u{1F95E}","\u{1F9C7}","\u{1F9C0}","\u{1F356}","\u{1F357}","\u{1F969}","\u{1F953}","\u{1F354}","\u{1F35F}","\u{1F355}","\u{1F32D}","\u{1F96A}","\u{1F32E}","\u{1F32F}","\u{1F959}","\u{1F9C6}","\u{1F95A}","\u{1F373}","\u{1F958}","\u{1F372}","\u{1F963}","\u{1F957}","\u{1F37F}","\u{1F9C8}","\u{1F9C2}","\u{1F96B}","\u{1F371}","\u{1F358}","\u{1F359}","\u{1F35A}","\u{1F35B}","\u{1F35C}","\u{1F35D}","\u{1F360}","\u{1F362}","\u{1F363}","\u{1F364}","\u{1F365}","\u{1F96E}","\u{1F361}","\u{1F95F}","\u{1F960}","\u{1F961}","\u{1F980}","\u{1F99E}","\u{1F990}","\u{1F991}","\u{1F366}","\u{1F367}","\u{1F368}","\u{1F369}","\u{1F36A}","\u{1F382}","\u{1F370}","\u{1F9C1}","\u{1F967}","\u{1F36B}","\u{1F36C}","\u{1F36D}","\u{1F36E}","\u{1F36F}","\u{1F37C}","\u{1F95B}","\u2615","\u{1F375}","\u{1F376}","\u{1F37E}","\u{1F377}","\u{1F378}","\u{1F379}","\u{1F37A}","\u{1F37B}","\u{1F942}","\u{1F943}","\u{1F964}","\u{1F9C3}","\u{1F9C9}","\u{1F9CA}","\u{1F962}","\u{1F37D}\uFE0F","\u{1F374}","\u{1F944}","\u{1F52A}","\u{1F3FA}"]},{label:"Activities",icons:["\u26BD","\u{1F3C0}","\u{1F3C8}","\u26BE","\u{1F94E}","\u{1F3BE}","\u{1F3D0}","\u{1F3C9}","\u{1F3B1}","\u{1FA80}","\u{1F3D3}","\u{1F3F8}","\u{1F3D2}","\u{1F3D1}","\u{1F94D}","\u{1F3CF}","\u26F3","\u{1F3F9}","\u{1F3A3}","\u{1F93F}","\u{1F94A}","\u{1F94B}","\u{1F3BD}","\u26F8\uFE0F","\u{1F3BF}","\u{1F6F7}","\u{1FA82}","\u{1F3CB}\uFE0F","\u{1F93C}","\u{1F938}","\u26F9\uFE0F","\u{1F93A}","\u{1F947}","\u{1F948}","\u{1F949}","\u{1F3C5}","\u{1F396}\uFE0F","\u{1F3C6}","\u{1F3F5}\uFE0F","\u{1F397}\uFE0F","\u{1F3AB}","\u{1F39F}\uFE0F","\u{1F3AA}","\u{1F939}","\u{1F3AD}","\u{1FA70}","\u{1F3A8}","\u{1F3AC}","\u{1F3A4}","\u{1F3A7}","\u{1F3BC}","\u{1F3B9}","\u{1F941}","\u{1F3B7}","\u{1F3BA}","\u{1F3B8}","\u{1FA95}","\u{1F3BB}","\u{1F3B2}","\u265F\uFE0F","\u{1F3AF}","\u{1F3B3}","\u{1F3AE}","\u{1F3B0}","\u{1F3B1}","\u{1F9E9}","\u{1F9F8}","\u2660\uFE0F","\u2665\uFE0F","\u2666\uFE0F","\u2663\uFE0F","\u{1F0CF}","\u{1F004}","\u{1F3B4}","\u{1F3AD}","\u{1F5BC}\uFE0F","\u{1F3A8}","\u{1F3BB}","\u{1F3A7}","\u{1F3AE}","\u{1F3A4}","\u{1F3AC}","\u{1F3A5}","\u{1F4F8}","\u{1F4F7}","\u{1F4F9}","\u{1F4FD}\uFE0F","\u{1F39E}\uFE0F","\u{1F4FA}","\u{1F4FB}","\u{1F399}\uFE0F","\u{1F39A}\uFE0F","\u{1F39B}\uFE0F","\u{1F9EF}","\u{1F525}","\u{1FAB5}","\u{1F6E2}\uFE0F","\u{1F489}","\u{1F48A}","\u{1F6AC}","\u26B0\uFE0F","\u{1FAA6}","\u26B1\uFE0F","\u{1F9F3}","\u{1F573}\uFE0F","\u{1F6C1}","\u{1F6C0}","\u{1F6BF}","\u{1FA92}","\u{1F9F4}"]},{label:"Travel & Places",icons:["\u{1F697}","\u{1F695}","\u{1F699}","\u{1F68C}","\u{1F68E}","\u{1F3CE}\uFE0F","\u{1F693}","\u{1F691}","\u{1F692}","\u{1F690}","\u{1F69A}","\u{1F69B}","\u{1F69C}","\u{1F9AF}","\u{1F9BD}","\u{1F9BC}","\u{1F6F4}","\u{1F6B2}","\u{1F6F5}","\u{1F3CD}\uFE0F","\u{1F6FA}","\u{1F6A8}","\u{1F694}","\u2708\uFE0F","\u{1F6E9}\uFE0F","\u{1F6EB}","\u{1F6EC}","\u{1FA82}","\u{1F681}","\u{1F680}","\u{1F6F8}","\u{1F6F0}\uFE0F","\u{1F69F}","\u{1F6A0}","\u{1F6A1}","\u{1F6CE}\uFE0F","\u{1F9F3}","\u231B","\u23F3","\u231A","\u23F0","\u23F1\uFE0F","\u23F2\uFE0F","\u{1F570}\uFE0F","\u{1F55B}","\u{1F567}","\u{1F550}","\u{1F55C}","\u{1F551}","\u{1F55D}","\u{1F552}","\u{1F55E}","\u{1F553}","\u{1F55F}","\u{1F554}","\u{1F560}","\u{1F555}","\u{1F561}","\u{1F556}","\u{1F562}","\u{1F557}","\u{1F563}","\u{1F558}","\u{1F564}","\u{1F559}","\u{1F565}","\u{1F55A}","\u{1F566}","\u{1F311}","\u{1F312}","\u{1F313}","\u{1F314}","\u{1F315}","\u{1F316}","\u{1F317}","\u{1F318}","\u{1F319}","\u{1F31A}","\u{1F31B}","\u{1F31C}","\u{1F321}\uFE0F","\u2600\uFE0F","\u{1F324}\uFE0F","\u26C5","\u{1F325}\uFE0F","\u{1F326}\uFE0F","\u{1F327}\uFE0F","\u26C8\uFE0F","\u{1F329}\uFE0F","\u{1F328}\uFE0F","\u2744\uFE0F","\u2603\uFE0F","\u26C4","\u{1F32C}\uFE0F","\u{1F4A8}","\u{1F300}","\u{1F32A}\uFE0F","\u{1F32B}\uFE0F","\u{1F308}","\u{1F302}","\u2602\uFE0F","\u2614","\u26F1\uFE0F","\u26A1","\u2764\uFE0F\u200D\u{1F525}","\u2764\uFE0F\u200D\u{1FA79}","\u{1F525}","\u{1F4A7}","\u{1F30A}","\u{1F3D6}\uFE0F"]},{label:"Flags",icons:["\u{1F3F3}\uFE0F","\u{1F3F4}","\u{1F3C1}","\u{1F6A9}","\u{1F3F3}\uFE0F\u200D\u{1F308}","\u{1F3F4}\u200D\u2620\uFE0F","\u{1F1E6}\u{1F1EB}","\u{1F1E6}\u{1F1FD}","\u{1F1E6}\u{1F1F1}","\u{1F1E9}\u{1F1FF}","\u{1F1E6}\u{1F1F8}","\u{1F1E6}\u{1F1E9}","\u{1F1E6}\u{1F1F4}","\u{1F1E6}\u{1F1EE}","\u{1F1E6}\u{1F1F6}","\u{1F1E6}\u{1F1EC}","\u{1F1E6}\u{1F1F7}","\u{1F1E6}\u{1F1F2}","\u{1F1E6}\u{1F1FC}","\u{1F1E6}\u{1F1FA}","\u{1F1E6}\u{1F1F9}","\u{1F1E6}\u{1F1FF}","\u{1F1E7}\u{1F1F8}","\u{1F1E7}\u{1F1ED}","\u{1F1E7}\u{1F1E9}","\u{1F1E7}\u{1F1E7}","\u{1F1E7}\u{1F1FE}","\u{1F1E7}\u{1F1EA}","\u{1F1E7}\u{1F1FF}","\u{1F1E7}\u{1F1EF}","\u{1F1E7}\u{1F1F2}","\u{1F1E7}\u{1F1F9}","\u{1F1E7}\u{1F1F4}","\u{1F1E7}\u{1F1E6}","\u{1F1E7}\u{1F1FC}","\u{1F1E7}\u{1F1F7}","\u{1F1EE}\u{1F1F4}","\u{1F1FB}\u{1F1EC}","\u{1F1E7}\u{1F1F3}","\u{1F1E7}\u{1F1EC}","\u{1F1E7}\u{1F1EB}","\u{1F1E7}\u{1F1EE}","\u{1F1F0}\u{1F1ED}","\u{1F1E8}\u{1F1F2}","\u{1F1E8}\u{1F1E6}","\u{1F1EE}\u{1F1E8}","\u{1F1E8}\u{1F1FB}","\u{1F1E7}\u{1F1F6}","\u{1F1F0}\u{1F1FE}","\u{1F1E8}\u{1F1EB}","\u{1F1F9}\u{1F1E9}","\u{1F1E8}\u{1F1F1}","\u{1F1E8}\u{1F1F3}","\u{1F1E8}\u{1F1FD}","\u{1F1E8}\u{1F1E8}","\u{1F1E8}\u{1F1F4}","\u{1F1F0}\u{1F1F2}","\u{1F1E8}\u{1F1EC}","\u{1F1E8}\u{1F1E9}","\u{1F1E8}\u{1F1F0}","\u{1F1E8}\u{1F1F7}","\u{1F1E8}\u{1F1EE}","\u{1F1ED}\u{1F1F7}","\u{1F1E8}\u{1F1FA}","\u{1F1E8}\u{1F1FC}","\u{1F1E8}\u{1F1FE}","\u{1F1E8}\u{1F1FF}","\u{1F1E9}\u{1F1F0}","\u{1F1E9}\u{1F1EF}","\u{1F1E9}\u{1F1F2}","\u{1F1E9}\u{1F1F4}","\u{1F1EA}\u{1F1E8}","\u{1F1EA}\u{1F1EC}","\u{1F1F8}\u{1F1FB}","\u{1F3F4}\u200D\u2620\uFE0F","\u{1F1EC}\u{1F1F6}","\u{1F1EA}\u{1F1F7}","\u{1F1EA}\u{1F1EA}","\u{1F1F8}\u{1F1FF}","\u{1F1EA}\u{1F1F9}","\u{1F1EA}\u{1F1FA}","\u{1F1EB}\u{1F1F0}","\u{1F1EB}\u{1F1F4}","\u{1F1EB}\u{1F1EF}","\u{1F1EB}\u{1F1EE}","\u{1F1EB}\u{1F1F7}","\u{1F1EC}\u{1F1EB}","\u{1F1F5}\u{1F1EB}","\u{1F1F9}\u{1F1EB}","\u{1F1EC}\u{1F1E6}","\u{1F1EC}\u{1F1F2}","\u{1F1EC}\u{1F1EA}","\u{1F1E9}\u{1F1EA}","\u{1F1EC}\u{1F1ED}","\u{1F1EC}\u{1F1EE}","\u{1F1EC}\u{1F1F7}","\u{1F1EC}\u{1F1F1}","\u{1F1EC}\u{1F1E9}","\u{1F1EC}\u{1F1F5}","\u{1F1EC}\u{1F1FA}","\u{1F1EC}\u{1F1F9}","\u{1F1EC}\u{1F1EC}","\u{1F1EC}\u{1F1F3}","\u{1F1EC}\u{1F1FC}","\u{1F1EC}\u{1F1FE}","\u{1F1ED}\u{1F1F9}","\u{1F1ED}\u{1F1F3}","\u{1F1ED}\u{1F1F0}","\u{1F1ED}\u{1F1FA}","\u{1F1EE}\u{1F1F8}","\u{1F1EE}\u{1F1F3}","\u{1F1EE}\u{1F1E9}","\u{1F1EE}\u{1F1F7}","\u{1F1EE}\u{1F1F6}","\u{1F1EE}\u{1F1EA}","\u{1F1EE}\u{1F1F2}","\u{1F1EE}\u{1F1F1}","\u{1F1EE}\u{1F1F9}","\u{1F1EF}\u{1F1F2}","\u{1F1EF}\u{1F1F5}","\u{1F38C}","\u{1F1EF}\u{1F1EA}","\u{1F1EF}\u{1F1F4}","\u{1F1F0}\u{1F1FF}","\u{1F1F0}\u{1F1EA}","\u{1F1F0}\u{1F1EE}","\u{1F1FD}\u{1F1F0}","\u{1F1F0}\u{1F1FC}","\u{1F1F0}\u{1F1EC}","\u{1F1F1}\u{1F1E6}","\u{1F1F1}\u{1F1FB}","\u{1F1F1}\u{1F1E7}","\u{1F1F1}\u{1F1F8}","\u{1F1F1}\u{1F1F7}","\u{1F1F1}\u{1F1FE}","\u{1F1F1}\u{1F1EE}","\u{1F1F1}\u{1F1F9}","\u{1F1F1}\u{1F1FA}","\u{1F1F2}\u{1F1F4}","\u{1F1F2}\u{1F1F0}","\u{1F1F2}\u{1F1EC}","\u{1F1F2}\u{1F1FC}","\u{1F1F2}\u{1F1FE}","\u{1F1F2}\u{1F1FB}","\u{1F1F2}\u{1F1F1}","\u{1F1F2}\u{1F1F9}","\u{1F1F2}\u{1F1ED}","\u{1F1F2}\u{1F1F6}","\u{1F1F2}\u{1F1F7}","\u{1F1F2}\u{1F1FA}","\u{1F1FE}\u{1F1F9}","\u{1F1F2}\u{1F1FD}","\u{1F1EB}\u{1F1F2}","\u{1F1F2}\u{1F1E9}","\u{1F1F2}\u{1F1E8}","\u{1F1F2}\u{1F1F3}","\u{1F1F2}\u{1F1EA}","\u{1F1F2}\u{1F1F8}","\u{1F1F2}\u{1F1E6}","\u{1F1F2}\u{1F1FF}","\u{1F1F2}\u{1F1F2}","\u{1F1F3}\u{1F1E6}","\u{1F1F3}\u{1F1F7}","\u{1F1F3}\u{1F1F5}","\u{1F1F3}\u{1F1F1}","\u{1F1F3}\u{1F1E8}","\u{1F1F3}\u{1F1FF}","\u{1F1F3}\u{1F1EE}","\u{1F1F3}\u{1F1EA}","\u{1F1F3}\u{1F1EC}","\u{1F1F3}\u{1F1FA}","\u{1F1F3}\u{1F1EB}","\u{1F1F0}\u{1F1F5}","\u{1F1F2}\u{1F1F5}","\u{1F1F3}\u{1F1F4}","\u{1F1F4}\u{1F1F2}","\u{1F1F5}\u{1F1F0}","\u{1F1F5}\u{1F1FC}","\u{1F1F5}\u{1F1F8}","\u{1F1F5}\u{1F1E6}","\u{1F1F5}\u{1F1EC}","\u{1F1F5}\u{1F1FE}","\u{1F1F5}\u{1F1EA}","\u{1F1F5}\u{1F1ED}","\u{1F1F5}\u{1F1F3}","\u{1F1F5}\u{1F1F1}"]}],Ct=[{label:"Punctuation",icons:["!","@","#","$","%","&","*","+","=","|","-","_",":",";","?","~","`","/","\\"]},{label:"Brackets",icons:["(",")","[","]","{","}"]},{label:"Quotes",icons:["'",'"',"\u2018","\u2019","\u201C","\u201D","\xBB"]},{label:"Currency Symbols",icons:["$","\u20AC","\xA3","\xA5","\xA2","\u20B9"]},{label:"Math Symbols",icons:["\xB1","\xB5","\xB6","\u2122","\xA9","\xAE","\xA7","\xBC","\xBD","\xBE"]},{label:"Comparison & Logic",icons:["<",">"]},{label:"Miscellaneous",icons:["^","\xB5"]}],ae={"arial, sans-serif":"<p style='user-select: none; font-family: arial, sans-serif;'>Sans Serif</p>","times new roman, serif":"<p style='user-select: none; font-family: &quot;times new roman&quot;, serif;'>Times New Roman</p>",monospace:"<p style='user-select: none; font-family: monospace;'>Fixed Width</p>","arial black, sans-serif":"<p style='user-select: none; font-family: &quot;arial black&quot;, sans-serif;'>Wide</p>","arial narrow, sans-serif":"<p style='user-select: none; font-family: &quot;arial narrow&quot;, sans-serif;'>Narrow</p>","comic sans ms, sans-serif":"<p style='user-select: none; font-family: &quot;comic sans ms&quot;, sans-serif;'>Comic Sans MS</p>","garamond, times new roman, serif":"<p style='user-select: none; font-family: garamond, &quot;times new roman&quot;, serif;'>Garamond</p>","georgia, serif":"<p style='user-select: none; font-family: georgia, serif;'>Georgia</p>","tahoma, sans-serif":"<p style='user-select: none; font-family: tahoma, sans-serif;'>Tahoma</p>","trebuchet ms, sans-serif":"<p style='user-select: none; font-family: &quot;trebuchet ms&quot;, sans-serif;'>Trebuchet MS</p>","verdana, sans-serif":"<p style='user-select: none; font-family: verdana, sans-serif;'>Verdana</p>","calibri, sans-serif":"<p style='user-select: none; font-family: calibri, sans-serif;'>Calibri</p>"},$e={1:"<p style='user-select: none; font-size: 10px'>10px</p>",2:"<p style='user-select: none; font-size: 13px'>13px</p>",3:"<p style='user-select: none; font-size: 16px'>16px</p>",4:"<p style='user-select: none; font-size: 18px'>18px</p>",5:"<p style='user-select: none; font-size: 24px'>24px</p>",6:"<p style='user-select: none; font-size: 32px'>32px</p>",7:"<p style='user-select: none; font-size: 48px'>48px</p>"},Fe={1:"<p style='user-select: none;'>10px</p>",2:"<p style='user-select: none;'>13px</p>",3:"<p style='user-select: none;'>16px</p>",4:"<p style='user-select: none;'>18px</p>",5:"<p style='user-select: none;'>24px</p>",6:"<p style='user-select: none;'>32px</p>",7:"<p style='user-select: none;'>48px</p>"},Ue={h1:"<h1>Heading 1</h1>",h2:"<h2>Heading 2</h2>",h3:"<h3>Heading 3</h3>",h4:"<h4>Heading 4</h4>",h5:"<h5>Heading 5</h5>",h6:"<h6>Heading 6</h6>",p:"<p>Paragraph<p>"},vt={h1:"Heading 1",h2:"Heading 2",h3:"Heading 3",h4:"Heading 4",h5:"Heading 5",h6:"Heading 6",p:"Paragraph"},wt="iVBORw0KGgoAAAANSUhEUgAAAMgAAAAqCAIAAAB5toNAAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAABehJREFUeNrsmj9MY0cQxsmJnGhyIF0D5CRAkU5IKTAiBR2kowABTVpTXSiR0tDZNEkVBXfQuaQDKxSkwjQ5ijsBHUeD0Z1OpEACpSHXOD97dJPJPvv5+Q8EXeaTZfbt2zc7b+bbmdk1XV0Oh8PhcDgcDofD4XA4HA6Hw/E/xWduAotyebPxoLM/u34+4++3u7vF9+/daDXxyE3g8Ih15xgu/ch36vhd6vht3TF/PU5fPaVxcnV1/eFD/s2b/NmZmy5At5vAojRUYUwp/3In+2u9MdODg+nZWRpjTyuDm82G09PTw1XQPq6iVCq55T/5Imuz8snOxTFjcLD84oV+inNz2YkJPvGC+/r68vn89fV1OYJisZhKpSzz7N1sNiv9NMp1gNidnR0etDMi1o4J9Inehd+2B22DR5jCDmBJeI11h5gaGMhMTGRiiQVvcFs6ne7t7a0hYWrq6OhoaWmpZR0QOz8/v7+/H2VDcgQKoK1lKm2miBnvxOowjv54Vnz7FZ8YVhEealLKYmVlpX1lYMP6+nprz6JkLpezPSpKwq29tba2Fh+xHE2nwgDfffnLbH+GT4zDgsxFTiGv4TbNPjgJ57WcCgNIAddsKhQCBQlR6B5MnYRSLUasnp4erUAd8aU6mU4vLy4uxsfHFxYWcBU+w4CLi4sHBwcMo05qbj//ESMjIycnJ8GkrWmLDkGCQ0+kZTKZ5Emw8a5Q14rg8PBwb2+PxszMzOTkpHTe3t7SCYWXl5dhmwbP1dVV1gSPSC7AlFtbWzwVcFH0toZgxTASscHs9BONeSWVwBjkM8s/BwHDw/adRTe0QmEaogw6cFmsoiPUefJ44Fl3tfS+XGtYuHAZLPedKtrayZZKcJQCy9qhZWmYpVAoaDlFBreSkyfBBscNsh8WcuAS2qOjozSYnjY+gxOQBhdyicP6+/svLy8Zwy0eEV9yyYDT01Me5K6w00I7kYBR+BZb6+zCEquSyGd2oZeVhigEoonoBkFRgLYqjCc6xaqK6T/vf/7FVN1DL+NjwpXMiw6Bt9RnwXJKCE2jcUk+kg1jqnhMVLMoJDQm1PBRw9hYqkIcj4dkg4OBuIX/iC406FT+yTC+ca28MMaFVcqPkkHQiTRrJp0dMJftRCCDaWjstDSVR66rkKjANySDsnp5T3tGkwc7e141/RHwIKis2yyrowmxqSTY3AGp+A+f4fVAb3wMhyQmQSkoyDdjUlXwCHFCgwoks5SXtlRsErHkxaztbCqMZoFoPWFfXpiKQFaCCEe9ZquZh4maMQ/c3Ny0H49Ze1R+dlU0uxPsTrIslEASeOBBzTgsxGK8MEmylUQOG2+iysFLZQNCNFfaqFaTDYEmQSqESSgjOqOPRNMgb941rHv0FJR3oV+tNzY21sEZqbc6snLwyPn5uc3jTaXppDUWAUnIgaflYEaKHvwn8Uk4QadscBgsPNO7atPoepJoJDU+D2o5FV8MMTWPaJKNpkIZQCwUdqrY+wRTK7GoWvA6+xsMosu1Xr3VAohVsKFeomf/GBTpQUCKah5z2S6xpKAJ4gHaYyCphaUwlxgj2VDrLSnnGWOJZYMTsNmNYVJxa1QTWgSDpROxkn+jzGNS+vuqoPHfJj7cnE6nberHnup7WUstx0LLEhH7cLJ8dzxno4oSDzY2NnA/fhU2aPSSS1uEkXe41DyojYC72i8EFWrWXCJWlERTG4dkE2CVZ4C+Qs3Z74FY7KQ02RG0tre3SSsS+Bsex8dXKX5M+CmfvP/wvLg5UeZTbwAEqvnbcxQSyxOevCc5kWr25D16QmF/KW/KkP5b4Z1DKioKoPhhuVyunZ+QHxr8/7HuiVvUhRSmxKShoaHgbqFQoKLXkGD3jLZqpmH772dL2/LZmP8HaSQVVk5sdrvq/6NfNBXKyfv3rxMZM/iNtYO/ATwoOLH+jd9/qy7Pd131/zU5wNe9M0+6K/uYlz8Nu/2cWHXwqtz6s9+4Mb14dzgcDofD4XA4HA6Hw+FwOBwOh+Nu8LcAAwC2lFXNWxcl3QAAAABJRU5ErkJggg==",Ge={Row:{"":["insert-row-above","insert-row-below","delete-row","row-background-color"]},Column:{"":["insert-column-left","insert-column-right","delete-column","fixed-column-width","column-background-color"]},Merge:{"":["merge-cell-up","merge-cell-right","merge-cell-down","merge-cell-left","split-cell-vertical","split-cell-horizontal"]},"Cell Property":{Dimension:["cell-width","cell-height","cell-padding"],Border:["cell-border-full","cell-border-top","cell-border-right","cell-border-bottom","cell-border-left","cell-border-none","border-color"],Background:["background-color"]},"Table Property":{Alignment:["align-left","align-center","align-right"]}},Ye={1:`${L.NEW_LIST_NUMBER} Number`,a:`${L.LIST_LOWER_ALPHA} Lower Alpha`,i:`${L.LIST_LOWER_ROMAN} Lower Roman`,A:`${L.LIST_UPPER_ALPHA} Upper Alpha`},je={Disc:`${L.LIST_DISC} Disc`,Circle:`${L.LIST_CIRCLE} Circle`,Square:`${L.LIST_SQUARE} Square`},Xe=10,qe=["H1","H2","H3","H4","H5","H6","P"],Ke=["1","a","i","A"],Qe=["disc","circle","square"],Je=["#E53935","#8E24AA","#1E88E5","#00897B","#6D4C41","#D81B60","#F09300","#00ACC1","#7CB342","#C0CA33","#F4511E","#039BE5","#0B8043","#3F51B5","#E67C73","#33B679","#8D6E63","#616161","#AD1457","#F6BF26"];var et={search:async(t,e,n=1)=>{try{let o=await fetch(`https://api.giphy.com/v1/gifs/search?api_key=${t.giphyApiKey}&q=${encodeURIComponent(e)}&limit=50&offset=${(n-1)*50}`);if(o.ok){let{data:a,pagination:s}=await o.json();return{images:a.map(i=>({src:i.images.fixed_height_small.url})),totalPages:Math.ceil(s.total_count/50)||1}}return{images:[],totalPages:1}}catch(o){console.error(o)}},suggestions:async(t,e=1)=>{try{let n=await fetch(`https://api.giphy.com/v1/gifs/trending?api_key=${t.giphyApiKey}&limit=10&offset=${(e-1)*10}`);if(n.ok){let{data:o,pagination:a}=await n.json();return{images:o.map(s=>({src:s.images.fixed_height_small.url})),totalPages:Math.ceil(a.total_count/10)||1}}return{images:[],totalPages:1}}catch(n){console.error(n)}}},tt={search:async(t,e,n=1)=>{try{let o=await fetch(`https://api.pexels.com/v1/search?query=${encodeURIComponent(e)}&per_page=50&page=${n}`,{headers:{Authorization:t.pexelsApiKey}});if(o.ok){let{photos:a,total_results:s}=await o.json();return{images:a.map(i=>({src:i.src.medium})),totalPages:Math.ceil(s/50)||1}}else return{images:[],totalPages:1}}catch(o){console.error(o)}},suggestions:async(t,e=1)=>{try{let n=await fetch(`https://api.pexels.com/v1/curated?per_page=10&page=${e}`,{headers:{Authorization:t.pexelsApiKey}});if(n.ok){let{photos:o,total_results:a}=await n.json();return{images:o.map(s=>({src:s.src.medium})),totalPages:Math.ceil(a/10)||1}}else return{images:[],totalPages:1}}catch(n){console.error(n)}}},nt={search:async(t,e,n="")=>{try{let o=await fetch(`https://tenor.googleapis.com/v2/search?q=${encodeURIComponent(e)}&key=${t.tenorApiKey}&limit=50&pos=${n}`);if(o.ok){let a=await o.json();return{images:a.results.map(s=>({src:s.media_formats.webp.url})),next:a.next}}else return{images:[],next:""}}catch(o){console.error(o)}},suggestions:async(t,e="")=>{try{let n=await fetch(`https://tenor.googleapis.com/v2/featured?key=${t.tenorApiKey}&limit=10&pos=${e}`);if(n.ok){let o=await n.json();return{images:o.results.map(a=>({src:a.media_formats.webp.url})),next:o.next}}else return{images:[],next:""}}catch(n){console.error(n)}}};import{DiffDOM as Tn}from"diff-dom";import{v4 as Rn}from"uuid";import{v4 as Ce}from"uuid";var kt=(t,e)=>{if(!e.showTabs)return;let n=document.createElement("div");n.className="tabs-container",t.elements.tabsContainer=n,t.elements.placeholder.style.visibility="hidden",t.elements.iframeWindow.body.style.display="flex",t.elements.iframeWindow.body.prepend(n),B(t,e)},ce=(t,e,n=null)=>{for(let o=0;o<t.length;o++){if(t[o].tabId===e)return{list:t,index:o,parent:n};if(t[o].children){let a=ce(t[o].children,e,t[o]);if(a)return a}}return null},P=(t,e)=>{for(let n of t){if(n.tabId===e)return n;if(n.children){let o=P(n.children,e);if(o)return o}}return null},xt=(t,e,n)=>{let o=P(t,e);return o!=null&&o.children?P(o.children,n)!==null:!1},B=(t,e)=>{if(!t.elements.tabsContainer)return;t.onChange(t.html),t.elements.tabsContainer.innerHTML="";let n=(d,p,u)=>{d.forEach(r=>{let m=document.createElement("div");m.className="tab-item",m.classList.toggle("active",r.tabId===t.state.currentTabId),m.draggable=!0,m.ondragstart=v=>{v.stopPropagation(),t.state.draggedTabId=r.tabId,v.dataTransfer.effectAllowed="move",m.style.opacity="0.5"},m.ondragend=v=>{v.stopPropagation(),delete t.state.draggedTabId,m.style.opacity="1",B(t,e)},m.ondragover=v=>{v.preventDefault(),v.stopPropagation();let w=t.state.draggedTabId;if(!w||w===r.tabId||xt(t.state.tabs,w,r.tabId))return;let k=m.getBoundingClientRect(),R=v.clientY-k.top,H=k.height;m.style.borderTop="",m.style.borderBottom="1px solid #eee",m.style.background="",R<H*.25?m.style.borderTop="2px solid var(--primary)":R>H*.75?m.style.borderBottom="2px solid var(--primary)":m.style.background="rgba(0,0,0,0.05)"},m.ondragleave=v=>{v.stopPropagation(),m.style.borderTop="",m.style.borderBottom="1px solid #eee",m.style.background=""},m.ondrop=v=>{v.preventDefault(),v.stopPropagation();let w=t.state.draggedTabId;if(!w||w===r.tabId||xt(t.state.tabs,w,r.tabId)||u>1)return;let k=m.getBoundingClientRect(),R=v.clientY-k.top,H=k.height;R<H*.25?Et(t,w,r.tabId,"before",e):R>H*.75?Et(t,w,r.tabId,"after",e):Rt(t,w,r.tabId,e)};let b;m.onclick=()=>{clearTimeout(b),b=setTimeout(()=>{r.tabId===t.state.currentTabId&&(r.showOutlines=!r.showOutlines,B(t,e)),me(t,r.tabId,e)},250)},m.ondblclick=()=>{e.disabled||(clearTimeout(b),Ht(t,r.tabId,h,e))};let f=document.createElement("div");f.className="left",f.style.paddingLeft=`${u*12}px`;let C=r.children&&r.children.length>0,g=document.createElement("span");g.style.width="20px",g.style.height="20px",g.style.marginRight="4px",g.style.cursor="pointer",g.style.transition="transform 0.2s",C&&(g.innerHTML=L.ARROW_DROP_DOWN_FILL,g.style.transform=r.isExpanded?"rotate(0deg)":"rotate(-90deg)",g.onclick=v=>{v.stopPropagation(),r.isExpanded=!r.isExpanded,B(t,e)});let h=document.createElement("input");h.value=r.tabTitle||"Untitled Tab",h.disabled=!0,h.className="tab-input";let x=document.createElement("span");x.className="tab-icons tab-dropdown",x.innerHTML=L.MORE,x.onclick=v=>{v.stopPropagation(),vn(t,r,v,u,e)};let y=document.createElement("span");y.className="tab-icons",y.innerHTML=L.TABLE_OF_CONTENT,f.appendChild(g),f.appendChild(y),f.appendChild(h),m.appendChild(f),e.disabled||m.appendChild(x);let E=document.createElement("div");E.id=r.tabId,E.appendChild(m);let T=document.createElement("div");if(T.className="outline-items",T.style.paddingLeft=`${32+u*12}px`,E.appendChild(T),st(t,e,r,T),p.appendChild(E),t.elements.tabs[r.tabId]=E,r.children&&r.children.length>0&&r.isExpanded){let v=document.createElement("div");n(r.children,v,u+1),p.appendChild(v)}})},o=document.createElement("div");o.className="tab-items",o.addEventListener("scroll",()=>{t.state.tabItemsScrollHeight=o.scrollTop}),n(t.state.tabs,o,0),t.elements.tabsContainer.appendChild(o),o.scrollTop=t.state.tabItemsScrollHeight||0;let a=document.createElement("span");a.className="tab-header";let s=document.createElement("span");s.innerHTML="Tabs";let i=document.createElement("div"),l=document.createElement("button");l.className="tab-add-button",l.type="button",l.innerHTML=L.PLUS,l.onclick=()=>Tt(t,e);let c=document.createElement("button");c.className="tab-expand-button",c.type="button",c.innerHTML=L.ARROW_DOWN,c.onclick=()=>{t.state.isTabExpandInResponsive=!t.state.isTabExpandInResponsive,c.classList.toggle("show"),o.classList.toggle("show")},requestAnimationFrame(()=>{o.classList.add("animate")}),t.state.isTabExpandInResponsive&&(c.classList.add("show"),o.classList.add("show")),e.disabled||i.appendChild(l),i.appendChild(c),a.appendChild(s),a.appendChild(i),t.elements.tabsContainer.prepend(a)},vn=(t,e,n,o,a)=>{let s=t.elements.iframeWindow.getElementById("leksy-editor-tab-context-menu");s&&s.remove();let i=document.createElement("div");i.id="leksy-editor-tab-context-menu",i.style.visibility="hidden",i.style.display="block";let l=y=>{i.contains(y.target)||(i.remove(),t.elements.iframeWindow.removeEventListener("click",l))},c=(y,E,T)=>{let v=document.createElement("div");return v.innerHTML=E+y,v.className="tab-menu-item",v.onclick=w=>{w.stopPropagation(),i.remove(),t.elements.iframeWindow.removeEventListener("click",l),T()},v},d=(y,E)=>{let T=document.createElement("div");T.className="tab-menu-item",T.style.position="relative";let v=document.createElement("span");v.innerHTML=L.PLAY_LIST+y;let w=document.createElement("span");w.innerHTML=L.ARROW_DROP_RIGHT,w.style.width="20px",w.style.height="20px",w.style.marginLeft="4px",w.style.display="flex",w.style.alignItems="center",T.appendChild(v),T.appendChild(w);let k;return T.onmouseenter=()=>{k=document.createElement("div"),k.className="tab-submenu",k.style.position="absolute",k.style.left="100%",k.style.top="0",k.style.visibility="hidden",E.forEach(N=>{let _=c(N.tabTitle,L.TABLE_OF_CONTENT,()=>{Rt(t,e.tabId,N.tabId,a)});N.level>0&&(_.style.paddingLeft=`${16+N.level*10}px`),k.appendChild(_)}),T.appendChild(k);let R=k.getBoundingClientRect(),H=T.getBoundingClientRect(),M=t.elements.iframeWindow.documentElement.clientWidth,I=t.elements.iframeWindow.documentElement.clientHeight;R.right>M&&(k.style.left="auto",k.style.right="100%"),R.bottom>I&&(k.style.top=`${I-H.top-R.height}px`),k.style.visibility="visible"},T.onmouseleave=()=>{k&&k.remove(),k=null},T},p=ce(t.state.tabs,e.tabId);o<2&&i.appendChild(c("Add subtab",L.PLUS,()=>Ln(t,e,a))),i.appendChild(c("Duplicate",L.COPY,()=>xn(t,e,a))),i.appendChild(c("Rename",L.PENCIL_LINE,()=>{let y=n.target.closest(".tab-item");if(y){let E=y.querySelector("input");E&&Ht(t,e.tabId,E,a)}})),i.appendChild(c("Delete",L.DELETE,()=>wn(t,e.tabId,a))),i.appendChild(c("Move up",L.ARROW_UP,()=>Lt(t,e.tabId,"up",a))),i.appendChild(c("Move down",L.ARROW_DOWN_LONG,()=>Lt(t,e.tabId,"down",a)));let u=(y,E,T=0)=>{let v=[];for(let w of y)w.tabId===E||T>1||(v.push({tabId:w.tabId,tabTitle:w.tabTitle,level:T}),w.children&&(v=v.concat(u(w.children,E,T+1))));return v},r=u(t.state.tabs,e.tabId);r.length>0&&i.appendChild(d("Move into",r)),p!=null&&p.parent&&i.appendChild(c("Move out",L.DELETE,()=>En(t,e.tabId,a))),i.appendChild(c(e.showOutlines?"Hide outlines":"Show outlines",L.LIST_BULLETS,()=>{e.showOutlines=!e.showOutlines,B(t,a),e.showOutlines&&me(t,e.tabId,a)})),t.elements.iframeWindow.body.appendChild(i),t.elements.iframeWindow.addEventListener("click",l);let m=i.getBoundingClientRect(),b=m.width,f=m.height,C=t.elements.iframeWindow.documentElement.clientWidth,g=t.elements.iframeWindow.documentElement.clientHeight,h=n.clientX,x=n.clientY;h+b>C&&(h=n.clientX-b),x+f>g&&(x=n.clientY-f),i.style.left=`${h}px`,i.style.top=`${x}px`,i.style.visibility="visible"},Tt=(t,e)=>{if(e.disabled)return;let n=P(t.state.tabs,t.state.currentTabId);n&&(n.content=t.elements.editor.innerHTML);let o={tabTitle:`Tab ${t.state.tabs.length+1}`,tabId:Ce(),content:"<div><br></div>",children:[]};t.state.tabs.push(o),t.history.tabs[o.tabId]={stack:[],currentIndex:-1},me(t,o.tabId,e),t.onLocalSyncChanges({type:"tabs:structure",tabs:structuredClone(t.state.tabs)})},me=(t,e,n)=>{if(t.state.currentTabId===e)return;pe(n,t),te(n,t),ie(t);let o=P(t.state.tabs,t.state.currentTabId);o&&(o.content=t.elements.editor.innerHTML),t.state.runtimeDom[t.state.currentTabId]=t.elements.editor.cloneNode(!0);let a=P(t.state.tabs,e);if(a){let s=t.state.runtimeDom[e];t.state.currentTabId=a.tabId,t.elements.editor.innerHTML=s?s.innerHTML:a.content,t.state.previousDOM=t.elements.editor.cloneNode(!0),t.html=t.elements.editor.innerHTML,t.state.runtimeDom[e]||(t.state.runtimeDom[e]=t.elements.editor.cloneNode(!0),t.onLocalSyncChanges({type:"tabs:create",tabId:e,editorHTML:t.elements.editor.outerHTML})),B(t,n),t.updateCaretPosition(),t.elements.editor.focus(),t.elements.editorCursor&&(t.elements.editorCursor.innerHTML=""),t.onLocalSyncChanges({type:"tabs:switch",tabId:a.tabId})}},wn=(t,e,n)=>{let o=d=>{var p;delete t.state.runtimeDom[d.tabId],(p=d.children)!=null&&p.length&&d.children.forEach(o)},a=d=>{var p;delete t.history.tabs[d.tabId],(p=d.children)!=null&&p.length&&d.children.forEach(a)},s=d=>{let p=d.findIndex(u=>u.tabId===e);if(p>-1)return d.splice(p,1),!0;for(let u of d)if(u.children&&s(u.children))return!0;return!1},i=P(t.state.tabs,e);if(!i)return;o(i),a(i);let l=d=>d.tabId===t.state.currentTabId?!0:d.children?d.children.some(p=>l(p)):!1,c=l(i);s(t.state.tabs),c?t.state.tabs.length>0?me(t,t.state.tabs[0].tabId,n):Tt(t,n):B(t,n),t.onLocalSyncChanges({type:"tabs:structure",tabs:structuredClone(t.state.tabs)})},xn=(t,e,n)=>{let o=structuredClone(e);o.tabId=Ce(),o.tabTitle=`${o.tabTitle} (Copy)`;let a=i=>{i.tabId=Ce(),t.history.tabs[i.tabId]={stack:[],currentIndex:-1},i.children&&i.children.forEach(a)};o.children&&o.children.forEach(a),t.history.tabs[o.tabId]={stack:[],currentIndex:-1};let s=i=>{let l=i.findIndex(c=>c.tabId===e.tabId);if(l>-1)return i.splice(l+1,0,o),!0;for(let c of i)if(c.children&&s(c.children))return!0;return!1};s(t.state.tabs),B(t,n),t.onLocalSyncChanges({type:"tabs:structure",tabs:structuredClone(t.state.tabs)})},Ln=(t,e,n)=>{var a;let o={tabTitle:`Subtab ${(((a=e.children)==null?void 0:a.length)||0)+1}`,tabId:Ce(),content:"<div><br></div>",children:[]};t.history.tabs[o.tabId]={stack:[],currentIndex:-1},e.children||(e.children=[]),e.children.push(o),e.isExpanded=!0,B(t,n),me(t,o.tabId,n),t.onLocalSyncChanges({type:"tabs:structure",tabs:structuredClone(t.state.tabs)})},Lt=(t,e,n,o)=>{let a=s=>{let i=s.findIndex(l=>l.tabId===e);if(i>-1)return n==="up"&&i>0?([s[i-1],s[i]]=[s[i],s[i-1]],!0):n==="down"&&i<s.length-1?([s[i],s[i+1]]=[s[i+1],s[i]],!0):!1;for(let l of s)if(l.children&&a(l.children))return!0;return!1};a(t.state.tabs)&&(B(t,o),t.onLocalSyncChanges({type:"tabs:structure",tabs:structuredClone(t.state.tabs)}))},Et=(t,e,n,o,a)=>{let s=ce(t.state.tabs,e);if(!s)return;let[i]=s.list.splice(s.index,1),l=ce(t.state.tabs,n);l?o==="before"?l.list.splice(l.index,0,i):l.list.splice(l.index+1,0,i):s.list.splice(s.index,0,i),B(t,a),t.onLocalSyncChanges({type:"tabs:structure",tabs:structuredClone(t.state.tabs)})},Rt=(t,e,n,o)=>{let a=ce(t.state.tabs,e);if(!a)return;let[s]=a.list.splice(a.index,1),i=P(t.state.tabs,n);i&&(i.children||(i.children=[]),i.children.push(s),i.isExpanded=!0),B(t,o),t.onLocalSyncChanges({type:"tabs:structure",tabs:structuredClone(t.state.tabs)})},En=(t,e,n)=>{let o=ce(t.state.tabs,e);if(!o)return;let{list:a,index:s,parent:i}=o;if(i){let l=ce(t.state.tabs,i.tabId);if(!l)return;let{list:c,index:d}=l,p=a[s];a.splice(s,1),c.splice(d+1,0,p),B(t,n),t.onLocalSyncChanges({type:"tabs:structure",tabs:structuredClone(t.state.tabs)})}},Ht=(t,e,n,o)=>{let a=P(t.state.tabs,e);if(!a)return;n.disabled=!1,n.style.pointerEvents="auto",n.style.outline="1px solid gray",n.onclick=l=>l.stopPropagation();let s=!1,i=()=>{s||(s=!0,n.value.trim()&&(a.tabTitle=n.value.trim()),B(t,o),t.onLocalSyncChanges({type:"tabs:structure",tabs:structuredClone(t.state.tabs)}))};n.onblur=i,n.onkeydown=l=>{l.key==="Enter"&&i()},n.focus(),n.select()},kn=t=>{let e=new Set,n=o=>{o.forEach(a=>{(!a.tabId||e.has(a.tabId))&&(a.tabId=Ce()),a.content||(a.content="<div><br></div>"),a.tabTitle||(a.tabTitle="Untitled Tab"),e.add(a.tabId),a.children&&a.children.length>0&&n(a.children)})};n(t)},ot=t=>{let e=[];return Array.isArray(t)&&t.length?(kn(t),e=t):e=[{tabTitle:"Tab 1",tabId:Ce(),content:typeof t=="string"?t:"<div><br></div>",children:[]}],e};var It=new Tn,Hn=t=>{var n;if(!(t!=null&&t.style))return;Array.from(t.style).forEach(o=>{F.BLOCKED_STYLES.test(o)&&t.style.removeProperty(o)}),(n=t.getAttribute("style"))!=null&&n.trim()||t.removeAttribute("style")},Mt=(t,e,n)=>{var a,s;if(!(t!=null&&t.childNodes))return;let o=t.childNodes;for(let i=o.length-1;i>=0;i--){let l=o[i];if(l.nodeType===Node.ELEMENT_NODE)if(!F.WHILE_LISTED_TAG.test(l.tagName))l.parentNode.removeChild(l);else{let c=[];for(let d of l.attributes)(!F.WHILE_LISTED_ATTRIBUTES.test(d.name)||d.value.includes("var("))&&c.push(d.name);if(e!=null&&e.disablePastedColorStyles){let d=l.style,p=d.backgroundColor,u=d.color,r=(s=(a=n==null?void 0:n.state)==null?void 0:a.range)==null?void 0:s.startContainer,m=An(r);m&&(m!=null&&m.startsWith("rgb"))&&(m=ve(m)),p&&(p!=null&&p.startsWith("rgb"))&&(p=ve(p)),u&&(u!=null&&u.startsWith("rgb"))&&(u=ve(u)),m===p&&l.style.removeProperty("background-color"),m===u&&l.style.removeProperty("color")}e!=null&&e.removeColorsWhilePasting&&(l.style.removeProperty("background-color"),l.style.removeProperty("color")),Hn(l),c.forEach(d=>l.removeAttribute(d)),Mt(l,e,n)}}},An=t=>{var o,a;if(!(t instanceof Element))return null;let e=t;for(;e;){let s=(o=window==null?void 0:window.getComputedStyle(e))==null?void 0:o.backgroundColor;if(s!=="rgba(0, 0, 0, 0)"&&s!=="transparent"&&s!=="")return s;e=e!==document.body?e.parentElement:null}return(a=window==null?void 0:window.getComputedStyle(document.body))==null?void 0:a.backgroundColor},Ee=(t,e,n)=>{let o=document.createElement("div");return o.innerHTML=t,Mt(o,e,n),o.innerHTML},ke=(t,e)=>{let n=null;return(...o)=>{n&&clearTimeout(n),n=setTimeout(async()=>{t(...o),n=null},e)}};function Nt(t,e){let n=null,o=!1,a=!1,s=[];function i(...l){if(o){s=l,a=!0;return}else clearTimeout(n),s=[],a=!1;return new Promise(c=>{n=setTimeout(async()=>{o=!0,await t(...l),c(),o=!1,a&&i(...s)},e)})}return i}function In(){let t=navigator.userAgent;return/iPad|iPhone|iPod/.test(t)&&!window.MSStream?"IOS":/Android/.test(t)?"ANDROID":/Macintosh/.test(t)?"MAC":/Windows/.test(t)?"WINDOWS":/Linux/.test(t)?"LINUX":"Unknown"}function Me(t){let e=t.parentElement;for(;e&&e!==document.body;){let o=getComputedStyle(e).overflowX;if(o==="auto"||o==="scroll"||o==="hidden")return e;e=e.parentElement}return document.body}var St=t=>{document.addEventListener("mouseover",e=>{let n=e.target.closest(`.${t.classPrefix}${A.TOOLBAR_ITEM}`);if(!n)return;let o=n.getBoundingClientRect(),a=o.bottom+2,s=o.left+o.width/2;s=Math.max(68,Math.min(s,window.innerWidth-68)),n.style.setProperty("--leksy-editor-top",`${a}px`),n.style.setProperty("--leksy-editor-left",`${s}px`)})},Te=(t,e)=>{var n;return((n=e==null?void 0:e.customTooltip)==null?void 0:n[t.pluginId])??t.title},Re=(t,e)=>{var n;return((n=e==null?void 0:e.customIcon)==null?void 0:n[t.pluginId])??t.icon},Ot=(t,e,n)=>{let o=document.createElement("button");o.type="button",o.className=`${e.classPrefix}${A.TOOLBAR_ITEM} ${t.type==="reset-color"?"reset-color":""}`,o.dataset.title=Te(t,e),o.dataset.type="button",o.onclick=s=>{s.preventDefault(),t.click(s,n,e)};let a=document.createElement("div");return a.innerHTML=Re(t,e),o.appendChild(a),o},_t=(t,e,n)=>{let o=document.createElement("button");o.type="button",o.className=`${e.classPrefix}${A.TOOLBAR_ITEM} ${t.type==="button-select"?A.TOOLBAR_ITEM_BUTTON_SELECT:""}`,o.dataset.title=Te(t,e),o.dataset.type="button",o.onclick=l=>{l.preventDefault(),t.mainClick(l,n,e)};let a=document.createElement("div");a.innerHTML=Re(t,e),o.appendChild(a);let s=at({...t,icon:""},e,n),i=document.createElement("div");return i.dataset.type="button-select",i.style.display="flex",i.appendChild(o),i.appendChild(s),i},Bt=(t,e,n)=>{let o=document.createElement("div");o.className=`${e.classPrefix}${A.TOOLBAR_ITEM} ${A.TOOLBAR_ITEM_COLOR}`,o.dataset.title=Te(t,e),o.dataset.type="color";let a=document.createElement("input");a.type="color",a.onclick=()=>{In()!=="IOS"&&n.elements.editor.focus()},a.onchange=i=>{i.preventDefault(),t.change(i,n,e)};let s=document.createElement("div");return s.innerHTML=Re(t,e),s.onclick=()=>a.click(),o.append(a,s),o},Pt=(t,e,n)=>{let o=(r,m)=>{!m&&(r.target.getAttribute("data-toolbar-option")||i.contains(r.target))||(d.style.display="none",document.removeEventListener("mousedown",o,!1),n.elements.editor.removeEventListener("click",o,!1))},a=r=>{(n.state.page==1&&!n.state.next||!n.state.page&&!n.state.next)&&(p.innerHTML=""),r.forEach(m=>{let b=document.createElement("img");b.src=m.src,b.style.width="120px",b.style.height="120px",b.style.cursor="pointer",b.style.margin="2px",b.onclick=f=>{let C=document.createElement("img");if(C.src=m.src,m!=null&&m.url){let g=document.createElement("a");g.href=m.url,g.target="_blank",g.appendChild(C),n.insertNode(g)}else n.insertNode(C);n.updateCaretPosition(),n.elements.editor.focus(),e.closePluginOnClick&&o(f,!0)},p.appendChild(b)})},s=r=>{p.innerHTML="",JSON.parse(JSON.stringify(e.labels)).map(b=>(b.fields=b.fields.filter(f=>f.name.toLowerCase().includes(r.toLowerCase())),b)).filter(b=>b.fields.length).forEach(b=>{let f=document.createElement("div");f.textContent=b.name,p.append(f),b.fields.forEach(C=>{let g=document.createElement("button");g.type="button",g.textContent=C.name,g.onclick=h=>{n.elements.editor.focus();let x=document.createElement("span");x.spellcheck=!1,x.contentEditable=!1,x.innerText=C.name,x.setAttribute("data-id",C.value),n.insertNode(x),n.updateCaretPosition(),e.closePluginOnClick&&o(h,!0)},p.append(g)})})},i=document.createElement("div");i.setAttribute("data-type","dropdown");let l=document.createElement("button");l.type="button",l.className=`${e.classPrefix}${A.TOOLBAR_ITEM}`,l.setAttribute("data-title",Te(t,e));let c=document.createElement("div");c.innerHTML=Re(t,e),l.appendChild(c);let d=document.createElement("div");d.className=`${e.classPrefix}${A.DROPDOWN_CONTENT} ${t.type}`;let p=document.createElement("div");if(t.type==="dropdown")t.options.forEach(r=>{let m=document.createElement("button");m.type="button",m.textContent=r.label,m.setAttribute("data-value",r.value),m.setAttribute("data-toolbar-option",!0),m.addEventListener("click",function(b){d.style.display="none",t.click(b,n,e)}),d.appendChild(m)});else if(t.type==="gallery"){let r=document.createElement("input");r.placeholder="Search...";let m=async(C="",g)=>{let h;C?h=await t.search(e,C,g):h=await t.suggestions(e,g),h.totalPages&&(n.state.totalPages=h.totalPages),h.next&&(n.state.next=h.next),a(h.images)},b=Nt(async C=>{n.state.page=1,n.state.next="",n.state.currentSearch=C,t.title=="Tenor"?await m(C,""):await m(C,1)},300);r.oninput=C=>b(C.target.value),d.addEventListener("scroll",async()=>{n.state.isFetching||d.scrollTop+d.clientHeight>=d.scrollHeight-10&&(n.state.next&&(n.state.isFetching=!0,await m(n.state.currentSearch,n.state.next),n.state.isFetching=!1),n.state.totalPages&&n.state.page<n.state.totalPages&&(n.state.isFetching=!0,n.state.page+=1,await m(n.state.currentSearch,n.state.page),n.state.isFetching=!1))});let f=document.createElement("div");if(f.className="footer",t.title==="GIPHY"){let C=document.createElement("img");C.src=`data:image/png;base64,${wt}`,C.alt="Powered By GIPHY",f.append(C)}else f.innerHTML=`<span>Powered By ${t.title}</span>`;f.style.position="sticky",f.style.bottom="0",f.style.width="100%",f.style.background="#f1f1f1",f.style.textAlign="center",f.style.height="44px",f.style.display="flex",f.style.alignItems="center",f.style.justifyContent="center",f.style.overflow="hidden",d.append(r,p,f)}else if(t.type==="category")t.categories.forEach(r=>{let m=document.createElement("div");m.textContent=r.label,d.append(m),r.icons.forEach(b=>{let f=document.createElement("span");f.textContent=b,f.onclick=C=>{n.elements.editor.focus(),n.elements.iframeWindow.execCommand("insertText",!1,b),e.closePluginOnClick&&o(C,!0)},d.append(f)})});else if(t.type==="mention"){let r=document.createElement("input");r.placeholder="Search...",r.oninput=m=>s(m.target.value),d.append(r,p),s("")}else if(t.type==="table"){let b=document.createElement("div");b.className="toolbar-table-wrapper";let f=document.createElement("label");f.style.display="block",f.style.marginBottom="8px";let C=document.createElement("input");C.type="checkbox",C.checked=!0,C.style.marginRight="6px",f.appendChild(C),f.appendChild(document.createTextNode("Include header row")),b.appendChild(f);let g=document.createElement("div");g.className=`${e.classPrefix}${A.TOOLBAR_TABLE}`;for(let h=0;h<10;h++)for(let x=0;x<10;x++){let y=document.createElement("div");y.className="cell",y.setAttribute("data-row",h),y.setAttribute("data-col",x),x===0&&y.setAttribute("tabIndex","0"),y.addEventListener("mouseover",()=>{g.querySelectorAll(".cell").forEach(T=>{let v=parseInt(T.getAttribute("data-row")),w=parseInt(T.getAttribute("data-col"));v<=h&&w<=x?T.classList.add("selected"):T.classList.remove("selected")})}),y.addEventListener("click",()=>{t.create(n,e,{rows:h,cols:x,header:C.checked}),d.style.display="none"}),g.appendChild(y)}b.appendChild(g),d.appendChild(b)}let u=!1;return l.onclick=()=>{if(d.style.display==="block"){d.style.display="none",document.removeEventListener("mousedown",o,!1),n.elements.editor.removeEventListener("click",o,!1);return}d.style.display="block";let m=Me(d).getBoundingClientRect(),b=d.getBoundingClientRect(),f=b.right>m.right,C=b.left<m.left;f?d.style.right="10px":C&&(d.style.left="10px"),!u&&t.type==="gallery"&&t.suggestions(e).then(g=>{u=!0,g.totalPages&&(n.state.totalPages=g.totalPages,n.state.next=""),g.next&&(n.state.next=g.next,n.state.totalPages=null),a(g.images)}),document.addEventListener("mousedown",o),n.elements.editor.addEventListener("click",o)},i.appendChild(l),i.appendChild(d),i},at=(t,e,n)=>{let o=u=>{u.target.getAttribute("data-toolbar-option")||a.contains(u.target)||(d.style.display="none",document.removeEventListener("mousedown",o,!1),n.elements.editor.removeEventListener("click",o,!1))},a=document.createElement("div");a.dataset.type="select";let s=document.createElement("button");s.type="button",s.className=`${e.classPrefix}${A.TOOLBAR_ITEM} ${A.TOOLBAR_ITEM_SELECT} ${t.type==="button-select"?A.TOOLBAR_ITEM_BUTTON_SELECT:""}`,s.dataset.title=t.type=="button-select"?"Options":Te(t,e);let i=document.createElement("div");i.style.width=t.width,i.style.textAlign="left",i.style.display="flex",i.style.justifyContent="space-between";let l=document.createElement("span");l.innerHTML=Re(t,e);let c=document.createElement("span");t.type=="button-select"?c.innerHTML=L.ARROW_DROP_DOWN_FILL:(c.innerHTML=L.ARROW_DOWN,c.style.paddingLeft="8px"),i.append(l,c),s.append(i);let d=document.createElement("div");d.className=`${e.classPrefix}${A.DROPDOWN_CONTENT}`;let p=structuredClone(t.options);if(t.pluginId==="font"&&e.additionalFonts){let u=e.additionalFonts.map(r=>({label:`<span style="font-family: '${r.fontFamily}';">${r.name}</span>`,value:r.fontFamily}));p.push(...u)}return p.forEach(u=>{let r=document.createElement("button");r.type="button",r.innerHTML=u.label,r.setAttribute("data-value",u.value),r.setAttribute("data-toolbar-option",!0),r.addEventListener("click",function(m){d.style.display="none",t.click(u.value,n,e)}),d.appendChild(r)}),s.onclick=()=>{if(d.style.display==="block"){d.style.display="none",document.removeEventListener("mousedown",o,!1),n.elements.editor.removeEventListener("click",o,!1);return}d.style.display="block";let r=Me(d).getBoundingClientRect(),m=d.getBoundingClientRect(),b=m.right>r.right,f=m.left<r.left;b?d.style.right="10px":f&&(d.style.left="10px"),document.addEventListener("mousedown",o),n.elements.editor.addEventListener("click",o)},a.appendChild(s),a.appendChild(d),a},Vt=(t,e,{type:n,td:o,image:a,updateImage:s,updateTable:i})=>{let l=r=>{c.contains(r.target)||(u.style.display="none",document.removeEventListener("mousedown",l,!1),e.elements.editor.removeEventListener("click",l,!1))},c=document.createElement("div");c.setAttribute("data-type","popover");let d=document.createElement("button");d.type="button",d.className=`${t.classPrefix}${A.TOOLBAR_ITEM}`,d.setAttribute("data-title",`Edit ${n==="td"?"Cell":n==="image"?"Image":"Embed"}`);let p=document.createElement("div");p.innerHTML=L.EDIT,d.appendChild(p);let u=document.createElement("div");if(u.className=`${t.classPrefix}${A.POPOVER_CONTENT}`,n==="image"||n==="figure"){let r={byPercentage:Math.random(),byPixels:Math.random(),percentageWidth:Math.random(),percentageHeight:Math.random(),pixelsWidth:Math.random(),pixelsHeight:Math.random(),percentage:Math.random(),pixels:Math.random(),aspectRatio:Math.random(),altText:Math.random(),submit:Math.random()};u.innerHTML=`
379
379
  <div style="border-bottom: 1px solid gray; padding-bottom: 4px;">
380
380
  <div>
381
381
  By:
382
- <input type="radio" value="percentage" id="${c.byPercentage}" checked/>
383
- <label for="${c.byPercentage}">Percentage</label>
384
- <input type="radio" value="pixels" id="${c.byPixels}" />
385
- <label for="${c.byPixels}">Pixels</label>
382
+ <input type="radio" value="percentage" id="${r.byPercentage}" checked/>
383
+ <label for="${r.byPercentage}">Percentage</label>
384
+ <input type="radio" value="pixels" id="${r.byPixels}" />
385
+ <label for="${r.byPixels}">Pixels</label>
386
386
  </div>
387
- <div id="${c.percentage}">
387
+ <div id="${r.percentage}">
388
388
  <div style="display: flex; justify-content: space-between; margin-top: 4px">
389
- <label for="${c.percentageWidth}">Width (%)</label>
390
- <input style="width: 100px" type="number" name='width' placeholder="Width" id="${c.percentageWidth}" />
389
+ <label for="${r.percentageWidth}">Width (%)</label>
390
+ <input style="width: 100px" type="number" name='width' placeholder="Width" id="${r.percentageWidth}" />
391
391
  </div>
392
392
  <div style="display: flex; justify-content: space-between; margin-top: 4px">
393
- <label for="${c.percentageHeight}">Height (%)</label>
394
- <input style="width: 100px" type="number" name='height' placeholder="Height" id="${c.percentageHeight}" />
393
+ <label for="${r.percentageHeight}">Height (%)</label>
394
+ <input style="width: 100px" type="number" name='height' placeholder="Height" id="${r.percentageHeight}" />
395
395
  </div>
396
396
  </div>
397
- <div id="${c.pixels}" style="display: none">
397
+ <div id="${r.pixels}" style="display: none">
398
398
  <div style="display: flex; justify-content: space-between; margin-top: 4px">
399
- <label for="${c.pixelsWidth}">Width (px)</label>
400
- <input style="width: 100px" type="number" name='width' placeholder="Width" id="${c.pixelsWidth}" />
399
+ <label for="${r.pixelsWidth}">Width (px)</label>
400
+ <input style="width: 100px" type="number" name='width' placeholder="Width" id="${r.pixelsWidth}" />
401
401
  </div>
402
402
  <div style="display: flex; justify-content: space-between; margin-top: 4px">
403
- <label for="${c.pixelsHeight}">Height (px)</label>
404
- <input style="width: 100px" type="number" name='height' placeholder="Height" id="${c.pixelsHeight}" />
403
+ <label for="${r.pixelsHeight}">Height (px)</label>
404
+ <input style="width: 100px" type="number" name='height' placeholder="Height" id="${r.pixelsHeight}" />
405
405
  </div>
406
406
  </div>
407
407
  <div style="margin-top: 4px;">
408
- <input type="checkbox" id="${c.aspectRatio}" checked/>
409
- <label for="${c.aspectRatio}">Maintain Aspect Ratio</label>
408
+ <input type="checkbox" id="${r.aspectRatio}" checked/>
409
+ <label for="${r.aspectRatio}">Maintain Aspect Ratio</label>
410
410
  </div>
411
411
  ${n==="image"?`
412
412
  <div style="display: flex; justify-content: space-between; margin-top: 4px">
413
- <label for="${c.altText}">Alt Text</label>
414
- <input style="width: 100px" type="text" id="${c.altText}" placeholder="Enter alt text" style="width: 100%;" />
413
+ <label for="${r.altText}">Alt Text</label>
414
+ <input style="width: 100px" type="text" id="${r.altText}" placeholder="Enter alt text" style="width: 100%;" />
415
415
  </div>`:""}
416
416
  <div style="display: flex; justify-content: end; margin-top: 4px;">
417
- <button style="border: 1px solid gray; padding: 2px 4px; border-radius: 4px; color: white; background-color: hsl(160, 100%, 40%);" type="button" id="${c.submit}">Update</button>
417
+ <button style="border: 1px solid gray; padding: 2px 4px; border-radius: 4px; color: white; background-color: hsl(160, 100%, 40%);" type="button" id="${r.submit}">Update</button>
418
418
  </div>
419
419
  </div >
420
- `;let p=document.createElement("div");p.className=`${t.classPrefix}${A.RESIZE_ITEMS} `,gt.forEach(g=>{let f=document.createElement("button");f.type="button",f.className=`${t.classPrefix}${A.RESIZE_ITEM} `,f.setAttribute("data-title",g.title),f.setAttribute("data-type","button"),f.onclick=y=>{y.preventDefault(),s(g.event)};let b=document.createElement("div");b.innerHTML=g.icon,f.appendChild(b),p.appendChild(f)}),r.appendChild(p),m.onclick=()=>{let g=v=>{v.key==="Enter"&&(v.preventDefault(),C.submit.click())};if(r.style.display==="block"){r.style.display="none",document.removeEventListener("mousedown",l,!1),e.elements.editor.removeEventListener("click",l,!1);return}r.style.display="block";let b=Me(r).getBoundingClientRect(),y=r.getBoundingClientRect(),h=y.right>b.right,x=y.left<b.left;h?r.style.right="10px":x&&(r.style.left="10px");let C={byPercentage:document.getElementById(c.byPercentage),byPixels:document.getElementById(c.byPixels),percentageWidth:document.getElementById(c.percentageWidth),percentageHeight:document.getElementById(c.percentageHeight),pixelsWidth:document.getElementById(c.pixelsWidth),pixelsHeight:document.getElementById(c.pixelsHeight),percentage:document.getElementById(c.percentage),pixels:document.getElementById(c.pixels),aspectRatio:document.getElementById(c.aspectRatio),submit:document.getElementById(c.submit)};n=="image"&&(C.altText=document.getElementById(c.altText));let E=a.getBoundingClientRect();C.percentageWidth.value=E.width/a.naturalWidth*100,C.percentageHeight.value=E.height/a.naturalHeight*100,C.pixelsWidth.value=E.width,C.pixelsHeight.value=E.height,n=="image"&&(C.altText.value=a.alt||""),C.byPercentage.onchange=v=>{v.target.checked&&(C.pixels.style.display="none",C.percentage.style.display="block",C.byPixels.checked=!1)},C.byPixels.onchange=v=>{v.target.checked&&(C.percentage.style.display="none",C.pixels.style.display="block",C.byPercentage.checked=!1)};let k=v=>{let T=parseInt(v.target.value);T&&(T>100&&(T=100),C.aspectRatio.checked?(C.percentageWidth.value=T,C.percentageHeight.value=T):v.target.value=T)};C.percentageWidth.oninput=k,C.percentageHeight.oninput=k;let w=v=>{let T=parseInt(v.target.value);if(T)if(C.aspectRatio.checked){let R,H;if(v.target.name==="width"){R=T;let M=a.naturalWidth/T;H=a.naturalHeight/M}else{H=T;let M=a.naturalHeight/T;R=a.naturalWidth/M}C.pixelsWidth.value=R,C.pixelsHeight.value=H}else v.target.value=T};C.pixelsWidth.oninput=w,C.pixelsHeight.oninput=w,C.percentageWidth.onkeydown=g,C.percentageHeight.onkeydown=g,C.pixelsWidth.onkeydown=g,C.pixelsHeight.onkeydown=g,C.aspectRatio.onchange=v=>{if(v.target.checked)if(C.byPixels.checked){let T=a.naturalWidth/parseInt(C.pixelsWidth.value),R=a.naturalHeight/T;C.pixelsHeight.value=R}else C.percentageHeight.value=C.percentageWidth.value},C.submit.onclick=v=>{C.byPixels.checked?parseInt(C.pixelsWidth.value)&&parseInt(C.pixelsHeight.value)&&s("update",{width:C.pixelsWidth.value+"px",height:C.pixelsHeight.value+"px"}):C.byPercentage.checked&&parseInt(C.percentageWidth.value)&&parseInt(C.percentageHeight.value)&&s("update",{width:C.percentageWidth.value+"%",height:C.percentageHeight.value+"%"}),n=="image"&&(a.alt=C.altText.value)},document.addEventListener("mousedown",l),e.elements.editor.addEventListener("click",l)}}else if(n==="td"){r.style.padding="0";let c=document.createElement("div");c.className=`${t.classPrefix}${A.POPOVER_TABS}`;let p=document.createElement("div");p.style.padding="0px 2px",r.innerHTML="",r.append(c,p);let g=f=>{let b=f.event==="border-color"||f.event==="background-color"||f.event==="row-background-color"||f.event==="column-background-color",y=["cell-width","cell-height","cell-padding"].includes(f.event),h;if(b){h=document.createElement("label"),h.className=`${t.classPrefix}${A.RESIZE_ITEM}`,h.style.display="flex",h.style.gap="6px",h.style.alignItems="center",h.style.width="100%",h.style.cursor="pointer",h.style.padding="4px 8px",h.onmouseenter=()=>{h.style.backgroundColor="#ddd"},h.onmouseleave=()=>{h.style.backgroundColor="transparent"};let x=document.createElement("span");x.innerHTML=f.icon;let C=document.createElement("span");C.textContent=f.title;let E=document.createElement("input");E.type="color",E.style.width="24px",E.style.height="24px",E.style.padding="0px",E.style.border="none",E.style.background="transparent",E.style.cursor="pointer",E.oninput=k=>{i(f.event,k.target.value)},h.append(x,C,E)}else if(y){h=document.createElement("label"),h.className=`${t.classPrefix}${A.RESIZE_ITEM}`,h.style.display="flex",h.style.gap="8px",h.style.alignItems="center",h.style.width="100%",h.style.cursor="pointer",h.style.padding="4px 8px",h.onmouseenter=()=>{h.style.backgroundColor="#ddd"},h.onmouseleave=()=>{h.style.backgroundColor="transparent"};let x=document.createElement("span");x.innerHTML=f.icon;let C=document.createElement("span");C.textContent=f.title;let E=document.createElement("input");E.type="number",E.placeholder="auto",E.style.width="60px",E.style.padding="2px",E.style.border="1px solid #ccc",E.style.borderRadius="4px",f.event==="cell-width"?E.value=Le(o.style.width)||"":f.event==="cell-height"?E.value=Le(o.parentElement.style.height)||"":f.event==="cell-padding"&&(E.value=Le(o.style.padding)||""),E.onchange=k=>i(f.event,(Number.parseInt(k.target.value)||0)+"px"),E.onclick=k=>k.stopPropagation(),h.append(x,C,E)}else{h=document.createElement("button"),h.type="button",h.className=`${t.classPrefix}${A.RESIZE_ITEM}`,h.style.display="flex",h.style.alignItems="center",h.style.gap="8px",h.style.width="100%",h.style.padding="4px 8px",h.style.border="none",h.style.background="transparent",h.style.textAlign="left",h.onmouseenter=()=>{h.style.backgroundColor="#ddd"},h.onmouseleave=()=>{h.style.backgroundColor="transparent"},h.onclick=E=>{E.preventDefault(),i(f.event)};let x=document.createElement("div");x.innerHTML=f.icon;let C=document.createElement("span");C.textContent=f.title,h.append(x,C)}return h};Object.keys(Ue).forEach((f,b)=>{let y=document.createElement("button");y.type="button",y.textContent=f,y.className=`${t.classPrefix}${A.POPOVER_TAB}`;let h=f.replaceAll(" ","-");y.dataset.tab=h;let x=document.createElement("div");x.id=h,x.className=`${t.classPrefix}${A.POPOVER_TAB_CONTENT}`,x.style.display="none",b===0&&(y.classList.add("active"),x.style.display="block");let C=Ue[f];Object.keys(C).forEach(E=>{if(E){let w=document.createElement("div");w.style.padding="4px",w.textContent=E,x.appendChild(w)}let k=document.createElement("div");k.className=`${t.classPrefix}${A.RESIZE_ITEMS}`,k.style.width="100%",C[E].forEach(w=>{let v=ft.find(T=>T.event===w);if(v){let T=g(v);k.appendChild(T)}}),x.appendChild(k)}),c.appendChild(y),p.appendChild(x),y.onclick=E=>{c.querySelectorAll(`.${t.classPrefix}${A.POPOVER_TAB}`).forEach(k=>{k.classList.remove("active")}),p.querySelectorAll(`.${t.classPrefix}${A.POPOVER_TAB_CONTENT}`).forEach(k=>{k.style.display="none"}),E.currentTarget.classList.add("active"),p.querySelector(`#${E.currentTarget.getAttribute("data-tab")}`).style.display="block"}}),m.onclick=()=>{if(r.style.display==="block"){r.style.display="none",document.removeEventListener("mousedown",l,!1),e.elements.editor.removeEventListener("click",l,!1);return}r.style.display="block";let b=Me(r).getBoundingClientRect(),y=r.getBoundingClientRect(),h=y.right>b.right,x=y.left<b.left;h?r.style.right="20px":x&&(r.style.left="20px"),document.addEventListener("mousedown",l),e.elements.editor.addEventListener("click",l)}}d.appendChild(m),d.appendChild(r),e.elements.toolbarContainer.appendChild(d),e.elements.resizerPlugin=d},ve=({title:t,bodyNode:e,footerNode:n},o,a)=>{let s=document.createElement("div");s.className=`${a.classPrefix}${A.MODAL} `;let i=document.createElement("div");i.className=`${a.classPrefix}${A.MODAL_CONTENT} `;let l=document.createElement("div");l.className=`${a.classPrefix}${A.MODAL_HEADER} `;let d=document.createElement("span");d.innerText=t??"";let m=document.createElement("button");m.className="modal-close-btn",m.innerHTML=L.CLOSE,m.type="button",m.onclick=()=>{o.elements.base.removeChild(s)},l.append(d,m);let u=document.createElement("div");u.className=`${a.classPrefix}${A.MODAL_BODY} `,u.appendChild(e);let r=document.createElement("div");return r.className=`${a.classPrefix}${A.MODAL_FOOTER} `,r.appendChild(n),i.appendChild(l),i.appendChild(u),i.appendChild(r),s.appendChild(i),o.elements.base.appendChild(s),{close:()=>{o.elements.base.removeChild(s)}}},An=({title:t,bodyNode:e,footerNode:n,onClose:o},a,s)=>{let i=document.createElement("div");i.className=`${s.classPrefix}${A.MODAL} ${s.classPrefix}${A.DRAGGABLE_MODAL} `;let l=document.createElement("div");l.className=`${s.classPrefix}${A.MODAL_CONTENT} `;let d=document.createElement("div");if(d.className=`${s.classPrefix}${A.MODAL_HEADER} `,t instanceof HTMLElement)d.appendChild(t);else{let k=document.createElement("span");k.innerText=t??"",d.appendChild(k)}let m=document.createElement("button");m.className="modal-close-btn",m.innerHTML=L.CLOSE,m.type="button",m.onclick=()=>{i.remove(),typeof o=="function"&&o()},d.appendChild(m);let u=!1,r,c,p,g,f=0,b=0,y=k=>{k.target.closest("button")||(k.type==="touchstart"?(p=k.touches[0].clientX-f,g=k.touches[0].clientY-b):(p=k.clientX-f,g=k.clientY-b),u=!0,document.addEventListener("mouseup",h),document.addEventListener("touchend",h),a.elements.iframeWindow.addEventListener("mouseup",h),a.elements.iframeWindow.addEventListener("touchend",h),document.addEventListener("mousemove",x),document.addEventListener("touchmove",x))},h=()=>{u=!1,document.removeEventListener("mouseup",h,!1),document.removeEventListener("touchend",h,!1),a.elements.iframeWindow.removeEventListener("mouseup",h,!1),a.elements.iframeWindow.removeEventListener("touchend",h,!1),document.removeEventListener("mousemove",x,!1),document.removeEventListener("touchmove",x,!1)},x=k=>{u&&(k.preventDefault(),r=(k.type==="touchmove"?k.touches[0].clientX:k.clientX)-p,c=(k.type==="touchmove"?k.touches[0].clientY:k.clientY)-g,f=r,b=c,i.style.transform=`translate(-50%, -50%) translate3d(${r}px, ${c}px, 0)`)};d.addEventListener("mousedown",y,!1),d.addEventListener("touchstart",y,!1);let C=document.createElement("div");C.className=`${s.classPrefix}${A.MODAL_BODY} `,C.appendChild(e);let E=document.createElement("div");return E.className=`${s.classPrefix}${A.MODAL_FOOTER} `,E.appendChild(n),l.appendChild(d),l.appendChild(C),l.appendChild(E),i.appendChild(l),a.elements.base.appendChild(i),{close:()=>{i.remove(),typeof o=="function"&&o()}}},at=(t,e,n,o)=>{pe(n,o),K(o,"disabled",["link","align_justify","align_left","align_right","align_center"]),o.elements.editor.blur();let a=e.getBoundingClientRect(),s=document.createElement("div");if(s.className="resizer",s.style.width=a.width+"px",s.style.height=a.height+"px",s.style.top=a.top+"px",s.style.left=a.left+"px",t==="image"){let v=document.createElement("span");v.innerHTML=L.FULLSCREEN_IMAGE,v.style.position="absolute",v.style.top="5px",v.style.right="5px",v.style.background="rgba(0, 0, 0, 0.6)",v.style.color="white",v.style.border="none",v.style.cursor="pointer",v.style.borderRadius="4px",v.style.fontSize="14px",v.style.transition="0.3s ease-in-out",v.style.width="28px",v.style.height="28px",v.style.display="flex",v.style.alignItems="center",v.style.justifyContent="center",v.addEventListener("click",()=>{var M;let T=e.closest("a"),R=!1,H=e.src;if(((M=T==null?void 0:T.dataset)==null?void 0:M.leksyPreview)==="video-url"){let I=T.getAttribute("href");I&&(R=!0,H=I)}if(n.onFullScreen instanceof Function){let I=R?"video/mp4":"image/png";n.onFullScreen(H,I)}else In(H,o,n,R)}),s.appendChild(v)}let i,l,d,m,u,r=v=>{u=s.getBoundingClientRect(),d=v.target.getAttribute("data-resize"),i=v.clientX||v.touches[0].clientX,l=v.clientY||v.touches[0].clientY,m=s.offsetWidth/s.offsetHeight,o.elements.iframeWindow.addEventListener("mousemove",c),o.elements.iframeWindow.addEventListener("mouseup",p),o.elements.iframeWindow.addEventListener("touchmove",c),o.elements.iframeWindow.addEventListener("touchend",p)},c=v=>{let T={clientX:v.clientX||v.touches[0].clientX,clientY:v.clientY||v.touches[0].clientY};if(d==="up"){let R=u.top+(T.clientY-l),H=u.height-(T.clientY-l);H<0&&(R=u.bottom,H=0),s.style.top=R+"px",s.style.height=H+"px"}else if(d==="bottom"){let R=u.height+(T.clientY-l);R<0&&(R=0),s.style.height=R+"px"}else if(d==="left"){let R=u.left+(T.clientX-i),H=u.width-(T.clientX-i);H<0&&(R=u.right,H=0),s.style.left=R+"px",s.style.width=H+"px"}else if(d==="right"){let R=u.width+(T.clientX-i);R<0&&(R=0),s.style.width=R+"px"}else if(d==="bottom-right"){let R=T.clientX-i,H=T.clientY-l,M=Math.sign(R)===-1||Math.sign(H)===-1?Math.min(R,H):Math.max(R,H),I=u.width+M,N=I/m;s.style.width=I+"px",s.style.height=N+"px"}else if(d==="bottom-left"){let R=T.clientX-i,H=T.clientY-l,M=R>0?Math.max(R,H):R,I=u.width-M;I<0&&(I=0);let N=u.left+u.width-I,_=I/m;s.style.width=I+"px",s.style.left=N+"px",s.style.height=_+"px"}else if(d==="up-right"){let R=T.clientX-i,H=T.clientY-l,M=R>0?Math.max(R,H):R,I=u.width+M;I<0&&(I=0);let N=I/m,_=u.top+(u.height-N);s.style.top=_+"px",s.style.width=I+"px",s.style.height=N+"px"}else if(d==="up-left"){let R=T.clientX-i,H=T.clientY-l,M=R>0?Math.max(R,H):R,I=u.width-M;I<0&&(I=0);let N=I/m,_=u.top+(u.height-N),$=u.left+(u.width-I);s.style.top=_+"px",s.style.width=I+"px",s.style.height=N+"px",s.style.left=$+"px"}T.textContent=`${parseInt(s.style.width)}x${parseInt(s.style.height)} `},p=v=>{e.style.width=parseInt(s.style.width)+"px",e.style.height=parseInt(s.style.height)+"px";let T=e.getBoundingClientRect();s.style.width=T.width+"px",s.style.height=T.height+"px",s.style.top=T.top+"px",s.style.left=T.left+"px",o.elements.iframeWindow.removeEventListener("mousemove",c,!1),o.elements.iframeWindow.removeEventListener("mouseup",p,!1),o.elements.iframeWindow.removeEventListener("touchmove",c,!1),o.elements.iframeWindow.removeEventListener("touchend",p,!1)},g=document.createElement("button");g.type="button",g.className="dot up-left",g.setAttribute("data-resize","up-left"),g.addEventListener("mousedown",r),g.addEventListener("touchstart",r);let f=document.createElement("button");f.type="button",f.className="dot up",f.setAttribute("data-resize","up"),f.addEventListener("mousedown",r),f.addEventListener("touchstart",r);let b=document.createElement("button");b.type="button",b.className="dot up-right",b.setAttribute("data-resize","up-right"),b.addEventListener("mousedown",r),b.addEventListener("touchstart",r);let y=document.createElement("button");y.type="button",y.className="dot right",y.setAttribute("data-resize","right"),y.addEventListener("mousedown",r),y.addEventListener("touchstart",r);let h=document.createElement("button");h.type="button",h.className="dot bottom-right",h.setAttribute("data-resize","bottom-right"),h.addEventListener("mousedown",r),h.addEventListener("touchstart",r);let x=document.createElement("button");x.type="button",x.className="dot bottom",x.setAttribute("data-resize","bottom"),x.addEventListener("mousedown",r),x.addEventListener("touchstart",r);let C=document.createElement("button");C.type="button",C.className="dot bottom-left",C.setAttribute("data-resize","bottom-left"),C.addEventListener("mousedown",r),C.addEventListener("touchstart",r);let E=document.createElement("button");E.type="button",E.className="dot left",E.setAttribute("data-resize","left"),E.addEventListener("mousedown",r),E.addEventListener("touchstart",r);let k=document.createElement("div");k.className="position",k.textContent=`${parseInt(a.width)}x${parseInt(a.height)} `,s.append(g,f,b,y,h,x,C,E,k);let w=(v,T)=>{switch(v){case"update":e.style.width=T.width,e.style.height=T.height;break;case"100%":case"75%":case"50%":case"auto":e.style.width=v,e.style.height="unset";break;case"wrap-left":e.style.float="left",e.style.margin="0 10px 10px 0";break;case"wrap-right":e.style.float="right",e.style.margin="0 0 10px 10px";break;case"revert":e.style.width="unset",e.style.height="unset",e.style.float="none",e.style.margin="";break;case"delete":e.remove(),pe(n,o);break}let R=e.getBoundingClientRect();s.style.width=R.width+"px",s.style.height=R.height+"px",s.style.top=R.top+"px",s.style.left=R.left+"px",k.textContent=`${parseInt(s.style.width)}x${parseInt(s.style.height)} `};Pt(n,o,{type:t,image:e,updateImage:w}),o.elements.resizerImage=e,o.elements.resizer=s,o.elements.iframeWindow.body.appendChild(s),o.resizerHandler=v=>Mn(v,o),o.deleteImageHandler=v=>{(v.key==="Backspace"||v.key==="Delete")&&w("delete")},o.elements.iframeWindow.addEventListener("scroll",o.resizerHandler),o.elements.iframeWindow.addEventListener("keydown",o.deleteImageHandler)},In=(t,e,n,o=!1)=>{let a=document.createElement("div");a.className=`${n.classPrefix}${A.PREVIEW_MODAL_OVERLAY} `;let s=document.createElement("div");s.className=`${n.classPrefix}${A.PREVIEW_MODAL_CONTENT} `;let i=document.createElement("span");i.className=`${n.classPrefix}${A.PREVIEW_MODAL_CLOSE} `,i.innerHTML=L.CLOSE,i.onclick=()=>a.remove();let l=document.createElement("div");l.className=`${n.classPrefix}${A.PREVIEW_MODAL_BODY} `;let d;o?(d=document.createElement("video"),d.src=t,d.controls=!0,d.style.maxWidth="100%",d.style.maxHeight="100%",d.setAttribute("controlsList","nodownload"),d.setAttribute("disablePictureInPicture",!0)):(d=document.createElement("img"),d.src=t,d.alt="Preview Image"),l.appendChild(d),s.append(i,l),a.appendChild(s),document.body.appendChild(a),a.addEventListener("click",m=>{m.target!==d&&a.remove()}),setTimeout(()=>{a.classList.add("active")},10)},Mn=(t,e)=>{let n=e.elements.resizerImage.getBoundingClientRect();e.elements.resizer.style.width=n.width+"px",e.elements.resizer.style.height=n.height+"px",e.elements.resizer.style.top=n.top+"px",e.elements.resizer.style.left=n.left+"px"},pe=(t,e)=>{t.disabled||K(e,"enabled"),e.elements.resizerPlugin&&e.elements.toolbarContainer.removeChild(e.elements.resizerPlugin),e.elements.resizer&&e.elements.iframeWindow.body.removeChild(e.elements.resizer),e.elements.iframeWindow.removeEventListener("scroll",e.resizerHandler,!1),e.elements.iframeWindow.removeEventListener("scroll",e.deleteImageHandler,!1),e.elements.iframeWindow.removeEventListener("keydown",e.deleteImageHandler,!1),delete e.elements.resizer,delete e.resizerHandler,delete e.deleteImageHandler,delete e.elements.resizerImage,delete e.elements.resizerPlugin},ue=t=>{let e=[],n=t.rows;for(let o=0;o<n.length;o++){e[o]||(e[o]=[]);let a=n[o],s=0;for(let i=0;i<a.cells.length;i++){let l=a.cells[i];for(;e[o][s];)s++;let d=l.rowSpan||1,m=l.colSpan||1;for(let u=0;u<d;u++)for(let r=0;r<m;r++)e[o+u]||(e[o+u]=[]),e[o+u][s+r]=l;s+=m}}return e},z=(t,e)=>{for(let n=0;n<t.length;n++)for(let o=0;o<t[n].length;o++)if(t[n][o]===e)return{r:n,c:o};return null},Vt=(t,e,n)=>{te(e,n);let o=t.closest("table");if(!o)return;let a=o.getBoundingClientRect(),s,i,l=f=>{let b=f.target.closest("th, td");if(!b)return;let h=b.getBoundingClientRect().right-f.clientX<=je;o.style.cursor=h?"col-resize":"default"},d=f=>{let b=f.type==="touchstart",y=b?f.touches[0].clientX:f.clientX;if(!b&&o.style.cursor!=="col-resize")return;let h=f.target.closest("td, th");if(!h||b&&!(h.getBoundingClientRect().right-y<=je))return;f.preventDefault(),f.stopPropagation();let x=y,C=Array.from(o.rows[0].cells);C.forEach(N=>{N.style.width=N.getBoundingClientRect().width+"px"});let E=h.getBoundingClientRect(),k=C.findIndex(N=>Math.abs(N.getBoundingClientRect().right-E.right)<5);if(k===-1)return;let w=C[k],v=C[k+1],T=w.getBoundingClientRect().width,R=v?v.getBoundingClientRect().width:0,H=o.getBoundingClientRect().width,M=N=>{let $=(N.type==="touchmove"?N.touches[0].clientX:N.clientX)-x;if(v){let re=Math.min(Math.max($,30-T),R-30);w.style.width=T+re+"px",v.style.width=R-re+"px"}else{let le=Math.max(T+$,30),re=le-T;w.style.width=le+"px",o.style.width=H+re+"px"}n.elements.iframeWindow.body.style.cursor="col-resize"},I=()=>{n.elements.iframeWindow.body.style.cursor="",n.elements.iframeWindow.removeEventListener("mousemove",M),n.elements.iframeWindow.removeEventListener("mouseup",I),n.elements.iframeWindow.removeEventListener("touchmove",M),n.elements.iframeWindow.removeEventListener("touchend",I)};n.elements.iframeWindow.addEventListener("mousemove",M),n.elements.iframeWindow.addEventListener("mouseup",I),n.elements.iframeWindow.addEventListener("touchmove",M),n.elements.iframeWindow.addEventListener("touchend",I)};o.addEventListener("mousemove",l),o.addEventListener("mousedown",d),o.addEventListener("touchstart",d),n.tableColumnResizeHandlers={mousemove:l,mousedown:d,touchstart:d};let m=f=>{s=f.clientX||f.touches[0].clientX,i=f.clientY||f.touches[0].clientY,n.elements.iframeWindow.addEventListener("mousemove",u),n.elements.iframeWindow.addEventListener("mouseup",r),n.elements.iframeWindow.addEventListener("touchmove",u),n.elements.iframeWindow.addEventListener("touchend",r)},u=f=>{let b=(f.clientX||f.touches[0].clientX)-s,y=(f.clientY||f.touches[0].clientY)-i,h=a.width+b,x=a.height+y;o.style.width=h+"px",o.style.height=x+"px"},r=f=>{n.elements.iframeWindow.removeEventListener("mousemove",u,!1),n.elements.iframeWindow.removeEventListener("mouseup",r,!1),n.elements.iframeWindow.removeEventListener("touchmove",u,!1),n.elements.iframeWindow.removeEventListener("touchend",r,!1)};Pt(e,n,{type:"td",td:t,updateTable:(f,b)=>{let y=t.parentElement.rowIndex,h=t.cellIndex,x=o.rows[0].cells.length,C=(w,v)=>{let T=w.insertCell(v);T.innerHTML="\xA0",T.style.border="1px solid black"},E=(w,v)=>{if(w){let T=w.style[v];w.style[v]=["none","medium","medium none","0px none rgb(0, 0, 0)"].includes(T)?"1px solid black":"none"}},k=()=>{o.rows.length===0&&o.remove()};switch(f){case"insert-row-above":{let w=o.insertRow(y);for(let v=0;v<x;v++)C(w,v);break}case"insert-row-below":{let w=o.insertRow(y+1);for(let v=0;v<x;v++)C(w,v);break}case"delete-row":{o.deleteRow(y),te(e,n),k();break}case"merge-cell-right":{let w=ue(o),v=z(w,t);if(!v)break;let{r:T,c:R}=v,H=w[T][R+(t.colSpan||1)];H&&H!==t&&(H.rowSpan||1)===(t.rowSpan||1)&&z(w,H).r===T&&(H.innerHTML.trim()!==""&&(t.innerHTML+="<br/>"+H.innerHTML),t.colSpan=(t.colSpan||1)+(H.colSpan||1),H.remove());break}case"merge-cell-left":{let w=ue(o),v=z(w,t);if(!v)break;let{r:T,c:R}=v;if(R===0)break;let H=w[T][R-1];H&&H!==t&&(H.rowSpan||1)===(t.rowSpan||1)&&z(w,H).r===T&&(H.innerHTML.trim()!==""&&(t.innerHTML=H.innerHTML+"<br/>"+t.innerHTML),t.colSpan=(t.colSpan||1)+(H.colSpan||1),H.parentNode.insertBefore(t,H),H.remove());break}case"merge-cell-down":{let w=ue(o),v=z(w,t);if(!v)break;let{r:T,c:R}=v,H=T+(t.rowSpan||1);if(H>=w.length)break;let M=w[H][R];M&&M!==t&&(M.colSpan||1)===(t.colSpan||1)&&z(w,M).c===R&&(M.innerHTML.trim()!==""&&(t.innerHTML+="<br/>"+M.innerHTML),t.rowSpan=(t.rowSpan||1)+(M.rowSpan||1),M.remove());break}case"merge-cell-up":{let w=ue(o),v=z(w,t);if(!v)break;let{r:T,c:R}=v;if(T===0)break;let H=w[T-1][R];H&&H!==t&&(H.colSpan||1)===(t.colSpan||1)&&z(w,H).c===R&&(H.innerHTML.trim()!==""&&(t.innerHTML=H.innerHTML+"<br/>"+t.innerHTML),t.rowSpan=(t.rowSpan||1)+(H.rowSpan||1),H.parentNode.insertBefore(t,H),H.remove());break}case"insert-column-left":{for(let w of o.rows)C(w,h);break}case"insert-column-right":{for(let w of o.rows)C(w,h+1);break}case"delete-column":{for(let w of o.rows)w.deleteCell(h);k(),te(e,n);break}case"split-cell-vertical":{let w=t.colSpan||1;if(w>1){t.colSpan=w-1;let v=t.parentNode.insertCell(t.cellIndex+1);v.innerHTML="\xA0",v.style.border=t.style.border,v.rowSpan=t.rowSpan}break}case"split-cell-horizontal":{let w=t.rowSpan||1;if(w>1){t.rowSpan=w-1;let v=ue(o),T=z(v,t),{r:R,c:H}=T,M=R+w-1,I=o.rows[M],N=0;for(let $=0;$<I.cells.length;$++){let le=I.cells[$];if(z(v,le).c<H)N++;else break}let _=I.insertCell(N);_.innerHTML="\xA0",_.style.border=t.style.border,_.colSpan=t.colSpan}break}case"align-left":{o.style.marginLeft="0",o.style.marginRight="auto";break}case"align-center":{o.style.marginLeft="auto",o.style.marginRight="auto";break}case"align-right":{o.style.marginLeft="auto",o.style.marginRight="0";break}case"cell-border-top":{if(E(t,"borderTop"),y>0){let w=o.rows[y-1].cells[h];E(w,"borderBottom")}break}case"cell-border-right":{if(E(t,"borderRight"),h<o.rows[y].cells.length-1){let w=o.rows[y].cells[h+1];E(w,"borderLeft")}break}case"cell-border-bottom":{if(E(t,"borderBottom"),y<o.rows.length-1){let w=o.rows[y+1].cells[h];E(w,"borderTop")}break}case"cell-border-left":{if(E(t,"borderLeft"),h>0){let w=o.rows[y].cells[h-1];E(w,"borderRight")}break}case"cell-border-full":{t.style.border="1px solid black",y>0&&o.rows[y-1].cells[h]&&(o.rows[y-1].cells[h].style.borderBottom="1px solid black"),y<o.rows.length-1&&o.rows[y+1].cells[h]&&(o.rows[y+1].cells[h].style.borderTop="1px solid black"),h>0&&o.rows[y].cells[h-1]&&(o.rows[y].cells[h-1].style.borderRight="1px solid black"),h<o.rows[y].cells.length-1&&o.rows[y].cells[h+1]&&(o.rows[y].cells[h+1].style.borderLeft="1px solid black");break}case"cell-border-none":{t.style.border="none",y>0&&o.rows[y-1].cells[h]&&(o.rows[y-1].cells[h].style.borderBottom="none"),y<o.rows.length-1&&o.rows[y+1].cells[h]&&(o.rows[y+1].cells[h].style.borderTop="none"),h>0&&o.rows[y].cells[h-1]&&(o.rows[y].cells[h-1].style.borderRight="none"),h<o.rows[y].cells.length-1&&o.rows[y].cells[h+1]&&(o.rows[y].cells[h+1].style.borderLeft="none");break}case"fixed-column-width":{o.style.tableLayout==="fixed"?o.style.tableLayout="auto":(o.style.tableLayout="fixed",o.style.wordBreak="break-all");break}case"border-color":{t.style.borderColor=b,y>0&&o.rows[y-1].cells[h]&&(o.rows[y-1].cells[h].style.borderBottomColor=b),y<o.rows.length-1&&o.rows[y+1].cells[h]&&(o.rows[y+1].cells[h].style.borderTopColor=b),h>0&&o.rows[y].cells[h-1]&&(o.rows[y].cells[h-1].style.borderRightColor=b),h<o.rows[y].cells.length-1&&o.rows[y].cells[h+1]&&(o.rows[y].cells[h+1].style.borderLeftColor=b);break}case"background-color":{t.style.backgroundColor=b;break}case"row-background-color":{let w=t.parentElement;for(let v=0;v<w.cells.length;v++)w.cells[v].style.backgroundColor=b;break}case"column-background-color":{for(let w=0;w<o.rows.length;w++){let v=o.rows[w].cells[h];v&&(v.style.backgroundColor=b)}break}case"cell-width":{for(let w=0;w<o.rows.length;w++){let v=o.rows[w].cells[h];v&&(v.style.width=b)}break}case"cell-height":{t.parentElement.style.height=b;break}case"cell-padding":{t.style.padding=b;break}}}});let p=document.createElement("div");p.className="table-resizer",p.style.width=a.width+"px",p.style.height=a.height+"px",p.style.top=a.top+"px",p.style.left=a.left+"px";let g=document.createElement("button");g.className="table-resizer-btn",g.style.top=a.bottom-6+"px",g.style.left=a.right-6+"px",g.addEventListener("mousedown",m),g.addEventListener("touchstart",m),p.appendChild(g),n.elements.table=o,n.elements.tableResizer=p,n.elements.tableResizerBtn=g,n.resizerHandler=f=>it(e,n),n.elements.iframeWindow.addEventListener("scroll",n.resizerHandler),n.elements.iframeWindow.body.appendChild(p)},it=(t,e)=>{if(e.elements.tableResizerBtn){if(!e.elements.editor.contains(e.elements.table))return te(t,e);let n=e.elements.table.getBoundingClientRect();e.elements.tableResizer.style.width=n.width+"px",e.elements.tableResizer.style.height=n.height+"px",e.elements.tableResizer.style.top=n.top+"px",e.elements.tableResizer.style.left=n.left+"px",e.elements.tableResizerBtn.style.top=n.bottom-6+"px",e.elements.tableResizerBtn.style.left=n.right-6+"px"}},te=(t,e)=>{e.elements.table&&e.tableColumnResizeHandlers&&(e.elements.table.removeEventListener("mousemove",e.tableColumnResizeHandlers.mousemove),e.elements.table.removeEventListener("mousedown",e.tableColumnResizeHandlers.mousedown),e.elements.table.removeEventListener("touchstart",e.tableColumnResizeHandlers.touchstart),e.elements.table.style.cursor="",delete e.tableColumnResizeHandlers),e.elements.resizerPlugin&&e.elements.toolbarContainer.removeChild(e.elements.resizerPlugin),e.elements.tableResizer&&e.elements.iframeWindow.body.removeChild(e.elements.tableResizer),e.elements.iframeWindow.removeEventListener("scroll",e.resizerHandler,!1),delete e.elements.resizerPlugin,delete e.resizerHandler,delete e.elements.table,delete e.elements.tableResizer,delete e.elements.tableResizerBtn},Ne=(t,e,n)=>{var o,a;switch(e){case"disabled":t.getAttribute("data-type")==="button"?(t.disabled=!0,t.classList.add("disabled")):t.getAttribute("data-type")==="dropdown"||t.getAttribute("data-type")==="select"?(t.childNodes[0].disabled=!0,t.childNodes[0].classList.add("disabled")):t.getAttribute("data-type")==="color"?(t.childNodes[0].disabled=!0,t.classList.add("disabled")):t.getAttribute("data-type")==="button-select"&&t.querySelectorAll("button").forEach(s=>{s.disabled=!0,s.classList.add("disabled")});break;case"enabled":t.getAttribute("data-type")==="button"?(t.disabled=!1,t.classList.remove("disabled")):t.getAttribute("data-type")==="dropdown"||t.getAttribute("data-type")==="select"?(t.childNodes[0].disabled=!1,t.childNodes[0].classList.remove("disabled")):t.getAttribute("data-type")==="color"?(t.childNodes[0].disabled=!1,t.classList.remove("disabled")):t.getAttribute("data-type")==="button-select"&&t.querySelectorAll("button").forEach(s=>{s.disabled=!1,s.classList.remove("disabled")});break;case"active":t.getAttribute("data-type")==="button"?t.classList.add("active"):t.getAttribute("data-type")==="dropdown"||t.getAttribute("data-type")==="select"?t.childNodes[0].classList.add("active"):t.getAttribute("data-type")==="color"?t.classList.add("active"):t.getAttribute("data-type")==="button-select"&&((o=t.querySelector('button[data-type="button"]'))==null||o.classList.add("active"));break;case"inactive":t.getAttribute("data-type")==="button"?t.classList.remove("active"):t.getAttribute("data-type")==="dropdown"||t.getAttribute("data-type")==="select"?t.childNodes[0].classList.remove("active"):t.getAttribute("data-type")==="color"?t.classList.remove("active"):t.getAttribute("data-type")==="button-select"&&((a=t.querySelector('button[data-type="button"]'))==null||a.classList.remove("active"));break;case"font":t.childNodes[0].childNodes[0].childNodes[0].innerHTML=ae[n]?ae[n]:n||"Font";break;case"font-size":t.childNodes[0].childNodes[0].childNodes[0].innerHTML=$e[n]?$e[n]:n||"Font-Size";break;case"format-block":t.childNodes[0].childNodes[0].childNodes[0].innerHTML=Ct[n]??"Format";break;case"font_color":t.childNodes[0].value=n||"#000000";break;case"highlight_color":t.childNodes[0].value=n||"#ffffff";break;case"icon":t.innerHTML=n}},K=(t,e,n=[])=>{Object.keys(t.elements.toolbar).forEach(o=>{t.elements.toolbar[o].forEach(a=>{n.includes(o)||Ne(a,e)})})},S=(t,e,n=[])=>{Object.keys(t.elements.toolbar).forEach(o=>{n.includes(o)&&t.elements.toolbar[o].forEach(a=>{Ne(a,e)})})},V=(t,e,n)=>{var o;(o=t.elements.toolbar[e])==null||o.forEach(a=>{Ne(a,e,n)})},He=(t,e,n)=>{var o;(o=t.elements.toolbar[e])==null||o.forEach(a=>{Ne(a,"icon",n)})},Ce=t=>`#${t.match(/\d+/g).map(n=>{let o=parseInt(n).toString(16);return o.length===1?"0"+o:o}).join("")} `.slice(0,7),Dt=t=>{for(let e in We){let n=t.match(We[e]);if(n)return{platform:e,id:n[1]}}return{platform:null,id:null}},Zt=(t,e)=>{if(!be[t]||!e)return null;let n=window.location.hostname;switch(t){case"INSTAGRAM":case"THREADS":return`${be[t]}${e}/embed`;case"REDDIT":return`${be[t]}${e}/?ref_source=embed&ref=share`;case"TWITCH":case"TWITCH_CHANNEL":return`${be[t]}${e}&parent=${n}&autoplay=false&time=0h0m0s`;default:return`${be[t]}${e}`}},Wt=(t,e,n,o,a)=>{let s=t.getAttribute("href"),i=document.createElement("div");i.id="anchor-popover",i.style.position="absolute",i.style.top="0",i.style.left="0",i.style.padding="8px",i.style.background="white",i.style.border="1px solid #ccc",i.style.borderRadius="6px",i.style.boxShadow="0px 4px 8px rgba(0,0,0,0.2)",i.style.zIndex="1000",i.style.display="flex",i.style.alignItems="center",i.style.gap="5px",i.style.whiteSpace="nowrap",i.style.maxWidth="300px",i.style.visibility="hidden";let l=document.createElement("div");l.textContent=s,l.style.textDecoration="none",l.style.color="#007bff",l.style.padding="5px",l.style.overflow="hidden",l.style.textOverflow="ellipsis",l.style.webkitBoxOrient="vertical",l.style.webkitLineClamp="1",l.style.maxWidth="250px",l.style.wordBreak="break-word",l.style.cursor="pointer",l.onclick=()=>a.onLinkClick(s);let d=document.createElement("span");d.innerHTML=L.EDIT_LINK,d.style.padding="5px",d.title="Edit link",d.onclick=p=>Nn(p,a,o);let m=document.createElement("span");m.innerHTML=L.COPY_LINK,m.style.padding="5px",m.title="Copy link",m.onclick=p=>navigator.clipboard.writeText(s);let u=document.createElement("span");u.innerHTML=L.DELETE_LINK,u.style.padding="5px",u.title="Remove link",u.onclick=p=>Sn(p,t,a),i.append(l,m,d,u);let r=a.elements.iframeWindow.body;r.appendChild(i),requestAnimationFrame(()=>{let p=i.getBoundingClientRect(),g=r.getBoundingClientRect(),f=r.scrollLeft,b=r.scrollTop,y=e+f+5,h=n+b+5,x=g.right-e,C=e-g.left,E=g.bottom-n,k=n-g.top;E<p.height&&k>=p.height?h=n+b-p.height-5:E<p.height&&(h=Math.max(0,n+b-p.height)),x<p.width&&C>=p.width?y=e+f-p.width-5:x<p.width&&(y=Math.max(0,e+f-p.width)),y=Math.max(5,Math.min(y,r.scrollWidth-p.width-5)),h=Math.max(5,Math.min(h,r.scrollHeight-p.height-5)),i.style.left=`${y}px`,i.style.top=`${h}px`,i.style.visibility="visible"}),a.elements.anchorPopover=i;let c=p=>{(!i.contains(p.target)||p.key==="Escape")&&(ie(a),document.removeEventListener("click",c),document.removeEventListener("keydown",c),document.removeEventListener("scroll",c,!0))};document.addEventListener("click",c),document.addEventListener("keydown",c),document.addEventListener("scroll",c,!0)},Nn=(t,e,n)=>{if(t.stopPropagation(),!e.elements.selectedElement||e.elements.selectedElement.tagName!=="A"){console.warn("No anchor tag selected for editing.");return}let o=e.elements.selectedElement,a=o.getAttribute("href")||"",s=o.innerText||"",i=document.createElement("div"),l=document.createElement("label");l.innerText="Link",l.style.display="block",l.style.paddingLeft="4px";let d=document.createElement("input");d.value=a,d.type="text",d.placeholder="Insert link, mail, phone no";let m=document.createElement("label");m.innerText="Link Text",m.style.display="block",m.style.marginTop="8px",m.style.paddingLeft="4px";let u=document.createElement("input");u.value=s,u.type="text",u.placeholder="Link text";let r=document.createElement("span");r.className="warning",i.append(l,d,r,m,u);let c=document.createElement("div"),p=document.createElement("button");p.type="button",p.className="submit",p.innerText="Update",c.append(p);let g=ve({title:"Edit Link",bodyNode:i,footerNode:c},e,n);d.focus();let f=b=>{b.key==="Enter"&&(b.preventDefault(),p.click())};d.addEventListener("keydown",f),u.addEventListener("keydown",f),p.onclick=()=>{let b=d.value.trim(),y=u.value.trim();F.URL.test(b)?(o.setAttribute("href",b),o.innerText=y||b,g.close()):r.innerText="Invalid URL"},ie(e),e.updateCaretPosition()},Sn=(t,e,n)=>{t.stopPropagation();let o=n.elements.selectedElement.innerHTML;n.elements.selectedElement.outerHTML=o,ie(n)},ie=t=>{t.elements.anchorPopover&&(t.elements.anchorPopover.style.display="none",delete t.elements.anchorPopover)};function Ht(t,e,n){let o=document.createRange();return o.selectNodeContents(t),o.setEnd(e,n),o.toString().length}var xe=(t,e)=>{let n=document.createTreeWalker(t,NodeFilter.SHOW_TEXT,null,!1),o,a=0;for(;o=n.nextNode();){let s=o.textContent.length;if(a+s>=e)return{node:o,offset:e-a};a+=s}return null},On=(t,e)=>{let n=[],o=document.createTreeWalker(t,NodeFilter.SHOW_TEXT,null,!1),a;for(;a=o.nextNode();){let s=document.createRange();if(s.selectNodeContents(a),e.compareBoundaryPoints(Range.END_TO_START,s)>=0||e.compareBoundaryPoints(Range.START_TO_END,s)<=0)continue;let i=a===e.startContainer?e.startOffset:0,l=a===e.endContainer?e.endOffset:a.textContent.length,d=document.createRange();d.setStart(a,i),d.setEnd(a,l),Array.from(d.getClientRects()).forEach(m=>n.push(m)),d.detach()}return n},_n=(t,e,n,o)=>{let a=o.getBoundingClientRect();On(t,e).forEach(i=>{let l=document.createElement("div");l.style.position="absolute",l.style.left=`${i.left-a.left}px`,l.style.top=`${i.top-a.top}px`,l.style.width=i.width+"px",l.style.height=i.height+"px",l.style.background=n+"33",o.appendChild(l)})},lt=(t,e,n)=>{let{id:o,color:a,name:s}=e,{startIndex:i,endIndex:l,cursorIndex:d,isCollapsed:m}=n;t.state.remoteCursors=t.state.remoteCursors||{},t.state.remoteCursors[e.id]={user:e,data:n};let u=t.elements.editor,r=t.elements.editorCursor;if(!u||!r)return;let c=r.querySelector(`#remote-overlay-${o}`);c&&c.remove();let p=document.createElement("div");if(p.id=`remote-overlay-${o}`,p.style.position="absolute",p.style.pointerEvents="none",!m){let g=document.createRange(),f=xe(u,i),b=xe(u,l);g.setStart(f.node,f.offset),g.setEnd(b.node,b.offset),_n(u,g,a,p)}if(typeof d=="number"){u.innerText.trim()===""&&(u.innerHTML="<div>\u200B</div>");let g=xe(u,d);if(!g)return;let f=document.createRange();f.setStart(g.node,g.offset),f.collapse(!0);let b=r.getBoundingClientRect(),y=f.getBoundingClientRect(),h=y.left-b.left+r.scrollLeft,x=y.top-b.top+r.scrollTop,C=document.createElement("div");C.style.position="absolute",C.style.left=`${h}px`,C.style.top=`${x}px`,C.style.width="2px",C.style.height=y.height+"px",C.style.backgroundColor=a,C.style.borderRadius="1px";let E=document.createElement("div");E.style.fontSize="12px",E.style.color="white",E.style.backgroundColor=a,E.style.borderRadius="4px 4px 0 0",E.style.padding="0 4px",E.style.position="absolute",E.style.whiteSpace="nowrap",E.style.left=`${h}px`,E.style.top=`${x-10}px`,E.innerText=s,p.appendChild(E),p.appendChild(C)}r.appendChild(p)},Bn=(t,e)=>{let n=t.elements.editor,o=t.elements.iframeWindow.getSelection();if(!o||!n||o.rangeCount===0)return;let a=o.getRangeAt(0);if(!n.contains(a.startContainer)||!n.contains(a.endContainer))return;let s=(u,r)=>{let c=t.elements.iframeWindow.createRange();return c.selectNodeContents(n),c.setEnd(u,r),c.toString().length},i=s(a.startContainer,a.startOffset),l=s(a.endContainer,a.endOffset),m=(()=>{let u=o.anchorNode.compareDocumentPosition(o.focusNode);return u===0?o.anchorOffset>o.focusOffset:u===Node.DOCUMENT_POSITION_PRECEDING})()?i:l;t.cursor={startIndex:i,endIndex:l,cursorIndex:m,isCollapsed:a.collapsed},t.onLocalSyncChanges({type:"cursor:open",cursor:t.cursor,tabId:t.state.currentTabId})},zt=Mt(Bn,200),Pn=t=>{t.state.previousDOM||(t.state.previousDOM=t.elements.editor.cloneNode(!0));let e=t.elements.editor.cloneNode(!0),n=At.diff(t.state.previousDOM,e);n.length>0&&(t.onLocalSyncChanges({type:"diff",diff:{diffs:n},tabId:t.state.currentTabId}),t.state.previousDOM=e)},$t=ke(Pn,50),rt=(t,e,n=null)=>{let o=n??t.elements.editor,a=t.elements.iframeWindow;if(!o||!(e!=null&&e.diffs))return;let s=a.getSelection(),i=null;if(!n&&s&&s.rangeCount>0){let l=s.getRangeAt(0);o.contains(l.startContainer)&&o.contains(l.endContainer)&&(i={start:Ht(o,l.startContainer,l.startOffset),end:Ht(o,l.endContainer,l.endOffset)})}requestAnimationFrame(()=>{let l=e.diffs.filter(d=>!(d.action==="modifyAttribute"&&["contenteditable","spellcheck","class"].includes(d.name)));if(At.apply(o,l),!n)if(t.state.previousDOM=o.cloneNode(!0),i){let d=xe(o,i.start),m=xe(o,i.end);if(d&&m){let u=a.createRange();u.setStart(d.node,d.offset),u.setEnd(m.node,m.offset);let r=a.getSelection();r&&(r.removeAllRanges(),r.addRange(u))}}else{let d=a.createRange();d.setStart(o,0),d.collapse(!0);let m=a.getSelection();m&&(m.removeAllRanges(),m.addRange(d))}})},Ft=t=>{let e=t.trim(),n=F.URL.test(e),o=F.MAILTO.test(e),a=F.TEL.test(e);return n||o||a},Ut=t=>{let e=t.trim();return F.EMAIL.test(e)?"mailto:"+e:F.MOBILE.test(e)?"tel:"+e:e},dt=(t=[])=>t.flatMap(e=>[{key:e.name,isCategory:!0},...e.fields.map(n=>({key:n.name,value:n.value}))]);function Le(t,e=document.body){if(!t)return null;if(typeof t=="number")return t;let n=document.createElement("div");n.style.width=t,n.style.position="absolute",n.style.visibility="hidden",e.appendChild(n);let o=n.getBoundingClientRect().width;return n.remove(),o}var Se=(t,e)=>{if(e.autoHeight){let n=t.elements.editor.scrollHeight,o=Le(e.minHeight,t.elements.iframeContainer.parentElement),a=Le(e.maxHeight,t.elements.iframeContainer.parentElement);o!=null&&(n=Math.max(n,o)),a!=null&&(n=Math.min(n,a)),t.elements.iframeContainer.style.height=n+"px"}},Oe=t=>{let e=(t==null?void 0:t.nodeType)===Node.ELEMENT_NODE?t:t==null?void 0:t.parentElement;return e==null?void 0:e.closest("td, th")},Gt=(t,e)=>{let n=document.createElement(e);Array.from(t.childNodes).forEach(s=>{s.nodeType===Node.ELEMENT_NODE&&["UL","OL"].includes(s.tagName)||n.appendChild(s)}),n.childNodes.length||(n.innerHTML="<br>");let a=Array.from(t.children).find(s=>["UL","OL"].includes(s.tagName));return t.insertBefore(n,a||null),n},Yt=(t,e)=>{let n=t.elements.iframeWindow.getSelection(),o=n!=null&&n.rangeCount?n.getRangeAt(0).startContainer:null,a=(o==null?void 0:o.nodeType)===Node.ELEMENT_NODE?o:o==null?void 0:o.parentElement,s=a==null?void 0:a.closest("li");if(!s||!t.elements.editor.contains(s))return!1;let i=a.closest(Xe.join(",")),l=i&&i.closest("li")===s,d,m=(u,r)=>{let c=document.createRange(),p=u.elements.iframeWindow.getSelection();c.selectNodeContents(r),c.collapse(!1),p.removeAllRanges(),p.addRange(c)};if(e==="p"){if(l){let u=document.createDocumentFragment();for(;i.firstChild;)u.appendChild(i.firstChild);s.insertBefore(u,i),i.remove()}return m(t,s),!0}return l?(d=document.createElement(e),d.innerHTML=i.innerHTML||"<br>",i.replaceWith(d)):d=Gt(s,e),m(t,d),!0},Ae=t=>{t.elements.editor.querySelectorAll("h1, h2, h3, h4, h5, h6").forEach(e=>{let n=Array.from(e.children).filter(s=>["UL","OL"].includes(s.tagName));if(!n.length)return;let o=e.tagName.toLowerCase(),a=document.createDocumentFragment();if(n.forEach(s=>{s.querySelectorAll("li").forEach(i=>{Array.from(i.children).some(d=>Xe.includes(d.tagName))||Gt(i,o)}),a.appendChild(s)}),e.parentNode.insertBefore(a,e),e.textContent.replace(/\u200B/g,"").trim()||e.querySelector("img, br")){let s=document.createElement("p");s.innerHTML=e.innerHTML,e.replaceWith(s)}else e.remove()})},jt=(t,e)=>{if(t.key!==" ")return;e.updateCaretPosition();let n=e.state.range;if(!n)return;let o=n.startContainer;if(o.nodeType!==Node.TEXT_NODE)return;let a=o.nodeValue.replace(/\u00A0/g," ");if(o.parentNode.closest("li"))return;let s=Oe(o);if(a+t.key==="* "||a+t.key==="- ")if(t.preventDefault(),o.nodeValue=a.slice(0,-1),s){let i=document.createElement("ul"),l=document.createElement("li"),d=document.createTextNode("\xA0");l.appendChild(d),i.appendChild(l),s.innerHTML="",s.appendChild(i);let m=document.createRange();m.setStart(d,1),m.collapse(!0),e.state.selection.removeAllRanges(),e.state.selection.addRange(m)}else{let i=document.createRange();i.setStart(o,o.nodeValue.length),i.setEnd(o,o.nodeValue.length),e.state.selection.removeAllRanges(),e.state.selection.addRange(i),mt(e)}},Xt=(t,e)=>{let n=e.state.range.startContainer;if(n.nodeType===Node.TEXT_NODE){let o=n.nodeValue.replace(/\u00A0/g," ");if(!n.parentNode.closest("li")&&o==="1. "){let s=Oe(n);if(o=o.slice(0,-3),n.nodeValue=o,s){let i=document.createElement("ol"),l=document.createElement("li"),d=document.createTextNode("\xA0");l.appendChild(d),i.appendChild(l),s.innerHTML="",s.appendChild(i);let m=document.createRange();m.setStart(d,1),m.collapse(!0),e.state.selection.removeAllRanges(),e.state.selection.addRange(m)}else{let i=document.createRange();i.setStart(n,o.length),i.setEnd(n,o.length),e.state.selection.removeAllRanges(),e.state.selection.addRange(i),ct(e)}}}},qt=(t,e)=>{if(t.key!==" ")return;e.updateCaretPosition();let o=e.state.range.startContainer;if(o.nodeType!==Node.TEXT_NODE)return;let a=o.nodeValue.replace(/\u00A0/g," "),s=a+t.key;if(!["# ","## ","### ","#### ","##### ","###### "].includes(s))return;t.preventDefault();let l=s.trim().length,d=Oe(o);if(o.nodeValue=a.slice(0,-l),d){let m=document.createElement(`h${l}`);m.innerHTML="&nbsp;",d.innerHTML="",d.appendChild(m);let u=document.createRange();u.setStart(m,0),u.collapse(!0),e.state.selection.removeAllRanges(),e.state.selection.addRange(u)}else e.elements.iframeWindow.execCommand("formatBlock",!1,`h${l}`);e.elements.editor.focus(),e.updateCaretPosition(),V(e,"format-block",`h${l}`)},Kt=(t,e)=>{if(t.key!==" ")return;e.updateCaretPosition();let o=e.state.range.startContainer;if(o.nodeType!==Node.TEXT_NODE)return;let a=o.nodeValue.replace(/\u00A0/g," ");if(a+t.key!=="> ")return;t.preventDefault(),o.nodeValue=a.slice(0,-1);let s=Oe(o);if(s){let i=document.createElement("blockquote");i.innerHTML="&nbsp;",s.innerHTML="",s.appendChild(i);let l=document.createRange();l.setStart(i,0),l.collapse(!0),e.state.selection.removeAllRanges(),e.state.selection.addRange(l)}else e.elements.iframeWindow.execCommand("formatBlock",!1,"blockquote");e.elements.editor.focus(),e.updateCaretPosition()},Qt=(t,e)=>{if(t.key!=="~"||(e.updateCaretPosition(),!e.state.range))return;let n=e.state.range,o=n.startContainer;if(o.nodeType!==Node.TEXT_NODE)return;let a=o.nodeValue.replace(/\u00A0/g," "),s=n.startOffset,l=(a.slice(0,s)+t.key).match(/~~([^~]+)~~$/);if(!l)return;t.preventDefault();let d=l[1],m=l.index,u=m+l[0].length-1,r=document.createRange();r.setStart(o,m),r.setEnd(o,u),r.deleteContents();let c=document.createElement("strike");c.textContent=d,r.insertNode(c);let p=document.createTextNode("\u200B");c.nextSibling?c.parentNode.insertBefore(p,c.nextSibling):c.parentNode.appendChild(p);let g=document.createRange();g.setStart(p,1),g.setEnd(p,1);let f=e.state.selection;f.removeAllRanges(),f.addRange(g),e.updateCaretPosition(),S(e,"inactive",["strike"])},Jt=(t,e)=>{if(t.key!=="`"||(e.updateCaretPosition(),!e.state.range))return;let n=e.state.range,o=n.startContainer;if(o.nodeType!==Node.TEXT_NODE)return;let a=o.nodeValue.replace(/\u00A0/g," "),s=n.startOffset,l=(a.slice(0,s)+t.key).match(/`([^`]+)`$/);if(!l)return;t.preventDefault();let d=l[1],m=l.index,u=m+l[0].length-1,r=document.createRange();r.setStart(o,m),r.setEnd(o,u),r.deleteContents();let c=document.createElement("code");c.textContent=d,r.insertNode(c);let p=document.createTextNode("\u200B");c.nextSibling?c.parentNode.insertBefore(p,c.nextSibling):c.parentNode.appendChild(p);let g=document.createRange();g.setStart(p,1),g.setEnd(p,1);let f=e.state.selection;f.removeAllRanges(),f.addRange(g),e.updateCaretPosition()},en=t=>{var a;let e=0,n=t.parentElement,o=n.tagName;for(;n&&n.tagName===o;)e++,n=(a=n.parentElement)==null?void 0:a.closest(o);return e},tn=(t,e)=>{let n;t.tagName==="OL"?n=qe[(e-1)%qe.length]:t.tagName==="UL"&&(n=Ke[(e-1)%Ke.length]),n&&t.setAttribute("type",n)},Vn=(t,e)=>{let n=t.previousElementSibling;if(!n)return;let a=t.parentElement.tagName,s=n.querySelector(`:scope > ${a}`);s||(s=document.createElement(a),n.appendChild(s)),s.appendChild(t);let i=e.elements.iframeWindow.getSelection(),l=document.createRange();if(l.selectNodeContents(t),l.collapse(!0),i.removeAllRanges(),i.addRange(l),e.elements.editor.focus(),e.updateCaretPosition(),a==="OL"||a==="UL"){let d=en(t);tn(s,d)}},Dn=(t,e)=>{let n=t.parentElement,o=n.closest("li");if(!o)return;o.after(t);let a=e.elements.iframeWindow.getSelection(),s=document.createRange();if(s.selectNodeContents(t),s.collapse(!0),a.removeAllRanges(),a.addRange(s),e.elements.editor.focus(),e.updateCaretPosition(),n.children.length===0&&n.remove(),t.parentElement.tagName==="OL"||t.parentElement.tagName==="UL"){let i=en(t);tn(t.parentElement,i)}},nn=t=>{let e=t.textContent.replace(/\u200B/g,"").trim(),n=t.children.length===1&&t.querySelector("ul, ol"),o=t.querySelector("img, iframe, audio, video, table, hr, figure");return e===""&&!n&&!o},on=(t,e)=>{if(t.defaultPrevented){delete e.state.pendingListSelectionDeletion;return}if(!["Backspace","Delete"].includes(t.key)){delete e.state.pendingListSelectionDeletion;return}let n=e.elements.iframeWindow.getSelection();if(!(n!=null&&n.rangeCount))return;let o=n.getRangeAt(0);if(o.collapsed){delete e.state.pendingListSelectionDeletion;return}let a=u=>u?u.nodeType===Node.ELEMENT_NODE?u:u.parentElement:null,s=a(o.startContainer),i=a(o.endContainer),l=s==null?void 0:s.closest("li"),d=i==null?void 0:i.closest("li");if(!l||!d||l===d){delete e.state.pendingListSelectionDeletion;return}let m=[];if(e.elements.editor.querySelectorAll("li").forEach(u=>{o.intersectsNode(u)&&m.push(u)}),m.length<2){delete e.state.pendingListSelectionDeletion;return}e.state.pendingListSelectionDeletion={listItems:m,lists:Array.from(new Set(m.map(u=>u.parentElement).filter(Boolean)))}},sn=t=>{let e=t.state.pendingListSelectionDeletion;if(!e)return!1;delete t.state.pendingListSelectionDeletion;let n=!1,o=new Set(e.lists);if(e.listItems.forEach(a=>{if(!a.isConnected||!t.elements.editor.contains(a)||!nn(a))return;let s=a.parentElement;s&&o.add(s),a.remove(),n=!0}),Array.from(o).reverse().forEach(a=>{!(a!=null&&a.isConnected)||!t.elements.editor.contains(a)||a.querySelector("li")||(a.remove(),n=!0)}),n){!t.elements.editor.textContent.replace(/\u200B/g,"").trim()&&!t.elements.editor.querySelector("img, iframe, audio, video, table, hr, figure")&&(t.elements.editor.innerHTML="<div><br></div>");let a=t.elements.iframeWindow.getSelection();if(!(a!=null&&a.rangeCount)||!t.elements.editor.contains(a.anchorNode)){let s=document.createRange(),i=t.elements.iframeWindow.getSelection();s.selectNodeContents(t.elements.editor),s.collapse(!1),i.removeAllRanges(),i.addRange(s)}t.updateCaretPosition()}return n},an=(t,e)=>{if(t.key!=="Tab")return;let n=e.elements.iframeWindow.getSelection();if(!n.rangeCount)return;let o=n.getRangeAt(0),a=o.startOffset===0,s=o.commonAncestorContainer;s.nodeType===Node.TEXT_NODE&&(s=s.parentElement);let i=s.closest("ul, ol");if(!i)return;let l=i.querySelectorAll("li"),d=[];l.forEach(m=>{o.intersectsNode(m)&&d.push(m)}),d.length&&(!t.shiftKey&&d.some(u=>!nn(u))&&!a||(t.preventDefault(),d.forEach(m=>{t.shiftKey?Dn(m,e):Vn(m,e)})))},Zn=(t,e)=>e==="upper_case"?t.toUpperCase():e==="lower_case"?t.toLowerCase():e==="title_case"?t.toLowerCase().replace(/\b\w/g,n=>n.toUpperCase()):t,_e=(t,e)=>{let n=t.state.range;if(!n)return;let o=n.startContainer,a=n.startOffset,s=n.endContainer,i=n.endOffset,l=(u,r,c)=>{let p=u.nodeValue,g=Zn(p.slice(r,c),e);u.nodeValue=p.slice(0,r)+g+p.slice(c),u===s&&(i=r+g.length)};if(n.commonAncestorContainer.nodeType===Node.TEXT_NODE)l(n.commonAncestorContainer,n.startOffset,n.endOffset);else{let u=t.elements.iframeWindow.createNodeIterator(n.commonAncestorContainer,NodeFilter.SHOW_TEXT,{acceptNode:p=>n.intersectsNode(p)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}),r=[],c;for(;c=u.nextNode();)r.push(c);r.forEach(p=>{let g=0,f=p.nodeValue.length;p===n.startContainer&&(g=n.startOffset),p===n.endContainer&&(f=n.endOffset),l(p,g,f)})}let d=t.elements.iframeWindow.createRange();d.setStart(o,a),d.setEnd(s,i);let m=t.elements.iframeWindow.getSelection();m.removeAllRanges(),m.addRange(d)},Wn=t=>(t.dataset.leksyHeadingId||(t.dataset.leksyHeadingId=kn()),t.dataset.leksyHeadingId),ln=(t,e)=>{if(!e)return;let n=t.elements.iframeWindow.querySelector(`[data-leksy-heading-id="${e}"]`);if(!n)return;n.scrollIntoView({behavior:"smooth",block:"center"});let o=document.createRange();o.selectNodeContents(n),o.collapse(!0);let a=t.elements.iframeWindow.getSelection();a.removeAllRanges(),a.addRange(o),t.elements.editor.focus(),t.updateCaretPosition()},rn=t=>{let e=t.elements.editor,n=e.querySelectorAll("h1, h2, h3, h4, h5, h6");if(!n.length)return;let o=document.createElement("div");o.contentEditable="false",o.dataset.leksyElement="toc",o.style.border="1px solid gray",o.style.display="inline-block",o.style.width="100%",o.style.boxSizing="border-box",o.style.borderRadius="4px";let a=document.createElement("div");a.innerText="Table of Contents",a.style.fontWeight="bold",a.style.marginBottom="8px",a.style.borderBottom="1px solid gray",a.style.padding="8px 12px",o.appendChild(a);let s=document.createElement("ul");s.style.listStyle="none",s.style.padding="8px 12px",s.style.margin="0",n.forEach(d=>{let m=Wn(d),u=Number(d.tagName[1]),r=document.createElement("li");r.style.marginBottom="4px",r.style.marginLeft=`${(u-1)*15}px`,r.style.color="var(--link-color)",r.style.cursor="pointer",r.textContent=d.textContent,r.dataset.leksyTocHeadingId=m,s.appendChild(r)}),o.appendChild(s);let i=t.elements.iframeWindow.getSelection();if(!i.rangeCount)return;let l=i.getRangeAt(0);if(l.collapsed){let d=l.startContainer;d.nodeType===Node.TEXT_NODE&&(d=d.parentElement);let m=d.closest("p, div, h1, h2, h3, h4, h5, h6, blockquote, pre, li");m?m.insertAdjacentElement("afterend",o):e.appendChild(o);let u=document.createElement("p");u.innerHTML="<br>",o.after(u);let r=document.createRange();r.setStart(u,0),r.collapse(!0),i.removeAllRanges(),i.addRange(r)}else{l.deleteContents(),l.insertNode(o),e.querySelectorAll("li").forEach(u=>{!u.textContent.replace(/\u00A0/g,"").trim()&&!u.querySelector("img, video, table, ul, ol, iframe, blockquote")&&u.remove()});let d=document.createElement("p");d.innerHTML="<br>",o.after(d);let m=document.createRange();m.setStart(d,0),m.collapse(!0),i.removeAllRanges(),i.addRange(m)}t.updateCaretPosition()};function ot(t,e,n,o){if(!e.showTabs||!n.showOutlines||n.tabId!==t.state.currentTabId)return;o.innerHTML="",t.elements.editor.querySelectorAll("h1, h2, h3, h4, h5, h6").forEach(i=>{var m;if(!((m=i.textContent)!=null&&m.trim()))return;let l=Number(i.tagName[1]),d=document.createElement("div");d.className="outline-item",d.textContent=i.textContent,d.style.paddingLeft=`${(l-1)*12+8}px`,d.onclick=()=>{o.querySelectorAll(".outline-item").forEach(c=>{c.classList.remove("active")}),d.classList.add("active"),i.scrollIntoView({behavior:"smooth",block:"center"});let u=document.createRange();u.selectNodeContents(i),u.collapse(!0);let r=t.elements.iframeWindow.getSelection();r.removeAllRanges(),r.addRange(u),t.elements.editor.focus(),t.updateCaretPosition()},o.appendChild(d)})}function Be(t,e,n){if(!e.showTabs||!n&&(n=t.elements.tabs[t.state.currentTabId].querySelector(".outline-items"),!n))return;let o=t.state.range,a=o==null?void 0:o.startContainer;if(!a)return;let s=n.querySelectorAll(".outline-item"),l=t.elements.editor.querySelectorAll("h1, h2, h3, h4, h5, h6");s.forEach(d=>d.classList.remove("active")),l.forEach((d,m)=>{var u;d.contains(a)&&((u=s[m])==null||u.classList.add("active"))})}var dn=ke((t,e)=>{if(!e.showTabs)return;let n=P(t.state.tabs,t.state.currentTabId);if(!n)return;let o=t.elements.tabs[n.tabId].querySelector(".outline-items");o&&(ot(t,e,n,o),Be(t,e,o))},300),Pe=(t,e,n)=>{if(!e.enableFindAndReplace||t.state.findAndReplaceModalOpen)return;t.state.findAndReplaceModalOpen=!0;let o=t.elements.editor,a=t.elements.iframeWindow,s=document.createElement("div");s.style.display="flex",s.style.gap="15px",s.style.alignItems="center";let i=document.createElement("button");i.type="button",i.innerText="Find",i.className="leksy-editor-find-and-replace-modal-tab-btn";let l=document.createElement("button");l.type="button",l.innerText="Replace",l.className="leksy-editor-find-and-replace-modal-tab-btn",s.append(i,l);let d=document.createElement("div"),m=document.createElement("label");m.innerText="Find",m.style.paddingLeft="4px";let u=document.createElement("div");u.style.position="relative",u.style.marginBottom="10px";let r=document.createElement("input");r.type="text",r.placeholder="Search text",r.style.width="100%",r.style.boxSizing="border-box",r.style.paddingRight="60px";let c=document.createElement("span");c.className="leksy-editor-find-and-replace-modal-count",u.append(r,c);let p=document.createElement("label");p.innerText="Replace with",p.style.display="block",p.style.paddingLeft="4px";let g=document.createElement("input");g.type="text",g.placeholder="Replace text",g.style.marginBottom="10px";let f=document.createElement("div");f.style.marginBottom="10px",f.style.display="flex",f.style.flexDirection="column";let b=document.createElement("div"),y=document.createElement("input");y.type="checkbox",y.id="match-case-opt",y.style.marginRight="5px",y.style.width="24px";let h=document.createElement("label");h.innerText="Match case",h.htmlFor="match-case-opt",h.style.userSelect="none",b.append(y,h);let x=document.createElement("div"),C=document.createElement("input");C.type="checkbox",C.id="whole-word-opt",C.style.marginRight="5px",C.style.width="24px";let E=document.createElement("label");E.innerText="Whole word",E.htmlFor="whole-word-opt",E.style.userSelect="none",x.append(C,E);let k=document.createElement("div"),w=document.createElement("input");w.type="checkbox",w.id="use-regex-opt",w.style.marginRight="5px",w.style.width="24px";let v=document.createElement("label");v.innerText="Use regular expressions",v.htmlFor="use-regex-opt",v.style.userSelect="none",k.append(w,v),f.append(b,k,x);let T=document.createElement("span");T.className="warning",d.append(m,u,p,g,f,T);let R=document.createElement("div");R.style.display="flex",R.style.gap="8px",R.style.justifyContent="flex-end",R.style.width="100%";let H=document.createElement("button");H.type="button",H.className="submit",H.innerText="Previous";let M=document.createElement("button");M.type="button",M.className="submit",M.innerText="Next";let I=document.createElement("button");I.type="button",I.className="submit",I.innerText="Replace";let N=document.createElement("button");N.type="button",N.className="submit",N.innerText="Replace All",R.append(H,M,I,N);let _=D=>{D==="find"?(p.style.display="none",g.style.display="none",I.style.display="none",N.style.display="none",i.classList.add("active"),l.classList.remove("active")):(p.style.display="block",g.style.display="block",I.style.display="flex",N.style.display="flex",l.classList.add("active"),i.classList.remove("active"))};i.onclick=()=>_("find"),l.onclick=()=>_("replace"),An({title:s,bodyNode:d,footerNode:R,onClose:()=>{t.state.findAndReplaceModalOpen=!1}},t,e),n.key==="f"?_("find"):_("replace"),r.focus();let $=D=>{var ut;let ne=r.value,ge=y.checked,we=w.checked,oe=C.checked;if(T.innerText="",c.innerText="",!ne){T.innerText="Please enter text to find";return}let Q=ne;if(!we){let q=(oe?ne.trim():ne).replace(/[.*+?^${}()|[\]\\]/g,"\\$&");Q=oe?`(?<!\\w)${q}(?!\\w)`:q}let G=a.getSelection(),X;try{let W=ge?"g":"gi";X=new RegExp(Q,W)}catch{T.innerText="Invalid regular expression";return}let U=t.elements.iframeWindow.createTreeWalker(o,NodeFilter.SHOW_TEXT,null),Z=[],J,Y=0;for(;J=U.nextNode();){let W=J.nodeValue;X.lastIndex=0;let q;for(;(q=X.exec(W))!==null;)Z.push({node:J,start:q.index,end:q.index+q[0].length,globalStart:Y+q.index});Y+=W.length}if(!Z.length){c.innerText="0 of 0";return}let O=0;if(G.rangeCount>0){let W=G.getRangeAt(0),q=t.elements.iframeWindow.createTreeWalker(o,NodeFilter.SHOW_TEXT,null),De,ht=0;for(;De=q.nextNode();){if(De===W.startContainer){O=ht+W.startOffset;break}ht+=De.nodeValue.length}}let j=-1;if(D==="next")j=Z.findIndex(W=>W.globalStart>O),j===-1&&(j=0);else{for(let W=Z.length-1;W>=0;W--)if(Z[W].globalStart<O){j=W;break}j===-1&&(j=Z.length-1)}let de=Z[j],Ve=t.elements.iframeWindow.createRange();Ve.setStart(de.node,de.start),Ve.setEnd(de.node,de.end),G.removeAllRanges(),G.addRange(Ve),(ut=de.node.parentElement)==null||ut.scrollIntoView({block:"center",behavior:"smooth"}),c.innerText=`${j+1} of ${Z.length}`},le=()=>{let D=r.value,ne=g.value,ge=y.checked,we=w.checked,oe=C.checked;if(!D)return;let Q=D;if(!we){let O=(oe?D.trim():D).replace(/[.*+?^${}()|[\]\\]/g,"\\$&");Q=oe?`(?<!\\w)${O}(?!\\w)`:O}let G;try{G=new RegExp(Q,ge?"":"i")}catch{return}let X=a.getSelection();if(!X.rangeCount){$("next");return}let U=X.getRangeAt(0),Z=U.toString(),J=Z.match(G);if(J&&J[0]===Z){let Y=Z.replace(G,ne);U.deleteContents(),U.insertNode(t.elements.iframeWindow.createTextNode(Y)),U.setStart(U.endContainer,U.endOffset),X.removeAllRanges(),X.addRange(U)}$("next")},re=()=>{let D=r.value,ne=g.value,ge=y.checked,we=w.checked,oe=C.checked;if(!D)return;let Q=D;if(!we){let O=(oe?D.trim():D).replace(/[.*+?^${}()|[\]\\]/g,"\\$&");Q=oe?`(?<!\\w)${O}(?!\\w)`:O}let G;try{G=new RegExp(Q,ge?"g":"gi")}catch{return}let X=t.elements.iframeWindow.createTreeWalker(o,NodeFilter.SHOW_TEXT,null),U=[],Z;for(;Z=X.nextNode();){let Y=Z.nodeValue;G.lastIndex=0;let O;for(;(O=G.exec(Y))!==null;)U.push({node:Z,start:O.index,end:O.index+O[0].length,original:O[0]})}let J=0;for(let Y=U.length-1;Y>=0;Y--){let O=U[Y],j=O.node.nodeValue,de=O.original.replace(new RegExp(Q,ge?"":"i"),ne);O.node.nodeValue=j.slice(0,O.start)+de+j.slice(O.end),J++}T.innerText=`Replaced ${J} occurrences.`,$("next")};H.onclick=()=>$("prev"),M.onclick=()=>$("next"),I.onclick=le,N.onclick=re;let hn=D=>{D.key==="Enter"&&(D.preventDefault(),$("next"))};r.addEventListener("keydown",hn)},zn=(t,e)=>{let n=t.cloneRange();return n.selectNodeContents(e),n.setEnd(t.startContainer,t.startOffset),n.toString().length===0},cn=(t,e)=>{if(t.key!=="Backspace")return;let n=e.elements.iframeWindow.getSelection();if(!n.rangeCount)return;let o=n.getRangeAt(0);if(!o.collapsed)return;let a=o.startContainer;a.nodeType===Node.TEXT_NODE&&(a=a.parentElement);let s=a.closest("li");if(!s||!e.elements.editor.contains(s))return;let i=s.querySelector("ul, ol");if(!i||!zn(o,s))return;t.preventDefault();let l=s.parentElement,d=s.previousElementSibling,m=s.cloneNode(!0),u=m.querySelector("ul, ol");u&&u.remove();let r=m.textContent.replace(/\u200B/g,"").trim(),c=document.createDocumentFragment(),p=Array.from(i.children);if(p.forEach(g=>c.appendChild(g)),d){r.length>0&&d.appendChild(document.createTextNode(r)),p.length>0&&l.insertBefore(c,s),s.remove();let g=document.createRange();g.selectNodeContents(d),g.collapse(!1),n.removeAllRanges(),n.addRange(g)}else{let g=document.createElement("span");g.textContent=r||"",l.parentElement.insertBefore(g,l),p.length>0&&l.insertBefore(c,s),s.remove();let f=document.createRange();f.selectNodeContents(g),f.collapse(!0),n.removeAllRanges(),n.addRange(f)}e.updateCaretPosition()},mn=t=>{let e=0;for(let n=0;n<t.length;n++)e=t.charCodeAt(n)+((e<<5)-e);return Qe[Math.abs(e)%Qe.length]};var he=(t,e)=>{t.elements.editor.focus(),t.elements.iframeWindow.execCommand(e),t.updateCaretPosition(),t.elements.iframeWindow.queryCommandState(e)?S(t,"active",[e]):S(t,"inactive",[e])},pn=(t,{command:e,activePlugin:n,inactivePlugin:o})=>{t.elements.iframeWindow.execCommand(e),Ae(t),t.elements.editor.focus(),t.updateCaretPosition();let a=t.elements.iframeWindow.queryCommandState(e);S(t,a?"active":"inactive",[n]),S(t,"inactive",[o])},ct=t=>pn(t,{command:"insertOrderedList",activePlugin:"ordered_list",inactivePlugin:"unordered_list"}),mt=t=>pn(t,{command:"insertUnorderedList",activePlugin:"unordered_list",inactivePlugin:"ordered_list"}),$n={undo:{title:"Undo",icon:L.UNDO,type:"button",click:(t,e)=>{e.history.undo(),e.updateCaretPosition(),e.elements.editor.focus()}},redo:{title:"Redo",icon:L.REDO,type:"button",click:(t,e)=>{e.history.redo(),e.updateCaretPosition(),e.elements.editor.focus()}},bold:{title:"Bold",icon:L.BOLD,type:"button",click:(t,e)=>{he(e,"bold")}},underline:{title:"Underline",icon:L.UNDERLINE,type:"button",click:(t,e)=>{he(e,"underline")}},italic:{title:"Italic",icon:L.ITALIC,type:"button",click:(t,e)=>{he(e,"italic")}},strike:{title:"Strike",icon:L.STRIKE,type:"button",click:(t,e)=>{e.elements.editor.focus(),e.elements.iframeWindow.execCommand("strikeThrough"),e.updateCaretPosition(),e.elements.iframeWindow.queryCommandState("strikeThrough")?S(e,"active",["strike"]):S(e,"inactive",["strike"])}},align_justify:{title:"Align Justify",icon:L.ALIGN_JUSTIFY,type:"button",click:(t,e)=>{var n;e.elements.editor.focus(),e.elements.iframeWindow.execCommand("justifyFull"),(n=e.resizerHandler)==null||n.call(e),e.updateCaretPosition(),S(e,"active",["align_justify"]),S(e,"inactive",["align_left","align_right","align_center"])}},align_left:{title:"Align Left",icon:L.ALIGN_LEFT,type:"button",click:(t,e)=>{var n;e.elements.editor.focus(),e.elements.iframeWindow.execCommand("justifyLeft"),(n=e.resizerHandler)==null||n.call(e),e.updateCaretPosition(),S(e,"active",["align_left"]),S(e,"inactive",["align_justify","align_right","align_center"])}},align_right:{title:"Align Right",icon:L.ALIGN_RIGHT,type:"button",click:(t,e)=>{var n;e.elements.editor.focus(),e.elements.iframeWindow.execCommand("justifyRight"),(n=e.resizerHandler)==null||n.call(e),e.updateCaretPosition(),S(e,"active",["align_right"]),S(e,"inactive",["align_justify","align_left","align_center"])}},align_center:{title:"Align Center",icon:L.ALIGN_CENTER,type:"button",click:(t,e)=>{var n;e.elements.editor.focus(),e.elements.iframeWindow.execCommand("justifyCenter"),(n=e.resizerHandler)==null||n.call(e),e.updateCaretPosition(),S(e,"active",["align_center"]),S(e,"inactive",["align_justify","align_left","align_right"])}},code_view:{title:"Code View",icon:L.CODE_VIEW,type:"button",click:(t,e,n)=>{if(e.state.isCodeViewOpen){e.elements.codeview.style.display="none",e.elements.iframeContainer.style.display="block",e.elements.stepper&&(e.elements.stepper.style.display="flex");let o=Ee(e.elements.codeview.value,n,e);e.onChange(o),e.elements.editor.innerHTML=o,e.elements.editor.focus(),K(e,"enabled")}else e.hidePlaceholder(),e.elements.iframeContainer.style.display="none",e.elements.stepper&&(e.elements.stepper.style.display="none"),e.elements.codeview.value=e.html,e.elements.codeview.style.display="block",e.elements.codeview.focus(),K(e,"disabled",["code_view"]);e.state.isCodeViewOpen=!e.state.isCodeViewOpen,e.updateCaretPosition()}},remove_format:{title:"Remove Format",icon:L.REMOVE_FORMAT,type:"button",click:(t,e)=>{e.elements.iframeWindow.execCommand("removeFormat"),e.elements.editor.focus(),e.updateCaretPosition()}},subscript:{title:"Sub Script",icon:L.SUBSCRIPT,type:"button",click:(t,e)=>{e.elements.editor.focus(),e.elements.iframeWindow.execCommand("subscript"),e.updateCaretPosition(),e.elements.iframeWindow.queryCommandState("subscript")?S(e,"active",["subscript"]):S(e,"inactive",["subscript"]),S(e,"inactive",["superscript"])}},superscript:{title:"Super Script",icon:L.SUPERSCRIPT,type:"button",click:(t,e)=>{e.elements.editor.focus(),e.elements.iframeWindow.execCommand("superscript"),e.updateCaretPosition(),e.elements.iframeWindow.queryCommandState("superscript")?S(e,"active",["superscript"]):S(e,"inactive",["superscript"]),S(e,"inactive",["subscript"])}},font:{title:"Font",icon:"Font",type:"select",options:Object.keys(ae).map(t=>({label:ae[t],value:t})),width:"140px",click:(t,e,n)=>{e.elements.editor.focus(),e.elements.iframeWindow.execCommand("fontName",!1,t),e.updateCaretPosition(),V(e,"font",t)}},"font-size":{title:"Font Size",icon:"Font Size",type:"select",options:Object.keys(ze).map(t=>({label:ze[t],value:t})),width:"100px",click:(t,e,n)=>{e.elements.editor.focus(),e.elements.iframeWindow.execCommand("fontSize",!1,parseInt(t)),e.updateCaretPosition(),V(e,"font-size",t)}},"format-block":{title:"Format Block",icon:"Format",type:"select",options:Object.keys(Fe).map(t=>({label:Fe[t],value:t})),width:"110px",click:(t,e,n)=>{e.elements.editor.focus(),Yt(e,t)||e.elements.iframeWindow.execCommand("formatBlock",!1,t),Ae(e),e.updateCaretPosition(),V(e,"format-block",t)}},ordered_list:{title:"Ordered List",icon:L.LIST_NUMBER,type:"button-select",options:Object.keys(Ge).map(t=>({label:Ge[t],value:t})),click:(t,e,n)=>{e.elements.editor.focus(),e.elements.iframeWindow.queryCommandState("insertOrderedList")||(e.elements.iframeWindow.execCommand("insertOrderedList"),Ae(e));let a=e.elements.iframeWindow.getSelection();if(a.rangeCount>0){let s=a.anchorNode;for(;s&&s.nodeName!=="OL"&&s!==e.elements.editor;)s=s.parentNode;(s==null?void 0:s.nodeName)==="OL"&&s.setAttribute("type",t)}e.updateCaretPosition(),S(e,"active",["ordered_list"]),S(e,"inactive",["unordered_list"])},mainClick:(t,e,n)=>{e.elements.editor.focus(),ct(e)}},unordered_list:{title:"Unordered List",icon:L.LIST_BULLETS,type:"button-select",options:Object.keys(Ye).map(t=>({label:Ye[t],value:t})),click:(t,e,n)=>{e.elements.editor.focus(),e.elements.iframeWindow.queryCommandState("insertUnorderedList")||(e.elements.iframeWindow.execCommand("insertUnorderedList"),Ae(e));let a=e.elements.iframeWindow.getSelection();if(a.rangeCount>0){let s=a.anchorNode;for(;s&&s.nodeName!=="UL"&&s!==e.elements.editor;)s=s.parentNode;(s==null?void 0:s.nodeName)==="UL"&&(s.style.listStyleType=t)}e.updateCaretPosition(),S(e,"active",["unordered_list"]),S(e,"inactive",["ordered_list"])},mainClick:(t,e,n)=>{e.elements.editor.focus(),mt(e)}},line_height:{title:"Line Height",icon:L.LINE_HEIGHT,type:"dropdown",options:[{label:"Normal",value:"normal"},{label:"1.0",value:"1.0"},{label:"1.5",value:"1.5"},{label:"2.0",value:"2.0"},{label:"2.5",value:"2.5"},{label:"3.0",value:"3.0"}],click:(t,e,n)=>{e.elements.editor.focus();let i=e.elements.iframeWindow.getSelection().getRangeAt(0).commonAncestorContainer;for(;i&&i.nodeType===Node.TEXT_NODE;)i=i.parentNode;i&&i!==e.elements.editor&&(i.style.lineHeight=t.target.getAttribute("data-value")),e.updateCaretPosition()}},font_color:{title:"Font color",icon:L.FONT_COLOR,type:"color",change:(t,e,n)=>{e.elements.editor.focus(),e.elements.iframeWindow.execCommand("foreColor",!1,t.target.value),e.updateCaretPosition()}},remove_font_color:{title:"Remove Font Color",icon:`${L.REMOVE_FORMAT}${L.FONT_COLOR}`,type:"reset-color",click:(t,e,n)=>{if(!e.state.range)return;e.elements.editor.focus();let o=document.createElement("div"),a=e.state.range.cloneContents();if(o.appendChild(a),o.innerHTML===o.innerText){let i=e.state.range.startContainer.parentElement;i.removeAttribute("color"),i.style.removeProperty("color")}else o.querySelectorAll("[style]").forEach(i=>{i.style.removeProperty("color"),i.getAttribute("style")||i.removeAttribute("style")}),o.querySelectorAll("font[color]").forEach(i=>{i.removeAttribute("color")});e.state.range.deleteContents();let s=document.createDocumentFragment();Array.from(o.childNodes).forEach(i=>{s.appendChild(i)}),e.state.range.insertNode(s),e.updateCaretPosition()}},highlight_color:{title:"Highlight Color",icon:L.HIGHLIGHT_COLOR,type:"color",change:(t,e,n)=>{e.elements.editor.focus(),e.elements.iframeWindow.execCommand("hiliteColor",!1,t.target.value),e.updateCaretPosition()}},remove_highlight_color:{title:"Remove Highlight Color",icon:`${L.REMOVE_FORMAT}${L.HIGHLIGHT_COLOR}`,type:"reset-color",click:(t,e,n)=>{e.elements.editor.focus(),e.elements.iframeWindow.execCommand("hiliteColor",!1,"transparent"),e.updateCaretPosition()}},text_style:{title:"Text Style",icon:L.TEXT_STYLE,type:"dropdown",options:[{label:"Block Quote",value:"blockquote"},{label:"Code",value:"code"},{label:"Translucent",value:"translucent"},{label:"Shadow",value:"shadow"},{label:"Upper Case",value:"upper_case"},{label:"Lower Case",value:"lower_case"},{label:"Title Case",value:"title_case"},{label:"Button (Green)",value:"button_green"},{label:"Button (Black)",value:"button_black"}],click:(t,e,n)=>{if(e.state.range){switch(t.target.getAttribute("data-value")){case"code":{let o=document.createElement("code");o.textContent=e.state.range.toString(),e.state.range.deleteContents(),e.state.range.insertNode(o);break}case"translucent":{let o=document.createElement("span");o.textContent=e.state.range.toString(),o.style.backgroundColor="rgba(200, 151, 231, 0.3)",e.state.range.deleteContents(),e.state.range.insertNode(o);break}case"shadow":{let o=document.createElement("span");o.textContent=e.state.range.toString(),o.style.textShadow="2px 2px 4px rgba(0, 0, 0, 0.3)",e.state.range.deleteContents(),e.state.range.insertNode(o);break}case"blockquote":{let o=document.createElement("blockquote");o.textContent=e.state.range.toString(),e.state.range.deleteContents(),e.state.range.insertNode(o);break}case"upper_case":{_e(e,"upper_case");break}case"lower_case":{_e(e,"lower_case");break}case"title_case":{_e(e,"title_case");break}case"button_green":{e.updateCaretPosition();let o=document.createElement("span");o.textContent=e.state.range.toString(),o.style.cssText="background-color: #28a745; color: white; font-weight: bold; padding: 8px; border-radius: 4px; text-decoration: none; display: inline-block; cursor: pointer;",o.contentEditable="false";let a=e.state.range.commonAncestorContainer;a.nodeType===Node.TEXT_NODE&&(a=a.parentElement),a.nodeName==="A"?a.style.cssText="background-color: #28a745; color: white; font-weight: bold; padding: 8px; border-radius: 4px; text-decoration: none; display: inline-block; cursor: pointer;":o.textContent&&!["TR","TBODY","THEAD","TABLE"].includes(a.nodeName)&&(e.state.range.deleteContents(),e.state.range.insertNode(o));break}case"button_black":{e.updateCaretPosition();let o=document.createElement("span");o.textContent=e.state.range.toString(),o.style.cssText="background-color: black; color: white; font-weight: bold; padding: 8px; border-radius: 4px; text-decoration: none; display: inline-block; cursor: pointer;",o.contentEditable="false";let a=e.state.range.commonAncestorContainer;a.nodeType===Node.TEXT_NODE&&(a=a.parentElement),a.nodeName==="A"?a.style.cssText="background-color: black; color: white; font-weight: bold; padding: 8px; border-radius: 4px; text-decoration: none; display: inline-block; cursor: pointer;":o.textContent&&!["TR","TBODY","THEAD","TABLE"].includes(a.nodeName)&&(e.state.range.deleteContents(),e.state.range.insertNode(o));break}}e.elements.editor.focus(),e.updateCaretPosition()}}},paragraph_style:{title:"Paragraph Style",icon:L.PARAGRAPH_STYLE,type:"dropdown",options:[{label:"Spaced",value:"letter-spacing: 2px;"},{label:"Neon",value:"color: #FD7500; text-shadow: 0 0 5px #02B59F,0 0 10px #022422,0 0 15px #FF9F03,0 0 20px #02B59F,0 0 25px #017562;font-weight: bold;"},{label:"Bordered",value:"border: 2px solid black; padding: 5px;"}],click:(t,e,n)=>{e.elements.editor.focus();let i=e.elements.iframeWindow.getSelection().getRangeAt(0).commonAncestorContainer;for(;i&&i.nodeType===Node.TEXT_NODE;)i=i.parentNode;i&&i!==e.elements.editor&&(i.style.cssText=t.target.getAttribute("data-value")),e.updateCaretPosition()}},outdent:{title:"Outdent",icon:L.OUTDENT,type:"button",click:(t,e,n)=>{if(!e.state.range)return;let a=e.state.range.commonAncestorContainer;for(;a&&a.nodeType===Node.TEXT_NODE;)a=a.parentNode;if(a){let s=parseInt(a.style.marginLeft||"0",10);a.style.marginLeft=Math.max(0,s-40)+"px"}e.updateCaretPosition(),e.elements.editor.focus()}},indent:{title:"Indent",icon:L.INDENT,type:"button",click:(t,e,n)=>{if(!e.state.range)return;let a=e.state.range.commonAncestorContainer;for(;a&&a.nodeType===Node.TEXT_NODE;)a=a.parentNode;if(a){let s=parseInt(a.style.marginLeft||"0",10);a.style.marginLeft=s+40+"px"}e.updateCaretPosition(),e.elements.editor.focus()}},link:{title:"Link",icon:L.LINK,type:"button",click:(t,e,n)=>{let o=b=>{b.key==="Enter"&&(b.preventDefault(),g.click())},a="",s="",i=!1;if(e.elements.selectedElement&&e.elements.selectedElement.tagName==="IMG"){let b=e.elements.selectedElement;if(b){let y=b.parentNode;y.nodeName==="A"&&(a=y.href,s=b.alt||"",i=!0)}}else if(e.state.range&&e.state.selection.rangeCount>0){let h=e.state.range.commonAncestorContainer;h.nodeType===Node.TEXT_NODE&&(h=h.parentNode),h.nodeName==="A"&&(a=h.getAttribute("href"),s=h.innerText||"",i=!0)}let l=document.createElement("div"),d=document.createElement("label");d.innerText="Link",d.style.display="block",d.style.paddingLeft="4px";let m=document.createElement("input");m.value=a,m.type="text",m.placeholder="Insert link, mail, phone no",m.addEventListener("keydown",o);let u=document.createElement("label");u.innerText="Link Text",u.style.display="block",u.style.paddingLeft="4px",u.style.marginTop="8px";let r=document.createElement("input");r.value=s,r.type="text",r.placeholder="Link text",r.addEventListener("keydown",o);let c=document.createElement("span");c.className="warning",l.append(d,m,c,u,r);let p=document.createElement("div"),g=document.createElement("button");g.type="button",g.className="submit",g.innerText="Add",p.append(g);let f=ve({title:"Link",bodyNode:l,footerNode:p},e,n);m.focus(),g.onclick=()=>{let b=Ut(m.value),y=r.value;if(Ft(b)){if(i){if(e.elements.selectedElement&&e.elements.selectedElement.tagName==="IMG"){let h=e.elements.selectedElement;if(h){let x=h.parentNode;x.nodeName==="A"&&(x.href=b,h.alt=y)}}else if(e.state.range&&e.state.selection.rangeCount>0){let C=e.state.range.commonAncestorContainer;C.nodeType===Node.TEXT_NODE&&(C=C.parentNode),C.nodeName==="A"&&(C.setAttribute("href",b),C.innerText=y)}}else if(e.elements.selectedElement&&e.elements.selectedElement.tagName==="IMG"){let h=document.createElement("a");h.href=b,h.target="_blank",e.elements.selectedElement.parentNode.insertBefore(h,e.elements.selectedElement),h.appendChild(e.elements.selectedElement),e.elements.selectedElement.alt=y}else{let h=document.createElement("a");h.href=b,h.target="_blank",h.textContent=y||b,e.insertNode(h)}f.close(),e.elements.editor.focus()}else c.innerText="Invalid URL"},e.updateCaretPosition()}},unlink:{title:"Unlink",icon:L.UNLINK,type:"button",click:(t,e,n)=>{e.elements.iframeWindow.execCommand("unlink"),e.elements.editor.focus(),e.updateCaretPosition()}},horizontal_rule:{title:"Horizontal Rule",icon:L.HORIZONTAL_RULE,type:"button",click:(t,e,n)=>{e.elements.iframeWindow.execCommand("insertHorizontalRule"),e.elements.editor.focus(),e.updateCaretPosition()}},table:{title:"Table",icon:L.TABLE,type:"table",create:(t,e,{rows:n,cols:o,header:a})=>{let s=document.createElement("table");s.style.borderCollapse="collapse",s.style.width=t.elements.editor.offsetWidth-50+"px";for(let i=0;i<=n;i++){let l=document.createElement("tr");for(let d=0;d<=o;d++){let m=i===0&&a?document.createElement("th"):document.createElement("td");m.style.border="1px solid black",m.appendChild(document.createTextNode("\xA0")),l.appendChild(m)}s.appendChild(l)}t.insertNode(s),t.elements.editor.focus(),t.updateCaretPosition()}},mention:{title:"Mention",icon:L.MENTION,type:"mention"},emoji:{title:"Emoji",icon:L.EMOJI,type:"category",categories:bt},special_character:{title:"Special Character",icon:L.SPECIAL_CHARACTER,type:"category",categories:yt},pexels:{title:"Pexels",icon:L.PEXELS,type:"gallery",suggestions:async(t,e)=>et.suggestions(t,e),search:async(t,e,n)=>et.search(t,e,n)},giphy:{title:"GIPHY",icon:L.GIPHY_SVG,type:"gallery",suggestions:async(t,e)=>Je.suggestions(t,e),search:async(t,e,n)=>Je.search(t,e,n)},tenor:{title:"Tenor",icon:L.TENOR,type:"gallery",suggestions:async(t,e)=>tt.suggestions(t,e),search:async(t,e)=>tt.search(t,e)},image:{title:"Image",icon:L.IMAGE,type:"dropdown",options:[{label:"Upload from device",value:"upload"},{label:"Using Link",value:"link"}],click:async(t,e,n)=>{if(t.target.getAttribute("data-value")==="upload"){let o=x=>{x.key==="Enter"&&(x.preventDefault(),b.click())},a=document.createElement("div");a.style.display="flex",a.style.gap="16px";let s=document.createElement("div");s.style.display="flex",s.style.flexDirection="column",s.style.gap="16px",s.style.flex="1";let i=document.createElement("div");i.className=`${n.classPrefix}${A.UPLOAD_IMG_BOX}`,i.innerHTML=`
420
+ `;let m=document.createElement("div");m.className=`${t.classPrefix}${A.RESIZE_ITEMS} `,ft.forEach(b=>{let f=document.createElement("button");f.type="button",f.className=`${t.classPrefix}${A.RESIZE_ITEM} `,f.setAttribute("data-title",b.title),f.setAttribute("data-type","button"),f.onclick=g=>{g.preventDefault(),s(b.event)};let C=document.createElement("div");C.innerHTML=b.icon,f.appendChild(C),m.appendChild(f)}),u.appendChild(m),d.onclick=()=>{let b=w=>{w.key==="Enter"&&(w.preventDefault(),y.submit.click())};if(u.style.display==="block"){u.style.display="none",document.removeEventListener("mousedown",l,!1),e.elements.editor.removeEventListener("click",l,!1);return}u.style.display="block";let C=Me(u).getBoundingClientRect(),g=u.getBoundingClientRect(),h=g.right>C.right,x=g.left<C.left;h?u.style.right="10px":x&&(u.style.left="10px");let y={byPercentage:document.getElementById(r.byPercentage),byPixels:document.getElementById(r.byPixels),percentageWidth:document.getElementById(r.percentageWidth),percentageHeight:document.getElementById(r.percentageHeight),pixelsWidth:document.getElementById(r.pixelsWidth),pixelsHeight:document.getElementById(r.pixelsHeight),percentage:document.getElementById(r.percentage),pixels:document.getElementById(r.pixels),aspectRatio:document.getElementById(r.aspectRatio),submit:document.getElementById(r.submit)};n=="image"&&(y.altText=document.getElementById(r.altText));let E=a.getBoundingClientRect();y.percentageWidth.value=E.width/a.naturalWidth*100,y.percentageHeight.value=E.height/a.naturalHeight*100,y.pixelsWidth.value=E.width,y.pixelsHeight.value=E.height,n=="image"&&(y.altText.value=a.alt||""),y.byPercentage.onchange=w=>{w.target.checked&&(y.pixels.style.display="none",y.percentage.style.display="block",y.byPixels.checked=!1)},y.byPixels.onchange=w=>{w.target.checked&&(y.percentage.style.display="none",y.pixels.style.display="block",y.byPercentage.checked=!1)};let T=w=>{let k=parseInt(w.target.value);k&&(k>100&&(k=100),y.aspectRatio.checked?(y.percentageWidth.value=k,y.percentageHeight.value=k):w.target.value=k)};y.percentageWidth.oninput=T,y.percentageHeight.oninput=T;let v=w=>{let k=parseInt(w.target.value);if(k)if(y.aspectRatio.checked){let R,H;if(w.target.name==="width"){R=k;let M=a.naturalWidth/k;H=a.naturalHeight/M}else{H=k;let M=a.naturalHeight/k;R=a.naturalWidth/M}y.pixelsWidth.value=R,y.pixelsHeight.value=H}else w.target.value=k};y.pixelsWidth.oninput=v,y.pixelsHeight.oninput=v,y.percentageWidth.onkeydown=b,y.percentageHeight.onkeydown=b,y.pixelsWidth.onkeydown=b,y.pixelsHeight.onkeydown=b,y.aspectRatio.onchange=w=>{if(w.target.checked)if(y.byPixels.checked){let k=a.naturalWidth/parseInt(y.pixelsWidth.value),R=a.naturalHeight/k;y.pixelsHeight.value=R}else y.percentageHeight.value=y.percentageWidth.value},y.submit.onclick=w=>{y.byPixels.checked?parseInt(y.pixelsWidth.value)&&parseInt(y.pixelsHeight.value)&&s("update",{width:y.pixelsWidth.value+"px",height:y.pixelsHeight.value+"px"}):y.byPercentage.checked&&parseInt(y.percentageWidth.value)&&parseInt(y.percentageHeight.value)&&s("update",{width:y.percentageWidth.value+"%",height:y.percentageHeight.value+"%"}),n=="image"&&(a.alt=y.altText.value)},document.addEventListener("mousedown",l),e.elements.editor.addEventListener("click",l)}}else if(n==="td"){u.style.padding="0";let r=document.createElement("div");r.className=`${t.classPrefix}${A.POPOVER_TABS}`;let m=document.createElement("div");m.style.padding="0px 2px",u.innerHTML="",u.append(r,m);let b=f=>{let C=f.event==="border-color"||f.event==="background-color"||f.event==="row-background-color"||f.event==="column-background-color",g=["cell-width","cell-height","cell-padding"].includes(f.event),h;if(C){h=document.createElement("label"),h.className=`${t.classPrefix}${A.RESIZE_ITEM}`,h.style.display="flex",h.style.gap="6px",h.style.alignItems="center",h.style.width="100%",h.style.cursor="pointer",h.style.padding="4px 8px",h.onmouseenter=()=>{h.style.backgroundColor="#ddd"},h.onmouseleave=()=>{h.style.backgroundColor="transparent"};let x=document.createElement("span");x.innerHTML=f.icon;let y=document.createElement("span");y.textContent=f.title;let E=document.createElement("input");E.type="color",E.style.width="24px",E.style.height="24px",E.style.padding="0px",E.style.border="none",E.style.background="transparent",E.style.cursor="pointer",E.oninput=T=>{i(f.event,T.target.value)},h.append(x,y,E)}else if(g){h=document.createElement("label"),h.className=`${t.classPrefix}${A.RESIZE_ITEM}`,h.style.display="flex",h.style.gap="8px",h.style.alignItems="center",h.style.width="100%",h.style.cursor="pointer",h.style.padding="4px 8px",h.onmouseenter=()=>{h.style.backgroundColor="#ddd"},h.onmouseleave=()=>{h.style.backgroundColor="transparent"};let x=document.createElement("span");x.innerHTML=f.icon;let y=document.createElement("span");y.textContent=f.title;let E=document.createElement("input");E.type="number",E.placeholder="auto",E.style.width="60px",E.style.padding="2px",E.style.border="1px solid #ccc",E.style.borderRadius="4px",f.event==="cell-width"?E.value=Le(o.style.width)||"":f.event==="cell-height"?E.value=Le(o.parentElement.style.height)||"":f.event==="cell-padding"&&(E.value=Le(o.style.padding)||""),E.onchange=T=>i(f.event,(Number.parseInt(T.target.value)||0)+"px"),E.onclick=T=>T.stopPropagation(),h.append(x,y,E)}else{h=document.createElement("button"),h.type="button",h.className=`${t.classPrefix}${A.RESIZE_ITEM}`,h.style.display="flex",h.style.alignItems="center",h.style.gap="8px",h.style.width="100%",h.style.padding="4px 8px",h.style.border="none",h.style.background="transparent",h.style.textAlign="left",h.onmouseenter=()=>{h.style.backgroundColor="#ddd"},h.onmouseleave=()=>{h.style.backgroundColor="transparent"},h.onclick=E=>{E.preventDefault(),i(f.event)};let x=document.createElement("div");x.innerHTML=f.icon;let y=document.createElement("span");y.textContent=f.title,h.append(x,y)}return h};Object.keys(Ge).forEach((f,C)=>{let g=document.createElement("button");g.type="button",g.textContent=f,g.className=`${t.classPrefix}${A.POPOVER_TAB}`;let h=f.replaceAll(" ","-");g.dataset.tab=h;let x=document.createElement("div");x.id=h,x.className=`${t.classPrefix}${A.POPOVER_TAB_CONTENT}`,x.style.display="none",C===0&&(g.classList.add("active"),x.style.display="block");let y=Ge[f];Object.keys(y).forEach(E=>{if(E){let v=document.createElement("div");v.style.padding="4px",v.textContent=E,x.appendChild(v)}let T=document.createElement("div");T.className=`${t.classPrefix}${A.RESIZE_ITEMS}`,T.style.width="100%",y[E].forEach(v=>{let w=bt.find(k=>k.event===v);if(w){let k=b(w);T.appendChild(k)}}),x.appendChild(T)}),r.appendChild(g),m.appendChild(x),g.onclick=E=>{r.querySelectorAll(`.${t.classPrefix}${A.POPOVER_TAB}`).forEach(T=>{T.classList.remove("active")}),m.querySelectorAll(`.${t.classPrefix}${A.POPOVER_TAB_CONTENT}`).forEach(T=>{T.style.display="none"}),E.currentTarget.classList.add("active"),m.querySelector(`#${E.currentTarget.getAttribute("data-tab")}`).style.display="block"}}),d.onclick=()=>{if(u.style.display==="block"){u.style.display="none",document.removeEventListener("mousedown",l,!1),e.elements.editor.removeEventListener("click",l,!1);return}u.style.display="block";let C=Me(u).getBoundingClientRect(),g=u.getBoundingClientRect(),h=g.right>C.right,x=g.left<C.left;h?u.style.right="20px":x&&(u.style.left="20px"),document.addEventListener("mousedown",l),e.elements.editor.addEventListener("click",l)}}c.appendChild(d),c.appendChild(u),e.elements.toolbarContainer.appendChild(c),e.elements.resizerPlugin=c},we=({title:t,bodyNode:e,footerNode:n},o,a)=>{let s=document.createElement("div");s.className=`${a.classPrefix}${A.MODAL} `;let i=document.createElement("div");i.className=`${a.classPrefix}${A.MODAL_CONTENT} `;let l=document.createElement("div");l.className=`${a.classPrefix}${A.MODAL_HEADER} `;let c=document.createElement("span");c.innerText=t??"";let d=document.createElement("button");d.className="modal-close-btn",d.innerHTML=L.CLOSE,d.type="button",d.onclick=()=>{o.elements.base.removeChild(s)},l.append(c,d);let p=document.createElement("div");p.className=`${a.classPrefix}${A.MODAL_BODY} `,p.appendChild(e);let u=document.createElement("div");return u.className=`${a.classPrefix}${A.MODAL_FOOTER} `,u.appendChild(n),i.appendChild(l),i.appendChild(p),i.appendChild(u),s.appendChild(i),o.elements.base.appendChild(s),{close:()=>{o.elements.base.removeChild(s)}}},Mn=({title:t,bodyNode:e,footerNode:n,onClose:o},a,s)=>{let i=document.createElement("div");i.className=`${s.classPrefix}${A.MODAL} ${s.classPrefix}${A.DRAGGABLE_MODAL} `;let l=document.createElement("div");l.className=`${s.classPrefix}${A.MODAL_CONTENT} `;let c=document.createElement("div");if(c.className=`${s.classPrefix}${A.MODAL_HEADER} `,t instanceof HTMLElement)c.appendChild(t);else{let T=document.createElement("span");T.innerText=t??"",c.appendChild(T)}let d=document.createElement("button");d.className="modal-close-btn",d.innerHTML=L.CLOSE,d.type="button",d.onclick=()=>{i.remove(),typeof o=="function"&&o()},c.appendChild(d);let p=!1,u,r,m,b,f=0,C=0,g=T=>{T.target.closest("button")||(T.type==="touchstart"?(m=T.touches[0].clientX-f,b=T.touches[0].clientY-C):(m=T.clientX-f,b=T.clientY-C),p=!0,document.addEventListener("mouseup",h),document.addEventListener("touchend",h),a.elements.iframeWindow.addEventListener("mouseup",h),a.elements.iframeWindow.addEventListener("touchend",h),document.addEventListener("mousemove",x),document.addEventListener("touchmove",x))},h=()=>{p=!1,document.removeEventListener("mouseup",h,!1),document.removeEventListener("touchend",h,!1),a.elements.iframeWindow.removeEventListener("mouseup",h,!1),a.elements.iframeWindow.removeEventListener("touchend",h,!1),document.removeEventListener("mousemove",x,!1),document.removeEventListener("touchmove",x,!1)},x=T=>{p&&(T.preventDefault(),u=(T.type==="touchmove"?T.touches[0].clientX:T.clientX)-m,r=(T.type==="touchmove"?T.touches[0].clientY:T.clientY)-b,f=u,C=r,i.style.transform=`translate(-50%, -50%) translate3d(${u}px, ${r}px, 0)`)};c.addEventListener("mousedown",g,!1),c.addEventListener("touchstart",g,!1);let y=document.createElement("div");y.className=`${s.classPrefix}${A.MODAL_BODY} `,y.appendChild(e);let E=document.createElement("div");return E.className=`${s.classPrefix}${A.MODAL_FOOTER} `,E.appendChild(n),l.appendChild(c),l.appendChild(y),l.appendChild(E),i.appendChild(l),a.elements.base.appendChild(i),{close:()=>{i.remove(),typeof o=="function"&&o()}}},it=(t,e,n,o)=>{pe(n,o),K(o,"disabled",["link","align_justify","align_left","align_right","align_center"]),o.elements.editor.blur();let a=e.getBoundingClientRect(),s=document.createElement("div");if(s.className="resizer",s.style.width=a.width+"px",s.style.height=a.height+"px",s.style.top=a.top+"px",s.style.left=a.left+"px",t==="image"){let w=document.createElement("span");w.innerHTML=L.FULLSCREEN_IMAGE,w.style.position="absolute",w.style.top="5px",w.style.right="5px",w.style.background="rgba(0, 0, 0, 0.6)",w.style.color="white",w.style.border="none",w.style.cursor="pointer",w.style.borderRadius="4px",w.style.fontSize="14px",w.style.transition="0.3s ease-in-out",w.style.width="28px",w.style.height="28px",w.style.display="flex",w.style.alignItems="center",w.style.justifyContent="center",w.addEventListener("click",()=>{var M;let k=e.closest("a"),R=!1,H=e.src;if(((M=k==null?void 0:k.dataset)==null?void 0:M.leksyPreview)==="video-url"){let I=k.getAttribute("href");I&&(R=!0,H=I)}if(n.onFullScreen instanceof Function){let I=R?"video/mp4":"image/png";n.onFullScreen(H,I)}else Nn(H,o,n,R)}),s.appendChild(w)}let i,l,c,d,p,u=w=>{p=s.getBoundingClientRect(),c=w.target.getAttribute("data-resize"),i=w.clientX||w.touches[0].clientX,l=w.clientY||w.touches[0].clientY,d=s.offsetWidth/s.offsetHeight,o.elements.iframeWindow.addEventListener("mousemove",r),o.elements.iframeWindow.addEventListener("mouseup",m),o.elements.iframeWindow.addEventListener("touchmove",r),o.elements.iframeWindow.addEventListener("touchend",m)},r=w=>{let k={clientX:w.clientX||w.touches[0].clientX,clientY:w.clientY||w.touches[0].clientY};if(c==="up"){let R=p.top+(k.clientY-l),H=p.height-(k.clientY-l);H<0&&(R=p.bottom,H=0),s.style.top=R+"px",s.style.height=H+"px"}else if(c==="bottom"){let R=p.height+(k.clientY-l);R<0&&(R=0),s.style.height=R+"px"}else if(c==="left"){let R=p.left+(k.clientX-i),H=p.width-(k.clientX-i);H<0&&(R=p.right,H=0),s.style.left=R+"px",s.style.width=H+"px"}else if(c==="right"){let R=p.width+(k.clientX-i);R<0&&(R=0),s.style.width=R+"px"}else if(c==="bottom-right"){let R=k.clientX-i,H=k.clientY-l,M=Math.sign(R)===-1||Math.sign(H)===-1?Math.min(R,H):Math.max(R,H),I=p.width+M,N=I/d;s.style.width=I+"px",s.style.height=N+"px"}else if(c==="bottom-left"){let R=k.clientX-i,H=k.clientY-l,M=R>0?Math.max(R,H):R,I=p.width-M;I<0&&(I=0);let N=p.left+p.width-I,_=I/d;s.style.width=I+"px",s.style.left=N+"px",s.style.height=_+"px"}else if(c==="up-right"){let R=k.clientX-i,H=k.clientY-l,M=R>0?Math.max(R,H):R,I=p.width+M;I<0&&(I=0);let N=I/d,_=p.top+(p.height-N);s.style.top=_+"px",s.style.width=I+"px",s.style.height=N+"px"}else if(c==="up-left"){let R=k.clientX-i,H=k.clientY-l,M=R>0?Math.max(R,H):R,I=p.width-M;I<0&&(I=0);let N=I/d,_=p.top+(p.height-N),$=p.left+(p.width-I);s.style.top=_+"px",s.style.width=I+"px",s.style.height=N+"px",s.style.left=$+"px"}k.textContent=`${parseInt(s.style.width)}x${parseInt(s.style.height)} `},m=w=>{e.style.width=parseInt(s.style.width)+"px",e.style.height=parseInt(s.style.height)+"px";let k=e.getBoundingClientRect();s.style.width=k.width+"px",s.style.height=k.height+"px",s.style.top=k.top+"px",s.style.left=k.left+"px",o.elements.iframeWindow.removeEventListener("mousemove",r,!1),o.elements.iframeWindow.removeEventListener("mouseup",m,!1),o.elements.iframeWindow.removeEventListener("touchmove",r,!1),o.elements.iframeWindow.removeEventListener("touchend",m,!1)},b=document.createElement("button");b.type="button",b.className="dot up-left",b.setAttribute("data-resize","up-left"),b.addEventListener("mousedown",u),b.addEventListener("touchstart",u);let f=document.createElement("button");f.type="button",f.className="dot up",f.setAttribute("data-resize","up"),f.addEventListener("mousedown",u),f.addEventListener("touchstart",u);let C=document.createElement("button");C.type="button",C.className="dot up-right",C.setAttribute("data-resize","up-right"),C.addEventListener("mousedown",u),C.addEventListener("touchstart",u);let g=document.createElement("button");g.type="button",g.className="dot right",g.setAttribute("data-resize","right"),g.addEventListener("mousedown",u),g.addEventListener("touchstart",u);let h=document.createElement("button");h.type="button",h.className="dot bottom-right",h.setAttribute("data-resize","bottom-right"),h.addEventListener("mousedown",u),h.addEventListener("touchstart",u);let x=document.createElement("button");x.type="button",x.className="dot bottom",x.setAttribute("data-resize","bottom"),x.addEventListener("mousedown",u),x.addEventListener("touchstart",u);let y=document.createElement("button");y.type="button",y.className="dot bottom-left",y.setAttribute("data-resize","bottom-left"),y.addEventListener("mousedown",u),y.addEventListener("touchstart",u);let E=document.createElement("button");E.type="button",E.className="dot left",E.setAttribute("data-resize","left"),E.addEventListener("mousedown",u),E.addEventListener("touchstart",u);let T=document.createElement("div");T.className="position",T.textContent=`${parseInt(a.width)}x${parseInt(a.height)} `,s.append(b,f,C,g,h,x,y,E,T);let v=(w,k)=>{switch(w){case"update":e.style.width=k.width,e.style.height=k.height;break;case"100%":case"75%":case"50%":case"auto":e.style.width=w,e.style.height="unset";break;case"wrap-left":e.style.float="left",e.style.margin="0 10px 10px 0";break;case"wrap-right":e.style.float="right",e.style.margin="0 0 10px 10px";break;case"revert":e.style.width="unset",e.style.height="unset",e.style.float="none",e.style.margin="";break;case"delete":e.remove(),pe(n,o);break}let R=e.getBoundingClientRect();s.style.width=R.width+"px",s.style.height=R.height+"px",s.style.top=R.top+"px",s.style.left=R.left+"px",T.textContent=`${parseInt(s.style.width)}x${parseInt(s.style.height)} `};Vt(n,o,{type:t,image:e,updateImage:v}),o.elements.resizerImage=e,o.elements.resizer=s,o.elements.iframeWindow.body.appendChild(s),o.resizerHandler=w=>Ne(w,o),o.deleteImageHandler=w=>{(w.key==="Backspace"||w.key==="Delete")&&v("delete")},o.elements.iframeWindow.addEventListener("scroll",o.resizerHandler),o.elements.iframeWindow.addEventListener("keydown",o.deleteImageHandler)},Nn=(t,e,n,o=!1)=>{let a=document.createElement("div");a.className=`${n.classPrefix}${A.PREVIEW_MODAL_OVERLAY} `;let s=document.createElement("div");s.className=`${n.classPrefix}${A.PREVIEW_MODAL_CONTENT} `;let i=document.createElement("span");i.className=`${n.classPrefix}${A.PREVIEW_MODAL_CLOSE} `,i.innerHTML=L.CLOSE,i.onclick=()=>a.remove();let l=document.createElement("div");l.className=`${n.classPrefix}${A.PREVIEW_MODAL_BODY} `;let c;o?(c=document.createElement("video"),c.src=t,c.controls=!0,c.style.maxWidth="100%",c.style.maxHeight="100%",c.setAttribute("controlsList","nodownload"),c.setAttribute("disablePictureInPicture",!0)):(c=document.createElement("img"),c.src=t,c.alt="Preview Image"),l.appendChild(c),s.append(i,l),a.appendChild(s),document.body.appendChild(a),a.addEventListener("click",d=>{d.target!==c&&a.remove()}),setTimeout(()=>{a.classList.add("active")},10)},Ne=(t,e)=>{let n=e.elements.resizerImage.getBoundingClientRect();e.elements.resizer.style.width=n.width+"px",e.elements.resizer.style.height=n.height+"px",e.elements.resizer.style.top=n.top+"px",e.elements.resizer.style.left=n.left+"px"},pe=(t,e)=>{t.disabled||K(e,"enabled"),e.elements.resizerPlugin&&e.elements.toolbarContainer.removeChild(e.elements.resizerPlugin),e.elements.resizer&&e.elements.iframeWindow.body.removeChild(e.elements.resizer),e.elements.iframeWindow.removeEventListener("scroll",e.resizerHandler,!1),e.elements.iframeWindow.removeEventListener("scroll",e.deleteImageHandler,!1),e.elements.iframeWindow.removeEventListener("keydown",e.deleteImageHandler,!1),delete e.elements.resizer,delete e.resizerHandler,delete e.deleteImageHandler,delete e.elements.resizerImage,delete e.elements.resizerPlugin},ue=t=>{let e=[],n=t.rows;for(let o=0;o<n.length;o++){e[o]||(e[o]=[]);let a=n[o],s=0;for(let i=0;i<a.cells.length;i++){let l=a.cells[i];for(;e[o][s];)s++;let c=l.rowSpan||1,d=l.colSpan||1;for(let p=0;p<c;p++)for(let u=0;u<d;u++)e[o+p]||(e[o+p]=[]),e[o+p][s+u]=l;s+=d}}return e},z=(t,e)=>{for(let n=0;n<t.length;n++)for(let o=0;o<t[n].length;o++)if(t[n][o]===e)return{r:n,c:o};return null},Dt=(t,e,n)=>{te(e,n);let o=t.closest("table");if(!o)return;let a=o.getBoundingClientRect(),s,i,l=f=>{let C=f.target.closest("th, td");if(!C)return;let h=C.getBoundingClientRect().right-f.clientX<=Xe;o.style.cursor=h?"col-resize":"default"},c=f=>{let C=f.type==="touchstart",g=C?f.touches[0].clientX:f.clientX;if(!C&&o.style.cursor!=="col-resize")return;let h=f.target.closest("td, th");if(!h||C&&!(h.getBoundingClientRect().right-g<=Xe))return;f.preventDefault(),f.stopPropagation();let x=g,y=Array.from(o.rows[0].cells);y.forEach(N=>{N.style.width=N.getBoundingClientRect().width+"px"});let E=h.getBoundingClientRect(),T=y.findIndex(N=>Math.abs(N.getBoundingClientRect().right-E.right)<5);if(T===-1)return;let v=y[T],w=y[T+1],k=v.getBoundingClientRect().width,R=w?w.getBoundingClientRect().width:0,H=o.getBoundingClientRect().width,M=N=>{let $=(N.type==="touchmove"?N.touches[0].clientX:N.clientX)-x;if(w){let re=Math.min(Math.max($,30-k),R-30);v.style.width=k+re+"px",w.style.width=R-re+"px"}else{let le=Math.max(k+$,30),re=le-k;v.style.width=le+"px",o.style.width=H+re+"px"}n.elements.iframeWindow.body.style.cursor="col-resize"},I=()=>{n.elements.iframeWindow.body.style.cursor="",n.elements.iframeWindow.removeEventListener("mousemove",M),n.elements.iframeWindow.removeEventListener("mouseup",I),n.elements.iframeWindow.removeEventListener("touchmove",M),n.elements.iframeWindow.removeEventListener("touchend",I)};n.elements.iframeWindow.addEventListener("mousemove",M),n.elements.iframeWindow.addEventListener("mouseup",I),n.elements.iframeWindow.addEventListener("touchmove",M),n.elements.iframeWindow.addEventListener("touchend",I)};o.addEventListener("mousemove",l),o.addEventListener("mousedown",c),o.addEventListener("touchstart",c),n.tableColumnResizeHandlers={mousemove:l,mousedown:c,touchstart:c};let d=f=>{s=f.clientX||f.touches[0].clientX,i=f.clientY||f.touches[0].clientY,n.elements.iframeWindow.addEventListener("mousemove",p),n.elements.iframeWindow.addEventListener("mouseup",u),n.elements.iframeWindow.addEventListener("touchmove",p),n.elements.iframeWindow.addEventListener("touchend",u)},p=f=>{let C=(f.clientX||f.touches[0].clientX)-s,g=(f.clientY||f.touches[0].clientY)-i,h=a.width+C,x=a.height+g;o.style.width=h+"px",o.style.height=x+"px"},u=f=>{n.elements.iframeWindow.removeEventListener("mousemove",p,!1),n.elements.iframeWindow.removeEventListener("mouseup",u,!1),n.elements.iframeWindow.removeEventListener("touchmove",p,!1),n.elements.iframeWindow.removeEventListener("touchend",u,!1)};Vt(e,n,{type:"td",td:t,updateTable:(f,C)=>{let g=t.parentElement.rowIndex,h=t.cellIndex,x=o.rows[0].cells.length,y=(v,w)=>{let k=v.insertCell(w);k.innerHTML="\xA0",k.style.border="1px solid black"},E=(v,w)=>{if(v){let k=v.style[w];v.style[w]=["none","medium","medium none","0px none rgb(0, 0, 0)"].includes(k)?"1px solid black":"none"}},T=()=>{o.rows.length===0&&o.remove()};switch(f){case"insert-row-above":{let v=o.insertRow(g);for(let w=0;w<x;w++)y(v,w);break}case"insert-row-below":{let v=o.insertRow(g+1);for(let w=0;w<x;w++)y(v,w);break}case"delete-row":{o.deleteRow(g),te(e,n),T();break}case"merge-cell-right":{let v=ue(o),w=z(v,t);if(!w)break;let{r:k,c:R}=w,H=v[k][R+(t.colSpan||1)];H&&H!==t&&(H.rowSpan||1)===(t.rowSpan||1)&&z(v,H).r===k&&(H.innerHTML.trim()!==""&&(t.innerHTML+="<br/>"+H.innerHTML),t.colSpan=(t.colSpan||1)+(H.colSpan||1),H.remove());break}case"merge-cell-left":{let v=ue(o),w=z(v,t);if(!w)break;let{r:k,c:R}=w;if(R===0)break;let H=v[k][R-1];H&&H!==t&&(H.rowSpan||1)===(t.rowSpan||1)&&z(v,H).r===k&&(H.innerHTML.trim()!==""&&(t.innerHTML=H.innerHTML+"<br/>"+t.innerHTML),t.colSpan=(t.colSpan||1)+(H.colSpan||1),H.parentNode.insertBefore(t,H),H.remove());break}case"merge-cell-down":{let v=ue(o),w=z(v,t);if(!w)break;let{r:k,c:R}=w,H=k+(t.rowSpan||1);if(H>=v.length)break;let M=v[H][R];M&&M!==t&&(M.colSpan||1)===(t.colSpan||1)&&z(v,M).c===R&&(M.innerHTML.trim()!==""&&(t.innerHTML+="<br/>"+M.innerHTML),t.rowSpan=(t.rowSpan||1)+(M.rowSpan||1),M.remove());break}case"merge-cell-up":{let v=ue(o),w=z(v,t);if(!w)break;let{r:k,c:R}=w;if(k===0)break;let H=v[k-1][R];H&&H!==t&&(H.colSpan||1)===(t.colSpan||1)&&z(v,H).c===R&&(H.innerHTML.trim()!==""&&(t.innerHTML=H.innerHTML+"<br/>"+t.innerHTML),t.rowSpan=(t.rowSpan||1)+(H.rowSpan||1),H.parentNode.insertBefore(t,H),H.remove());break}case"insert-column-left":{for(let v of o.rows)y(v,h);break}case"insert-column-right":{for(let v of o.rows)y(v,h+1);break}case"delete-column":{for(let v of o.rows)v.deleteCell(h);T(),te(e,n);break}case"split-cell-vertical":{let v=t.colSpan||1;if(v>1){t.colSpan=v-1;let w=t.parentNode.insertCell(t.cellIndex+1);w.innerHTML="\xA0",w.style.border=t.style.border,w.rowSpan=t.rowSpan}break}case"split-cell-horizontal":{let v=t.rowSpan||1;if(v>1){t.rowSpan=v-1;let w=ue(o),k=z(w,t),{r:R,c:H}=k,M=R+v-1,I=o.rows[M],N=0;for(let $=0;$<I.cells.length;$++){let le=I.cells[$];if(z(w,le).c<H)N++;else break}let _=I.insertCell(N);_.innerHTML="\xA0",_.style.border=t.style.border,_.colSpan=t.colSpan}break}case"align-left":{o.style.marginLeft="0",o.style.marginRight="auto";break}case"align-center":{o.style.marginLeft="auto",o.style.marginRight="auto";break}case"align-right":{o.style.marginLeft="auto",o.style.marginRight="0";break}case"cell-border-top":{if(E(t,"borderTop"),g>0){let v=o.rows[g-1].cells[h];E(v,"borderBottom")}break}case"cell-border-right":{if(E(t,"borderRight"),h<o.rows[g].cells.length-1){let v=o.rows[g].cells[h+1];E(v,"borderLeft")}break}case"cell-border-bottom":{if(E(t,"borderBottom"),g<o.rows.length-1){let v=o.rows[g+1].cells[h];E(v,"borderTop")}break}case"cell-border-left":{if(E(t,"borderLeft"),h>0){let v=o.rows[g].cells[h-1];E(v,"borderRight")}break}case"cell-border-full":{t.style.border="1px solid black",g>0&&o.rows[g-1].cells[h]&&(o.rows[g-1].cells[h].style.borderBottom="1px solid black"),g<o.rows.length-1&&o.rows[g+1].cells[h]&&(o.rows[g+1].cells[h].style.borderTop="1px solid black"),h>0&&o.rows[g].cells[h-1]&&(o.rows[g].cells[h-1].style.borderRight="1px solid black"),h<o.rows[g].cells.length-1&&o.rows[g].cells[h+1]&&(o.rows[g].cells[h+1].style.borderLeft="1px solid black");break}case"cell-border-none":{t.style.border="none",g>0&&o.rows[g-1].cells[h]&&(o.rows[g-1].cells[h].style.borderBottom="none"),g<o.rows.length-1&&o.rows[g+1].cells[h]&&(o.rows[g+1].cells[h].style.borderTop="none"),h>0&&o.rows[g].cells[h-1]&&(o.rows[g].cells[h-1].style.borderRight="none"),h<o.rows[g].cells.length-1&&o.rows[g].cells[h+1]&&(o.rows[g].cells[h+1].style.borderLeft="none");break}case"fixed-column-width":{o.style.tableLayout==="fixed"?o.style.tableLayout="auto":(o.style.tableLayout="fixed",o.style.wordBreak="break-all");break}case"border-color":{t.style.borderColor=C,g>0&&o.rows[g-1].cells[h]&&(o.rows[g-1].cells[h].style.borderBottomColor=C),g<o.rows.length-1&&o.rows[g+1].cells[h]&&(o.rows[g+1].cells[h].style.borderTopColor=C),h>0&&o.rows[g].cells[h-1]&&(o.rows[g].cells[h-1].style.borderRightColor=C),h<o.rows[g].cells.length-1&&o.rows[g].cells[h+1]&&(o.rows[g].cells[h+1].style.borderLeftColor=C);break}case"background-color":{t.style.backgroundColor=C;break}case"row-background-color":{let v=t.parentElement;for(let w=0;w<v.cells.length;w++)v.cells[w].style.backgroundColor=C;break}case"column-background-color":{for(let v=0;v<o.rows.length;v++){let w=o.rows[v].cells[h];w&&(w.style.backgroundColor=C)}break}case"cell-width":{for(let v=0;v<o.rows.length;v++){let w=o.rows[v].cells[h];w&&(w.style.width=C)}break}case"cell-height":{t.parentElement.style.height=C;break}case"cell-padding":{t.style.padding=C;break}}}});let m=document.createElement("div");m.className="table-resizer",m.style.width=a.width+"px",m.style.height=a.height+"px",m.style.top=a.top+"px",m.style.left=a.left+"px";let b=document.createElement("button");b.className="table-resizer-btn",b.style.top=a.bottom-6+"px",b.style.left=a.right-6+"px",b.addEventListener("mousedown",d),b.addEventListener("touchstart",d),m.appendChild(b),n.elements.table=o,n.elements.tableResizer=m,n.elements.tableResizerBtn=b,n.resizerHandler=f=>lt(e,n),n.elements.iframeWindow.addEventListener("scroll",n.resizerHandler),n.elements.iframeWindow.body.appendChild(m)},lt=(t,e)=>{if(e.elements.tableResizerBtn){if(!e.elements.editor.contains(e.elements.table))return te(t,e);let n=e.elements.table.getBoundingClientRect();e.elements.tableResizer.style.width=n.width+"px",e.elements.tableResizer.style.height=n.height+"px",e.elements.tableResizer.style.top=n.top+"px",e.elements.tableResizer.style.left=n.left+"px",e.elements.tableResizerBtn.style.top=n.bottom-6+"px",e.elements.tableResizerBtn.style.left=n.right-6+"px"}},te=(t,e)=>{e.elements.table&&e.tableColumnResizeHandlers&&(e.elements.table.removeEventListener("mousemove",e.tableColumnResizeHandlers.mousemove),e.elements.table.removeEventListener("mousedown",e.tableColumnResizeHandlers.mousedown),e.elements.table.removeEventListener("touchstart",e.tableColumnResizeHandlers.touchstart),e.elements.table.style.cursor="",delete e.tableColumnResizeHandlers),e.elements.resizerPlugin&&e.elements.toolbarContainer.removeChild(e.elements.resizerPlugin),e.elements.tableResizer&&e.elements.iframeWindow.body.removeChild(e.elements.tableResizer),e.elements.iframeWindow.removeEventListener("scroll",e.resizerHandler,!1),delete e.elements.resizerPlugin,delete e.resizerHandler,delete e.elements.table,delete e.elements.tableResizer,delete e.elements.tableResizerBtn},Se=(t,e,n)=>{var o,a;switch(e){case"disabled":t.getAttribute("data-type")==="button"?(t.disabled=!0,t.classList.add("disabled")):t.getAttribute("data-type")==="dropdown"||t.getAttribute("data-type")==="select"?(t.childNodes[0].disabled=!0,t.childNodes[0].classList.add("disabled")):t.getAttribute("data-type")==="color"?(t.childNodes[0].disabled=!0,t.classList.add("disabled")):t.getAttribute("data-type")==="button-select"&&t.querySelectorAll("button").forEach(s=>{s.disabled=!0,s.classList.add("disabled")});break;case"enabled":t.getAttribute("data-type")==="button"?(t.disabled=!1,t.classList.remove("disabled")):t.getAttribute("data-type")==="dropdown"||t.getAttribute("data-type")==="select"?(t.childNodes[0].disabled=!1,t.childNodes[0].classList.remove("disabled")):t.getAttribute("data-type")==="color"?(t.childNodes[0].disabled=!1,t.classList.remove("disabled")):t.getAttribute("data-type")==="button-select"&&t.querySelectorAll("button").forEach(s=>{s.disabled=!1,s.classList.remove("disabled")});break;case"active":t.getAttribute("data-type")==="button"?t.classList.add("active"):t.getAttribute("data-type")==="dropdown"||t.getAttribute("data-type")==="select"?t.childNodes[0].classList.add("active"):t.getAttribute("data-type")==="color"?t.classList.add("active"):t.getAttribute("data-type")==="button-select"&&((o=t.querySelector('button[data-type="button"]'))==null||o.classList.add("active"));break;case"inactive":t.getAttribute("data-type")==="button"?t.classList.remove("active"):t.getAttribute("data-type")==="dropdown"||t.getAttribute("data-type")==="select"?t.childNodes[0].classList.remove("active"):t.getAttribute("data-type")==="color"?t.classList.remove("active"):t.getAttribute("data-type")==="button-select"&&((a=t.querySelector('button[data-type="button"]'))==null||a.classList.remove("active"));break;case"font":t.childNodes[0].childNodes[0].childNodes[0].innerHTML=ae[n]?ae[n]:n||"Font";break;case"font-size":t.childNodes[0].childNodes[0].childNodes[0].innerHTML=Fe[n]?Fe[n]:n||"Font-Size";break;case"format-block":t.childNodes[0].childNodes[0].childNodes[0].innerHTML=vt[n]??"Format";break;case"font_color":t.childNodes[0].value=n||"#000000";break;case"highlight_color":t.childNodes[0].value=n||"#ffffff";break;case"icon":t.innerHTML=n}},K=(t,e,n=[])=>{Object.keys(t.elements.toolbar).forEach(o=>{t.elements.toolbar[o].forEach(a=>{n.includes(o)||Se(a,e)})})},S=(t,e,n=[])=>{Object.keys(t.elements.toolbar).forEach(o=>{n.includes(o)&&t.elements.toolbar[o].forEach(a=>{Se(a,e)})})},V=(t,e,n)=>{var o;(o=t.elements.toolbar[e])==null||o.forEach(a=>{Se(a,e,n)})},He=(t,e,n)=>{var o;(o=t.elements.toolbar[e])==null||o.forEach(a=>{Se(a,"icon",n)})},ve=t=>`#${t.match(/\d+/g).map(n=>{let o=parseInt(n).toString(16);return o.length===1?"0"+o:o}).join("")} `.slice(0,7),Zt=t=>{for(let e in ze){let n=t.match(ze[e]);if(n)return{platform:e,id:n[1]}}return{platform:null,id:null}},Wt=(t,e)=>{if(!ye[t]||!e)return null;let n=window.location.hostname;switch(t){case"INSTAGRAM":case"THREADS":return`${ye[t]}${e}/embed`;case"REDDIT":return`${ye[t]}${e}/?ref_source=embed&ref=share`;case"TWITCH":case"TWITCH_CHANNEL":return`${ye[t]}${e}&parent=${n}&autoplay=false&time=0h0m0s`;default:return`${ye[t]}${e}`}},zt=(t,e,n,o,a)=>{let s=t.getAttribute("href"),i=document.createElement("div");i.id="anchor-popover",i.style.position="absolute",i.style.top="0",i.style.left="0",i.style.padding="8px",i.style.background="white",i.style.border="1px solid #ccc",i.style.borderRadius="6px",i.style.boxShadow="0px 4px 8px rgba(0,0,0,0.2)",i.style.zIndex="1000",i.style.display="flex",i.style.alignItems="center",i.style.gap="5px",i.style.whiteSpace="nowrap",i.style.maxWidth="300px",i.style.visibility="hidden";let l=document.createElement("div");l.textContent=s,l.style.textDecoration="none",l.style.color="#007bff",l.style.padding="5px",l.style.overflow="hidden",l.style.textOverflow="ellipsis",l.style.webkitBoxOrient="vertical",l.style.webkitLineClamp="1",l.style.maxWidth="250px",l.style.wordBreak="break-word",l.style.cursor="pointer",l.onclick=()=>a.onLinkClick(s);let c=document.createElement("span");c.innerHTML=L.EDIT_LINK,c.style.padding="5px",c.title="Edit link",c.onclick=m=>Sn(m,a,o);let d=document.createElement("span");d.innerHTML=L.COPY_LINK,d.style.padding="5px",d.title="Copy link",d.onclick=m=>navigator.clipboard.writeText(s);let p=document.createElement("span");p.innerHTML=L.DELETE_LINK,p.style.padding="5px",p.title="Remove link",p.onclick=m=>On(m,t,a),i.append(l,d,c,p);let u=a.elements.iframeWindow.body;u.appendChild(i),requestAnimationFrame(()=>{let m=i.getBoundingClientRect(),b=u.getBoundingClientRect(),f=u.scrollLeft,C=u.scrollTop,g=e+f+5,h=n+C+5,x=b.right-e,y=e-b.left,E=b.bottom-n,T=n-b.top;E<m.height&&T>=m.height?h=n+C-m.height-5:E<m.height&&(h=Math.max(0,n+C-m.height)),x<m.width&&y>=m.width?g=e+f-m.width-5:x<m.width&&(g=Math.max(0,e+f-m.width)),g=Math.max(5,Math.min(g,u.scrollWidth-m.width-5)),h=Math.max(5,Math.min(h,u.scrollHeight-m.height-5)),i.style.left=`${g}px`,i.style.top=`${h}px`,i.style.visibility="visible"}),a.elements.anchorPopover=i;let r=m=>{(!i.contains(m.target)||m.key==="Escape")&&(ie(a),document.removeEventListener("click",r),document.removeEventListener("keydown",r),document.removeEventListener("scroll",r,!0))};document.addEventListener("click",r),document.addEventListener("keydown",r),document.addEventListener("scroll",r,!0)},Sn=(t,e,n)=>{if(t.stopPropagation(),!e.elements.selectedElement||e.elements.selectedElement.tagName!=="A"){console.warn("No anchor tag selected for editing.");return}let o=e.elements.selectedElement,a=o.getAttribute("href")||"",s=o.innerText||"",i=document.createElement("div"),l=document.createElement("label");l.innerText="Link",l.style.display="block",l.style.paddingLeft="4px";let c=document.createElement("input");c.value=a,c.type="text",c.placeholder="Insert link, mail, phone no";let d=document.createElement("label");d.innerText="Link Text",d.style.display="block",d.style.marginTop="8px",d.style.paddingLeft="4px";let p=document.createElement("input");p.value=s,p.type="text",p.placeholder="Link text";let u=document.createElement("span");u.className="warning",i.append(l,c,u,d,p);let r=document.createElement("div"),m=document.createElement("button");m.type="button",m.className="submit",m.innerText="Update",r.append(m);let b=we({title:"Edit Link",bodyNode:i,footerNode:r},e,n);c.focus();let f=C=>{C.key==="Enter"&&(C.preventDefault(),m.click())};c.addEventListener("keydown",f),p.addEventListener("keydown",f),m.onclick=()=>{let C=c.value.trim(),g=p.value.trim();F.URL.test(C)?(o.setAttribute("href",C),o.innerText=g||C,b.close()):u.innerText="Invalid URL"},ie(e),e.updateCaretPosition()},On=(t,e,n)=>{t.stopPropagation();let o=n.elements.selectedElement.innerHTML;n.elements.selectedElement.outerHTML=o,ie(n)},ie=t=>{t.elements.anchorPopover&&(t.elements.anchorPopover.style.display="none",delete t.elements.anchorPopover)};function At(t,e,n){let o=document.createRange();return o.selectNodeContents(t),o.setEnd(e,n),o.toString().length}var he=(t,e)=>{let n=document.createTreeWalker(t,NodeFilter.SHOW_TEXT,null,!1),o,a=0;for(;o=n.nextNode();){let s=o.textContent.length;if(a+s>=e)return{node:o,offset:e-a};a+=s}return null},_n=(t,e)=>{let n=[],o=document.createTreeWalker(t,NodeFilter.SHOW_TEXT,null,!1),a;for(;a=o.nextNode();){let s=document.createRange();if(s.selectNodeContents(a),e.compareBoundaryPoints(Range.END_TO_START,s)>=0||e.compareBoundaryPoints(Range.START_TO_END,s)<=0)continue;let i=a===e.startContainer?e.startOffset:0,l=a===e.endContainer?e.endOffset:a.textContent.length,c=document.createRange();c.setStart(a,i),c.setEnd(a,l),Array.from(c.getClientRects()).forEach(d=>n.push(d)),c.detach()}return n},Bn=(t,e,n,o)=>{let a=o.getBoundingClientRect();_n(t,e).forEach(i=>{let l=document.createElement("div");l.style.position="absolute",l.style.left=`${i.left-a.left}px`,l.style.top=`${i.top-a.top}px`,l.style.width=i.width+"px",l.style.height=i.height+"px",l.style.background=n+"33",o.appendChild(l)})},rt=(t,e,n,o)=>{let{id:a,color:s,name:i}=e,{startIndex:l,endIndex:c,cursorIndex:d,isCollapsed:p}=n;t.state.remoteCursors=t.state.remoteCursors||{},t.state.remoteCursors[e.id]={user:e,data:n,tabId:o};let u=t.elements.editor,r=t.elements.editorCursor;if(!u||!r)return;let m=r.querySelector(`#remote-overlay-${a}`);m&&m.remove();let b=document.createElement("div");if(b.id=`remote-overlay-${a}`,b.style.position="absolute",b.style.pointerEvents="none",!p){let f=document.createRange(),C=he(u,l),g=he(u,c);f.setStart(C.node,C.offset),f.setEnd(g.node,g.offset),Bn(u,f,s,b)}if(typeof d=="number"){u.innerText.trim()===""&&(u.innerHTML="<div>\u200B</div>");let f=he(u,d);if(!f)return;let C=document.createRange();C.setStart(f.node,f.offset),C.collapse(!0);let g=r.getBoundingClientRect(),h=C.getBoundingClientRect(),x=h.left-g.left+r.scrollLeft,y=h.top-g.top+r.scrollTop,E=document.createElement("div");E.style.position="absolute",E.style.left=`${x}px`,E.style.top=`${y}px`,E.style.width="2px",E.style.height=h.height+"px",E.style.backgroundColor=s,E.style.borderRadius="1px";let T=document.createElement("div");T.style.fontSize="12px",T.style.color="white",T.style.backgroundColor=s,T.style.borderRadius="4px 4px 0 0",T.style.padding="0 4px",T.style.position="absolute",T.style.whiteSpace="nowrap",T.style.left=`${x}px`,T.style.top=`${y-10}px`,T.innerText=i,b.appendChild(T),b.appendChild(E)}r.appendChild(b)},Pn=(t,e)=>{let n=t.elements.editor,o=t.elements.iframeWindow.getSelection();if(!o||!n||o.rangeCount===0)return;let a=o.getRangeAt(0);if(!n.contains(a.startContainer)||!n.contains(a.endContainer))return;let s=(p,u)=>{let r=t.elements.iframeWindow.createRange();return r.selectNodeContents(n),r.setEnd(p,u),r.toString().length},i=s(a.startContainer,a.startOffset),l=s(a.endContainer,a.endOffset),d=(()=>{let p=o.anchorNode.compareDocumentPosition(o.focusNode);return p===0?o.anchorOffset>o.focusOffset:p===Node.DOCUMENT_POSITION_PRECEDING})()?i:l;t.cursor={startIndex:i,endIndex:l,cursorIndex:d,isCollapsed:a.collapsed},t.onLocalSyncChanges({type:"cursor:open",cursor:t.cursor,tabId:t.state.currentTabId})},$t=Nt(Pn,200),Vn=t=>{t.state.previousDOM||(t.state.previousDOM=t.elements.editor.cloneNode(!0));let e=t.elements.editor.cloneNode(!0),n=It.diff(t.state.previousDOM,e);n.length>0&&(t.onLocalSyncChanges({type:"diff",diff:{diffs:n},tabId:t.state.currentTabId}),t.state.previousDOM=e)},Ft=ke(Vn,50),dt=(t,e,n=null)=>{let o=n??t.elements.editor,a=t.elements.iframeWindow;if(!o||!(e!=null&&e.diffs))return;let s=a.getSelection(),i=null;if(!n&&s&&s.rangeCount>0){let l=s.getRangeAt(0);o.contains(l.startContainer)&&o.contains(l.endContainer)&&(i={start:At(o,l.startContainer,l.startOffset),end:At(o,l.endContainer,l.endOffset),startNode:l.startContainer,startOffset:l.startOffset,endNode:l.endContainer,endOffset:l.endOffset})}requestAnimationFrame(()=>{var c;let l=e.diffs.filter(d=>!(d.action==="modifyAttribute"&&["contenteditable","spellcheck","class"].includes(d.name)));if(i){for(let d of l)if(d.action==="modifyTextElement"&&d.route){let p=o;for(let u of d.route)if(p=(c=p==null?void 0:p.childNodes)==null?void 0:c[u],!p)break;if(p&&p===i.startNode){let u=d.oldValue??"",r=d.newValue??"",m=0;for(;m<u.length&&m<r.length&&u[m]===r[m];)m++;let b=r.length-u.length;m<=i.startOffset&&(i.startOffset=Math.max(0,i.startOffset+b)),m<=i.endOffset&&(i.endOffset=Math.max(0,i.endOffset+b))}}}if(It.apply(o,l),!n)if(t.state.previousDOM=o.cloneNode(!0),i)if(o.contains(i.startNode)&&o.contains(i.endNode))try{let d=a.createRange();d.setStart(i.startNode,i.startOffset),d.setEnd(i.endNode,i.endOffset);let p=a.getSelection();p&&(p.removeAllRanges(),p.addRange(d))}catch{let d=he(o,i.start),p=he(o,i.end);if(d&&p){let u=a.createRange();u.setStart(d.node,d.offset),u.setEnd(p.node,p.offset);let r=a.getSelection();r&&(r.removeAllRanges(),r.addRange(u))}}else{let d=he(o,i.start),p=he(o,i.end);if(d&&p){let u=a.createRange();u.setStart(d.node,d.offset),u.setEnd(p.node,p.offset);let r=a.getSelection();r&&(r.removeAllRanges(),r.addRange(u))}}else{let d=a.createRange();d.setStart(o,0),d.collapse(!0);let p=a.getSelection();p&&(p.removeAllRanges(),p.addRange(d))}})},Ut=t=>{let e=t.trim(),n=F.URL.test(e),o=F.MAILTO.test(e),a=F.TEL.test(e);return n||o||a},Gt=t=>{let e=t.trim();return F.EMAIL.test(e)?"mailto:"+e:F.MOBILE.test(e)?"tel:"+e:e},ct=(t=[])=>t.flatMap(e=>[{key:e.name,isCategory:!0},...e.fields.map(n=>({key:n.name,value:n.value}))]);function Le(t,e=document.body){if(!t)return null;if(typeof t=="number")return t;let n=document.createElement("div");n.style.width=t,n.style.position="absolute",n.style.visibility="hidden",e.appendChild(n);let o=n.getBoundingClientRect().width;return n.remove(),o}var Oe=(t,e)=>{if(e.autoHeight){let n=t.elements.editor.scrollHeight,o=Le(e.minHeight,t.elements.iframeContainer.parentElement),a=Le(e.maxHeight,t.elements.iframeContainer.parentElement);o!=null&&(n=Math.max(n,o)),a!=null&&(n=Math.min(n,a)),t.elements.iframeContainer.style.height=n+"px"}},_e=t=>{let e=(t==null?void 0:t.nodeType)===Node.ELEMENT_NODE?t:t==null?void 0:t.parentElement;return e==null?void 0:e.closest("td, th")},Yt=(t,e)=>{let n=document.createElement(e);Array.from(t.childNodes).forEach(s=>{s.nodeType===Node.ELEMENT_NODE&&["UL","OL"].includes(s.tagName)||n.appendChild(s)}),n.childNodes.length||(n.innerHTML="<br>");let a=Array.from(t.children).find(s=>["UL","OL"].includes(s.tagName));return t.insertBefore(n,a||null),n},jt=(t,e)=>{let n=t.elements.iframeWindow.getSelection(),o=n!=null&&n.rangeCount?n.getRangeAt(0).startContainer:null,a=(o==null?void 0:o.nodeType)===Node.ELEMENT_NODE?o:o==null?void 0:o.parentElement,s=a==null?void 0:a.closest("li");if(!s||!t.elements.editor.contains(s))return!1;let i=a.closest(qe.join(",")),l=i&&i.closest("li")===s,c,d=(p,u)=>{let r=document.createRange(),m=p.elements.iframeWindow.getSelection();r.selectNodeContents(u),r.collapse(!1),m.removeAllRanges(),m.addRange(r)};if(e==="p"){if(l){let p=document.createDocumentFragment();for(;i.firstChild;)p.appendChild(i.firstChild);s.insertBefore(p,i),i.remove()}return d(t,s),!0}return l?(c=document.createElement(e),c.innerHTML=i.innerHTML||"<br>",i.replaceWith(c)):c=Yt(s,e),d(t,c),!0},Ae=t=>{t.elements.editor.querySelectorAll("h1, h2, h3, h4, h5, h6").forEach(e=>{let n=Array.from(e.children).filter(s=>["UL","OL"].includes(s.tagName));if(!n.length)return;let o=e.tagName.toLowerCase(),a=document.createDocumentFragment();if(n.forEach(s=>{s.querySelectorAll("li").forEach(i=>{Array.from(i.children).some(c=>qe.includes(c.tagName))||Yt(i,o)}),a.appendChild(s)}),e.parentNode.insertBefore(a,e),e.textContent.replace(/\u200B/g,"").trim()||e.querySelector("img, br")){let s=document.createElement("p");s.innerHTML=e.innerHTML,e.replaceWith(s)}else e.remove()})},Xt=(t,e)=>{if(t.key!==" ")return;e.updateCaretPosition();let n=e.state.range;if(!n)return;let o=n.startContainer;if(o.nodeType!==Node.TEXT_NODE)return;let a=o.nodeValue.replace(/\u00A0/g," ");if(o.parentNode.closest("li"))return;let s=_e(o);if(a+t.key==="* "||a+t.key==="- ")if(t.preventDefault(),o.nodeValue=a.slice(0,-1),s){let i=document.createElement("ul"),l=document.createElement("li"),c=document.createTextNode("\xA0");l.appendChild(c),i.appendChild(l),s.innerHTML="",s.appendChild(i);let d=document.createRange();d.setStart(c,1),d.collapse(!0),e.state.selection.removeAllRanges(),e.state.selection.addRange(d)}else{let i=document.createRange();i.setStart(o,o.nodeValue.length),i.setEnd(o,o.nodeValue.length),e.state.selection.removeAllRanges(),e.state.selection.addRange(i),pt(e)}},qt=(t,e)=>{let n=e.state.range.startContainer;if(n.nodeType===Node.TEXT_NODE){let o=n.nodeValue.replace(/\u00A0/g," ");if(!n.parentNode.closest("li")&&o==="1. "){let s=_e(n);if(o=o.slice(0,-3),n.nodeValue=o,s){let i=document.createElement("ol"),l=document.createElement("li"),c=document.createTextNode("\xA0");l.appendChild(c),i.appendChild(l),s.innerHTML="",s.appendChild(i);let d=document.createRange();d.setStart(c,1),d.collapse(!0),e.state.selection.removeAllRanges(),e.state.selection.addRange(d)}else{let i=document.createRange();i.setStart(n,o.length),i.setEnd(n,o.length),e.state.selection.removeAllRanges(),e.state.selection.addRange(i),mt(e)}}}},Kt=(t,e)=>{if(t.key!==" ")return;e.updateCaretPosition();let o=e.state.range.startContainer;if(o.nodeType!==Node.TEXT_NODE)return;let a=o.nodeValue.replace(/\u00A0/g," "),s=a+t.key;if(!["# ","## ","### ","#### ","##### ","###### "].includes(s))return;t.preventDefault();let l=s.trim().length,c=_e(o);if(o.nodeValue=a.slice(0,-l),c){let d=document.createElement(`h${l}`);d.innerHTML="&nbsp;",c.innerHTML="",c.appendChild(d);let p=document.createRange();p.setStart(d,0),p.collapse(!0),e.state.selection.removeAllRanges(),e.state.selection.addRange(p)}else e.elements.iframeWindow.execCommand("formatBlock",!1,`h${l}`);e.elements.editor.focus(),e.updateCaretPosition(),V(e,"format-block",`h${l}`)},Qt=(t,e)=>{if(t.key!==" ")return;e.updateCaretPosition();let o=e.state.range.startContainer;if(o.nodeType!==Node.TEXT_NODE)return;let a=o.nodeValue.replace(/\u00A0/g," ");if(a+t.key!=="> ")return;t.preventDefault(),o.nodeValue=a.slice(0,-1);let s=_e(o);if(s){let i=document.createElement("blockquote");i.innerHTML="&nbsp;",s.innerHTML="",s.appendChild(i);let l=document.createRange();l.setStart(i,0),l.collapse(!0),e.state.selection.removeAllRanges(),e.state.selection.addRange(l)}else e.elements.iframeWindow.execCommand("formatBlock",!1,"blockquote");e.elements.editor.focus(),e.updateCaretPosition()},Jt=(t,e)=>{if(t.key!=="~"||(e.updateCaretPosition(),!e.state.range))return;let n=e.state.range,o=n.startContainer;if(o.nodeType!==Node.TEXT_NODE)return;let a=o.nodeValue.replace(/\u00A0/g," "),s=n.startOffset,l=(a.slice(0,s)+t.key).match(/~~([^~]+)~~$/);if(!l)return;t.preventDefault();let c=l[1],d=l.index,p=d+l[0].length-1,u=document.createRange();u.setStart(o,d),u.setEnd(o,p),u.deleteContents();let r=document.createElement("strike");r.textContent=c,u.insertNode(r);let m=document.createTextNode("\u200B");r.nextSibling?r.parentNode.insertBefore(m,r.nextSibling):r.parentNode.appendChild(m);let b=document.createRange();b.setStart(m,1),b.setEnd(m,1);let f=e.state.selection;f.removeAllRanges(),f.addRange(b),e.updateCaretPosition(),S(e,"inactive",["strike"])},en=(t,e)=>{if(t.key!=="`"||(e.updateCaretPosition(),!e.state.range))return;let n=e.state.range,o=n.startContainer;if(o.nodeType!==Node.TEXT_NODE)return;let a=o.nodeValue.replace(/\u00A0/g," "),s=n.startOffset,l=(a.slice(0,s)+t.key).match(/`([^`]+)`$/);if(!l)return;t.preventDefault();let c=l[1],d=l.index,p=d+l[0].length-1,u=document.createRange();u.setStart(o,d),u.setEnd(o,p),u.deleteContents();let r=document.createElement("code");r.textContent=c,u.insertNode(r);let m=document.createTextNode("\u200B");r.nextSibling?r.parentNode.insertBefore(m,r.nextSibling):r.parentNode.appendChild(m);let b=document.createRange();b.setStart(m,1),b.setEnd(m,1);let f=e.state.selection;f.removeAllRanges(),f.addRange(b),e.updateCaretPosition()},tn=t=>{var a;let e=0,n=t.parentElement,o=n.tagName;for(;n&&n.tagName===o;)e++,n=(a=n.parentElement)==null?void 0:a.closest(o);return e},nn=(t,e)=>{let n;t.tagName==="OL"?n=Ke[(e-1)%Ke.length]:t.tagName==="UL"&&(n=Qe[(e-1)%Qe.length]),n&&t.setAttribute("type",n)},Dn=(t,e)=>{let n=t.previousElementSibling;if(!n)return;let a=t.parentElement.tagName,s=n.querySelector(`:scope > ${a}`);s||(s=document.createElement(a),n.appendChild(s)),s.appendChild(t);let i=e.elements.iframeWindow.getSelection(),l=document.createRange();if(l.selectNodeContents(t),l.collapse(!0),i.removeAllRanges(),i.addRange(l),e.elements.editor.focus(),e.updateCaretPosition(),a==="OL"||a==="UL"){let c=tn(t);nn(s,c)}},Zn=(t,e)=>{let n=t.parentElement,o=n.closest("li");if(!o)return;o.after(t);let a=e.elements.iframeWindow.getSelection(),s=document.createRange();if(s.selectNodeContents(t),s.collapse(!0),a.removeAllRanges(),a.addRange(s),e.elements.editor.focus(),e.updateCaretPosition(),n.children.length===0&&n.remove(),t.parentElement.tagName==="OL"||t.parentElement.tagName==="UL"){let i=tn(t);nn(t.parentElement,i)}},on=t=>{let e=t.textContent.replace(/\u200B/g,"").trim(),n=t.children.length===1&&t.querySelector("ul, ol"),o=t.querySelector("img, iframe, audio, video, table, hr, figure");return e===""&&!n&&!o},sn=(t,e)=>{if(t.defaultPrevented){delete e.state.pendingListSelectionDeletion;return}if(!["Backspace","Delete"].includes(t.key)){delete e.state.pendingListSelectionDeletion;return}let n=e.elements.iframeWindow.getSelection();if(!(n!=null&&n.rangeCount))return;let o=n.getRangeAt(0);if(o.collapsed){delete e.state.pendingListSelectionDeletion;return}let a=p=>p?p.nodeType===Node.ELEMENT_NODE?p:p.parentElement:null,s=a(o.startContainer),i=a(o.endContainer),l=s==null?void 0:s.closest("li"),c=i==null?void 0:i.closest("li");if(!l||!c||l===c){delete e.state.pendingListSelectionDeletion;return}let d=[];if(e.elements.editor.querySelectorAll("li").forEach(p=>{o.intersectsNode(p)&&d.push(p)}),d.length<2){delete e.state.pendingListSelectionDeletion;return}e.state.pendingListSelectionDeletion={listItems:d,lists:Array.from(new Set(d.map(p=>p.parentElement).filter(Boolean)))}},an=t=>{let e=t.state.pendingListSelectionDeletion;if(!e)return!1;delete t.state.pendingListSelectionDeletion;let n=!1,o=new Set(e.lists);if(e.listItems.forEach(a=>{if(!a.isConnected||!t.elements.editor.contains(a)||!on(a))return;let s=a.parentElement;s&&o.add(s),a.remove(),n=!0}),Array.from(o).reverse().forEach(a=>{!(a!=null&&a.isConnected)||!t.elements.editor.contains(a)||a.querySelector("li")||(a.remove(),n=!0)}),n){!t.elements.editor.textContent.replace(/\u200B/g,"").trim()&&!t.elements.editor.querySelector("img, iframe, audio, video, table, hr, figure")&&(t.elements.editor.innerHTML="<div><br></div>");let a=t.elements.iframeWindow.getSelection();if(!(a!=null&&a.rangeCount)||!t.elements.editor.contains(a.anchorNode)){let s=document.createRange(),i=t.elements.iframeWindow.getSelection();s.selectNodeContents(t.elements.editor),s.collapse(!1),i.removeAllRanges(),i.addRange(s)}t.updateCaretPosition()}return n},ln=(t,e)=>{if(t.key!=="Tab")return;let n=e.elements.iframeWindow.getSelection();if(!n.rangeCount)return;let o=n.getRangeAt(0),a=o.startOffset===0,s=o.commonAncestorContainer;s.nodeType===Node.TEXT_NODE&&(s=s.parentElement);let i=s.closest("ul, ol");if(!i)return;let l=i.querySelectorAll("li"),c=[];l.forEach(d=>{o.intersectsNode(d)&&c.push(d)}),c.length&&(!t.shiftKey&&c.some(p=>!on(p))&&!a||(t.preventDefault(),c.forEach(d=>{t.shiftKey?Zn(d,e):Dn(d,e)})))},Wn=(t,e)=>e==="upper_case"?t.toUpperCase():e==="lower_case"?t.toLowerCase():e==="title_case"?t.toLowerCase().replace(/\b\w/g,n=>n.toUpperCase()):t,Be=(t,e)=>{let n=t.state.range;if(!n)return;let o=n.startContainer,a=n.startOffset,s=n.endContainer,i=n.endOffset,l=(p,u,r)=>{let m=p.nodeValue,b=Wn(m.slice(u,r),e);p.nodeValue=m.slice(0,u)+b+m.slice(r),p===s&&(i=u+b.length)};if(n.commonAncestorContainer.nodeType===Node.TEXT_NODE)l(n.commonAncestorContainer,n.startOffset,n.endOffset);else{let p=t.elements.iframeWindow.createNodeIterator(n.commonAncestorContainer,NodeFilter.SHOW_TEXT,{acceptNode:m=>n.intersectsNode(m)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}),u=[],r;for(;r=p.nextNode();)u.push(r);u.forEach(m=>{let b=0,f=m.nodeValue.length;m===n.startContainer&&(b=n.startOffset),m===n.endContainer&&(f=n.endOffset),l(m,b,f)})}let c=t.elements.iframeWindow.createRange();c.setStart(o,a),c.setEnd(s,i);let d=t.elements.iframeWindow.getSelection();d.removeAllRanges(),d.addRange(c)},zn=t=>(t.dataset.leksyHeadingId||(t.dataset.leksyHeadingId=Rn()),t.dataset.leksyHeadingId),rn=(t,e)=>{if(!e)return;let n=t.elements.iframeWindow.querySelector(`[data-leksy-heading-id="${e}"]`);if(!n)return;n.scrollIntoView({behavior:"smooth",block:"center"});let o=document.createRange();o.selectNodeContents(n),o.collapse(!0);let a=t.elements.iframeWindow.getSelection();a.removeAllRanges(),a.addRange(o),t.elements.editor.focus(),t.updateCaretPosition()},dn=t=>{let e=t.elements.editor,n=e.querySelectorAll("h1, h2, h3, h4, h5, h6");if(!n.length)return;let o=document.createElement("div");o.contentEditable="false",o.dataset.leksyElement="toc",o.style.border="1px solid gray",o.style.display="inline-block",o.style.width="100%",o.style.boxSizing="border-box",o.style.borderRadius="4px";let a=document.createElement("div");a.innerText="Table of Contents",a.style.fontWeight="bold",a.style.marginBottom="8px",a.style.borderBottom="1px solid gray",a.style.padding="8px 12px",o.appendChild(a);let s=document.createElement("ul");s.style.listStyle="none",s.style.padding="8px 12px",s.style.margin="0",n.forEach(c=>{let d=zn(c),p=Number(c.tagName[1]),u=document.createElement("li");u.style.marginBottom="4px",u.style.marginLeft=`${(p-1)*15}px`,u.style.color="var(--link-color)",u.style.cursor="pointer",u.textContent=c.textContent,u.dataset.leksyTocHeadingId=d,s.appendChild(u)}),o.appendChild(s);let i=t.elements.iframeWindow.getSelection();if(!i.rangeCount)return;let l=i.getRangeAt(0);if(l.collapsed){let c=l.startContainer;c.nodeType===Node.TEXT_NODE&&(c=c.parentElement);let d=c.closest("p, div, h1, h2, h3, h4, h5, h6, blockquote, pre, li");d?d.insertAdjacentElement("afterend",o):e.appendChild(o);let p=document.createElement("p");p.innerHTML="<br>",o.after(p);let u=document.createRange();u.setStart(p,0),u.collapse(!0),i.removeAllRanges(),i.addRange(u)}else{l.deleteContents(),l.insertNode(o),e.querySelectorAll("li").forEach(p=>{!p.textContent.replace(/\u00A0/g,"").trim()&&!p.querySelector("img, video, table, ul, ol, iframe, blockquote")&&p.remove()});let c=document.createElement("p");c.innerHTML="<br>",o.after(c);let d=document.createRange();d.setStart(c,0),d.collapse(!0),i.removeAllRanges(),i.addRange(d)}t.updateCaretPosition()};function st(t,e,n,o){if(!e.showTabs||!n.showOutlines||n.tabId!==t.state.currentTabId)return;o.innerHTML="",t.elements.editor.querySelectorAll("h1, h2, h3, h4, h5, h6").forEach(i=>{var d;if(!((d=i.textContent)!=null&&d.trim()))return;let l=Number(i.tagName[1]),c=document.createElement("div");c.className="outline-item",c.textContent=i.textContent,c.style.paddingLeft=`${(l-1)*12+8}px`,c.onclick=()=>{o.querySelectorAll(".outline-item").forEach(r=>{r.classList.remove("active")}),c.classList.add("active"),i.scrollIntoView({behavior:"smooth",block:"center"});let p=document.createRange();p.selectNodeContents(i),p.collapse(!0);let u=t.elements.iframeWindow.getSelection();u.removeAllRanges(),u.addRange(p),t.elements.editor.focus(),t.updateCaretPosition()},o.appendChild(c)})}function Pe(t,e,n){if(!e.showTabs||!n&&(n=t.elements.tabs[t.state.currentTabId].querySelector(".outline-items"),!n))return;let o=t.state.range,a=o==null?void 0:o.startContainer;if(!a)return;let s=n.querySelectorAll(".outline-item"),l=t.elements.editor.querySelectorAll("h1, h2, h3, h4, h5, h6");s.forEach(c=>c.classList.remove("active")),l.forEach((c,d)=>{var p;c.contains(a)&&((p=s[d])==null||p.classList.add("active"))})}var cn=ke((t,e)=>{if(!e.showTabs)return;let n=P(t.state.tabs,t.state.currentTabId);if(!n)return;let o=t.elements.tabs[n.tabId].querySelector(".outline-items");o&&(st(t,e,n,o),Pe(t,e,o))},300),Ve=(t,e,n)=>{if(!e.enableFindAndReplace||t.state.findAndReplaceModalOpen)return;t.state.findAndReplaceModalOpen=!0;let o=t.elements.editor,a=t.elements.iframeWindow,s=document.createElement("div");s.style.display="flex",s.style.gap="15px",s.style.alignItems="center";let i=document.createElement("button");i.type="button",i.innerText="Find",i.className="leksy-editor-find-and-replace-modal-tab-btn";let l=document.createElement("button");l.type="button",l.innerText="Replace",l.className="leksy-editor-find-and-replace-modal-tab-btn",s.append(i,l);let c=document.createElement("div"),d=document.createElement("label");d.innerText="Find",d.style.paddingLeft="4px";let p=document.createElement("div");p.style.position="relative",p.style.marginBottom="10px";let u=document.createElement("input");u.type="text",u.placeholder="Search text",u.style.width="100%",u.style.boxSizing="border-box",u.style.paddingRight="60px";let r=document.createElement("span");r.className="leksy-editor-find-and-replace-modal-count",p.append(u,r);let m=document.createElement("label");m.innerText="Replace with",m.style.display="block",m.style.paddingLeft="4px";let b=document.createElement("input");b.type="text",b.placeholder="Replace text",b.style.marginBottom="10px";let f=document.createElement("div");f.style.marginBottom="10px",f.style.display="flex",f.style.flexDirection="column";let C=document.createElement("div"),g=document.createElement("input");g.type="checkbox",g.id="match-case-opt",g.style.marginRight="5px",g.style.width="24px";let h=document.createElement("label");h.innerText="Match case",h.htmlFor="match-case-opt",h.style.userSelect="none",C.append(g,h);let x=document.createElement("div"),y=document.createElement("input");y.type="checkbox",y.id="whole-word-opt",y.style.marginRight="5px",y.style.width="24px";let E=document.createElement("label");E.innerText="Whole word",E.htmlFor="whole-word-opt",E.style.userSelect="none",x.append(y,E);let T=document.createElement("div"),v=document.createElement("input");v.type="checkbox",v.id="use-regex-opt",v.style.marginRight="5px",v.style.width="24px";let w=document.createElement("label");w.innerText="Use regular expressions",w.htmlFor="use-regex-opt",w.style.userSelect="none",T.append(v,w),f.append(C,T,x);let k=document.createElement("span");k.className="warning",c.append(d,p,m,b,f,k);let R=document.createElement("div");R.style.display="flex",R.style.gap="8px",R.style.justifyContent="flex-end",R.style.width="100%";let H=document.createElement("button");H.type="button",H.className="submit",H.innerText="Previous";let M=document.createElement("button");M.type="button",M.className="submit",M.innerText="Next";let I=document.createElement("button");I.type="button",I.className="submit",I.innerText="Replace";let N=document.createElement("button");N.type="button",N.className="submit",N.innerText="Replace All",R.append(H,M,I,N);let _=D=>{D==="find"?(m.style.display="none",b.style.display="none",I.style.display="none",N.style.display="none",i.classList.add("active"),l.classList.remove("active")):(m.style.display="block",b.style.display="block",I.style.display="flex",N.style.display="flex",l.classList.add("active"),i.classList.remove("active"))};i.onclick=()=>_("find"),l.onclick=()=>_("replace"),Mn({title:s,bodyNode:c,footerNode:R,onClose:()=>{t.state.findAndReplaceModalOpen=!1}},t,e),n.key==="f"?_("find"):_("replace"),u.focus();let $=D=>{var ht;let ne=u.value,fe=g.checked,xe=v.checked,oe=y.checked;if(k.innerText="",r.innerText="",!ne){k.innerText="Please enter text to find";return}let Q=ne;if(!xe){let q=(oe?ne.trim():ne).replace(/[.*+?^${}()|[\]\\]/g,"\\$&");Q=oe?`(?<!\\w)${q}(?!\\w)`:q}let G=a.getSelection(),X;try{let W=fe?"g":"gi";X=new RegExp(Q,W)}catch{k.innerText="Invalid regular expression";return}let U=t.elements.iframeWindow.createTreeWalker(o,NodeFilter.SHOW_TEXT,null),Z=[],J,Y=0;for(;J=U.nextNode();){let W=J.nodeValue;X.lastIndex=0;let q;for(;(q=X.exec(W))!==null;)Z.push({node:J,start:q.index,end:q.index+q[0].length,globalStart:Y+q.index});Y+=W.length}if(!Z.length){r.innerText="0 of 0";return}let O=0;if(G.rangeCount>0){let W=G.getRangeAt(0),q=t.elements.iframeWindow.createTreeWalker(o,NodeFilter.SHOW_TEXT,null),Ze,gt=0;for(;Ze=q.nextNode();){if(Ze===W.startContainer){O=gt+W.startOffset;break}gt+=Ze.nodeValue.length}}let j=-1;if(D==="next")j=Z.findIndex(W=>W.globalStart>O),j===-1&&(j=0);else{for(let W=Z.length-1;W>=0;W--)if(Z[W].globalStart<O){j=W;break}j===-1&&(j=Z.length-1)}let de=Z[j],De=t.elements.iframeWindow.createRange();De.setStart(de.node,de.start),De.setEnd(de.node,de.end),G.removeAllRanges(),G.addRange(De),(ht=de.node.parentElement)==null||ht.scrollIntoView({block:"center",behavior:"smooth"}),r.innerText=`${j+1} of ${Z.length}`},le=()=>{let D=u.value,ne=b.value,fe=g.checked,xe=v.checked,oe=y.checked;if(!D)return;let Q=D;if(!xe){let O=(oe?D.trim():D).replace(/[.*+?^${}()|[\]\\]/g,"\\$&");Q=oe?`(?<!\\w)${O}(?!\\w)`:O}let G;try{G=new RegExp(Q,fe?"":"i")}catch{return}let X=a.getSelection();if(!X.rangeCount){$("next");return}let U=X.getRangeAt(0),Z=U.toString(),J=Z.match(G);if(J&&J[0]===Z){let Y=Z.replace(G,ne);U.deleteContents(),U.insertNode(t.elements.iframeWindow.createTextNode(Y)),U.setStart(U.endContainer,U.endOffset),X.removeAllRanges(),X.addRange(U)}$("next")},re=()=>{let D=u.value,ne=b.value,fe=g.checked,xe=v.checked,oe=y.checked;if(!D)return;let Q=D;if(!xe){let O=(oe?D.trim():D).replace(/[.*+?^${}()|[\]\\]/g,"\\$&");Q=oe?`(?<!\\w)${O}(?!\\w)`:O}let G;try{G=new RegExp(Q,fe?"g":"gi")}catch{return}let X=t.elements.iframeWindow.createTreeWalker(o,NodeFilter.SHOW_TEXT,null),U=[],Z;for(;Z=X.nextNode();){let Y=Z.nodeValue;G.lastIndex=0;let O;for(;(O=G.exec(Y))!==null;)U.push({node:Z,start:O.index,end:O.index+O[0].length,original:O[0]})}let J=0;for(let Y=U.length-1;Y>=0;Y--){let O=U[Y],j=O.node.nodeValue,de=O.original.replace(new RegExp(Q,fe?"":"i"),ne);O.node.nodeValue=j.slice(0,O.start)+de+j.slice(O.end),J++}k.innerText=`Replaced ${J} occurrences.`,$("next")};H.onclick=()=>$("prev"),M.onclick=()=>$("next"),I.onclick=le,N.onclick=re;let fn=D=>{D.key==="Enter"&&(D.preventDefault(),$("next"))};u.addEventListener("keydown",fn)},$n=(t,e)=>{let n=t.cloneRange();return n.selectNodeContents(e),n.setEnd(t.startContainer,t.startOffset),n.toString().length===0},mn=(t,e)=>{if(t.key!=="Backspace")return;let n=e.elements.iframeWindow.getSelection();if(!n.rangeCount)return;let o=n.getRangeAt(0);if(!o.collapsed)return;let a=o.startContainer;a.nodeType===Node.TEXT_NODE&&(a=a.parentElement);let s=a.closest("li");if(!s||!e.elements.editor.contains(s))return;let i=s.querySelector("ul, ol");if(!i||!$n(o,s))return;t.preventDefault();let l=s.parentElement,c=s.previousElementSibling,d=s.cloneNode(!0),p=d.querySelector("ul, ol");p&&p.remove();let u=d.textContent.replace(/\u200B/g,"").trim(),r=document.createDocumentFragment(),m=Array.from(i.children);if(m.forEach(b=>r.appendChild(b)),c){u.length>0&&c.appendChild(document.createTextNode(u)),m.length>0&&l.insertBefore(r,s),s.remove();let b=document.createRange();b.selectNodeContents(c),b.collapse(!1),n.removeAllRanges(),n.addRange(b)}else{let b=document.createElement("span");b.textContent=u||"",l.parentElement.insertBefore(b,l),m.length>0&&l.insertBefore(r,s),s.remove();let f=document.createRange();f.selectNodeContents(b),f.collapse(!0),n.removeAllRanges(),n.addRange(f)}e.updateCaretPosition()},pn=t=>{let e=0;for(let n=0;n<t.length;n++)e=t.charCodeAt(n)+((e<<5)-e);return Je[Math.abs(e)%Je.length]};var ge=(t,e)=>{t.elements.editor.focus(),t.elements.iframeWindow.execCommand(e),t.updateCaretPosition(),t.elements.iframeWindow.queryCommandState(e)?S(t,"active",[e]):S(t,"inactive",[e])},hn=(t,{command:e,activePlugin:n,inactivePlugin:o})=>{t.elements.iframeWindow.execCommand(e),Ae(t),t.elements.editor.focus(),t.updateCaretPosition();let a=t.elements.iframeWindow.queryCommandState(e);S(t,a?"active":"inactive",[n]),S(t,"inactive",[o])},mt=t=>hn(t,{command:"insertOrderedList",activePlugin:"ordered_list",inactivePlugin:"unordered_list"}),pt=t=>hn(t,{command:"insertUnorderedList",activePlugin:"unordered_list",inactivePlugin:"ordered_list"}),un=(t,e)=>{let n=new Set(["DIV","P","H1","H2","H3","H4","H5","H6","LI","BLOCKQUOTE","PRE"]),o=[];for(let a of t.childNodes)a.nodeType===Node.ELEMENT_NODE&&n.has(a.tagName)&&e.intersectsNode(a)&&o.push(a);if(o.length===0){let a=e.commonAncestorContainer;for(;a&&a!==t;){if(a.nodeType===Node.ELEMENT_NODE&&n.has(a.tagName)){o.push(a);break}a=a.parentNode}}return o},Fn={undo:{title:"Undo",icon:L.UNDO,type:"button",click:(t,e)=>{e.history.undo(),e.updateCaretPosition(),e.elements.editor.focus()}},redo:{title:"Redo",icon:L.REDO,type:"button",click:(t,e)=>{e.history.redo(),e.updateCaretPosition(),e.elements.editor.focus()}},bold:{title:"Bold",icon:L.BOLD,type:"button",click:(t,e)=>{ge(e,"bold")}},underline:{title:"Underline",icon:L.UNDERLINE,type:"button",click:(t,e)=>{ge(e,"underline")}},italic:{title:"Italic",icon:L.ITALIC,type:"button",click:(t,e)=>{ge(e,"italic")}},strike:{title:"Strike",icon:L.STRIKE,type:"button",click:(t,e)=>{e.elements.editor.focus(),e.elements.iframeWindow.execCommand("strikeThrough"),e.updateCaretPosition(),e.elements.iframeWindow.queryCommandState("strikeThrough")?S(e,"active",["strike"]):S(e,"inactive",["strike"])}},align_justify:{title:"Align Justify",icon:L.ALIGN_JUSTIFY,type:"button",click:(t,e)=>{var n;e.elements.editor.focus(),e.elements.iframeWindow.execCommand("justifyFull"),(n=e.resizerHandler)==null||n.call(e),e.updateCaretPosition(),S(e,"active",["align_justify"]),S(e,"inactive",["align_left","align_right","align_center"])}},align_left:{title:"Align Left",icon:L.ALIGN_LEFT,type:"button",click:(t,e)=>{var n;e.elements.editor.focus(),e.elements.iframeWindow.execCommand("justifyLeft"),(n=e.resizerHandler)==null||n.call(e),e.updateCaretPosition(),S(e,"active",["align_left"]),S(e,"inactive",["align_justify","align_right","align_center"])}},align_right:{title:"Align Right",icon:L.ALIGN_RIGHT,type:"button",click:(t,e)=>{var n;e.elements.editor.focus(),e.elements.iframeWindow.execCommand("justifyRight"),(n=e.resizerHandler)==null||n.call(e),e.updateCaretPosition(),S(e,"active",["align_right"]),S(e,"inactive",["align_justify","align_left","align_center"])}},align_center:{title:"Align Center",icon:L.ALIGN_CENTER,type:"button",click:(t,e)=>{var n;e.elements.editor.focus(),e.elements.iframeWindow.execCommand("justifyCenter"),(n=e.resizerHandler)==null||n.call(e),e.updateCaretPosition(),S(e,"active",["align_center"]),S(e,"inactive",["align_justify","align_left","align_right"])}},code_view:{title:"Code View",icon:L.CODE_VIEW,type:"button",click:(t,e,n)=>{if(e.state.isCodeViewOpen){e.elements.codeview.style.display="none",e.elements.iframeContainer.style.display="block",e.elements.stepper&&(e.elements.stepper.style.display="flex");let o=Ee(e.elements.codeview.value,n,e);e.onChange(o),e.elements.editor.innerHTML=o,e.elements.editor.focus(),K(e,"enabled")}else e.hidePlaceholder(),e.elements.iframeContainer.style.display="none",e.elements.stepper&&(e.elements.stepper.style.display="none"),e.elements.codeview.value=e.html,e.elements.codeview.style.display="block",e.elements.codeview.focus(),K(e,"disabled",["code_view"]);e.state.isCodeViewOpen=!e.state.isCodeViewOpen,e.updateCaretPosition()}},remove_format:{title:"Remove Format",icon:L.REMOVE_FORMAT,type:"button",click:(t,e)=>{e.elements.iframeWindow.execCommand("removeFormat"),e.elements.editor.focus(),e.updateCaretPosition()}},subscript:{title:"Sub Script",icon:L.SUBSCRIPT,type:"button",click:(t,e)=>{e.elements.editor.focus(),e.elements.iframeWindow.execCommand("subscript"),e.updateCaretPosition(),e.elements.iframeWindow.queryCommandState("subscript")?S(e,"active",["subscript"]):S(e,"inactive",["subscript"]),S(e,"inactive",["superscript"])}},superscript:{title:"Super Script",icon:L.SUPERSCRIPT,type:"button",click:(t,e)=>{e.elements.editor.focus(),e.elements.iframeWindow.execCommand("superscript"),e.updateCaretPosition(),e.elements.iframeWindow.queryCommandState("superscript")?S(e,"active",["superscript"]):S(e,"inactive",["superscript"]),S(e,"inactive",["subscript"])}},font:{title:"Font",icon:"Font",type:"select",options:Object.keys(ae).map(t=>({label:ae[t],value:t})),width:"140px",click:(t,e,n)=>{e.elements.editor.focus(),e.elements.iframeWindow.execCommand("fontName",!1,t),e.updateCaretPosition(),V(e,"font",t)}},"font-size":{title:"Font Size",icon:"Font Size",type:"select",options:Object.keys($e).map(t=>({label:$e[t],value:t})),width:"100px",click:(t,e,n)=>{e.elements.editor.focus(),e.elements.iframeWindow.execCommand("fontSize",!1,parseInt(t)),e.updateCaretPosition(),V(e,"font-size",t)}},"format-block":{title:"Format Block",icon:"Format",type:"select",options:Object.keys(Ue).map(t=>({label:Ue[t],value:t})),width:"110px",click:(t,e,n)=>{e.elements.editor.focus(),jt(e,t)||e.elements.iframeWindow.execCommand("formatBlock",!1,t),Ae(e),e.updateCaretPosition(),V(e,"format-block",t)}},ordered_list:{title:"Ordered List",icon:L.LIST_NUMBER,type:"button-select",options:Object.keys(Ye).map(t=>({label:Ye[t],value:t})),click:(t,e,n)=>{e.elements.editor.focus(),e.elements.iframeWindow.queryCommandState("insertOrderedList")||(e.elements.iframeWindow.execCommand("insertOrderedList"),Ae(e));let a=e.elements.iframeWindow.getSelection();if(a.rangeCount>0){let s=a.anchorNode;for(;s&&s.nodeName!=="OL"&&s!==e.elements.editor;)s=s.parentNode;(s==null?void 0:s.nodeName)==="OL"&&s.setAttribute("type",t)}e.updateCaretPosition(),S(e,"active",["ordered_list"]),S(e,"inactive",["unordered_list"])},mainClick:(t,e,n)=>{e.elements.editor.focus(),mt(e)}},unordered_list:{title:"Unordered List",icon:L.LIST_BULLETS,type:"button-select",options:Object.keys(je).map(t=>({label:je[t],value:t})),click:(t,e,n)=>{e.elements.editor.focus(),e.elements.iframeWindow.queryCommandState("insertUnorderedList")||(e.elements.iframeWindow.execCommand("insertUnorderedList"),Ae(e));let a=e.elements.iframeWindow.getSelection();if(a.rangeCount>0){let s=a.anchorNode;for(;s&&s.nodeName!=="UL"&&s!==e.elements.editor;)s=s.parentNode;(s==null?void 0:s.nodeName)==="UL"&&(s.style.listStyleType=t)}e.updateCaretPosition(),S(e,"active",["unordered_list"]),S(e,"inactive",["ordered_list"])},mainClick:(t,e,n)=>{e.elements.editor.focus(),pt(e)}},line_height:{title:"Line Height",icon:L.LINE_HEIGHT,type:"dropdown",options:[{label:"Normal",value:"normal"},{label:"1.0",value:"1.0"},{label:"1.5",value:"1.5"},{label:"2.0",value:"2.0"},{label:"2.5",value:"2.5"},{label:"3.0",value:"3.0"}],click:(t,e,n)=>{e.elements.editor.focus();let i=e.elements.iframeWindow.getSelection().getRangeAt(0).commonAncestorContainer;for(;i&&i.nodeType===Node.TEXT_NODE;)i=i.parentNode;i&&i!==e.elements.editor&&(i.style.lineHeight=t.target.getAttribute("data-value")),e.updateCaretPosition()}},font_color:{title:"Font color",icon:L.FONT_COLOR,type:"color",change:(t,e,n)=>{e.elements.editor.focus(),e.elements.iframeWindow.execCommand("foreColor",!1,t.target.value),e.updateCaretPosition()}},remove_font_color:{title:"Remove Font Color",icon:`${L.REMOVE_FORMAT}${L.FONT_COLOR}`,type:"reset-color",click:(t,e,n)=>{if(!e.state.range)return;e.elements.editor.focus();let o=document.createElement("div"),a=e.state.range.cloneContents();if(o.appendChild(a),o.innerHTML===o.innerText){let i=e.state.range.startContainer.parentElement;i.removeAttribute("color"),i.style.removeProperty("color")}else o.querySelectorAll("[style]").forEach(i=>{i.style.removeProperty("color"),i.getAttribute("style")||i.removeAttribute("style")}),o.querySelectorAll("font[color]").forEach(i=>{i.removeAttribute("color")});e.state.range.deleteContents();let s=document.createDocumentFragment();Array.from(o.childNodes).forEach(i=>{s.appendChild(i)}),e.state.range.insertNode(s),e.updateCaretPosition()}},highlight_color:{title:"Highlight Color",icon:L.HIGHLIGHT_COLOR,type:"color",change:(t,e,n)=>{e.elements.editor.focus(),e.elements.iframeWindow.execCommand("hiliteColor",!1,t.target.value),e.updateCaretPosition()}},remove_highlight_color:{title:"Remove Highlight Color",icon:`${L.REMOVE_FORMAT}${L.HIGHLIGHT_COLOR}`,type:"reset-color",click:(t,e,n)=>{e.elements.editor.focus(),e.elements.iframeWindow.execCommand("hiliteColor",!1,"transparent"),e.updateCaretPosition()}},text_style:{title:"Text Style",icon:L.TEXT_STYLE,type:"dropdown",options:[{label:"Block Quote",value:"blockquote"},{label:"Code",value:"code"},{label:"Translucent",value:"translucent"},{label:"Shadow",value:"shadow"},{label:"Upper Case",value:"upper_case"},{label:"Lower Case",value:"lower_case"},{label:"Title Case",value:"title_case"},{label:"Button (Green)",value:"button_green"},{label:"Button (Black)",value:"button_black"}],click:(t,e,n)=>{if(e.state.range){switch(t.target.getAttribute("data-value")){case"code":{let o=document.createElement("code");o.textContent=e.state.range.toString(),e.state.range.deleteContents(),e.state.range.insertNode(o);break}case"translucent":{let o=document.createElement("span");o.textContent=e.state.range.toString(),o.style.backgroundColor="rgba(200, 151, 231, 0.3)",e.state.range.deleteContents(),e.state.range.insertNode(o);break}case"shadow":{let o=document.createElement("span");o.textContent=e.state.range.toString(),o.style.textShadow="2px 2px 4px rgba(0, 0, 0, 0.3)",e.state.range.deleteContents(),e.state.range.insertNode(o);break}case"blockquote":{let o=document.createElement("blockquote");o.textContent=e.state.range.toString(),e.state.range.deleteContents(),e.state.range.insertNode(o);break}case"upper_case":{Be(e,"upper_case");break}case"lower_case":{Be(e,"lower_case");break}case"title_case":{Be(e,"title_case");break}case"button_green":{e.updateCaretPosition();let o=document.createElement("span");o.textContent=e.state.range.toString(),o.style.cssText="background-color: #28a745; color: white; font-weight: bold; padding: 8px; border-radius: 4px; text-decoration: none; display: inline-block; cursor: pointer;",o.contentEditable="false";let a=e.state.range.commonAncestorContainer;a.nodeType===Node.TEXT_NODE&&(a=a.parentElement),a.nodeName==="A"?a.style.cssText="background-color: #28a745; color: white; font-weight: bold; padding: 8px; border-radius: 4px; text-decoration: none; display: inline-block; cursor: pointer;":o.textContent&&!["TR","TBODY","THEAD","TABLE"].includes(a.nodeName)&&(e.state.range.deleteContents(),e.state.range.insertNode(o));break}case"button_black":{e.updateCaretPosition();let o=document.createElement("span");o.textContent=e.state.range.toString(),o.style.cssText="background-color: black; color: white; font-weight: bold; padding: 8px; border-radius: 4px; text-decoration: none; display: inline-block; cursor: pointer;",o.contentEditable="false";let a=e.state.range.commonAncestorContainer;a.nodeType===Node.TEXT_NODE&&(a=a.parentElement),a.nodeName==="A"?a.style.cssText="background-color: black; color: white; font-weight: bold; padding: 8px; border-radius: 4px; text-decoration: none; display: inline-block; cursor: pointer;":o.textContent&&!["TR","TBODY","THEAD","TABLE"].includes(a.nodeName)&&(e.state.range.deleteContents(),e.state.range.insertNode(o));break}}e.elements.editor.focus(),e.updateCaretPosition()}}},paragraph_style:{title:"Paragraph Style",icon:L.PARAGRAPH_STYLE,type:"dropdown",options:[{label:"Spaced",value:"letter-spacing: 2px;"},{label:"Neon",value:"color: #FD7500; text-shadow: 0 0 5px #02B59F,0 0 10px #022422,0 0 15px #FF9F03,0 0 20px #02B59F,0 0 25px #017562;font-weight: bold;"},{label:"Bordered",value:"border: 2px solid black; padding: 5px;"}],click:(t,e,n)=>{e.elements.editor.focus();let i=e.elements.iframeWindow.getSelection().getRangeAt(0).commonAncestorContainer;for(;i&&i.nodeType===Node.TEXT_NODE;)i=i.parentNode;i&&i!==e.elements.editor&&(i.style.cssText=t.target.getAttribute("data-value")),e.updateCaretPosition()}},outdent:{title:"Outdent",icon:L.OUTDENT,type:"button",click:(t,e,n)=>{if(!e.state.range)return;let o=e.elements.editor,a=o.closest('[style*="overflow"]')??o.parentElement,s=(a==null?void 0:a.scrollTop)??0;un(o,e.state.range).forEach(l=>{let c=parseInt(l.style.marginLeft||"0",10);l.style.marginLeft=Math.max(0,c-40)+"px"}),e.updateCaretPosition(),o.focus({preventScroll:!0}),a&&(a.scrollTop=s)}},indent:{title:"Indent",icon:L.INDENT,type:"button",click:(t,e,n)=>{if(!e.state.range)return;let o=e.elements.editor,a=o.closest('[style*="overflow"]')??o.parentElement,s=(a==null?void 0:a.scrollTop)??0,i=o.getBoundingClientRect().width;un(o,e.state.range).forEach(c=>{let d=parseInt(c.style.marginLeft||"0",10),p=Math.max(0,i-100);c.style.marginLeft=Math.min(p,d+40)+"px"}),e.updateCaretPosition(),o.focus({preventScroll:!0}),a&&(a.scrollTop=s)}},link:{title:"Link",icon:L.LINK,type:"button",click:(t,e,n)=>{let o=C=>{C.key==="Enter"&&(C.preventDefault(),b.click())},a="",s="",i=!1;if(e.elements.selectedElement&&e.elements.selectedElement.tagName==="IMG"){let C=e.elements.selectedElement;if(C){let g=C.parentNode;g.nodeName==="A"&&(a=g.href,s=C.alt||"",i=!0)}}else if(e.state.range&&e.state.selection.rangeCount>0){let h=e.state.range.commonAncestorContainer;h.nodeType===Node.TEXT_NODE&&(h=h.parentNode),h.nodeName==="A"&&(a=h.getAttribute("href"),s=h.innerText||"",i=!0)}let l=document.createElement("div"),c=document.createElement("label");c.innerText="Link",c.style.display="block",c.style.paddingLeft="4px";let d=document.createElement("input");d.value=a,d.type="text",d.placeholder="Insert link, mail, phone no",d.addEventListener("keydown",o);let p=document.createElement("label");p.innerText="Link Text",p.style.display="block",p.style.paddingLeft="4px",p.style.marginTop="8px";let u=document.createElement("input");u.value=s,u.type="text",u.placeholder="Link text",u.addEventListener("keydown",o);let r=document.createElement("span");r.className="warning",l.append(c,d,r,p,u);let m=document.createElement("div"),b=document.createElement("button");b.type="button",b.className="submit",b.innerText="Add",m.append(b);let f=we({title:"Link",bodyNode:l,footerNode:m},e,n);d.focus(),b.onclick=()=>{let C=Gt(d.value),g=u.value;if(Ut(C)){if(i){if(e.elements.selectedElement&&e.elements.selectedElement.tagName==="IMG"){let h=e.elements.selectedElement;if(h){let x=h.parentNode;x.nodeName==="A"&&(x.href=C,h.alt=g)}}else if(e.state.range&&e.state.selection.rangeCount>0){let y=e.state.range.commonAncestorContainer;y.nodeType===Node.TEXT_NODE&&(y=y.parentNode),y.nodeName==="A"&&(y.setAttribute("href",C),y.innerText=g)}}else if(e.elements.selectedElement&&e.elements.selectedElement.tagName==="IMG"){let h=document.createElement("a");h.href=C,h.target="_blank",e.elements.selectedElement.parentNode.insertBefore(h,e.elements.selectedElement),h.appendChild(e.elements.selectedElement),e.elements.selectedElement.alt=g}else{let h=document.createElement("a");h.href=C,h.target="_blank",h.textContent=g||C,e.insertNode(h)}f.close(),e.elements.editor.focus()}else r.innerText="Invalid URL"},e.updateCaretPosition()}},unlink:{title:"Unlink",icon:L.UNLINK,type:"button",click:(t,e,n)=>{e.elements.iframeWindow.execCommand("unlink"),e.elements.editor.focus(),e.updateCaretPosition()}},horizontal_rule:{title:"Horizontal Rule",icon:L.HORIZONTAL_RULE,type:"button",click:(t,e,n)=>{e.elements.iframeWindow.execCommand("insertHorizontalRule"),e.elements.editor.focus(),e.updateCaretPosition()}},table:{title:"Table",icon:L.TABLE,type:"table",create:(t,e,{rows:n,cols:o,header:a})=>{let s=document.createElement("table");s.style.borderCollapse="collapse",s.style.width=t.elements.editor.offsetWidth-50+"px";for(let i=0;i<=n;i++){let l=document.createElement("tr");for(let c=0;c<=o;c++){let d=i===0&&a?document.createElement("th"):document.createElement("td");d.style.border="1px solid black",d.appendChild(document.createTextNode("\xA0")),l.appendChild(d)}s.appendChild(l)}t.insertNode(s),t.elements.editor.focus(),t.updateCaretPosition()}},mention:{title:"Mention",icon:L.MENTION,type:"mention"},emoji:{title:"Emoji",icon:L.EMOJI,type:"category",categories:yt},special_character:{title:"Special Character",icon:L.SPECIAL_CHARACTER,type:"category",categories:Ct},pexels:{title:"Pexels",icon:L.PEXELS,type:"gallery",suggestions:async(t,e)=>tt.suggestions(t,e),search:async(t,e,n)=>tt.search(t,e,n)},giphy:{title:"GIPHY",icon:L.GIPHY_SVG,type:"gallery",suggestions:async(t,e)=>et.suggestions(t,e),search:async(t,e,n)=>et.search(t,e,n)},tenor:{title:"Tenor",icon:L.TENOR,type:"gallery",suggestions:async(t,e)=>nt.suggestions(t,e),search:async(t,e)=>nt.search(t,e)},image:{title:"Image",icon:L.IMAGE,type:"dropdown",options:[{label:"Upload from device",value:"upload"},{label:"Using Link",value:"link"}],click:async(t,e,n)=>{if(t.target.getAttribute("data-value")==="upload"){let o=x=>{x.key==="Enter"&&(x.preventDefault(),C.click())},a=document.createElement("div");a.style.display="flex",a.style.gap="16px";let s=document.createElement("div");s.style.display="flex",s.style.flexDirection="column",s.style.gap="16px",s.style.flex="1";let i=document.createElement("div");i.className=`${n.classPrefix}${A.UPLOAD_IMG_BOX}`,i.innerHTML=`
421
421
  <div style="text-align: center; color: #6b7280;">
422
422
  <div style="font-size: 32px; font-weight: 500;">+</div>
423
423
  <div style="font-size: 14px;">Click to browse files</div>
424
424
  </div>
425
- `;let l=document.createElement("input");l.type="file",l.accept=se.IMAGE,l.style.display="none",i.addEventListener("click",()=>l.click()),s.append(i,l);let d=document.createElement("div");d.style.display="flex",d.style.flexDirection="column",d.style.flex="1";let m=document.createElement("div");m.className=`${n.classPrefix}${A.UPLOAD_IMG_PREVIEW_BOX}`;let u=document.createElement("img");u.className=`${n.classPrefix}${A.UPLOAD_IMG_PREVIEW}`,u.style.display="none",m.append(u),d.append(m),a.append(s,d);let r=document.createElement("div");r.className="warning";let c=document.createElement("label");c.innerText="Image Description (Alt Text)",c.style.display="block",c.style.paddingLeft="4px",c.style.marginTop="4px",c.style.marginBottom="4px";let p=document.createElement("input");p.type="text",p.placeholder="Alternative Text",p.addEventListener("keydown",o);let g=document.createElement("div");g.append(a,r,c,p);let f=document.createElement("div");f.style.display="flex",f.style.justifyContent="space-between",f.style.alignItems="center";let b=document.createElement("button");b.type="button",b.className="submit",b.innerText="Add",f.append(b);let y=ve({title:"Upload Image",bodyNode:g,footerNode:f},e,n),h="";l.addEventListener("change",x=>{let C=x.target.files[0];if(C&&se.IMAGE.includes(C.type)){let E=new FileReader;E.onload=()=>{h=E.result,u.src=h,u.style.display="block"},E.readAsDataURL(C),r.innerText=""}}),l.addEventListener("click",async()=>{let x=await e.handleFilePicker(se.IMAGE.split(","),"image");x&&(h=x.data,fileNameSpan.innerText=x.name,u.src=h,u.style.display="block",r.innerText="")}),b.onclick=async()=>{if(!h){r.innerText="Image not selected";return}b.disabled=!0;let x=b.innerText;b.innerHTML=` <span style="margin-left: 8px;">${x}</span> ${L.SPINNER}`;let C=document.createElement("img");C.src=await e.manuplateImage("base64",h),C.alt=p.value||"",b.innerText=x,e.insertNode(C),y.close()}}else if(t.target.getAttribute("data-value")==="link"){let o=p=>{p.key==="Enter"&&(p.preventDefault(),r.click())},a=document.createElement("div"),s=document.createElement("label");s.innerText="Link",s.style.display="block",s.style.paddingLeft="4px";let i=document.createElement("input");i.value="",i.type="text",i.placeholder="Insert the link",i.addEventListener("keydown",o);let l=document.createElement("label");l.innerText="Alternative Text",l.style.display="block",l.style.marginTop="8px",l.style.paddingLeft="4px";let d=document.createElement("input");d.value="",d.style.marginTop="4px",d.type="text",d.placeholder="Alternative Text",d.addEventListener("keydown",o);let m=document.createElement("span");m.className="warning",a.append(s,i,m,l,d);let u=document.createElement("div"),r=document.createElement("button");r.type="button",r.className="submit",r.innerText="Add",u.append(r);let c=ve({title:"Image",bodyNode:a,footerNode:u},e,n);r.onclick=()=>{let p=i.value;if(F.URL.test(p)){r.disabled=!0;let g=document.createElement("img");g.src=p,g.alt=d.value,e.insertNode(g),c.close()}else m.innerText="Invalid url"}}e.elements.editor.focus(),e.updateCaretPosition()}},video:{title:"Video",icon:L.VIDEO,type:"button",click:(t,e)=>{let n=document.createElement("input");n.type="file",n.accept=se.VIDEO,n.style.display="none",n.addEventListener("change",async o=>{let a=o.target.files[0];if(se.VIDEO.includes(a.type)){let s=await e.uploadVideo(a);if(s){let i=document.createElement("a");i.href=s.videoUrl,i.dataset.leksyPreview="video-url",i.target="_blank";let l=document.createElement("img");l.src=s.thumbnailUrl,i.appendChild(l),e.insertNode(i)}}}),n.addEventListener("click",async()=>{let o=await e.handleFilePicker(se.VIDEO.split(","),"video");if(o&&se.VIDEO.includes(o==null?void 0:o.type)){let a=await e.uploadVideo(o);if(a){let s=document.createElement("a");s.href=a.videoUrl,s.dataset.leksyPreview="video-url",s.target="_blank";let i=document.createElement("img");i.src=a.thumbnailUrl,s.appendChild(i),e.insertNode(s)}}}),n.click(),e.updateCaretPosition(),e.elements.editor.focus()}},attachment:{title:"Attachment",icon:L.ATTACHMENT,type:"button",click:(t,e)=>{let n=document.createElement("input");n.type="file",n.style.display="none",n.multiple=!0,n.addEventListener("change",o=>{e.onAttachment(o.target.files)}),n.addEventListener("click",async()=>{let o=await e.handleFilePicker(["*"],"attachment");o&&e.onAttachment(o)}),n.click(),e.updateCaretPosition()}},cut:{title:"Cut",icon:L.CUT,type:"button",click:(t,e)=>{if(!e.state.range)return;e.elements.editor.focus();let n=document.createElement("div");n.appendChild(e.state.range.cloneContents());let o=n.innerHTML,a=new ClipboardItem({"text/html":new Blob([o],{type:"text/html"})});navigator.clipboard.write([a]).then(()=>{e.state.range.deleteContents(),e.updateCaretPosition()})}},copy:{title:"Copy",icon:L.COPY,type:"button",click:(t,e)=>{if(!e.state.range)return;e.elements.editor.focus();let n=document.createElement("div");n.appendChild(e.state.range.cloneContents());let o=n.innerHTML,a=new ClipboardItem({"text/html":new Blob([o],{type:"text/html"})});navigator.clipboard.write([a]).then(()=>{e.updateCaretPosition()})}},paste:{title:"Paste",icon:L.PASTE,type:"button",click:async(t,e)=>{e.elements.editor.focus();let n=await navigator.clipboard.read(),o;for(let a of n)if(a.types.includes("text/html")){let s=await a.getType("text/html"),i=document.createElement("div");s&&(i.innerHTML=await s.text(),o=i);break}else if(a.types.includes("text/plain")){let i=await(await a.getType("text/plain")).text();o=document.createTextNode(i);break}else if(a.types.find(s=>s.startsWith("image/"))){let s=await a.getType(a.types.find(l=>l.startsWith("image/"))),i=new FileReader;i.onload=async function(l){let d=document.createElement("img"),m=l.target.result;d.src=await e.manuplateImage("base64",m),o=d},i.readAsDataURL(s);break}o&&(e.state.range.deleteContents(),e.insertNode(o)),e.updateCaretPosition()}},select_all:{title:"Select All",icon:L.SELECT_ALL,type:"button",click:(t,e)=>{e.elements.editor.focus(),e.elements.iframeWindow.execCommand("selectAll"),e.updateCaretPosition()}},fullscreen:{title:"Full screen",icon:L.FULLSCREEN,type:"button",click:(t,e)=>{let n=e.elements.base.classList.toggle("fullscreen");He(e,"fullscreen",n?L.FULLSCREEN_EXIT:L.FULLSCREEN)}},print:{title:"Print",icon:L.PRINT,type:"button",click:(t,e)=>{e.elements.iframeContainer.contentWindow.print()}},embed:{title:"Embed Link",icon:L.EMBED,type:"button",click:(t,e,n)=>{let o=f=>{f.key==="Enter"&&(f.preventDefault(),p.click())},a=document.createElement("div");a.className="link";let s=document.createElement("label");s.innerText="Embed URL",s.style.display="block",s.style.paddingLeft="4px";let i=document.createElement("input");i.type="text",i.placeholder="Enter Embed URL",i.style.marginBottom="10px",i.addEventListener("keydown",o);let l=document.createElement("label");l.innerText="Width",l.style.display="block",l.style.paddingLeft="4px";let d=document.createElement("input");d.type="text",d.placeholder="Width (px)",d.style.marginBottom="10px",d.value="400";let m=document.createElement("label");m.innerText="Height",m.style.display="block",m.style.paddingLeft="4px";let u=document.createElement("input");u.type="text",u.placeholder="Height (px)",u.style.marginBottom="10px",u.value="400";let r=document.createElement("span");r.className="warning",a.append(s,i,l,d,m,u,r);let c=document.createElement("div"),p=document.createElement("button");p.type="button",p.className="submit",p.innerText="Add",c.append(p);let g=ve({title:"Embed URL",bodyNode:a,footerNode:c},e,n);p.onclick=()=>{let f=i.value.trim(),{platform:b,id:y}=Dt(f);if(!b||!y){r.innerText="Invalid URL";return}let h=Zt(b,y);if(!h){r.innerText="Unsupported platform";return}let x=document.createElement("figure");x.className="iframe-wrapper",x.style.height=`${u.value}px`,x.style.width=`${d.value}px`;let C=document.createElement("iframe");C.src=h,C.style.display="inline-block",C.style.height="100%",C.style.width="100%",C.style.border="none",x.append(C),e.insertNode(x),g.close()},e.elements.editor.focus(),e.updateCaretPosition()}},table_of_content:{title:"Table of Content",icon:L.TABLE_OF_CONTENT,type:"button",click:(t,e,n)=>{rn(e,n)}},find_and_replace:{title:"Find And Replace",icon:L.FIND_AND_REPLACE,type:"button",click:(t,e,n)=>{Pe(e,n,{key:"f"})}}},un=$n;import{v4 as Fn}from"uuid";var pt=class{static create(e,n={}){if(!(e instanceof HTMLElement))throw Error(fe.INVALID_ELEMENT);e.innerHTML="",n.classPrefix||(n.classPrefix=A.PREFIX),n.placeholder||(n.placeholder=""),n.closePluginOnClick!==!1&&(n.closePluginOnClick=!0);let o=nt(n.value),a=o[0].tabId,s={elements:{base:e,toolbar:{},tabsContainer:null,tabs:{}},state:{isCodeViewOpen:!1,page:1,totalPages:null,next:null,tribute:null,tabs:o,currentTabId:a,runtimeDom:{}},html:o[0].content,cursor:{startIndex:0,endIndex:0,cursorIndex:0,isCollapsed:!1},history:{tabs:{[a]:{stack:[],currentIndex:-1}},push:ke(()=>{s.history.saveHistory()},300),saveHistory:()=>{var r;let l=s.elements.iframeWindow.getSelection(),d=null;if((l==null?void 0:l.rangeCount)>0){let c=l.getRangeAt(0),p=c.cloneRange();p.selectNodeContents(s.elements.editor),p.setEnd(c.endContainer,c.endOffset),d=p.toString().length}let m=s.elements.editor.innerHTML,u=s.history.tabs[s.state.currentTabId]||{stack:[],currentIndex:-1};s.history.tabs[s.state.currentTabId]||(s.history.tabs[s.state.currentTabId]=u),((r=u.stack[u.currentIndex])==null?void 0:r.html)!==m&&(u.stack=u.stack.slice(0,u.currentIndex+1),u.stack.push({caretOffset:d,html:m}),u.currentIndex++)},undo:()=>{let l=s.history.tabs[s.state.currentTabId];if(l&&l.currentIndex>0){l.currentIndex--;let{html:d,caretOffset:m}=l.stack[l.currentIndex];s.elements.editor.innerHTML=d,s.history.restoreCaretPosition(m)}},redo:()=>{let l=s.history.tabs[s.state.currentTabId];if(l&&l.currentIndex<l.stack.length-1){l.currentIndex++;let{html:d,caretOffset:m}=l.stack[l.currentIndex];s.elements.editor.innerHTML=d,s.history.restoreCaretPosition(m)}},restoreCaretPosition:l=>{let d=s.elements.iframeWindow.getSelection(),m=document.createRange(),u=0;function r(c){if(c.nodeType===3){let p=c.length;if(u+p>=l)return m.setStart(c,l-u),m.setEnd(c,l-u),d.removeAllRanges(),d.addRange(m),!0;u+=p}else if(c.nodeType===1){for(let p of c.childNodes)if(r(p))return!0}return!1}r(s.elements.editor)}},onChange:(l=s.elements.editor.innerHTML)=>{Se(s,n),it(n,s),(l==="<br>"||l==="<div><br></div>")&&(l=""),s.html=l;let d=P(s.state.tabs,s.state.currentTabId);d&&(d.content=l),s.state.runtimeDom[s.state.currentTabId]&&(s.state.runtimeDom[s.state.currentTabId].innerHTML=l),typeof i.onChange=="function"&&i.onChange(structuredClone(s.state.tabs)),l.trim()?s.hidePlaceholder():s.showPlaceholder(),s.history.push(),$t(s),dn(s,n)},onSave:()=>{i.onSave instanceof Function&&i.onSave()},onBlur:l=>{i.onBlur instanceof Function&&i.onBlur(l)},onAttachment:l=>{i.onAttachment instanceof Function&&i.onAttachment(l)},onLinkClick:l=>{i.onLinkClick instanceof Function&&i.onLinkClick(l)},manuplateImage:async(l,d)=>{if(i.manuplateImage instanceof Function){s.changeStatus("Loading...");let m=await i.manuplateImage(l,d)??d;return s.changeStatus(""),m}return d},handleFilePicker:async(l,d)=>i.handleFilePicker instanceof Function?await i.handleFilePicker(l,d):null,updateBreadcumb:l=>{!n.hideNavigation&&Array.isArray(l)&&(s.elements.breadcumb.innerHTML="",l.forEach(d=>{let m=document.createElement("li");m.innerText=d,s.elements.breadcumb.appendChild(m)}))},changeStatus:l=>{n.hideNavigation||(s.elements.status.innerText=l)},insertNode:l=>{s.state.range?(s.state.range.deleteContents(),s.state.range.insertNode(l),s.state.range.collapse(!1),s.state.selection.removeAllRanges(),s.state.selection.addRange(s.state.range)):s.elements.editor.appendChild(l)},uploadVideo:async l=>{if(i.uploadVideo instanceof Function){s.changeStatus("Loading..."),He(s,"video",L.LOADER);let d=await i.uploadVideo(l);return s.changeStatus(""),He(s,"video",L.VIDEO),d}},showPlaceholder:()=>{s.elements.placeholder.style.display="block"},hidePlaceholder:()=>{s.elements.placeholder.style.display="none"},updateCaretPosition:()=>{let l=s.elements.iframeWindow.getSelection(),d=[],m=[];if((l==null?void 0:l.rangeCount)!==0){let u=l.getRangeAt(0);s.state.selection=l,s.state.range=u,s.state.parentNode=u.commonAncestorContainer.parentNode;let r=u.commonAncestorContainer;for(r.nodeType===Node.TEXT_NODE&&(r=r.parentNode);r&&r!==s.elements.editor;)m.push(r),d.push(r.tagName),r=r.parentElement;d=d.reverse(),m=m.reverse(),s.updateBreadcumb(d)}return{parentTags:d,parentElements:m}},updateCursorPosition:()=>{zt(s,i)},onLocalSyncChanges:l=>{n.disabled&&l.type==="cursor:open"||i.onLocalSyncChanges instanceof Function&&i.onLocalSyncChanges(l)}},i={setContents:l=>{let d=nt(l);s.state.tabs=d,s.state.currentTabId=d[0].tabId,s.html=d[0].content,B(s,n),s.elements.editor.innerHTML=s.html,s.state.previousDOM=s.elements.editor.cloneNode(!0);let m=u=>{u.forEach(r=>{var c;if(!s.state.runtimeDom[r.tabId]){let p=s.elements.iframeWindow.createElement("div");p.className="content-editable",p.contentEditable=!n.disabled,p.spellcheck=!!n.spellcheck,p.innerHTML=r.content??"<div><br></div>",s.state.runtimeDom[r.tabId]=p,s.onLocalSyncChanges({type:"tabs:create",tabId:r.tabId,editorHTML:p.outerHTML})}(c=r.children)!=null&&c.length&&m(r.children)})};m(d),s.elements.editor.innerHTML=s.html,s.state.previousDOM=s.elements.editor.cloneNode(!0),Se(s,n)},getContents:()=>s.state.tabs,onChange:()=>{},onSave:()=>{},onBlur:()=>{},onAttachment:()=>{},onLinkClick:l=>{window.open(l,"_blank","noopener noreferrer")},manuplateImage:async()=>{},handleFilePicker:async()=>{},uploadVideo:async()=>{},focus:()=>{s.elements.editor.focus()},getCore:()=>s,updateHeight:l=>{s.elements.iframeContainer.style.setProperty("height",l)},setDisabled:l=>{n.disabled=l,s.elements.editor.contentEditable=!l,l?K(s,"disabled"):K(s,"enabled"),B(s,n)},updateCssVariables:l=>{let d={primary:"--primary",baseWhite:"--base-white",whiteDark:"--base-white-dark",shadow:"--shadow",resizer:"--resizer",resizerBackground:"--resizer-background",mention:"--mention",mentionHighlight:"--mention-highlight",dashedBorder:"--dashed-border",tableResizer:"--table-resizer",tableResizerOutline:"--table-resizer-outline",textColor:"--text-color",resizerPosition:"--resizer-position",resizerPositionBackground:"--resizer-position-background",linkColor:"--link-color",scrollbarThumb:"--scrollbar-thumb",scrollbarTrack:"--scrollbar-track"},m={...Ie,...l};Object.keys(d).forEach(u=>{let r=d[u],c=m[u];c!==void 0&&s.elements.iframeWindow.documentElement.style.setProperty(r,c)})},updateLabels:(l=[])=>{if(!s.state.tribute)return;let d=dt(l);s.state.tribute.append(0,d,!0)},getLocalCursor:()=>s.cursor,onLocalSyncChanges:()=>{},applyRemoteSyncChanges:l=>{var u,r,c,p;let{type:d,sequence:m}=l;switch(d){case"diff":{let g=P(s.state.tabs,s.state.currentTabId);if(l.tabId&&(g==null?void 0:g.tabId)!==l.tabId){if(!s.state.runtimeDom[l.tabId]){let b=P(s.state.tabs,l.tabId);if(b){let y=s.elements.iframeWindow.createElement("div");y.className="content-editable",y.contentEditable=!n.disabled,y.spellcheck=!!n.spellcheck,y.innerHTML=b.content||"<div><br></div>",s.state.runtimeDom[l.tabId]=y}}s.state.runtimeDom[l.tabId]&&rt(s,l.diff,s.state.runtimeDom[l.tabId]);return}rt(s,l.diff);let f=s.history.tabs[s.state.currentTabId];f&&(f.stack=[],f.currentIndex=-1),requestAnimationFrame(()=>{var b;s.elements.resizerImage&&!s.elements.editor.contains(s.elements.resizerImage)&&pe(n,s),((b=s.elements.selectedElement)==null?void 0:b.tagName)==="A"&&!s.elements.editor.contains(s.elements.selectedElement)&&ie(s),s.elements.selectedElement&&["TD","TH"].includes(s.elements.selectedElement.tagName)&&!s.elements.editor.contains(s.elements.selectedElement)&&te(n,s)});break}case"cursor:open":{let g=P(s.state.tabs,s.state.currentTabId);if(l.tabId&&(g==null?void 0:g.tabId)!==l.tabId)return;lt(s,{id:l.userId,color:mn(l.userId),name:l.userName},l.cursor);break}case"cursor:remove":{(r=(u=s.elements.editorCursor)==null?void 0:u.querySelector(`#remote-overlay-${l.userId}`))==null||r.remove(),s.state.remoteCursors&&delete s.state.remoteCursors[l.userId];break}case"tabs:switch":{(p=(c=s.elements.editorCursor)==null?void 0:c.querySelector(`#remote-overlay-${l.userId}`))==null||p.remove();let g=P(s.state.tabs,s.state.currentTabId);(g==null?void 0:g.tabId)===l.tabId&&s.onLocalSyncChanges({type:"cursor:open",cursor:s.cursor,tabId:s.state.currentTabId});break}case"tabs:structure":{let g=new Map,f=x=>{x.forEach(C=>{var E;g.set(C.tabId,C),(E=C.children)!=null&&E.length&&f(C.children)})};f(s.state.tabs);let b=x=>x.map(C=>{let E=g.get(C.tabId);return{...C,content:(E==null?void 0:E.content)??C.content??"",children:b(C.children||[])}}),y=new Set,h=x=>{x.forEach(C=>{var E;y.add(C.tabId),(E=C.children)!=null&&E.length&&h(C.children)})};if(h(l.tabs),Object.keys(s.state.runtimeDom).forEach(x=>{y.has(x)||delete s.state.runtimeDom[x]}),s.state.tabs=b(l.tabs),!y.has(s.state.currentTabId)){let x=l.tabs[0];x&&me(s,x.tabId,n)}B(s,n);break}case"tabs:create":{if(!s.state.runtimeDom[l.tabId]){let g=s.elements.iframeWindow.createElement("div");g.innerHTML=l.editorHTML,s.state.runtimeDom[l.tabId]=g.firstElementChild}break}}},getCurrentTab:()=>P(s.state.tabs,s.state.currentTabId),parseTabFromHTML:l=>({tabTitle:"Tab 1",tabId:Fn(),content:typeof l=="string"?l:"<div><br></div>",children:[]}),compare:(l,d)=>{let m=u=>(u||[]).map(r=>({tabTitle:r.tabTitle,tabId:r.tabId,content:r.content||"<div><br></div>",children:m(r.children)}));return JSON.stringify(m(l))===JSON.stringify(m(d))},initRuntimeDoms:l=>{Object.entries(l).forEach(([d,m])=>{if(!s.state.runtimeDom[d]){let u=s.elements.iframeWindow.createElement("div");u.innerHTML=m,s.state.runtimeDom[d]=u.firstElementChild}})},reloadRuntimeDom:(l,d)=>{s.state.runtimeDom={},i.setContents(l),d&&i.initRuntimeDoms(d)},showChangeHighlight:l=>{var c;let d=s.elements.editor.ownerDocument;if(!d.getElementById("highlight-style")){let p=d.createElement("style");p.id="highlight-style",p.textContent=`
425
+ `;let l=document.createElement("input");l.type="file",l.accept=se.IMAGE,l.style.display="none",i.addEventListener("click",()=>l.click()),s.append(i,l);let c=document.createElement("div");c.style.display="flex",c.style.flexDirection="column",c.style.flex="1";let d=document.createElement("div");d.className=`${n.classPrefix}${A.UPLOAD_IMG_PREVIEW_BOX}`;let p=document.createElement("img");p.className=`${n.classPrefix}${A.UPLOAD_IMG_PREVIEW}`,p.style.display="none",d.append(p),c.append(d),a.append(s,c);let u=document.createElement("div");u.className="warning";let r=document.createElement("label");r.innerText="Image Description (Alt Text)",r.style.display="block",r.style.paddingLeft="4px",r.style.marginTop="4px",r.style.marginBottom="4px";let m=document.createElement("input");m.type="text",m.placeholder="Alternative Text",m.addEventListener("keydown",o);let b=document.createElement("div");b.append(a,u,r,m);let f=document.createElement("div");f.style.display="flex",f.style.justifyContent="space-between",f.style.alignItems="center";let C=document.createElement("button");C.type="button",C.className="submit",C.innerText="Add",f.append(C);let g=we({title:"Upload Image",bodyNode:b,footerNode:f},e,n),h="";l.addEventListener("change",x=>{let y=x.target.files[0];if(y&&se.IMAGE.includes(y.type)){let E=new FileReader;E.onload=()=>{h=E.result,p.src=h,p.style.display="block"},E.readAsDataURL(y),u.innerText=""}}),l.addEventListener("click",async()=>{let x=await e.handleFilePicker(se.IMAGE.split(","),"image");x&&(h=x.data,fileNameSpan.innerText=x.name,p.src=h,p.style.display="block",u.innerText="")}),C.onclick=async()=>{if(!h){u.innerText="Image not selected";return}C.disabled=!0;let x=C.innerText;C.innerHTML=` <span style="margin-left: 8px;">${x}</span> ${L.SPINNER}`;let y=document.createElement("img");y.src=await e.manuplateImage("base64",h),y.alt=m.value||"",C.innerText=x,e.insertNode(y),g.close()}}else if(t.target.getAttribute("data-value")==="link"){let o=m=>{m.key==="Enter"&&(m.preventDefault(),u.click())},a=document.createElement("div"),s=document.createElement("label");s.innerText="Link",s.style.display="block",s.style.paddingLeft="4px";let i=document.createElement("input");i.value="",i.type="text",i.placeholder="Insert the link",i.addEventListener("keydown",o);let l=document.createElement("label");l.innerText="Alternative Text",l.style.display="block",l.style.marginTop="8px",l.style.paddingLeft="4px";let c=document.createElement("input");c.value="",c.style.marginTop="4px",c.type="text",c.placeholder="Alternative Text",c.addEventListener("keydown",o);let d=document.createElement("span");d.className="warning",a.append(s,i,d,l,c);let p=document.createElement("div"),u=document.createElement("button");u.type="button",u.className="submit",u.innerText="Add",p.append(u);let r=we({title:"Image",bodyNode:a,footerNode:p},e,n);u.onclick=()=>{let m=i.value;if(F.URL.test(m)){u.disabled=!0;let b=document.createElement("img");b.src=m,b.alt=c.value,e.insertNode(b),r.close()}else d.innerText="Invalid url"}}e.elements.editor.focus(),e.updateCaretPosition()}},video:{title:"Video",icon:L.VIDEO,type:"button",click:(t,e)=>{let n=document.createElement("input");n.type="file",n.accept=se.VIDEO,n.style.display="none",n.addEventListener("change",async o=>{let a=o.target.files[0];if(se.VIDEO.includes(a.type)){let s=await e.uploadVideo(a);if(s){let i=document.createElement("a");i.href=s.videoUrl,i.dataset.leksyPreview="video-url",i.target="_blank";let l=document.createElement("img");l.src=s.thumbnailUrl,i.appendChild(l),e.insertNode(i)}}}),n.addEventListener("click",async()=>{let o=await e.handleFilePicker(se.VIDEO.split(","),"video");if(o&&se.VIDEO.includes(o==null?void 0:o.type)){let a=await e.uploadVideo(o);if(a){let s=document.createElement("a");s.href=a.videoUrl,s.dataset.leksyPreview="video-url",s.target="_blank";let i=document.createElement("img");i.src=a.thumbnailUrl,s.appendChild(i),e.insertNode(s)}}}),n.click(),e.updateCaretPosition(),e.elements.editor.focus()}},attachment:{title:"Attachment",icon:L.ATTACHMENT,type:"button",click:(t,e)=>{let n=document.createElement("input");n.type="file",n.style.display="none",n.multiple=!0,n.addEventListener("change",o=>{e.onAttachment(o.target.files)}),n.addEventListener("click",async()=>{let o=await e.handleFilePicker(["*"],"attachment");o&&e.onAttachment(o)}),n.click(),e.updateCaretPosition()}},cut:{title:"Cut",icon:L.CUT,type:"button",click:(t,e)=>{if(!e.state.range)return;e.elements.editor.focus();let n=document.createElement("div");n.appendChild(e.state.range.cloneContents());let o=n.innerHTML,a=new ClipboardItem({"text/html":new Blob([o],{type:"text/html"})});navigator.clipboard.write([a]).then(()=>{e.state.range.deleteContents(),e.updateCaretPosition()})}},copy:{title:"Copy",icon:L.COPY,type:"button",click:(t,e)=>{if(!e.state.range)return;e.elements.editor.focus();let n=document.createElement("div");n.appendChild(e.state.range.cloneContents());let o=n.innerHTML,a=new ClipboardItem({"text/html":new Blob([o],{type:"text/html"})});navigator.clipboard.write([a]).then(()=>{e.updateCaretPosition()})}},paste:{title:"Paste",icon:L.PASTE,type:"button",click:async(t,e)=>{e.elements.editor.focus();let n=await navigator.clipboard.read(),o;for(let a of n)if(a.types.includes("text/html")){let s=await a.getType("text/html"),i=document.createElement("div");s&&(i.innerHTML=await s.text(),o=i);break}else if(a.types.includes("text/plain")){let i=await(await a.getType("text/plain")).text();o=document.createTextNode(i);break}else if(a.types.find(s=>s.startsWith("image/"))){let s=await a.getType(a.types.find(l=>l.startsWith("image/"))),i=new FileReader;i.onload=async function(l){let c=document.createElement("img"),d=l.target.result;c.src=await e.manuplateImage("base64",d),o=c},i.readAsDataURL(s);break}o&&(e.state.range.deleteContents(),e.insertNode(o)),e.updateCaretPosition()}},select_all:{title:"Select All",icon:L.SELECT_ALL,type:"button",click:(t,e)=>{e.elements.editor.focus(),e.elements.iframeWindow.execCommand("selectAll"),e.updateCaretPosition()}},fullscreen:{title:"Full screen",icon:L.FULLSCREEN,type:"button",click:(t,e)=>{let n=e.elements.base.classList.toggle("fullscreen");He(e,"fullscreen",n?L.FULLSCREEN_EXIT:L.FULLSCREEN)}},print:{title:"Print",icon:L.PRINT,type:"button",click:(t,e)=>{e.elements.iframeContainer.contentWindow.print()}},embed:{title:"Embed Link",icon:L.EMBED,type:"button",click:(t,e,n)=>{let o=f=>{f.key==="Enter"&&(f.preventDefault(),m.click())},a=document.createElement("div");a.className="link";let s=document.createElement("label");s.innerText="Embed URL",s.style.display="block",s.style.paddingLeft="4px";let i=document.createElement("input");i.type="text",i.placeholder="Enter Embed URL",i.style.marginBottom="10px",i.addEventListener("keydown",o);let l=document.createElement("label");l.innerText="Width",l.style.display="block",l.style.paddingLeft="4px";let c=document.createElement("input");c.type="text",c.placeholder="Width (px)",c.style.marginBottom="10px",c.value="400";let d=document.createElement("label");d.innerText="Height",d.style.display="block",d.style.paddingLeft="4px";let p=document.createElement("input");p.type="text",p.placeholder="Height (px)",p.style.marginBottom="10px",p.value="400";let u=document.createElement("span");u.className="warning",a.append(s,i,l,c,d,p,u);let r=document.createElement("div"),m=document.createElement("button");m.type="button",m.className="submit",m.innerText="Add",r.append(m);let b=we({title:"Embed URL",bodyNode:a,footerNode:r},e,n);m.onclick=()=>{let f=i.value.trim(),{platform:C,id:g}=Zt(f);if(!C||!g){u.innerText="Invalid URL";return}let h=Wt(C,g);if(!h){u.innerText="Unsupported platform";return}let x=document.createElement("figure");x.className="iframe-wrapper",x.style.height=`${p.value}px`,x.style.width=`${c.value}px`;let y=document.createElement("iframe");y.src=h,y.style.display="inline-block",y.style.height="100%",y.style.width="100%",y.style.border="none",x.append(y),e.insertNode(x),b.close()},e.elements.editor.focus(),e.updateCaretPosition()}},table_of_content:{title:"Table of Content",icon:L.TABLE_OF_CONTENT,type:"button",click:(t,e,n)=>{dn(e,n)}},find_and_replace:{title:"Find And Replace",icon:L.FIND_AND_REPLACE,type:"button",click:(t,e,n)=>{Ve(e,n,{key:"f"})}}},gn=Fn;import{v4 as Un}from"uuid";var ut=class{static create(e,n={}){if(!(e instanceof HTMLElement))throw Error(be.INVALID_ELEMENT);e.innerHTML="",n.classPrefix||(n.classPrefix=A.PREFIX),n.placeholder||(n.placeholder=""),n.closePluginOnClick!==!1&&(n.closePluginOnClick=!0);let o=ot(n.value),a=o[0].tabId,s={elements:{base:e,toolbar:{},tabsContainer:null,tabs:{}},state:{isCodeViewOpen:!1,page:1,totalPages:null,next:null,tribute:null,tabs:o,currentTabId:a,runtimeDom:{}},html:o[0].content,cursor:{startIndex:0,endIndex:0,cursorIndex:0,isCollapsed:!1},history:{tabs:{[a]:{stack:[],currentIndex:-1}},push:ke(()=>{s.history.saveHistory()},300),saveHistory:()=>{var u;let l=s.elements.iframeWindow.getSelection(),c=null;if((l==null?void 0:l.rangeCount)>0){let r=l.getRangeAt(0),m=r.cloneRange();m.selectNodeContents(s.elements.editor),m.setEnd(r.endContainer,r.endOffset),c=m.toString().length}let d=s.elements.editor.innerHTML,p=s.history.tabs[s.state.currentTabId]||{stack:[],currentIndex:-1};s.history.tabs[s.state.currentTabId]||(s.history.tabs[s.state.currentTabId]=p),((u=p.stack[p.currentIndex])==null?void 0:u.html)!==d&&(p.stack=p.stack.slice(0,p.currentIndex+1),p.stack.push({caretOffset:c,html:d}),p.currentIndex++)},undo:()=>{let l=s.history.tabs[s.state.currentTabId];if(l&&l.currentIndex>0){l.currentIndex--;let{html:c,caretOffset:d}=l.stack[l.currentIndex];s.elements.editor.innerHTML=c,s.history.restoreCaretPosition(d)}},redo:()=>{let l=s.history.tabs[s.state.currentTabId];if(l&&l.currentIndex<l.stack.length-1){l.currentIndex++;let{html:c,caretOffset:d}=l.stack[l.currentIndex];s.elements.editor.innerHTML=c,s.history.restoreCaretPosition(d)}},restoreCaretPosition:l=>{let c=s.elements.iframeWindow.getSelection(),d=document.createRange(),p=0;function u(r){if(r.nodeType===3){let m=r.length;if(p+m>=l)return d.setStart(r,l-p),d.setEnd(r,l-p),c.removeAllRanges(),c.addRange(d),!0;p+=m}else if(r.nodeType===1){for(let m of r.childNodes)if(u(m))return!0}return!1}u(s.elements.editor)}},onChange:(l=s.elements.editor.innerHTML)=>{Oe(s,n),lt(n,s),(l==="<br>"||l==="<div><br></div>")&&(l=""),s.html=l;let c=P(s.state.tabs,s.state.currentTabId);c&&(c.content=l),s.state.runtimeDom[s.state.currentTabId]&&(s.state.runtimeDom[s.state.currentTabId].innerHTML=l),typeof i.onChange=="function"&&i.onChange(structuredClone(s.state.tabs)),l.trim()?s.hidePlaceholder():s.showPlaceholder(),s.history.push(),Ft(s),cn(s,n)},onSave:()=>{i.onSave instanceof Function&&i.onSave()},onBlur:l=>{i.onBlur instanceof Function&&i.onBlur(l)},onAttachment:l=>{i.onAttachment instanceof Function&&i.onAttachment(l)},onLinkClick:l=>{i.onLinkClick instanceof Function&&i.onLinkClick(l)},manuplateImage:async(l,c)=>{if(i.manuplateImage instanceof Function){s.changeStatus("Loading...");let d=await i.manuplateImage(l,c)??c;return s.changeStatus(""),d}return c},handleFilePicker:async(l,c)=>i.handleFilePicker instanceof Function?await i.handleFilePicker(l,c):null,updateBreadcumb:l=>{!n.hideNavigation&&Array.isArray(l)&&(s.elements.breadcumb.innerHTML="",l.forEach(c=>{let d=document.createElement("li");d.innerText=c,s.elements.breadcumb.appendChild(d)}))},changeStatus:l=>{n.hideNavigation||(s.elements.status.innerText=l)},insertNode:l=>{s.state.range?(s.state.range.deleteContents(),s.state.range.insertNode(l),s.state.range.collapse(!1),s.state.selection.removeAllRanges(),s.state.selection.addRange(s.state.range)):s.elements.editor.appendChild(l)},uploadVideo:async l=>{if(i.uploadVideo instanceof Function){s.changeStatus("Loading..."),He(s,"video",L.LOADER);let c=await i.uploadVideo(l);return s.changeStatus(""),He(s,"video",L.VIDEO),c}},showPlaceholder:()=>{s.elements.placeholder.style.display="block"},hidePlaceholder:()=>{s.elements.placeholder.style.display="none"},updateCaretPosition:()=>{let l=s.elements.iframeWindow.getSelection(),c=[],d=[];if((l==null?void 0:l.rangeCount)!==0){let p=l.getRangeAt(0);s.state.selection=l,s.state.range=p,s.state.parentNode=p.commonAncestorContainer.parentNode;let u=p.commonAncestorContainer;for(u.nodeType===Node.TEXT_NODE&&(u=u.parentNode);u&&u!==s.elements.editor;)d.push(u),c.push(u.tagName),u=u.parentElement;c=c.reverse(),d=d.reverse(),s.updateBreadcumb(c)}return{parentTags:c,parentElements:d}},updateCursorPosition:()=>{$t(s,i)},onLocalSyncChanges:l=>{n.disabled&&l.type==="cursor:open"||i.onLocalSyncChanges instanceof Function&&i.onLocalSyncChanges(l)}},i={setContents:l=>{let c=ot(l);s.state.tabs=c,s.state.currentTabId=c[0].tabId,s.html=c[0].content,B(s,n),s.elements.editor.innerHTML=s.html,s.state.previousDOM=s.elements.editor.cloneNode(!0);let d=p=>{p.forEach(u=>{var r;if(!s.state.runtimeDom[u.tabId]){let m=s.elements.iframeWindow.createElement("div");m.className="content-editable",m.contentEditable=!n.disabled,m.spellcheck=!!n.spellcheck,m.innerHTML=u.content??"<div><br></div>",s.state.runtimeDom[u.tabId]=m,s.onLocalSyncChanges({type:"tabs:create",tabId:u.tabId,editorHTML:m.outerHTML})}(r=u.children)!=null&&r.length&&d(u.children)})};d(c),s.elements.editor.innerHTML=s.html,s.state.previousDOM=s.elements.editor.cloneNode(!0),Oe(s,n)},getContents:()=>s.state.tabs,onChange:()=>{},onSave:()=>{},onBlur:()=>{},onAttachment:()=>{},onLinkClick:l=>{window.open(l,"_blank","noopener noreferrer")},manuplateImage:async()=>{},handleFilePicker:async()=>{},uploadVideo:async()=>{},focus:()=>{s.elements.editor.focus()},getCore:()=>s,updateHeight:l=>{s.elements.iframeContainer.style.setProperty("height",l)},setDisabled:l=>{n.disabled=l,s.elements.editor.contentEditable=!l,l?K(s,"disabled"):K(s,"enabled"),B(s,n)},updateCssVariables:l=>{let c={primary:"--primary",baseWhite:"--base-white",whiteDark:"--base-white-dark",shadow:"--shadow",resizer:"--resizer",resizerBackground:"--resizer-background",mention:"--mention",mentionHighlight:"--mention-highlight",dashedBorder:"--dashed-border",tableResizer:"--table-resizer",tableResizerOutline:"--table-resizer-outline",textColor:"--text-color",resizerPosition:"--resizer-position",resizerPositionBackground:"--resizer-position-background",linkColor:"--link-color",scrollbarThumb:"--scrollbar-thumb",scrollbarTrack:"--scrollbar-track"},d={...Ie,...l};Object.keys(c).forEach(p=>{let u=c[p],r=d[p];r!==void 0&&s.elements.iframeWindow.documentElement.style.setProperty(u,r)})},updateLabels:(l=[])=>{if(!s.state.tribute)return;let c=ct(l);s.state.tribute.append(0,c,!0)},getLocalCursor:()=>s.cursor,onLocalSyncChanges:()=>{},applyRemoteSyncChanges:l=>{var p,u,r,m;let{type:c,sequence:d}=l;switch(c){case"diff":{let b=P(s.state.tabs,s.state.currentTabId);if(l.tabId&&(b==null?void 0:b.tabId)!==l.tabId){if(!s.state.runtimeDom[l.tabId]){let C=P(s.state.tabs,l.tabId);if(C){let g=s.elements.iframeWindow.createElement("div");g.className="content-editable",g.contentEditable=!n.disabled,g.spellcheck=!!n.spellcheck,g.innerHTML=C.content||"<div><br></div>",s.state.runtimeDom[l.tabId]=g}}s.state.runtimeDom[l.tabId]&&dt(s,l.diff,s.state.runtimeDom[l.tabId]);return}dt(s,l.diff);let f=s.history.tabs[s.state.currentTabId];f&&(f.stack=[],f.currentIndex=-1),requestAnimationFrame(()=>{var C;s.elements.resizerImage&&!s.elements.editor.contains(s.elements.resizerImage)?pe(n,s):s.elements.resizerImage&&s.elements.editor.contains(s.elements.resizerImage)&&Ne(null,s),((C=s.elements.selectedElement)==null?void 0:C.tagName)==="A"&&!s.elements.editor.contains(s.elements.selectedElement)&&ie(s),s.elements.selectedElement&&["TD","TH"].includes(s.elements.selectedElement.tagName)&&!s.elements.editor.contains(s.elements.selectedElement)&&te(n,s)});break}case"cursor:open":{let b=P(s.state.tabs,s.state.currentTabId);if(l.tabId&&(b==null?void 0:b.tabId)!==l.tabId)return;rt(s,{id:l.userId,color:pn(l.userId),name:l.userName},l.cursor,l.tabId);break}case"cursor:remove":{(u=(p=s.elements.editorCursor)==null?void 0:p.querySelector(`#remote-overlay-${l.userId}`))==null||u.remove(),s.state.remoteCursors&&delete s.state.remoteCursors[l.userId];break}case"tabs:switch":{(m=(r=s.elements.editorCursor)==null?void 0:r.querySelector(`#remote-overlay-${l.userId}`))==null||m.remove(),s.state.remoteCursors&&delete s.state.remoteCursors[l.userId];let b=P(s.state.tabs,s.state.currentTabId);(b==null?void 0:b.tabId)===l.tabId&&s.onLocalSyncChanges({type:"cursor:open",cursor:s.cursor,tabId:s.state.currentTabId});break}case"tabs:structure":{let b=new Map,f=x=>{x.forEach(y=>{var E;b.set(y.tabId,y),(E=y.children)!=null&&E.length&&f(y.children)})};f(s.state.tabs);let C=x=>x.map(y=>{let E=b.get(y.tabId);return{...y,content:(E==null?void 0:E.content)??y.content??"",children:C(y.children||[])}}),g=new Set,h=x=>{x.forEach(y=>{var E;g.add(y.tabId),(E=y.children)!=null&&E.length&&h(y.children)})};if(h(l.tabs),Object.keys(s.state.runtimeDom).forEach(x=>{g.has(x)||delete s.state.runtimeDom[x]}),s.state.tabs=C(l.tabs),!g.has(s.state.currentTabId)){let x=l.tabs[0];x&&me(s,x.tabId,n)}B(s,n);break}case"tabs:create":{if(!s.state.runtimeDom[l.tabId]){let b=s.elements.iframeWindow.createElement("div");b.innerHTML=l.editorHTML,s.state.runtimeDom[l.tabId]=b.firstElementChild}break}}},getCurrentTab:()=>P(s.state.tabs,s.state.currentTabId),parseTabFromHTML:l=>({tabTitle:"Tab 1",tabId:Un(),content:typeof l=="string"?l:"<div><br></div>",children:[]}),compare:(l,c)=>{let d=p=>(p||[]).map(u=>({tabTitle:u.tabTitle,tabId:u.tabId,content:u.content||"<div><br></div>",children:d(u.children)}));return JSON.stringify(d(l))===JSON.stringify(d(c))},initRuntimeDoms:l=>{Object.entries(l).forEach(([c,d])=>{if(!s.state.runtimeDom[c]){let p=s.elements.iframeWindow.createElement("div");p.innerHTML=d,s.state.runtimeDom[c]=p.firstElementChild}})},reloadRuntimeDom:(l,c)=>{s.state.runtimeDom={},i.setContents(l),c&&i.initRuntimeDoms(c)},showChangeHighlight:l=>{var r;let c=s.elements.editor.ownerDocument;if(!c.getElementById("highlight-style")){let m=c.createElement("style");m.id="highlight-style",m.textContent=`
426
426
  .highlight-label { display: none; }
427
427
  .highlight:hover .highlight-label { display: block; }
428
- `,d.head.appendChild(p)}let m=s.state.currentTabId,u=(p,g,f)=>{let b=d.createElement("span");b.className="highlight",b.style.backgroundColor=g+"55",b.style.position="relative",b.style.cursor="pointer";let y=d.createElement("span");y.className="highlight-label",y.textContent=f,y.style.cssText=`
428
+ `,c.head.appendChild(m)}let d=s.state.currentTabId,p=(m,b,f)=>{let C=c.createElement("span");C.className="highlight",C.style.position="relative",C.style.cursor="pointer",m.nodeType===Node.ELEMENT_NODE&&m.tagName==="TABLE"?(C.style.display="inline-block",C.style.backgroundColor=b+"55",C.style.outline=`2px solid ${b}`,C.style.outlineOffset="2px"):C.style.backgroundColor=b+"55";let h=c.createElement("span");h.className="highlight-label",h.textContent=f,h.style.cssText=`
429
429
  position: absolute;
430
430
  top: -16px;
431
431
  left: 0;
432
432
  font-size: 12px;
433
433
  color: white;
434
- background-color: ${g};
434
+ background-color: ${b};
435
435
  border-radius: 4px 4px 0 0;
436
436
  padding: 0 4px;
437
437
  white-space: nowrap;
438
438
  z-index: 999;
439
439
  pointer-events: none;
440
- `,b.appendChild(y),p.parentNode.insertBefore(b,p),b.appendChild(p)},r=[];for(let{tabId:p,route:g,color:f,userName:b}of l){let y=p===m?s.elements.editor:s.state.runtimeDom[p];if(!y)continue;let h=y;for(let x of g)if(h=(c=h==null?void 0:h.childNodes)==null?void 0:c[x],!h)break;h&&h.parentNode&&r.push({node:h,color:f,userName:b})}for(let{node:p,color:g,userName:f}of r)try{u(p,g,f)}catch(b){console.error("highlight error",b)}}};return s.elements.base.className=`${n.classPrefix}${A.CONTAINER}`,Array.isArray(n.plugins)&&n.plugins.length&&this.#e(n,s),this.#t(n,s),this.#n(n,s),this.#o(n,s),n.hideNavigation||this.#s(n,s),n.value&&s.hidePlaceholder(),s.history.push(),i}static#e(e,n){let o=document.createElement("div");o.className=`${e.classPrefix}${A.TOOLBAR}`;let a=s=>{var d;if(Array.isArray(s)){let m=document.createElement("div");return m.className=`${e.classPrefix}${A.TOOLBAR_ITEMS}`,s.forEach(u=>{let r=a(u);m.appendChild(r)}),m}let i=un[s]??((d=e.customPlugins)==null?void 0:d[s]);if(i.pluginId=s,i.pluginId==="font"&&e.additionalFonts&&e.additionalFonts.forEach(m=>ae[m.fontFamily]=m.name),!i)throw Error(fe.INVALID_PLUGIN);if(i.title==="GIPHY"&&!e.giphyApiKey)throw Error(fe.GIPHY_KEY_NOT_FOUND);if(i.title==="Pexels"&&!e.pexelsApiKey)throw Error(fe.PEXELS_KEY_NOT_FOUND);if(i.title==="Tenor"&&!e.tenorApiKey)throw Error(fe.TENOR_KEY_NOT_FOUND);let l;return i.type==="button"||i.type==="reset-color"?l=St(i,e,n):i.type==="dropdown"||i.type==="gallery"||i.type==="category"||i.type==="mention"||i.type==="table"?l=Bt(i,e,n):i.type==="select"?l=st(i,e,n):i.type==="color"?l=_t(i,e,n):i.type==="button-select"&&(l=Ot(i,e,n)),n.elements.toolbar[s]?n.elements.toolbar[s].push(l):n.elements.toolbar[s]=[l],l};e.plugins.forEach(s=>{let i=a(s);o.appendChild(i)}),e.disabled&&K(n,"disabled"),Nt(e),n.elements.toolbarContainer=o,n.elements.base.appendChild(o)}static#t(e,n){let o=document.createElement("div"),a=document.createElement("span");a.className=`${e.classPrefix}${A.PLACEHOLDER}`,a.innerText=e.placeholder??"",o.appendChild(a),a.onclick=()=>n.elements.editor.focus(),n.elements.placeholder=a,n.elements.base.appendChild(o)}static#n(e,n){let o=document.createElement("textarea");o.className=`${e.classPrefix}${A.CODEVIEW}`,o.spellcheck=!1,n.elements.codeview=o,n.elements.base.appendChild(o)}static#o(e,n){var u;let o=()=>{try{let{parentTags:r,parentElements:c}=n.updateCaretPosition();K(n,"inactive",[]);let p=[];r.includes("A")&&p.push("link"),n.elements.iframeWindow.queryCommandState("bold")&&p.push("bold"),n.elements.iframeWindow.queryCommandState("underline")&&p.push("underline"),n.elements.iframeWindow.queryCommandState("italic")&&p.push("italic"),n.elements.iframeWindow.queryCommandState("strikeThrough")&&p.push("strike"),n.elements.iframeWindow.queryCommandState("subscript")&&p.push("subscript"),n.elements.iframeWindow.queryCommandState("superscript")&&p.push("superscript"),n.elements.iframeWindow.queryCommandState("insertOrderedList")&&p.push("ordered_list"),n.elements.iframeWindow.queryCommandState("insertUnorderedList")&&p.push("unordered_list");let g="";r.includes("H1")&&(g="h1"),r.includes("H2")&&(g="h2"),r.includes("H3")&&(g="h3"),r.includes("H4")&&(g="h4"),r.includes("H5")&&(g="h5"),r.includes("H6")&&(g="h6"),r.includes("P")&&(g="P"),V(n,"format-block",g);let f=n.state.range.commonAncestorContainer;if(n.state.range){f.nodeType===Node.TEXT_NODE&&(f=f.parentNode);let x=window.getComputedStyle(f).textAlign;x&&(x==="justify"?p.push("align_justify"):x==="start"||x==="left"||x==="-moz-left"?p.push("align_left"):x==="end"||x==="right"||x==="-moz-right"?p.push("align_right"):(x==="center"||x==="-moz-center")&&p.push("align_center"));let C=window.getComputedStyle(f);V(n,"highlight_color",Ce(C.backgroundColor))}S(n,"active",p);let b=window.getComputedStyle(f),y=c.find(h=>h.tagName==="FONT");if(y&&y.face)V(n,"font",y.face);else if(b.fontFamily){let h=b.fontFamily.split(",")[0].trim().replace(/['"]/g,""),x=b.fontFamily.includes(",")?`${h}...`:h;V(n,"font",`<p style='user-select: none;'>${x}</p>`)}else V(n,"font","");if(y&&y.size)V(n,"font-size",y.size);else if(b.fontSize){let h=b.fontSize.match(/^([\d.]+)([a-z%]*)$/),x=parseFloat(h[1]),C=h[2],E=(x%1===0?x.toString():x.toFixed(2))+C;V(n,"font-size",`<p style='user-select: none;'>${E}</p>`)}else V(n,"font-size","");y&&y.color?V(n,"font_color",y.color):b.color?V(n,"font_color",Ce(b.color)):V(n,"font_color","")}catch(r){console.error(r)}},a=ke(o,100),s=()=>{new MutationObserver(()=>{let p=new Event("custom-input",{bubbles:!0});d.dispatchEvent(p)}).observe(d,{attributes:!0,childList:!0,subtree:!0}),new ResizeObserver(()=>{Se(n,e),n.state.remoteCursors&&Object.values(n.state.remoteCursors).forEach(({user:p,data:g})=>{lt(n,p,g)})}).observe(d)};if(e.cssVariables){let r=e.cssVariables,c=structuredClone(Ie);Object.keys(Ie).forEach(p=>{r[p]!==void 0&&(c[p]=r[p])}),ee.IFRAME_VARIABLES=`
440
+ `,C.appendChild(h),m.parentNode.insertBefore(C,m),C.appendChild(m)},u=[];for(let{tabId:m,route:b,color:f,userName:C}of l){let g=m===d?s.elements.editor:s.state.runtimeDom[m];if(!g)continue;let h=g;for(let x of b)if(h=(r=h==null?void 0:h.childNodes)==null?void 0:r[x],!h)break;h&&h.parentNode&&u.push({node:h,color:f,userName:C})}for(let{node:m,color:b,userName:f}of u)try{p(m,b,f)}catch(C){console.error("highlight error",C)}}};return s.elements.base.className=`${n.classPrefix}${A.CONTAINER}`,Array.isArray(n.plugins)&&n.plugins.length&&this.#e(n,s),this.#t(n,s),this.#n(n,s),this.#o(n,s),n.hideNavigation||this.#s(n,s),n.value&&s.hidePlaceholder(),s.history.push(),i}static#e(e,n){let o=document.createElement("div");o.className=`${e.classPrefix}${A.TOOLBAR}`;let a=s=>{var c;if(Array.isArray(s)){let d=document.createElement("div");return d.className=`${e.classPrefix}${A.TOOLBAR_ITEMS}`,s.forEach(p=>{let u=a(p);d.appendChild(u)}),d}let i=gn[s]??((c=e.customPlugins)==null?void 0:c[s]);if(i.pluginId=s,i.pluginId==="font"&&e.additionalFonts&&e.additionalFonts.forEach(d=>ae[d.fontFamily]=d.name),!i)throw Error(be.INVALID_PLUGIN);if(i.title==="GIPHY"&&!e.giphyApiKey)throw Error(be.GIPHY_KEY_NOT_FOUND);if(i.title==="Pexels"&&!e.pexelsApiKey)throw Error(be.PEXELS_KEY_NOT_FOUND);if(i.title==="Tenor"&&!e.tenorApiKey)throw Error(be.TENOR_KEY_NOT_FOUND);let l;return i.type==="button"||i.type==="reset-color"?l=Ot(i,e,n):i.type==="dropdown"||i.type==="gallery"||i.type==="category"||i.type==="mention"||i.type==="table"?l=Pt(i,e,n):i.type==="select"?l=at(i,e,n):i.type==="color"?l=Bt(i,e,n):i.type==="button-select"&&(l=_t(i,e,n)),n.elements.toolbar[s]?n.elements.toolbar[s].push(l):n.elements.toolbar[s]=[l],l};e.plugins.forEach(s=>{let i=a(s);o.appendChild(i)}),e.disabled&&K(n,"disabled"),St(e),n.elements.toolbarContainer=o,n.elements.base.appendChild(o)}static#t(e,n){let o=document.createElement("div"),a=document.createElement("span");a.className=`${e.classPrefix}${A.PLACEHOLDER}`,a.innerText=e.placeholder??"",o.appendChild(a),a.onclick=()=>n.elements.editor.focus(),n.elements.placeholder=a,n.elements.base.appendChild(o)}static#n(e,n){let o=document.createElement("textarea");o.className=`${e.classPrefix}${A.CODEVIEW}`,o.spellcheck=!1,n.elements.codeview=o,n.elements.base.appendChild(o)}static#o(e,n){var u;let o=()=>{try{let{parentTags:r,parentElements:m}=n.updateCaretPosition();K(n,"inactive",[]);let b=[];r.includes("A")&&b.push("link"),n.elements.iframeWindow.queryCommandState("bold")&&b.push("bold"),n.elements.iframeWindow.queryCommandState("underline")&&b.push("underline"),n.elements.iframeWindow.queryCommandState("italic")&&b.push("italic"),n.elements.iframeWindow.queryCommandState("strikeThrough")&&b.push("strike"),n.elements.iframeWindow.queryCommandState("subscript")&&b.push("subscript"),n.elements.iframeWindow.queryCommandState("superscript")&&b.push("superscript"),n.elements.iframeWindow.queryCommandState("insertOrderedList")&&b.push("ordered_list"),n.elements.iframeWindow.queryCommandState("insertUnorderedList")&&b.push("unordered_list");let f="";r.includes("H1")&&(f="h1"),r.includes("H2")&&(f="h2"),r.includes("H3")&&(f="h3"),r.includes("H4")&&(f="h4"),r.includes("H5")&&(f="h5"),r.includes("H6")&&(f="h6"),r.includes("P")&&(f="P"),V(n,"format-block",f);let C=n.state.range.commonAncestorContainer;if(n.state.range){C.nodeType===Node.TEXT_NODE&&(C=C.parentNode);let y=window.getComputedStyle(C).textAlign;y&&(y==="justify"?b.push("align_justify"):y==="start"||y==="left"||y==="-moz-left"?b.push("align_left"):y==="end"||y==="right"||y==="-moz-right"?b.push("align_right"):(y==="center"||y==="-moz-center")&&b.push("align_center"));let E=window.getComputedStyle(C);V(n,"highlight_color",ve(E.backgroundColor))}S(n,"active",b);let g=window.getComputedStyle(C),h=m.find(x=>x.tagName==="FONT");if(h&&h.face)V(n,"font",h.face);else if(g.fontFamily){let x=g.fontFamily.split(",")[0].trim().replace(/['"]/g,""),y=g.fontFamily.includes(",")?`${x}...`:x;V(n,"font",`<p style='user-select: none;'>${y}</p>`)}else V(n,"font","");if(h&&h.size)V(n,"font-size",h.size);else if(g.fontSize){let x=g.fontSize.match(/^([\d.]+)([a-z%]*)$/),y=parseFloat(x[1]),E=x[2],T=(y%1===0?y.toString():y.toFixed(2))+E;V(n,"font-size",`<p style='user-select: none;'>${T}</p>`)}else V(n,"font-size","");h&&h.color?V(n,"font_color",h.color):g.color?V(n,"font_color",ve(g.color)):V(n,"font_color","")}catch(r){console.error(r)}},a=ke(o,100),s=()=>{n.state.remoteCursors&&Object.values(n.state.remoteCursors).forEach(({user:r,data:m,tabId:b})=>{b&&b!==n.state.currentTabId||rt(n,r,m,b)}),n.elements.resizerImage&&n.elements.editor.contains(n.elements.resizerImage)&&Ne(null,n)},i=()=>{new MutationObserver(()=>{let b=new Event("custom-input",{bubbles:!0});d.dispatchEvent(b)}).observe(d,{attributes:!0,childList:!0,subtree:!0}),new ResizeObserver(()=>{Oe(n,e),s()}).observe(d),window.addEventListener("resize",s)};if(e.cssVariables){let r=e.cssVariables,m=structuredClone(Ie);Object.keys(Ie).forEach(b=>{r[b]!==void 0&&(m[b]=r[b])}),ee.IFRAME_VARIABLES=`
441
441
  :root {
442
- --primary: ${c.primary};
443
- --base-white: ${c.baseWhite};
444
- --base-white-dark: ${c.whiteDark};
445
- --shadow: ${c.shadow};
446
- --resizer: ${c.resizer};
447
- --resizer-background: ${c.resizerBackground};
448
- --mention: ${c.mention};
449
- --mention-highlight: ${c.mentionHighlight};
450
- --dashed-border: ${c.dashedBorder};
451
- --table-resizer: ${c.tableResizer};
452
- --table-resizer-outline: ${c.tableResizerOutline};
453
- --text-color: ${c.textColor};
454
- --resizer-position: ${c.resizerPosition};
455
- --resizer-position-background: ${c.resizerPositionBackground};
456
- --link-color: ${c.linkColor};
457
- --scrollbar-thumb: ${c.scrollbarThumb};
458
- --scrollbar-track: ${c.scrollbarTrack};
442
+ --primary: ${m.primary};
443
+ --base-white: ${m.baseWhite};
444
+ --base-white-dark: ${m.whiteDark};
445
+ --shadow: ${m.shadow};
446
+ --resizer: ${m.resizer};
447
+ --resizer-background: ${m.resizerBackground};
448
+ --mention: ${m.mention};
449
+ --mention-highlight: ${m.mentionHighlight};
450
+ --dashed-border: ${m.dashedBorder};
451
+ --table-resizer: ${m.tableResizer};
452
+ --table-resizer-outline: ${m.tableResizerOutline};
453
+ --text-color: ${m.textColor};
454
+ --resizer-position: ${m.resizerPosition};
455
+ --resizer-position-background: ${m.resizerPositionBackground};
456
+ --link-color: ${m.linkColor};
457
+ --scrollbar-thumb: ${m.scrollbarThumb};
458
+ --scrollbar-track: ${m.scrollbarTrack};
459
459
  }
460
- `}let i=document.createElement("iframe");i.style.flex="1 1 auto",e.autoHeight?i.style.height="auto":i.style.height=e.minHeight??e.height??"250px",i.style.minHeight=e.minHeight??e.height??"250px",e.maxHeight&&(i.style.maxHeight=e.maxHeight),i.style.border="0",n.elements.base.appendChild(i);let l=i.contentDocument||i.contentWindow.document;l.open(),l.write(`
460
+ `}let l=document.createElement("iframe");l.style.flex="1 1 auto",e.autoHeight?l.style.height="auto":l.style.height=e.minHeight??e.height??"250px",l.style.minHeight=e.minHeight??e.height??"250px",e.maxHeight&&(l.style.maxHeight=e.maxHeight),l.style.border="0",n.elements.base.appendChild(l);let c=l.contentDocument||l.contentWindow.document;c.open(),c.write(`
461
461
  <!DOCTYPE html>
462
462
  <html lang='en'>
463
463
  <head>
464
- ${((e==null?void 0:e.additionalFonts)||[]).map(({links:r})=>r.map(c=>`<link href="${c}" rel="stylesheet">`).join("")).join("")}
464
+ ${((e==null?void 0:e.additionalFonts)||[]).map(({links:r})=>r.map(m=>`<link href="${m}" rel="stylesheet">`).join("")).join("")}
465
465
  <style>
466
466
  ${ee.IFRAME_VARIABLES}
467
467
  ${ee.IFRAME_BODY}
@@ -475,5 +475,5 @@ function Ze(t,{insertAt:e}={}){if(!t||typeof document>"u")return;let n=document.
475
475
  </head>
476
476
  <body></body>
477
477
  </html>
478
- `),l.close(),l.onkeydown=r=>{if((r.ctrlKey||r.metaKey)&&["z","y","b","i","u","f","h","s"].includes(r.key))return r.preventDefault()};let d=l.createElement("div");d.contentEditable=!e.disabled,d.spellcheck=!!e.spellcheck,d.innerHTML=n.html,d.className="content-editable",d.oninput=r=>{sn(n),n.onChange(r.target.innerHTML)},d.onbeforeinput=r=>{(r.target.innerHTML==="<br>"||r.target.innerHTML==="")&&(r.target.innerHTML="<div><br></div>")},d.addEventListener("custom-input",r=>{n.onChange(r.target.innerHTML)}),d.onkeydown=r=>{let c=r.ctrlKey||r.metaKey,p=!1;if(c&&(r.key==="z"?n.history.undo():r.key==="y"?n.history.redo():r.key==="b"?he(n,"bold"):r.key==="u"?he(n,"underline"):r.key==="i"?he(n,"italic"):r.key==="f"||r.key==="h"?Pe(n,e,r):r.key==="s"&&n.onSave()),r.shiftKey&&["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(r.key)){let g=n.elements.iframeWindow.getSelection();if(g.rangeCount>0){let f=g.focusNode;f.nodeType===Node.TEXT_NODE&&(f=f.parentElement);let b=f.closest("td, th");if(b){let y=b.closest("table");if(y){let h=ue(y),x=z(h,b);if(x){let{r:C,c:E}=x;if(r.key==="ArrowLeft"){let k=h[C][E-1];if(E===0)return;k&&k!==b&&(k.rowSpan||1)===(b.rowSpan||1)&&z(h,k).r===C&&(k.innerHTML.trim()!==""&&(b.innerHTML=k.innerHTML+"<br/>"+b.innerHTML),b.colSpan=(b.colSpan||1)+(k.colSpan||1),k.parentNode.insertBefore(b,k),k.remove())}else if(r.key==="ArrowRight"){let k=h[C][E+(b.colSpan||1)];k&&k!==b&&(k.rowSpan||1)===(b.rowSpan||1)&&z(h,k).r===C&&(k.innerHTML.trim()!==""&&(b.innerHTML+="<br/>"+k.innerHTML),b.colSpan=(b.colSpan||1)+(k.colSpan||1),k.remove())}else if(r.key==="ArrowUp"){if(C===0)return;let k=h[C-1][E];k&&k!==b&&(k.colSpan||1)===(b.colSpan||1)&&z(h,k).c===E&&(k.innerHTML.trim()!==""&&(b.innerHTML=k.innerHTML+"<br/>"+b.innerHTML),b.rowSpan=(b.rowSpan||1)+(k.rowSpan||1),k.parentNode.insertBefore(b,k),k.remove())}else if(r.key==="ArrowDown"){let k=C+(b.rowSpan||1);if(k>=h.length)return;let w=h[k][E];w&&w!==b&&(w.colSpan||1)===(b.colSpan||1)&&z(h,w).c===E&&(w.innerHTML.trim()!==""&&(b.innerHTML+="<br/>"+w.innerHTML),b.rowSpan=(b.rowSpan||1)+(w.rowSpan||1),w.remove())}n.updateCaretPosition()}}}}}if(r.key==="Tab"){if(an(r,n),r.defaultPrevented)return;r.preventDefault();let g=document.createTextNode("\xA0\xA0\xA0\xA0");n.state.range.insertNode(g),n.state.range.setStartAfter(g),n.state.range.setEndAfter(g),n.state.selection.removeAllRanges(),n.state.selection.addRange(n.state.range)}if(r.key===" "||r.key==="Enter"){let g=n.state.selection,f=g==null?void 0:g.anchorNode;if(f&&f.nodeType===Node.TEXT_NODE&&!f.parentElement.closest("a")){let b=g.focusOffset,y=f.textContent.slice(0,b),h=y.match(F.TEXT_URL);if(h){let C=h[0].replace(/[.,)]$/,""),E=y.slice(0,h.index),k=f.textContent.slice(b),w=document.createElement("a");w.href=C.toLowerCase().startsWith("http")?C:"https://"+C,w.textContent=C,w.target="_blank";let v=document.createDocumentFragment();E&&v.appendChild(document.createTextNode(E)),v.appendChild(w),k&&v.appendChild(document.createTextNode(k)),f.replaceWith(v);let T=document.createRange();T.setStartAfter(w),T.collapse(!0),g.removeAllRanges(),g.addRange(T),p=!0,n.elements.lastCreatedLink=w}}}if(n.elements.lastCreatedLink&&r.key==="Backspace"){r.preventDefault();let g=document.createTextNode(n.elements.lastCreatedLink.textContent);n.elements.lastCreatedLink.replaceWith(g);let f=document.createRange();f.setStart(g,g.length),f.collapse(!0)}cn(r,n),on(r,n),p||(n.elements.lastCreatedLink=null),jt(r,n),qt(r,n),Kt(r,n),Qt(r,n),Jt(r,n),a()},d.onkeyup=()=>{Xt(event,n)},d.onclick=r=>{var p;if(e.disabled)return;o();let c=r.target;if(n.elements.selectedElement=r.target,pe(e,n),te(e,n),ie(n),((p=r.target.closest("a"))==null?void 0:p.tagName)==="A"){let g=r.target.closest("a");g&&c.tagName!=="IMG"&&(n.elements.selectedElement=g,Wt(g,r.pageX,r.pageY,e,n))}c.tagName==="IMG"&&at("image",r.target,e,n),(c.tagName==="TD"||c.tagName==="TH")&&Vt(r.target,e,n),c.tagName==="FIGURE"&&at("figure",r.target,e,n),c.tagName==="LI"&&c.dataset.leksyTocHeadingId&&ln(n,c.dataset.leksyTocHeadingId),Be(n,e)},d.onpaste=r=>{r.preventDefault();let c=r.clipboardData;if(c.items){for(let g of c.items)if(g.kind==="file"&&g.type.startsWith("image/")){let f=g.getAsFile(),b=new FileReader;b.onload=async function(y){let h=document.createElement("img"),x=y.target.result;h.src=await n.manuplateImage("base64",x),n.insertNode(h)},b.readAsDataURL(f);return}}let p=c.getData("text/html")||c.getData("text/plain");n.elements.iframeWindow.execCommand("insertHtml",!1,Ee(p,e,n))},d.ondrop=r=>{r.preventDefault();let c=r.dataTransfer.getData("text/html")||r.dataTransfer.getData("text/plain");n.elements.iframeWindow.execCommand("insertHtml",!1,Ee(c,e,n))},d.onblur=r=>{n.onBlur(r.target.innerHTML)},l.body.appendChild(d);let m=document.createElement("div");if(m.style.position="absolute",m.style.top="0",l.body.appendChild(m),(u=e.labels)!=null&&u.length){let r=l.createElement("script");r.src="https://cdnjs.cloudflare.com/ajax/libs/tributejs/5.1.3/tribute.js",r.onload=()=>{n.state.tribute=new i.contentWindow.Tribute({values:dt(e.labels),noMatchTemplate:()=>"<li>No match found</li>",menuItemTemplate:c=>c.original.isCategory?`<div class="category">${c.original.key}</div>`:`<div class="item">${c.original.key}</div>`,containerClass:"tribute",selectTemplate:function(c){return c.original.isCategory?null:`<span spellcheck="false" contentEditable="false" data-id="${c.original.value}">${c.original.key}</span>`}}),n.state.tribute.attach(d),s()},l.body.appendChild(r)}else s();l.addEventListener("keydown",n.updateCursorPosition),l.addEventListener("keyup",()=>{Be(n,e)}),l.addEventListener("mouseup",n.updateCursorPosition),l.addEventListener("mousedown",n.updateCursorPosition),l.addEventListener("selectionchange",n.updateCursorPosition),n.elements.editor=d,n.elements.editorCursor=m,n.elements.iframeWindow=l,n.elements.iframeContainer=i,Et(n,e)}static#s(e,n){let o=document.createElement("div");o.className=`${e.classPrefix}${A.STEPPER}`;let a=document.createElement("ul");a.className="breadcrumb";let s=document.createElement("span");o.appendChild(a),o.appendChild(s),n.elements.base.appendChild(o),n.elements.breadcumb=a,n.elements.status=s,n.elements.stepper=o}},g1=t=>{let e=document.createElement("div");return e.innerHTML=t,e.textContent},f1=t=>{let e=document.createElement("div");return e.innerHTML=t,!e.innerText.trim()&&!e.querySelector("img , ol, ul, blockquote, h1, h2, h3")},b1=pt;export{g1 as convertHtmlToText,b1 as default,f1 as isHTMLEmpty};
478
+ `),c.close(),c.onkeydown=r=>{if((r.ctrlKey||r.metaKey)&&["z","y","b","i","u","f","h","s"].includes(r.key))return r.preventDefault()};let d=c.createElement("div");d.contentEditable=!e.disabled,d.spellcheck=!!e.spellcheck,d.innerHTML=n.html,d.className="content-editable",d.oninput=r=>{an(n),n.onChange(r.target.innerHTML)},d.onbeforeinput=r=>{(r.target.innerHTML==="<br>"||r.target.innerHTML==="")&&(r.target.innerHTML="<div><br></div>")},d.addEventListener("custom-input",r=>{n.onChange(r.target.innerHTML)}),d.onkeydown=r=>{let m=r.ctrlKey||r.metaKey,b=!1;if(m&&(r.key==="z"?n.history.undo():r.key==="y"?n.history.redo():r.key==="b"?ge(n,"bold"):r.key==="u"?ge(n,"underline"):r.key==="i"?ge(n,"italic"):r.key==="f"||r.key==="h"?Ve(n,e,r):r.key==="s"&&n.onSave()),(r.key==="Backspace"||r.key==="Delete")&&!m){let f=n.elements.iframeWindow.getSelection();if(f!=null&&f.rangeCount){let C=f.getRangeAt(0);if(C.collapsed){let g=null,{startContainer:h,startOffset:x}=C;if(r.key==="Backspace"){if(x===0){let y=h.nodeType===Node.TEXT_NODE?h.previousSibling:h.childNodes[x-1];(y==null?void 0:y.contentEditable)==="false"&&(g=y)}else if(h.nodeType===Node.ELEMENT_NODE){let y=h.childNodes[x-1];(y==null?void 0:y.contentEditable)==="false"&&(g=y)}}else if(h.nodeType===Node.TEXT_NODE&&x===h.length){let y=h.nextSibling;(y==null?void 0:y.contentEditable)==="false"&&(g=y)}else if(h.nodeType===Node.ELEMENT_NODE){let y=h.childNodes[x];(y==null?void 0:y.contentEditable)==="false"&&(g=y)}g&&(r.preventDefault(),g.remove(),n.onChange(n.elements.editor.innerHTML))}}}if(r.shiftKey&&["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(r.key)){let f=n.elements.iframeWindow.getSelection();if(f.rangeCount>0){let C=f.focusNode;C.nodeType===Node.TEXT_NODE&&(C=C.parentElement);let g=C.closest("td, th");if(g){let h=g.closest("table");if(h){let x=ue(h),y=z(x,g);if(y){let{r:E,c:T}=y;if(r.key==="ArrowLeft"){let v=x[E][T-1];if(T===0)return;v&&v!==g&&(v.rowSpan||1)===(g.rowSpan||1)&&z(x,v).r===E&&(v.innerHTML.trim()!==""&&(g.innerHTML=v.innerHTML+"<br/>"+g.innerHTML),g.colSpan=(g.colSpan||1)+(v.colSpan||1),v.parentNode.insertBefore(g,v),v.remove())}else if(r.key==="ArrowRight"){let v=x[E][T+(g.colSpan||1)];v&&v!==g&&(v.rowSpan||1)===(g.rowSpan||1)&&z(x,v).r===E&&(v.innerHTML.trim()!==""&&(g.innerHTML+="<br/>"+v.innerHTML),g.colSpan=(g.colSpan||1)+(v.colSpan||1),v.remove())}else if(r.key==="ArrowUp"){if(E===0)return;let v=x[E-1][T];v&&v!==g&&(v.colSpan||1)===(g.colSpan||1)&&z(x,v).c===T&&(v.innerHTML.trim()!==""&&(g.innerHTML=v.innerHTML+"<br/>"+g.innerHTML),g.rowSpan=(g.rowSpan||1)+(v.rowSpan||1),v.parentNode.insertBefore(g,v),v.remove())}else if(r.key==="ArrowDown"){let v=E+(g.rowSpan||1);if(v>=x.length)return;let w=x[v][T];w&&w!==g&&(w.colSpan||1)===(g.colSpan||1)&&z(x,w).c===T&&(w.innerHTML.trim()!==""&&(g.innerHTML+="<br/>"+w.innerHTML),g.rowSpan=(g.rowSpan||1)+(w.rowSpan||1),w.remove())}n.updateCaretPosition()}}}}}if(r.key==="Tab"){if(ln(r,n),r.defaultPrevented)return;r.preventDefault();let f=document.createTextNode("\xA0\xA0\xA0\xA0");n.state.range.insertNode(f),n.state.range.setStartAfter(f),n.state.range.setEndAfter(f),n.state.selection.removeAllRanges(),n.state.selection.addRange(n.state.range)}if(r.key===" "||r.key==="Enter"){let f=n.state.selection,C=f==null?void 0:f.anchorNode;if(C&&C.nodeType===Node.TEXT_NODE&&!C.parentElement.closest("a")){let g=f.focusOffset,h=C.textContent.slice(0,g),x=h.match(F.TEXT_URL);if(x){let E=x[0].replace(/[.,)]$/,""),T=h.slice(0,x.index),v=C.textContent.slice(g),w=document.createElement("a");w.href=E.toLowerCase().startsWith("http")?E:"https://"+E,w.textContent=E,w.target="_blank";let k=document.createDocumentFragment();T&&k.appendChild(document.createTextNode(T)),k.appendChild(w),v&&k.appendChild(document.createTextNode(v)),C.replaceWith(k);let R=document.createRange();R.setStartAfter(w),R.collapse(!0),f.removeAllRanges(),f.addRange(R),b=!0,n.elements.lastCreatedLink=w}}}if(n.elements.lastCreatedLink&&r.key==="Backspace"){r.preventDefault();let f=document.createTextNode(n.elements.lastCreatedLink.textContent);n.elements.lastCreatedLink.replaceWith(f);let C=document.createRange();C.setStart(f,f.length),C.collapse(!0)}mn(r,n),sn(r,n),b||(n.elements.lastCreatedLink=null),Xt(r,n),Kt(r,n),Qt(r,n),Jt(r,n),en(r,n),a()},d.onkeyup=()=>{qt(event,n)},d.onclick=r=>{var b;if(e.disabled)return;o();let m=r.target;if(n.elements.selectedElement=r.target,pe(e,n),te(e,n),ie(n),((b=r.target.closest("a"))==null?void 0:b.tagName)==="A"){let f=r.target.closest("a");f&&m.tagName!=="IMG"&&(n.elements.selectedElement=f,zt(f,r.pageX,r.pageY,e,n))}m.tagName==="IMG"&&it("image",r.target,e,n),(m.tagName==="TD"||m.tagName==="TH")&&Dt(r.target,e,n),m.tagName==="FIGURE"&&it("figure",r.target,e,n),m.tagName==="LI"&&m.dataset.leksyTocHeadingId&&rn(n,m.dataset.leksyTocHeadingId),Pe(n,e)},d.onpaste=r=>{r.preventDefault();let m=r.clipboardData;if(m.items){for(let f of m.items)if(f.kind==="file"&&f.type.startsWith("image/")){let C=f.getAsFile(),g=new FileReader;g.onload=async function(h){let x=document.createElement("img"),y=h.target.result;x.src=await n.manuplateImage("base64",y),n.insertNode(x)},g.readAsDataURL(C);return}}let b=m.getData("text/html")||m.getData("text/plain");n.elements.iframeWindow.execCommand("insertHtml",!1,Ee(b,e,n))},d.ondrop=r=>{r.preventDefault();let m=r.dataTransfer.getData("text/html")||r.dataTransfer.getData("text/plain");n.elements.iframeWindow.execCommand("insertHtml",!1,Ee(m,e,n))},d.onblur=r=>{n.onBlur(r.target.innerHTML)},c.body.appendChild(d);let p=document.createElement("div");if(p.style.position="absolute",p.style.top="0",c.body.appendChild(p),(u=e.labels)!=null&&u.length){let r=c.createElement("script");r.src="https://cdnjs.cloudflare.com/ajax/libs/tributejs/5.1.3/tribute.js",r.onload=()=>{n.state.tribute=new l.contentWindow.Tribute({values:ct(e.labels),noMatchTemplate:()=>"<li>No match found</li>",menuItemTemplate:m=>m.original.isCategory?`<div class="category">${m.original.key}</div>`:`<div class="item">${m.original.key}</div>`,containerClass:"tribute",selectTemplate:function(m){return m.original.isCategory?null:`<span spellcheck="false" contentEditable="false" data-id="${m.original.value}">${m.original.key}</span>`}}),n.state.tribute.attach(d),i()},c.body.appendChild(r)}else i();c.addEventListener("keydown",n.updateCursorPosition),c.addEventListener("keyup",()=>{Pe(n,e)}),c.addEventListener("mouseup",n.updateCursorPosition),c.addEventListener("mousedown",n.updateCursorPosition),c.addEventListener("selectionchange",n.updateCursorPosition),n.elements.editor=d,n.elements.editorCursor=p,n.elements.iframeWindow=c,n.elements.iframeContainer=l,kt(n,e)}static#s(e,n){let o=document.createElement("div");o.className=`${e.classPrefix}${A.STEPPER}`;let a=document.createElement("ul");a.className="breadcrumb";let s=document.createElement("span");o.appendChild(a),o.appendChild(s),n.elements.base.appendChild(o),n.elements.breadcumb=a,n.elements.status=s,n.elements.stepper=o}},bo=t=>{let e=document.createElement("div");return e.innerHTML=t,e.textContent},yo=t=>{let e=document.createElement("div");return e.innerHTML=t,!e.innerText.trim()&&!e.querySelector("img , ol, ul, blockquote, h1, h2, h3")},Co=ut;export{bo as convertHtmlToText,Co as default,yo as isHTMLEmpty};
479
479
  //# sourceMappingURL=index.mjs.map