@ebl-vue/editor-full 2.31.55 → 2.31.57

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.
Files changed (2) hide show
  1. package/dist/index.mjs +1254 -927
  2. package/package.json +5 -5
package/dist/index.mjs CHANGED
@@ -1,14 +1,20 @@
1
- (function(){"use strict";try{if(typeof document!="undefined"){var e=document.createElement("style");e.appendChild(document.createTextNode(':root{--color-border: #EFF0F1}.ebl-editor{cursor:text;font-size:16px;font-weight:400;background-color:#fff;height:100%;overflow:auto;position:relative;padding-top:15px}.ebl-editor.outline{padding-right:280px}.ebl-editor.outline .codex-editor{-webkit-box-flex:1;-ms-flex:1;flex:1}@media (max-width:1240px){.ebl-outline{display:none}.ebl-editor.outline{padding-right:0}}@media (min-width:1240px){.ebl-editor.readonly .ce-block__content{max-width:100%;padding-left:100px;padding-right:100px}}.ce-toolbar,.ce-inline-toolbar{z-index:1000}.ce-toolbar__plus{border:1px solid #EFF0F1}.ce-toolbar .ce-popover__items,.ce-popover-clone .ce-popover__items{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap}.ce-toolbar .ce-popover__items .ce-popover-item,.ce-popover-clone .ce-popover__items .ce-popover-item{position:relative}.ce-toolbar .ce-popover__items .ce-popover-item__title,.ce-popover-clone .ce-popover__items .ce-popover-item__title{display:none}.ce-toolbar .ce-popover-item-html,.ce-toolbar .ce-popover-item-separator,.ce-toolbar .ce-popover-item[data-item-name=convert-to],.ce-popover-clone .ce-popover-item-html,.ce-popover-clone .ce-popover-item-separator,.ce-popover-clone .ce-popover-item[data-item-name=convert-to]{width:100%}.ce-toolbar .ce-popover-item-html[data-item-name=list-setting],.ce-popover-clone .ce-popover-item-html[data-item-name=list-setting]{width:auto;overflow:hidden}.ce-toolbar .ce-popover-item-html[data-item-name=list-setting-start-with],.ce-popover-clone .ce-popover-item-html[data-item-name=list-setting-start-with]{border-radius:6px;padding:3px}.ce-toolbar .ce-popover-item-html[data-item-name=list-setting-start-with]:hover,.ce-popover-clone .ce-popover-item-html[data-item-name=list-setting-start-with]:hover{background-color:#f8f8f8}.ce-toolbar .ce-popover-item[data-item-name=convert-to] .ce-popover-item__title,.ce-popover-clone .ce-popover-item[data-item-name=convert-to] .ce-popover-item__title{display:block}.ce-toolbar .ce-popover-item[data-item-name=add-below],.ce-popover-clone .ce-popover-item[data-item-name=add-below]{width:100%}.ce-toolbar .ce-popover-item[data-item-name=add-below] .ce-popover-item__title,.ce-popover-clone .ce-popover-item[data-item-name=add-below] .ce-popover-item__title{display:block}.ce-toolbar .ce-popover-item[data-item-name=list-setting],.ce-popover-clone .ce-popover-item[data-item-name=list-setting]{width:100%}.ce-toolbar .ce-popover-item[data-item-name=list-setting] .ce-popover-item__title,.ce-popover-clone .ce-popover-item[data-item-name=list-setting] .ce-popover-item__title{display:block}.ce-popover--inline .ce-popover-item-html{padding:0 2px}.ce-inline-toolbar .ce-popover__items{display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important}.ce-inline-toolbar .ce-popover__items{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap}.ce-inline-toolbar .ce-popover__items .ce-popover-item__title{display:none}.ebl-editor ::-webkit-scrollbar{width:6px;height:6px}.ebl-editor ::-webkit-scrollbar-track{background:#f1f1f1;border-radius:1px}.ebl-editor ::-webkit-scrollbar-thumb{background:silver;border-radius:10px;border:1px solid #fff}.ebl-editor ::-webkit-scrollbar-thumb:hover{background:#555}.cdx-notifies{left:50%!important}.cdx-notifies{-webkit-transform:translateX(-50%);transform:translate(-50%);top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.ebl-er-doc-outline-item{padding:7px 24px;cursor:pointer;white-space:normal;word-wrap:break-word}.ebl-er-doc-outline-item:hover{background-color:#f6f6f6}.ebl-er-doc-outline-item.selected{background-color:#ebebeb}.ebl-outline .level_1{padding-left:24px}.ebl-outline .level_2{padding-left:42px}.ebl-outline .level_3{padding-left:60px}.ce-popover--inline .ce-popover--nested .ce-popover__container{width:-webkit-min-content!important;width:-moz-min-content!important;width:min-content!important;min-width:0!important;min-width:initial!important}.ce-popover--inline .ce-popover--nested .ce-popover__items{width:-webkit-max-content;width:-moz-max-content;width:max-content}.editorjs__color-selector-container{display:grid;grid-gap:10px;padding:4px}.editorjs__color-selector__container-item{width:30px;height:30px;display:block;cursor:pointer;border-radius:100%;-webkit-transition:-webkit-transform .2s ease;transition:-webkit-transform .2s ease;transition:transform .2s ease;transition:transform .2s ease,-webkit-transform .2s ease}.editorjs__color-selector__container-item:hover{-webkit-transform:scale(1.1);transform:scale(1.1)}.cel-inline-bold{font-weight:700}.cel-inline-strikethrough{-webkit-text-decoration:line-through;text-decoration:line-through}.cel-inline-italic{font-style:italic}.cel-inline-code{margin-left:2px;margin-right:2px;background-color:#f5f6f7;border:1px solid #dee0e3;border-color:#dee0e3;border-width:1px 0;border-radius:4px;padding:1px 5px 1px 4px}.cel-inline-underline{-webkit-text-decoration:underline;text-decoration:underline}.cel-inline-underline.cel-inline-strikethrough{-webkit-text-decoration:underline line-through;text-decoration:underline line-through}.cel-inline-mark{background-color:#ff0;padding:2px}.cel-inline-link-input-wrap{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;gap:5px}.cel-inline-link-input{-webkit-box-flex:1;-ms-flex:1;flex:1;background:#f8f8f8;border:1px solid rgba(226,226,229,.2);border-radius:6px;padding:4px 8px;font-size:14px;line-height:22px;outline:none;margin:0;width:100%;-webkit-box-sizing:border-box;box-sizing:border-box;font-weight:500;font-family:inherit}.cel-inline-link-input-btn{width:50px;border-radius:5px;background-color:#161c27;color:#fff;border:none;cursor:pointer}.cel-inline-link-input-btn.disabled{opacity:.4;cursor:not-allowed}.cel-fake-background{background-color:#a8d6ff}.editorjs__color-selector__input{width:1px;height:1px;opacity:0}.editorjs__color-selector__container-item-none{background-color:transparent;border:1px solid #e6e6e6;position:relative}.editorjs__color-selector__container-item-none:before{content:"";position:absolute;top:50%;left:50%;width:1px;height:35px;background-color:#e6e6e6;-webkit-transform:translate(-50%,-50%) rotate(45deg);transform:translate(-50%,-50%) rotate(45deg)}.cel-inline-gray-text{color:#646a73}.cel-inline-pink-text{color:#d83931}.cel-inline-orange-text{color:#de7802}.cel-inline-yellow-text{color:#dc9b04}.cel-inline-green-text{color:#2ea121}.cel-inline-blue-text{color:#245bdb}.cel-inline-purple-text{color:#6425d0}.ebl-er-doc{font-family:var(--font-family);font-size:16px;font-weight:400;-webkit-box-sizing:border-box;box-sizing:border-box}.ebl-er-header{height:var(--ebl-er-header-height);-webkit-box-sizing:border-box;box-sizing:border-box;position:sticky;top:0;z-index:10}.ebl-er-footer{height:var(--ebl-er-footer-height);-webkit-box-sizing:border-box;box-sizing:border-box}.ebl-er-container{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;min-height:calc(100vh - var(--ebl-er-header-height))}.ebl-er-doc-menu{width:var(--ebl-er-doc-menu-width);-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-negative:0;flex-shrink:0;height:calc(100vh - var(--ebl-er-header-height));position:sticky;top:var(--ebl-er-header-height)}.ebl-er-doc-menu-content{-webkit-box-sizing:border-box;box-sizing:border-box}.ebl-er-doc-content{-webkit-box-sizing:border-box;box-sizing:border-box;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;max-width:calc(100% - var(--ebl-er-doc-menu-width));-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1}.ebl-er-doc-content-container{-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-box-flex:1;-ms-flex:1;flex:1;padding:0 50px 50px;width:100%;overflow-x:hidden;white-space:normal;word-wrap:break-word}.ebl-er-doc-content-inner-wrap{margin:0 auto}.ebl-er-doc-content-inner .ce-block{width:100%}.ebl-er-doc-outline{width:280px;-webkit-box-sizing:border-box;box-sizing:border-box;height:calc(100vh - var(--ebl-er-header-height));position:sticky;top:var(--ebl-er-header-height);overflow:auto;padding:12px}.ebl-er-doc-pre-next{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:33px 0}@media (max-width:960px){.ebl-er-doc-outline{display:none}}.ebl-er-doc ::-webkit-scrollbar{width:6px;height:6px}.ebl-er-doc ::-webkit-scrollbar-track{background:#f1f1f1;border-radius:1px}.ebl-er-doc ::-webkit-scrollbar-thumb{background:silver;border-radius:10px;border:1px solid #fff}.ebl-er-doc ::-webkit-scrollbar-thumb:hover{background:#555}.ce-el-link-wrapper{position:absolute;z-index:1000;width:auto;max-width:300px;height:46px;padding:6px 20px;border:1px solid #eff0f1;border-radius:6px;background-color:#fff;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}.ce-el-link-input{border:1px solid rgba(226,226,229,.2);border-radius:6px;padding:4px 8px;background-color:#f8f8f8;font-size:12px;line-height:22px;margin:0;-webkit-box-flex:1;-ms-flex:1;flex:1;width:260px}.ce-el-link-input.ce-el-link__noedit{display:none}.ce-el-link-btn-wrap{width:50px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}.ce-el-link-btn{width:50px;background-color:#161c27;color:#fff;border-radius:6px;margin-left:5px;display:block}.ce-el-link-btn.ce-el-link__noedit{display:none}.ce-el-link-icon-btn{width:24px;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;margin-left:5px;cursor:pointer;display:none}.ce-el-link-icon-btn.ce-el-link__noedit{display:-webkit-box;display:-ms-flexbox;display:flex}.ce-el-link-input-text{padding-right:20px;display:none}.ce-el-link-input-text.ce-el-link__noedit{display:block}.ce-block--drop-target .ce-block__content:before{content:"";position:absolute;top:50%;left:-20px;margin-top:-1px;height:8px;width:8px;border:solid #a0a0a0;border-width:1px 1px 0 0;-webkit-transform-origin:right;transform-origin:right;-webkit-transform:rotate(45deg);transform:rotate(45deg)}.ce-block--drop-target .ce-block__content:after{background:none}.ce-header{padding:15px 0 3px;margin:0;line-height:1.25;outline:none}.ce-header p,.ce-header div{padding:0!important;margin:0!important}.ce-tune-alignment--right{text-align:right}.ce-tune-alignment--center{text-align:center}.ce-tune-alignment--left{text-align:left}.ce-paragraph{line-height:2!important}.ce-paragraph{outline:none}.ce-block:only-of-type .ce-paragraph[data-placeholder-active]:empty:before,.ce-block:only-of-type .ce-paragraph[data-placeholder-active][data-empty=true]:before{content:attr(data-placeholder-active)}.ce-paragraph p:first-of-type{margin-top:0}.ce-paragraph p:last-of-type{margin-bottom:0}.ce-editorjs-x-shiki{border-radius:10px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;margin:10px 0;border:2px solid transparent;position:relative}.ce-editorjs-x-shiki.editable:hover{border:2px solid #C0C0C0}.ce-editorjs-x-shiki__lang{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;padding:8px}.ce-editorjs-x-shiki__code{position:relative;float:left;min-width:100%;overflow:hidden;height:auto;min-height:60px}.ce-editorjs-x-shiki__code__dragHandler{position:absolute;left:50%;-webkit-transform:translateX(-50%);transform:translate(-50%);bottom:-5px;cursor:ns-resize;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;height:8px;width:60px;background-color:silver;border-radius:5px;display:none}.ce-editorjs-x-shiki:hover .ce-editorjs-x-shiki__code__dragHandler{display:block}.ce-editorjs-x-shiki__selector{display:-webkit-box;display:-ms-flexbox;display:flex;gap:15px;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;border-bottom-style:solid;border-color:#9ca3af0d;border-bottom-width:1px;padding:0 8px 8px}.ce-editorjs-x-shiki__selector-language,.ce-editorjs-x-shiki__selector-theme{font-size:13px;font-family:inherit}.ce-editorjs-x-shiki__selector-language{width:90px}.ce-editorjs-x-shiki__selector select{border:none;outline:none}.ce-editorjs-x-shiki__span{position:relative;z-index:0;padding:20px 20px 20px 55px;margin:0;white-space:pre;font-size:13px;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.ce-editorjs-x-shiki__span code{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.ce-editorjs-x-shiki__textarea{all:unset;white-space:pre;background-color:transparent;position:absolute;padding:20px 20px 20px 55px;inset:0;color:transparent;z-index:0;font-size:13px;caret-color:#999;resize:none;border:none;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.ce-editorjs-x-shiki__textarea::-moz-selection{background-color:#083ca9;color:#fff}.ce-editorjs-x-shiki__textarea::selection{background-color:#083ca9;color:#fff}.ce-editorjs-x-shiki__copy{width:24px;height:24px;cursor:pointer;position:relative;margin-right:0}.ce-editorjs-x-shiki__copy_tip{font-size:12px;width:60px;margin-left:-20px;background-color:#0c0c0c;color:#ececec;text-align:center;border-radius:6px;padding:5px 10px;position:absolute;z-index:1;top:125%;-webkit-transition:opacity .3s;transition:opacity .3s;visibility:hidden;opacity:0}.ce-editorjs-x-shiki__copy_tip:after{content:"";position:absolute;bottom:100%;left:50%;margin-left:-5px;border-width:5px;border-style:solid;border-color:transparent transparent #0c0c0c transparent}.ce-editorjs-x-shiki__copy_tip.visible{visibility:visible;opacity:1}.ce-editorjs-x-shiki__span.shiki .line:before{content:attr(data-line);width:40px;display:inline-block;text-align:right;color:#888;position:absolute;left:0}.ce-editorjs-x-shiki__code ::-webkit-scrollbar{width:8px;height:8px}.ce-editorjs-x-shiki__code ::-webkit-scrollbar-track{background:#22272e;border-radius:1px}.ce-editorjs-x-shiki__code ::-webkit-scrollbar-thumb{background:silver;border-radius:10px;border:2px solid #22272e}.ce-editorjs-x-shiki__code ::-webkit-scrollbar-thumb:hover{background:#555}.ce-block--selected .ce-editorjs-x-shiki{outline:2px solid #4299e1}.ce-block--selected .ce-editorjs-x-shiki,.ce-block--selected .ce-editorjs-x-shiki__selector-language,.ce-block--selected .ce-editorjs-x-shiki__span{background-color:#e1f2ff!important}.cdx-quote{overflow:hidden;margin:0;-webkit-box-sizing:border-box;box-sizing:border-box;word-wrap:break-word;word-break:break-all}.cdx-quote blockquote{margin:0}.cdx-block-quote{border:solid #acacac;border-width:0 0 0 3px;-webkit-box-shadow:none;box-shadow:none;color:#666;line-height:1.6em;padding:1px 0 0 12px}.ce-delimiter__line__wrapper{height:24px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.ce-delimiter__line{-webkit-box-flex:1;-ms-flex:1;flex:1;height:2px;background-color:#eff0f1}.cdx-list{margin:0;padding:0;outline:none;display:grid;counter-reset:item;grid-gap:var(--spacing-s);padding:var(--spacing-xs);--spacing-s: 8px;--spacing-xs: 6px;--list-counter-type: numeric;--radius-border: 5px;--checkbox-background: #fff;--color-border: #C9C9C9;--color-bg-checked: #369FFF;--line-height: 1.45em;--color-bg-checked-hover: #0059AB;--color-tick: #fff;--size-checkbox: 1.2em}.cdx-list ol{padding-left:0}.cdx-list__item{line-height:var(--line-height);display:grid;grid-template-columns:auto 1fr;grid-template-rows:auto auto;grid-template-areas:"checkbox content" ". child"}.cdx-list__item-children{display:grid;grid-area:child;grid-gap:var(--spacing-s);padding-top:var(--spacing-s)}.cdx-list__item [contenteditable]{outline:none}.cdx-list__item-content{word-break:break-word;white-space:pre-wrap;grid-area:content;padding-left:var(--spacing-s)}.cdx-list__item:before{counter-increment:item;white-space:nowrap}.cdx-list-ordered .cdx-list__item:before{content:counters(item,".",var(--list-counter-type)) "."}.cdx-list-ordered{counter-reset:item}.cdx-list-unordered{padding-left:0}.cdx-list-unordered .cdx-list__item:before{content:"•"}.cdx-list-checklist .cdx-list__item:before{content:""}.cdx-list__settings .cdx-settings-button{width:50%}.cdx-list__checkbox{padding-top:calc((var(--line-height) - var(--size-checkbox)) / 2);grid-area:checkbox;width:var(--size-checkbox);height:var(--size-checkbox);display:-webkit-box;display:-ms-flexbox;display:flex;cursor:pointer}.cdx-list__checkbox svg{opacity:0;height:var(--size-checkbox);width:var(--size-checkbox);left:-1px;top:-1px;position:absolute}@media (hover: hover){.cdx-list__checkbox:not(.cdx-list__checkbox--no-hover):hover .cdx-list__checkbox-check svg{opacity:1}}.cdx-list__checkbox--checked{line-height:var(--line-height)}@media (hover: hover){.cdx-list__checkbox--checked:not(.cdx-list__checkbox--checked--no-hover):hover .cdx-checklist__checkbox-check{background:var(--color-bg-checked-hover);border-color:var(--color-bg-checked-hover)}}.cdx-list__checkbox--checked .cdx-list__checkbox-check{background:var(--color-bg-checked);border-color:var(--color-bg-checked)}.cdx-list__checkbox--checked .cdx-list__checkbox-check svg{opacity:1}.cdx-list__checkbox--checked .cdx-list__checkbox-check svg path{stroke:var(--color-tick)}.cdx-list__checkbox--checked .cdx-list__checkbox-check:before{opacity:0;visibility:visible;-webkit-transform:scale(2.5);transform:scale(2.5)}.cdx-list__checkbox-check{cursor:pointer;display:inline-block;position:relative;margin:0 auto;width:var(--size-checkbox);height:var(--size-checkbox);-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:var(--radius-border);border:1px solid var(--color-border);background:var(--checkbox-background)}.cdx-list__checkbox-check:before{content:"";position:absolute;inset:0;border-radius:100%;background-color:var(--color-bg-checked);visibility:hidden;pointer-events:none;-webkit-transform:scale(1);transform:scale(1);-webkit-transition:opacity .4s,-webkit-transform .4s ease-out;transition:opacity .4s,-webkit-transform .4s ease-out;transition:transform .4s ease-out,opacity .4s;transition:transform .4s ease-out,opacity .4s,-webkit-transform .4s ease-out}.cdx-list__checkbox-check--disabled{pointer-events:none}.cdx-list-start-with-field{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;overflow:hidden;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.cdx-list-start-with-field--invalid{background:#ffeced;border:1px solid #E13F3F}.cdx-list-start-with-field:hover{background-color:#f8f8f8}.cdx-list-start-with-field--invalid .cdx-list-start-with-field__input{color:#e13f3f}.cdx-list-start-with-field__startlabel{width:70px;font-size:14px}.cdx-list-start-with-field__input-wrapper{-webkit-box-flex:1;-ms-flex:1;flex:1;overflow:hidden}.cdx-list-start-with-field__input{font-size:14px;outline:none;font-weight:500;font-family:inherit;border:0;background:transparent;margin:0;line-height:22px;-webkit-box-flex:1;-ms-flex:1;flex:1;border:1px solid rgba(226,226,229,1);border-radius:6px;padding:0 10px;width:50px;text-align:center}.cdx-list-start-with-field__input::-webkit-input-placeholder{color:var(--grayText);font-weight:500}.cdx-list-start-with-field__input::-moz-placeholder{color:var(--grayText);font-weight:500}.cdx-list-start-with-field__input:-ms-input-placeholder{color:var(--grayText);font-weight:500}.cdx-list-start-with-field__input::-ms-input-placeholder{color:var(--grayText);font-weight:500}.cdx-list-start-with-field__input::placeholder{color:var(--grayText);font-weight:500}.cdx-alert{position:relative;padding:10px;border-radius:5px;margin-bottom:10px;margin-top:10px}.cdx-alert-primary{background-color:#ebf8ff;border:1px solid #4299e1;color:#2b6cb0}.cdx-alert-secondary{background-color:#f7fafc;border:1px solid #cbd5e0;color:#222731}.cdx-alert-info{background-color:#e6fdff;border:1px solid #4cd4ce;color:#00727c}.cdx-alert-success{background-color:#f0fff4;border:1px solid #68d391;color:#2f855a}.cdx-alert-warning{background-color:#fffaf0;border:1px solid #ed8936;color:#c05621}.cdx-alert-danger{background-color:#fff5f5;border:1px solid #fc8181;color:#c53030}.cdx-alert-light{background-color:#fff;border:1px solid #edf2f7;color:#1a202c}.cdx-alert-dark{background-color:#2d3748;border:1px solid #1a202c;color:#d3d3d3}.cdx-alert-align-left{text-align:left}.cdx-alert-align-center{text-align:center}.cdx-alert-align-right{text-align:right}.cdx-alert__message{outline:none}.cdx-alert [contentEditable=true][data-placeholder]:before{position:absolute;content:attr(data-placeholder);color:#707684;font-weight:400;opacity:0}.cdx-alert [contentEditable=true][data-placeholder]:empty:before{opacity:1}.cdx-alert [contentEditable=true][data-placeholder]:empty:focus:before{opacity:0}.ce-popover__item[data-item-name=alert-primary] .ce-popover__item-icon svg #background{fill:#ebf8ff;stroke:#4299e1}.ce-popover__item[data-item-name=alert-primary] .ce-popover__item-icon svg #content{fill:#2b6cb0}.ce-popover__item[data-item-name=alert-secondary] .ce-popover__item-icon svg #background{fill:#f7fafc;stroke:#cbd5e0}.ce-popover__item[data-item-name=alert-secondary] .ce-popover__item-icon svg #content{fill:#222731}.ce-popover__item[data-item-name=alert-info] .ce-popover__item-icon svg #background{fill:#e6fdff;stroke:#4cd4ce}.ce-popover__item[data-item-name=alert-info] .ce-popover__item-icon svg #content{fill:#00727c}.ce-popover__item[data-item-name=alert-success] .ce-popover__item-icon svg #background{fill:#f0fff4;stroke:#68d391}.ce-popover__item[data-item-name=alert-success] .ce-popover__item-icon svg #content{fill:#2f855a}.ce-popover__item[data-item-name=alert-warning] .ce-popover__item-icon svg #background{fill:#fffaf0;stroke:#ed8936}.ce-popover__item[data-item-name=alert-warning] .ce-popover__item-icon svg #content{fill:#c05621}.ce-popover__item[data-item-name=alert-danger] .ce-popover__item-icon svg #background{fill:#fff5f5;stroke:#fc8181}.ce-popover__item[data-item-name=alert-danger] .ce-popover__item-icon svg #content{fill:#c53030}.ce-popover__item[data-item-name=alert-light] .ce-popover__item-icon svg #background{fill:#fff;stroke:#edf2f7}.ce-popover__item[data-item-name=alert-light] .ce-popover__item-icon svg #content{fill:#1a202c}.ce-popover__item[data-item-name=alert-dark] .ce-popover__item-icon svg #background{fill:#2d3748;stroke:#1a202c}.ce-popover__item[data-item-name=alert-dark] .ce-popover__item-icon svg #content{fill:#d3d3d3}.cdx-alert_setting__icon_wrapper{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:10px}.cdx-alert_setting__icon_wrapper_align{margin-top:10px}.cdx-alert_setting__icon{display:inline-block;width:24px;height:24px;text-align:center;line-height:24px;cursor:pointer}.cdx-alert_setting__icon_active{opacity:.3}.ce-block--selected .cdx-alert{outline:2px solid #4299e1}.ce-popover-indent-item{cursor:default!important}.ce-popover-indent-item{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:3px}.ce-popover-indent-item[version^="2.26"]{gap:10px}.ce-popover-indent-item:hover{background-color:transparent!important}.ce-popover-indent-item .ce-popover-item__icon{width:26px;height:26px;cursor:pointer;will-change:background-color,color;transition:.3s background-color,.3s color;padding:0;border-width:0px;color:#000;background-color:#fff;border-radius:5px;-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;-o-border-radius:5px;-webkit-transition:.3s background-color,.3s color;-moz-transition:.3s background-color,.3s color;-ms-transition:.3s background-color,.3s color;-o-transition:.3s background-color,.3s color}.ce-popover-indent-item .ce-popover-item--disabled{color:#707684;opacity:.3;cursor:default}.ce-popover-indent-item .ce-popover-item__icon:focus{outline:none}.ce-popover-indent-item[version^="2.26"]:hover .ce-popover-item__icon,.ce-popover-indent-item[version^="2.27"]:hover .ce-popover-item__icon,.ce-popover-indent-item[version^="2.28"]:hover .ce-popover-item__icon,.ce-popover-indent-item[version^="2.29"]:hover .ce-popover-item__icon,.ce-popover-indent-item[version^="2.26"] .ce-popover-item__icon,.ce-popover-indent-item[version^="2.27"] .ce-popover-item__icon,.ce-popover-indent-item[version^="2.28"] .ce-popover-item__icon,.ce-popover-indent-item[version^="2.29"] .ce-popover-item__icon{box-shadow:0 0 0 1px #c9c9cc7a!important;-webkit-box-shadow:0 0 0 1px rgba(201,201,204,.48)!important}.ce-popover-indent-item[version^="2.26"] .ce-popover-item__icon:hover,.ce-popover-indent-item[version^="2.27"] .ce-popover-item__icon:hover,.ce-popover-indent-item[version^="2.28"] .ce-popover-item__icon:hover,.ce-popover-indent-item[version^="2.29"] .ce-popover-item__icon:hover{background-color:#eff2f5}.ce-highlight-indent{display:inline-block;height:1.6em;top:50%;position:absolute;transform:translateY(-50%);-webkit-transform:translate(0px,-50%);-moz-transform:translate(0px,-50%);-ms-transform:translate(0px,-50%);-o-transform:translate(0px,-50%)}.ce-popover-indent-item[version^="2.3"] .ce-popover-item__title{margin-left:4px}.tc-wrap{--color-background: #f9f9fb;--color-text-secondary: #7b7e89;--color-border: #e8e8eb;--cell-size: 34px;--toolbox-icon-size: 18px;--toolbox-padding: 6px;--toolbox-aiming-field-size: calc(var(--toolbox-icon-size) + var(--toolbox-padding)*2);--col-width: 100px 100px 100px;position:relative;height:100%;margin-top:var(--toolbox-icon-size);-webkit-box-sizing:border-box;box-sizing:border-box;display:inline-grid;z-index:0}.tc-wrap svg{vertical-align:top}@media print{.tc-wrap{border-left-color:var(--color-border);border-left-style:solid;border-left-width:1px}}@media print{.tc-wrap .tc-row:after{display:none}}.tc-table{position:relative;width:100%;height:100%;display:grid;font-size:14px;border-top:1px solid var(--color-border);border-left:1px solid var(--color-border);line-height:1.4;overflow-x:auto}.tc-table:after{width:calc(var(--cell-size));height:100%;left:calc(var(--cell-size)*-1);top:0}.tc-table:after,.tc-table:before{position:absolute;content:""}.tc-table:before{width:100%;height:var(--toolbox-aiming-field-size);top:calc(var(--toolbox-aiming-field-size)*-1);left:0}.tc-table--heading .tc-row:first-child{font-weight:600;border-bottom:2px solid var(--color-border);position:sticky;top:0;z-index:2;background:var(--color-background)}.tc-table--heading .tc-row:first-child [contenteditable]:empty:before{content:attr(heading);color:var(--color-text-secondary)}.tc-table--heading .tc-row:first-child:after{bottom:-2px;border-bottom:2px solid var(--color-border)}.tc-add-column,.tc-add-row{display:-webkit-box;display:-ms-flexbox;display:flex;color:var(--color-text-secondary)}@media print{.tc-add{display:none}}.tc-add-column{display:grid;border-top:1px solid var(--color-border);grid-auto-rows:var(--cell-size);-webkit-box-align:center;-ms-flex-align:center;align-items:center;justify-items:center}.tc-add-column svg{padding:5px;position:sticky;top:0;background-color:var(--color-background)}.tc-add-column--disabled{visibility:hidden}@media print{.tc-add-column{display:none}}.tc-add-row{height:var(--cell-size);-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding-left:4px;position:relative}.tc-add-row--disabled{display:none}.tc-add-row:before{content:"";position:absolute;right:calc(var(--cell-size)*-1);width:var(--cell-size);height:100%}@media print{.tc-add-row{display:none}}.tc-add-column,.tc-add-row{-webkit-transition:0s;transition:0s;cursor:pointer;will-change:background-color}.tc-add-column:hover,.tc-add-row:hover{-webkit-transition:background-color .1s ease;transition:background-color .1s ease;background-color:var(--color-background)}.tc-add-row{margin-top:1px}.tc-add-row:hover:before{-webkit-transition:.1s;transition:.1s;background-color:var(--color-background)}.tc-row{display:grid;grid-template-columns:var(--col-width);position:relative;border-bottom:1px solid var(--color-border)}.tc-row--selected{background:var(--color-background)}.tc-row--selected:after{background:var(--color-background)}.tc-cell{border-right:1px solid var(--color-border);padding:6px 12px;overflow:hidden;outline:none;line-break:normal}.tc-cell--selected{background:var(--color-background)}.tc-wrap--readonly .tc-row:after{display:none}.tc-toolbox{--toolbox-padding: 6px;--popover-margin: 30px;--toggler-click-zone-size: 30px;--toggler-dots-color: #7b7e89;--toggler-dots-color-hovered: #1d202b;position:absolute;cursor:pointer;z-index:1;opacity:0;-webkit-transition:opacity .1s;transition:opacity .1s;will-change:left,opacity}.tc-toolbox--column{top:calc(var(--toggler-click-zone-size)*-1);-webkit-transform:translate(calc(var(--toggler-click-zone-size)*-1/2));transform:translate(calc(var(--toggler-click-zone-size)*-1/2));will-change:left,opacity}.tc-toolbox--row{left:calc(var(--popover-margin)*-1);-webkit-transform:translateY(calc(var(--toggler-click-zone-size)*-1/2));transform:translateY(calc(var(--toggler-click-zone-size)*-1/2));margin-top:-1px;will-change:top,opacity}.tc-toolbox--showed{opacity:1}.tc-toolbox .tc-popover{position:absolute;top:0;left:var(--popover-margin)}.tc-toolbox__toggler{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;width:var(--toggler-click-zone-size);height:var(--toggler-click-zone-size);color:var(--toggler-dots-color);opacity:0;-webkit-transition:opacity .15s ease;transition:opacity .15s ease;will-change:opacity}.tc-toolbox__toggler:hover{color:var(--toggler-dots-color-hovered)}.tc-toolbox__toggler svg{fill:currentColor}.tc-wrap:hover .tc-toolbox__toggler{opacity:1}.tc-settings .cdx-settings-button{width:50%;margin:0}.tc-popover{--color-border: #eaeaea;--color-background: #fff;--color-background-hover: rgba(232, 232, 235, .49);--color-background-confirm: #e24a4a;--color-background-confirm-hover: #d54040;--color-text-confirm: #fff;background:var(--color-background);border:1px solid var(--color-border);-webkit-box-shadow:0 3px 15px -3px rgba(13,20,33,.12941);box-shadow:0 3px 15px -3px #0d142121;border-radius:6px;padding:6px;display:none;will-change:opacity,transform}.tc-popover--opened{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-animation:menuShowing .1s cubic-bezier(.215,.61,.355,1) forwards;animation:menuShowing .1s cubic-bezier(.215,.61,.355,1) forwards}.tc-popover__item{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:2px 14px 2px 2px;border-radius:5px;cursor:pointer;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.tc-popover__item:hover{background:var(--color-background-hover)}.tc-popover__item:not(:last-of-type){margin-bottom:2px}.tc-popover__item-icon{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;width:26px;height:26px;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;background:var(--color-background);border-radius:5px;border:1px solid var(--color-border);margin-right:8px}.tc-popover__item-label{line-height:22px;font-size:14px;font-weight:500}.tc-popover__item--confirm{background:var(--color-background-confirm);color:var(--color-text-confirm)}.tc-popover__item--confirm:hover{background-color:var(--color-background-confirm-hover)}.tc-popover__item--confirm .tc-popover__item-icon{background:var(--color-background-confirm);border-color:#0000001a}.tc-popover__item--confirm .tc-popover__item-icon svg{-webkit-transition:-webkit-transform .2s ease-in;transition:-webkit-transform .2s ease-in;transition:transform .2s ease-in;transition:transform .2s ease-in,-webkit-transform .2s ease-in;-webkit-transform:rotate(90deg) scale(1.2);transform:rotate(90deg) scale(1.2)}.tc-popover__item--hidden{display:none}@-webkit-keyframes menuShowing{0%{opacity:0;-webkit-transform:translateY(-8px) scale(.9);transform:translateY(-8px) scale(.9)}70%{opacity:1;-webkit-transform:translateY(2px);transform:translateY(2px)}to{-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes menuShowing{0%{opacity:0;-webkit-transform:translateY(-8px) scale(.9);transform:translateY(-8px) scale(.9)}70%{opacity:1;-webkit-transform:translateY(2px);transform:translateY(2px)}to{-webkit-transform:translateY(0);transform:translateY(0)}}.cell-resizable{cursor:col-resize}.image-tool{--bg-color: #cdd1e0;--front-color: #388ae5;--border-color: #e8e8eb;display:inline-block}.image-tool__image{border-radius:3px;overflow:hidden;margin-bottom:10px;padding-bottom:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none}.image-tool__image-picture{max-width:100%;vertical-align:bottom;display:inline-block;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none}.image-tool__image-preloader{width:150px;height:150px;border-radius:50%;background-size:cover;margin:auto;position:relative;background-color:var(--bg-color);background-position:center center}.image-tool__image-preloader:after{content:"";position:absolute;z-index:3;width:60px;height:60px;border-radius:50%;border:2px solid var(--bg-color);border-top-color:var(--front-color);left:50%;top:50%;margin-top:-30px;margin-left:-30px;-webkit-animation:image-preloader-spin 2s infinite linear;animation:image-preloader-spin 2s infinite linear;-webkit-box-sizing:border-box;box-sizing:border-box}.image-tool__caption{visibility:hidden;position:absolute;bottom:0;left:0;margin-bottom:10px}.image-tool__caption[contentEditable=true][data-placeholder]:before{position:absolute!important}.image-tool__caption[contentEditable=true][data-placeholder]:before{content:attr(data-placeholder);color:#707684;font-weight:400;display:none}.image-tool__caption[contentEditable=true][data-placeholder]:empty:before{display:block}.image-tool__caption[contentEditable=true][data-placeholder]:empty:focus:before{display:none}.image-tool--empty .image-tool__image,.image-tool--empty .image-tool__image-preloader{display:none}.image-tool--empty .image-tool__caption,.image-tool--uploading .image-tool__caption{visibility:hidden!important}.image-tool .cdx-button{display:none;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.image-tool .cdx-button svg{height:auto;margin:0 6px 0 0}.image-tool--filled .cdx-button,.image-tool--filled .image-tool__image-preloader{display:none}.image-tool--uploading{width:100%}.image-tool--uploading .resizable{display:none!important}.image-tool--uploading .image-tool__image{min-height:200px;display:-webkit-box;display:-ms-flexbox;display:flex;background-color:#fff}.image-tool--uploading .image-tool__image-picture,.image-tool--uploading .cdx-button{display:none}.image-tool--withBorder .image-tool__image{border:1px solid var(--border-color)}.image-tool--withBackground .image-tool__image{padding:15px;background:var(--bg-color)}.image-tool--withBackground .image-tool__image-picture{max-width:60%;margin:0 auto}.image-tool--stretched .image-tool__image-picture{width:100%}.image-tool--caption .image-tool__caption{visibility:visible}.image-tool--caption{padding-bottom:50px}@-webkit-keyframes image-preloader-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes image-preloader-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.cdx-image-tool-tune--floatLeft .cdx-block,.cdx-image-tool-tune--center .cdx-block,.cdx-image-tool-tune--floatRight .cdx-block,.cdx-image-tool-tune--floatLeft .image-tool__image,.cdx-image-tool-tune--center .image-tool__image,.cdx-image-tool-tune--floatRight .image-tool__image{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center}:root{--primary: #2492F5;--primary-content: #E9F4FE}.cdx-settings-button--active{background:#e9f4fe;color:#2492f5}.cdx-settings-button:hover{background:#e9f4fe}.cdx-image-tool-tune--center{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}@media all and (min-width: 470px){.codex-editor:not(.read-only) .cdx-image-tool-tune--floatLeft.ce-block__content,.codex-editor:not(.read-only) .cdx-image-tool-tune--floatRight.ce-block__content{min-height:20px}.cdx-image-tool-tune--floatLeft.ce-block__content .image-tool__image,.cdx-image-tool-tune--floatRight.ce-block__content .image-tool__image{margin-top:40px}.cdx-image-tool-tune--floatLeft.ce-block__content .image-tool__image{margin-left:20px}.cdx-image-tool-tune--floatRight.ce-block__content .image-tool__image{margin-right:20px}.cdx-image-tool-tune--floatLeft.ce-block__content .cdx-input,.cdx-image-tool-tune--floatRight.ce-block__content .cdx-input{width:calc(100% - 20px)}.cdx-image-tool-tune--floatLeft.ce-block__content .cdx-input{margin-left:20px}.cdx-image-tool-tune--floatRight.ce-block__content .cdx-input{margin-right:20px}.cdx-image-tool-tune--floatLeft .cdx-block{float:left;margin-right:10px}.cdx-image-tool-tune--floatRight .cdx-block{float:right;margin-left:10px}.cdx-image-tool-tune--sizeSmall .cdx-block{max-width:25%!important}.cdx-image-tool-tune--sizeMiddle .cdx-block{max-width:50%!important}.cdx-image-tool-tune--sizeLarge .cdx-block{max-width:75%!important}}.cdx-image-tool-tune--sizeLarge img,.cdx-image-tool-tune--sizeSmall img,.cdx-image-tool-tune--sizeMiddle img{-o-object-fit:cover;object-fit:cover;max-width:100%}.codex-editor.read-only .cdx-input.image-tool__caption:empty,.read-only>.codex-editor .cdx-input.image-tool__caption:empty{display:none}.cdx-image-tool-tune--resize .cdx-block{position:relative;overflow:visible}.cdx-image-tool-tune--resize .cdx-block .resizable{display:none}.cdx-image-tool-tune--resize .image-tool__image-picture{width:100%!important}.cdx-image-tool-tune--resize .cdx-block:hover .resizable{display:block}.cdx-image-tool-tune--resize .cdx-block .resizable .resizers .resizer{-webkit-box-sizing:border-box;box-sizing:border-box;width:14px;height:14px;border-radius:50%;background:#e9f4fe;border:3px solid #2492F5;position:absolute}.cdx-image-tool-tune--resize .cdx-block .resizable .resizers .resizer.top-left{left:-8px;top:2px;cursor:nwse-resize}.cdx-image-tool-tune--resize .cdx-block .resizable .resizers .resizer.top-right{right:-8px;top:1px;cursor:nesw-resize}.cdx-image-tool-tune--resize .cdx-block .resizable .resizers .resizer.bottom-left{left:-9px;bottom:10px;cursor:nesw-resize}.cdx-image-tool-tune--resize .cdx-block .resizable .resizers .resizer.bottom-right{right:-9px;bottom:10px;cursor:nwse-resize}.cdx-image-tool-tune--crop:hover,.cdx-image-tool-tune--crop.isCropping,.cdx-image-tool-tune--resize:hover{z-index:2}.cdx-image-tool-tune--crop .image-tool__image{position:relative}.cdx-image-tool-tune--crop .isCropping .image-tool__image{min-height:600px;min-width:100%}.cdx-image-tool-tune--crop .image-tool__image .crop-btn,.cdx-image-tool-tune--crop .image-tool__image .crop-save{position:absolute;top:0;left:0;padding:7px;background:#2492f5;color:#e9f4fe;text-align:center;line-height:20px;cursor:pointer;display:none}.cdx-image-tool-tune--crop .image-tool__image:hover .crop-btn,.cdx-image-tool-tune--crop .image-tool__image:hover .crop-save{display:block}.cdx-image-tool-tune--crop .image-tool__image img.isCropped{position:absolute;min-width:0;min-width:initial;max-width:none;max-width:initial;min-height:0;min-height:initial;max-height:none;max-height:initial}.cdx-image-tool-tune--crop .cdx-block.image-tool.isCropping{min-width:0!important;min-width:initial!important;max-width:none!important;max-width:initial!important;min-height:0!important;min-height:initial!important;max-height:none!important;max-height:initial!important}.image-tool__caption{background-color:#fff}.image-tool{position:relative;z-index:1}.cdx-image-tool-tune{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;gap:4px;width:100%}')),document.head.appendChild(e)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
2
- import { defineComponent as Rn, inject as Nn, onMounted as An, toRaw as Ot, onUnmounted as _n, watch as Mn, createElementBlock as On, openBlock as In } from "vue";
3
- import Hn, { SelectionUtils as xt } from "@ebl-vue/editorjs";
1
+ (function(){"use strict";try{if(typeof document!="undefined"){var e=document.createElement("style");e.appendChild(document.createTextNode(':root{--color-border: #EFF0F1}.ebl-editor{cursor:text;font-size:16px;font-weight:400;background-color:#fff;height:100%;overflow:auto;position:relative;padding-top:15px}.ebl-editor.outline{padding-right:280px}.ebl-editor.outline .codex-editor{-webkit-box-flex:1;-ms-flex:1;flex:1}@media (max-width:1240px){.ebl-outline{display:none}.ebl-editor.outline{padding-right:0}}@media (min-width:1240px){.ebl-editor.readonly .ce-block__content{max-width:100%;padding-left:100px;padding-right:100px}}.ce-toolbar,.ce-inline-toolbar{z-index:1000}.ce-toolbar__plus{border:1px solid #EFF0F1}.ce-toolbar .ce-popover__items,.ce-popover-clone .ce-popover__items{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap}.ce-toolbar .ce-popover__items .ce-popover-item,.ce-popover-clone .ce-popover__items .ce-popover-item{position:relative}.ce-toolbar .ce-popover__items .ce-popover-item__title,.ce-popover-clone .ce-popover__items .ce-popover-item__title{display:none}.ce-toolbar .ce-popover-item-html,.ce-toolbar .ce-popover-item-separator,.ce-toolbar .ce-popover-item[data-item-name=convert-to],.ce-popover-clone .ce-popover-item-html,.ce-popover-clone .ce-popover-item-separator,.ce-popover-clone .ce-popover-item[data-item-name=convert-to]{width:100%}.ce-toolbar .ce-popover-item-html[data-item-name=list-setting],.ce-popover-clone .ce-popover-item-html[data-item-name=list-setting]{width:auto;overflow:hidden}.ce-toolbar .ce-popover-item-html[data-item-name=list-setting-start-with],.ce-popover-clone .ce-popover-item-html[data-item-name=list-setting-start-with]{border-radius:6px;padding:3px}.ce-toolbar .ce-popover-item-html[data-item-name=list-setting-start-with]:hover,.ce-popover-clone .ce-popover-item-html[data-item-name=list-setting-start-with]:hover{background-color:#f8f8f8}.ce-toolbar .ce-popover-item[data-item-name=convert-to] .ce-popover-item__title,.ce-popover-clone .ce-popover-item[data-item-name=convert-to] .ce-popover-item__title{display:block}.ce-toolbar .ce-popover-item[data-item-name=add-below],.ce-popover-clone .ce-popover-item[data-item-name=add-below]{width:100%}.ce-toolbar .ce-popover-item[data-item-name=add-below] .ce-popover-item__title,.ce-popover-clone .ce-popover-item[data-item-name=add-below] .ce-popover-item__title{display:block}.ce-toolbar .ce-popover-item[data-item-name=list-setting],.ce-popover-clone .ce-popover-item[data-item-name=list-setting]{width:100%}.ce-toolbar .ce-popover-item[data-item-name=list-setting] .ce-popover-item__title,.ce-popover-clone .ce-popover-item[data-item-name=list-setting] .ce-popover-item__title{display:block}.ce-popover--inline .ce-popover-item-html{padding:0 2px}.ce-inline-toolbar .ce-popover__items{display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important}.ce-inline-toolbar .ce-popover__items{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap}.ce-inline-toolbar .ce-popover__items .ce-popover-item__title{display:none}.ebl-editor ::-webkit-scrollbar{width:6px;height:6px}.ebl-editor ::-webkit-scrollbar-track{background:#f1f1f1;border-radius:1px}.ebl-editor ::-webkit-scrollbar-thumb{background:#C0C0C0;border-radius:10px;border:1px solid #fff}.ebl-editor ::-webkit-scrollbar-thumb:hover{background:#555}.cdx-notifies{left:50%!important}.cdx-notifies{-webkit-transform:translateX(-50%);transform:translate(-50%);top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.ebl-er-doc-outline-item{padding:7px 24px;cursor:pointer;white-space:normal;word-wrap:break-word}.ebl-er-doc-outline-item:hover{background-color:#f6f6f6}.ebl-er-doc-outline-item.selected{background-color:#ebebeb}.ebl-outline .level_1{padding-left:24px}.ebl-outline .level_2{padding-left:42px}.ebl-outline .level_3{padding-left:60px}.ce-popover--inline .ce-popover--nested .ce-popover__container{width:-webkit-min-content!important;width:-moz-min-content!important;width:min-content!important;min-width:0!important;min-width:initial!important}.ce-popover--inline .ce-popover--nested .ce-popover__items{width:-webkit-max-content;width:-moz-max-content;width:max-content}.editorjs__color-selector-container{display:grid;grid-gap:10px;padding:4px}.editorjs__color-selector__container-item{width:30px;height:30px;display:block;cursor:pointer;border-radius:100%;-webkit-transition:-webkit-transform .2s ease;transition:-webkit-transform .2s ease;transition:transform .2s ease;transition:transform .2s ease,-webkit-transform .2s ease}.editorjs__color-selector__container-item:hover{-webkit-transform:scale(1.1);transform:scale(1.1)}.cel-inline-bold{font-weight:700}.cel-inline-strikethrough{-webkit-text-decoration:line-through;text-decoration:line-through}.cel-inline-italic{font-style:italic}.cel-inline-code{margin-left:2px;margin-right:2px;background-color:#f5f6f7;border:1px solid #dee0e3;border-color:#dee0e3;border-width:1px 0;border-radius:4px;padding:1px 5px 1px 4px}.cel-inline-underline{-webkit-text-decoration:underline;text-decoration:underline}.cel-inline-underline.cel-inline-strikethrough{-webkit-text-decoration:underline line-through;text-decoration:underline line-through}.cel-inline-mark{background-color:#ff0;padding:2px}.cel-inline-link-input-wrap{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;gap:5px}.cel-inline-link-input{-webkit-box-flex:1;-ms-flex:1;flex:1;background:#F8F8F8;border:1px solid rgba(226,226,229,.2);border-radius:6px;padding:4px 8px;font-size:14px;line-height:22px;outline:none;margin:0;width:100%;-webkit-box-sizing:border-box;box-sizing:border-box;font-weight:500;font-family:inherit}.cel-inline-link-input-btn{width:50px;border-radius:5px;background-color:#161c27;color:#fff;border:none;cursor:pointer}.cel-inline-link-input-btn.disabled{opacity:.4;cursor:not-allowed}.cel-fake-background{background-color:#a8d6ff}.editorjs__color-selector__input{width:1px;height:1px;opacity:0}.editorjs__color-selector__container-item-none{background-color:transparent;border:1px solid #e6e6e6;position:relative}.editorjs__color-selector__container-item-none:before{content:"";position:absolute;top:50%;left:50%;width:1px;height:35px;background-color:#e6e6e6;-webkit-transform:translate(-50%,-50%) rotate(45deg);transform:translate(-50%,-50%) rotate(45deg)}.cel-inline-gray-text{color:#646a73}.cel-inline-pink-text{color:#d83931}.cel-inline-orange-text{color:#de7802}.cel-inline-yellow-text{color:#dc9b04}.cel-inline-green-text{color:#2ea121}.cel-inline-blue-text{color:#245bdb}.cel-inline-purple-text{color:#6425d0}.ebl-er-doc{font-family:var(--font-family);font-size:16px;font-weight:400;-webkit-box-sizing:border-box;box-sizing:border-box}.ebl-er-header{height:var(--ebl-er-header-height);-webkit-box-sizing:border-box;box-sizing:border-box;position:sticky;top:0;z-index:10}.ebl-er-footer{height:var(--ebl-er-footer-height);-webkit-box-sizing:border-box;box-sizing:border-box}.ebl-er-container{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;min-height:calc(100vh - var(--ebl-er-header-height))}.ebl-er-doc-menu{width:var(--ebl-er-doc-menu-width);-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-negative:0;flex-shrink:0;height:calc(100vh - var(--ebl-er-header-height));position:sticky;top:var(--ebl-er-header-height)}.ebl-er-doc-menu-content{-webkit-box-sizing:border-box;box-sizing:border-box}.ebl-er-doc-content{-webkit-box-sizing:border-box;box-sizing:border-box;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;max-width:calc(100% - var(--ebl-er-doc-menu-width));-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1}.ebl-er-doc-content-container{-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-box-flex:1;-ms-flex:1;flex:1;padding:0 50px 50px;width:100%;overflow-x:hidden;white-space:normal;word-wrap:break-word}.ebl-er-doc-content-inner-wrap{margin:0 auto}.ebl-er-doc-content-inner .ce-block{width:100%}.ebl-er-doc-outline{width:280px;-webkit-box-sizing:border-box;box-sizing:border-box;height:calc(100vh - var(--ebl-er-header-height));position:sticky;top:var(--ebl-er-header-height);overflow:auto;padding:12px}.ebl-er-doc-pre-next{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:33px 0}@media (max-width:960px){.ebl-er-doc-outline{display:none}}.ebl-er-doc ::-webkit-scrollbar{width:6px;height:6px}.ebl-er-doc ::-webkit-scrollbar-track{background:#f1f1f1;border-radius:1px}.ebl-er-doc ::-webkit-scrollbar-thumb{background:#C0C0C0;border-radius:10px;border:1px solid #fff}.ebl-er-doc ::-webkit-scrollbar-thumb:hover{background:#555}.ce-el-link-wrapper{position:absolute;z-index:1000;width:auto;max-width:300px;height:46px;padding:6px 20px;border:1px solid #eff0f1;border-radius:6px;background-color:#fff;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}.ce-el-link-input{border:1px solid rgba(226,226,229,.2);border-radius:6px;padding:4px 8px;background-color:#f8f8f8;font-size:12px;line-height:22px;margin:0;-webkit-box-flex:1;-ms-flex:1;flex:1;width:260px}.ce-el-link-input.ce-el-link__noedit{display:none}.ce-el-link-btn-wrap{width:50px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}.ce-el-link-btn{width:50px;background-color:#161c27;color:#fff;border-radius:6px;margin-left:5px;display:block}.ce-el-link-btn.ce-el-link__noedit{display:none}.ce-el-link-icon-btn{width:24px;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;margin-left:5px;cursor:pointer;display:none}.ce-el-link-icon-btn.ce-el-link__noedit{display:-webkit-box;display:-ms-flexbox;display:flex}.ce-el-link-input-text{padding-right:20px;display:none}.ce-el-link-input-text.ce-el-link__noedit{display:block}.ce-block--drop-target .ce-block__content:before{content:"";position:absolute;top:50%;left:-20px;margin-top:-1px;height:8px;width:8px;border:solid #a0a0a0;border-width:1px 1px 0 0;-webkit-transform-origin:right;transform-origin:right;-webkit-transform:rotate(45deg);transform:rotate(45deg)}.ce-block--drop-target .ce-block__content:after{background:none}.ce-header{padding:15px 0 3px;margin:0;line-height:1.25;outline:none}.ce-header p,.ce-header div{padding:0!important;margin:0!important}.ce-tune-alignment--right{text-align:right}.ce-tune-alignment--center{text-align:center}.ce-tune-alignment--left{text-align:left}.ce-paragraph{line-height:2!important}.ce-paragraph{outline:none}.ce-block:only-of-type .ce-paragraph[data-placeholder-active]:empty:before,.ce-block:only-of-type .ce-paragraph[data-placeholder-active][data-empty=true]:before{content:attr(data-placeholder-active)}.ce-paragraph p:first-of-type{margin-top:0}.ce-paragraph p:last-of-type{margin-bottom:0}.ce-editorjs-x-shiki{border-radius:10px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;margin:10px 0;border:2px solid transparent;position:relative}.ce-editorjs-x-shiki.editable:hover{border:2px solid #C0C0C0}.ce-editorjs-x-shiki__lang{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;padding:8px}.ce-editorjs-x-shiki__code{position:relative;float:left;min-width:100%;overflow:hidden;height:auto;min-height:60px}.ce-editorjs-x-shiki__code__dragHandler{position:absolute;left:50%;-webkit-transform:translateX(-50%);transform:translate(-50%);bottom:-5px;cursor:ns-resize;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;height:8px;width:60px;background-color:silver;border-radius:5px;display:none}.ce-editorjs-x-shiki:hover .ce-editorjs-x-shiki__code__dragHandler{display:block}.ce-editorjs-x-shiki__selector{display:-webkit-box;display:-ms-flexbox;display:flex;gap:15px;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;border-bottom-style:solid;border-color:#9ca3af0d;border-bottom-width:1px;padding:0 8px 8px}.ce-editorjs-x-shiki__selector-language,.ce-editorjs-x-shiki__selector-theme{font-size:13px;font-family:inherit}.ce-editorjs-x-shiki__selector-language{width:90px}.ce-editorjs-x-shiki__selector select{border:none;outline:none}.ce-editorjs-x-shiki__span{position:relative;z-index:0;padding:20px 20px 20px 55px;margin:0;white-space:pre;font-size:13px;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.ce-editorjs-x-shiki__span code{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.ce-editorjs-x-shiki__textarea{all:unset;white-space:pre;background-color:transparent;position:absolute;padding:20px 20px 20px 55px;inset:0;color:transparent;z-index:0;font-size:13px;caret-color:#999;resize:none;border:none;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.ce-editorjs-x-shiki__textarea::-moz-selection{background-color:#083ca9;color:#fff}.ce-editorjs-x-shiki__textarea::selection{background-color:#083ca9;color:#fff}.ce-editorjs-x-shiki__copy{width:24px;height:24px;cursor:pointer;position:relative;margin-right:0}.ce-editorjs-x-shiki__copy_tip{font-size:12px;width:60px;margin-left:-20px;background-color:#0c0c0c;color:#ececec;text-align:center;border-radius:6px;padding:5px 10px;position:absolute;z-index:1;top:125%;-webkit-transition:opacity .3s;transition:opacity .3s;visibility:hidden;opacity:0}.ce-editorjs-x-shiki__copy_tip:after{content:"";position:absolute;bottom:100%;left:50%;margin-left:-5px;border-width:5px;border-style:solid;border-color:transparent transparent #0c0c0c transparent}.ce-editorjs-x-shiki__copy_tip.visible{visibility:visible;opacity:1}.ce-editorjs-x-shiki__span.shiki .line:before{content:attr(data-line);width:40px;display:inline-block;text-align:right;color:#888;position:absolute;left:0}.ce-editorjs-x-shiki__code ::-webkit-scrollbar{width:8px;height:8px}.ce-editorjs-x-shiki__code ::-webkit-scrollbar-track{background:#22272e;border-radius:1px}.ce-editorjs-x-shiki__code ::-webkit-scrollbar-thumb{background:#C0C0C0;border-radius:10px;border:2px solid #22272e}.ce-editorjs-x-shiki__code ::-webkit-scrollbar-thumb:hover{background:#555555}.ce-block--selected .ce-editorjs-x-shiki{outline:2px solid #4299e1}.ce-block--selected .ce-editorjs-x-shiki,.ce-block--selected .ce-editorjs-x-shiki__selector-language,.ce-block--selected .ce-editorjs-x-shiki__span{background-color:#e1f2ff!important}.cdx-quote{overflow:hidden;margin:0;-webkit-box-sizing:border-box;box-sizing:border-box;word-wrap:break-word;word-break:break-all}.cdx-quote blockquote{margin:0}.cdx-block-quote{border:solid #acacac;border-width:0 0 0 3px;-webkit-box-shadow:none;box-shadow:none;color:#666;line-height:1.6em;padding:1px 0 0 12px}.ce-delimiter__line__wrapper{height:24px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.ce-delimiter__line{-webkit-box-flex:1;-ms-flex:1;flex:1;height:2px;background-color:#eff0f1}.cdx-list{margin:0;padding:0;outline:none;display:grid;counter-reset:item;grid-gap:var(--spacing-s);padding:var(--spacing-xs);--spacing-s: 8px;--spacing-xs: 6px;--list-counter-type: numeric;--radius-border: 5px;--checkbox-background: #fff;--color-border: #C9C9C9;--color-bg-checked: #369FFF;--line-height: 1.45em;--color-bg-checked-hover: #0059AB;--color-tick: #fff;--size-checkbox: 1.2em}.cdx-list ol{padding-left:0}.cdx-list__item{line-height:var(--line-height);display:grid;grid-template-columns:auto 1fr;grid-template-rows:auto auto;grid-template-areas:"checkbox content" ". child"}.cdx-list__item-children{display:grid;grid-area:child;grid-gap:var(--spacing-s);padding-top:var(--spacing-s)}.cdx-list__item [contenteditable]{outline:none}.cdx-list__item-content{word-break:break-word;white-space:pre-wrap;grid-area:content;padding-left:var(--spacing-s)}.cdx-list__item:before{counter-increment:item;white-space:nowrap}.cdx-list-ordered .cdx-list__item:before{content:counters(item,".",var(--list-counter-type)) "."}.cdx-list-ordered{counter-reset:item}.cdx-list-unordered{padding-left:0}.cdx-list-unordered .cdx-list__item:before{content:"•"}.cdx-list-checklist .cdx-list__item:before{content:""}.cdx-list__settings .cdx-settings-button{width:50%}.cdx-list__checkbox{padding-top:calc((var(--line-height) - var(--size-checkbox)) / 2);grid-area:checkbox;width:var(--size-checkbox);height:var(--size-checkbox);display:-webkit-box;display:-ms-flexbox;display:flex;cursor:pointer}.cdx-list__checkbox svg{opacity:0;height:var(--size-checkbox);width:var(--size-checkbox);left:-1px;top:-1px;position:absolute}@media (hover: hover){.cdx-list__checkbox:not(.cdx-list__checkbox--no-hover):hover .cdx-list__checkbox-check svg{opacity:1}}.cdx-list__checkbox--checked{line-height:var(--line-height)}@media (hover: hover){.cdx-list__checkbox--checked:not(.cdx-list__checkbox--checked--no-hover):hover .cdx-checklist__checkbox-check{background:var(--color-bg-checked-hover);border-color:var(--color-bg-checked-hover)}}.cdx-list__checkbox--checked .cdx-list__checkbox-check{background:var(--color-bg-checked);border-color:var(--color-bg-checked)}.cdx-list__checkbox--checked .cdx-list__checkbox-check svg{opacity:1}.cdx-list__checkbox--checked .cdx-list__checkbox-check svg path{stroke:var(--color-tick)}.cdx-list__checkbox--checked .cdx-list__checkbox-check:before{opacity:0;visibility:visible;-webkit-transform:scale(2.5);transform:scale(2.5)}.cdx-list__checkbox-check{cursor:pointer;display:inline-block;position:relative;margin:0 auto;width:var(--size-checkbox);height:var(--size-checkbox);-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:var(--radius-border);border:1px solid var(--color-border);background:var(--checkbox-background)}.cdx-list__checkbox-check:before{content:"";position:absolute;inset:0;border-radius:100%;background-color:var(--color-bg-checked);visibility:hidden;pointer-events:none;-webkit-transform:scale(1);transform:scale(1);-webkit-transition:opacity .4s,-webkit-transform .4s ease-out;transition:opacity .4s,-webkit-transform .4s ease-out;transition:transform .4s ease-out,opacity .4s;transition:transform .4s ease-out,opacity .4s,-webkit-transform .4s ease-out}.cdx-list__checkbox-check--disabled{pointer-events:none}.cdx-list-start-with-field{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;overflow:hidden;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.cdx-list-start-with-field--invalid{background:#FFECED;border:1px solid #E13F3F}.cdx-list-start-with-field:hover{background-color:#f8f8f8}.cdx-list-start-with-field--invalid .cdx-list-start-with-field__input{color:#e13f3f}.cdx-list-start-with-field__startlabel{width:70px;font-size:14px}.cdx-list-start-with-field__input-wrapper{-webkit-box-flex:1;-ms-flex:1;flex:1;overflow:hidden}.cdx-list-start-with-field__input{font-size:14px;outline:none;font-weight:500;font-family:inherit;border:0;background:transparent;margin:0;line-height:22px;-webkit-box-flex:1;-ms-flex:1;flex:1;border:1px solid rgba(226,226,229,1);border-radius:6px;padding:0 10px;width:50px;text-align:center}.cdx-list-start-with-field__input::-webkit-input-placeholder{color:var(--grayText);font-weight:500}.cdx-list-start-with-field__input::-moz-placeholder{color:var(--grayText);font-weight:500}.cdx-list-start-with-field__input:-ms-input-placeholder{color:var(--grayText);font-weight:500}.cdx-list-start-with-field__input::-ms-input-placeholder{color:var(--grayText);font-weight:500}.cdx-list-start-with-field__input::placeholder{color:var(--grayText);font-weight:500}.cdx-alert{position:relative;padding:10px;border-radius:5px;margin-bottom:10px;margin-top:10px}.cdx-alert-primary{background-color:#ebf8ff;border:1px solid #4299e1;color:#2b6cb0}.cdx-alert-secondary{background-color:#f7fafc;border:1px solid #cbd5e0;color:#222731}.cdx-alert-info{background-color:#e6fdff;border:1px solid #4cd4ce;color:#00727c}.cdx-alert-success{background-color:#f0fff4;border:1px solid #68d391;color:#2f855a}.cdx-alert-warning{background-color:#fffaf0;border:1px solid #ed8936;color:#c05621}.cdx-alert-danger{background-color:#fff5f5;border:1px solid #fc8181;color:#c53030}.cdx-alert-light{background-color:#fff;border:1px solid #edf2f7;color:#1a202c}.cdx-alert-dark{background-color:#2d3748;border:1px solid #1a202c;color:#d3d3d3}.cdx-alert-align-left{text-align:left}.cdx-alert-align-center{text-align:center}.cdx-alert-align-right{text-align:right}.cdx-alert__message{outline:none}.cdx-alert [contentEditable=true][data-placeholder]:before{position:absolute;content:attr(data-placeholder);color:#707684;font-weight:400;opacity:0}.cdx-alert [contentEditable=true][data-placeholder]:empty:before{opacity:1}.cdx-alert [contentEditable=true][data-placeholder]:empty:focus:before{opacity:0}.ce-popover__item[data-item-name=alert-primary] .ce-popover__item-icon svg #background{fill:#ebf8ff;stroke:#4299e1}.ce-popover__item[data-item-name=alert-primary] .ce-popover__item-icon svg #content{fill:#2b6cb0}.ce-popover__item[data-item-name=alert-secondary] .ce-popover__item-icon svg #background{fill:#f7fafc;stroke:#cbd5e0}.ce-popover__item[data-item-name=alert-secondary] .ce-popover__item-icon svg #content{fill:#222731}.ce-popover__item[data-item-name=alert-info] .ce-popover__item-icon svg #background{fill:#e6fdff;stroke:#4cd4ce}.ce-popover__item[data-item-name=alert-info] .ce-popover__item-icon svg #content{fill:#00727c}.ce-popover__item[data-item-name=alert-success] .ce-popover__item-icon svg #background{fill:#f0fff4;stroke:#68d391}.ce-popover__item[data-item-name=alert-success] .ce-popover__item-icon svg #content{fill:#2f855a}.ce-popover__item[data-item-name=alert-warning] .ce-popover__item-icon svg #background{fill:#fffaf0;stroke:#ed8936}.ce-popover__item[data-item-name=alert-warning] .ce-popover__item-icon svg #content{fill:#c05621}.ce-popover__item[data-item-name=alert-danger] .ce-popover__item-icon svg #background{fill:#fff5f5;stroke:#fc8181}.ce-popover__item[data-item-name=alert-danger] .ce-popover__item-icon svg #content{fill:#c53030}.ce-popover__item[data-item-name=alert-light] .ce-popover__item-icon svg #background{fill:#fff;stroke:#edf2f7}.ce-popover__item[data-item-name=alert-light] .ce-popover__item-icon svg #content{fill:#1a202c}.ce-popover__item[data-item-name=alert-dark] .ce-popover__item-icon svg #background{fill:#2d3748;stroke:#1a202c}.ce-popover__item[data-item-name=alert-dark] .ce-popover__item-icon svg #content{fill:#d3d3d3}.cdx-alert_setting__icon_wrapper{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:10px}.cdx-alert_setting__icon_wrapper_align{margin-top:10px}.cdx-alert_setting__icon{display:inline-block;width:24px;height:24px;text-align:center;line-height:24px;cursor:pointer}.cdx-alert_setting__icon_active{opacity:.3}.ce-block--selected .cdx-alert{outline:2px solid #4299e1}.ce-popover-indent-item{cursor:default!important}.ce-popover-indent-item{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:3px}.ce-popover-indent-item[version^="2.26"]{gap:10px}.ce-popover-indent-item:hover{background-color:transparent!important}.ce-popover-indent-item .ce-popover-item__icon{width:26px;height:26px;cursor:pointer;will-change:background-color,color;transition:.3s background-color,.3s color;padding:0;border-width:0px;color:#000;background-color:#fff;border-radius:5px;-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;-o-border-radius:5px;-webkit-transition:.3s background-color,.3s color;-moz-transition:.3s background-color,.3s color;-ms-transition:.3s background-color,.3s color;-o-transition:.3s background-color,.3s color}.ce-popover-indent-item .ce-popover-item--disabled{color:#707684;opacity:.3;cursor:default}.ce-popover-indent-item .ce-popover-item__icon:focus{outline:none}.ce-popover-indent-item[version^="2.26"]:hover .ce-popover-item__icon,.ce-popover-indent-item[version^="2.27"]:hover .ce-popover-item__icon,.ce-popover-indent-item[version^="2.28"]:hover .ce-popover-item__icon,.ce-popover-indent-item[version^="2.29"]:hover .ce-popover-item__icon,.ce-popover-indent-item[version^="2.26"] .ce-popover-item__icon,.ce-popover-indent-item[version^="2.27"] .ce-popover-item__icon,.ce-popover-indent-item[version^="2.28"] .ce-popover-item__icon,.ce-popover-indent-item[version^="2.29"] .ce-popover-item__icon{box-shadow:0 0 0 1px #c9c9cc7a!important;-webkit-box-shadow:0 0 0 1px rgba(201,201,204,.48)!important}.ce-popover-indent-item[version^="2.26"] .ce-popover-item__icon:hover,.ce-popover-indent-item[version^="2.27"] .ce-popover-item__icon:hover,.ce-popover-indent-item[version^="2.28"] .ce-popover-item__icon:hover,.ce-popover-indent-item[version^="2.29"] .ce-popover-item__icon:hover{background-color:#eff2f5}.ce-highlight-indent{display:inline-block;height:1.6em;top:50%;position:absolute;transform:translateY(-50%);-webkit-transform:translate(0px,-50%);-moz-transform:translate(0px,-50%);-ms-transform:translate(0px,-50%);-o-transform:translate(0px,-50%)}.ce-popover-indent-item[version^="2.3"] .ce-popover-item__title{margin-left:4px}.tc-wrap{--color-background: #f9f9fb;--color-text-secondary: #7b7e89;--color-border: #e8e8eb;--cell-size: 34px;--toolbox-icon-size: 18px;--toolbox-padding: 6px;--toolbox-aiming-field-size: calc(var(--toolbox-icon-size) + var(--toolbox-padding)*2);--col-width: 100px 100px 100px;position:relative;height:100%;margin-top:var(--toolbox-icon-size);-webkit-box-sizing:border-box;box-sizing:border-box;display:inline-grid;z-index:0}.tc-wrap svg{vertical-align:top}@media print{.tc-wrap{border-left-color:var(--color-border);border-left-style:solid;border-left-width:1px}}@media print{.tc-wrap .tc-row:after{display:none}}.tc-table{position:relative;width:100%;height:100%;display:grid;font-size:14px;border-top:1px solid var(--color-border);border-left:1px solid var(--color-border);line-height:1.4;overflow-x:auto}.tc-table:after{width:calc(var(--cell-size));height:100%;left:calc(var(--cell-size)*-1);top:0}.tc-table:after,.tc-table:before{position:absolute;content:""}.tc-table:before{width:100%;height:var(--toolbox-aiming-field-size);top:calc(var(--toolbox-aiming-field-size)*-1);left:0}.tc-table--heading .tc-row:first-child{font-weight:600;border-bottom:2px solid var(--color-border);position:sticky;top:0;z-index:2;background:var(--color-background)}.tc-table--heading .tc-row:first-child [contenteditable]:empty:before{content:attr(heading);color:var(--color-text-secondary)}.tc-table--heading .tc-row:first-child:after{bottom:-2px;border-bottom:2px solid var(--color-border)}.tc-add-column,.tc-add-row{display:-webkit-box;display:-ms-flexbox;display:flex;color:var(--color-text-secondary)}@media print{.tc-add{display:none}}.tc-add-column{display:grid;border-top:1px solid var(--color-border);grid-auto-rows:var(--cell-size);-webkit-box-align:center;-ms-flex-align:center;align-items:center;justify-items:center}.tc-add-column svg{padding:5px;position:sticky;top:0;background-color:var(--color-background)}.tc-add-column--disabled{visibility:hidden}@media print{.tc-add-column{display:none}}.tc-add-row{height:var(--cell-size);-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding-left:4px;position:relative}.tc-add-row--disabled{display:none}.tc-add-row:before{content:"";position:absolute;right:calc(var(--cell-size)*-1);width:var(--cell-size);height:100%}@media print{.tc-add-row{display:none}}.tc-add-column,.tc-add-row{-webkit-transition:0s;transition:0s;cursor:pointer;will-change:background-color}.tc-add-column:hover,.tc-add-row:hover{-webkit-transition:background-color .1s ease;transition:background-color .1s ease;background-color:var(--color-background)}.tc-add-row{margin-top:1px}.tc-add-row:hover:before{-webkit-transition:.1s;transition:.1s;background-color:var(--color-background)}.tc-row{display:grid;grid-template-columns:var(--col-width);position:relative;border-bottom:1px solid var(--color-border)}.tc-row--selected{background:var(--color-background)}.tc-row--selected:after{background:var(--color-background)}.tc-cell{border-right:1px solid var(--color-border);padding:6px 12px;overflow:hidden;outline:none;line-break:normal}.tc-cell--selected{background:var(--color-background)}.tc-wrap--readonly .tc-row:after{display:none}.tc-toolbox{--toolbox-padding: 6px;--popover-margin: 30px;--toggler-click-zone-size: 30px;--toggler-dots-color: #7b7e89;--toggler-dots-color-hovered: #1d202b;position:absolute;cursor:pointer;z-index:1;opacity:0;-webkit-transition:opacity .1s;transition:opacity .1s;will-change:left,opacity}.tc-toolbox--column{top:calc(var(--toggler-click-zone-size)*-1);-webkit-transform:translate(calc(var(--toggler-click-zone-size)*-1/2));transform:translate(calc(var(--toggler-click-zone-size)*-1/2));will-change:left,opacity}.tc-toolbox--row{left:calc(var(--popover-margin)*-1);-webkit-transform:translateY(calc(var(--toggler-click-zone-size)*-1/2));transform:translateY(calc(var(--toggler-click-zone-size)*-1/2));margin-top:-1px;will-change:top,opacity}.tc-toolbox--showed{opacity:1}.tc-toolbox .tc-popover{position:absolute;top:0;left:var(--popover-margin)}.tc-toolbox__toggler{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;width:var(--toggler-click-zone-size);height:var(--toggler-click-zone-size);color:var(--toggler-dots-color);opacity:0;-webkit-transition:opacity .15s ease;transition:opacity .15s ease;will-change:opacity}.tc-toolbox__toggler:hover{color:var(--toggler-dots-color-hovered)}.tc-toolbox__toggler svg{fill:currentColor}.tc-wrap:hover .tc-toolbox__toggler{opacity:1}.tc-settings .cdx-settings-button{width:50%;margin:0}.tc-popover{--color-border: #eaeaea;--color-background: #fff;--color-background-hover: rgba(232, 232, 235, .49);--color-background-confirm: #e24a4a;--color-background-confirm-hover: #d54040;--color-text-confirm: #fff;background:var(--color-background);border:1px solid var(--color-border);-webkit-box-shadow:0 3px 15px -3px rgba(13,20,33,.12941);box-shadow:0 3px 15px -3px #0d142121;border-radius:6px;padding:6px;display:none;will-change:opacity,transform}.tc-popover--opened{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-animation:menuShowing .1s cubic-bezier(.215,.61,.355,1) forwards;animation:menuShowing .1s cubic-bezier(.215,.61,.355,1) forwards}.tc-popover__item{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:2px 14px 2px 2px;border-radius:5px;cursor:pointer;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.tc-popover__item:hover{background:var(--color-background-hover)}.tc-popover__item:not(:last-of-type){margin-bottom:2px}.tc-popover__item-icon{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;width:26px;height:26px;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;background:var(--color-background);border-radius:5px;border:1px solid var(--color-border);margin-right:8px}.tc-popover__item-label{line-height:22px;font-size:14px;font-weight:500}.tc-popover__item--confirm{background:var(--color-background-confirm);color:var(--color-text-confirm)}.tc-popover__item--confirm:hover{background-color:var(--color-background-confirm-hover)}.tc-popover__item--confirm .tc-popover__item-icon{background:var(--color-background-confirm);border-color:#0000001a}.tc-popover__item--confirm .tc-popover__item-icon svg{-webkit-transition:-webkit-transform .2s ease-in;transition:-webkit-transform .2s ease-in;transition:transform .2s ease-in;transition:transform .2s ease-in,-webkit-transform .2s ease-in;-webkit-transform:rotate(90deg) scale(1.2);transform:rotate(90deg) scale(1.2)}.tc-popover__item--hidden{display:none}@-webkit-keyframes menuShowing{0%{opacity:0;-webkit-transform:translateY(-8px) scale(.9);transform:translateY(-8px) scale(.9)}70%{opacity:1;-webkit-transform:translateY(2px);transform:translateY(2px)}to{-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes menuShowing{0%{opacity:0;-webkit-transform:translateY(-8px) scale(.9);transform:translateY(-8px) scale(.9)}70%{opacity:1;-webkit-transform:translateY(2px);transform:translateY(2px)}to{-webkit-transform:translateY(0);transform:translateY(0)}}.cell-resizable{cursor:col-resize}.image-tool{--bg-color: #cdd1e0;--front-color: #388ae5;--border-color: #e8e8eb;display:inline-block}.image-tool__image{border-radius:3px;overflow:hidden;margin-bottom:10px;padding-bottom:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none}.image-tool__image-picture{max-width:100%;vertical-align:bottom;display:inline-block;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none}.image-tool__image-preloader{width:150px;height:150px;border-radius:50%;background-size:cover;margin:auto;position:relative;background-color:var(--bg-color);background-position:center center}.image-tool__image-preloader:after{content:"";position:absolute;z-index:3;width:60px;height:60px;border-radius:50%;border:2px solid var(--bg-color);border-top-color:var(--front-color);left:50%;top:50%;margin-top:-30px;margin-left:-30px;-webkit-animation:image-preloader-spin 2s infinite linear;animation:image-preloader-spin 2s infinite linear;-webkit-box-sizing:border-box;box-sizing:border-box}.image-tool__caption{visibility:hidden;position:absolute;bottom:0;left:0;margin-bottom:10px}.image-tool__caption[contentEditable=true][data-placeholder]:before{position:absolute!important}.image-tool__caption[contentEditable=true][data-placeholder]:before{content:attr(data-placeholder);color:#707684;font-weight:400;display:none}.image-tool__caption[contentEditable=true][data-placeholder]:empty:before{display:block}.image-tool__caption[contentEditable=true][data-placeholder]:empty:focus:before{display:none}.image-tool--empty .image-tool__image,.image-tool--empty .image-tool__image-preloader{display:none}.image-tool--empty .image-tool__caption,.image-tool--uploading .image-tool__caption{visibility:hidden!important}.image-tool .cdx-button{display:none;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.image-tool .cdx-button svg{height:auto;margin:0 6px 0 0}.image-tool--filled .cdx-button,.image-tool--filled .image-tool__image-preloader{display:none}.image-tool--uploading{width:100%}.image-tool--uploading .resizable{display:none!important}.image-tool--uploading .image-tool__image{min-height:200px;display:-webkit-box;display:-ms-flexbox;display:flex;background-color:#fff}.image-tool--uploading .image-tool__image-picture,.image-tool--uploading .cdx-button{display:none}.image-tool--withBorder .image-tool__image{border:1px solid var(--border-color)}.image-tool--withBackground .image-tool__image{padding:15px;background:var(--bg-color)}.image-tool--withBackground .image-tool__image-picture{max-width:60%;margin:0 auto}.image-tool--stretched .image-tool__image-picture{width:100%}.image-tool--caption .image-tool__caption{visibility:visible}.image-tool--caption{padding-bottom:50px}@-webkit-keyframes image-preloader-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes image-preloader-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.cdx-image-tool-tune--floatLeft .cdx-block,.cdx-image-tool-tune--center .cdx-block,.cdx-image-tool-tune--floatRight .cdx-block,.cdx-image-tool-tune--floatLeft .image-tool__image,.cdx-image-tool-tune--center .image-tool__image,.cdx-image-tool-tune--floatRight .image-tool__image{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center}:root{--primary: #2492F5;--primary-content: #E9F4FE}.cdx-settings-button--active{background:#E9F4FE;color:#2492f5}.cdx-settings-button:hover{background:#E9F4FE}.cdx-image-tool-tune--center{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}@media all and (min-width: 470px){.codex-editor:not(.read-only) .cdx-image-tool-tune--floatLeft.ce-block__content,.codex-editor:not(.read-only) .cdx-image-tool-tune--floatRight.ce-block__content{min-height:20px}.cdx-image-tool-tune--floatLeft.ce-block__content .image-tool__image,.cdx-image-tool-tune--floatRight.ce-block__content .image-tool__image{margin-top:40px}.cdx-image-tool-tune--floatLeft.ce-block__content .image-tool__image{margin-left:20px}.cdx-image-tool-tune--floatRight.ce-block__content .image-tool__image{margin-right:20px}.cdx-image-tool-tune--floatLeft.ce-block__content .cdx-input,.cdx-image-tool-tune--floatRight.ce-block__content .cdx-input{width:calc(100% - 20px)}.cdx-image-tool-tune--floatLeft.ce-block__content .cdx-input{margin-left:20px}.cdx-image-tool-tune--floatRight.ce-block__content .cdx-input{margin-right:20px}.cdx-image-tool-tune--floatLeft .cdx-block{float:left;margin-right:10px}.cdx-image-tool-tune--floatRight .cdx-block{float:right;margin-left:10px}.cdx-image-tool-tune--sizeSmall .cdx-block{max-width:25%!important}.cdx-image-tool-tune--sizeMiddle .cdx-block{max-width:50%!important}.cdx-image-tool-tune--sizeLarge .cdx-block{max-width:75%!important}}.cdx-image-tool-tune--sizeLarge img,.cdx-image-tool-tune--sizeSmall img,.cdx-image-tool-tune--sizeMiddle img{-o-object-fit:cover;object-fit:cover;max-width:100%}.codex-editor.read-only .cdx-input.image-tool__caption:empty,.read-only>.codex-editor .cdx-input.image-tool__caption:empty{display:none}.cdx-image-tool-tune--resize .cdx-block{position:relative;overflow:visible}.cdx-image-tool-tune--resize .cdx-block .resizable{display:none}.cdx-image-tool-tune--resize .image-tool__image-picture{width:100%!important}.cdx-image-tool-tune--resize .cdx-block:hover .resizable{display:block}.cdx-image-tool-tune--resize .cdx-block .resizable .resizers .resizer{-webkit-box-sizing:border-box;box-sizing:border-box;width:14px;height:14px;border-radius:50%;background:#E9F4FE;border:3px solid #2492F5;position:absolute}.cdx-image-tool-tune--resize .cdx-block .resizable .resizers .resizer.top-left{left:-8px;top:2px;cursor:nwse-resize}.cdx-image-tool-tune--resize .cdx-block .resizable .resizers .resizer.top-right{right:-8px;top:1px;cursor:nesw-resize}.cdx-image-tool-tune--resize .cdx-block .resizable .resizers .resizer.bottom-left{left:-9px;bottom:10px;cursor:nesw-resize}.cdx-image-tool-tune--resize .cdx-block .resizable .resizers .resizer.bottom-right{right:-9px;bottom:10px;cursor:nwse-resize}.cdx-image-tool-tune--crop:hover,.cdx-image-tool-tune--crop.isCropping,.cdx-image-tool-tune--resize:hover{z-index:2}.cdx-image-tool-tune--crop .image-tool__image{position:relative}.cdx-image-tool-tune--crop .isCropping .image-tool__image{min-height:600px;min-width:100%}.cdx-image-tool-tune--crop .image-tool__image .crop-btn,.cdx-image-tool-tune--crop .image-tool__image .crop-save{position:absolute;top:0;left:0;padding:7px;background:#2492F5;color:#e9f4fe;text-align:center;line-height:20px;cursor:pointer;display:none}.cdx-image-tool-tune--crop .image-tool__image:hover .crop-btn,.cdx-image-tool-tune--crop .image-tool__image:hover .crop-save{display:block}.cdx-image-tool-tune--crop .image-tool__image img.isCropped{position:absolute;min-width:0;min-width:initial;max-width:none;max-width:initial;min-height:0;min-height:initial;max-height:none;max-height:initial}.cdx-image-tool-tune--crop .cdx-block.image-tool.isCropping{min-width:0!important;min-width:initial!important;max-width:none!important;max-width:initial!important;min-height:0!important;min-height:initial!important;max-height:none!important;max-height:initial!important}.image-tool__caption{background-color:#fff}.image-tool{position:relative;z-index:1}.cdx-image-tool-tune{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;gap:4px;width:100%}')),document.head.appendChild(e)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
2
+ import { defineComponent as Rn, inject as Nn, onMounted as An, toRaw as It, onUnmounted as _n, watch as Mn, openBlock as On, createElementBlock as In } from "vue";
3
+ import Hn, { SelectionUtils as Rt } from "@ebl-vue/editorjs";
4
4
  import { isCaretAtStartOfInput as kn, focus as Bn, getCaretNodeAndOffset as Dn } from "@editorjs/caret";
5
5
  import { bundledLanguagesInfo as Pn, codeToHtml as zn } from "shiki";
6
6
  import * as Tt from "@editorjs/dom";
7
- import { make as Re, isEmpty as jt } from "@editorjs/dom";
7
+ import { make as xe, isEmpty as jt } from "@editorjs/dom";
8
8
  import Et from "axios";
9
- const Yt = Symbol("INSTALLED_KEY"), Wn = (_, e) => (_.install = (t) => {
10
- for (const n of [_, ...Object.values({})]) t.component(n.name, n);
11
- }, _);
9
+ const Yt = Symbol("INSTALLED_KEY"), Wn = (_, e) => {
10
+ if (_.install = (t) => {
11
+ for (const n of [_, ...Object.values(e != null ? e : {})])
12
+ t.component(n.name, n);
13
+ }, e)
14
+ for (const [t, n] of Object.entries(e))
15
+ _[t] = n;
16
+ return _;
17
+ };
12
18
  function Fn() {
13
19
  var _ = "object", e = "undefined", t = ["startContainer", "startOffset", "endContainer", "endOffset", "collapsed", "commonAncestorContainer"], n = ["setStart", "setStartBefore", "setStartAfter", "setEnd", "setEndBefore", "setEndAfter", "collapse", "selectNode", "selectNodeContents", "compareBoundaryPoints", "deleteContents", "extractContents", "cloneContents", "insertNode", "surroundContents", "cloneRange", "toString", "detach"], s = ["boundingHeight", "boundingLeft", "boundingTop", "boundingWidth", "htmlText", "text"], a = ["collapse", "compareEndPoints", "duplicate", "moveToElementText", "parentElement", "select", "setEndPoint", "getBoundingClientRect"];
14
20
  function c(p, x) {
@@ -21,23 +27,26 @@ function Fn() {
21
27
  function C(p, x) {
22
28
  return typeof p[x] != e;
23
29
  }
24
- function E(p) {
30
+ function T(p) {
25
31
  return function(x, L) {
26
- for (var F = L.length; F--; ) if (!p(x, L[F])) return !1;
32
+ for (var F = L.length; F--; )
33
+ if (!p(x, L[F]))
34
+ return !1;
27
35
  return !0;
28
36
  };
29
37
  }
30
- var b = E(c), M = E(g), A = E(C);
31
- function R(p) {
32
- return p && b(p, a) && A(p, s);
38
+ var E = T(c), N = T(g), A = T(C);
39
+ function M(p) {
40
+ return p && E(p, a) && A(p, s);
33
41
  }
34
42
  function H(p) {
35
43
  return g(p, "body") ? p.body : p.getElementsByTagName("body")[0];
36
44
  }
37
- var B, X, ie = {}, de = typeof window != e && typeof document != e, fe = { isHostMethod: c, isHostObject: g, isHostProperty: C, areHostMethods: b, areHostObjects: M, areHostProperties: A, isTextRange: R, getBody: H, forEach: [].forEach ? function(p, x) {
45
+ var z, X, ie = {}, de = typeof window != e && typeof document != e, fe = { isHostMethod: c, isHostObject: g, isHostProperty: C, areHostMethods: E, areHostObjects: N, areHostProperties: A, isTextRange: M, getBody: H, forEach: [].forEach ? function(p, x) {
38
46
  p.forEach(x);
39
47
  } : function(p, x) {
40
- for (var L = 0, F = p.length; L < F; ++L) x(p[L], L);
48
+ for (var L = 0, F = p.length; L < F; ++L)
49
+ x(p[L], L);
41
50
  } }, q = { version: "1.3.2", initialized: !1, isBrowser: de, supported: !0, util: fe, features: {}, modules: ie, config: { alertOnFail: !1, alertOnWarn: !1, preferTextRange: !1, autoInitialize: typeof rangyAutoInitialize == e || rangyAutoInitialize } };
42
51
  function ye(p) {
43
52
  typeof console != e && c(console, "log");
@@ -45,19 +54,20 @@ function Fn() {
45
54
  function $e(p, x) {
46
55
  de && x ? alert(p) : ye();
47
56
  }
48
- function Ae(p) {
57
+ function Ne(p) {
49
58
  q.initialized = !0, q.supported = !1, $e("Rangy is not supported in this environment. Reason: " + p, q.config.alertOnFail);
50
59
  }
51
- q.fail = Ae, q.warn = function(p) {
60
+ q.fail = Ne, q.warn = function(p) {
52
61
  $e("Rangy warning: " + p, q.config.alertOnWarn);
53
- }, {}.hasOwnProperty ? (fe.extend = B = function(p, x, L) {
62
+ }, {}.hasOwnProperty ? (fe.extend = z = function(p, x, L) {
54
63
  var F, J;
55
- for (var ee in x) ee !== "__proto__" && ee !== "constructor" && ee !== "prototype" && x.hasOwnProperty(ee) && (F = p[ee], J = x[ee], L && F !== null && typeof F == "object" && J !== null && typeof J == "object" && B(F, J, !0), p[ee] = J);
64
+ for (var ee in x)
65
+ ee !== "__proto__" && ee !== "constructor" && ee !== "prototype" && x.hasOwnProperty(ee) && (F = p[ee], J = x[ee], L && F !== null && typeof F == "object" && J !== null && typeof J == "object" && z(F, J, !0), p[ee] = J);
56
66
  return x.hasOwnProperty("toString") && (p.toString = x.toString), p;
57
67
  }, fe.createOptions = function(p, x) {
58
68
  var L = {};
59
- return B(L, x), p && B(L, p), L;
60
- }) : Ae("hasOwnProperty not supported"), de || Ae("Rangy can only run in a browser"), function() {
69
+ return z(L, x), p && z(L, p), L;
70
+ }) : Ne("hasOwnProperty not supported"), de || Ne("Rangy can only run in a browser"), function() {
61
71
  var p;
62
72
  if (de) {
63
73
  var x = document.createElement("div");
@@ -71,44 +81,50 @@ function Fn() {
71
81
  }
72
82
  }
73
83
  p || (p = function(F) {
74
- for (var J = [], ee = 0, K = F.length; ee < K; ++ee) J[ee] = F[ee];
84
+ for (var J = [], ee = 0, K = F.length; ee < K; ++ee)
85
+ J[ee] = F[ee];
75
86
  return J;
76
87
  }), fe.toArray = p;
77
88
  }(), de && (c(document, "addEventListener") ? X = function(p, x, L) {
78
89
  p.addEventListener(x, L, !1);
79
90
  } : c(document, "attachEvent") ? X = function(p, x, L) {
80
91
  p.attachEvent("on" + x, L);
81
- } : Ae("Document does not have required addEventListener or attachEvent method"), fe.addListener = X);
92
+ } : Ne("Document does not have required addEventListener or attachEvent method"), fe.addListener = X);
82
93
  var Be = [];
83
94
  function Ye(p) {
84
95
  return p.message || p.description || String(p);
85
96
  }
86
- function Oe() {
97
+ function Me() {
87
98
  if (de && !q.initialized) {
88
99
  var p, x = !1, L = !1;
89
- c(document, "createRange") && (p = document.createRange(), b(p, n) && A(p, t) && (x = !0));
100
+ c(document, "createRange") && (p = document.createRange(), E(p, n) && A(p, t) && (x = !0));
90
101
  var F = H(document);
91
- if (F && F.nodeName.toLowerCase() == "body") if (F && c(F, "createTextRange") && R(p = F.createTextRange()) && (L = !0), x || L) {
92
- var J;
93
- for (var ee in q.initialized = !0, q.features = { implementsDomRange: x, implementsTextRange: L }, ie) (J = ie[ee]) instanceof re && J.init(J, q);
94
- for (var K = 0, ue = Be.length; K < ue; ++K) try {
95
- Be[K](q);
96
- } catch (r) {
97
- "" + Ye(r), ye();
98
- }
99
- } else Ae("Neither Range nor TextRange are available");
100
- else Ae("No body element found");
102
+ if (F && F.nodeName.toLowerCase() == "body")
103
+ if (F && c(F, "createTextRange") && M(p = F.createTextRange()) && (L = !0), x || L) {
104
+ var J;
105
+ for (var ee in q.initialized = !0, q.features = { implementsDomRange: x, implementsTextRange: L }, ie)
106
+ (J = ie[ee]) instanceof re && J.init(J, q);
107
+ for (var K = 0, ue = Be.length; K < ue; ++K)
108
+ try {
109
+ Be[K](q);
110
+ } catch (r) {
111
+ "" + Ye(r), ye();
112
+ }
113
+ } else
114
+ Ne("Neither Range nor TextRange are available");
115
+ else
116
+ Ne("No body element found");
101
117
  }
102
118
  }
103
- function _e(p, x, L) {
119
+ function Ae(p, x, L) {
104
120
  L && (p += " in module " + L.name), q.warn("DEPRECATED: " + p + " is deprecated. Please use " + x + " instead.");
105
121
  }
106
122
  function De(p, x, L, F) {
107
123
  p[x] = function() {
108
- return _e(x, L, F), p[L].apply(p, fe.toArray(arguments));
124
+ return Ae(x, L, F), p[L].apply(p, fe.toArray(arguments));
109
125
  };
110
126
  }
111
- fe.deprecationNotice = _e, fe.createAliasForDeprecatedMethod = De, q.init = Oe, q.addInitListener = function(p) {
127
+ fe.deprecationNotice = Ae, fe.createAliasForDeprecatedMethod = De, q.init = Me, q.addInitListener = function(p) {
112
128
  q.initialized ? p(q) : Be.push(p);
113
129
  };
114
130
  var V = [];
@@ -133,12 +149,15 @@ function Fn() {
133
149
  q.addShimListener = function(p) {
134
150
  V.push(p);
135
151
  }, de && (q.shim = q.createMissingNativeApi = function(p) {
136
- p = p || window, Oe();
137
- for (var x = 0, L = V.length; x < L; ++x) V[x](p);
152
+ p = p || window, Me();
153
+ for (var x = 0, L = V.length; x < L; ++x)
154
+ V[x](p);
138
155
  }, De(q, "createMissingNativeApi", "shim")), re.prototype = { init: function() {
139
156
  for (var p, x, L = this.dependencies || [], F = 0, J = L.length; F < J; ++F) {
140
- if (x = L[F], !((p = ie[x]) && p instanceof re)) throw new Error("required module '" + x + "' not found");
141
- if (p.init(), !p.supported) throw new Error("required module '" + x + "' not supported");
157
+ if (x = L[F], !((p = ie[x]) && p instanceof re))
158
+ throw new Error("required module '" + x + "' not found");
159
+ if (p.init(), !p.supported)
160
+ throw new Error("required module '" + x + "' not supported");
142
161
  }
143
162
  this.initializer(this);
144
163
  }, fail: function(p) {
@@ -164,58 +183,74 @@ function Fn() {
164
183
  F.areHostMethods(ee, ["insertBefore", "appendChild", "cloneNode"]) || x.fail("Incomplete Element implementation"), F.isHostProperty(ee, "innerHTML") || x.fail("Element is missing innerHTML property");
165
184
  var K = document.createTextNode("test");
166
185
  F.areHostMethods(K, ["splitText", "deleteData", "insertData", "appendData", "cloneNode"]) || x.fail("Incomplete Text Node implementation");
167
- var ue = function(d, S) {
168
- for (var D = d.length; D--; ) if (d[D] === S) return !0;
186
+ var ue = function(d, b) {
187
+ for (var B = d.length; B--; )
188
+ if (d[B] === b)
189
+ return !0;
169
190
  return !1;
170
191
  };
171
192
  function r(d) {
172
- for (var S = 0; d = d.previousSibling; ) ++S;
173
- return S;
174
- }
175
- function h(d, S) {
176
- var D, $ = [];
177
- for (D = d; D; D = D.parentNode) $.push(D);
178
- for (D = S; D; D = D.parentNode) if (ue($, D)) return D;
193
+ for (var b = 0; d = d.previousSibling; )
194
+ ++b;
195
+ return b;
196
+ }
197
+ function h(d, b) {
198
+ var B, $ = [];
199
+ for (B = d; B; B = B.parentNode)
200
+ $.push(B);
201
+ for (B = b; B; B = B.parentNode)
202
+ if (ue($, B))
203
+ return B;
179
204
  return null;
180
205
  }
181
- function u(d, S, D) {
182
- for (var $ = D ? S : S.parentNode; $; ) {
183
- if ($ === d) return !0;
206
+ function u(d, b, B) {
207
+ for (var $ = B ? b : b.parentNode; $; ) {
208
+ if ($ === d)
209
+ return !0;
184
210
  $ = $.parentNode;
185
211
  }
186
212
  return !1;
187
213
  }
188
- function y(d, S, D) {
189
- for (var $, ne = D ? d : d.parentNode; ne; ) {
190
- if (($ = ne.parentNode) === S) return ne;
214
+ function y(d, b, B) {
215
+ for (var $, ne = B ? d : d.parentNode; ne; ) {
216
+ if (($ = ne.parentNode) === b)
217
+ return ne;
191
218
  ne = $;
192
219
  }
193
220
  return null;
194
221
  }
195
- function T(d) {
196
- var S = d.nodeType;
197
- return S == 3 || S == 4 || S == 8;
222
+ function S(d) {
223
+ var b = d.nodeType;
224
+ return b == 3 || b == 4 || b == 8;
198
225
  }
199
- function O(d, S) {
200
- var D = S.nextSibling, $ = S.parentNode;
201
- return D ? $.insertBefore(d, D) : $.appendChild(d), d;
226
+ function O(d, b) {
227
+ var B = b.nextSibling, $ = b.parentNode;
228
+ return B ? $.insertBefore(d, B) : $.appendChild(d), d;
202
229
  }
203
- function z(d) {
204
- if (d.nodeType == 9) return d;
205
- if (typeof d.ownerDocument != L) return d.ownerDocument;
206
- if (typeof d.document != L) return d.document;
207
- if (d.parentNode) return z(d.parentNode);
230
+ function P(d) {
231
+ if (d.nodeType == 9)
232
+ return d;
233
+ if (typeof d.ownerDocument != L)
234
+ return d.ownerDocument;
235
+ if (typeof d.document != L)
236
+ return d.document;
237
+ if (d.parentNode)
238
+ return P(d.parentNode);
208
239
  throw x.createError("getDocument: no document found for node");
209
240
  }
210
241
  function v(d) {
211
- var S = z(d);
212
- if (typeof S.defaultView != L) return S.defaultView;
213
- if (typeof S.parentWindow != L) return S.parentWindow;
242
+ var b = P(d);
243
+ if (typeof b.defaultView != L)
244
+ return b.defaultView;
245
+ if (typeof b.parentWindow != L)
246
+ return b.parentWindow;
214
247
  throw x.createError("Cannot get a window object for node");
215
248
  }
216
- function P(d) {
217
- if (typeof d.contentDocument != L) return d.contentDocument;
218
- if (typeof d.contentWindow != L) return d.contentWindow.document;
249
+ function D(d) {
250
+ if (typeof d.contentDocument != L)
251
+ return d.contentDocument;
252
+ if (typeof d.contentWindow != L)
253
+ return d.contentWindow.document;
219
254
  throw x.createError("getIframeDocument: No Document object found for iframe element");
220
255
  }
221
256
  function W(d) {
@@ -225,25 +260,28 @@ function Fn() {
225
260
  function Y(d) {
226
261
  try {
227
262
  return d.parentNode, !1;
228
- } catch (S) {
263
+ } catch (b) {
229
264
  return !0;
230
265
  }
231
266
  }
232
267
  function Z(d) {
233
- if (!d) return "[No node]";
234
- if (U && Y(d)) return "[Broken node]";
235
- if (T(d)) return '"' + d.data + '"';
268
+ if (!d)
269
+ return "[No node]";
270
+ if (U && Y(d))
271
+ return "[Broken node]";
272
+ if (S(d))
273
+ return '"' + d.data + '"';
236
274
  if (d.nodeType == 1) {
237
- var S = d.id ? ' id="' + d.id + '"' : "";
238
- return "<" + d.nodeName + S + ">[index:" + r(d) + ",length:" + d.childNodes.length + "][" + (d.innerHTML || "[innerHTML not supported]").slice(0, 25) + "]";
275
+ var b = d.id ? ' id="' + d.id + '"' : "";
276
+ return "<" + d.nodeName + b + ">[index:" + r(d) + ",length:" + d.childNodes.length + "][" + (d.innerHTML || "[innerHTML not supported]").slice(0, 25) + "]";
239
277
  }
240
278
  return d.nodeName;
241
279
  }
242
280
  function ce(d) {
243
281
  this.root = d, this._next = d;
244
282
  }
245
- function te(d, S) {
246
- this.node = d, this.offset = S;
283
+ function te(d, b) {
284
+ this.node = d, this.offset = b;
247
285
  }
248
286
  function he(d) {
249
287
  this.code = this[d], this.codeName = d, this.message = "DOMException: " + this.codeName;
@@ -251,21 +289,24 @@ function Fn() {
251
289
  (function() {
252
290
  var d = document.createElement("b");
253
291
  d.innerHTML = "1";
254
- var S = d.firstChild;
255
- d.innerHTML = "<br />", U = Y(S), p.features.crashyTextNodes = U;
256
- })(), typeof window.getComputedStyle != L ? I = function(d, S) {
257
- return v(d).getComputedStyle(d, null)[S];
258
- } : typeof document.documentElement.currentStyle != L ? I = function(d, S) {
259
- return d.currentStyle ? d.currentStyle[S] : "";
292
+ var b = d.firstChild;
293
+ d.innerHTML = "<br />", U = Y(b), p.features.crashyTextNodes = U;
294
+ })(), typeof window.getComputedStyle != L ? I = function(d, b) {
295
+ return v(d).getComputedStyle(d, null)[b];
296
+ } : typeof document.documentElement.currentStyle != L ? I = function(d, b) {
297
+ return d.currentStyle ? d.currentStyle[b] : "";
260
298
  } : x.fail("No means of obtaining computed style properties found"), ce.prototype = { _current: null, hasNext: function() {
261
299
  return !!this._next;
262
300
  }, next: function() {
263
- var d, S, D = this._current = this._next;
264
- if (this._current) if (d = D.firstChild) this._next = d;
265
- else {
266
- for (S = null; D !== this.root && !(S = D.nextSibling); ) D = D.parentNode;
267
- this._next = S;
268
- }
301
+ var d, b, B = this._current = this._next;
302
+ if (this._current)
303
+ if (d = B.firstChild)
304
+ this._next = d;
305
+ else {
306
+ for (b = null; B !== this.root && !(b = B.nextSibling); )
307
+ B = B.parentNode;
308
+ this._next = b;
309
+ }
269
310
  return this._current;
270
311
  }, detach: function() {
271
312
  this._current = this._next = this.root = null;
@@ -278,11 +319,11 @@ function Fn() {
278
319
  } }, he.prototype = { INDEX_SIZE_ERR: 1, HIERARCHY_REQUEST_ERR: 3, WRONG_DOCUMENT_ERR: 4, NO_MODIFICATION_ALLOWED_ERR: 7, NOT_FOUND_ERR: 8, NOT_SUPPORTED_ERR: 9, INVALID_STATE_ERR: 11, INVALID_NODE_TYPE_ERR: 24 }, he.prototype.toString = function() {
279
320
  return this.message;
280
321
  }, p.dom = { arrayContains: ue, isHtmlNamespace: function(d) {
281
- var S;
282
- return typeof d.namespaceURI == L || (S = d.namespaceURI) === null || S == "http://www.w3.org/1999/xhtml";
322
+ var b;
323
+ return typeof d.namespaceURI == L || (b = d.namespaceURI) === null || b == "http://www.w3.org/1999/xhtml";
283
324
  }, parentElement: function(d) {
284
- var S = d.parentNode;
285
- return S.nodeType == 1 ? S : null;
325
+ var b = d.parentNode;
326
+ return b.nodeType == 1 ? b : null;
286
327
  }, getNodeIndex: r, getNodeLength: function(d) {
287
328
  switch (d.nodeType) {
288
329
  case 7:
@@ -294,54 +335,69 @@ function Fn() {
294
335
  default:
295
336
  return d.childNodes.length;
296
337
  }
297
- }, getCommonAncestor: h, isAncestorOf: u, isOrIsAncestorOf: function(d, S) {
298
- return u(d, S, !0);
299
- }, getClosestAncestorIn: y, isCharacterDataNode: T, isTextOrCommentNode: function(d) {
300
- if (!d) return !1;
301
- var S = d.nodeType;
302
- return S == 3 || S == 8;
303
- }, insertAfter: O, splitDataNode: function(d, S, D) {
338
+ }, getCommonAncestor: h, isAncestorOf: u, isOrIsAncestorOf: function(d, b) {
339
+ return u(d, b, !0);
340
+ }, getClosestAncestorIn: y, isCharacterDataNode: S, isTextOrCommentNode: function(d) {
341
+ if (!d)
342
+ return !1;
343
+ var b = d.nodeType;
344
+ return b == 3 || b == 8;
345
+ }, insertAfter: O, splitDataNode: function(d, b, B) {
304
346
  var $ = d.cloneNode(!1);
305
- if ($.deleteData(0, S), d.deleteData(S, d.length - S), O($, d), D) for (var ne, ge = 0; ne = D[ge++]; ) ne.node == d && ne.offset > S ? (ne.node = $, ne.offset -= S) : ne.node == d.parentNode && ne.offset > r(d) && ++ne.offset;
347
+ if ($.deleteData(0, b), d.deleteData(b, d.length - b), O($, d), B)
348
+ for (var ne, ge = 0; ne = B[ge++]; )
349
+ ne.node == d && ne.offset > b ? (ne.node = $, ne.offset -= b) : ne.node == d.parentNode && ne.offset > r(d) && ++ne.offset;
306
350
  return $;
307
- }, getDocument: z, getWindow: v, getIframeWindow: function(d) {
308
- if (typeof d.contentWindow != L) return d.contentWindow;
309
- if (typeof d.contentDocument != L) return d.contentDocument.defaultView;
351
+ }, getDocument: P, getWindow: v, getIframeWindow: function(d) {
352
+ if (typeof d.contentWindow != L)
353
+ return d.contentWindow;
354
+ if (typeof d.contentDocument != L)
355
+ return d.contentDocument.defaultView;
310
356
  throw x.createError("getIframeWindow: No Window object found for iframe element");
311
- }, getIframeDocument: P, getBody: J, isWindow: W, getContentDocument: function(d, S, D) {
357
+ }, getIframeDocument: D, getBody: J, isWindow: W, getContentDocument: function(d, b, B) {
312
358
  var $;
313
- if (d ? F.isHostProperty(d, "nodeType") ? $ = d.nodeType == 1 && d.tagName.toLowerCase() == "iframe" ? P(d) : z(d) : W(d) && ($ = d.document) : $ = document, !$) throw S.createError(D + "(): Parameter must be a Window object or DOM node");
359
+ if (d ? F.isHostProperty(d, "nodeType") ? $ = d.nodeType == 1 && d.tagName.toLowerCase() == "iframe" ? D(d) : P(d) : W(d) && ($ = d.document) : $ = document, !$)
360
+ throw b.createError(B + "(): Parameter must be a Window object or DOM node");
314
361
  return $;
315
362
  }, getRootContainer: function(d) {
316
- for (var S; S = d.parentNode; ) d = S;
363
+ for (var b; b = d.parentNode; )
364
+ d = b;
317
365
  return d;
318
- }, comparePoints: function(d, S, D, $) {
319
- var ne, ge, Me, Ce, we;
320
- if (d == D) return S === $ ? 0 : S < $ ? -1 : 1;
321
- if (ne = y(D, d, !0)) return S <= r(ne) ? -1 : 1;
322
- if (ne = y(d, D, !0)) return r(ne) < $ ? -1 : 1;
323
- if (!(ge = h(d, D))) throw new Error("comparePoints error: nodes have no common ancestor");
324
- if ((Me = d === ge ? ge : y(d, ge, !0)) === (Ce = D === ge ? ge : y(D, ge, !0))) throw x.createError("comparePoints got to case 4 and childA and childB are the same!");
366
+ }, comparePoints: function(d, b, B, $) {
367
+ var ne, ge, _e, Ce, we;
368
+ if (d == B)
369
+ return b === $ ? 0 : b < $ ? -1 : 1;
370
+ if (ne = y(B, d, !0))
371
+ return b <= r(ne) ? -1 : 1;
372
+ if (ne = y(d, B, !0))
373
+ return r(ne) < $ ? -1 : 1;
374
+ if (!(ge = h(d, B)))
375
+ throw new Error("comparePoints error: nodes have no common ancestor");
376
+ if ((_e = d === ge ? ge : y(d, ge, !0)) === (Ce = B === ge ? ge : y(B, ge, !0)))
377
+ throw x.createError("comparePoints got to case 4 and childA and childB are the same!");
325
378
  for (we = ge.firstChild; we; ) {
326
- if (we === Me) return -1;
327
- if (we === Ce) return 1;
379
+ if (we === _e)
380
+ return -1;
381
+ if (we === Ce)
382
+ return 1;
328
383
  we = we.nextSibling;
329
384
  }
330
- }, isBrokenNode: Y, inspectNode: Z, getComputedStyleProperty: I, createTestElement: function(d, S, D) {
385
+ }, isBrokenNode: Y, inspectNode: Z, getComputedStyleProperty: I, createTestElement: function(d, b, B) {
331
386
  var $ = J(d), ne = d.createElement("div");
332
- ne.contentEditable = "" + !!D, S && (ne.innerHTML = S);
387
+ ne.contentEditable = "" + !!B, b && (ne.innerHTML = b);
333
388
  var ge = $.firstChild;
334
389
  return ge ? $.insertBefore(ne, ge) : $.appendChild(ne), ne;
335
390
  }, removeNode: function(d) {
336
391
  return d.parentNode.removeChild(d);
337
392
  }, fragmentFromNodeChildren: function(d) {
338
- for (var S, D = z(d).createDocumentFragment(); S = d.firstChild; ) D.appendChild(S);
339
- return D;
393
+ for (var b, B = P(d).createDocumentFragment(); b = d.firstChild; )
394
+ B.appendChild(b);
395
+ return B;
340
396
  }, createIterator: function(d) {
341
397
  return new ce(d);
342
398
  }, DomPosition: te }, p.DOMException = he;
343
399
  }), q.createCoreModule("DomRange", ["DomUtil"], function(p, x) {
344
- var L = p.dom, F = p.util, J = L.DomPosition, ee = p.DOMException, K = L.isCharacterDataNode, ue = L.getNodeIndex, r = L.isOrIsAncestorOf, h = L.getDocument, u = L.comparePoints, y = L.splitDataNode, T = L.getClosestAncestorIn, O = L.getNodeLength, z = L.arrayContains, v = L.getRootContainer, P = p.features.crashyTextNodes, W = L.removeNode;
400
+ var L = p.dom, F = p.util, J = L.DomPosition, ee = p.DOMException, K = L.isCharacterDataNode, ue = L.getNodeIndex, r = L.isOrIsAncestorOf, h = L.getDocument, u = L.comparePoints, y = L.splitDataNode, S = L.getClosestAncestorIn, O = L.getNodeLength, P = L.arrayContains, v = L.getRootContainer, D = p.features.crashyTextNodes, W = L.removeNode;
345
401
  function I(o, f) {
346
402
  return o.nodeType != 3 && (r(o, f.startContainer) || r(o, f.endContainer));
347
403
  }
@@ -359,30 +415,40 @@ function Fn() {
359
415
  return K(f) ? i == f.length ? L.insertAfter(o, f) : f.parentNode.insertBefore(o, i == 0 ? f : y(f, i)) : i >= f.childNodes.length ? f.appendChild(o) : f.insertBefore(o, f.childNodes[i]), l;
360
416
  }
361
417
  function te(o, f, i) {
362
- if (pe(o), pe(f), U(f) != U(o)) throw new ee("WRONG_DOCUMENT_ERR");
418
+ if (pe(o), pe(f), U(f) != U(o))
419
+ throw new ee("WRONG_DOCUMENT_ERR");
363
420
  var l = u(o.startContainer, o.startOffset, f.endContainer, f.endOffset), m = u(o.endContainer, o.endOffset, f.startContainer, f.startOffset);
364
421
  return i ? l <= 0 && m >= 0 : l < 0 && m > 0;
365
422
  }
366
423
  function he(o) {
367
424
  for (var f, i, l, m = U(o.range).createDocumentFragment(); i = o.next(); ) {
368
- if (f = o.isPartiallySelectedSubtree(), i = i.cloneNode(!f), f && (l = o.getSubtreeIterator(), i.appendChild(he(l)), l.detach()), i.nodeType == 10) throw new ee("HIERARCHY_REQUEST_ERR");
425
+ if (f = o.isPartiallySelectedSubtree(), i = i.cloneNode(!f), f && (l = o.getSubtreeIterator(), i.appendChild(he(l)), l.detach()), i.nodeType == 10)
426
+ throw new ee("HIERARCHY_REQUEST_ERR");
369
427
  m.appendChild(i);
370
428
  }
371
429
  return m;
372
430
  }
373
431
  function d(o, f, i) {
374
432
  var l, m, k, w;
375
- for (i = i || { stop: !1 }; k = o.next(); ) if (o.isPartiallySelectedSubtree()) {
376
- if (f(k) === !1) return void (i.stop = !0);
377
- if (d(w = o.getSubtreeIterator(), f, i), w.detach(), i.stop) return;
378
- } else for (l = L.createIterator(k); m = l.next(); ) if (f(m) === !1) return void (i.stop = !0);
379
- }
380
- function S(o) {
381
- for (var f; o.next(); ) o.isPartiallySelectedSubtree() ? (S(f = o.getSubtreeIterator()), f.detach()) : o.remove();
382
- }
383
- function D(o) {
433
+ for (i = i || { stop: !1 }; k = o.next(); )
434
+ if (o.isPartiallySelectedSubtree()) {
435
+ if (f(k) === !1)
436
+ return void (i.stop = !0);
437
+ if (d(w = o.getSubtreeIterator(), f, i), w.detach(), i.stop)
438
+ return;
439
+ } else
440
+ for (l = L.createIterator(k); m = l.next(); )
441
+ if (f(m) === !1)
442
+ return void (i.stop = !0);
443
+ }
444
+ function b(o) {
445
+ for (var f; o.next(); )
446
+ o.isPartiallySelectedSubtree() ? (b(f = o.getSubtreeIterator()), f.detach()) : o.remove();
447
+ }
448
+ function B(o) {
384
449
  for (var f, i, l = U(o.range).createDocumentFragment(); f = o.next(); ) {
385
- if (o.isPartiallySelectedSubtree() ? (f = f.cloneNode(!1), i = o.getSubtreeIterator(), f.appendChild(D(i)), i.detach()) : o.remove(), f.nodeType == 10) throw new ee("HIERARCHY_REQUEST_ERR");
450
+ if (o.isPartiallySelectedSubtree() ? (f = f.cloneNode(!1), i = o.getSubtreeIterator(), f.appendChild(B(i)), i.detach()) : o.remove(), f.nodeType == 10)
451
+ throw new ee("HIERARCHY_REQUEST_ERR");
386
452
  l.appendChild(f);
387
453
  }
388
454
  return l;
@@ -394,7 +460,7 @@ function Fn() {
394
460
  if (this.range = o, this.clonePartiallySelectedTextNodes = f, !o.collapsed) {
395
461
  this.sc = o.startContainer, this.so = o.startOffset, this.ec = o.endContainer, this.eo = o.endOffset;
396
462
  var i = o.commonAncestorContainer;
397
- this.sc === this.ec && K(this.sc) ? (this.isSingleCharacterDataNode = !0, this._first = this._last = this._next = this.sc) : (this._first = this._next = this.sc !== i || K(this.sc) ? T(this.sc, i, !0) : this.sc.childNodes[this.so], this._last = this.ec !== i || K(this.ec) ? T(this.ec, i, !0) : this.ec.childNodes[this.eo - 1]);
463
+ this.sc === this.ec && K(this.sc) ? (this.isSingleCharacterDataNode = !0, this._first = this._last = this._next = this.sc) : (this._first = this._next = this.sc !== i || K(this.sc) ? S(this.sc, i, !0) : this.sc.childNodes[this.so], this._last = this.ec !== i || K(this.ec) ? S(this.ec, i, !0) : this.ec.childNodes[this.eo - 1]);
398
464
  }
399
465
  }
400
466
  ne.prototype = { _current: null, _next: null, _first: null, _last: null, isSingleCharacterDataNode: !1, reset: function() {
@@ -411,7 +477,8 @@ function Fn() {
411
477
  return I(this._current, this.range);
412
478
  }, getSubtreeIterator: function() {
413
479
  var o;
414
- if (this.isSingleCharacterDataNode) (o = this.range.cloneRange()).collapse(!1);
480
+ if (this.isSingleCharacterDataNode)
481
+ (o = this.range.cloneRange()).collapse(!1);
415
482
  else {
416
483
  o = new Ve(U(this.range));
417
484
  var f = this._current, i = f, l = 0, m = f, k = O(f);
@@ -421,43 +488,51 @@ function Fn() {
421
488
  }, detach: function() {
422
489
  this.range = this._current = this._next = this._first = this._last = this.sc = this.so = this.ec = this.eo = null;
423
490
  } };
424
- var ge = [1, 3, 4, 5, 7, 8, 10], Me = [2, 9, 11], Ce = [1, 3, 4, 5, 7, 8, 10, 11], we = [1, 3, 4, 5, 7, 8];
425
- function Ne(o) {
491
+ var ge = [1, 3, 4, 5, 7, 8, 10], _e = [2, 9, 11], Ce = [1, 3, 4, 5, 7, 8, 10, 11], we = [1, 3, 4, 5, 7, 8];
492
+ function Re(o) {
426
493
  return function(f, i) {
427
494
  for (var l, m = i ? f : f.parentNode; m; ) {
428
- if (l = m.nodeType, z(o, l)) return m;
495
+ if (l = m.nodeType, P(o, l))
496
+ return m;
429
497
  m = m.parentNode;
430
498
  }
431
499
  return null;
432
500
  };
433
501
  }
434
- var Ie = Ne([9, 11]), Ge = Ne([5, 6, 10, 12]), Pe = Ne([6, 10, 12]), nt = Ne([1]);
502
+ var Oe = Re([9, 11]), Ge = Re([5, 6, 10, 12]), Pe = Re([6, 10, 12]), nt = Re([1]);
435
503
  function be(o, f) {
436
- if (Pe(o, f)) throw new ee("INVALID_NODE_TYPE_ERR");
504
+ if (Pe(o, f))
505
+ throw new ee("INVALID_NODE_TYPE_ERR");
437
506
  }
438
- function Ee(o, f) {
439
- if (!z(f, o.nodeType)) throw new ee("INVALID_NODE_TYPE_ERR");
507
+ function Te(o, f) {
508
+ if (!P(f, o.nodeType))
509
+ throw new ee("INVALID_NODE_TYPE_ERR");
440
510
  }
441
511
  function je(o, f) {
442
- if (f < 0 || f > (K(o) ? o.length : o.childNodes.length)) throw new ee("INDEX_SIZE_ERR");
512
+ if (f < 0 || f > (K(o) ? o.length : o.childNodes.length))
513
+ throw new ee("INDEX_SIZE_ERR");
443
514
  }
444
515
  function it(o, f) {
445
- if (Ie(o, !0) !== Ie(f, !0)) throw new ee("WRONG_DOCUMENT_ERR");
516
+ if (Oe(o, !0) !== Oe(f, !0))
517
+ throw new ee("WRONG_DOCUMENT_ERR");
446
518
  }
447
519
  function ze(o) {
448
- if (Ge(o, !0)) throw new ee("NO_MODIFICATION_ALLOWED_ERR");
520
+ if (Ge(o, !0))
521
+ throw new ee("NO_MODIFICATION_ALLOWED_ERR");
449
522
  }
450
523
  function ft(o, f) {
451
- if (!o) throw new ee(f);
524
+ if (!o)
525
+ throw new ee(f);
452
526
  }
453
527
  function Xe(o, f) {
454
528
  return f <= (K(o) ? o.length : o.childNodes.length);
455
529
  }
456
530
  function mt(o) {
457
- return !!o.startContainer && !!o.endContainer && !(P && (L.isBrokenNode(o.startContainer) || L.isBrokenNode(o.endContainer))) && v(o.startContainer) == v(o.endContainer) && Xe(o.startContainer, o.startOffset) && Xe(o.endContainer, o.endOffset);
531
+ return !!o.startContainer && !!o.endContainer && !(D && (L.isBrokenNode(o.startContainer) || L.isBrokenNode(o.endContainer))) && v(o.startContainer) == v(o.endContainer) && Xe(o.startContainer, o.startOffset) && Xe(o.endContainer, o.endOffset);
458
532
  }
459
533
  function pe(o) {
460
- if (!mt(o)) throw new Error("Range error: Range is not valid. This usually happens after DOM mutation. Range: (" + o.inspect() + ")");
534
+ if (!mt(o))
535
+ throw new Error("Range error: Range is not valid. This usually happens after DOM mutation. Range: (" + o.inspect() + ")");
461
536
  }
462
537
  var vt = document.createElement("style"), qe = !1;
463
538
  try {
@@ -467,7 +542,8 @@ function Fn() {
467
542
  p.features.htmlParsingConforms = qe;
468
543
  var Ct = qe ? function(o) {
469
544
  var f = this.startContainer, i = h(f);
470
- if (!f) throw new ee("INVALID_STATE_ERR");
545
+ if (!f)
546
+ throw new ee("INVALID_STATE_ERR");
471
547
  var l = null;
472
548
  return f.nodeType == 1 ? l = f : K(f) && (l = L.parentElement(f)), (l = l === null || l.nodeName == "HTML" && L.isHtmlNamespace(h(l).documentElement) && L.isHtmlNamespace(l) ? i.createElement("body") : l.cloneNode(!1)).innerHTML = o, L.fragmentFromNodeChildren(l);
473
549
  } : function(o) {
@@ -495,35 +571,35 @@ function Fn() {
495
571
  return function() {
496
572
  pe(this);
497
573
  var i, l = this.startContainer, m = this.startOffset, k = this.commonAncestorContainer, w = new ne(this, !0);
498
- l !== k && (l = (i = Z(T(l, k, !0))).node, m = i.offset), d(w, ze), w.reset();
499
- var N = o(w);
500
- return w.detach(), f(this, l, m, l, m), N;
574
+ l !== k && (l = (i = Z(S(l, k, !0))).node, m = i.offset), d(w, ze), w.reset();
575
+ var R = o(w);
576
+ return w.detach(), f(this, l, m, l, m), R;
501
577
  };
502
578
  }
503
579
  function kt(o, f) {
504
- function i(w, N) {
580
+ function i(w, R) {
505
581
  return function(G) {
506
- Ee(G, ge), Ee(v(G), Me);
582
+ Te(G, ge), Te(v(G), _e);
507
583
  var j = (w ? Y : Z)(G);
508
- (N ? l : m)(this, j.node, j.offset);
584
+ (R ? l : m)(this, j.node, j.offset);
509
585
  };
510
586
  }
511
- function l(w, N, G) {
587
+ function l(w, R, G) {
512
588
  var j = w.endContainer, oe = w.endOffset;
513
- N === w.startContainer && G === w.startOffset || (v(N) == v(j) && u(N, G, j, oe) != 1 || (j = N, oe = G), f(w, N, G, j, oe));
589
+ R === w.startContainer && G === w.startOffset || (v(R) == v(j) && u(R, G, j, oe) != 1 || (j = R, oe = G), f(w, R, G, j, oe));
514
590
  }
515
- function m(w, N, G) {
591
+ function m(w, R, G) {
516
592
  var j = w.startContainer, oe = w.startOffset;
517
- N === w.endContainer && G === w.endOffset || (v(N) == v(j) && u(N, G, j, oe) != -1 || (j = N, oe = G), f(w, j, oe, N, G));
593
+ R === w.endContainer && G === w.endOffset || (v(R) == v(j) && u(R, G, j, oe) != -1 || (j = R, oe = G), f(w, j, oe, R, G));
518
594
  }
519
595
  var k = function() {
520
596
  };
521
- k.prototype = p.rangePrototype, o.prototype = new k(), F.extend(o.prototype, { setStart: function(w, N) {
522
- be(w, !0), je(w, N), l(this, w, N);
523
- }, setEnd: function(w, N) {
524
- be(w, !0), je(w, N), m(this, w, N);
597
+ k.prototype = p.rangePrototype, o.prototype = new k(), F.extend(o.prototype, { setStart: function(w, R) {
598
+ be(w, !0), je(w, R), l(this, w, R);
599
+ }, setEnd: function(w, R) {
600
+ be(w, !0), je(w, R), m(this, w, R);
525
601
  }, setStartAndEnd: function() {
526
- var w = arguments, N = w[0], G = w[1], j = N, oe = G;
602
+ var w = arguments, R = w[0], G = w[1], j = R, oe = G;
527
603
  switch (w.length) {
528
604
  case 3:
529
605
  oe = w[2];
@@ -531,60 +607,64 @@ function Fn() {
531
607
  case 4:
532
608
  j = w[2], oe = w[3];
533
609
  }
534
- be(N, !0), je(N, G), be(j, !0), je(j, oe), f(this, N, G, j, oe);
535
- }, setBoundary: function(w, N, G) {
536
- this["set" + (G ? "Start" : "End")](w, N);
610
+ be(R, !0), je(R, G), be(j, !0), je(j, oe), f(this, R, G, j, oe);
611
+ }, setBoundary: function(w, R, G) {
612
+ this["set" + (G ? "Start" : "End")](w, R);
537
613
  }, setStartBefore: i(!0, !0), setStartAfter: i(!1, !0), setEndBefore: i(!0, !1), setEndAfter: i(!1, !1), collapse: function(w) {
538
614
  pe(this), w ? f(this, this.startContainer, this.startOffset, this.startContainer, this.startOffset) : f(this, this.endContainer, this.endOffset, this.endContainer, this.endOffset);
539
615
  }, selectNodeContents: function(w) {
540
616
  be(w, !0), f(this, w, 0, w, O(w));
541
617
  }, selectNode: function(w) {
542
- be(w, !1), Ee(w, ge);
543
- var N = Y(w), G = Z(w);
544
- f(this, N.node, N.offset, G.node, G.offset);
545
- }, extractContents: Qe(D, f), deleteContents: Qe(S, f), canSurroundContents: function() {
618
+ be(w, !1), Te(w, ge);
619
+ var R = Y(w), G = Z(w);
620
+ f(this, R.node, R.offset, G.node, G.offset);
621
+ }, extractContents: Qe(B, f), deleteContents: Qe(b, f), canSurroundContents: function() {
546
622
  pe(this), ze(this.startContainer), ze(this.endContainer);
547
- var w = new ne(this, !0), N = w._first && I(w._first, this) || w._last && I(w._last, this);
548
- return w.detach(), !N;
623
+ var w = new ne(this, !0), R = w._first && I(w._first, this) || w._last && I(w._last, this);
624
+ return w.detach(), !R;
549
625
  }, splitBoundaries: function() {
550
626
  dt(this);
551
627
  }, splitBoundariesPreservingPositions: function(w) {
552
628
  dt(this, w);
553
629
  }, normalizeBoundaries: function() {
554
630
  pe(this);
555
- var w, N = this.startContainer, G = this.startOffset, j = this.endContainer, oe = this.endOffset, Je = function(Le) {
556
- var We = Le.nextSibling;
557
- We && We.nodeType == Le.nodeType && (j = Le, oe = Le.length, Le.appendData(We.data), W(We));
558
- }, ht = function(Le) {
559
- var We = Le.previousSibling;
560
- if (We && We.nodeType == Le.nodeType) {
561
- N = Le;
562
- var xn = Le.length;
563
- if (G = We.length, Le.insertData(0, We.data), W(We), N == j) oe += G, j = N;
564
- else if (j == Le.parentNode) {
565
- var Kt = ue(Le);
566
- oe == Kt ? (j = Le, oe = xn) : oe > Kt && oe--;
631
+ var w, R = this.startContainer, G = this.startOffset, j = this.endContainer, oe = this.endOffset, Je = function(Ee) {
632
+ var We = Ee.nextSibling;
633
+ We && We.nodeType == Ee.nodeType && (j = Ee, oe = Ee.length, Ee.appendData(We.data), W(We));
634
+ }, ht = function(Ee) {
635
+ var We = Ee.previousSibling;
636
+ if (We && We.nodeType == Ee.nodeType) {
637
+ R = Ee;
638
+ var xn = Ee.length;
639
+ if (G = We.length, Ee.insertData(0, We.data), W(We), R == j)
640
+ oe += G, j = R;
641
+ else if (j == Ee.parentNode) {
642
+ var Kt = ue(Ee);
643
+ oe == Kt ? (j = Ee, oe = xn) : oe > Kt && oe--;
567
644
  }
568
645
  }
569
- }, At = !0;
570
- if (K(j)) oe == j.length ? Je(j) : oe == 0 && (w = j.previousSibling) && w.nodeType == j.nodeType && (oe = w.length, N == j && (At = !1), w.appendData(j.data), W(j), j = w);
646
+ }, _t = !0;
647
+ if (K(j))
648
+ oe == j.length ? Je(j) : oe == 0 && (w = j.previousSibling) && w.nodeType == j.nodeType && (oe = w.length, R == j && (_t = !1), w.appendData(j.data), W(j), j = w);
571
649
  else {
572
650
  if (oe > 0) {
573
- var _t = j.childNodes[oe - 1];
574
- _t && K(_t) && Je(_t);
651
+ var Mt = j.childNodes[oe - 1];
652
+ Mt && K(Mt) && Je(Mt);
575
653
  }
576
- At = !this.collapsed;
654
+ _t = !this.collapsed;
577
655
  }
578
- if (At) {
579
- if (K(N)) G == 0 ? ht(N) : G == N.length && (w = N.nextSibling) && w.nodeType == N.nodeType && (j == w && (j = N, oe += N.length), N.appendData(w.data), W(w));
580
- else if (G < N.childNodes.length) {
581
- var Mt = N.childNodes[G];
582
- Mt && K(Mt) && ht(Mt);
656
+ if (_t) {
657
+ if (K(R))
658
+ G == 0 ? ht(R) : G == R.length && (w = R.nextSibling) && w.nodeType == R.nodeType && (j == w && (j = R, oe += R.length), R.appendData(w.data), W(w));
659
+ else if (G < R.childNodes.length) {
660
+ var Ot = R.childNodes[G];
661
+ Ot && K(Ot) && ht(Ot);
583
662
  }
584
- } else N = j, G = oe;
585
- f(this, N, G, j, oe);
586
- }, collapseToPoint: function(w, N) {
587
- be(w, !0), je(w, N), this.setStartAndEnd(w, N);
663
+ } else
664
+ R = j, G = oe;
665
+ f(this, R, G, j, oe);
666
+ }, collapseToPoint: function(w, R) {
667
+ be(w, !0), je(w, R), this.setStartAndEnd(w, R);
588
668
  }, parentElement: function() {
589
669
  return pe(this), this.commonAncestorContainer ? nt(this.commonAncestorContainer, !0) : null;
590
670
  } }), yt(o);
@@ -600,16 +680,19 @@ function Fn() {
600
680
  F.extend(p.rangePrototype, { compareBoundaryPoints: function(o, f) {
601
681
  var i, l, m, k;
602
682
  pe(this), it(this.startContainer, f.startContainer);
603
- var w = o == 3 || o == 0 ? "start" : "end", N = o == 1 || o == 0 ? "start" : "end";
604
- return i = this[w + "Container"], l = this[w + "Offset"], m = f[N + "Container"], k = f[N + "Offset"], u(i, l, m, k);
683
+ var w = o == 3 || o == 0 ? "start" : "end", R = o == 1 || o == 0 ? "start" : "end";
684
+ return i = this[w + "Container"], l = this[w + "Offset"], m = f[R + "Container"], k = f[R + "Offset"], u(i, l, m, k);
605
685
  }, insertNode: function(o) {
606
- if (pe(this), Ee(o, Ce), ze(this.startContainer), r(o, this.startContainer)) throw new ee("HIERARCHY_REQUEST_ERR");
686
+ if (pe(this), Te(o, Ce), ze(this.startContainer), r(o, this.startContainer))
687
+ throw new ee("HIERARCHY_REQUEST_ERR");
607
688
  var f = ce(o, this.startContainer, this.startOffset);
608
689
  this.setStartBefore(f);
609
690
  }, cloneContents: function() {
610
691
  var o, f;
611
- if (pe(this), this.collapsed) return U(this).createDocumentFragment();
612
- if (this.startContainer === this.endContainer && K(this.startContainer)) return (o = this.startContainer.cloneNode(!0)).data = o.data.slice(this.startOffset, this.endOffset), (f = U(this).createDocumentFragment()).appendChild(o), f;
692
+ if (pe(this), this.collapsed)
693
+ return U(this).createDocumentFragment();
694
+ if (this.startContainer === this.endContainer && K(this.startContainer))
695
+ return (o = this.startContainer.cloneNode(!0)).data = o.data.slice(this.startOffset, this.endOffset), (f = U(this).createDocumentFragment()).appendChild(o), f;
613
696
  var i = new ne(this, !0);
614
697
  return o = he(i), i.detach(), o;
615
698
  }, canSurroundContents: function() {
@@ -617,18 +700,23 @@ function Fn() {
617
700
  var o = new ne(this, !0), f = o._first && I(o._first, this) || o._last && I(o._last, this);
618
701
  return o.detach(), !f;
619
702
  }, surroundContents: function(o) {
620
- if (Ee(o, we), !this.canSurroundContents()) throw new ee("INVALID_STATE_ERR");
703
+ if (Te(o, we), !this.canSurroundContents())
704
+ throw new ee("INVALID_STATE_ERR");
621
705
  var f = this.extractContents();
622
- if (o.hasChildNodes()) for (; o.lastChild; ) o.removeChild(o.lastChild);
706
+ if (o.hasChildNodes())
707
+ for (; o.lastChild; )
708
+ o.removeChild(o.lastChild);
623
709
  ce(o, this.startContainer, this.startOffset), o.appendChild(f), this.selectNode(o);
624
710
  }, cloneRange: function() {
625
711
  pe(this);
626
- for (var o, f = new Ve(U(this)), i = se.length; i--; ) f[o = se[i]] = this[o];
712
+ for (var o, f = new Ve(U(this)), i = se.length; i--; )
713
+ f[o = se[i]] = this[o];
627
714
  return f;
628
715
  }, toString: function() {
629
716
  pe(this);
630
717
  var o = this.startContainer;
631
- if (o === this.endContainer && K(o)) return o.nodeType == 3 || o.nodeType == 4 ? o.data.slice(this.startOffset, this.endOffset) : "";
718
+ if (o === this.endContainer && K(o))
719
+ return o.nodeType == 3 || o.nodeType == 4 ? o.data.slice(this.startOffset, this.endOffset) : "";
632
720
  var f = [], i = new ne(this, !0);
633
721
  return d(i, function(l) {
634
722
  l.nodeType != 3 && l.nodeType != 4 || f.push(l.data);
@@ -636,7 +724,8 @@ function Fn() {
636
724
  }, compareNode: function(o) {
637
725
  pe(this);
638
726
  var f = o.parentNode, i = ue(o);
639
- if (!f) throw new ee("NOT_FOUND_ERR");
727
+ if (!f)
728
+ throw new ee("NOT_FOUND_ERR");
640
729
  var l = this.comparePoint(f, i), m = this.comparePoint(f, i + 1);
641
730
  return l < 0 ? m > 0 ? 2 : 0 : m > 0 ? 1 : 3;
642
731
  }, comparePoint: function(o, f) {
@@ -644,9 +733,11 @@ function Fn() {
644
733
  }, createContextualFragment: Ct, toHtml: function() {
645
734
  return st(this);
646
735
  }, intersectsNode: function(o, f) {
647
- if (pe(this), v(o) != v(this.startContainer)) return !1;
736
+ if (pe(this), v(o) != v(this.startContainer))
737
+ return !1;
648
738
  var i = o.parentNode, l = ue(o);
649
- if (!i) return !0;
739
+ if (!i)
740
+ return !0;
650
741
  var m = u(i, l, this.endContainer, this.endOffset), k = u(i, l + 1, this.startContainer, this.startOffset);
651
742
  return f ? m <= 0 && k >= 0 : m < 0 && k > 0;
652
743
  }, isPointInRange: function(o, f) {
@@ -686,11 +777,11 @@ function Fn() {
686
777
  return this.containsNodeContents(o);
687
778
  }, getNodes: function(o, f) {
688
779
  return pe(this), function(i, l, m) {
689
- var k, w = !(!l || !l.length), N = !!m;
780
+ var k, w = !(!l || !l.length), R = !!m;
690
781
  w && (k = new RegExp("^(" + l.join("|") + ")$"));
691
782
  var G = [];
692
783
  return d(new ne(i, !1), function(j) {
693
- if ((!w || k.test(j.nodeType)) && (!N || m(j))) {
784
+ if ((!w || k.test(j.nodeType)) && (!R || m(j))) {
694
785
  var oe = i.startContainer;
695
786
  if (j != oe || !K(oe) || i.startOffset != oe.length) {
696
787
  var Je = i.endContainer;
@@ -713,8 +804,12 @@ function Fn() {
713
804
  }, moveToBookmark: function(o) {
714
805
  var f = o.containerNode, i = 0;
715
806
  this.setStart(f, 0), this.collapse(!0);
716
- for (var l, m, k, w, N = [f], G = !1, j = !1; !j && (l = N.pop()); ) if (l.nodeType == 3) m = i + l.length, !G && o.start >= i && o.start <= m && (this.setStart(l, o.start - i), G = !0), G && o.end >= i && o.end <= m && (this.setEnd(l, o.end - i), j = !0), i = m;
717
- else for (k = (w = l.childNodes).length; k--; ) N.push(w[k]);
807
+ for (var l, m, k, w, R = [f], G = !1, j = !1; !j && (l = R.pop()); )
808
+ if (l.nodeType == 3)
809
+ m = i + l.length, !G && o.start >= i && o.start <= m && (this.setStart(l, o.start - i), G = !0), G && o.end >= i && o.end <= m && (this.setEnd(l, o.end - i), j = !0), i = m;
810
+ else
811
+ for (k = (w = l.childNodes).length; k--; )
812
+ R.push(w[k]);
718
813
  }, getName: function() {
719
814
  return "DomRange";
720
815
  }, equals: function(o) {
@@ -730,17 +825,19 @@ function Fn() {
730
825
  }), q.createCoreModule("WrappedRange", ["DomRange"], function(p, x) {
731
826
  var L, F, J = p.dom, ee = p.util, K = J.DomPosition, ue = p.DomRange, r = J.getBody, h = J.getContentDocument, u = J.isCharacterDataNode;
732
827
  if (p.features.implementsDomRange && function() {
733
- var v, P, W = ue.rangeProperties;
828
+ var v, D, W = ue.rangeProperties;
734
829
  function I(d) {
735
- for (var S, D = W.length; D--; ) d[S = W[D]] = d.nativeRange[S];
830
+ for (var b, B = W.length; B--; )
831
+ d[b = W[B]] = d.nativeRange[b];
736
832
  d.collapsed = d.startContainer === d.endContainer && d.startOffset === d.endOffset;
737
833
  }
738
834
  L = function(d) {
739
- if (!d) throw x.createError("WrappedRange: Range must be specified");
835
+ if (!d)
836
+ throw x.createError("WrappedRange: Range must be specified");
740
837
  this.nativeRange = d, I(this);
741
- }, ue.createPrototypeRange(L, function(d, S, D, $, ne) {
742
- var ge = d.startContainer !== S || d.startOffset != D, Me = d.endContainer !== $ || d.endOffset != ne, Ce = !d.equals(d.nativeRange);
743
- (ge || Me || Ce) && (d.setEnd($, ne), d.setStart(S, D));
838
+ }, ue.createPrototypeRange(L, function(d, b, B, $, ne) {
839
+ var ge = d.startContainer !== b || d.startOffset != B, _e = d.endContainer !== $ || d.endOffset != ne, Ce = !d.equals(d.nativeRange);
840
+ (ge || _e || Ce) && (d.setEnd($, ne), d.setStart(b, B));
744
841
  }), (v = L.prototype).selectNode = function(d) {
745
842
  this.nativeRange.selectNode(d), I(this);
746
843
  }, v.cloneContents = function() {
@@ -761,49 +858,49 @@ function Fn() {
761
858
  var Y = document.createRange();
762
859
  Y.setStart(U, 0), Y.setEnd(U, 0);
763
860
  try {
764
- Y.setStart(U, 1), v.setStart = function(d, S) {
765
- this.nativeRange.setStart(d, S), I(this);
766
- }, v.setEnd = function(d, S) {
767
- this.nativeRange.setEnd(d, S), I(this);
768
- }, P = function(d) {
769
- return function(S) {
770
- this.nativeRange[d](S), I(this);
861
+ Y.setStart(U, 1), v.setStart = function(d, b) {
862
+ this.nativeRange.setStart(d, b), I(this);
863
+ }, v.setEnd = function(d, b) {
864
+ this.nativeRange.setEnd(d, b), I(this);
865
+ }, D = function(d) {
866
+ return function(b) {
867
+ this.nativeRange[d](b), I(this);
771
868
  };
772
869
  };
773
870
  } catch (d) {
774
- v.setStart = function(S, D) {
871
+ v.setStart = function(b, B) {
775
872
  try {
776
- this.nativeRange.setStart(S, D);
873
+ this.nativeRange.setStart(b, B);
777
874
  } catch ($) {
778
- this.nativeRange.setEnd(S, D), this.nativeRange.setStart(S, D);
875
+ this.nativeRange.setEnd(b, B), this.nativeRange.setStart(b, B);
779
876
  }
780
877
  I(this);
781
- }, v.setEnd = function(S, D) {
878
+ }, v.setEnd = function(b, B) {
782
879
  try {
783
- this.nativeRange.setEnd(S, D);
880
+ this.nativeRange.setEnd(b, B);
784
881
  } catch ($) {
785
- this.nativeRange.setStart(S, D), this.nativeRange.setEnd(S, D);
882
+ this.nativeRange.setStart(b, B), this.nativeRange.setEnd(b, B);
786
883
  }
787
884
  I(this);
788
- }, P = function(S, D) {
885
+ }, D = function(b, B) {
789
886
  return function($) {
790
887
  try {
791
- this.nativeRange[S]($);
888
+ this.nativeRange[b]($);
792
889
  } catch (ne) {
793
- this.nativeRange[D]($), this.nativeRange[S]($);
890
+ this.nativeRange[B]($), this.nativeRange[b]($);
794
891
  }
795
892
  I(this);
796
893
  };
797
894
  };
798
895
  }
799
- v.setStartBefore = P("setStartBefore", "setEndBefore"), v.setStartAfter = P("setStartAfter", "setEndAfter"), v.setEndBefore = P("setEndBefore", "setStartBefore"), v.setEndAfter = P("setEndAfter", "setStartAfter"), v.selectNodeContents = function(d) {
896
+ v.setStartBefore = D("setStartBefore", "setEndBefore"), v.setStartAfter = D("setStartAfter", "setEndAfter"), v.setEndBefore = D("setEndBefore", "setStartBefore"), v.setEndAfter = D("setEndAfter", "setStartAfter"), v.selectNodeContents = function(d) {
800
897
  this.setStartAndEnd(d, 0, J.getNodeLength(d));
801
898
  }, Y.selectNodeContents(U), Y.setEnd(U, 3);
802
899
  var Z = document.createRange();
803
- Z.selectNodeContents(U), Z.setEnd(U, 4), Z.setStart(U, 2), Y.compareBoundaryPoints(Y.START_TO_END, Z) == -1 && Y.compareBoundaryPoints(Y.END_TO_START, Z) == 1 ? v.compareBoundaryPoints = function(d, S) {
804
- return d == (S = S.nativeRange || S).START_TO_END ? d = S.END_TO_START : d == S.END_TO_START && (d = S.START_TO_END), this.nativeRange.compareBoundaryPoints(d, S);
805
- } : v.compareBoundaryPoints = function(d, S) {
806
- return this.nativeRange.compareBoundaryPoints(d, S.nativeRange || S);
900
+ Z.selectNodeContents(U), Z.setEnd(U, 4), Z.setStart(U, 2), Y.compareBoundaryPoints(Y.START_TO_END, Z) == -1 && Y.compareBoundaryPoints(Y.END_TO_START, Z) == 1 ? v.compareBoundaryPoints = function(d, b) {
901
+ return d == (b = b.nativeRange || b).START_TO_END ? d = b.END_TO_START : d == b.END_TO_START && (d = b.START_TO_END), this.nativeRange.compareBoundaryPoints(d, b);
902
+ } : v.compareBoundaryPoints = function(d, b) {
903
+ return this.nativeRange.compareBoundaryPoints(d, b.nativeRange || b);
807
904
  };
808
905
  var ce = document.createElement("div");
809
906
  ce.innerHTML = "123";
@@ -821,40 +918,45 @@ function Fn() {
821
918
  return (d = h(d, x, "createNativeRange")).createRange();
822
919
  };
823
920
  }(), p.features.implementsTextRange) {
824
- var y = function(v, P, W, I, U) {
921
+ var y = function(v, D, W, I, U) {
825
922
  var Y = v.duplicate();
826
923
  Y.collapse(W);
827
924
  var Z = Y.parentElement();
828
- if (J.isOrIsAncestorOf(P, Z) || (Z = P), !Z.canHaveHTML) {
925
+ if (J.isOrIsAncestorOf(D, Z) || (Z = D), !Z.canHaveHTML) {
829
926
  var ce = new K(Z.parentNode, J.getNodeIndex(Z));
830
927
  return { boundaryPosition: ce, nodeInfo: { nodeIndex: ce.offset, containerElement: ce.node } };
831
928
  }
832
929
  var te = J.getDocument(Z).createElement("span");
833
930
  te.parentNode && J.removeNode(te);
834
- for (var he, d, S, D, $, ne = W ? "StartToStart" : "StartToEnd", ge = U && U.containerElement == Z ? U.nodeIndex : 0, Me = Z.childNodes.length, Ce = Me, we = Ce; we == Me ? Z.appendChild(te) : Z.insertBefore(te, Z.childNodes[we]), Y.moveToElementText(te), (he = Y.compareEndPoints(ne, v)) != 0 && ge != Ce; ) {
931
+ for (var he, d, b, B, $, ne = W ? "StartToStart" : "StartToEnd", ge = U && U.containerElement == Z ? U.nodeIndex : 0, _e = Z.childNodes.length, Ce = _e, we = Ce; we == _e ? Z.appendChild(te) : Z.insertBefore(te, Z.childNodes[we]), Y.moveToElementText(te), (he = Y.compareEndPoints(ne, v)) != 0 && ge != Ce; ) {
835
932
  if (he == -1) {
836
- if (Ce == ge + 1) break;
933
+ if (Ce == ge + 1)
934
+ break;
837
935
  ge = we;
838
- } else Ce = Ce == ge + 1 ? ge : we;
936
+ } else
937
+ Ce = Ce == ge + 1 ? ge : we;
839
938
  we = Math.floor((ge + Ce) / 2), Z.removeChild(te);
840
939
  }
841
940
  if ($ = te.nextSibling, he == -1 && $ && u($)) {
842
- var Ne;
941
+ var Re;
843
942
  if (Y.setEndPoint(W ? "EndToStart" : "EndToEnd", v), /[\r\n]/.test($.data)) {
844
- var Ie = Y.duplicate(), Ge = Ie.text.replace(/\r\n/g, "\r").length;
845
- for (Ne = Ie.moveStart("character", Ge); (he = Ie.compareEndPoints("StartToEnd", Ie)) == -1; ) Ne++, Ie.moveStart("character", 1);
846
- } else Ne = Y.text.length;
847
- D = new K($, Ne);
848
- } else d = (I || !W) && te.previousSibling, D = (S = (I || W) && te.nextSibling) && u(S) ? new K(S, 0) : d && u(d) ? new K(d, d.data.length) : new K(Z, J.getNodeIndex(te));
849
- return J.removeNode(te), { boundaryPosition: D, nodeInfo: { nodeIndex: we, containerElement: Z } };
850
- }, T = function(v, P) {
943
+ var Oe = Y.duplicate(), Ge = Oe.text.replace(/\r\n/g, "\r").length;
944
+ for (Re = Oe.moveStart("character", Ge); (he = Oe.compareEndPoints("StartToEnd", Oe)) == -1; )
945
+ Re++, Oe.moveStart("character", 1);
946
+ } else
947
+ Re = Y.text.length;
948
+ B = new K($, Re);
949
+ } else
950
+ d = (I || !W) && te.previousSibling, B = (b = (I || W) && te.nextSibling) && u(b) ? new K(b, 0) : d && u(d) ? new K(d, d.data.length) : new K(Z, J.getNodeIndex(te));
951
+ return J.removeNode(te), { boundaryPosition: B, nodeInfo: { nodeIndex: we, containerElement: Z } };
952
+ }, S = function(v, D) {
851
953
  var W, I, U, Y, Z = v.offset, ce = J.getDocument(v.node), te = r(ce).createTextRange(), he = u(v.node);
852
- return he ? I = (W = v.node).parentNode : (W = Z < (Y = v.node.childNodes).length ? Y[Z] : null, I = v.node), (U = ce.createElement("span")).innerHTML = "&#feff;", W ? I.insertBefore(U, W) : I.appendChild(U), te.moveToElementText(U), te.collapse(!P), I.removeChild(U), he && te[P ? "moveStart" : "moveEnd"]("character", Z), te;
954
+ return he ? I = (W = v.node).parentNode : (W = Z < (Y = v.node.childNodes).length ? Y[Z] : null, I = v.node), (U = ce.createElement("span")).innerHTML = "&#feff;", W ? I.insertBefore(U, W) : I.appendChild(U), te.moveToElementText(U), te.collapse(!D), I.removeChild(U), he && te[D ? "moveStart" : "moveEnd"]("character", Z), te;
853
955
  };
854
956
  ((F = function(v) {
855
957
  this.textRange = v, this.refresh();
856
958
  }).prototype = new ue(document)).refresh = function() {
857
- var v, P, W, I, U = function(Y) {
959
+ var v, D, W, I, U = function(Y) {
858
960
  var Z = Y.parentElement(), ce = Y.duplicate();
859
961
  ce.collapse(!0);
860
962
  var te = ce.parentElement();
@@ -862,20 +964,21 @@ function Fn() {
862
964
  var he = ce.parentElement(), d = te == he ? te : J.getCommonAncestor(te, he);
863
965
  return d == Z ? d : J.getCommonAncestor(Z, d);
864
966
  }(this.textRange);
865
- (I = this.textRange).compareEndPoints("StartToEnd", I) == 0 ? P = v = y(this.textRange, U, !0, !0).boundaryPosition : (v = (W = y(this.textRange, U, !0, !1)).boundaryPosition, P = y(this.textRange, U, !1, !1, W.nodeInfo).boundaryPosition), this.setStart(v.node, v.offset), this.setEnd(P.node, P.offset);
967
+ (I = this.textRange).compareEndPoints("StartToEnd", I) == 0 ? D = v = y(this.textRange, U, !0, !0).boundaryPosition : (v = (W = y(this.textRange, U, !0, !1)).boundaryPosition, D = y(this.textRange, U, !1, !1, W.nodeInfo).boundaryPosition), this.setStart(v.node, v.offset), this.setEnd(D.node, D.offset);
866
968
  }, F.prototype.getName = function() {
867
969
  return "WrappedTextRange";
868
970
  }, ue.copyComparisonConstants(F);
869
971
  var O = function(v) {
870
- if (v.collapsed) return T(new K(v.startContainer, v.startOffset), !0);
871
- var P = T(new K(v.startContainer, v.startOffset), !0), W = T(new K(v.endContainer, v.endOffset), !1), I = r(ue.getRangeDocument(v)).createTextRange();
872
- return I.setEndPoint("StartToStart", P), I.setEndPoint("EndToEnd", W), I;
972
+ if (v.collapsed)
973
+ return S(new K(v.startContainer, v.startOffset), !0);
974
+ var D = S(new K(v.startContainer, v.startOffset), !0), W = S(new K(v.endContainer, v.endOffset), !1), I = r(ue.getRangeDocument(v)).createTextRange();
975
+ return I.setEndPoint("StartToStart", D), I.setEndPoint("EndToEnd", W), I;
873
976
  };
874
977
  if (F.rangeToTextRange = O, F.prototype.toTextRange = function() {
875
978
  return O(this);
876
979
  }, p.WrappedTextRange = F, !p.features.implementsDomRange || p.config.preferTextRange) {
877
- var z = Function("return this;")();
878
- z.Range === void 0 && (z.Range = F), p.createNativeRange = function(v) {
980
+ var P = Function("return this;")();
981
+ P.Range === void 0 && (P.Range = F), p.createNativeRange = function(v) {
879
982
  return v = h(v, x, "createNativeRange"), r(v).createTextRange();
880
983
  }, p.WrappedRange = F;
881
984
  }
@@ -885,21 +988,23 @@ function Fn() {
885
988
  }, p.createRangyRange = function(v) {
886
989
  return v = h(v, x, "createRangyRange"), new ue(v);
887
990
  }, ee.createAliasForDeprecatedMethod(p, "createIframeRange", "createRange"), ee.createAliasForDeprecatedMethod(p, "createIframeRangyRange", "createRangyRange"), p.addShimListener(function(v) {
888
- var P = v.document;
889
- P.createRange === void 0 && (P.createRange = function() {
890
- return p.createRange(P);
891
- }), P = v = null;
991
+ var D = v.document;
992
+ D.createRange === void 0 && (D.createRange = function() {
993
+ return p.createRange(D);
994
+ }), D = v = null;
892
995
  });
893
996
  }), q.createCoreModule("WrappedSelection", ["DomRange", "WrappedRange"], function(p, x) {
894
997
  p.config.checkSelectionRanges = !0;
895
- var L, F, J = "boolean", ee = "number", K = p.dom, ue = p.util, r = ue.isHostMethod, h = p.DomRange, u = p.WrappedRange, y = p.DOMException, T = K.DomPosition, O = p.features, z = "Control", v = K.getDocument, P = K.getBody, W = h.rangesEqual;
998
+ var L, F, J = "boolean", ee = "number", K = p.dom, ue = p.util, r = ue.isHostMethod, h = p.DomRange, u = p.WrappedRange, y = p.DOMException, S = K.DomPosition, O = p.features, P = "Control", v = K.getDocument, D = K.getBody, W = h.rangesEqual;
896
999
  function I(i) {
897
1000
  return typeof i == "string" ? /^backward(s)?$/i.test(i) : !!i;
898
1001
  }
899
1002
  function U(i, l) {
900
1003
  if (i) {
901
- if (K.isWindow(i)) return i;
902
- if (i instanceof pe) return i.win;
1004
+ if (K.isWindow(i))
1005
+ return i;
1006
+ if (i instanceof pe)
1007
+ return i.win;
903
1008
  var m = K.getContentDocument(i, x, l);
904
1009
  return K.getWindow(m);
905
1010
  }
@@ -915,12 +1020,14 @@ function Fn() {
915
1020
  var ce = r(window, "getSelection"), te = ue.isHostObject(document, "selection");
916
1021
  O.implementsWinGetSelection = ce, O.implementsDocSelection = te;
917
1022
  var he = te && (!ce || p.config.preferTextRange);
918
- if (he) L = Y, p.isSelectionValid = function(i) {
919
- var l = U(i, "isSelectionValid").document, m = l.selection;
920
- return m.type != "None" || v(m.createRange().parentElement()) == l;
921
- };
1023
+ if (he)
1024
+ L = Y, p.isSelectionValid = function(i) {
1025
+ var l = U(i, "isSelectionValid").document, m = l.selection;
1026
+ return m.type != "None" || v(m.createRange().parentElement()) == l;
1027
+ };
922
1028
  else {
923
- if (!ce) return x.fail("Neither document.selection or window.getSelection() detected."), !1;
1029
+ if (!ce)
1030
+ return x.fail("Neither document.selection or window.getSelection() detected."), !1;
924
1031
  L = function(i) {
925
1032
  return U(i, "getWinSelection").getSelection();
926
1033
  }, p.isSelectionValid = function() {
@@ -929,44 +1036,48 @@ function Fn() {
929
1036
  }
930
1037
  p.getNativeSelection = L;
931
1038
  var d = L();
932
- if (!d) return x.fail("Native selection was null (possibly issue 138?)"), !1;
933
- var S = p.createNativeRange(document), D = P(document), $ = ue.areHostProperties(d, ["anchorNode", "focusNode", "anchorOffset", "focusOffset"]);
1039
+ if (!d)
1040
+ return x.fail("Native selection was null (possibly issue 138?)"), !1;
1041
+ var b = p.createNativeRange(document), B = D(document), $ = ue.areHostProperties(d, ["anchorNode", "focusNode", "anchorOffset", "focusOffset"]);
934
1042
  O.selectionHasAnchorAndFocus = $;
935
1043
  var ne = r(d, "extend");
936
1044
  O.selectionHasExtend = ne;
937
1045
  var ge = r(d, "setBaseAndExtent");
938
1046
  O.selectionHasSetBaseAndExtent = ge;
939
- var Me = typeof d.rangeCount == ee;
940
- O.selectionHasRangeCount = Me;
941
- var Ce = !1, we = !0, Ne = ne ? function(i, l) {
1047
+ var _e = typeof d.rangeCount == ee;
1048
+ O.selectionHasRangeCount = _e;
1049
+ var Ce = !1, we = !0, Re = ne ? function(i, l) {
942
1050
  var m = h.getRangeDocument(l), k = p.createRange(m);
943
1051
  k.collapseToPoint(l.endContainer, l.endOffset), i.addRange(je(k)), i.extend(l.startContainer, l.startOffset);
944
1052
  } : null;
945
1053
  ue.areHostMethods(d, ["addRange", "getRangeAt", "removeAllRanges"]) && typeof d.rangeCount == ee && O.implementsDomRange && function() {
946
1054
  var i = window.getSelection();
947
1055
  if (i) {
948
- for (var l = i.rangeCount, m = l > 1, k = [], w = Z(i), N = 0; N < l; ++N) k[N] = i.getRangeAt(N);
1056
+ for (var l = i.rangeCount, m = l > 1, k = [], w = Z(i), R = 0; R < l; ++R)
1057
+ k[R] = i.getRangeAt(R);
949
1058
  var G = K.createTestElement(document, "", !1), j = G.appendChild(document.createTextNode("   ")), oe = document.createRange();
950
1059
  if (oe.setStart(j, 1), oe.collapse(!0), i.removeAllRanges(), i.addRange(oe), we = i.rangeCount == 1, i.removeAllRanges(), !m) {
951
1060
  var Je = window.navigator.appVersion.match(/Chrome\/(.*?) /);
952
- if (Je && parseInt(Je[1]) >= 36) Ce = !1;
1061
+ if (Je && parseInt(Je[1]) >= 36)
1062
+ Ce = !1;
953
1063
  else {
954
1064
  var ht = oe.cloneRange();
955
1065
  oe.setStart(j, 0), ht.setEnd(j, 3), ht.setStart(j, 2), i.addRange(oe), i.addRange(ht), Ce = i.rangeCount == 2;
956
1066
  }
957
1067
  }
958
- for (K.removeNode(G), i.removeAllRanges(), N = 0; N < l; ++N) N == 0 && w ? Ne ? Ne(i, k[N]) : (p.warn("Rangy initialization: original selection was backwards but selection has been restored forwards because the browser does not support Selection.extend"), i.addRange(k[N])) : i.addRange(k[N]);
1068
+ for (K.removeNode(G), i.removeAllRanges(), R = 0; R < l; ++R)
1069
+ R == 0 && w ? Re ? Re(i, k[R]) : (p.warn("Rangy initialization: original selection was backwards but selection has been restored forwards because the browser does not support Selection.extend"), i.addRange(k[R])) : i.addRange(k[R]);
959
1070
  }
960
1071
  }(), O.selectionSupportsMultipleRanges = Ce, O.collapsedNonEditableSelectionsSupported = we;
961
- var Ie, Ge, Pe = !1;
1072
+ var Oe, Ge, Pe = !1;
962
1073
  function nt(i, l, m) {
963
1074
  var k = m ? "end" : "start", w = m ? "start" : "end";
964
1075
  i.anchorNode = l[k + "Container"], i.anchorOffset = l[k + "Offset"], i.focusNode = l[w + "Container"], i.focusOffset = l[w + "Offset"];
965
1076
  }
966
1077
  function be(i) {
967
- i.anchorNode = i.focusNode = null, i.anchorOffset = i.focusOffset = 0, i.rangeCount = 0, i.isCollapsed = !0, i._ranges.length = 0, Ee(i);
1078
+ i.anchorNode = i.focusNode = null, i.anchorOffset = i.focusOffset = 0, i.rangeCount = 0, i.isCollapsed = !0, i._ranges.length = 0, Te(i);
968
1079
  }
969
- function Ee(i) {
1080
+ function Te(i) {
970
1081
  i.type = i.rangeCount == 0 ? "None" : F(i) ? "Caret" : "Range";
971
1082
  }
972
1083
  function je(i) {
@@ -976,10 +1087,14 @@ function Fn() {
976
1087
  function it(i) {
977
1088
  var l = i.getNodes();
978
1089
  if (!function(m) {
979
- if (!m.length || m[0].nodeType != 1) return !1;
980
- for (var k = 1, w = m.length; k < w; ++k) if (!K.isAncestorOf(m[0], m[k])) return !1;
1090
+ if (!m.length || m[0].nodeType != 1)
1091
+ return !1;
1092
+ for (var k = 1, w = m.length; k < w; ++k)
1093
+ if (!K.isAncestorOf(m[0], m[k]))
1094
+ return !1;
981
1095
  return !0;
982
- }(l)) throw x.createError("getSingleElementFromRange: range " + i.inspect() + " did not consist of a single element");
1096
+ }(l))
1097
+ throw x.createError("getSingleElementFromRange: range " + i.inspect() + " did not consist of a single element");
983
1098
  return l[0];
984
1099
  }
985
1100
  function ze(i) {
@@ -987,36 +1102,40 @@ function Fn() {
987
1102
  }
988
1103
  function ft(i, l) {
989
1104
  var m = new u(l);
990
- i._ranges = [m], nt(i, m, !1), i.rangeCount = 1, i.isCollapsed = m.collapsed, Ee(i);
1105
+ i._ranges = [m], nt(i, m, !1), i.rangeCount = 1, i.isCollapsed = m.collapsed, Te(i);
991
1106
  }
992
1107
  function Xe(i) {
993
- if (i._ranges.length = 0, i.docSelection.type == "None") be(i);
1108
+ if (i._ranges.length = 0, i.docSelection.type == "None")
1109
+ be(i);
994
1110
  else {
995
1111
  var l = i.docSelection.createRange();
996
- if (ze(l)) ft(i, l);
1112
+ if (ze(l))
1113
+ ft(i, l);
997
1114
  else {
998
1115
  i.rangeCount = l.length;
999
- for (var m, k = v(l.item(0)), w = 0; w < i.rangeCount; ++w) (m = p.createRange(k)).selectNode(l.item(w)), i._ranges.push(m);
1000
- i.isCollapsed = i.rangeCount == 1 && i._ranges[0].collapsed, nt(i, i._ranges[i.rangeCount - 1], !1), Ee(i);
1116
+ for (var m, k = v(l.item(0)), w = 0; w < i.rangeCount; ++w)
1117
+ (m = p.createRange(k)).selectNode(l.item(w)), i._ranges.push(m);
1118
+ i.isCollapsed = i.rangeCount == 1 && i._ranges[0].collapsed, nt(i, i._ranges[i.rangeCount - 1], !1), Te(i);
1001
1119
  }
1002
1120
  }
1003
1121
  }
1004
1122
  function mt(i, l) {
1005
- for (var m = i.docSelection.createRange(), k = it(l), w = v(m.item(0)), N = P(w).createControlRange(), G = 0, j = m.length; G < j; ++G) N.add(m.item(G));
1123
+ for (var m = i.docSelection.createRange(), k = it(l), w = v(m.item(0)), R = D(w).createControlRange(), G = 0, j = m.length; G < j; ++G)
1124
+ R.add(m.item(G));
1006
1125
  try {
1007
- N.add(k);
1126
+ R.add(k);
1008
1127
  } catch (oe) {
1009
1128
  throw x.createError("addRange(): Element within the specified Range could not be added to control selection (does it have layout?)");
1010
1129
  }
1011
- N.select(), Xe(i);
1130
+ R.select(), Xe(i);
1012
1131
  }
1013
1132
  function pe(i, l, m) {
1014
1133
  this.nativeSelection = i, this.docSelection = l, this._ranges = [], this.win = m, this.refresh();
1015
1134
  }
1016
1135
  function vt(i) {
1017
- i.win = i.anchorNode = i.focusNode = i._ranges = null, i.rangeCount = i.anchorOffset = i.focusOffset = 0, i.detached = !0, Ee(i);
1136
+ i.win = i.anchorNode = i.focusNode = i._ranges = null, i.rangeCount = i.anchorOffset = i.focusOffset = 0, i.detached = !0, Te(i);
1018
1137
  }
1019
- D && r(D, "createControlRange") && (Ie = D.createControlRange(), ue.areHostProperties(Ie, ["item", "add"]) && (Pe = !0)), O.implementsControlRange = Pe, F = $ ? function(i) {
1138
+ B && r(B, "createControlRange") && (Oe = B.createControlRange(), ue.areHostProperties(Oe, ["item", "add"]) && (Pe = !0)), O.implementsControlRange = Pe, F = $ ? function(i) {
1020
1139
  return i.anchorNode === i.focusNode && i.anchorOffset === i.focusOffset;
1021
1140
  } : function(i) {
1022
1141
  return !!i.rangeCount && i.getRangeAt(i.rangeCount - 1).collapsed;
@@ -1032,20 +1151,24 @@ function Fn() {
1032
1151
  }), pe.prototype = p.selectionPrototype;
1033
1152
  var qe = [];
1034
1153
  function Ct(i, l) {
1035
- for (var m, k, w = qe.length; w--; ) if (k = (m = qe[w]).selection, l == "deleteAll") vt(k);
1036
- else if (m.win == i) return l == "delete" ? (qe.splice(w, 1), !0) : k;
1154
+ for (var m, k, w = qe.length; w--; )
1155
+ if (k = (m = qe[w]).selection, l == "deleteAll")
1156
+ vt(k);
1157
+ else if (m.win == i)
1158
+ return l == "delete" ? (qe.splice(w, 1), !0) : k;
1037
1159
  return l == "deleteAll" && (qe.length = 0), null;
1038
1160
  }
1039
1161
  var dt = function(i) {
1040
- if (i && i instanceof pe) return i.refresh(), i;
1162
+ if (i && i instanceof pe)
1163
+ return i.refresh(), i;
1041
1164
  var l = Ct(i = U(i, "getNativeSelection")), m = L(i), k = te ? Y(i) : null;
1042
1165
  return l ? (l.nativeSelection = m, l.docSelection = k, l.refresh()) : (l = new pe(m, k, i), qe.push({ win: i, selection: l })), l;
1043
1166
  };
1044
1167
  p.getSelection = dt, ue.createAliasForDeprecatedMethod(p, "getIframeSelection", "getSelection");
1045
1168
  var st, se = pe.prototype;
1046
1169
  function wt(i, l) {
1047
- for (var m, k = v(l[0].startContainer), w = P(k).createControlRange(), N = 0, G = l.length; N < G; ++N) {
1048
- m = it(l[N]);
1170
+ for (var m, k = v(l[0].startContainer), w = D(k).createControlRange(), R = 0, G = l.length; R < G; ++R) {
1171
+ m = it(l[R]);
1049
1172
  try {
1050
1173
  w.add(m);
1051
1174
  } catch (j) {
@@ -1059,54 +1182,61 @@ function Fn() {
1059
1182
  this.nativeSelection.removeAllRanges(), be(this);
1060
1183
  };
1061
1184
  var yt = function(i, l) {
1062
- Ne(i.nativeSelection, l), i.refresh();
1185
+ Re(i.nativeSelection, l), i.refresh();
1063
1186
  };
1064
- se.addRange = Me ? function(i, l) {
1065
- if (Pe && te && this.docSelection.type == z) mt(this, i);
1066
- else if (I(l) && ne) yt(this, i);
1187
+ se.addRange = _e ? function(i, l) {
1188
+ if (Pe && te && this.docSelection.type == P)
1189
+ mt(this, i);
1190
+ else if (I(l) && ne)
1191
+ yt(this, i);
1067
1192
  else {
1068
1193
  var m;
1069
1194
  Ce ? m = this.rangeCount : (this.removeAllRanges(), m = 0);
1070
1195
  var k = je(i).cloneRange();
1071
1196
  try {
1072
1197
  this.nativeSelection.addRange(k);
1073
- } catch (N) {
1198
+ } catch (R) {
1074
1199
  }
1075
1200
  if (this.rangeCount = this.nativeSelection.rangeCount, this.rangeCount == m + 1) {
1076
1201
  if (p.config.checkSelectionRanges) {
1077
1202
  var w = Ge(this.nativeSelection, this.rangeCount - 1);
1078
1203
  w && !W(w, i) && (i = new u(w));
1079
1204
  }
1080
- this._ranges[this.rangeCount - 1] = i, nt(this, i, Qe(this.nativeSelection)), this.isCollapsed = F(this), Ee(this);
1081
- } else this.refresh();
1205
+ this._ranges[this.rangeCount - 1] = i, nt(this, i, Qe(this.nativeSelection)), this.isCollapsed = F(this), Te(this);
1206
+ } else
1207
+ this.refresh();
1082
1208
  }
1083
1209
  } : function(i, l) {
1084
1210
  I(l) && ne ? yt(this, i) : (this.nativeSelection.addRange(je(i)), this.refresh());
1085
1211
  }, se.setRanges = function(i) {
1086
- if (Pe && te && i.length > 1) wt(this, i);
1212
+ if (Pe && te && i.length > 1)
1213
+ wt(this, i);
1087
1214
  else {
1088
1215
  this.removeAllRanges();
1089
- for (var l = 0, m = i.length; l < m; ++l) this.addRange(i[l]);
1216
+ for (var l = 0, m = i.length; l < m; ++l)
1217
+ this.addRange(i[l]);
1090
1218
  }
1091
1219
  };
1092
1220
  } else {
1093
- if (!(r(d, "empty") && r(S, "select") && Pe && he)) return x.fail("No means of selecting a Range or TextRange was found"), !1;
1221
+ if (!(r(d, "empty") && r(b, "select") && Pe && he))
1222
+ return x.fail("No means of selecting a Range or TextRange was found"), !1;
1094
1223
  se.removeAllRanges = function() {
1095
1224
  try {
1096
1225
  if (this.docSelection.empty(), this.docSelection.type != "None") {
1097
1226
  var i;
1098
- if (this.anchorNode) i = v(this.anchorNode);
1099
- else if (this.docSelection.type == z) {
1227
+ if (this.anchorNode)
1228
+ i = v(this.anchorNode);
1229
+ else if (this.docSelection.type == P) {
1100
1230
  var l = this.docSelection.createRange();
1101
1231
  l.length && (i = v(l.item(0)));
1102
1232
  }
1103
- i && (P(i).createTextRange().select(), this.docSelection.empty());
1233
+ i && (D(i).createTextRange().select(), this.docSelection.empty());
1104
1234
  }
1105
1235
  } catch (m) {
1106
1236
  }
1107
1237
  be(this);
1108
1238
  }, se.addRange = function(i) {
1109
- this.docSelection.type == z ? mt(this, i) : (p.WrappedTextRange.rangeToTextRange(i).select(), this._ranges[0] = i, this.rangeCount = 1, this.isCollapsed = this._ranges[0].collapsed, nt(this, i, !1), Ee(this));
1239
+ this.docSelection.type == P ? mt(this, i) : (p.WrappedTextRange.rangeToTextRange(i).select(), this._ranges[0] = i, this.rangeCount = 1, this.isCollapsed = this._ranges[0].collapsed, nt(this, i, !1), Te(this));
1110
1240
  }, se.setRanges = function(i) {
1111
1241
  this.removeAllRanges();
1112
1242
  var l = i.length;
@@ -1114,49 +1244,62 @@ function Fn() {
1114
1244
  };
1115
1245
  }
1116
1246
  if (se.getRangeAt = function(i) {
1117
- if (i < 0 || i >= this.rangeCount) throw new y("INDEX_SIZE_ERR");
1247
+ if (i < 0 || i >= this.rangeCount)
1248
+ throw new y("INDEX_SIZE_ERR");
1118
1249
  return this._ranges[i].cloneRange();
1119
- }, he) st = function(i) {
1120
- var l;
1121
- p.isSelectionValid(i.win) ? l = i.docSelection.createRange() : (l = P(i.win.document).createTextRange()).collapse(!0), i.docSelection.type == z ? Xe(i) : ze(l) ? ft(i, l) : be(i);
1122
- };
1123
- else if (r(d, "getRangeAt") && typeof d.rangeCount == ee) st = function(i) {
1124
- if (Pe && te && i.docSelection.type == z) Xe(i);
1125
- else if (i._ranges.length = i.rangeCount = i.nativeSelection.rangeCount, i.rangeCount) {
1126
- for (var l = 0, m = i.rangeCount; l < m; ++l) i._ranges[l] = new p.WrappedRange(i.nativeSelection.getRangeAt(l));
1127
- nt(i, i._ranges[i.rangeCount - 1], Qe(i.nativeSelection)), i.isCollapsed = F(i), Ee(i);
1128
- } else be(i);
1129
- };
1250
+ }, he)
1251
+ st = function(i) {
1252
+ var l;
1253
+ p.isSelectionValid(i.win) ? l = i.docSelection.createRange() : (l = D(i.win.document).createTextRange()).collapse(!0), i.docSelection.type == P ? Xe(i) : ze(l) ? ft(i, l) : be(i);
1254
+ };
1255
+ else if (r(d, "getRangeAt") && typeof d.rangeCount == ee)
1256
+ st = function(i) {
1257
+ if (Pe && te && i.docSelection.type == P)
1258
+ Xe(i);
1259
+ else if (i._ranges.length = i.rangeCount = i.nativeSelection.rangeCount, i.rangeCount) {
1260
+ for (var l = 0, m = i.rangeCount; l < m; ++l)
1261
+ i._ranges[l] = new p.WrappedRange(i.nativeSelection.getRangeAt(l));
1262
+ nt(i, i._ranges[i.rangeCount - 1], Qe(i.nativeSelection)), i.isCollapsed = F(i), Te(i);
1263
+ } else
1264
+ be(i);
1265
+ };
1130
1266
  else {
1131
- if (!$ || typeof d.isCollapsed != J || typeof S.collapsed != J || !O.implementsDomRange) return x.fail("No means of obtaining a Range or TextRange from the user's selection was found"), !1;
1267
+ if (!$ || typeof d.isCollapsed != J || typeof b.collapsed != J || !O.implementsDomRange)
1268
+ return x.fail("No means of obtaining a Range or TextRange from the user's selection was found"), !1;
1132
1269
  st = function(i) {
1133
1270
  var l, m = i.nativeSelection;
1134
1271
  m.anchorNode ? (l = Ge(m, 0), i._ranges = [l], i.rangeCount = 1, function(k) {
1135
1272
  var w = k.nativeSelection;
1136
1273
  k.anchorNode = w.anchorNode, k.anchorOffset = w.anchorOffset, k.focusNode = w.focusNode, k.focusOffset = w.focusOffset;
1137
- }(i), i.isCollapsed = F(i), Ee(i)) : be(i);
1274
+ }(i), i.isCollapsed = F(i), Te(i)) : be(i);
1138
1275
  };
1139
1276
  }
1140
1277
  se.refresh = function(i) {
1141
1278
  var l = i ? this._ranges.slice(0) : null, m = this.anchorNode, k = this.anchorOffset;
1142
1279
  if (st(this), i) {
1143
1280
  var w = l.length;
1144
- if (w != this._ranges.length || this.anchorNode != m || this.anchorOffset != k) return !0;
1145
- for (; w--; ) if (!W(l[w], this._ranges[w])) return !0;
1281
+ if (w != this._ranges.length || this.anchorNode != m || this.anchorOffset != k)
1282
+ return !0;
1283
+ for (; w--; )
1284
+ if (!W(l[w], this._ranges[w]))
1285
+ return !0;
1146
1286
  return !1;
1147
1287
  }
1148
1288
  };
1149
1289
  var Qe, kt = function(i, l) {
1150
1290
  var m = i.getAllRanges();
1151
1291
  i.removeAllRanges();
1152
- for (var k = 0, w = m.length; k < w; ++k) W(l, m[k]) || i.addRange(m[k]);
1292
+ for (var k = 0, w = m.length; k < w; ++k)
1293
+ W(l, m[k]) || i.addRange(m[k]);
1153
1294
  i.rangeCount || be(i);
1154
1295
  };
1155
1296
  function Ze(i, l) {
1156
- if (i.win.document != v(l)) throw new y("WRONG_DOCUMENT_ERR");
1297
+ if (i.win.document != v(l))
1298
+ throw new y("WRONG_DOCUMENT_ERR");
1157
1299
  }
1158
1300
  function Ve(i, l) {
1159
- if (l < 0 || l > (K.isCharacterDataNode(i) ? i.length : i.childNodes.length)) throw new y("INDEX_SIZE_ERR");
1301
+ if (l < 0 || l > (K.isCharacterDataNode(i) ? i.length : i.childNodes.length))
1302
+ throw new y("INDEX_SIZE_ERR");
1160
1303
  }
1161
1304
  function o(i) {
1162
1305
  return function(l, m) {
@@ -1165,15 +1308,19 @@ function Fn() {
1165
1308
  };
1166
1309
  }
1167
1310
  function f(i) {
1168
- var l = [], m = new T(i.anchorNode, i.anchorOffset), k = new T(i.focusNode, i.focusOffset), w = typeof i.getName == "function" ? i.getName() : "Selection";
1169
- if (i.rangeCount !== void 0) for (var N = 0, G = i.rangeCount; N < G; ++N) l[N] = h.inspect(i.getRangeAt(N));
1311
+ var l = [], m = new S(i.anchorNode, i.anchorOffset), k = new S(i.focusNode, i.focusOffset), w = typeof i.getName == "function" ? i.getName() : "Selection";
1312
+ if (i.rangeCount !== void 0)
1313
+ for (var R = 0, G = i.rangeCount; R < G; ++R)
1314
+ l[R] = h.inspect(i.getRangeAt(R));
1170
1315
  return "[" + w + "(Ranges: " + l.join(", ") + ")(anchor: " + m.inspect() + ", focus: " + k.inspect() + "]";
1171
1316
  }
1172
1317
  se.removeRange = Pe && te ? function(i) {
1173
- if (this.docSelection.type == z) {
1174
- for (var l = this.docSelection.createRange(), m = it(i), k = v(l.item(0)), w = P(k).createControlRange(), N = !1, G = 0, j = l.length; G < j; ++G) l.item(G) !== m || N ? w.add(l.item(G)) : N = !0;
1318
+ if (this.docSelection.type == P) {
1319
+ for (var l = this.docSelection.createRange(), m = it(i), k = v(l.item(0)), w = D(k).createControlRange(), R = !1, G = 0, j = l.length; G < j; ++G)
1320
+ l.item(G) !== m || R ? w.add(l.item(G)) : R = !0;
1175
1321
  w.select(), Xe(this);
1176
- } else kt(this, i);
1322
+ } else
1323
+ kt(this, i);
1177
1324
  } : function(i) {
1178
1325
  kt(this, i);
1179
1326
  }, !he && $ && O.implementsDomRange ? (Qe = Z, se.isBackward = function() {
@@ -1181,18 +1328,21 @@ function Fn() {
1181
1328
  }) : Qe = se.isBackward = function() {
1182
1329
  return !1;
1183
1330
  }, se.isBackwards = se.isBackward, se.toString = function() {
1184
- for (var i = [], l = 0, m = this.rangeCount; l < m; ++l) i[l] = "" + this._ranges[l];
1331
+ for (var i = [], l = 0, m = this.rangeCount; l < m; ++l)
1332
+ i[l] = "" + this._ranges[l];
1185
1333
  return i.join("");
1186
1334
  }, se.collapse = function(i, l) {
1187
1335
  Ze(this, i);
1188
1336
  var m = p.createRange(i);
1189
1337
  m.collapseToPoint(i, l), this.setSingleRange(m), this.isCollapsed = !0;
1190
1338
  }, se.collapseToStart = function() {
1191
- if (!this.rangeCount) throw new y("INVALID_STATE_ERR");
1339
+ if (!this.rangeCount)
1340
+ throw new y("INVALID_STATE_ERR");
1192
1341
  var i = this._ranges[0];
1193
1342
  this.collapse(i.startContainer, i.startOffset);
1194
1343
  }, se.collapseToEnd = function() {
1195
- if (!this.rangeCount) throw new y("INVALID_STATE_ERR");
1344
+ if (!this.rangeCount)
1345
+ throw new y("INVALID_STATE_ERR");
1196
1346
  var i = this._ranges[this.rangeCount - 1];
1197
1347
  this.collapse(i.endContainer, i.endOffset);
1198
1348
  }, se.selectAllChildren = function(i) {
@@ -1203,22 +1353,26 @@ function Fn() {
1203
1353
  this.nativeSelection.setBaseAndExtent(i, l, m, k), this.refresh();
1204
1354
  } : ne && (se.setBaseAndExtent = function(i, l, m, k) {
1205
1355
  Ve(i, l), Ve(m, k), Ze(this, i), Ze(this, m);
1206
- var w = p.createRange(node), N = K.comparePoints(i, l, m, k) == -1;
1207
- N ? w.setStartAndEnd(m, k, i, l) : w.setStartAndEnd(i, l, m, k), this.setSingleRange(w, N);
1356
+ var w = p.createRange(node), R = K.comparePoints(i, l, m, k) == -1;
1357
+ R ? w.setStartAndEnd(m, k, i, l) : w.setStartAndEnd(i, l, m, k), this.setSingleRange(w, R);
1208
1358
  }), se.deleteFromDocument = function() {
1209
- if (Pe && te && this.docSelection.type == z) {
1210
- for (var i, l = this.docSelection.createRange(); l.length; ) i = l.item(0), l.remove(i), K.removeNode(i);
1359
+ if (Pe && te && this.docSelection.type == P) {
1360
+ for (var i, l = this.docSelection.createRange(); l.length; )
1361
+ i = l.item(0), l.remove(i), K.removeNode(i);
1211
1362
  this.refresh();
1212
1363
  } else if (this.rangeCount) {
1213
1364
  var m = this.getAllRanges();
1214
1365
  if (m.length) {
1215
1366
  this.removeAllRanges();
1216
- for (var k = 0, w = m.length; k < w; ++k) m[k].deleteContents();
1367
+ for (var k = 0, w = m.length; k < w; ++k)
1368
+ m[k].deleteContents();
1217
1369
  this.addRange(m[w - 1]);
1218
1370
  }
1219
1371
  }
1220
1372
  }, se.eachRange = function(i, l) {
1221
- for (var m = 0, k = this._ranges.length; m < k; ++m) if (i(this.getRangeAt(m))) return l;
1373
+ for (var m = 0, k = this._ranges.length; m < k; ++m)
1374
+ if (i(this.getRangeAt(m)))
1375
+ return l;
1222
1376
  }, se.getAllRanges = function() {
1223
1377
  var i = [];
1224
1378
  return this.eachRange(function(l) {
@@ -1245,13 +1399,15 @@ function Fn() {
1245
1399
  }, se.getBookmark = function(i) {
1246
1400
  return { backward: this.isBackward(), rangeBookmarks: this.callMethodOnEachRange("getBookmark", [i]) };
1247
1401
  }, se.moveToBookmark = function(i) {
1248
- for (var l, m, k = [], w = 0; l = i.rangeBookmarks[w++]; ) (m = p.createRange(this.win)).moveToBookmark(l), k.push(m);
1402
+ for (var l, m, k = [], w = 0; l = i.rangeBookmarks[w++]; )
1403
+ (m = p.createRange(this.win)).moveToBookmark(l), k.push(m);
1249
1404
  i.backward ? this.setSingleRange(k[0], "backward") : this.setRanges(k);
1250
1405
  }, se.saveRanges = function() {
1251
1406
  return { backward: this.isBackward(), ranges: this.callMethodOnEachRange("cloneRange") };
1252
1407
  }, se.restoreRanges = function(i) {
1253
1408
  this.removeAllRanges();
1254
- for (var l, m = 0; l = i.ranges[m]; ++m) this.addRange(l, i.backward && m == 0);
1409
+ for (var l, m = 0; l = i.ranges[m]; ++m)
1410
+ this.addRange(l, i.backward && m == 0);
1255
1411
  }, se.toHtml = function() {
1256
1412
  var i = [];
1257
1413
  return this.eachRange(function(l) {
@@ -1261,10 +1417,12 @@ function Fn() {
1261
1417
  var i;
1262
1418
  if (i = this.docSelection) {
1263
1419
  var l = i.createRange();
1264
- if (ze(l)) return l;
1420
+ if (ze(l))
1421
+ return l;
1265
1422
  throw x.createError("getNativeTextRange: selection is a control selection");
1266
1423
  }
1267
- if (this.rangeCount > 0) return p.WrappedTextRange.rangeToTextRange(this.getRangeAt(0));
1424
+ if (this.rangeCount > 0)
1425
+ return p.WrappedTextRange.rangeToTextRange(this.getRangeAt(0));
1268
1426
  throw x.createError("getNativeTextRange: selection contains no range");
1269
1427
  }), se.getName = function() {
1270
1428
  return "WrappedSelection";
@@ -1281,135 +1439,151 @@ function Fn() {
1281
1439
  });
1282
1440
  });
1283
1441
  var le = !1, ve = function(p) {
1284
- le || (le = !0, !q.initialized && q.config.autoInitialize && Oe());
1442
+ le || (le = !0, !q.initialized && q.config.autoInitialize && Me());
1285
1443
  };
1286
1444
  return de && (document.readyState == "complete" ? ve() : (c(document, "addEventListener") && document.addEventListener("DOMContentLoaded", ve, !1), X(window, "load", ve))), q;
1287
1445
  }
1288
1446
  function Un(_) {
1289
1447
  return _.createModule("ClassApplier", ["WrappedSelection"], function(e, t) {
1290
1448
  var n = e.dom, s = n.DomPosition, a = n.arrayContains, c = e.util, g = c.forEach, C = c.isHostMethod(document, "createElementNS");
1291
- function E(r, h) {
1292
- for (var u in r) if (r.hasOwnProperty(u) && h(u, r[u]) === !1) return !1;
1449
+ function T(r, h) {
1450
+ for (var u in r)
1451
+ if (r.hasOwnProperty(u) && h(u, r[u]) === !1)
1452
+ return !1;
1293
1453
  return !0;
1294
1454
  }
1295
- function b(r) {
1455
+ function E(r) {
1296
1456
  return r.replace(/^\s\s*/, "").replace(/\s\s*$/, "");
1297
1457
  }
1298
- function M(r, h) {
1458
+ function N(r, h) {
1299
1459
  return !!r && new RegExp("(?:^|\\s)" + h + "(?:\\s|$)").test(r);
1300
1460
  }
1301
1461
  function A(r, h) {
1302
- return typeof r.classList == "object" ? r.classList.contains(h) : M(typeof r.className == "string" ? r.className : r.getAttribute("class"), h);
1462
+ return typeof r.classList == "object" ? r.classList.contains(h) : N(typeof r.className == "string" ? r.className : r.getAttribute("class"), h);
1303
1463
  }
1304
- function R(r, h) {
1305
- if (typeof r.classList == "object") r.classList.add(h);
1464
+ function M(r, h) {
1465
+ if (typeof r.classList == "object")
1466
+ r.classList.add(h);
1306
1467
  else {
1307
1468
  var u = typeof r.className == "string", y = u ? r.className : r.getAttribute("class");
1308
- y ? M(y, h) || (y += " " + h) : y = h, u ? r.className = y : r.setAttribute("class", y);
1469
+ y ? N(y, h) || (y += " " + h) : y = h, u ? r.className = y : r.setAttribute("class", y);
1309
1470
  }
1310
1471
  }
1311
- var H = /* @__PURE__ */ function() {
1472
+ var H = function() {
1312
1473
  function r(h, u, y) {
1313
1474
  return u && y ? " " : "";
1314
1475
  }
1315
1476
  return function(h, u) {
1316
- if (typeof h.classList == "object") h.classList.remove(u);
1477
+ if (typeof h.classList == "object")
1478
+ h.classList.remove(u);
1317
1479
  else {
1318
- var y = typeof h.className == "string", T = y ? h.className : h.getAttribute("class");
1319
- T = T.replace(new RegExp("(^|\\s)" + u + "(\\s|$)"), r), y ? h.className = T : h.setAttribute("class", T);
1480
+ var y = typeof h.className == "string", S = y ? h.className : h.getAttribute("class");
1481
+ S = S.replace(new RegExp("(^|\\s)" + u + "(\\s|$)"), r), y ? h.className = S : h.setAttribute("class", S);
1320
1482
  }
1321
1483
  };
1322
1484
  }();
1323
- function B(r) {
1485
+ function z(r) {
1324
1486
  return typeof r.className == "string" ? r.className : r.getAttribute("class");
1325
1487
  }
1326
1488
  function X(r) {
1327
1489
  return r && r.split(/\s+/).sort().join(" ");
1328
1490
  }
1329
1491
  function ie(r) {
1330
- return X(B(r));
1492
+ return X(z(r));
1331
1493
  }
1332
1494
  function de(r, h) {
1333
1495
  return ie(r) == ie(h);
1334
1496
  }
1335
1497
  function fe(r, h) {
1336
- for (var u = h.split(/\s+/), y = 0, T = u.length; y < T; ++y) if (!A(r, b(u[y]))) return !1;
1498
+ for (var u = h.split(/\s+/), y = 0, S = u.length; y < S; ++y)
1499
+ if (!A(r, E(u[y])))
1500
+ return !1;
1337
1501
  return !0;
1338
1502
  }
1339
1503
  function q(r, h, u, y) {
1340
1504
  u == -1 && (u = h.childNodes.length);
1341
- var T = r.parentNode, O = n.getNodeIndex(r);
1342
- g(y, function(z) {
1343
- (function(v, P, W, I, U) {
1505
+ var S = r.parentNode, O = n.getNodeIndex(r);
1506
+ g(y, function(P) {
1507
+ (function(v, D, W, I, U) {
1344
1508
  var Y = v.node, Z = v.offset, ce = Y, te = Z;
1345
- Y == I && Z > U && ++te, Y != P || Z != W && Z != W + 1 || (ce = I, te += U - W), Y == P && Z > W + 1 && --te, v.node = ce, v.offset = te;
1346
- })(z, T, O, h, u);
1509
+ Y == I && Z > U && ++te, Y != D || Z != W && Z != W + 1 || (ce = I, te += U - W), Y == D && Z > W + 1 && --te, v.node = ce, v.offset = te;
1510
+ })(P, S, O, h, u);
1347
1511
  }), h.childNodes.length == u ? h.appendChild(r) : h.insertBefore(r, h.childNodes[u]);
1348
1512
  }
1349
1513
  function ye(r, h) {
1350
1514
  var u = r.parentNode, y = n.getNodeIndex(r);
1351
- g(h, function(T) {
1352
- (function(O, z, v) {
1353
- O.node == z && O.offset > v && --O.offset;
1354
- })(T, u, y);
1515
+ g(h, function(S) {
1516
+ (function(O, P, v) {
1517
+ O.node == P && O.offset > v && --O.offset;
1518
+ })(S, u, y);
1355
1519
  }), n.removeNode(r);
1356
1520
  }
1357
1521
  function $e(r, h) {
1358
- return function(u, y, T, O, z) {
1359
- for (var v, P = []; v = u.firstChild; ) q(v, y, T++, z), P.push(v);
1360
- return ye(u, z), P;
1361
- }(r, r.parentNode, n.getNodeIndex(r), 0, h);
1522
+ return function(u, y, S, O, P) {
1523
+ for (var v, D = []; v = u.firstChild; )
1524
+ q(v, y, S++, P), D.push(v);
1525
+ return O && ye(u, P), D;
1526
+ }(r, r.parentNode, n.getNodeIndex(r), !0, h);
1362
1527
  }
1363
- function Ae(r, h) {
1528
+ function Ne(r, h) {
1364
1529
  var u = r.cloneRange();
1365
1530
  u.selectNodeContents(h);
1366
1531
  var y = u.intersection(r);
1367
1532
  return (y ? y.toString() : "") != "";
1368
1533
  }
1369
1534
  function Be(r) {
1370
- for (var h, u = r.getNodes([3]), y = 0; (h = u[y]) && !Ae(r, h); ) ++y;
1371
- for (var T = u.length - 1; (h = u[T]) && !Ae(r, h); ) --T;
1372
- return u.slice(y, T + 1);
1535
+ for (var h, u = r.getNodes([3]), y = 0; (h = u[y]) && !Ne(r, h); )
1536
+ ++y;
1537
+ for (var S = u.length - 1; (h = u[S]) && !Ne(r, h); )
1538
+ --S;
1539
+ return u.slice(y, S + 1);
1373
1540
  }
1374
1541
  function Ye(r, h) {
1375
- if (r.attributes.length != h.attributes.length) return !1;
1376
- for (var u, y, T, O = 0, z = r.attributes.length; O < z; ++O) if ((T = (u = r.attributes[O]).name) != "class" && (u === null != ((y = h.attributes.getNamedItem(T)) === null) || u.specified != y.specified || u.specified && u.nodeValue !== y.nodeValue))
1542
+ if (r.attributes.length != h.attributes.length)
1377
1543
  return !1;
1544
+ for (var u, y, S, O = 0, P = r.attributes.length; O < P; ++O)
1545
+ if ((S = (u = r.attributes[O]).name) != "class" && (u === null != ((y = h.attributes.getNamedItem(S)) === null) || u.specified != y.specified || u.specified && u.nodeValue !== y.nodeValue))
1546
+ return !1;
1378
1547
  return !0;
1379
1548
  }
1380
- var Oe = n.getComputedStyleProperty, _e = typeof document.createElement("div").isContentEditable == "boolean" ? function(r) {
1549
+ var Me = n.getComputedStyleProperty, Ae = typeof document.createElement("div").isContentEditable == "boolean" ? function(r) {
1381
1550
  return r && r.nodeType == 1 && r.isContentEditable;
1382
1551
  } : function(r) {
1383
- return !(!r || r.nodeType != 1 || r.contentEditable == "false") && (r.contentEditable == "true" || _e(r.parentNode));
1552
+ return !(!r || r.nodeType != 1 || r.contentEditable == "false") && (r.contentEditable == "true" || Ae(r.parentNode));
1384
1553
  };
1385
1554
  function De(r) {
1386
1555
  var h;
1387
- return r && r.nodeType == 1 && ((h = r.parentNode) && h.nodeType == 9 && h.designMode == "on" || _e(r) && !_e(r.parentNode));
1556
+ return r && r.nodeType == 1 && ((h = r.parentNode) && h.nodeType == 9 && h.designMode == "on" || Ae(r) && !Ae(r.parentNode));
1388
1557
  }
1389
1558
  function V(r) {
1390
- return (_e(r) || r.nodeType != 1 && _e(r.parentNode)) && !De(r);
1559
+ return (Ae(r) || r.nodeType != 1 && Ae(r.parentNode)) && !De(r);
1391
1560
  }
1392
1561
  var re = /^inline(-block|-table)?$/i;
1393
1562
  function Q(r) {
1394
- return r && r.nodeType == 1 && !re.test(Oe(r, "display"));
1563
+ return r && r.nodeType == 1 && !re.test(Me(r, "display"));
1395
1564
  }
1396
1565
  var ae = /[^\r\n\t\f \u200B]/;
1397
1566
  function le(r) {
1398
1567
  var h, u, y = [];
1399
- for (h = 0; u = r[h++]; ) y.push(new s(u.startContainer, u.startOffset), new s(u.endContainer, u.endOffset));
1568
+ for (h = 0; u = r[h++]; )
1569
+ y.push(new s(u.startContainer, u.startOffset), new s(u.endContainer, u.endOffset));
1400
1570
  return y;
1401
1571
  }
1402
1572
  function ve(r, h) {
1403
- for (var u, y, T, O = 0, z = r.length; O < z; ++O) u = r[O], y = h[2 * O], T = h[2 * O + 1], u.setStartAndEnd(y.node, y.offset, T.node, T.offset);
1573
+ for (var u, y, S, O = 0, P = r.length; O < P; ++O)
1574
+ u = r[O], y = h[2 * O], S = h[2 * O + 1], u.setStartAndEnd(y.node, y.offset, S.node, S.offset);
1404
1575
  }
1405
1576
  function p(r, h, u, y) {
1406
- var T, O, z = u == 0;
1407
- if (n.isAncestorOf(h, r)) return r;
1577
+ var S, O, P = u == 0;
1578
+ if (n.isAncestorOf(h, r))
1579
+ return r;
1408
1580
  if (n.isCharacterDataNode(h)) {
1409
1581
  var v = n.getNodeIndex(h);
1410
- if (u == 0) u = v;
1582
+ if (u == 0)
1583
+ u = v;
1411
1584
  else {
1412
- if (u != h.length) throw t.createError("splitNodeAt() should not be called with offset in the middle of a data node (" + u + " in " + h.data);
1585
+ if (u != h.length)
1586
+ throw t.createError("splitNodeAt() should not be called with offset in the middle of a data node (" + u + " in " + h.data);
1413
1587
  u = v + 1;
1414
1588
  }
1415
1589
  h = h.parentNode;
@@ -1417,26 +1591,29 @@ function Un(_) {
1417
1591
  if (function(U, Y) {
1418
1592
  return n.isCharacterDataNode(U) ? Y == 0 ? !!U.previousSibling : Y != U.length || !!U.nextSibling : Y > 0 && Y < U.childNodes.length;
1419
1593
  }(h, u)) {
1420
- T = h.cloneNode(!1), O = h.parentNode, T.id && T.removeAttribute("id");
1421
- for (var P, W = 0; P = h.childNodes[u]; ) q(P, T, W++, y);
1422
- return q(T, O, n.getNodeIndex(h) + 1, y), h == r ? T : p(r, O, n.getNodeIndex(T), y);
1594
+ S = h.cloneNode(!1), O = h.parentNode, S.id && S.removeAttribute("id");
1595
+ for (var D, W = 0; D = h.childNodes[u]; )
1596
+ q(D, S, W++, y);
1597
+ return q(S, O, n.getNodeIndex(h) + 1, y), h == r ? S : p(r, O, n.getNodeIndex(S), y);
1423
1598
  }
1424
1599
  if (r != h) {
1425
- T = h.parentNode;
1600
+ S = h.parentNode;
1426
1601
  var I = n.getNodeIndex(h);
1427
- return z || I++, p(r, T, I, y);
1602
+ return P || I++, p(r, S, I, y);
1428
1603
  }
1429
1604
  return r;
1430
1605
  }
1431
1606
  function x(r) {
1432
1607
  var h = r ? "nextSibling" : "previousSibling";
1433
1608
  return function(u, y) {
1434
- var T, O, z = u.parentNode, v = u[h];
1609
+ var S, O, P = u.parentNode, v = u[h];
1435
1610
  if (v) {
1436
- if (v && v.nodeType == 3) return v;
1437
- } else if (y && (v = z[h]) && v.nodeType == 1 && (O = v, (T = z).namespaceURI == O.namespaceURI && T.tagName.toLowerCase() == O.tagName.toLowerCase() && de(T, O) && Ye(T, O) && Oe(T, "display") == "inline" && Oe(O, "display") == "inline")) {
1438
- var P = v[r ? "firstChild" : "lastChild"];
1439
- if (P && P.nodeType == 3) return P;
1611
+ if (v && v.nodeType == 3)
1612
+ return v;
1613
+ } else if (y && (v = P[h]) && v.nodeType == 1 && (O = v, (S = P).namespaceURI == O.namespaceURI && S.tagName.toLowerCase() == O.tagName.toLowerCase() && de(S, O) && Ye(S, O) && Me(S, "display") == "inline" && Me(O, "display") == "inline")) {
1614
+ var D = v[r ? "firstChild" : "lastChild"];
1615
+ if (D && D.nodeType == 3)
1616
+ return D;
1440
1617
  }
1441
1618
  return null;
1442
1619
  };
@@ -1450,16 +1627,17 @@ function Un(_) {
1450
1627
  J.prototype = { doMerge: function(r) {
1451
1628
  var h = this.textNodes, u = h[0];
1452
1629
  if (h.length > 1) {
1453
- var y, T = n.getNodeIndex(u), O = [], z = 0;
1454
- g(h, function(v, P) {
1455
- y = v.parentNode, P > 0 && (y.removeChild(v), y.hasChildNodes() || n.removeNode(y), r && g(r, function(W) {
1456
- W.node == v && (W.node = u, W.offset += z), W.node == y && W.offset > T && (--W.offset, W.offset == T + 1 && P < h.length - 1 && (W.node = u, W.offset = z));
1457
- })), O[P] = v.data, z += v.data.length;
1630
+ var y, S = n.getNodeIndex(u), O = [], P = 0;
1631
+ g(h, function(v, D) {
1632
+ y = v.parentNode, D > 0 && (y.removeChild(v), y.hasChildNodes() || n.removeNode(y), r && g(r, function(W) {
1633
+ W.node == v && (W.node = u, W.offset += P), W.node == y && W.offset > S && (--W.offset, W.offset == S + 1 && D < h.length - 1 && (W.node = u, W.offset = P));
1634
+ })), O[D] = v.data, P += v.data.length;
1458
1635
  }), u.data = O.join("");
1459
1636
  }
1460
1637
  return u.data;
1461
1638
  }, getLength: function() {
1462
- for (var r = this.textNodes.length, h = 0; r--; ) h += this.textNodes[r].length;
1639
+ for (var r = this.textNodes.length, h = 0; r--; )
1640
+ h += this.textNodes[r].length;
1463
1641
  return h;
1464
1642
  }, toString: function() {
1465
1643
  var r = [];
@@ -1469,33 +1647,45 @@ function Un(_) {
1469
1647
  } };
1470
1648
  var ee = ["elementTagName", "ignoreWhiteSpace", "applyToEditableOnly", "useExistingElements", "removeEmptyElements", "onElementCreate"], K = {};
1471
1649
  function ue(r, h, u) {
1472
- var y, T, O, z, v = this;
1650
+ var y, S, O, P, v = this;
1473
1651
  v.cssClass = v.className = r;
1474
- var P = null, W = {};
1652
+ var D = null, W = {};
1475
1653
  if (typeof h == "object" && h !== null) {
1476
- for (h.elementTagName !== void 0 && (h.elementTagName = h.elementTagName.toLowerCase()), u = h.tagNames, P = h.elementProperties, W = h.elementAttributes, T = 0; z = ee[T++]; ) h.hasOwnProperty(z) && (v[z] = h[z]);
1654
+ for (h.elementTagName !== void 0 && (h.elementTagName = h.elementTagName.toLowerCase()), u = h.tagNames, D = h.elementProperties, W = h.elementAttributes, S = 0; P = ee[S++]; )
1655
+ h.hasOwnProperty(P) && (v[P] = h[P]);
1477
1656
  y = h.normalize;
1478
- } else y = h;
1657
+ } else
1658
+ y = h;
1479
1659
  v.normalize = y === void 0 || y, v.attrExceptions = [];
1480
1660
  var I = document.createElement(v.elementTagName);
1481
- v.elementProperties = v.copyPropertiesToElement(P, I, !0), E(W, function(Y, Z) {
1661
+ v.elementProperties = v.copyPropertiesToElement(D, I, !0), T(W, function(Y, Z) {
1482
1662
  v.attrExceptions.push(Y), W[Y] = "" + Z;
1483
1663
  }), v.elementAttributes = W, v.elementSortedClassName = v.elementProperties.hasOwnProperty("className") ? X(v.elementProperties.className + " " + r) : r, v.applyToAnyTagName = !1;
1484
1664
  var U = typeof u;
1485
- if (U == "string") u == "*" ? v.applyToAnyTagName = !0 : v.tagNames = b(u.toLowerCase()).split(/\s*,\s*/);
1486
- else if (U == "object" && typeof u.length == "number") for (v.tagNames = [], T = 0, O = u.length; T < O; ++T) u[T] == "*" ? v.applyToAnyTagName = !0 : v.tagNames.push(u[T].toLowerCase());
1487
- else v.tagNames = [v.elementTagName];
1665
+ if (U == "string")
1666
+ u == "*" ? v.applyToAnyTagName = !0 : v.tagNames = E(u.toLowerCase()).split(/\s*,\s*/);
1667
+ else if (U == "object" && typeof u.length == "number")
1668
+ for (v.tagNames = [], S = 0, O = u.length; S < O; ++S)
1669
+ u[S] == "*" ? v.applyToAnyTagName = !0 : v.tagNames.push(u[S].toLowerCase());
1670
+ else
1671
+ v.tagNames = [v.elementTagName];
1488
1672
  }
1489
1673
  ue.prototype = { elementTagName: "span", elementProperties: {}, elementAttributes: {}, ignoreWhiteSpace: !0, applyToEditableOnly: !1, useExistingElements: !0, removeEmptyElements: !0, onElementCreate: null, copyPropertiesToElement: function(r, h, u) {
1490
- var y, T, O, z, v, P, W = {};
1491
- for (var I in r) if (r.hasOwnProperty(I)) if (z = r[I], v = h[I], I == "className") R(h, z), R(h, this.className), h[I] = X(h[I]), u && (W[I] = z);
1492
- else if (I == "style") {
1493
- for (y in T = v, u && (W[I] = O = {}), r[I]) r[I].hasOwnProperty(y) && (T[y] = z[y], u && (O[y] = T[y]));
1494
- this.attrExceptions.push(I);
1495
- } else h[I] = z, u && (W[I] = h[I], P = K.hasOwnProperty(I) ? K[I] : I, this.attrExceptions.push(P));
1674
+ var y, S, O, P, v, D, W = {};
1675
+ for (var I in r)
1676
+ if (r.hasOwnProperty(I))
1677
+ if (P = r[I], v = h[I], I == "className")
1678
+ M(h, P), M(h, this.className), h[I] = X(h[I]), u && (W[I] = P);
1679
+ else if (I == "style") {
1680
+ for (y in S = v, u && (W[I] = O = {}), r[I])
1681
+ r[I].hasOwnProperty(y) && (S[y] = P[y], u && (O[y] = S[y]));
1682
+ this.attrExceptions.push(I);
1683
+ } else
1684
+ h[I] = P, u && (W[I] = h[I], D = K.hasOwnProperty(I) ? K[I] : I, this.attrExceptions.push(D));
1496
1685
  return u ? W : "";
1497
1686
  }, copyAttributesToElement: function(r, h) {
1498
- for (var u in r) r.hasOwnProperty(u) && !/^class(?:Name)?$/i.test(u) && h.setAttribute(u, r[u]);
1687
+ for (var u in r)
1688
+ r.hasOwnProperty(u) && !/^class(?:Name)?$/i.test(u) && h.setAttribute(u, r[u]);
1499
1689
  }, appliesToElement: function(r) {
1500
1690
  return a(this.tagNames, r.tagName.toLowerCase());
1501
1691
  }, getEmptyElements: function(r) {
@@ -1507,7 +1697,8 @@ function Un(_) {
1507
1697
  return r.nodeType == 1 && (this.applyToAnyTagName || this.appliesToElement(r)) && A(r, this.className);
1508
1698
  }, getSelfOrAncestorWithClass: function(r) {
1509
1699
  for (; r; ) {
1510
- if (this.hasClass(r)) return r;
1700
+ if (this.hasClass(r))
1701
+ return r;
1511
1702
  r = r.parentNode;
1512
1703
  }
1513
1704
  return null;
@@ -1515,53 +1706,62 @@ function Un(_) {
1515
1706
  return !this.applyToEditableOnly || V(r);
1516
1707
  }, isIgnorableWhiteSpaceNode: function(r) {
1517
1708
  return this.ignoreWhiteSpace && r && r.nodeType == 3 && function(h) {
1518
- if (h.data.length == 0) return !0;
1519
- if (ae.test(h.data)) return !1;
1520
- switch (Oe(h.parentNode, "whiteSpace")) {
1709
+ if (h.data.length == 0)
1710
+ return !0;
1711
+ if (ae.test(h.data))
1712
+ return !1;
1713
+ switch (Me(h.parentNode, "whiteSpace")) {
1521
1714
  case "pre":
1522
1715
  case "pre-wrap":
1523
1716
  case "-moz-pre-wrap":
1524
1717
  return !1;
1525
1718
  case "pre-line":
1526
- if (/[\r\n]/.test(h.data)) return !1;
1719
+ if (/[\r\n]/.test(h.data))
1720
+ return !1;
1527
1721
  }
1528
1722
  return Q(h.previousSibling) || Q(h.nextSibling);
1529
1723
  }(r);
1530
1724
  }, postApply: function(r, h, u, y) {
1531
- var T, O, z = r[0], v = r[r.length - 1], P = [], W = z, I = v, U = 0, Y = v.length;
1725
+ var S, O, P = r[0], v = r[r.length - 1], D = [], W = P, I = v, U = 0, Y = v.length;
1532
1726
  g(r, function(he) {
1533
- (O = L(he, !y)) ? (T || (T = new J(O), P.push(T)), T.textNodes.push(he), he === z && (W = T.textNodes[0], U = W.length), he === v && (I = T.textNodes[0], Y = T.getLength())) : T = null;
1727
+ (O = L(he, !y)) ? (S || (S = new J(O), D.push(S)), S.textNodes.push(he), he === P && (W = S.textNodes[0], U = W.length), he === v && (I = S.textNodes[0], Y = S.getLength())) : S = null;
1534
1728
  });
1535
1729
  var Z = F(v, !y);
1536
- if (Z && (T || (T = new J(v), P.push(T)), T.textNodes.push(Z)), P.length) {
1537
- for (var ce = 0, te = P.length; ce < te; ++ce) P[ce].doMerge(u);
1730
+ if (Z && (S || (S = new J(v), D.push(S)), S.textNodes.push(Z)), D.length) {
1731
+ for (var ce = 0, te = D.length; ce < te; ++ce)
1732
+ D[ce].doMerge(u);
1538
1733
  h.setStartAndEnd(W, U, I, Y);
1539
1734
  }
1540
1735
  }, createContainer: function(r) {
1541
1736
  var h = n.getDocument(r), u = C && !n.isHtmlNamespace(r) && r.namespaceURI ? h.createElementNS(r.namespaceURI, this.elementTagName) : h.createElement(this.elementTagName);
1542
- return this.copyPropertiesToElement(this.elementProperties, u, !1), this.copyAttributesToElement(this.elementAttributes, u), R(u, this.className), this.onElementCreate && this.onElementCreate(u, this), u;
1737
+ return this.copyPropertiesToElement(this.elementProperties, u, !1), this.copyAttributesToElement(this.elementAttributes, u), M(u, this.className), this.onElementCreate && this.onElementCreate(u, this), u;
1543
1738
  }, elementHasProperties: function(r, h) {
1544
1739
  var u = this;
1545
- return E(h, function(y, T) {
1546
- if (y == "className") return fe(r, T);
1547
- if (typeof T == "object") {
1548
- if (!u.elementHasProperties(r[y], T)) return !1;
1549
- } else if (r[y] !== T) return !1;
1740
+ return T(h, function(y, S) {
1741
+ if (y == "className")
1742
+ return fe(r, S);
1743
+ if (typeof S == "object") {
1744
+ if (!u.elementHasProperties(r[y], S))
1745
+ return !1;
1746
+ } else if (r[y] !== S)
1747
+ return !1;
1550
1748
  });
1551
1749
  }, elementHasAttributes: function(r, h) {
1552
- return E(h, function(u, y) {
1553
- if (r.getAttribute(u) !== y) return !1;
1750
+ return T(h, function(u, y) {
1751
+ if (r.getAttribute(u) !== y)
1752
+ return !1;
1554
1753
  });
1555
1754
  }, applyToTextNode: function(r, h) {
1556
1755
  if (function(O) {
1557
- var z = O.parentNode;
1558
- return z && z.nodeType == 1 && !/^(textarea|style|script|select|iframe)$/i.test(z.nodeName);
1756
+ var P = O.parentNode;
1757
+ return P && P.nodeType == 1 && !/^(textarea|style|script|select|iframe)$/i.test(P.nodeName);
1559
1758
  }(r)) {
1560
1759
  var u = r.parentNode;
1561
- if (u.childNodes.length == 1 && this.useExistingElements && this.appliesToElement(u) && this.elementHasProperties(u, this.elementProperties) && this.elementHasAttributes(u, this.elementAttributes)) R(u, this.className);
1760
+ if (u.childNodes.length == 1 && this.useExistingElements && this.appliesToElement(u) && this.elementHasProperties(u, this.elementProperties) && this.elementHasAttributes(u, this.elementAttributes))
1761
+ M(u, this.className);
1562
1762
  else {
1563
- var y = r.parentNode, T = this.createContainer(y);
1564
- y.insertBefore(T, r), T.appendChild(r);
1763
+ var y = r.parentNode, S = this.createContainer(y);
1764
+ y.insertBefore(S, r), S.appendChild(r);
1565
1765
  }
1566
1766
  }
1567
1767
  }, isRemovable: function(r) {
@@ -1572,14 +1772,14 @@ function Un(_) {
1572
1772
  }, removeEmptyContainers: function(r) {
1573
1773
  var h = this, u = r.getNodes([1], function(O) {
1574
1774
  return h.isEmptyContainer(O);
1575
- }), y = [r], T = le(y);
1775
+ }), y = [r], S = le(y);
1576
1776
  g(u, function(O) {
1577
- ye(O, T);
1578
- }), ve(y, T);
1777
+ ye(O, S);
1778
+ }), ve(y, S);
1579
1779
  }, undoToTextNode: function(r, h, u, y) {
1580
1780
  if (!h.containsNode(u)) {
1581
- var T = h.cloneRange();
1582
- T.selectNode(u), T.isPointInRange(h.endContainer, h.endOffset) && (p(u, h.endContainer, h.endOffset, y), h.setEndAfter(u)), T.isPointInRange(h.startContainer, h.startOffset) && (u = p(u, h.startContainer, h.startOffset, y));
1781
+ var S = h.cloneRange();
1782
+ S.selectNode(u), S.isPointInRange(h.endContainer, h.endOffset) && (p(u, h.endContainer, h.endOffset, y), h.setEndAfter(u)), S.isPointInRange(h.startContainer, h.startOffset) && (u = p(u, h.startContainer, h.startOffset, y));
1583
1783
  }
1584
1784
  this.isRemovable(u) ? $e(u, y) : H(u, this.className);
1585
1785
  }, splitAncestorWithClass: function(r, h, u) {
@@ -1590,20 +1790,21 @@ function Un(_) {
1590
1790
  }, applyToRange: function(r, h) {
1591
1791
  var u = this, y = le((h = h || []) || []);
1592
1792
  r.splitBoundariesPreservingPositions(y), u.removeEmptyElements && u.removeEmptyContainers(r);
1593
- var T = Be(r);
1594
- if (T.length) {
1595
- g(T, function(v) {
1793
+ var S = Be(r);
1794
+ if (S.length) {
1795
+ g(S, function(v) {
1596
1796
  u.isIgnorableWhiteSpaceNode(v) || u.getSelfOrAncestorWithClass(v) || !u.isModifiable(v) || u.applyToTextNode(v, y);
1597
1797
  });
1598
- var O = T[T.length - 1];
1599
- r.setStartAndEnd(T[0], 0, O, O.length), u.normalize && u.postApply(T, r, y, !1), ve(h, y);
1798
+ var O = S[S.length - 1];
1799
+ r.setStartAndEnd(S[0], 0, O, O.length), u.normalize && u.postApply(S, r, y, !1), ve(h, y);
1600
1800
  }
1601
- var z = u.getEmptyElements(r);
1602
- g(z, function(v) {
1603
- R(v, u.className);
1801
+ var P = u.getEmptyElements(r);
1802
+ g(P, function(v) {
1803
+ M(v, u.className);
1604
1804
  });
1605
1805
  }, applyToRanges: function(r) {
1606
- for (var h = r.length; h--; ) this.applyToRange(r[h], r);
1806
+ for (var h = r.length; h--; )
1807
+ this.applyToRange(r[h], r);
1607
1808
  return r;
1608
1809
  }, applyToSelection: function(r) {
1609
1810
  var h = e.getSelection(r);
@@ -1611,35 +1812,43 @@ function Un(_) {
1611
1812
  }, undoToRange: function(r, h) {
1612
1813
  var u = this, y = le(h = h || []);
1613
1814
  r.splitBoundariesPreservingPositions(y), u.removeEmptyElements && u.removeEmptyContainers(r, y);
1614
- var T, O, z = Be(r), v = z[z.length - 1];
1615
- if (z.length) {
1815
+ var S, O, P = Be(r), v = P[P.length - 1];
1816
+ if (P.length) {
1616
1817
  u.splitAncestorWithClass(r.endContainer, r.endOffset, y), u.splitAncestorWithClass(r.startContainer, r.startOffset, y);
1617
- for (var P = 0, W = z.length; P < W; ++P) T = z[P], (O = u.getSelfOrAncestorWithClass(T)) && u.isModifiable(T) && u.undoToAncestor(O, y);
1618
- r.setStartAndEnd(z[0], 0, v, v.length), u.normalize && u.postApply(z, r, y, !0), ve(h, y);
1818
+ for (var D = 0, W = P.length; D < W; ++D)
1819
+ S = P[D], (O = u.getSelfOrAncestorWithClass(S)) && u.isModifiable(S) && u.undoToAncestor(O, y);
1820
+ r.setStartAndEnd(P[0], 0, v, v.length), u.normalize && u.postApply(P, r, y, !0), ve(h, y);
1619
1821
  }
1620
1822
  var I = u.getEmptyElements(r);
1621
1823
  g(I, function(U) {
1622
1824
  H(U, u.className);
1623
1825
  });
1624
1826
  }, undoToRanges: function(r) {
1625
- for (var h = r.length; h--; ) this.undoToRange(r[h], r);
1827
+ for (var h = r.length; h--; )
1828
+ this.undoToRange(r[h], r);
1626
1829
  return r;
1627
1830
  }, undoToSelection: function(r) {
1628
1831
  var h = e.getSelection(r), u = e.getSelection(r).getAllRanges();
1629
1832
  this.undoToRanges(u), h.setRanges(u);
1630
1833
  }, isAppliedToRange: function(r) {
1631
- if (r.collapsed || r.toString() == "") return !!this.getSelfOrAncestorWithClass(r.commonAncestorContainer);
1834
+ if (r.collapsed || r.toString() == "")
1835
+ return !!this.getSelfOrAncestorWithClass(r.commonAncestorContainer);
1632
1836
  var h = r.getNodes([3]);
1633
1837
  if (h.length) {
1634
- for (var u, y = 0; u = h[y++]; ) if (!this.isIgnorableWhiteSpaceNode(u) && Ae(r, u) && this.isModifiable(u) && !this.getSelfOrAncestorWithClass(u)) return !1;
1838
+ for (var u, y = 0; u = h[y++]; )
1839
+ if (!this.isIgnorableWhiteSpaceNode(u) && Ne(r, u) && this.isModifiable(u) && !this.getSelfOrAncestorWithClass(u))
1840
+ return !1;
1635
1841
  }
1636
1842
  return !0;
1637
1843
  }, findEffectiveTextNodes: function(r) {
1638
1844
  return Be(r);
1639
1845
  }, isAppliedToRanges: function(r) {
1640
1846
  var h = r.length;
1641
- if (h == 0) return !1;
1642
- for (; h--; ) if (!this.isAppliedToRange(r[h])) return !1;
1847
+ if (h == 0)
1848
+ return !1;
1849
+ for (; h--; )
1850
+ if (!this.isAppliedToRange(r[h]))
1851
+ return !1;
1643
1852
  return !0;
1644
1853
  }, isAppliedToSelection: function(r) {
1645
1854
  var h = e.getSelection(r);
@@ -1651,14 +1860,16 @@ function Un(_) {
1651
1860
  }, getElementsWithClassIntersectingRange: function(r) {
1652
1861
  var h = [], u = this;
1653
1862
  return r.getNodes([3], function(y) {
1654
- var T = u.getSelfOrAncestorWithClass(y);
1655
- T && !a(h, T) && h.push(T);
1863
+ var S = u.getSelfOrAncestorWithClass(y);
1864
+ S && !a(h, S) && h.push(S);
1656
1865
  }), h;
1657
1866
  }, detach: function() {
1658
- } }, ue.util = { hasClass: A, addClass: R, removeClass: H, getClass: B, hasSameClasses: de, hasAllClasses: fe, replaceWithOwnChildren: $e, elementsHaveSameNonClassAttributes: Ye, elementHasNonClassAttributes: function(r, h) {
1659
- for (var u, y = 0, T = r.attributes.length; y < T; ++y) if (u = r.attributes[y].name, (!h || !a(h, u)) && r.attributes[y].specified && u != "class") return !0;
1867
+ } }, ue.util = { hasClass: A, addClass: M, removeClass: H, getClass: z, hasSameClasses: de, hasAllClasses: fe, replaceWithOwnChildren: $e, elementsHaveSameNonClassAttributes: Ye, elementHasNonClassAttributes: function(r, h) {
1868
+ for (var u, y = 0, S = r.attributes.length; y < S; ++y)
1869
+ if (u = r.attributes[y].name, (!h || !a(h, u)) && r.attributes[y].specified && u != "class")
1870
+ return !0;
1660
1871
  return !1;
1661
- }, splitNodeAt: p, isEditableElement: _e, isEditingHost: De, isEditable: V }, e.CssClassApplier = e.ClassApplier = ue, e.createClassApplier = function(r, h, u) {
1872
+ }, splitNodeAt: p, isEditableElement: Ae, isEditingHost: De, isEditable: V }, e.CssClassApplier = e.ClassApplier = ue, e.createClassApplier = function(r, h, u) {
1662
1873
  return new ue(r, h, u);
1663
1874
  }, c.createAliasForDeprecatedMethod(e, "createCssClassApplier", "createClassApplier", t);
1664
1875
  }), _;
@@ -1687,38 +1898,39 @@ class $n {
1687
1898
  s.getAttribute("data-click") !== "true" && (s.addEventListener("click", (a) => {
1688
1899
  a.preventDefault(), window.open(s.href, "_blank");
1689
1900
  }), s.addEventListener("mouseover", () => {
1690
- if (s.querySelector('div[data-input-wrap="true"]')) return;
1901
+ if (s.querySelector('div[data-input-wrap="true"]'))
1902
+ return;
1691
1903
  const a = s.offsetTop, c = s.offsetLeft, g = s.offsetWidth, C = s.offsetHeight;
1692
- let E = c - 125 + g / 2;
1693
- E < 0 && (E = 0);
1694
- const b = document.createElement("div");
1695
- b.setAttribute("data-input-wrap", "true"), b.style.setProperty("top", `${a + C}px`), b.style.setProperty("left", `${E}px`), b.setAttribute("class", "ce-el-link-wrapper");
1696
- const M = document.createElement("input");
1697
- M.setAttribute("type", "text"), M.setAttribute("value", s.href), M.setAttribute("class", "ce-el-link-input ce-el-link__noedit");
1904
+ let T = c - 125 + g / 2;
1905
+ T < 0 && (T = 0);
1906
+ const E = document.createElement("div");
1907
+ E.setAttribute("data-input-wrap", "true"), E.style.setProperty("top", `${a + C}px`), E.style.setProperty("left", `${T}px`), E.setAttribute("class", "ce-el-link-wrapper");
1908
+ const N = document.createElement("input");
1909
+ N.setAttribute("type", "text"), N.setAttribute("value", s.href), N.setAttribute("class", "ce-el-link-input ce-el-link__noedit");
1698
1910
  const A = document.createElement("div");
1699
1911
  A.setAttribute("class", "ce-el-link-input-text ce-el-link__noedit"), A.innerHTML = s.href;
1700
- const R = document.createElement("div");
1701
- R.setAttribute("class", "ce-el-link-btn-wrap");
1912
+ const M = document.createElement("div");
1913
+ M.setAttribute("class", "ce-el-link-btn-wrap");
1702
1914
  const H = document.createElement("div");
1703
1915
  H.innerHTML = Tn, H.setAttribute("class", "ce-el-link-icon-btn ce-el-link-unlink-btn ce-el-link__noedit"), H.setAttribute("title", "取消链接");
1704
- const B = document.createElement("div");
1705
- B.innerHTML = '<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" p-id="2483" width="20" height="20"><path d="M391.467 736.322a31.99 31.99 0 0 1-13.783 8.126l-232.261 66.798c-12.088 3.477-23.276-7.711-19.799-19.799l66.798-232.261a32 32 0 0 1 8.126-13.782l472.869-472.87c12.496-12.496 32.758-12.496 45.254 0L864.335 218.2c12.497 12.496 12.497 32.758 0 45.255L391.467 736.322z m248.009-516.709l77.781 77.782 56.569-56.569-77.782-77.782-56.568 56.569z m-50.912 50.911L265.88 593.209l-31.401 109.182 109.182-31.401 322.685-322.684-77.782-77.782zM129.001 889h768v72h-768v-72z" fill="#323338" ></path></svg>', B.setAttribute("class", "ce-el-link-icon-btn ce-el-link-edit-btn ce-el-link__noedit"), B.setAttribute("title", "编辑链接");
1916
+ const z = document.createElement("div");
1917
+ z.innerHTML = '<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" p-id="2483" width="20" height="20"><path d="M391.467 736.322a31.99 31.99 0 0 1-13.783 8.126l-232.261 66.798c-12.088 3.477-23.276-7.711-19.799-19.799l66.798-232.261a32 32 0 0 1 8.126-13.782l472.869-472.87c12.496-12.496 32.758-12.496 45.254 0L864.335 218.2c12.497 12.496 12.497 32.758 0 45.255L391.467 736.322z m248.009-516.709l77.781 77.782 56.569-56.569-77.782-77.782-56.568 56.569z m-50.912 50.911L265.88 593.209l-31.401 109.182 109.182-31.401 322.685-322.684-77.782-77.782zM129.001 889h768v72h-768v-72z" fill="#323338" ></path></svg>', z.setAttribute("class", "ce-el-link-icon-btn ce-el-link-edit-btn ce-el-link__noedit"), z.setAttribute("title", "编辑链接");
1706
1918
  const X = document.createElement("button");
1707
- X.setAttribute("type", "button"), X.setAttribute("class", "ce-el-link-btn ce-el-link__noedit"), X.innerHTML = "确定", R.appendChild(B), R.appendChild(H), R.appendChild(X), B.addEventListener("click", (ie) => {
1708
- ie.preventDefault(), ie.stopPropagation(), M.classList.remove("ce-el-link__noedit"), A.classList.remove("ce-el-link__noedit"), B.classList.remove("ce-el-link__noedit"), H.classList.remove("ce-el-link__noedit"), X.classList.remove("ce-el-link__noedit"), s.removeEventListener("mouseout", this.mouseOut), b.removeEventListener("mouseout", this.mouseOut);
1919
+ X.setAttribute("type", "button"), X.setAttribute("class", "ce-el-link-btn ce-el-link__noedit"), X.innerHTML = "确定", M.appendChild(z), M.appendChild(H), M.appendChild(X), z.addEventListener("click", (ie) => {
1920
+ ie.preventDefault(), ie.stopPropagation(), N.classList.remove("ce-el-link__noedit"), A.classList.remove("ce-el-link__noedit"), z.classList.remove("ce-el-link__noedit"), H.classList.remove("ce-el-link__noedit"), X.classList.remove("ce-el-link__noedit"), s.removeEventListener("mouseout", this.mouseOut), E.removeEventListener("mouseout", this.mouseOut);
1709
1921
  }), X.addEventListener("click", (ie) => {
1710
1922
  var de;
1711
- ie.preventDefault(), ie.stopPropagation(), s.href = M.value, (de = s.querySelector('div[data-input-wrap="true"]')) == null || de.remove();
1923
+ ie.preventDefault(), ie.stopPropagation(), s.href = N.value, (de = s.querySelector('div[data-input-wrap="true"]')) == null || de.remove();
1712
1924
  }), H.addEventListener("click", (ie) => {
1713
1925
  var de;
1714
1926
  ie.preventDefault(), ie.stopPropagation(), (de = s.querySelector('div[data-input-wrap="true"]')) == null || de.remove(), s.outerHTML = s.innerHTML;
1715
- }), b.addEventListener("click", (ie) => {
1927
+ }), E.addEventListener("click", (ie) => {
1716
1928
  ie.preventDefault(), ie.stopPropagation();
1717
- }), M.addEventListener("click", (ie) => {
1929
+ }), N.addEventListener("click", (ie) => {
1718
1930
  ie.preventDefault(), ie.stopPropagation();
1719
- }), b.addEventListener("mouseover", (ie) => {
1931
+ }), E.addEventListener("mouseover", (ie) => {
1720
1932
  s.timer && clearTimeout(s.timer);
1721
- }), b.addEventListener("mouseout", this.mouseOut), b.appendChild(A), b.appendChild(M), b.appendChild(R), s.appendChild(b);
1933
+ }), E.addEventListener("mouseout", this.mouseOut), E.appendChild(A), E.appendChild(N), E.appendChild(M), s.appendChild(E);
1722
1934
  }), s.addEventListener("mouseout", this.mouseOut), s.setAttribute("data-click", "true"));
1723
1935
  });
1724
1936
  }).observe(this.holder, { childList: !0, subtree: !0 });
@@ -1733,7 +1945,8 @@ class jn {
1733
1945
  this.toolbar = c, this.borderStyle = s || "1px dashed #aaa", this.api = a, this.holder = document.getElementById(e), this.readOnly = t, this.startBlock = null, this.endBlock = null, this.setDragListener(), this.setDropListener();
1734
1946
  }
1735
1947
  setElementCursor(e) {
1736
- if (!e) return;
1948
+ if (!e)
1949
+ return;
1737
1950
  const t = document.createRange(), n = window.getSelection();
1738
1951
  t.setStart(e.childNodes[0], 0), t.collapse(!0), n == null || n.removeAllRanges(), n == null || n.addRange(t), e.focus();
1739
1952
  }
@@ -1761,7 +1974,8 @@ class jn {
1761
1974
  setBorderBlocks(e, t) {
1762
1975
  Object.values(e).forEach((n) => {
1763
1976
  const s = n.querySelector(".ce-block__content");
1764
- if (n !== t) s == null || s.style.removeProperty("border-top"), s == null || s.style.removeProperty("border-bottom");
1977
+ if (n !== t)
1978
+ s == null || s.style.removeProperty("border-top"), s == null || s.style.removeProperty("border-bottom");
1765
1979
  else {
1766
1980
  const a = Object.keys(e).find((c) => e[Number(c)] === t);
1767
1981
  a && Number(a) > this.startBlock ? s.style.borderBottom = this.borderStyle : s.style.borderTop = this.borderStyle;
@@ -2351,7 +2565,8 @@ class Vt {
2351
2565
  this.api = n, this.readOnly = s, this._CSS = { block: this.api.styles.block, wrapper: "ce-paragraph" }, this.readOnly || (this.onKeyUp = this.onKeyUp.bind(this)), this._placeholder = t.placeholder ? t.placeholder : Vt.DEFAULT_PLACEHOLDER, this._data = e != null ? e : {}, this._element = null, this._preserveBlank = (a = t.preserveBlank) != null ? a : !1;
2352
2566
  }
2353
2567
  onKeyUp(e) {
2354
- if (e.code !== "Backspace" && e.code !== "Delete" || !this._element) return;
2568
+ if (e.code !== "Backspace" && e.code !== "Delete" || !this._element)
2569
+ return;
2355
2570
  const { textContent: t } = this._element;
2356
2571
  t === "" && (this._element.innerHTML = "");
2357
2572
  }
@@ -2363,7 +2578,8 @@ class Vt {
2363
2578
  return this._element = this.drawView(), this._element;
2364
2579
  }
2365
2580
  merge(e) {
2366
- if (!this._element) return;
2581
+ if (!this._element)
2582
+ return;
2367
2583
  this._data.text += e.text;
2368
2584
  const t = function(n) {
2369
2585
  const s = document.createElement("div");
@@ -2404,7 +2620,7 @@ class Vt {
2404
2620
  class St {
2405
2621
  constructor({ data: e, config: t, api: n, readOnly: s }) {
2406
2622
  var a;
2407
- this._selectorLanguage = "", this._selectorTheme = "", this.api = n, this.readOnly = s, this.placeholder = this.api.i18n.t(t.placeholder || St.DEFAULT_PLACEHOLDER), this._selectorLanguage = e.lang || t.lang || St.DEFAULT_LANGUAGE, this._selectorTheme = e.theme || t.theme || St.DEFAULT_THEME, this.CSS = { baseClass: this.api.styles.block, input: this.api.styles.input, wrapper: "ce-editorjs-x-shiki", textarea: "ce-editorjs-x-shiki__textarea", span: "ce-editorjs-x-shiki__span", selectorLanguage: "ce-editorjs-x-shiki__selector-language", selectorTheme: "ce-editorjs-x-shiki__selector-theme" }, this.nodes = { holder: null, textarea: null }, this.data = { code: (a = e.code) != null ? a : "", lang: this._selectorLanguage, theme: this._selectorTheme, resizeSize: e.resizeSize || 0 }, this.nodes.holder = this.drawView();
2623
+ this._selectorLanguage = "", this._selectorTheme = "", this.wrapperCopyTip = null, this.api = n, this.readOnly = s, this.placeholder = this.api.i18n.t(t.placeholder || St.DEFAULT_PLACEHOLDER), this._selectorLanguage = e.lang || t.lang || St.DEFAULT_LANGUAGE, this._selectorTheme = e.theme || t.theme || St.DEFAULT_THEME, this.CSS = { baseClass: this.api.styles.block, input: this.api.styles.input, wrapper: "ce-editorjs-x-shiki", textarea: "ce-editorjs-x-shiki__textarea", span: "ce-editorjs-x-shiki__span", selectorLanguage: "ce-editorjs-x-shiki__selector-language", selectorTheme: "ce-editorjs-x-shiki__selector-theme" }, this.nodes = { holder: null, textarea: null }, this.data = { code: (a = e.code) != null ? a : "", lang: this._selectorLanguage, theme: this._selectorTheme, resizeSize: e.resizeSize || 0 }, this.nodes.holder = this.drawView();
2408
2624
  }
2409
2625
  static get isReadOnlySupported() {
2410
2626
  return !0;
@@ -2454,57 +2670,62 @@ class St {
2454
2670
  const t = e.target, n = e.shiftKey, s = t.selectionStart, a = t.value, c = " ";
2455
2671
  let g;
2456
2672
  if (n) {
2457
- const C = function(E, b) {
2458
- let M = "";
2459
- for (; M !== `
2460
- ` && b > 0; ) b -= 1, M = E.substr(b, 1);
2461
- return M === `
2462
- ` && (b += 1), b;
2673
+ const C = function(T, E) {
2674
+ let N = "";
2675
+ for (; N !== `
2676
+ ` && E > 0; )
2677
+ E -= 1, N = T.substr(E, 1);
2678
+ return N === `
2679
+ ` && (E += 1), E;
2463
2680
  }(a, s);
2464
- if (a.substr(C, 2) !== c) return;
2681
+ if (a.substr(C, 2) !== c)
2682
+ return;
2465
2683
  t.value = a.substring(0, C) + a.substring(C + 2), g = s - 2;
2466
- } else g = s + 2, t.value = a.substring(0, s) + c + a.substring(s);
2684
+ } else
2685
+ g = s + 2, t.value = a.substring(0, s) + c + a.substring(s);
2467
2686
  t.setSelectionRange(g, g);
2468
2687
  }
2469
2688
  drawView() {
2470
- const e = document.createElement("div"), t = document.createElement("div"), n = document.createElement("div"), s = document.createElement("div"), a = document.createElement("div"), c = document.createElement("div"), g = document.createElement("select"), C = document.createElement("select"), E = document.createElement("span"), b = document.createElement("textarea"), M = document.createElement("div");
2471
- return M.classList.add("ce-editorjs-x-shiki__code__dragHandler"), e.classList.add(this.CSS.baseClass, this.CSS.wrapper), this.readOnly ? e.classList.add("read-only") : e.classList.add("editable"), t.classList.add("ce-editorjs-x-shiki__code"), n.classList.add("ce-editorjs-x-shiki__selector"), s.classList.add("ce-editorjs-x-shiki__lang"), a.classList.add("ce-editorjs-x-shiki__copy"), c.classList.add("ce-editorjs-x-shiki__copy_tip"), g.classList.add(this.CSS.selectorLanguage), b.classList.add(this.CSS.textarea, this.CSS.input), s.innerHTML = this.data.lang, a.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17.25 8.5H10.25C9.2835 8.5 8.5 9.2835 8.5 10.25V17.25C8.5 18.2165 9.2835 19 10.25 19H17.25C18.2165 19 19 18.2165 19 17.25V10.25C19 9.2835 18.2165 8.5 17.25 8.5Z"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15.5 8.5V6.75C15.5 6.28587 15.3156 5.84075 14.9874 5.51256C14.6592 5.18437 14.2141 5 13.75 5H6.75C6.28587 5 5.84075 5.18437 5.51256 5.51256C5.18437 5.84075 5 6.28587 5 6.75V13.75C5 14.2141 5.18437 14.6592 5.51256 14.9874C5.84075 15.3156 6.28587 15.5 6.75 15.5H8.5"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 12L15.5 12"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 15.5L15.5 15.5"/></svg>', c.innerText = this.api.i18n.t("Copied"), Pn.forEach((A) => {
2472
- const R = document.createElement("option");
2473
- R.value = A.id, R.text = A.name, g.appendChild(R);
2474
- }), g.value = this.data.lang, b.value = this.data.code, b.placeholder = this.placeholder, b.spellcheck = !1, b.autocomplete = "off", b.autocapitalize = "off", this.readOnly && (b.disabled = !0), t.appendChild(E), t.appendChild(b), e.appendChild(M), this.data.resizeSize && this.data.resizeSize > 0 && (t.style.height = this.data.resizeSize + "px"), this.readOnly ? n.appendChild(s) : n.appendChild(g), a.appendChild(c), n.appendChild(a), e.appendChild(n), e.appendChild(t), this.runShiki().then(({ html: A, preStyle: R }) => {
2475
- E.innerHTML = A, e == null || e.setAttribute("style", R), g.setAttribute("style", R), C.setAttribute("style", R);
2476
- }), g.addEventListener("change", (A) => {
2477
- const R = A.target.value;
2478
- this._selectorLanguage = R, this.runShiki().then(({ html: H, preStyle: B }) => {
2479
- E.innerHTML = H, s.innerHTML = R;
2689
+ const e = document.createElement("div"), t = document.createElement("div"), n = document.createElement("div"), s = document.createElement("div"), a = document.createElement("div");
2690
+ this.wrapperCopyTip = document.createElement("div");
2691
+ const c = document.createElement("select"), g = document.createElement("select"), C = document.createElement("span"), T = document.createElement("textarea"), E = document.createElement("div");
2692
+ return E.classList.add("ce-editorjs-x-shiki__code__dragHandler"), e.classList.add(this.CSS.baseClass, this.CSS.wrapper), this.readOnly ? e.classList.add("read-only") : e.classList.add("editable"), t.classList.add("ce-editorjs-x-shiki__code"), n.classList.add("ce-editorjs-x-shiki__selector"), s.classList.add("ce-editorjs-x-shiki__lang"), a.classList.add("ce-editorjs-x-shiki__copy"), this.wrapperCopyTip.classList.add("ce-editorjs-x-shiki__copy_tip"), c.classList.add(this.CSS.selectorLanguage), T.classList.add(this.CSS.textarea, this.CSS.input), s.innerHTML = this.data.lang, a.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17.25 8.5H10.25C9.2835 8.5 8.5 9.2835 8.5 10.25V17.25C8.5 18.2165 9.2835 19 10.25 19H17.25C18.2165 19 19 18.2165 19 17.25V10.25C19 9.2835 18.2165 8.5 17.25 8.5Z"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15.5 8.5V6.75C15.5 6.28587 15.3156 5.84075 14.9874 5.51256C14.6592 5.18437 14.2141 5 13.75 5H6.75C6.28587 5 5.84075 5.18437 5.51256 5.51256C5.18437 5.84075 5 6.28587 5 6.75V13.75C5 14.2141 5.18437 14.6592 5.51256 14.9874C5.84075 15.3156 6.28587 15.5 6.75 15.5H8.5"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 12L15.5 12"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 15.5L15.5 15.5"/></svg>', this.wrapperCopyTip.innerText = this.api.i18n.t("Copied"), Pn.forEach((N) => {
2693
+ const A = document.createElement("option");
2694
+ A.value = N.id, A.text = N.name, c.appendChild(A);
2695
+ }), c.value = this.data.lang, T.value = this.data.code, T.placeholder = this.placeholder, T.spellcheck = !1, T.autocomplete = "off", T.autocapitalize = "off", this.readOnly && (T.disabled = !0), t.appendChild(C), t.appendChild(T), e.appendChild(E), this.data.resizeSize && this.data.resizeSize > 0 && (t.style.height = this.data.resizeSize + "px"), this.readOnly ? n.appendChild(s) : n.appendChild(c), a.appendChild(this.wrapperCopyTip), n.appendChild(a), e.appendChild(n), e.appendChild(t), this.runShiki().then(({ html: N, preStyle: A }) => {
2696
+ C.innerHTML = N, e == null || e.setAttribute("style", A), c.setAttribute("style", A), g.setAttribute("style", A);
2697
+ }), c.addEventListener("change", (N) => {
2698
+ const A = N.target.value;
2699
+ this._selectorLanguage = A, this.runShiki().then(({ html: M, preStyle: H }) => {
2700
+ C.innerHTML = M, s.innerHTML = A;
2480
2701
  });
2481
- }), C.addEventListener("change", (A) => {
2482
- const R = A.target.value;
2483
- this._selectorTheme = R, this.runShiki().then(({ html: H, preStyle: B }) => {
2484
- E.innerHTML = H, e == null || e.setAttribute("style", B), g.setAttribute("style", B), C.setAttribute("style", B);
2702
+ }), g.addEventListener("change", (N) => {
2703
+ const A = N.target.value;
2704
+ this._selectorTheme = A, this.runShiki().then(({ html: M, preStyle: H }) => {
2705
+ C.innerHTML = M, e == null || e.setAttribute("style", H), c.setAttribute("style", H), g.setAttribute("style", H);
2485
2706
  });
2486
- }), b.addEventListener("input", () => {
2487
- this.data.code = b.value, this.runShiki().then(({ html: A, preStyle: R }) => {
2488
- E.innerHTML = A, e == null || e.setAttribute("style", R), g.setAttribute("style", R), C.setAttribute("style", R);
2707
+ }), T.addEventListener("input", () => {
2708
+ this.data.code = T.value, this.runShiki().then(({ html: N, preStyle: A }) => {
2709
+ C.innerHTML = N, e == null || e.setAttribute("style", A), c.setAttribute("style", A), g.setAttribute("style", A);
2489
2710
  });
2490
- }), b.addEventListener("keydown", (A) => {
2491
- A.code === "Tab" && (this.tabHandler(A), this.data.code = b.value, this.runShiki().then(({ html: R, preStyle: H }) => {
2492
- E.innerHTML = R;
2711
+ }), T.addEventListener("keydown", (N) => {
2712
+ N.code === "Tab" && (this.tabHandler(N), this.data.code = T.value, this.runShiki().then(({ html: A, preStyle: M }) => {
2713
+ C.innerHTML = A;
2493
2714
  }));
2494
- }), b.addEventListener("scroll", () => {
2495
- E.style = `display:block;transform: translateY(-${b.scrollTop}px)`;
2496
- }), a.addEventListener("click", (A) => {
2497
- this.copyCode(this.data.code, A);
2498
- }), M.addEventListener("mousedown", (A) => {
2499
- this.resizeClick(t, A);
2500
- }), this.nodes.textarea = b, e;
2715
+ }), T.addEventListener("scroll", () => {
2716
+ C.style = `display:block;transform: translateY(-${T.scrollTop}px)`;
2717
+ }), a.addEventListener("click", (N) => {
2718
+ this.copyCode(this.data.code, N);
2719
+ }), E.addEventListener("mousedown", (N) => {
2720
+ this.resizeClick(t, N);
2721
+ }), this.nodes.textarea = T, e;
2501
2722
  }
2502
2723
  resizeClick(e, t) {
2503
2724
  let n = t.clientY, s = parseInt(window.getComputedStyle(e).height, 10);
2504
2725
  const a = (g) => {
2505
2726
  const C = g.clientY - n;
2506
- let E = s + C;
2507
- E < 60 && (E = 60), e.style.height = E + "px";
2727
+ let T = s + C;
2728
+ T < 60 && (T = 60), e.style.height = T + "px";
2508
2729
  }, c = () => {
2509
2730
  const g = parseInt(window.getComputedStyle(e).height, 10);
2510
2731
  this.data.resizeSize = g, document.removeEventListener("mousemove", a), document.removeEventListener("mouseup", c);
@@ -2513,44 +2734,42 @@ class St {
2513
2734
  }
2514
2735
  async runShiki() {
2515
2736
  let e = "";
2516
- return { html: await zn(this.data.code, { lang: this._selectorLanguage, theme: this._selectorTheme, transformers: [{ preprocess: (t) => `${t}`, pre(t) {
2517
- var n;
2518
- this.addClassToHast(t, "ce-editorjs-x-shiki__span"), e = ((n = t.properties) == null ? void 0 : n.style) || "";
2519
- }, line(t, n) {
2520
- t.properties = t.properties || {}, t.properties["data-line"] = n;
2737
+ return { html: await zn(this.data.code, { lang: this._selectorLanguage, theme: this._selectorTheme, transformers: [{ preprocess: (n) => `${n}`, pre(n) {
2738
+ var s;
2739
+ this.addClassToHast(n, "ce-editorjs-x-shiki__span"), e = ((s = n.properties) == null ? void 0 : s.style) || "";
2740
+ }, line(n, s) {
2741
+ n.properties = n.properties || {}, n.properties["data-line"] = s;
2521
2742
  } }] }), preStyle: e };
2522
2743
  }
2523
- showCopyTip(e, t) {
2524
- const n = this.api.i18n.t(e);
2525
- if (t.target) {
2526
- const s = t.target.parentElement;
2527
- if (s) {
2528
- const a = s.lastChild;
2529
- a && (a.innerHTML = n, a.classList.add("visible"), setTimeout(() => {
2530
- a.classList.remove("visible");
2531
- }, 2e3));
2532
- }
2533
- }
2744
+ showCopyTip(e) {
2745
+ var n;
2746
+ const t = this.api.i18n.t(e);
2747
+ this.wrapperCopyTip.innerHTML = t, (n = this.wrapperCopyTip) == null || n.classList.add("visible"), setTimeout(() => {
2748
+ var s;
2749
+ (s = this.wrapperCopyTip) == null || s.classList.remove("visible");
2750
+ }, 2e3);
2534
2751
  }
2535
2752
  copyCode(e, t) {
2536
- if (this.data.code) if (navigator.clipboard && window.isSecureContext) try {
2537
- navigator.clipboard.writeText(e).then(() => {
2538
- this.showCopyTip("Copied", t);
2539
- }).catch((n) => {
2540
- this.showCopyTip("Unable to copy", t);
2541
- });
2542
- } catch (n) {
2543
- this.showCopyTip("Unable to copy", t);
2544
- }
2545
- else {
2546
- const n = document.createElement("textarea");
2547
- n.value = e, n.style.top = "0", n.style.left = "0", n.style.position = "fixed", n.style.opacity = "0", n.style.pointerEvents = "none", n.style.zIndex = "-1000", document.body.appendChild(n), n.focus(), n.select();
2548
- try {
2549
- document.execCommand("copy"), document.body.removeChild(n), this.showCopyTip("Copied", t);
2550
- } catch (s) {
2551
- this.showCopyTip("Unable to copy", t), document.body.removeChild(n);
2753
+ if (this.data.code)
2754
+ if (navigator.clipboard && window.isSecureContext)
2755
+ try {
2756
+ navigator.clipboard.writeText(e).then(() => {
2757
+ this.showCopyTip("Copied");
2758
+ }).catch((n) => {
2759
+ this.showCopyTip("Unable to copy");
2760
+ });
2761
+ } catch (n) {
2762
+ this.showCopyTip("Unable to copy");
2763
+ }
2764
+ else {
2765
+ const n = document.createElement("textarea");
2766
+ n.value = e, n.style.top = "0", n.style.left = "0", n.style.position = "fixed", n.style.opacity = "0", n.style.pointerEvents = "none", n.style.zIndex = "-1000", document.body.appendChild(n), n.focus(), n.select();
2767
+ try {
2768
+ document.execCommand("copy"), document.body.removeChild(n), this.showCopyTip("Copied");
2769
+ } catch (s) {
2770
+ this.showCopyTip("Unable to copy"), document.body.removeChild(n);
2771
+ }
2552
2772
  }
2553
- }
2554
2773
  }
2555
2774
  }
2556
2775
  class Zn {
@@ -2578,8 +2797,8 @@ class Zn {
2578
2797
  return { baseClass: this.api.styles.block, wrapper: "cdx-quote", text: "cdx-quote__text", input: this.api.styles.input };
2579
2798
  }
2580
2799
  render() {
2581
- const e = Re("div", [this._CSS.baseClass, this._CSS.wrapper]);
2582
- return this._quoteElement = Re("blockquote", [this._CSS.input, this._CSS.text, "cdx-block-quote"], { contentEditable: !this.readOnly, innerHTML: this._data.text }), this._quoteElement.addEventListener("keydown", (t) => this.handleKeydown(t)), e.appendChild(this._quoteElement), e;
2800
+ const e = xe("div", [this._CSS.baseClass, this._CSS.wrapper]);
2801
+ return this._quoteElement = xe("blockquote", [this._CSS.input, this._CSS.text, "cdx-block-quote"], { contentEditable: !this.readOnly, innerHTML: this._data.text }), this._quoteElement.addEventListener("keydown", (t) => this.handleKeydown(t)), e.appendChild(this._quoteElement), e;
2583
2802
  }
2584
2803
  get currentItem() {
2585
2804
  let e = window.getSelection().anchorNode;
@@ -2630,20 +2849,20 @@ class Jn {
2630
2849
  this.data = {};
2631
2850
  }
2632
2851
  }
2633
- const Te = "cdx-list", ke = { wrapper: Te, item: `${Te}__item`, itemContent: `${Te}__item-content`, itemChildren: `${Te}__item-children` };
2852
+ const Se = "cdx-list", ke = { wrapper: Se, item: `${Se}__item`, itemContent: `${Se}__item-content`, itemChildren: `${Se}__item-children` };
2634
2853
  class Fe {
2635
2854
  static get CSS() {
2636
- return { ...ke, orderedList: `${Te}-ordered` };
2855
+ return { ...ke, orderedList: `${Se}-ordered` };
2637
2856
  }
2638
2857
  constructor(e, t) {
2639
2858
  this.config = t, this.readOnly = e;
2640
2859
  }
2641
2860
  renderWrapper(e) {
2642
2861
  let t;
2643
- return t = Re("ol", e === !0 ? [Fe.CSS.wrapper, Fe.CSS.orderedList] : [Fe.CSS.orderedList, Fe.CSS.itemChildren]), this.readOnly || t.setAttribute("contenteditable", "true"), t;
2862
+ return t = xe("ol", e === !0 ? [Fe.CSS.wrapper, Fe.CSS.orderedList] : [Fe.CSS.orderedList, Fe.CSS.itemChildren]), this.readOnly || t.setAttribute("contenteditable", "true"), t;
2644
2863
  }
2645
2864
  renderItem(e, t) {
2646
- const n = Re("li", Fe.CSS.item), s = Re("div", Fe.CSS.itemContent, { innerHTML: e });
2865
+ const n = xe("li", Fe.CSS.item), s = xe("div", Fe.CSS.itemContent, { innerHTML: e });
2647
2866
  return n.appendChild(s), n;
2648
2867
  }
2649
2868
  getItemContent(e) {
@@ -2659,17 +2878,17 @@ class Fe {
2659
2878
  }
2660
2879
  class Ue {
2661
2880
  static get CSS() {
2662
- return { ...ke, unorderedList: `${Te}-unordered` };
2881
+ return { ...ke, unorderedList: `${Se}-unordered` };
2663
2882
  }
2664
2883
  constructor(e, t) {
2665
2884
  this.config = t, this.readOnly = e;
2666
2885
  }
2667
2886
  renderWrapper(e) {
2668
2887
  let t;
2669
- return t = Re("ul", e === !0 ? [Ue.CSS.wrapper, Ue.CSS.unorderedList] : [Ue.CSS.unorderedList, Ue.CSS.itemChildren]), this.readOnly || t.setAttribute("contenteditable", "true"), t;
2888
+ return t = xe("ul", e === !0 ? [Ue.CSS.wrapper, Ue.CSS.unorderedList] : [Ue.CSS.unorderedList, Ue.CSS.itemChildren]), this.readOnly || t.setAttribute("contenteditable", "true"), t;
2670
2889
  }
2671
2890
  renderItem(e, t) {
2672
- const n = Re("li", Ue.CSS.item), s = Re("div", Ue.CSS.itemContent, { innerHTML: e });
2891
+ const n = xe("li", Ue.CSS.item), s = xe("div", Ue.CSS.itemContent, { innerHTML: e });
2673
2892
  return n.appendChild(s), n;
2674
2893
  }
2675
2894
  getItemContent(e) {
@@ -2688,23 +2907,23 @@ function rt(_) {
2688
2907
  }
2689
2908
  class me {
2690
2909
  static get CSS() {
2691
- return { ...ke, checklist: `${Te}-checklist`, itemChecked: `${Te}__checkbox--checked`, noHover: `${Te}__checkbox--no-hover`, checkbox: `${Te}__checkbox-check`, checkboxContainer: `${Te}__checkbox`, checkboxCheckDisabled: `${Te}__checkbox-check--disabled` };
2910
+ return { ...ke, checklist: `${Se}-checklist`, itemChecked: `${Se}__checkbox--checked`, noHover: `${Se}__checkbox--no-hover`, checkbox: `${Se}__checkbox-check`, checkboxContainer: `${Se}__checkbox`, checkboxCheckDisabled: `${Se}__checkbox-check--disabled` };
2692
2911
  }
2693
2912
  constructor(e, t) {
2694
2913
  this.config = t, this.readOnly = e;
2695
2914
  }
2696
2915
  renderWrapper(e) {
2697
2916
  let t;
2698
- return e === !0 ? (t = Re("ul", [me.CSS.wrapper, me.CSS.checklist]), t.addEventListener("click", (n) => {
2917
+ return e === !0 ? (t = xe("ul", [me.CSS.wrapper, me.CSS.checklist]), t.addEventListener("click", (n) => {
2699
2918
  const s = n.target;
2700
2919
  if (s) {
2701
2920
  const a = s.closest(`.${me.CSS.checkboxContainer}`);
2702
2921
  a && a.contains(s) && this.toggleCheckbox(a);
2703
2922
  }
2704
- })) : t = Re("ul", [me.CSS.checklist, me.CSS.itemChildren]), this.readOnly || t.setAttribute("contenteditable", "true"), t;
2923
+ })) : t = xe("ul", [me.CSS.checklist, me.CSS.itemChildren]), this.readOnly || t.setAttribute("contenteditable", "true"), t;
2705
2924
  }
2706
2925
  renderItem(e, t) {
2707
- const n = Re("li", [me.CSS.item, me.CSS.item]), s = Re("div", me.CSS.itemContent, { innerHTML: e }), a = Re("span", me.CSS.checkbox), c = Re("div", me.CSS.checkboxContainer);
2926
+ const n = xe("li", [me.CSS.item, me.CSS.item]), s = xe("div", me.CSS.itemContent, { innerHTML: e }), a = xe("span", me.CSS.checkbox), c = xe("div", me.CSS.checkboxContainer);
2708
2927
  return t.checked === !0 && c.classList.add(me.CSS.itemChecked), this.readOnly && c.classList.add(me.CSS.checkboxCheckDisabled), a.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M7 12L10.4884 15.8372C10.5677 15.9245 10.705 15.9245 10.7844 15.8372L17 9"/></svg>', c.appendChild(a), n.appendChild(c), n.appendChild(s), n;
2709
2928
  }
2710
2929
  getItemContent(e) {
@@ -2725,7 +2944,7 @@ class me {
2725
2944
  e.classList.remove(me.CSS.noHover);
2726
2945
  }
2727
2946
  }
2728
- function It(_, e = "after") {
2947
+ function Ht(_, e = "after") {
2729
2948
  const t = [];
2730
2949
  let n;
2731
2950
  function s(a) {
@@ -2736,7 +2955,8 @@ function It(_, e = "after") {
2736
2955
  return a.previousElementSibling;
2737
2956
  }
2738
2957
  }
2739
- for (n = s(_); n !== null; ) t.push(n), n = s(n);
2958
+ for (n = s(_); n !== null; )
2959
+ t.push(n), n = s(n);
2740
2960
  return t.length !== 0 ? t : null;
2741
2961
  }
2742
2962
  function Ke(_, e = !0) {
@@ -2746,29 +2966,32 @@ function Ke(_, e = !0) {
2746
2966
  function lt(_) {
2747
2967
  return _.querySelector(`.${ke.itemChildren}`);
2748
2968
  }
2749
- function Ht(_) {
2969
+ function Bt(_) {
2750
2970
  let e = _;
2751
2971
  _.classList.contains(ke.item) && (e = lt(_)), e !== null && Ke(e).length === 0 && e.remove();
2752
2972
  }
2753
- function Ut(_) {
2973
+ function $t(_) {
2754
2974
  return _.querySelector(`.${ke.itemContent}`);
2755
2975
  }
2756
2976
  function ut(_, e = !0) {
2757
- const t = Ut(_);
2977
+ const t = $t(_);
2758
2978
  t && Bn(t, e);
2759
2979
  }
2760
- class Bt {
2980
+ class Dt {
2761
2981
  get currentItem() {
2762
2982
  const e = window.getSelection();
2763
- if (!e) return null;
2983
+ if (!e)
2984
+ return null;
2764
2985
  let t = e.anchorNode;
2765
2986
  return t ? (rt(t) || (t = t.parentNode), t && rt(t) ? t.closest(`.${ke.item}`) : null) : null;
2766
2987
  }
2767
2988
  get currentItemLevel() {
2768
2989
  const e = this.currentItem;
2769
- if (e === null) return null;
2990
+ if (e === null)
2991
+ return null;
2770
2992
  let t = e.parentNode, n = 0;
2771
- for (; t !== null && t !== this.listWrapper; ) rt(t) && t.classList.contains(ke.item) && (n += 1), t = t.parentNode;
2993
+ for (; t !== null && t !== this.listWrapper; )
2994
+ rt(t) && t.classList.contains(ke.item) && (n += 1), t = t.parentNode;
2772
2995
  return n + 1;
2773
2996
  }
2774
2997
  constructor({ data: e, config: t, api: n, readOnly: s, block: a }, c) {
@@ -2800,10 +3023,12 @@ class Bt {
2800
3023
  return { tags: ["OL", "UL", "LI"] };
2801
3024
  }
2802
3025
  merge(e) {
2803
- const t = this.block.holder.querySelectorAll(`.${ke.item}`), n = t[t.length - 1], s = Ut(n);
2804
- if (n === null || s === null || (s.insertAdjacentHTML("beforeend", e.items[0].content), this.listWrapper === void 0)) return;
3026
+ const t = this.block.holder.querySelectorAll(`.${ke.item}`), n = t[t.length - 1], s = $t(n);
3027
+ if (n === null || s === null || (s.insertAdjacentHTML("beforeend", e.items[0].content), this.listWrapper === void 0))
3028
+ return;
2805
3029
  const a = Ke(this.listWrapper);
2806
- if (a.length === 0) return;
3030
+ if (a.length === 0)
3031
+ return;
2807
3032
  let c = lt(a[a.length - 1]);
2808
3033
  const g = e.items.shift();
2809
3034
  g !== void 0 && (g.items.length !== 0 && (c === null && (c = this.renderer.renderWrapper(!1)), this.appendItems(g.items, c)), e.items.length > 0 && this.appendItems(e.items, this.listWrapper));
@@ -2828,9 +3053,9 @@ class Bt {
2828
3053
  const a = { style: s, meta: {}, items: [] };
2829
3054
  s === "ordered" && (this.data.meta.counterType = "numeric", this.data.meta.start = 1);
2830
3055
  const c = (g) => Array.from(g.querySelectorAll(":scope > li")).map((C) => {
2831
- var M;
2832
- const E = C.querySelector(`:scope > ${n}`), b = E ? c(E) : [];
2833
- return { content: (M = C.innerHTML) != null ? M : "", meta: {}, items: b };
3056
+ var N;
3057
+ const T = C.querySelector(`:scope > ${n}`), E = T ? c(T) : [];
3058
+ return { content: (N = C.innerHTML) != null ? N : "", meta: {}, items: E };
2834
3059
  });
2835
3060
  return a.items = c(e), a;
2836
3061
  }
@@ -2843,11 +3068,13 @@ class Bt {
2843
3068
  enterPressed(e) {
2844
3069
  var g;
2845
3070
  const t = this.currentItem;
2846
- if (e.stopPropagation(), e.preventDefault(), e.isComposing || t === null) return;
3071
+ if (e.stopPropagation(), e.preventDefault(), e.isComposing || t === null)
3072
+ return;
2847
3073
  const n = ((g = this.renderer) == null ? void 0 : g.getItemContent(t).trim().length) === 0, s = t.parentNode === this.listWrapper, a = t.previousElementSibling === null, c = this.api.blocks.getCurrentBlockIndex();
2848
- if (s && n) return t.nextElementSibling !== null || function(C) {
2849
- return C.querySelector(`.${ke.itemChildren}`) !== null;
2850
- }(t) ? void this.splitList(t) : void (a ? this.convertItemToDefaultBlock(c, !0) : this.convertItemToDefaultBlock());
3074
+ if (s && n)
3075
+ return t.nextElementSibling !== null || function(C) {
3076
+ return C.querySelector(`.${ke.itemChildren}`) !== null;
3077
+ }(t) ? void this.splitList(t) : void (a ? this.convertItemToDefaultBlock(c, !0) : this.convertItemToDefaultBlock());
2851
3078
  n ? this.unshiftItem(t) : this.splitItem(t);
2852
3079
  }
2853
3080
  backspace(e) {
@@ -2859,15 +3086,18 @@ class Bt {
2859
3086
  e.stopPropagation(), e.preventDefault(), this.currentItem !== null && this.unshiftItem(this.currentItem);
2860
3087
  }
2861
3088
  unshiftItem(e) {
2862
- if (!e.parentNode || !rt(e.parentNode)) return;
3089
+ if (!e.parentNode || !rt(e.parentNode))
3090
+ return;
2863
3091
  const t = e.parentNode.closest(`.${ke.item}`);
2864
- if (!t) return;
3092
+ if (!t)
3093
+ return;
2865
3094
  let n = lt(e);
2866
- if (e.parentElement === null) return;
2867
- const s = It(e);
3095
+ if (e.parentElement === null)
3096
+ return;
3097
+ const s = Ht(e);
2868
3098
  s !== null && (n === null && (n = this.renderer.renderWrapper(!1)), s.forEach((a) => {
2869
3099
  n.appendChild(a);
2870
- }), e.appendChild(n)), t.after(e), ut(e, !1), Ht(t);
3100
+ }), e.appendChild(n)), t.after(e), ut(e, !1), Bt(t);
2871
3101
  }
2872
3102
  splitList(e) {
2873
3103
  const t = Ke(e), n = this.block, s = this.api.blocks.getCurrentBlockIndex();
@@ -2875,9 +3105,11 @@ class Bt {
2875
3105
  const C = t[0];
2876
3106
  this.unshiftItem(C), ut(e, !1);
2877
3107
  }
2878
- if (e.previousElementSibling === null && e.parentNode === this.listWrapper) return void this.convertItemToDefaultBlock(s);
2879
- const a = It(e);
2880
- if (a === null) return;
3108
+ if (e.previousElementSibling === null && e.parentNode === this.listWrapper)
3109
+ return void this.convertItemToDefaultBlock(s);
3110
+ const a = Ht(e);
3111
+ if (a === null)
3112
+ return;
2881
3113
  const c = this.renderer.renderWrapper(!0);
2882
3114
  a.forEach((C) => {
2883
3115
  c.appendChild(C);
@@ -2887,47 +3119,57 @@ class Bt {
2887
3119
  }
2888
3120
  splitItem(e) {
2889
3121
  const [t] = Dn();
2890
- if (t === null) return;
3122
+ if (t === null)
3123
+ return;
2891
3124
  const n = this.renderItem(null);
2892
3125
  e == null || e.after(n), ut(n);
2893
3126
  }
2894
3127
  mergeItemWithPrevious(e) {
2895
- var M;
3128
+ var N;
2896
3129
  const t = e.previousElementSibling, n = e.parentNode;
2897
- if (n === null || !rt(n)) return;
3130
+ if (n === null || !rt(n))
3131
+ return;
2898
3132
  const s = n.closest(`.${ke.item}`);
2899
- if (!t && !s || t && !rt(t)) return;
3133
+ if (!t && !s || t && !rt(t))
3134
+ return;
2900
3135
  let a;
2901
3136
  if (t) {
2902
3137
  const A = Ke(t, !1);
2903
3138
  a = A.length !== 0 && A.length !== 0 ? A[A.length - 1] : t;
2904
- } else a = s;
3139
+ } else
3140
+ a = s;
2905
3141
  const c = this.renderer.getItemContent(e);
2906
- if (!a) return;
3142
+ if (!a)
3143
+ return;
2907
3144
  ut(a, !1);
2908
- const g = Ut(a);
2909
- if (g === null) return;
3145
+ const g = $t(a);
3146
+ if (g === null)
3147
+ return;
2910
3148
  g.insertAdjacentHTML("beforeend", c);
2911
3149
  const C = Ke(e);
2912
- if (C.length === 0) return e.remove(), void Ht(a);
2913
- const E = t || s, b = (M = lt(E)) != null ? M : this.renderer.renderWrapper(!1);
3150
+ if (C.length === 0)
3151
+ return e.remove(), void Bt(a);
3152
+ const T = t || s, E = (N = lt(T)) != null ? N : this.renderer.renderWrapper(!1);
2914
3153
  t ? C.forEach((A) => {
2915
- b.appendChild(A);
3154
+ E.appendChild(A);
2916
3155
  }) : C.forEach((A) => {
2917
- b.prepend(A);
2918
- }), lt(E) === null && a.appendChild(b), e.remove();
3156
+ E.prepend(A);
3157
+ }), lt(T) === null && a.appendChild(E), e.remove();
2919
3158
  }
2920
3159
  addTab(e) {
2921
3160
  var a;
2922
3161
  e.stopPropagation(), e.preventDefault();
2923
3162
  const t = this.currentItem;
2924
- if (!t) return;
3163
+ if (!t)
3164
+ return;
2925
3165
  if (((a = this.config) == null ? void 0 : a.maxLevel) !== void 0) {
2926
3166
  const c = this.currentItemLevel;
2927
- if (c !== null && c === this.config.maxLevel) return;
3167
+ if (c !== null && c === this.config.maxLevel)
3168
+ return;
2928
3169
  }
2929
3170
  const n = t.previousSibling;
2930
- if (n === null || !rt(n)) return;
3171
+ if (n === null || !rt(n))
3172
+ return;
2931
3173
  const s = lt(n);
2932
3174
  if (s)
2933
3175
  s.appendChild(t), Ke(t).forEach((c) => {
@@ -2939,7 +3181,7 @@ class Bt {
2939
3181
  c.appendChild(g);
2940
3182
  }), n.appendChild(c);
2941
3183
  }
2942
- Ht(t), ut(t, !1);
3184
+ Bt(t), ut(t, !1);
2943
3185
  }
2944
3186
  convertItemToDefaultBlock(e, t) {
2945
3187
  let n;
@@ -2948,13 +3190,14 @@ class Bt {
2948
3190
  }
2949
3191
  convertFirstItemToDefaultBlock() {
2950
3192
  const e = this.currentItem;
2951
- if (e === null) return;
3193
+ if (e === null)
3194
+ return;
2952
3195
  const t = Ke(e);
2953
3196
  if (t.length !== 0) {
2954
3197
  const c = t[0];
2955
3198
  this.unshiftItem(c), ut(e);
2956
3199
  }
2957
- const n = It(e), s = this.api.blocks.getCurrentBlockIndex(), a = n === null;
3200
+ const n = Ht(e), s = this.api.blocks.getCurrentBlockIndex(), a = n === null;
2958
3201
  this.convertItemToDefaultBlock(s, a);
2959
3202
  }
2960
3203
  renderItem(e, t) {
@@ -2976,8 +3219,8 @@ class Bt {
2976
3219
  });
2977
3220
  }
2978
3221
  }
2979
- const pt = { wrapper: `${Te}-start-with-field`, input: `${Te}-start-with-field__input`, startWithElementWrapperInvalid: `${Te}-start-with-field--invalid` }, bt = /* @__PURE__ */ new Map([["Numeric", "numeric"], ["Lower Roman", "lower-roman"], ["Upper Roman", "upper-roman"], ["Lower Alpha", "lower-alpha"], ["Upper Alpha", "upper-alpha"]]), cn = /* @__PURE__ */ new Map([["numeric", '<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10 14.2L10 7.4135C10 7.32872 9.90111 7.28241 9.83598 7.33668L7 9.7" stroke="black" stroke-width="1.6" stroke-linecap="round"/><path d="M13.2087 14.2H13.2" stroke="black" stroke-width="1.6" stroke-linecap="round"/></svg>'], ["lower-roman", '<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M13.2087 14.2H13.2" stroke="black" stroke-width="1.6" stroke-linecap="round"/><path d="M10 14.2L10 9.5" stroke="black" stroke-width="1.6" stroke-linecap="round"/><path d="M10 7.01L10 7" stroke="black" stroke-width="1.8" stroke-linecap="round"/></svg>'], ["upper-roman", '<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M13.2087 14.2H13.2" stroke="black" stroke-width="1.6" stroke-linecap="round"/><path d="M10 14.2L10 7.2" stroke="black" stroke-width="1.6" stroke-linecap="round"/></svg>'], ["lower-alpha", '<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M14.2087 14.2H14.2" stroke="black" stroke-width="1.6" stroke-linecap="round"/><path d="M11.5 14.5C11.5 14.5 11 13.281 11 12.5M7 9.5C7 9.5 7.5 8.5 9 8.5C10.5 8.5 11 9.5 11 10.5L11 11.5M11 11.5L11 12.5M11 11.5C11 11.5 7 11 7 13C7 15.3031 11 15 11 12.5" stroke="black" stroke-width="1.6" stroke-linecap="round"/></svg>'], ["upper-alpha", '<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M16.0087 14.2H16" stroke="black" stroke-width="1.6" stroke-linecap="round"/><path d="M7 14.2L7.78865 12M13 14.2L12.1377 12M7.78865 12C7.78865 12 9.68362 7 10 7C10.3065 7 12.1377 12 12.1377 12M7.78865 12L12.1377 12" stroke="black" stroke-width="1.6" stroke-linecap="round"/></svg>']]);
2980
- class Rt {
3222
+ const pt = { wrapper: `${Se}-start-with-field`, input: `${Se}-start-with-field__input`, startWithElementWrapperInvalid: `${Se}-start-with-field--invalid` }, bt = /* @__PURE__ */ new Map([["Numeric", "numeric"], ["Lower Roman", "lower-roman"], ["Upper Roman", "upper-roman"], ["Lower Alpha", "lower-alpha"], ["Upper Alpha", "upper-alpha"]]), cn = /* @__PURE__ */ new Map([["numeric", '<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10 14.2L10 7.4135C10 7.32872 9.90111 7.28241 9.83598 7.33668L7 9.7" stroke="black" stroke-width="1.6" stroke-linecap="round"/><path d="M13.2087 14.2H13.2" stroke="black" stroke-width="1.6" stroke-linecap="round"/></svg>'], ["lower-roman", '<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M13.2087 14.2H13.2" stroke="black" stroke-width="1.6" stroke-linecap="round"/><path d="M10 14.2L10 9.5" stroke="black" stroke-width="1.6" stroke-linecap="round"/><path d="M10 7.01L10 7" stroke="black" stroke-width="1.8" stroke-linecap="round"/></svg>'], ["upper-roman", '<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M13.2087 14.2H13.2" stroke="black" stroke-width="1.6" stroke-linecap="round"/><path d="M10 14.2L10 7.2" stroke="black" stroke-width="1.6" stroke-linecap="round"/></svg>'], ["lower-alpha", '<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M14.2087 14.2H14.2" stroke="black" stroke-width="1.6" stroke-linecap="round"/><path d="M11.5 14.5C11.5 14.5 11 13.281 11 12.5M7 9.5C7 9.5 7.5 8.5 9 8.5C10.5 8.5 11 9.5 11 10.5L11 11.5M11 11.5L11 12.5M11 11.5C11 11.5 7 11 7 13C7 15.3031 11 15 11 12.5" stroke="black" stroke-width="1.6" stroke-linecap="round"/></svg>'], ["upper-alpha", '<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M16.0087 14.2H16" stroke="black" stroke-width="1.6" stroke-linecap="round"/><path d="M7 14.2L7.78865 12M13 14.2L12.1377 12M7.78865 12C7.78865 12 9.68362 7 10 7C10.3065 7 12.1377 12 12.1377 12M7.78865 12L12.1377 12" stroke="black" stroke-width="1.6" stroke-linecap="round"/></svg>']]);
3223
+ class Nt {
2981
3224
  static get isReadOnlySupported() {
2982
3225
  return !0;
2983
3226
  }
@@ -2991,7 +3234,7 @@ class Rt {
2991
3234
  return { tags: ["OL", "UL", "LI"] };
2992
3235
  }
2993
3236
  static get conversionConfig() {
2994
- return { export: (e) => Rt.joinRecursive(e), import: (e, t) => ({ meta: {}, items: [{ content: e, meta: {}, items: [] }], style: (t == null ? void 0 : t.defaultStyle) !== void 0 ? t.defaultStyle : "unordered" }) };
3237
+ return { export: (e) => Nt.joinRecursive(e), import: (e, t) => ({ meta: {}, items: [{ content: e, meta: {}, items: [] }], style: (t == null ? void 0 : t.defaultStyle) !== void 0 ? t.defaultStyle : "unordered" }) };
2995
3238
  }
2996
3239
  get listStyle() {
2997
3240
  return this.data.style || this.defaultListStyle;
@@ -3007,22 +3250,22 @@ class Rt {
3007
3250
  this.api = n, this.readOnly = s, this.config = t, this.block = a, this.defaultListStyle = ((g = this.config) == null ? void 0 : g.defaultStyle) || "unordered", this.defaultCounterTypes = this.config.counterTypes || Array.from(bt.values());
3008
3251
  const c = { style: this.defaultListStyle, meta: {}, items: [] };
3009
3252
  this.data = Object.keys(e).length ? function(C) {
3010
- const E = [];
3011
- return function(b) {
3012
- return typeof b.items[0] == "string";
3013
- }(C) ? (C.items.forEach((b) => {
3014
- E.push({ content: b, meta: {}, items: [] });
3015
- }), { style: C.style, meta: {}, items: E }) : function(b) {
3016
- return typeof b.items[0] != "string" && "text" in b.items[0] && "checked" in b.items[0] && typeof b.items[0].text == "string" && typeof b.items[0].checked == "boolean";
3017
- }(C) ? (C.items.forEach((b) => {
3018
- E.push({ content: b.text, meta: { checked: b.checked }, items: [] });
3019
- }), { style: "checklist", meta: {}, items: E }) : function(b) {
3020
- return !("meta" in b);
3253
+ const T = [];
3254
+ return function(E) {
3255
+ return typeof E.items[0] == "string";
3256
+ }(C) ? (C.items.forEach((E) => {
3257
+ T.push({ content: E, meta: {}, items: [] });
3258
+ }), { style: C.style, meta: {}, items: T }) : function(E) {
3259
+ return typeof E.items[0] != "string" && "text" in E.items[0] && "checked" in E.items[0] && typeof E.items[0].text == "string" && typeof E.items[0].checked == "boolean";
3260
+ }(C) ? (C.items.forEach((E) => {
3261
+ T.push({ content: E.text, meta: { checked: E.checked }, items: [] });
3262
+ }), { style: "checklist", meta: {}, items: T }) : function(E) {
3263
+ return !("meta" in E);
3021
3264
  }(C) ? { style: C.style, meta: {}, items: C.items } : structuredClone(C);
3022
3265
  }(e) : c, this.listStyle === "ordered" && this.data.meta.counterType === void 0 && (this.data.meta.counterType = "numeric"), this.changeTabulatorByStyle();
3023
3266
  }
3024
3267
  static joinRecursive(e) {
3025
- return e.items.map((t) => `${t.content} ${Rt.joinRecursive(t)}`).join("");
3268
+ return e.items.map((t) => `${t.content} ${Nt.joinRecursive(t)}`).join("");
3026
3269
  }
3027
3270
  render() {
3028
3271
  return this.listElement = this.list.render(), this.listElement;
@@ -3035,21 +3278,22 @@ class Rt {
3035
3278
  }
3036
3279
  renderSettings() {
3037
3280
  var t;
3038
- const e = [{ label: this.api.i18n.t("Unordered"), icon: rn, closeOnActivate: !0, isActive: this.listStyle == "unordered", onActivate: () => {
3281
+ const e = [{ label: this.api.i18n.t("Unordered"), icon: rn, closeOnActivate: !0, isActive: this.listStyle == "unordered", hint: { title: this.api.i18n.t("Convert to Unordered") }, onActivate: () => {
3039
3282
  this.listStyle = "unordered";
3040
- } }, { label: this.api.i18n.t("Ordered"), icon: on, closeOnActivate: !0, isActive: this.listStyle == "ordered", onActivate: () => {
3283
+ } }, { label: this.api.i18n.t("Ordered"), icon: on, closeOnActivate: !0, isActive: this.listStyle == "ordered", hint: { title: this.api.i18n.t("Convert to Ordered") }, onActivate: () => {
3041
3284
  this.listStyle = "ordered";
3042
- } }, { label: this.api.i18n.t("Checklist"), icon: tn, closeOnActivate: !0, isActive: this.listStyle == "checklist", onActivate: () => {
3285
+ } }, { label: this.api.i18n.t("Checklist"), icon: tn, closeOnActivate: !0, isActive: this.listStyle == "checklist", hint: { title: this.api.i18n.t("Convert to Checklist") }, onActivate: () => {
3043
3286
  this.listStyle = "checklist";
3044
3287
  } }];
3045
3288
  if (this.listStyle === "ordered") {
3046
- const n = function(c, g, { value: C, placeholder: E, attributes: b, sanitize: M }) {
3047
- const A = Tt.make("div", pt.wrapper), R = Tt.make("div", "cdx-list-start-with-field__startlabel", { innerText: c }), H = Tt.make("div", "cdx-list-start-with-field__input-wrapper"), B = Tt.make("input", pt.input, { placeholder: E, tabIndex: -1, value: C, type: "number" });
3048
- for (const X in b) B.setAttribute(X, b[X]);
3049
- return A.appendChild(R), H.appendChild(B), A.appendChild(H), B.addEventListener("input", () => {
3050
- M !== void 0 && (B.value = M(B.value));
3051
- const X = B.checkValidity();
3052
- X || A.classList.contains(pt.startWithElementWrapperInvalid) || A.classList.add(pt.startWithElementWrapperInvalid), X && A.classList.contains(pt.startWithElementWrapperInvalid) && A.classList.remove(pt.startWithElementWrapperInvalid), X && g(B.value);
3289
+ const n = function(c, g, { value: C, placeholder: T, attributes: E, sanitize: N }) {
3290
+ const A = Tt.make("div", pt.wrapper), M = Tt.make("div", "cdx-list-start-with-field__startlabel", { innerText: c }), H = Tt.make("div", "cdx-list-start-with-field__input-wrapper"), z = Tt.make("input", pt.input, { placeholder: T, tabIndex: -1, value: C, type: "number" });
3291
+ for (const X in E)
3292
+ z.setAttribute(X, E[X]);
3293
+ return A.appendChild(M), H.appendChild(z), A.appendChild(H), z.addEventListener("input", () => {
3294
+ N !== void 0 && (z.value = N(z.value));
3295
+ const X = z.checkValidity();
3296
+ X || A.classList.contains(pt.startWithElementWrapperInvalid) || A.classList.add(pt.startWithElementWrapperInvalid), X && A.classList.contains(pt.startWithElementWrapperInvalid) && A.classList.remove(pt.startWithElementWrapperInvalid), X && g(z.value);
3053
3297
  }), A;
3054
3298
  }(this.api.i18n.t("Start with"), (c) => this.changeStartWith(Number(c)), { value: String((t = this.data.meta.start) != null ? t : 1), placeholder: "", attributes: { required: "true" }, sanitize: (c) => function(g) {
3055
3299
  return g.replace(/\D+/g, "");
@@ -3089,13 +3333,13 @@ class Rt {
3089
3333
  changeTabulatorByStyle() {
3090
3334
  switch (this.listStyle) {
3091
3335
  case "ordered":
3092
- this.list = new Bt({ data: this.data, readOnly: this.readOnly, api: this.api, config: this.config, block: this.block }, new Fe(this.readOnly, this.config));
3336
+ this.list = new Dt({ data: this.data, readOnly: this.readOnly, api: this.api, config: this.config, block: this.block }, new Fe(this.readOnly, this.config));
3093
3337
  break;
3094
3338
  case "unordered":
3095
- this.list = new Bt({ data: this.data, readOnly: this.readOnly, api: this.api, config: this.config, block: this.block }, new Ue(this.readOnly, this.config));
3339
+ this.list = new Dt({ data: this.data, readOnly: this.readOnly, api: this.api, config: this.config, block: this.block }, new Ue(this.readOnly, this.config));
3096
3340
  break;
3097
3341
  case "checklist":
3098
- this.list = new Bt({ data: this.data, readOnly: this.readOnly, api: this.api, config: this.config, block: this.block }, new me(this.readOnly, this.config));
3342
+ this.list = new Dt({ data: this.data, readOnly: this.readOnly, api: this.api, config: this.config, block: this.block }, new me(this.readOnly, this.config));
3099
3343
  }
3100
3344
  }
3101
3345
  }
@@ -3104,11 +3348,13 @@ class dn {
3104
3348
  this.target = e, this.isContentEditable = e && e.contentEditable;
3105
3349
  }
3106
3350
  getPos() {
3107
- if (document.activeElement !== this.target) return -1;
3351
+ if (document.activeElement !== this.target)
3352
+ return -1;
3108
3353
  if (this.isContentEditable === "true") {
3109
3354
  this.target.focus();
3110
3355
  const e = document.getSelection();
3111
- if (!e) return -1;
3356
+ if (!e)
3357
+ return -1;
3112
3358
  let t = e.getRangeAt(0), n = t.cloneRange();
3113
3359
  return n.selectNodeContents(this.target), n.setEnd(t.endContainer, t.endOffset), n.toString().length;
3114
3360
  }
@@ -3118,16 +3364,23 @@ class dn {
3118
3364
  if (this.isContentEditable === "true") {
3119
3365
  if (e >= 0) {
3120
3366
  const t = window.getSelection();
3121
- if (!t) return;
3367
+ if (!t)
3368
+ return;
3122
3369
  const n = this.createRange(this.target, { count: e });
3123
3370
  n && (n.collapse(!1), t.removeAllRanges(), t.addRange(n));
3124
3371
  }
3125
- } else this.target.focus(), this.target.setSelectionRange(e, e);
3372
+ } else
3373
+ this.target.focus(), this.target.setSelectionRange(e, e);
3126
3374
  }
3127
3375
  createRange(e, t, n) {
3128
- if (n || ((n = document.createRange()).selectNode(e), n.setStart(e, 0)), t.count === 0) n.setEnd(e, t.count);
3129
- else if (e && t.count > 0) if (e.nodeType === Node.TEXT_NODE) e.textContent && e.textContent.length < t.count ? t.count -= e.textContent.length : (n.setEnd(e, t.count), t.count = 0);
3130
- else for (let s = 0; s < e.childNodes.length && (n = this.createRange(e.childNodes[s], t, n), t.count !== 0); s++) ;
3376
+ if (n || ((n = document.createRange()).selectNode(e), n.setStart(e, 0)), t.count === 0)
3377
+ n.setEnd(e, t.count);
3378
+ else if (e && t.count > 0)
3379
+ if (e.nodeType === Node.TEXT_NODE)
3380
+ e.textContent && e.textContent.length < t.count ? t.count -= e.textContent.length : (n.setEnd(e, t.count), t.count = 0);
3381
+ else
3382
+ for (let s = 0; s < e.childNodes.length && (n = this.createRange(e.childNodes[s], t, n), t.count !== 0); s++)
3383
+ ;
3131
3384
  return n;
3132
3385
  }
3133
3386
  }
@@ -3175,14 +3428,15 @@ class ti {
3175
3428
  constructor({ editor: e, config: t = {}, onUpdate: n, maxLength: s }) {
3176
3429
  this.position = 0;
3177
3430
  const a = { maxLength: 30, onUpdate() {
3178
- }, config: { debounceTimer: 200, shortcuts: { undo: ["CMD+Z"], redo: ["CMD+Y", "CMD+SHIFT+Z"] } } }, { blocks: c, caret: g } = e, { configuration: C } = e, { holder: E, defaultBlock: b } = C, M = a.config.shortcuts, { shortcuts: A } = t, R = { ...M, ...A }, H = Array.isArray(R.undo) ? R.undo : [R.undo], B = Array.isArray(R.redo) ? R.redo : [R.redo], X = a.config.debounceTimer, { debounceTimer: ie = X } = t;
3179
- this.holder = typeof E == "string" ? document.getElementById(E) : E, this.editor = e, this.defaultBlock = b, this.blocks = c, this.caret = g, this.shouldSaveHistory = !0, this.readOnly = C.readOnly, this.maxLength = s || a.maxLength, this.onUpdate = n || a.onUpdate, this.config = { debounceTimer: ie, shortcuts: { undo: H, redo: B } }, new ei(() => this.registerChange(), this.holder, this.config.debounceTimer).setMutationObserver(), this.setEventListeners(), this.initialItem = null, this.clear();
3431
+ }, config: { debounceTimer: 200, shortcuts: { undo: ["CMD+Z"], redo: ["CMD+Y", "CMD+SHIFT+Z"] } } }, { blocks: c, caret: g } = e, { configuration: C } = e, { holder: T, defaultBlock: E } = C, N = a.config.shortcuts, { shortcuts: A } = t, M = { ...N, ...A }, H = Array.isArray(M.undo) ? M.undo : [M.undo], z = Array.isArray(M.redo) ? M.redo : [M.redo], X = a.config.debounceTimer, { debounceTimer: ie = X } = t;
3432
+ this.holder = typeof T == "string" ? document.getElementById(T) : T, this.editor = e, this.defaultBlock = E, this.blocks = c, this.caret = g, this.shouldSaveHistory = !0, this.readOnly = C.readOnly, this.maxLength = s || a.maxLength, this.onUpdate = n || a.onUpdate, this.config = { debounceTimer: ie, shortcuts: { undo: H, redo: z } }, new ei(() => this.registerChange(), this.holder, this.config.debounceTimer).setMutationObserver(), this.setEventListeners(), this.initialItem = null, this.clear();
3180
3433
  }
3181
3434
  static get isReadOnlySupported() {
3182
3435
  return !0;
3183
3436
  }
3184
3437
  truncate(e, t) {
3185
- for (; e.length > t; ) e.shift();
3438
+ for (; e.length > t; )
3439
+ e.shift();
3186
3440
  }
3187
3441
  initialize(e) {
3188
3442
  const t = "blocks" in e ? e.blocks : e, n = { index: t.length - 1, state: t };
@@ -3217,10 +3471,11 @@ class ti {
3217
3471
  return new dn(t[e].firstChild).getPos();
3218
3472
  }
3219
3473
  insertDeletedBlock(e, t, n) {
3220
- for (let s = 0; s < e.length; s += 1) if (!t[s] || e[s].id !== t[s].id) {
3221
- this.blocks.insert(e[s].type, e[s].data, {}, s, !0), this.caret.setToBlock(n, "end");
3222
- break;
3223
- }
3474
+ for (let s = 0; s < e.length; s += 1)
3475
+ if (!t[s] || e[s].id !== t[s].id) {
3476
+ this.blocks.insert(e[s].type, e[s].data, {}, s, !0), this.caret.setToBlock(n, "end");
3477
+ break;
3478
+ }
3224
3479
  }
3225
3480
  blockWasDropped(e, t) {
3226
3481
  return e.length === t.length && e.some((n, s) => n.id !== t[s].id);
@@ -3245,11 +3500,16 @@ class ti {
3245
3500
  const { state: s, caretIndex: a } = this.stack[this.position];
3246
3501
  this.onUpdate();
3247
3502
  const c = this.blocks.getBlocksCount();
3248
- if (s[n] || (n -= 1, this.stack[this.position].index = n), this.blockWasDeleted(s, t)) this.insertDeletedBlock(s, t, n);
3249
- else if (this.contentWasCopied(s, t, n)) await this.blocks.render({ blocks: s }), this.caret.setToBlock(n, "end");
3250
- else if (n < e && this.blockWasSkipped(s, t)) await this.blocks.delete(e), this.caret.setToBlock(n, "end");
3251
- else if (c > s.length) await this.blocks.render({ blocks: s }), this.setCaretIndex(n, a);
3252
- else if (this.blockWasDropped(s, t)) await this.blocks.render({ blocks: s }), this.caret.setToBlock(n, "end");
3503
+ if (s[n] || (n -= 1, this.stack[this.position].index = n), this.blockWasDeleted(s, t))
3504
+ this.insertDeletedBlock(s, t, n);
3505
+ else if (this.contentWasCopied(s, t, n))
3506
+ await this.blocks.render({ blocks: s }), this.caret.setToBlock(n, "end");
3507
+ else if (n < e && this.blockWasSkipped(s, t))
3508
+ await this.blocks.delete(e), this.caret.setToBlock(n, "end");
3509
+ else if (c > s.length)
3510
+ await this.blocks.render({ blocks: s }), this.setCaretIndex(n, a);
3511
+ else if (this.blockWasDropped(s, t))
3512
+ await this.blocks.render({ blocks: s }), this.caret.setToBlock(n, "end");
3253
3513
  else if (this.contentChangedInNoFocusBlock(n, e)) {
3254
3514
  const C = this.blocks.getBlockByIndex(e);
3255
3515
  C.id && (await this.blocks.update(C.id, s[e].data), this.setCaretIndex(n, a));
@@ -3262,13 +3522,15 @@ class ti {
3262
3522
  if (t && t !== -1) {
3263
3523
  const n = this.holder.getElementsByClassName("ce-block__content"), s = new dn(n[e].firstChild);
3264
3524
  setTimeout(() => s.setPos(t), 50);
3265
- } else this.caret.setToBlock(e, "end");
3525
+ } else
3526
+ this.caret.setToBlock(e, "end");
3266
3527
  }
3267
3528
  async insertBlock(e, t) {
3268
3529
  await this.blocks.insert(e[t].type, e[t].data, {}, t, !0);
3269
3530
  }
3270
3531
  async insertSkippedBlocks(e, t, n) {
3271
- for (let s = e.length; s < t.length; s += 1) this.insertBlock(t, s);
3532
+ for (let s = e.length; s < t.length; s += 1)
3533
+ this.insertBlock(t, s);
3272
3534
  JSON.stringify(e[n - 1]) !== JSON.stringify(t[n - 1]) && await this.updateModifiedBlock(t, n);
3273
3535
  }
3274
3536
  async updateModifiedBlock(e, t) {
@@ -3298,13 +3560,13 @@ class ti {
3298
3560
  return n.push(s), n;
3299
3561
  }
3300
3562
  setEventListeners() {
3301
- const { holder: e } = this, { shortcuts: t } = this.config, { undo: n, redo: s } = t, a = n.map((R) => R.replace(/ /g, "").split("+")), c = s.map((R) => R.replace(/ /g, "").split("+")), g = a.map((R) => this.parseKeys(R)), C = c.map((R) => this.parseKeys(R)), E = (R, H) => H.reduce((B, X) => B || ((ie, de) => de.length === 3 && ie[de[0]] && ie[de[1]] && ie.key.toLowerCase() === de[2])(R, X), !1), b = (R, H, B) => !(!((X, ie) => ie.reduce((de, fe) => de || ((q, ye) => ye.length === 2 && q[ye[0]] && q.key.toLowerCase() === ye[1])(X, fe), !1))(R, H) || E(R, B)) || !!E(R, H), M = (R) => {
3302
- b(R, g, C) && (R.preventDefault(), this.undo());
3303
- }, A = (R) => {
3304
- b(R, C, g) && (R.preventDefault(), this.redo());
3563
+ const { holder: e } = this, { shortcuts: t } = this.config, { undo: n, redo: s } = t, a = n.map((M) => M.replace(/ /g, "").split("+")), c = s.map((M) => M.replace(/ /g, "").split("+")), g = a.map((M) => this.parseKeys(M)), C = c.map((M) => this.parseKeys(M)), T = (M, H) => H.reduce((z, X) => z || ((ie, de) => de.length === 3 && ie[de[0]] && ie[de[1]] && ie.key.toLowerCase() === de[2])(M, X), !1), E = (M, H, z) => !(!((X, ie) => ie.reduce((de, fe) => de || ((q, ye) => ye.length === 2 && q[ye[0]] && q.key.toLowerCase() === ye[1])(X, fe), !1))(M, H) || T(M, z)) || !!T(M, H), N = (M) => {
3564
+ E(M, g, C) && (M.preventDefault(), this.undo());
3565
+ }, A = (M) => {
3566
+ E(M, C, g) && (M.preventDefault(), this.redo());
3305
3567
  };
3306
- e.addEventListener("keydown", M), e.addEventListener("keydown", A), e.addEventListener("destroy", () => {
3307
- e.removeEventListener("keydown", M), e.removeEventListener("keydown", A);
3568
+ e.addEventListener("keydown", N), e.addEventListener("keydown", A), e.addEventListener("destroy", () => {
3569
+ e.removeEventListener("keydown", N), e.removeEventListener("keydown", A);
3308
3570
  });
3309
3571
  }
3310
3572
  }
@@ -3385,9 +3647,9 @@ class et {
3385
3647
  }).forEach((s, a, c) => {
3386
3648
  const g = s.getAttribute("data-type") || "";
3387
3649
  s.addEventListener("click", () => {
3388
- this._changeAlertType(g), c.forEach((C, E) => {
3389
- const b = C.getAttribute("data-type");
3390
- C.classList.toggle("cdx-alert_setting__icon_active", b === this.data.type);
3650
+ this._changeAlertType(g), c.forEach((C, T) => {
3651
+ const E = C.getAttribute("data-type");
3652
+ C.classList.toggle("cdx-alert_setting__icon_active", E === this.data.type);
3391
3653
  });
3392
3654
  });
3393
3655
  }), e.appendChild(t), e.appendChild(n), e;
@@ -3414,7 +3676,8 @@ class et {
3414
3676
  _make(e, t, n = {}) {
3415
3677
  let s = document.createElement(e);
3416
3678
  Array.isArray(t) ? s.classList.add(...t) : t && s.classList.add(t);
3417
- for (let a in n) s[a] = n[a];
3679
+ for (let a in n)
3680
+ s[a] = n[a];
3418
3681
  return s;
3419
3682
  }
3420
3683
  onPaste(e) {
@@ -3428,14 +3691,14 @@ class et {
3428
3691
  return { message: !0, type: !1, alignType: !1 };
3429
3692
  }
3430
3693
  }
3431
- const hn = { orientation: !1 }, Se = class Se {
3694
+ const hn = { orientation: !1 }, Lt = class Ie {
3432
3695
  constructor({ api: e, data: t, config: n, block: s, ...a }) {
3433
- var g, C, E, b, M, A;
3696
+ var g, C, T, E, N, A;
3434
3697
  this.wrapper = document.createElement("div"), this.DEFAULT_INDENT_KEY = "Tab", this.lastResizeTimeout = null, this.cachedMaxWidthForContent = null, this.api = e, this.block = s, !n && "settings" in a && (n = (g = a.settings) != null ? g : {}), this.config = { indentSize: 24, maxIndent: 8, minIndent: 0, multiblock: !1, autoIndent: !1, tuneName: null, orientation: "horizontal", customBlockIndentLimits: {}, handleShortcut: void 0, direction: "ltr", directionChangeHandler: null, version: "2.30", ...n != null ? n : {} }, this.changeConfigBasedOnVersionIfNeeded(), (C = this.config) != null && C.directionChangeHandler && this.config.directionChangeHandler(this.alignmentChangeListener.bind(this));
3435
- const c = (A = (M = this.config.customBlockIndentLimits[(b = (E = this.block) == null ? void 0 : E.name) != null ? b : ""]) == null ? void 0 : M.min) != null ? A : this.config.minIndent;
3436
- this.data = { indentLevel: c, ...t != null ? t : {} }, this.config.multiblock && this.config.tuneName, window.addEventListener("resize", (R) => this.onResize.call(this, R)), this.api.events.on("block changed", ({ event: R }) => {
3698
+ const c = (A = (N = this.config.customBlockIndentLimits[(E = (T = this.block) == null ? void 0 : T.name) != null ? E : ""]) == null ? void 0 : N.min) != null ? A : this.config.minIndent;
3699
+ this.data = { indentLevel: c, ...t != null ? t : {} }, this.config.multiblock && this.config.tuneName, window.addEventListener("resize", (M) => this.onResize.call(this, M)), this.api.events.on("block changed", ({ event: M }) => {
3437
3700
  var X;
3438
- const H = R.detail.target.id;
3701
+ const H = M.detail.target.id;
3439
3702
  ((X = this.block) == null ? void 0 : X.id) === H && this.shouldApplyAutoIndent && queueMicrotask(() => this.autoIndentBlock());
3440
3703
  });
3441
3704
  }
@@ -3451,21 +3714,23 @@ const hn = { orientation: !1 }, Se = class Se {
3451
3714
  const e = () => {
3452
3715
  if (this.data.indentLevel == this.maxIndent) {
3453
3716
  const C = this.getTuneButton("indent");
3454
- if (C == null || C.classList.add(this.CSS.disabledItem), !C) return !0;
3717
+ if (C == null || C.classList.add(this.CSS.disabledItem), !C)
3718
+ return !0;
3455
3719
  }
3456
3720
  if (this.data.indentLevel == this.minIndent) {
3457
3721
  const C = this.getTuneButton("unindent");
3458
- if (C == null || C.classList.add(this.CSS.disabledItem), !C) return !0;
3722
+ if (C == null || C.classList.add(this.CSS.disabledItem), !C)
3723
+ return !0;
3459
3724
  }
3460
3725
  };
3461
3726
  if (queueMicrotask(() => {
3462
3727
  e() && setTimeout(e, 300);
3463
3728
  }), this.config.orientation === "vertical") {
3464
- const C = `${this.TuneNames.indentLeft}-${(c = this.block) == null ? void 0 : c.id}`, E = `${this.TuneNames.indentRight}-${(g = this.block) == null ? void 0 : g.id}`;
3465
- return [{ title: this.rightText, hint: { title: this.api.i18n.t(this.rightText) }, onActivate: (b, M) => {
3466
- this.handleIndentRight(), b.title = this.rightText;
3467
- }, icon: ln, name: E }, { title: this.leftText, hint: { title: this.api.i18n.t(this.leftText) }, onActivate: (b, M) => {
3468
- this.handleIndentLeft(), b.title = this.leftText;
3729
+ const C = `${this.TuneNames.indentLeft}-${(c = this.block) == null ? void 0 : c.id}`, T = `${this.TuneNames.indentRight}-${(g = this.block) == null ? void 0 : g.id}`;
3730
+ return [{ title: this.rightText, hint: { title: this.api.i18n.t(this.rightText) }, onActivate: (E, N) => {
3731
+ this.handleIndentRight(), E.title = this.rightText;
3732
+ }, icon: ln, name: T }, { title: this.leftText, hint: { title: this.api.i18n.t(this.leftText) }, onActivate: (E, N) => {
3733
+ this.handleIndentLeft(), E.title = this.leftText;
3469
3734
  }, icon: an, name: C }];
3470
3735
  }
3471
3736
  const t = `
@@ -3479,14 +3744,14 @@ const hn = { orientation: !1 }, Se = class Se {
3479
3744
  }
3480
3745
  wrap(e) {
3481
3746
  var n, s, a, c, g;
3482
- this.wrapper.appendChild(e), this.wrapper.setAttribute(Se.DATA_WRAPPER_NAME, "");
3747
+ this.wrapper.appendChild(e), this.wrapper.setAttribute(Ie.DATA_WRAPPER_NAME, "");
3483
3748
  let t = !!this.config.highlightIndent;
3484
3749
  if ((n = this.config.highlightIndent) != null && n.tuneNames && !this.config.highlightIndent.tuneNames.includes((a = (s = this.block) == null ? void 0 : s.name) != null ? a : "") && (t = !1), t) {
3485
3750
  const C = this.createElementFromTemplate(`
3486
3751
  <div class="${(g = (c = this.config.highlightIndent) == null ? void 0 : c.className) != null ? g : ""} ${this.CSS.highlightIndent}">
3487
3752
  </div>
3488
- `), E = e.classList.contains(this.EditorCSS.content) ? e : e.querySelector(`.${this.EditorCSS.content}`);
3489
- E == null || E.appendChild(C);
3753
+ `), T = e.classList.contains(this.EditorCSS.content) ? e : e.querySelector(`.${this.EditorCSS.content}`);
3754
+ T == null || T.appendChild(C);
3490
3755
  }
3491
3756
  return this.applyStylesToWrapper(this.wrapper, this.data.indentLevel), this.wrapper.addEventListener("keydown", (...C) => this.onKeyDown.apply(this, C), { capture: !0 }), this.wrapper.addEventListener("focus", (C) => this.onFocus.call(this, C), { capture: !0 }), this.wrapper.addEventListener("blur", (C) => this.onBlur.call(this, C), { capture: !0 }), this.wrapper;
3492
3757
  }
@@ -3525,22 +3790,29 @@ const hn = { orientation: !1 }, Se = class Se {
3525
3790
  }
3526
3791
  get shouldApplyAutoIndent() {
3527
3792
  var s;
3528
- if (!this.config.autoIndent) return !1;
3529
- if (typeof this.config.autoIndent == "boolean") return this.config.autoIndent;
3793
+ if (!this.config.autoIndent)
3794
+ return !1;
3795
+ if (typeof this.config.autoIndent == "boolean")
3796
+ return this.config.autoIndent;
3530
3797
  const e = this.api.blocks.getCurrentBlockIndex();
3531
- if (e < 0) return !1;
3798
+ if (e < 0)
3799
+ return !1;
3532
3800
  const t = this.api.blocks.getBlockByIndex(e);
3533
- if (!t) return !1;
3801
+ if (!t)
3802
+ return !1;
3534
3803
  const n = t.name;
3535
3804
  return !((s = this.config.autoIndent.tuneNames) != null && s.length) || this.config.autoIndent.tuneNames.includes(n);
3536
3805
  }
3537
3806
  handlePropagationForKeyEvent(e) {
3538
3807
  var c, g, C;
3539
- if (!((c = this.block) != null && c.id) || this.config.handleShortcut === !1) return null;
3808
+ if (!((c = this.block) != null && c.id) || this.config.handleShortcut === !1)
3809
+ return null;
3540
3810
  const t = e.key == this.DEFAULT_INDENT_KEY, n = typeof this.config.handleShortcut == "function";
3541
- if (!n && !t) return null;
3811
+ if (!n && !t)
3812
+ return null;
3542
3813
  const s = (C = (g = this.config).handleShortcut) == null ? void 0 : C.call(g, e, this.block.id);
3543
- if (!s && n) return null;
3814
+ if (!s && n)
3815
+ return null;
3544
3816
  let a;
3545
3817
  switch (s) {
3546
3818
  case "indent":
@@ -3550,29 +3822,35 @@ const hn = { orientation: !1 }, Se = class Se {
3550
3822
  a = !1;
3551
3823
  break;
3552
3824
  default:
3553
- if (!t) return null;
3825
+ if (!t)
3826
+ return null;
3554
3827
  a = !e.shiftKey;
3555
3828
  }
3556
3829
  return e.stopPropagation(), e.preventDefault(), { isIndent: a };
3557
3830
  }
3558
3831
  onKeyDown(e) {
3559
3832
  var a, c, g;
3560
- if (!((a = this.block) != null && a.id)) return;
3833
+ if (!((a = this.block) != null && a.id))
3834
+ return;
3561
3835
  const t = this.handlePropagationForKeyEvent(e);
3562
- if (!t) return;
3836
+ if (!t)
3837
+ return;
3563
3838
  const { isIndent: n } = t;
3564
3839
  this.api.inlineToolbar.close();
3565
3840
  const s = this.getGlobalSelectedBlocks();
3566
- if (!this.config.multiblock || s.length < 2) return n ? this.indentBlock() : this.unIndentBlock(), void ((g = (c = this.block).dispatchChange) == null ? void 0 : g.call(c));
3841
+ if (!this.config.multiblock || s.length < 2)
3842
+ return n ? this.indentBlock() : this.unIndentBlock(), void ((g = (c = this.block).dispatchChange) == null ? void 0 : g.call(c));
3567
3843
  this.config.tuneName && s.forEach(async (C) => {
3568
- var A, R, H, B;
3569
- const E = await C.save();
3570
- if (!E || !("tunes" in E) || typeof E.tunes != "object" || !E.tunes) return;
3571
- const b = E.tunes[(A = this.config.tuneName) != null ? A : ""];
3572
- if (!b) return;
3573
- b.indentLevel = n ? Math.min(this.config.maxIndent, ((R = b.indentLevel) != null ? R : 0) + 1) : Math.max(0, ((H = b.indentLevel) != null ? H : 0) - 1), (B = C.dispatchChange) == null || B.call(C);
3574
- const M = this.getWrapperBlockById(C.id);
3575
- M instanceof HTMLElement && this.applyStylesToWrapper(M, b.indentLevel);
3844
+ var A, M, H, z;
3845
+ const T = await C.save();
3846
+ if (!T || !("tunes" in T) || typeof T.tunes != "object" || !T.tunes)
3847
+ return;
3848
+ const E = T.tunes[(A = this.config.tuneName) != null ? A : ""];
3849
+ if (!E)
3850
+ return;
3851
+ E.indentLevel = n ? Math.min(this.config.maxIndent, ((M = E.indentLevel) != null ? M : 0) + 1) : Math.max(0, ((H = E.indentLevel) != null ? H : 0) - 1), (z = C.dispatchChange) == null || z.call(C);
3852
+ const N = this.getWrapperBlockById(C.id);
3853
+ N instanceof HTMLElement && this.applyStylesToWrapper(N, E.indentLevel);
3576
3854
  });
3577
3855
  }
3578
3856
  handleIndentLeft() {
@@ -3592,8 +3870,9 @@ const hn = { orientation: !1 }, Se = class Se {
3592
3870
  autoIndentBlock() {
3593
3871
  var c, g;
3594
3872
  const e = this.api.blocks.getBlockIndex(this.block.id), t = this.api.blocks.getBlockByIndex(e - 1);
3595
- if (!t) return;
3596
- const n = (g = (c = t.holder) == null ? void 0 : c.querySelector(`[${Se.DATA_WRAPPER_NAME}]`)) == null ? void 0 : g.getAttribute(Se.DATA_INDENT_LEVEL), s = Number(n != null ? n : 0), a = Math.min(Math.max(s, this.minIndent), this.maxIndent);
3873
+ if (!t)
3874
+ return;
3875
+ const n = (g = (c = t.holder) == null ? void 0 : c.querySelector(`[${Ie.DATA_WRAPPER_NAME}]`)) == null ? void 0 : g.getAttribute(Ie.DATA_INDENT_LEVEL), s = Number(n != null ? n : 0), a = Math.min(Math.max(s, this.minIndent), this.maxIndent);
3597
3876
  this.data.indentLevel = a, this.applyStylesToWrapper(this.wrapper, this.data.indentLevel);
3598
3877
  }
3599
3878
  toggleDisableStateForButtons() {
@@ -3612,27 +3891,29 @@ const hn = { orientation: !1 }, Se = class Se {
3612
3891
  var t;
3613
3892
  return (t = this.getTuneByName(e)) == null ? void 0 : t.querySelector(`.${this.CSS.popoverItemTitle}`);
3614
3893
  }
3615
- applyStylesToWrapper(e, t = parseInt(e.getAttribute(Se.DATA_INDENT_LEVEL) || "0")) {
3894
+ applyStylesToWrapper(e, t = parseInt(e.getAttribute(Ie.DATA_INDENT_LEVEL) || "0")) {
3616
3895
  const n = t * this.config.indentSize;
3617
- e.setAttribute(Se.DATA_INDENT_LEVEL, t.toString());
3896
+ e.setAttribute(Ie.DATA_INDENT_LEVEL, t.toString());
3618
3897
  const s = e.querySelector(`.${this.EditorCSS.content}`), a = this.getBlockForWrapper(e) || document.querySelector(`.${this.EditorCSS.redactor}`);
3619
- if (!(s instanceof HTMLElement && a)) return;
3898
+ if (!(s instanceof HTMLElement && a))
3899
+ return;
3620
3900
  const c = a.getBoundingClientRect().width;
3621
- if (c === 0) return void queueMicrotask(() => this.applyStylesToWrapper.bind(this)(e, t));
3622
- const g = (c - this.maxWidthForContent(e)) / 2, C = Math.max(0, Math.min(g, n)), E = 2 * C + "px", b = `${C}px`;
3623
- this.isDirectionInverted ? (e.style.paddingLeft = "0px", e.style.paddingRight = E) : (e.style.paddingLeft = E, e.style.paddingRight = "0px");
3624
- const M = e.querySelector(`.${this.CSS.highlightIndent}`);
3625
- M instanceof HTMLElement && (this.isDirectionInverted ? (M.style.width = b, M.style.left = "100%", M.style.right = "") : (M.style.width = b, M.style.left = "", M.style.right = "100%"));
3901
+ if (c === 0)
3902
+ return void queueMicrotask(() => this.applyStylesToWrapper.bind(this)(e, t));
3903
+ const g = (c - this.maxWidthForContent(e)) / 2, C = Math.max(0, Math.min(g, n)), T = 2 * C + "px", E = `${C}px`;
3904
+ this.isDirectionInverted ? (e.style.paddingLeft = "0px", e.style.paddingRight = T) : (e.style.paddingLeft = T, e.style.paddingRight = "0px");
3905
+ const N = e.querySelector(`.${this.CSS.highlightIndent}`);
3906
+ N instanceof HTMLElement && (this.isDirectionInverted ? (N.style.width = E, N.style.left = "100%", N.style.right = "") : (N.style.width = E, N.style.left = "", N.style.right = "100%"));
3626
3907
  }
3627
3908
  onFocus(e) {
3628
- e.target instanceof HTMLElement && this.wrapper.contains(e.target) && this.wrapper.setAttribute(Se.DATA_FOCUSED, "");
3909
+ e.target instanceof HTMLElement && this.wrapper.contains(e.target) && this.wrapper.setAttribute(Ie.DATA_FOCUSED, "");
3629
3910
  }
3630
3911
  onBlur(e) {
3631
- e.target instanceof HTMLElement && this.wrapper.contains(e.target) && this.wrapper.removeAttribute(Se.DATA_FOCUSED);
3912
+ e.target instanceof HTMLElement && this.wrapper.contains(e.target) && this.wrapper.removeAttribute(Ie.DATA_FOCUSED);
3632
3913
  }
3633
3914
  onResize(e) {
3634
3915
  this.lastResizeTimeout && clearTimeout(this.lastResizeTimeout), this.lastResizeTimeout = setTimeout(() => {
3635
- document.querySelectorAll(`[${Se.DATA_WRAPPER_NAME}]`).forEach((t) => {
3916
+ document.querySelectorAll(`[${Ie.DATA_WRAPPER_NAME}]`).forEach((t) => {
3636
3917
  t instanceof HTMLElement && this.applyStylesToWrapper(t);
3637
3918
  });
3638
3919
  }, 500);
@@ -3642,13 +3923,14 @@ const hn = { orientation: !1 }, Se = class Se {
3642
3923
  }
3643
3924
  getWrapperBlockById(e) {
3644
3925
  var n, s, a;
3645
- const t = `.${this.EditorCSS.block}[data-id="${e}"] [${Se.DATA_WRAPPER_NAME}]`;
3646
- return (a = (s = document.querySelector(t)) != null ? s : (n = this.api.blocks.getById(e)) == null ? void 0 : n.holder.querySelector(`[${Se.DATA_WRAPPER_NAME}]`)) != null ? a : null;
3926
+ const t = `.${this.EditorCSS.block}[data-id="${e}"] [${Ie.DATA_WRAPPER_NAME}]`;
3927
+ return (a = (s = document.querySelector(t)) != null ? s : (n = this.api.blocks.getById(e)) == null ? void 0 : n.holder.querySelector(`[${Ie.DATA_WRAPPER_NAME}]`)) != null ? a : null;
3647
3928
  }
3648
3929
  getBlockForWrapper(e) {
3649
3930
  let t = e;
3650
3931
  for (; !t.classList.contains(this.EditorCSS.block); ) {
3651
- if (!t.parentElement || t instanceof HTMLHtmlElement) return null;
3932
+ if (!t.parentElement || t instanceof HTMLHtmlElement)
3933
+ return null;
3652
3934
  t = t.parentElement;
3653
3935
  }
3654
3936
  return t;
@@ -3672,24 +3954,26 @@ const hn = { orientation: !1 }, Se = class Se {
3672
3954
  const t = e.querySelector(`.${this.EditorCSS.content}`);
3673
3955
  if (t instanceof HTMLElement) {
3674
3956
  const { maxWidth: n } = window.getComputedStyle(t);
3675
- if (n) return this.cachedMaxWidthForContent = parseInt(n), this.cachedMaxWidthForContent;
3957
+ if (n)
3958
+ return this.cachedMaxWidthForContent = parseInt(n), this.cachedMaxWidthForContent;
3676
3959
  }
3677
3960
  return this.cachedMaxWidthForContent !== null || (this.cachedMaxWidthForContent = 650), this.cachedMaxWidthForContent;
3678
3961
  }
3679
3962
  };
3680
- Se.DATA_WRAPPER_NAME = "data-block-indent-wrapper", Se.DATA_FOCUSED = "data-focused", Se.DATA_INDENT_LEVEL = "data-indent-level";
3681
- let $t = Se;
3963
+ Lt.DATA_WRAPPER_NAME = "data-block-indent-wrapper", Lt.DATA_FOCUSED = "data-focused", Lt.DATA_INDENT_LEVEL = "data-indent-level";
3964
+ let ni = Lt;
3682
3965
  function He(_, e, t = {}) {
3683
3966
  const n = document.createElement(_);
3684
3967
  Array.isArray(e) ? n.classList.add(...e) : e && n.classList.add(e);
3685
- for (const s in t) Object.prototype.hasOwnProperty.call(t, s) && (n[s] = t[s]);
3968
+ for (const s in t)
3969
+ Object.prototype.hasOwnProperty.call(t, s) && (n[s] = t[s]);
3686
3970
  return n;
3687
3971
  }
3688
3972
  function un(_) {
3689
3973
  const e = _.getBoundingClientRect();
3690
3974
  return { y1: Math.floor(e.top + window.pageYOffset), x1: Math.floor(e.left + window.pageXOffset), x2: Math.floor(e.right + window.pageXOffset), y2: Math.floor(e.bottom + window.pageYOffset) };
3691
3975
  }
3692
- function Dt(_, e) {
3976
+ function Pt(_, e) {
3693
3977
  const t = un(_), n = un(e);
3694
3978
  return { fromTopBorder: n.y1 - t.y1, fromLeftBorder: n.x1 - t.x1, fromRightBorder: t.x2 - n.x2, fromBottomBorder: t.y2 - n.y2 };
3695
3979
  }
@@ -3701,7 +3985,7 @@ function gn(_, e = !0) {
3701
3985
  const t = document.createRange(), n = window.getSelection();
3702
3986
  t.selectNodeContents(_), t.collapse(e), n == null || n.removeAllRanges(), n == null || n.addRange(t);
3703
3987
  }
3704
- class xe {
3988
+ class Le {
3705
3989
  constructor({ items: e }) {
3706
3990
  this.items = e, this.wrapper = void 0, this.itemEls = [];
3707
3991
  }
@@ -3709,44 +3993,46 @@ class xe {
3709
3993
  return { popover: "tc-popover", popoverOpened: "tc-popover--opened", item: "tc-popover__item", itemHidden: "tc-popover__item--hidden", itemConfirmState: "tc-popover__item--confirm", itemIcon: "tc-popover__item-icon", itemLabel: "tc-popover__item-label" };
3710
3994
  }
3711
3995
  render() {
3712
- return this.wrapper = He("div", xe.CSS.popover), this.items.forEach((e, t) => {
3996
+ return this.wrapper = He("div", Le.CSS.popover), this.items.forEach((e, t) => {
3713
3997
  var c;
3714
- const n = He("div", xe.CSS.item), s = He("div", xe.CSS.itemIcon, { innerHTML: e.icon }), a = He("div", xe.CSS.itemLabel, { textContent: e.label });
3998
+ const n = He("div", Le.CSS.item), s = He("div", Le.CSS.itemIcon, { innerHTML: e.icon }), a = He("div", Le.CSS.itemLabel, { textContent: e.label });
3715
3999
  n.dataset.index = t + "", n.appendChild(s), n.appendChild(a), (c = this.wrapper) == null || c.appendChild(n), this.itemEls.push(n);
3716
4000
  }), this.wrapper.addEventListener("click", (e) => {
3717
4001
  this.popoverClicked(e);
3718
4002
  }), this.wrapper;
3719
4003
  }
3720
4004
  popoverClicked(e) {
3721
- const t = e.target.closest(`.${xe.CSS.item}`);
3722
- if (!t) return;
4005
+ const t = e.target.closest(`.${Le.CSS.item}`);
4006
+ if (!t)
4007
+ return;
3723
4008
  const n = t.dataset.index;
3724
- if (!n) return;
4009
+ if (!n)
4010
+ return;
3725
4011
  const s = this.items[parseInt(n)];
3726
4012
  !s.confirmationRequired || this.hasConfirmationState(t) ? s.onClick() : this.setConfirmationState(t);
3727
4013
  }
3728
4014
  setConfirmationState(e) {
3729
- e.classList.add(xe.CSS.itemConfirmState);
4015
+ e.classList.add(Le.CSS.itemConfirmState);
3730
4016
  }
3731
4017
  clearConfirmationState(e) {
3732
- e.classList.remove(xe.CSS.itemConfirmState);
4018
+ e.classList.remove(Le.CSS.itemConfirmState);
3733
4019
  }
3734
4020
  hasConfirmationState(e) {
3735
- return e.classList.contains(xe.CSS.itemConfirmState);
4021
+ return e.classList.contains(Le.CSS.itemConfirmState);
3736
4022
  }
3737
4023
  get opened() {
3738
4024
  var e;
3739
- return ((e = this.wrapper) == null ? void 0 : e.classList.contains(xe.CSS.popoverOpened)) || !1;
4025
+ return ((e = this.wrapper) == null ? void 0 : e.classList.contains(Le.CSS.popoverOpened)) || !1;
3740
4026
  }
3741
4027
  open() {
3742
4028
  var e;
3743
4029
  this.items.forEach((t, n) => {
3744
- typeof t.hideIf == "function" && this.itemEls[n].classList.toggle(xe.CSS.itemHidden, t.hideIf());
3745
- }), (e = this.wrapper) == null || e.classList.add(xe.CSS.popoverOpened);
4030
+ typeof t.hideIf == "function" && this.itemEls[n].classList.toggle(Le.CSS.itemHidden, t.hideIf());
4031
+ }), (e = this.wrapper) == null || e.classList.add(Le.CSS.popoverOpened);
3746
4032
  }
3747
4033
  close() {
3748
4034
  var e;
3749
- (e = this.wrapper) == null || e.classList.remove(xe.CSS.popoverOpened), this.itemEls.forEach((t) => {
4035
+ (e = this.wrapper) == null || e.classList.remove(Le.CSS.popoverOpened), this.itemEls.forEach((t) => {
3750
4036
  this.clearConfirmationState(t);
3751
4037
  });
3752
4038
  }
@@ -3774,7 +4060,7 @@ class tt {
3774
4060
  }), e;
3775
4061
  }
3776
4062
  createPopover() {
3777
- return this.popover = new xe({ items: this.items }), this.popover.render();
4063
+ return this.popover = new Le({ items: this.items }), this.popover.render();
3778
4064
  }
3779
4065
  togglerClicked() {
3780
4066
  var e, t;
@@ -3791,13 +4077,14 @@ class tt {
3791
4077
  (e = this.popover) == null || e.close(), this.wrapper.classList.remove(tt.CSS.toolboxShowed);
3792
4078
  }
3793
4079
  }
3794
- const fn = "tc-wrap", ni = "tc-wrap--readonly", mn = "tc-table", ot = "tc-row", vn = "tc-table--heading", Pt = "tc-row--selected", at = "tc-cell", zt = "tc-cell--selected", Wt = "tc-add-row", Cn = "tc-add-row--disabled", Ft = "tc-add-column", wn = "tc-add-column--disabled";
3795
- class ii {
4080
+ const fn = "tc-wrap", ii = "tc-wrap--readonly", mn = "tc-table", ot = "tc-row", vn = "tc-table--heading", zt = "tc-row--selected", at = "tc-cell", Wt = "tc-cell--selected", Ft = "tc-add-row", Cn = "tc-add-row--disabled", Ut = "tc-add-column", wn = "tc-add-column--disabled";
4081
+ class si {
3796
4082
  constructor(e, t, n, s) {
3797
4083
  this.minCellWidhth = 50, this.defaultCellWidth = 100, this.handleDocumentMousedown = (a) => {
3798
4084
  this.wrapper.contains(a.target) && a.target.classList.contains("cell-resizable") && (a.preventDefault(), this.isDragging = !0, this.table.classList.add("table-resizing"), document.addEventListener("mousemove", this.handleDocumentMousemove), document.addEventListener("mouseup", this.handleDocumentMouseup), this.draggingColumn = this.hoveredColumn, this.startWidth = this.colWidthArr[this.draggingColumn - 1], this.mouseStartX = a.clientX);
3799
4085
  }, this.handleDocumentMousemove = (a) => {
3800
- if (!this.isDragging) return;
4086
+ if (!this.isDragging)
4087
+ return;
3801
4088
  const c = a.clientX - this.mouseStartX, g = Math.max(this.startWidth + c, this.minCellWidhth);
3802
4089
  this.colWidthArr[this.draggingColumn - 1] = g, this.updateColWidth();
3803
4090
  }, this.handleDocumentMouseup = () => {
@@ -3806,19 +4093,20 @@ class ii {
3806
4093
  let c = a.target;
3807
4094
  const g = c.closest(`.${mn}`) !== null, C = c.closest(`.${fn}`) === null;
3808
4095
  (g || C) && this.hideToolboxes();
3809
- const E = c.closest(`.${Wt}`), b = c.closest(`.${Ft}`);
3810
- E && E.parentNode === this.wrapper ? (this.addRow(void 0, !0), this.hideToolboxes()) : b && b.parentNode === this.wrapper && (this.addColumn(void 0, !0), this.hideToolboxes());
4096
+ const T = c.closest(`.${Ft}`), E = c.closest(`.${Ut}`);
4097
+ T && T.parentNode === this.wrapper ? (this.addRow(void 0, !0), this.hideToolboxes()) : E && E.parentNode === this.wrapper && (this.addColumn(void 0, !0), this.hideToolboxes());
3811
4098
  }, this.readOnly || this.bindEvents();
3812
4099
  }
3813
4100
  getWrapper() {
3814
4101
  return this.wrapper;
3815
4102
  }
3816
4103
  bindEvents() {
3817
- document.addEventListener("click", this.documentClicked), document.addEventListener("mousedown", (e) => this.handleDocumentMousedown(e)), this.table.addEventListener("mousemove", /* @__PURE__ */ function(e, t) {
4104
+ document.addEventListener("click", this.documentClicked), document.addEventListener("mousedown", (e) => this.handleDocumentMousedown(e)), this.table.addEventListener("mousemove", function(e, t) {
3818
4105
  let n = 0;
3819
4106
  return function(...s) {
3820
4107
  const a = (/* @__PURE__ */ new Date()).getTime();
3821
- if (!(a - n < e)) return n = a, t(...s);
4108
+ if (!(a - n < e))
4109
+ return n = a, t(...s);
3822
4110
  };
3823
4111
  }(150, (e) => this.onMouseMoveInTable(e)), { passive: !0 }), this.table.onkeypress = (e) => this.onKeyPressListener(e), this.table.addEventListener("keydown", (e) => this.onKeyDownListener(e)), this.table.addEventListener("focusin", (e) => this.focusInTableListener(e));
3824
4112
  }
@@ -3876,63 +4164,73 @@ class ii {
3876
4164
  addColumn(e = -1, t = !1) {
3877
4165
  var a;
3878
4166
  let n = this.numberOfColumns;
3879
- if (this.config && this.config.maxcols && this.numberOfColumns >= this.config.maxcols) return;
4167
+ if (this.config && this.config.maxcols && this.numberOfColumns >= this.config.maxcols)
4168
+ return;
3880
4169
  for (let c = 1; c <= this.numberOfRows; c++) {
3881
4170
  let g;
3882
4171
  const C = this.createCell();
3883
4172
  if (e > 0 && e <= n ? (g = this.getCell(c, e), pn(C, g)) : g = this.getRow(c).appendChild(C), c === 1) {
3884
- const E = this.getCell(c, e > 0 ? e : n + 1);
3885
- E && t && gn(E);
4173
+ const T = this.getCell(c, e > 0 ? e : n + 1);
4174
+ T && t && gn(T);
3886
4175
  }
3887
4176
  }
3888
- const s = this.wrapper.querySelector(`.${Ft}`);
4177
+ const s = this.wrapper.querySelector(`.${Ut}`);
3889
4178
  (a = this.config) != null && a.maxcols && this.numberOfColumns > this.config.maxcols - 1 && s && s.classList.add(wn), this.addHeadingAttrToFirstRow(), this.colWidthArr.splice(e - 1, 0, this.defaultCellWidth);
3890
4179
  }
3891
4180
  addRow(e = -1, t = !1) {
3892
4181
  let n, s = He("div", ot);
3893
4182
  this.tunes.withHeadings && this.removeHeadingAttrFromFirstRow();
3894
4183
  let a = this.numberOfColumns;
3895
- if (this.config && this.config.maxrows && this.numberOfRows >= this.config.maxrows) return;
4184
+ if (this.config && this.config.maxrows && this.numberOfRows >= this.config.maxrows)
4185
+ return;
3896
4186
  e > 0 && e <= this.numberOfRows ? n = pn(s, this.getRow(e)) : n = this.table.appendChild(s), this.fillRow(n, a), this.tunes.withHeadings && this.addHeadingAttrToFirstRow();
3897
4187
  const c = this.getRowFirstCell(n);
3898
4188
  c && t && gn(c);
3899
- const g = this.wrapper.querySelector(`.${Wt}`);
4189
+ const g = this.wrapper.querySelector(`.${Ft}`);
3900
4190
  return this.config && this.config.maxrows && this.numberOfRows >= this.config.maxrows && g && g.classList.add(Cn), n;
3901
4191
  }
3902
4192
  deleteColumn(e) {
3903
4193
  for (let n = 1; n <= this.numberOfRows; n++) {
3904
4194
  const s = this.getCell(n, e);
3905
- if (!s) return;
4195
+ if (!s)
4196
+ return;
3906
4197
  s.remove();
3907
4198
  }
3908
- const t = this.wrapper.querySelector(`.${Ft}`);
4199
+ const t = this.wrapper.querySelector(`.${Ut}`);
3909
4200
  t && t.classList.remove(wn), this.colWidthArr.splice(e - 1, 1);
3910
4201
  }
3911
4202
  deleteRow(e) {
3912
4203
  this.getRow(e).remove();
3913
- const t = this.wrapper.querySelector(`.${Wt}`);
4204
+ const t = this.wrapper.querySelector(`.${Ft}`);
3914
4205
  t && t.classList.remove(Cn), this.addHeadingAttrToFirstRow();
3915
4206
  }
3916
4207
  createTableWrapper() {
3917
- this.wrapper = He("div", fn), this.table = He("div", mn), this.readOnly && this.wrapper.classList.add(ni), this.wrapper.appendChild(this.toolboxRow.element), this.wrapper.appendChild(this.toolboxColumn.element), this.wrapper.appendChild(this.table);
4208
+ this.wrapper = He("div", fn), this.table = He("div", mn), this.readOnly && this.wrapper.classList.add(ii), this.wrapper.appendChild(this.toolboxRow.element), this.wrapper.appendChild(this.toolboxColumn.element), this.wrapper.appendChild(this.table);
3918
4209
  }
3919
4210
  computeInitialSize() {
3920
- const e = this.data && this.data.content, t = Array.isArray(e), n = !!t && e.length, s = t ? e.length : void 0, a = n ? e[0].length : void 0, c = Number.parseInt(this.config && this.config.rows), g = Number.parseInt(this.config && this.config.cols), C = !isNaN(c) && c > 0 ? c : void 0, E = !isNaN(g) && g > 0 ? g : void 0;
3921
- return { rows: s || C || 2, cols: a || E || 2 };
4211
+ const e = this.data && this.data.content, t = Array.isArray(e), n = !!t && e.length, s = t ? e.length : void 0, a = n ? e[0].length : void 0, c = Number.parseInt(this.config && this.config.rows), g = Number.parseInt(this.config && this.config.cols), C = !isNaN(c) && c > 0 ? c : void 0, T = !isNaN(g) && g > 0 ? g : void 0;
4212
+ return { rows: s || C || 2, cols: a || T || 2 };
3922
4213
  }
3923
4214
  resize() {
3924
4215
  const { rows: e, cols: t } = this.computeInitialSize();
3925
- for (let n = 0; n < e; n++) this.addRow();
3926
- for (let n = 0; n < t; n++) this.addColumn();
4216
+ for (let n = 0; n < e; n++)
4217
+ this.addRow();
4218
+ for (let n = 0; n < t; n++)
4219
+ this.addColumn();
3927
4220
  }
3928
4221
  updateColWidth() {
3929
4222
  let e = "";
3930
- if (this.colWidthArr && this.colWidthArr.length > 0) for (let t = 0; t < this.colWidthArr.length; t++) e += " " + this.colWidthArr[t] + "px";
4223
+ if (this.colWidthArr && this.colWidthArr.length > 0)
4224
+ for (let t = 0; t < this.colWidthArr.length; t++)
4225
+ e += " " + this.colWidthArr[t] + "px";
3931
4226
  e && this.wrapper.style.setProperty("--col-width", e);
3932
4227
  }
3933
4228
  fill() {
3934
4229
  const e = this.data;
3935
- if (e && e.content) for (let t = 0; t < e.content.length; t++) for (let n = 0; n < e.content[t].length; n++) this.setCellContent(t + 1, n + 1, e.content[t][n]);
4230
+ if (e && e.content)
4231
+ for (let t = 0; t < e.content.length; t++)
4232
+ for (let n = 0; n < e.content[t].length; n++)
4233
+ this.setCellContent(t + 1, n + 1, e.content[t][n]);
3936
4234
  }
3937
4235
  fillRow(e, t) {
3938
4236
  for (let n = 1; n <= t; n++) {
@@ -3964,7 +4262,8 @@ class ii {
3964
4262
  }
3965
4263
  onKeyPressListener(e) {
3966
4264
  if (e.key === "Enter") {
3967
- if (e.shiftKey) return !0;
4265
+ if (e.shiftKey)
4266
+ return !0;
3968
4267
  this.moveCursorToNextRow();
3969
4268
  }
3970
4269
  return e.key !== "Enter";
@@ -3995,10 +4294,11 @@ class ii {
3995
4294
  updateToolboxesPosition(e = this.hoveredRow, t = this.hoveredColumn) {
3996
4295
  this.isColumnMenuShowing || t > 0 && t <= this.numberOfColumns && this.toolboxColumn.show(() => {
3997
4296
  let n = 0;
3998
- for (var s = 0; s < t - 1; s++) n += this.colWidthArr[s];
4297
+ for (var s = 0; s < t - 1; s++)
4298
+ n += this.colWidthArr[s];
3999
4299
  return n += this.colWidthArr[t - 1] / 2, { left: `${n}px` };
4000
4300
  }), this.isRowMenuShowing || e > 0 && e <= this.numberOfRows && this.toolboxRow.show(() => {
4001
- const n = this.getRow(e), { fromTopBorder: s } = Dt(this.table, n), { height: a } = n.getBoundingClientRect();
4301
+ const n = this.getRow(e), { fromTopBorder: s } = Pt(this.table, n), { height: a } = n.getBoundingClientRect();
4002
4302
  return { top: `${Math.ceil(s + a / 2)}px` };
4003
4303
  });
4004
4304
  }
@@ -4019,56 +4319,60 @@ class ii {
4019
4319
  }
4020
4320
  selectRow(e) {
4021
4321
  const t = this.getRow(e);
4022
- t && (this.selectedRow = e, t.classList.add(Pt));
4322
+ t && (this.selectedRow = e, t.classList.add(zt));
4023
4323
  }
4024
4324
  unselectRow() {
4025
- if (this.selectedRow <= 0) return;
4026
- const e = this.table.querySelector(`.${Pt}`);
4027
- e && e.classList.remove(Pt), this.selectedRow = 0;
4325
+ if (this.selectedRow <= 0)
4326
+ return;
4327
+ const e = this.table.querySelector(`.${zt}`);
4328
+ e && e.classList.remove(zt), this.selectedRow = 0;
4028
4329
  }
4029
4330
  selectColumn(e) {
4030
4331
  for (let t = 1; t <= this.numberOfRows; t++) {
4031
4332
  const n = this.getCell(t, e);
4032
- n && n.classList.add(zt);
4333
+ n && n.classList.add(Wt);
4033
4334
  }
4034
4335
  this.selectedColumn = e;
4035
4336
  }
4036
4337
  unselectColumn() {
4037
- if (this.selectedColumn <= 0) return;
4038
- let e = this.table.querySelectorAll(`.${zt}`);
4338
+ if (this.selectedColumn <= 0)
4339
+ return;
4340
+ let e = this.table.querySelectorAll(`.${Wt}`);
4039
4341
  Array.from(e).forEach((t) => {
4040
- t.classList.remove(zt);
4342
+ t.classList.remove(Wt);
4041
4343
  }), this.selectedColumn = 0;
4042
4344
  }
4043
4345
  getHoveredCell(e) {
4044
4346
  let t = this.hoveredRow, n = this.hoveredColumn;
4045
- const { width: s, height: a, x: c, y: g } = function(A, R) {
4046
- const H = A.getBoundingClientRect(), { width: B, height: X, x: ie, y: de } = H, { clientX: fe, clientY: q } = R;
4047
- return { width: B, height: X, x: fe - ie, y: q - de };
4347
+ const { width: s, height: a, x: c, y: g } = function(A, M) {
4348
+ const H = A.getBoundingClientRect(), { width: z, height: X, x: ie, y: de } = H, { clientX: fe, clientY: q } = M;
4349
+ return { width: z, height: X, x: fe - ie, y: q - de };
4048
4350
  }(this.table, e);
4049
4351
  if (c >= 0) {
4050
- const A = ({ fromLeftBorder: H }) => c < H, R = ({ fromRightBorder: H }) => c > s - H;
4051
- n = this.binSearch(this.numberOfColumns, (H) => this.getCell(1, H), A, R);
4352
+ const A = ({ fromLeftBorder: H }) => c < H, M = ({ fromRightBorder: H }) => c > s - H;
4353
+ n = this.binSearch(this.numberOfColumns, (H) => this.getCell(1, H), A, M);
4052
4354
  }
4053
4355
  if (g >= 0) {
4054
- const A = ({ fromTopBorder: H }) => g < H, R = ({ fromBottomBorder: H }) => g > a - H;
4055
- t = this.binSearch(this.numberOfRows, (H) => this.getCell(H, 1), A, R);
4356
+ const A = ({ fromTopBorder: H }) => g < H, M = ({ fromBottomBorder: H }) => g > a - H;
4357
+ t = this.binSearch(this.numberOfRows, (H) => this.getCell(H, 1), A, M);
4056
4358
  }
4057
- const C = t || this.hoveredRow, E = n || this.hoveredColumn, { deltaXCell: b, deltaYCell: M } = this.getMousePositionRelateToCell(C, E, c, g);
4058
- return { row: C, column: E, deltaXCell: b, deltaYCell: M };
4359
+ const C = t || this.hoveredRow, T = n || this.hoveredColumn, { deltaXCell: E, deltaYCell: N } = this.getMousePositionRelateToCell(C, T, c, g);
4360
+ return { row: C, column: T, deltaXCell: E, deltaYCell: N };
4059
4361
  }
4060
4362
  getMousePositionRelateToCell(e, t, n, s) {
4061
- const a = this.getCell(e, t), { fromTopBorder: c, fromLeftBorder: g } = Dt(this.table, a);
4363
+ const a = this.getCell(e, t), { fromTopBorder: c, fromLeftBorder: g } = Pt(this.table, a);
4062
4364
  return { deltaXCell: n - g, deltaYCell: s - c };
4063
4365
  }
4064
4366
  binSearch(e, t, n, s) {
4065
4367
  let a, c = 0, g = e + 1, C = 0;
4066
4368
  for (; c < g - 1 && C < 10; ) {
4067
4369
  a = Math.ceil((c + g) / 2);
4068
- const E = t(a), b = Dt(this.table, E);
4069
- if (n(b)) g = a;
4370
+ const T = t(a), E = Pt(this.table, T);
4371
+ if (n(E))
4372
+ g = a;
4070
4373
  else {
4071
- if (!s(b)) break;
4374
+ if (!s(E))
4375
+ break;
4072
4376
  c = a;
4073
4377
  }
4074
4378
  C++;
@@ -4087,7 +4391,7 @@ class ii {
4087
4391
  document.removeEventListener("click", this.documentClicked);
4088
4392
  }
4089
4393
  }
4090
- class si {
4394
+ class ri {
4091
4395
  static get isReadOnlySupported() {
4092
4396
  return !0;
4093
4397
  }
@@ -4101,7 +4405,7 @@ class si {
4101
4405
  return { icon: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-width="2" d="M10 5V18.5"/><path stroke="currentColor" stroke-width="2" d="M5 10H19"/><rect width="14" height="14" x="5" y="5" stroke="currentColor" stroke-width="2" rx="4"/></svg>', title: "Table" };
4102
4406
  }
4103
4407
  render() {
4104
- return this.table = new ii(this.readOnly, this.api, this.data, this.config), this.container = He("div", this.api.styles.block), this.container.appendChild(this.table.getWrapper()), this.table.setHeadingsSetting(this.data.withHeadings), this.container;
4408
+ return this.table = new si(this.readOnly, this.api, this.data, this.config), this.container = He("div", this.api.styles.block), this.container.appendChild(this.table.getWrapper()), this.table.setHeadingsSetting(this.data.withHeadings), this.container;
4105
4409
  }
4106
4410
  renderSettings() {
4107
4411
  return [{ label: this.api.i18n.t("With headings"), icon: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-width="2" d="M5 10H19"/><rect width="14" height="14" x="5" y="5" stroke="currentColor" stroke-width="2" rx="4"/></svg>', isActive: this.data.withHeadings, closeOnActivate: !0, toggle: !0, hint: { title: this.api.i18n.t("With headings") }, onActivate: () => {
@@ -4134,11 +4438,12 @@ class si {
4134
4438
  function gt(_, e = null, t = {}) {
4135
4439
  const n = document.createElement(_);
4136
4440
  Array.isArray(e) ? n.classList.add(...e) : e !== null && n.classList.add(e);
4137
- for (const s in t) t.hasOwnProperty(s) && (n[s] = t[s]);
4441
+ for (const s in t)
4442
+ t.hasOwnProperty(s) && (n[s] = t[s]);
4138
4443
  return n;
4139
4444
  }
4140
- var Lt = ((_) => (_.Empty = "empty", _.Uploading = "uploading", _.Filled = "filled", _))(Lt || {});
4141
- class ri {
4445
+ var xt = ((_) => (_.Empty = "empty", _.Uploading = "uploading", _.Filled = "filled", _))(xt || {});
4446
+ class oi {
4142
4447
  constructor({ api: e, config: t, onSelectFile: n, readOnly: s }) {
4143
4448
  this.api = e, this.config = t, this.onSelectFile = n, this.readOnly = s, this.nodes = { wrapper: gt("div", [this.CSS.baseClass, this.CSS.wrapper]), imageContainer: gt("div", [this.CSS.imageContainer]), fileButton: this.createFileButton(), imageEl: void 0, imagePreloader: gt("div", this.CSS.imagePreloader), caption: gt("div", [this.CSS.input, this.CSS.caption], { contentEditable: !this.readOnly }) }, this.nodes.caption.dataset.placeholder = this.config.captionPlaceholder, this.nodes.imageContainer.appendChild(this.nodes.imagePreloader), this.nodes.wrapper.appendChild(this.nodes.imageContainer), this.nodes.wrapper.appendChild(this.nodes.caption), this.nodes.wrapper.appendChild(this.nodes.fileButton);
4144
4449
  }
@@ -4165,10 +4470,11 @@ class ri {
4165
4470
  this.nodes.caption !== void 0 && (this.nodes.caption.innerHTML = e);
4166
4471
  }
4167
4472
  toggleStatus(e) {
4168
- for (const t in Lt) if (Object.prototype.hasOwnProperty.call(Lt, t)) {
4169
- const n = Lt[t];
4170
- this.nodes.wrapper.classList.toggle(`${this.CSS.wrapper}--${n}`, n === e);
4171
- }
4473
+ for (const t in xt)
4474
+ if (Object.prototype.hasOwnProperty.call(xt, t)) {
4475
+ const n = xt[t];
4476
+ this.nodes.wrapper.classList.toggle(`${this.CSS.wrapper}--${n}`, n === e);
4477
+ }
4172
4478
  }
4173
4479
  get CSS() {
4174
4480
  return { baseClass: this.api.styles.block, loading: this.api.styles.loader, input: this.api.styles.input, button: this.api.styles.button, wrapper: "image-tool", imageContainer: "image-tool__image", imagePreloader: "image-tool__image-preloader", imageEl: "image-tool__image-picture", caption: "image-tool__caption" };
@@ -4181,18 +4487,18 @@ class ri {
4181
4487
  }), e;
4182
4488
  }
4183
4489
  }
4184
- class oi {
4490
+ class ai {
4185
4491
  constructor({ config: e, onUpload: t, onError: n }) {
4186
4492
  this.config = e, this.onUpload = t, this.onError = n;
4187
4493
  }
4188
4494
  async uploadSelectedFile({ onPreview: e, noSelectedFile: t }) {
4189
4495
  var H;
4190
4496
  let n = "", s = "";
4191
- const a = await function(B = {}) {
4497
+ const a = await function(z = {}) {
4192
4498
  let X = !0;
4193
4499
  return new Promise((ie, de) => {
4194
4500
  let fe = document.createElement("INPUT");
4195
- fe.type = "file", B.multiple && fe.setAttribute("multiple", "multiple"), B.accept && fe.setAttribute("accept", B.accept), fe.style.display = "none", document.body.appendChild(fe), fe.addEventListener("change", (q) => {
4501
+ fe.type = "file", z.multiple && fe.setAttribute("multiple", "multiple"), z.accept && fe.setAttribute("accept", z.accept), fe.style.display = "none", document.body.appendChild(fe), fe.addEventListener("change", (q) => {
4196
4502
  X = !1;
4197
4503
  const ye = q.target.files;
4198
4504
  ie(ye), document.body.removeChild(fe);
@@ -4203,31 +4509,35 @@ class oi {
4203
4509
  }, { once: !0 }), fe.click();
4204
4510
  });
4205
4511
  }({ accept: (H = this.config.types) != null ? H : "image/*" });
4206
- if (!(a && a.length > 0)) return void t();
4207
- (function(B) {
4512
+ if (!(a && a.length > 0))
4513
+ return void t();
4514
+ (function(z) {
4208
4515
  const X = new FileReader();
4209
- X.readAsDataURL(B), X.onload = (ie) => {
4516
+ X.readAsDataURL(z), X.onload = (ie) => {
4210
4517
  e(ie.target.result);
4211
4518
  };
4212
4519
  })(a[0]);
4213
4520
  const c = a[0], g = this.config.types ? this.config.types.split(",") : [];
4214
- let C = c.name.lastIndexOf("."), E = c.name.slice(C);
4215
- if (!g.includes(E.toLowerCase())) return void this.onError("文件类型不支持");
4216
- let b = {};
4521
+ let C = c.name.lastIndexOf("."), T = c.name.slice(C);
4522
+ if (!g.includes(T.toLowerCase()))
4523
+ return void this.onError("文件类型不支持");
4524
+ let E = {};
4217
4525
  if (this.config.tokenInfo) {
4218
- const B = this.config.tokenInfo.token, X = this.config.tokenInfo.tokenName, ie = this.config.tokenInfo.tokenPrefix;
4219
- B && X && (b[X] = ie + " " + B);
4220
- }
4221
- b["Content-Type"] = "application/json";
4222
- const M = Et.create({ timeout: 18e5, headers: b }), A = await M.post(this.config.endpoints.byFile, { fileName: c.name, contentType: c.type });
4223
- if (A.status !== 200) return void this.onError(A.statusText);
4224
- const R = A.data;
4225
- if (!R.success) return void this.onError(R.message);
4226
- n = R.data.cdn, n && !n.endsWith && (n += "/"), s = R.data.objectKey, Et.create({ timeout: 18e5, headers: { "Content-Type": c.type } }).put(R.data.presignedUrl, c).then((B) => {
4526
+ const z = this.config.tokenInfo.token, X = this.config.tokenInfo.tokenName, ie = this.config.tokenInfo.tokenPrefix;
4527
+ z && X && (E[X] = ie + " " + z);
4528
+ }
4529
+ E["Content-Type"] = "application/json";
4530
+ const N = Et.create({ timeout: 18e5, headers: E }), A = await N.post(this.config.endpoints.byFile, { fileName: c.name, contentType: c.type });
4531
+ if (A.status !== 200)
4532
+ return void this.onError(A.statusText);
4533
+ const M = A.data;
4534
+ if (!M.success)
4535
+ return void this.onError(M.message);
4536
+ n = M.data.cdn, n && !n.endsWith && (n += "/"), s = M.data.objectKey, Et.create({ timeout: 18e5, headers: { "Content-Type": c.type } }).put(M.data.presignedUrl, c).then((z) => {
4227
4537
  let X = {};
4228
- X = B.status === 200 ? { success: 1, file: { url: n + s } } : { success: 0, message: B.statusText }, this.onUpload(X);
4229
- }).catch((B) => {
4230
- this.onError(B);
4538
+ X = z.status === 200 ? { success: 1, file: { url: n + s } } : { success: 0, message: z.statusText }, this.onUpload(X);
4539
+ }).catch((z) => {
4540
+ this.onError(z);
4231
4541
  });
4232
4542
  }
4233
4543
  uploadByUrl(e) {
@@ -4237,7 +4547,8 @@ class oi {
4237
4547
  s && a && (n[a] = c + " " + s);
4238
4548
  }
4239
4549
  t = Et.create({ timeout: 18e5, headers: n }).post(this.config.endpoints.byUrl, { url: e, accept: ".jpg,.jpeg,.gif,.png,.webp" }), t.then((s) => {
4240
- if (s.status !== 200 || s.data.success === !1) return void this.onError(s.data.message);
4550
+ if (s.status !== 200 || s.data.success === !1)
4551
+ return void this.onError(s.data.message);
4241
4552
  let a = { success: 1, file: { url: s.data.data.cdn + s.data.data.objectKey } };
4242
4553
  this.onUpload(a);
4243
4554
  }).catch((s) => {
@@ -4247,31 +4558,34 @@ class oi {
4247
4558
  async uploadByFile(e, { onPreview: t }) {
4248
4559
  const n = this.config.types ? this.config.types.split(",") : [];
4249
4560
  let s = e.name.lastIndexOf("."), a = e.name.slice(s);
4250
- if (!n.includes(a.toLowerCase())) return void this.onError("文件类型不支持");
4561
+ if (!n.includes(a.toLowerCase()))
4562
+ return void this.onError("文件类型不支持");
4251
4563
  let c = {};
4252
4564
  if (this.config.tokenInfo) {
4253
- const A = this.config.tokenInfo.token, R = this.config.tokenInfo.tokenName, H = this.config.tokenInfo.tokenPrefix;
4254
- A && R && (c[R] = H + " " + A);
4565
+ const A = this.config.tokenInfo.token, M = this.config.tokenInfo.tokenName, H = this.config.tokenInfo.tokenPrefix;
4566
+ A && M && (c[M] = H + " " + A);
4255
4567
  }
4256
4568
  const g = Et.create({ timeout: 18e5, headers: c });
4257
4569
  c["Content-Type"] = "application/json";
4258
4570
  const C = await g.post(this.config.endpoints.byFile, { fileName: e.name, contentType: e.type });
4259
- if (C.status !== 200) return void this.onError(C.statusText);
4260
- const E = C.data;
4261
- if (!E.success) return void this.onError(E.message);
4262
- let b = E.data.cdn, M = E.data.objectKey;
4263
- b && !b.endsWith && (b += "/"), c["Content-Type"] = e.type, g.put(E.data.presignedUrl, e).then((A) => {
4264
- let R = {};
4265
- R = A.status === 200 ? { success: 1, file: { url: b + M } } : { success: 0, message: A.statusText }, this.onUpload(R);
4571
+ if (C.status !== 200)
4572
+ return void this.onError(C.statusText);
4573
+ const T = C.data;
4574
+ if (!T.success)
4575
+ return void this.onError(T.message);
4576
+ let E = T.data.cdn, N = T.data.objectKey;
4577
+ E && !E.endsWith && (E += "/"), c["Content-Type"] = e.type, g.put(T.data.presignedUrl, e).then((A) => {
4578
+ let M = {};
4579
+ M = A.status === 200 ? { success: 1, file: { url: E + N } } : { success: 0, message: A.statusText }, this.onUpload(M);
4266
4580
  }).catch((A) => {
4267
4581
  this.onError(A);
4268
4582
  });
4269
4583
  }
4270
4584
  }
4271
- class Nt {
4585
+ class At {
4272
4586
  constructor({ data: e, config: t, api: n, readOnly: s, block: a }) {
4273
4587
  var c;
4274
- this.isCaptionEnabled = null, this.api = n, this.block = a, this.config = { endpoints: t.endpoints, additionalRequestData: t.additionalRequestData, additionalRequestHeaders: t.additionalRequestHeaders, field: t.field, types: t.types, captionPlaceholder: this.api.i18n.t((c = t.captionPlaceholder) != null ? c : "Caption"), buttonContent: t.buttonContent, uploader: t.uploader, actions: t.actions, features: t.features || {}, tokenInfo: t.tokenInfo }, this.uploader = new oi({ config: this.config, onUpload: (g) => this.onUpload(g), onError: (g) => this.uploadingFailed(g) }), this.ui = new ri({ api: n, config: this.config, onSelectFile: () => {
4588
+ this.isCaptionEnabled = null, this.api = n, this.block = a, this.config = { endpoints: t.endpoints, additionalRequestData: t.additionalRequestData, additionalRequestHeaders: t.additionalRequestHeaders, field: t.field, types: t.types, captionPlaceholder: this.api.i18n.t((c = t.captionPlaceholder) != null ? c : "Caption"), buttonContent: t.buttonContent, uploader: t.uploader, actions: t.actions, features: t.features || {}, tokenInfo: t.tokenInfo }, this.uploader = new ai({ config: this.config, onUpload: (g) => this.onUpload(g), onError: (g) => this.uploadingFailed(g) }), this.ui = new oi({ api: n, config: this.config, onSelectFile: () => {
4275
4589
  this.uploader.uploadSelectedFile({ onPreview: (g) => {
4276
4590
  this.ui.showPreloader(g);
4277
4591
  }, noSelectedFile: () => {
@@ -4307,19 +4621,20 @@ class Nt {
4307
4621
  }
4308
4622
  renderSettings() {
4309
4623
  var a;
4310
- const e = Nt.tunes.concat(this.config.actions || []), t = { border: "withBorder", background: "withBackground", stretch: "stretched", caption: "caption" };
4624
+ const e = At.tunes.concat(this.config.actions || []), t = { border: "withBorder", background: "withBackground", stretch: "stretched", caption: "caption" };
4311
4625
  ((a = this.config.features) == null ? void 0 : a.caption) === "optional" && e.push({ name: "caption", icon: Sn, title: "With caption", toggle: !0 });
4312
4626
  const n = e.filter((c) => {
4313
- var C, E;
4314
- const g = Object.keys(t).find((b) => t[b] === c.name);
4315
- return g === "caption" ? ((C = this.config.features) == null ? void 0 : C.caption) !== !1 : g == null || ((E = this.config.features) == null ? void 0 : E[g]) !== !1;
4627
+ var C, T;
4628
+ const g = Object.keys(t).find((E) => t[E] === c.name);
4629
+ return g === "caption" ? ((C = this.config.features) == null ? void 0 : C.caption) !== !1 : g == null || ((T = this.config.features) == null ? void 0 : T[g]) !== !1;
4316
4630
  }), s = (c) => {
4317
4631
  var C;
4318
4632
  let g = this.data[c.name];
4319
4633
  return c.name === "caption" && (g = (C = this.isCaptionEnabled) != null ? C : g), g;
4320
4634
  };
4321
4635
  return n.map((c) => ({ icon: c.icon, label: this.api.i18n.t(c.title), name: c.name, toggle: c.toggle, isActive: s(c), onActivate: () => {
4322
- if (typeof c.action == "function") return void c.action(c.name);
4636
+ if (typeof c.action == "function")
4637
+ return void c.action(c.name);
4323
4638
  let g = !s(c);
4324
4639
  c.name === "caption" && (this.isCaptionEnabled = !this.isCaptionEnabled, g = this.isCaptionEnabled), this.tuneToggled(c.name, g);
4325
4640
  } }));
@@ -4351,7 +4666,7 @@ class Nt {
4351
4666
  }
4352
4667
  set data(e) {
4353
4668
  var t;
4354
- this.image = e.file, this._data.caption = e.caption || "", this.ui.fillCaption(this._data.caption), Nt.tunes.forEach(({ name: n }) => {
4669
+ this.image = e.file, this._data.caption = e.caption || "", this.ui.fillCaption(this._data.caption), At.tunes.forEach(({ name: n }) => {
4355
4670
  const s = e[n] !== void 0 && (e[n] === !0 || e[n] === "true");
4356
4671
  this.setTune(n, s);
4357
4672
  }), (e.caption || ((t = this.config.features) == null ? void 0 : t.caption) === !0) && this.setTune("caption", !0);
@@ -4387,10 +4702,10 @@ class Nt {
4387
4702
  this.ui.showPreloader(e), this.uploader.uploadByUrl(e);
4388
4703
  }
4389
4704
  }
4390
- class ai {
4705
+ class li {
4391
4706
  constructor({ api: e, data: t, config: n, block: s }) {
4392
- var a, c, g, C, E, b, M, A, R;
4393
- this.settings = [], this.api = e, this.block = s, this.data = { floatLeft: (a = t == null ? void 0 : t.floatLeft) != null ? a : !1, floatRight: (c = t == null ? void 0 : t.floatRight) != null ? c : !1, center: (g = t == null ? void 0 : t.center) != null ? g : !1, sizeSmall: (C = t == null ? void 0 : t.sizeSmall) != null ? C : !1, sizeMiddle: (E = t == null ? void 0 : t.sizeMiddle) != null ? E : !1, sizeLarge: (b = t == null ? void 0 : t.sizeLarge) != null ? b : !1, resize: (A = (M = t == null ? void 0 : t.resize) != null ? M : n == null ? void 0 : n.resize) != null ? A : !1, resizeSize: (R = t == null ? void 0 : t.resizeSize) != null ? R : 0 }, this.wrapper = void 0, this.buttons = [], this.styles = { settingsButton: "cdx-settings-button", settingsButtonActive: "cdx-settings-button--active", settingsButtonModifier: "", settingsButtonModifierActive: "" };
4707
+ var a, c, g, C, T, E, N, A, M;
4708
+ this.settings = [], this.api = e, this.block = s, this.data = { floatLeft: (a = t == null ? void 0 : t.floatLeft) != null ? a : !1, floatRight: (c = t == null ? void 0 : t.floatRight) != null ? c : !1, center: (g = t == null ? void 0 : t.center) != null ? g : !1, sizeSmall: (C = t == null ? void 0 : t.sizeSmall) != null ? C : !1, sizeMiddle: (T = t == null ? void 0 : t.sizeMiddle) != null ? T : !1, sizeLarge: (E = t == null ? void 0 : t.sizeLarge) != null ? E : !1, resize: (A = (N = t == null ? void 0 : t.resize) != null ? N : n == null ? void 0 : n.resize) != null ? A : !1, resizeSize: (M = t == null ? void 0 : t.resizeSize) != null ? M : 0 }, this.wrapper = void 0, this.buttons = [], this.styles = { settingsButton: "cdx-settings-button", settingsButtonActive: "cdx-settings-button--active", settingsButtonModifier: "", settingsButtonModifierActive: "" };
4394
4709
  }
4395
4710
  static get isTune() {
4396
4711
  return !0;
@@ -4447,7 +4762,8 @@ class ai {
4447
4762
  this.data.floatLeft ? e.classList.add(this.CSS.isFloatLeft) : e.classList.remove(this.CSS.isFloatLeft), this.data.floatRight ? e.classList.add(this.CSS.isFloatRight) : e.classList.remove(this.CSS.isFloatRight), this.data.center ? e.classList.add(this.CSS.isCenter) : e.classList.remove(this.CSS.isCenter), this.data.sizeSmall ? e.classList.add(this.CSS.isSizeSmall) : e.classList.remove(this.CSS.isSizeSmall), this.data.sizeMiddle ? e.classList.add(this.CSS.isSizeMiddle) : e.classList.remove(this.CSS.isSizeMiddle), this.data.sizeLarge ? e.classList.add(this.CSS.isSizeLarge) : e.classList.remove(this.CSS.isSizeLarge), this.data.resize ? (e.classList.add(this.CSS.isResize), this.data.resizeSize > 0 && (e.getElementsByClassName("cdx-block")[0].style.width = this.data.resizeSize + "px"), this.resize(e)) : (e.classList.remove(this.CSS.isResize), this.unresize(e));
4448
4763
  }
4449
4764
  resize(e) {
4450
- if (this.api.readOnly.isEnabled) return;
4765
+ if (this.api.readOnly.isEnabled)
4766
+ return;
4451
4767
  const t = document.createElement("div");
4452
4768
  t.classList.add("resizable");
4453
4769
  const n = document.createElement("div");
@@ -4472,13 +4788,13 @@ class ai {
4472
4788
  resizeClick(e, t, n) {
4473
4789
  const s = document.getElementsByClassName("ce-block__content")[0].clientWidth;
4474
4790
  let a = 0, c = 0;
4475
- const g = (E) => {
4476
- const b = E.clientX - a;
4477
- let M = c;
4478
- t === "right" && (M += b), t === "left" && (M -= b), M > 50 && M < s && (e.style.width = M + "px");
4791
+ const g = (T) => {
4792
+ const E = T.clientX - a;
4793
+ let N = c;
4794
+ t === "right" && (N += E), t === "left" && (N -= E), N > 50 && N < s && (e.style.width = N + "px");
4479
4795
  }, C = () => {
4480
- const E = parseInt(window.getComputedStyle(e).width, 10);
4481
- E > 0 && (this.data.resizeSize = E), document.removeEventListener("mousemove", g), document.removeEventListener("mouseup", C), this.block.dispatchChange();
4796
+ const T = parseInt(window.getComputedStyle(e).width, 10);
4797
+ T > 0 && (this.data.resizeSize = T), document.removeEventListener("mousemove", g), document.removeEventListener("mouseup", C), this.block.dispatchChange();
4482
4798
  };
4483
4799
  document.addEventListener("mousemove", g), document.addEventListener("mouseup", C), a = n.clientX, c = parseInt(window.getComputedStyle(e).width, 10);
4484
4800
  }
@@ -4589,7 +4905,7 @@ class ct {
4589
4905
  return this.saveSel;
4590
4906
  }
4591
4907
  }
4592
- class li {
4908
+ class ci {
4593
4909
  constructor({ api: e, config: t }) {
4594
4910
  this.api = e, this.button = null, this.iconClasses = { base: this.api.styles.inlineToolButton, active: this.api.styles.inlineToolButtonActive }, this.inlineToolUtils = new ct("bold", t.rangy);
4595
4911
  }
@@ -4614,7 +4930,7 @@ class li {
4614
4930
  return "CMD+B";
4615
4931
  }
4616
4932
  }
4617
- class ci {
4933
+ class di {
4618
4934
  constructor({ api: e, config: t }) {
4619
4935
  this.api = e, this.button = null, this.iconClasses = { base: this.api.styles.inlineToolButton, active: this.api.styles.inlineToolButtonActive }, this.inlineToolUtils = new ct("strikethrough", t.rangy);
4620
4936
  }
@@ -4639,7 +4955,7 @@ class ci {
4639
4955
  return "CMD+SHIFT+X";
4640
4956
  }
4641
4957
  }
4642
- class di {
4958
+ class hi {
4643
4959
  constructor({ api: e, config: t }) {
4644
4960
  this.api = e, this.button = null, this.iconClasses = { base: this.api.styles.inlineToolButton, active: this.api.styles.inlineToolButtonActive }, this.inlineToolUtils = new ct("italic", t.rangy);
4645
4961
  }
@@ -4664,7 +4980,7 @@ class di {
4664
4980
  return "CMD+I";
4665
4981
  }
4666
4982
  }
4667
- class hi {
4983
+ class ui {
4668
4984
  constructor({ api: e, config: t }) {
4669
4985
  this.api = e, this.button = null, this.iconClasses = { base: this.api.styles.inlineToolButton, active: this.api.styles.inlineToolButtonActive }, this.inlineToolUtils = new ct("code", t.rangy);
4670
4986
  }
@@ -4689,7 +5005,7 @@ class hi {
4689
5005
  return "CMD+SHIFT+C";
4690
5006
  }
4691
5007
  }
4692
- class ui {
5008
+ class pi {
4693
5009
  constructor({ api: e, config: t }) {
4694
5010
  this.api = e, this.button = null, this.iconClasses = { base: this.api.styles.inlineToolButton, active: this.api.styles.inlineToolButtonActive }, this.inlineToolUtils = new ct("underline", t.rangy);
4695
5011
  }
@@ -4714,7 +5030,7 @@ class ui {
4714
5030
  return "CMD+U";
4715
5031
  }
4716
5032
  }
4717
- class pi {
5033
+ class gi {
4718
5034
  constructor({ api: e, config: t }) {
4719
5035
  this.api = e, this.button = null, this.iconClasses = { base: this.api.styles.inlineToolButton, active: this.api.styles.inlineToolButtonActive }, this.inlineToolUtils = new ct("mark", t.rangy);
4720
5036
  }
@@ -4736,9 +5052,9 @@ class pi {
4736
5052
  return { span: { class: !0 } };
4737
5053
  }
4738
5054
  }
4739
- class gi {
5055
+ class fi {
4740
5056
  constructor({ api: e, config: t }) {
4741
- this.ENTER_KEY = 13, this.inputOpened = !1, this.button = null, this.input = null, this.okbtn = null, this.toolbar = e.toolbar, this.inlineToolbar = e.inlineToolbar, this.i18n = e.i18n, this.selection = new xt(), this.iconClasses = { base: e.styles.inlineToolButton, active: e.styles.inlineToolButtonActive }, this.inlineToolUtils = new ct("link", t.rangy);
5057
+ this.ENTER_KEY = 13, this.inputOpened = !1, this.button = null, this.input = null, this.okbtn = null, this.toolbar = e.toolbar, this.inlineToolbar = e.inlineToolbar, this.i18n = e.i18n, this.selection = new Rt(), this.iconClasses = { base: e.styles.inlineToolButton, active: e.styles.inlineToolButtonActive }, this.inlineToolUtils = new ct("link", t.rangy);
4742
5058
  }
4743
5059
  static get isInline() {
4744
5060
  return !0;
@@ -4767,14 +5083,16 @@ class gi {
4767
5083
  enterPressed(e) {
4768
5084
  var n;
4769
5085
  let t = ((n = this.input) == null ? void 0 : n.value) || "";
4770
- if (!t.trim()) return this.selection.restore(), e.preventDefault(), void this.closeActions();
5086
+ if (!t.trim())
5087
+ return this.selection.restore(), e.preventDefault(), void this.closeActions();
4771
5088
  this.validateURL(t) && (t = this.prepareLink(t), this.selection.restore(), this.selection.removeFakeBackground(), this.insertLink(t), e.preventDefault(), e.stopPropagation(), e.stopImmediatePropagation(), this.selection.collapseToEnd(), this.inlineToolbar.close());
4772
5089
  }
4773
5090
  prepareLink(e) {
4774
5091
  return e = e.trim(), e = this.addProtocol(e);
4775
5092
  }
4776
5093
  addProtocol(e) {
4777
- if (/^(\w+):(\/\/)?/.test(e)) return e;
5094
+ if (/^(\w+):(\/\/)?/.test(e))
5095
+ return e;
4778
5096
  const t = /^\/[^/\s]/.test(e), n = e.substring(0, 1) === "#", s = /^\/\/[^/\s]/.test(e);
4779
5097
  return t || n || s || (e = "http://" + e), e;
4780
5098
  }
@@ -4802,7 +5120,7 @@ class gi {
4802
5120
  closeActions(e = !0) {
4803
5121
  var t;
4804
5122
  if (this.selection.isFakeBackgroundEnabled) {
4805
- const n = new xt();
5123
+ const n = new Rt();
4806
5124
  n.save(), this.selection.restore(), this.selection.removeFakeBackground(), n.restore();
4807
5125
  }
4808
5126
  (t = this.input) == null || t.setAttribute("value", ""), e && this.selection.clearSaved(), this.inputOpened = !1;
@@ -4823,9 +5141,9 @@ class gi {
4823
5141
  this.inlineToolUtils.unWrapByPropertys({ href: e, target: "_blank" });
4824
5142
  }
4825
5143
  }
4826
- class fi {
5144
+ class mi {
4827
5145
  constructor({ api: e, config: t }) {
4828
- this.button = null, this.colors = { none: "inherit", "#646a73": "cel-inline-gray-text", "#d83931": "cel-inline-pink-text", "#de7802": "cel-inline-orange-text", "#dc9b04": "cel-inline-yellow-text", "#2ea121": "cel-inline-green-text", "#245bdb": "cel-inline-blue-text", "#6425d0": "cel-inline-purple-text" }, this.columns = 3, this.colorOpened = !1, this.api = e, this.iconClasses = { base: e.styles.inlineToolButton, active: e.styles.inlineToolButtonActive }, this.rangy = t.rangy, this.selection = new xt();
5146
+ this.button = null, this.colors = { none: "inherit", "#646a73": "cel-inline-gray-text", "#d83931": "cel-inline-pink-text", "#de7802": "cel-inline-orange-text", "#dc9b04": "cel-inline-yellow-text", "#2ea121": "cel-inline-green-text", "#245bdb": "cel-inline-blue-text", "#6425d0": "cel-inline-purple-text" }, this.columns = 4, this.colorOpened = !1, this.api = e, this.iconClasses = { base: e.styles.inlineToolButton, active: e.styles.inlineToolButtonActive }, this.rangy = t.rangy, this.selection = new Rt();
4829
5147
  }
4830
5148
  static get isInline() {
4831
5149
  return !0;
@@ -4862,7 +5180,7 @@ class fi {
4862
5180
  this.colorOpened = !0;
4863
5181
  }
4864
5182
  closeActions(e = !0) {
4865
- const t = new xt();
5183
+ const t = new Rt();
4866
5184
  t.save(), this.selection.restore(), t.restore(), e && this.selection.clearSaved(), this.colorOpened = !1;
4867
5185
  }
4868
5186
  findStateColor() {
@@ -4894,11 +5212,11 @@ class fi {
4894
5212
  }
4895
5213
  }
4896
5214
  }
4897
- const mi = { class: "ebl-editor", id: "holder" }, vi = Rn({ name: "EblEditor", inheritAttrs: !1, __name: "Editor", props: { readOnly: { type: Boolean, default: !1 }, placeholder: { default: "Enter something" }, data: { default: () => ({ blocks: [] }) }, locale: { default: {} }, tokenInfo: { default: { token: "", tokenName: "Authorization", tokenPrefix: "Bearer" } } }, emits: ["onReady", "onChange"], setup(_, { expose: e, emit: t }) {
5215
+ const vi = { class: "ebl-editor", id: "holder" }, Ci = Rn({ name: "EblEditor", inheritAttrs: !1, __name: "Editor", props: { readOnly: { type: Boolean, default: !1 }, placeholder: { default: "Enter something" }, data: { default: () => ({ blocks: [] }) }, locale: { default: {} }, tokenInfo: { default: { token: "", tokenName: "Authorization", tokenPrefix: "Bearer" } } }, emits: ["onReady", "onChange"], setup(_, { expose: e, emit: t }) {
4898
5216
  let n = Fn();
4899
5217
  n = Un(n), n = function(H) {
4900
- return H.createModule("SaveRestore", ["WrappedSelection"], function(B, X) {
4901
- var ie = B.dom, de = ie.removeNode, fe = B.Selection.isDirectionBackward;
5218
+ return H.createModule("SaveRestore", ["WrappedSelection"], function(z, X) {
5219
+ var ie = z.dom, de = ie.removeNode, fe = z.Selection.isDirectionBackward;
4902
5220
  function q(V, re) {
4903
5221
  return (re || document).getElementById(V);
4904
5222
  }
@@ -4910,11 +5228,11 @@ const mi = { class: "ebl-editor", id: "holder" }, vi = Rn({ name: "EblEditor", i
4910
5228
  var le = q(Q, V);
4911
5229
  le ? (re[ae ? "setStartBefore" : "setEndBefore"](le), de(le)) : X.warn("Marker element has been removed. Cannot restore selection.");
4912
5230
  }
4913
- function Ae(V, re) {
5231
+ function Ne(V, re) {
4914
5232
  return re.compareBoundaryPoints(V.START_TO_START, V);
4915
5233
  }
4916
5234
  function Be(V, re) {
4917
- var Q, ae = B.DomRange.getRangeDocument(V), le = V.toString(), ve = fe(re);
5235
+ var Q, ae = z.DomRange.getRangeDocument(V), le = V.toString(), ve = fe(re);
4918
5236
  return V.collapsed ? { document: ae, markerId: (Q = ye(V, !1)).id, collapsed: !0 } : (Q = ye(V, !1), { document: ae, startMarkerId: ye(V, !0).id, endMarkerId: Q.id, collapsed: !1, backward: ve, toString: function() {
4919
5237
  return "original text: '" + le + "', new text: '" + V.toString() + "'";
4920
5238
  } });
@@ -4922,95 +5240,104 @@ const mi = { class: "ebl-editor", id: "holder" }, vi = Rn({ name: "EblEditor", i
4922
5240
  function Ye(V, re) {
4923
5241
  var Q = V.document;
4924
5242
  re === void 0 && (re = !0);
4925
- var ae = B.createRange(Q);
5243
+ var ae = z.createRange(Q);
4926
5244
  if (V.collapsed) {
4927
5245
  var le = q(V.markerId, Q);
4928
5246
  if (le) {
4929
5247
  le.style.display = "inline";
4930
5248
  var ve = le.previousSibling;
4931
5249
  ve && ve.nodeType == 3 ? (de(le), ae.collapseToPoint(ve, ve.length)) : (ae.collapseBefore(le), de(le));
4932
- } else X.warn("Marker element has been removed. Cannot restore selection.");
4933
- } else $e(Q, ae, V.startMarkerId, !0), $e(Q, ae, V.endMarkerId, !1);
5250
+ } else
5251
+ X.warn("Marker element has been removed. Cannot restore selection.");
5252
+ } else
5253
+ $e(Q, ae, V.startMarkerId, !0), $e(Q, ae, V.endMarkerId, !1);
4934
5254
  return re && ae.normalizeBoundaries(), ae;
4935
5255
  }
4936
- function Oe(V, re) {
5256
+ function Me(V, re) {
4937
5257
  var Q, ae, le = [], ve = fe(re);
4938
- (V = V.slice(0)).sort(Ae);
4939
- for (var p = 0, x = V.length; p < x; ++p) le[p] = Be(V[p], ve);
4940
- for (p = x - 1; p >= 0; --p) Q = V[p], ae = B.DomRange.getRangeDocument(Q), Q.collapsed ? Q.collapseAfter(q(le[p].markerId, ae)) : (Q.setEndBefore(q(le[p].endMarkerId, ae)), Q.setStartAfter(q(le[p].startMarkerId, ae)));
5258
+ (V = V.slice(0)).sort(Ne);
5259
+ for (var p = 0, x = V.length; p < x; ++p)
5260
+ le[p] = Be(V[p], ve);
5261
+ for (p = x - 1; p >= 0; --p)
5262
+ Q = V[p], ae = z.DomRange.getRangeDocument(Q), Q.collapsed ? Q.collapseAfter(q(le[p].markerId, ae)) : (Q.setEndBefore(q(le[p].endMarkerId, ae)), Q.setStartAfter(q(le[p].startMarkerId, ae)));
4941
5263
  return le;
4942
5264
  }
4943
- function _e(V) {
4944
- for (var re = [], Q = V.length - 1; Q >= 0; Q--) re[Q] = Ye(V[Q], !0);
5265
+ function Ae(V) {
5266
+ for (var re = [], Q = V.length - 1; Q >= 0; Q--)
5267
+ re[Q] = Ye(V[Q], !0);
4945
5268
  return re;
4946
5269
  }
4947
5270
  function De(V, re) {
4948
5271
  var Q = q(re, V);
4949
5272
  Q && de(Q);
4950
5273
  }
4951
- B.util.extend(B, { saveRange: Be, restoreRange: Ye, saveRanges: Oe, restoreRanges: _e, saveSelection: function(V) {
4952
- if (!B.isSelectionValid(V)) return X.warn("Cannot save selection. This usually happens when the selection is collapsed and the selection document has lost focus."), null;
4953
- var re = B.getSelection(V), Q = re.getAllRanges(), ae = Q.length == 1 && re.isBackward(), le = Oe(Q, ae);
5274
+ z.util.extend(z, { saveRange: Be, restoreRange: Ye, saveRanges: Me, restoreRanges: Ae, saveSelection: function(V) {
5275
+ if (!z.isSelectionValid(V))
5276
+ return X.warn("Cannot save selection. This usually happens when the selection is collapsed and the selection document has lost focus."), null;
5277
+ var re = z.getSelection(V), Q = re.getAllRanges(), ae = Q.length == 1 && re.isBackward(), le = Me(Q, ae);
4954
5278
  return ae ? re.setSingleRange(Q[0], ae) : re.setRanges(Q), { win: V, rangeInfos: le, restored: !1 };
4955
5279
  }, restoreSelection: function(V, re) {
4956
5280
  if (!V.restored) {
4957
- var Q = V.rangeInfos, ae = B.getSelection(V.win), le = _e(Q);
4958
- Q.length == 1 && re && B.features.selectionHasExtend && Q[0].backward ? (ae.removeAllRanges(), ae.addRange(le[0], !0)) : ae.setRanges(le), V.restored = !0;
5281
+ var Q = V.rangeInfos, ae = z.getSelection(V.win), le = Ae(Q);
5282
+ Q.length == 1 && re && z.features.selectionHasExtend && Q[0].backward ? (ae.removeAllRanges(), ae.addRange(le[0], !0)) : ae.setRanges(le), V.restored = !0;
4959
5283
  }
4960
5284
  }, removeMarkerElement: De, removeMarkers: function(V) {
4961
- for (var re, Q = V.rangeInfos, ae = 0, le = Q.length; ae < le; ++ae) (re = Q[ae]).collapsed ? De(V.doc, re.markerId) : (De(V.doc, re.startMarkerId), De(V.doc, re.endMarkerId));
5285
+ for (var re, Q = V.rangeInfos, ae = 0, le = Q.length; ae < le; ++ae)
5286
+ (re = Q[ae]).collapsed ? De(V.doc, re.markerId) : (De(V.doc, re.startMarkerId), De(V.doc, re.endMarkerId));
4962
5287
  } });
4963
5288
  }), H;
4964
5289
  }(n);
4965
5290
  const s = Nn("EblEditorSettings");
4966
5291
  let a = t;
4967
5292
  const c = _;
4968
- let g = { blocks: [] }, C = null, E = null;
4969
- const b = ["indent", "blockAlignment"], M = ["linkTool", "boldTool", "strikethrough", "italicTool", "inlineCode", "underline", "Color", "marker"];
5293
+ let g = { blocks: [] }, C = null, T = null;
5294
+ const E = ["indent", "blockAlignment"], N = ["linkTool", "boldTool", "strikethrough", "italicTool", "inlineCode", "underline", "Color", "marker"];
4970
5295
  An(() => {
4971
- n.init(), C = new Hn({ minHeight: 300, holder: "holder", autofocus: !0, defaultBlock: "paragraph", placeholder: c.placeholder, tunes: b, tools: { linkTool: { class: gi, config: { rangy: n }, shortcut: "CMD+K" }, boldTool: { class: li, config: { rangy: n }, shortcut: "CMD+B" }, strikethrough: { class: ci, config: { rangy: n }, shortcut: "CMD+SHIFT+X" }, italicTool: { class: di, config: { rangy: n }, shortcut: "CMD+I" }, inlineCode: { class: hi, config: { rangy: n }, shortcut: "CMD+SHIFT+C" }, underline: { class: ui, config: { rangy: n }, shortcut: "CMD+U" }, Color: { class: fi, config: { rangy: n } }, marker: { class: pi, config: { rangy: n } }, indent: { class: $t }, alert: { class: et, inlineToolbar: M }, List: { class: Rt, inlineToolbar: M, config: { defaultStyle: "checklist", maxLevel: 4 } }, h1: { class: Vn, inlineToolbar: M }, h2: { class: Kn, inlineToolbar: M }, h3: { class: Yn, inlineToolbar: M }, h4: { class: Gn, inlineToolbar: M }, h5: { class: Xn, inlineToolbar: M }, h6: { class: Qn, inlineToolbar: M }, paragraph: { class: Vt, inlineToolbar: M }, blockAlignment: { class: qt, inlineToolbar: !1 }, code: { tunes: [], class: St, config: { lang: "javascript", theme: "github-dark-dimmed" } }, quote: { tunes: ["blockAlignment"], class: Zn, inlineToolbar: M }, delimiter: Jn, table: { class: si, inlineToolbar: M, config: { rows: 2, cols: 3 } }, image: { class: Nt, inlineToolbar: !1, tunes: b.concat(["imageResize"]), config: { types: ".png,.jpeg,.jpg,.gif,.webp", tokenInfo: c.tokenInfo, endpoints: { byFile: s == null ? void 0 : s.fileUploadEndpoint }, features: { caption: !1, stretch: !1, border: !1, background: !1 } } }, imageResize: { class: ai, config: { resize: !0, crop: !1 } } }, readOnly: c.readOnly, i18n: c.locale, onChange: (H, B) => {
4972
- a("onChange", H, B);
5296
+ n.init(), C = new Hn({ minHeight: 300, holder: "holder", autofocus: !0, defaultBlock: "paragraph", placeholder: c.placeholder, tunes: E, tools: { linkTool: { class: fi, config: { rangy: n }, shortcut: "CMD+K" }, boldTool: { class: ci, config: { rangy: n }, shortcut: "CMD+B" }, strikethrough: { class: di, config: { rangy: n }, shortcut: "CMD+SHIFT+X" }, italicTool: { class: hi, config: { rangy: n }, shortcut: "CMD+I" }, inlineCode: { class: ui, config: { rangy: n }, shortcut: "CMD+SHIFT+C" }, underline: { class: pi, config: { rangy: n }, shortcut: "CMD+U" }, Color: { class: mi, config: { rangy: n } }, marker: { class: gi, config: { rangy: n } }, indent: { class: ni }, alert: { class: et, inlineToolbar: N }, List: { class: Nt, inlineToolbar: N, config: { defaultStyle: "checklist", maxLevel: 4 } }, h1: { class: Vn, inlineToolbar: N }, h2: { class: Kn, inlineToolbar: N }, h3: { class: Yn, inlineToolbar: N }, h4: { class: Gn, inlineToolbar: N }, h5: { class: Xn, inlineToolbar: N }, h6: { class: Qn, inlineToolbar: N }, paragraph: { class: Vt, inlineToolbar: N }, blockAlignment: { class: qt, inlineToolbar: !1 }, code: { tunes: [], class: St, config: { lang: "javascript", theme: "github-dark-dimmed" } }, quote: { tunes: ["blockAlignment"], class: Zn, inlineToolbar: N }, delimiter: Jn, table: { class: ri, inlineToolbar: N, config: { rows: 2, cols: 3 } }, image: { class: At, inlineToolbar: !1, tunes: E.concat(["imageResize"]), config: { types: ".png,.jpeg,.jpg,.gif,.webp", tokenInfo: c.tokenInfo, endpoints: { byFile: s == null ? void 0 : s.fileUploadEndpoint }, features: { caption: !1, stretch: !1, border: !1, background: !1 } } }, imageResize: { class: li, config: { resize: !0, crop: !1 } } }, readOnly: c.readOnly, i18n: c.locale, onChange: (H, z) => {
5297
+ a("onChange", H, z);
4973
5298
  }, onReady: () => {
4974
- new jn("holder", c.readOnly, C, "1px solid #999"), new $n("holder", c.readOnly), new qn("holder", c.readOnly, C), c.data && c.data.blocks && c.data.blocks.length > 0 && (E = new ti({ editor: C, config: { debounceTimer: 200, maxLength: 100 }, onUpdate: () => {
4975
- } }), g = Ot(c.data), E.initialize(g), R(g)), a("onReady");
5299
+ new jn("holder", c.readOnly, C, "1px solid #999"), new $n("holder", c.readOnly), new qn("holder", c.readOnly, C), c.data && c.data.blocks && c.data.blocks.length > 0 && (T = new ti({ editor: C, config: { debounceTimer: 200, maxLength: 100 }, onUpdate: () => {
5300
+ } }), g = It(c.data), T.initialize(g), M(g)), a("onReady");
4976
5301
  } });
4977
5302
  }), _n(() => {
4978
5303
  C !== null && (C.destroy(), C = null);
4979
5304
  });
4980
5305
  let A = !1;
4981
- function R(H) {
5306
+ function M(H) {
4982
5307
  A || (A = !0, C != null && C.isReady.then(() => {
4983
5308
  C != null && C.render(H).then(() => {
4984
5309
  A = !1;
4985
5310
  });
4986
5311
  }));
4987
5312
  }
4988
- return Mn(() => c.data, (H, B) => {
4989
- H && H.blocks && H.blocks.length !== 0 && (g = Ot(H), R(Ot(H)), E != null && (E.clear(), E.initialize(g)));
5313
+ return Mn(() => c.data, (H, z) => {
5314
+ H && H.blocks && H.blocks.length !== 0 && (g = It(H), M(It(H)), T != null && (T.clear(), T.initialize(g)));
4990
5315
  }, { deep: !0 }), e({ validate: function() {
4991
- return new Promise((H, B) => {
4992
- if (C === null) return H(!1);
5316
+ return new Promise((H, z) => {
5317
+ if (C === null)
5318
+ return H(!1);
4993
5319
  C.save().then((X) => X.blocks.length > 0 ? H(!0) : H(!1));
4994
5320
  });
4995
5321
  }, getData: function() {
4996
- return new Promise((H, B) => {
4997
- if (C === null) return H(null);
5322
+ return new Promise((H, z) => {
5323
+ if (C === null)
5324
+ return H(null);
4998
5325
  C.save().then((X) => H(X));
4999
5326
  });
5000
- } }), (H, B) => (In(), On("div", mi));
5001
- } }), yn = [vi];
5327
+ } }), (H, z) => (On(), In("div", vi));
5328
+ } }), yn = [Ci];
5002
5329
  let En = [];
5003
5330
  for (let _ in yn) {
5004
5331
  const e = Wn(yn[_]);
5005
5332
  En.push(e);
5006
5333
  }
5007
- const Ti = { messages: { ui: { blockTunes: { toggler: { "Click to tune": "可拖拽和点击" } }, toolbar: { toolbox: { Add: "添加", Filter: "过滤", "Nothing found": "无内容" }, popover: { Filter: "过滤", "Nothing found": "无内容" } }, popover: { Filter: "筛选", "Nothing found": "未找到任何内容", "Convert to": "转化为", "Add below": "在下方插入" } }, toolNames: { Text: "段落", H1: "一级标题", H2: "二级标题", H3: "三级标题", H4: "四级标题", H5: "五级标题", H6: "六级标题", "Ordered List": "有序列表", "Unordered List": "无序列表", Checklist: "任务列表", Quote: "引用", Code: "代码块", Delimiter: "分割线", Link: "链接", LinkTool: "链接", Bold: "加粗", BoldTool: "粗体", Italic: "倾斜", ItalicTool: "斜体", Alert: "高亮块", indent: "缩进", Marker: "文本高亮", Color: "文本颜色", Underline: "下划线", InlineCode: "行内代码", Table: "表格", Image: "图片", Strikethrough: "删除线" }, tools: { image: { "Couldn’t upload image. Please try another.": "上传图片失败,请稍后重试。" }, table: { "Add row above": "在上面插入行", "Add row below": "在下面插入行", "Delete row": "删除行", "Add column to left": "在左边插入列", "Add column to right": "在右边插入列", "Delete column": "删除列", "With headings": "使用标题行", "Without headings": "不使用标题行" }, marker: { Marker: "突出显示" }, linkTool: { "Add a link": "添加链接", Save: "确定", "Pasted link is not valid.": "链接地址无效" }, List: { Unordered: "无序", Ordered: "有序", Checklist: "任务列表", "Counter type": "计数器类型", Numeric: "阿拉伯数字", "Lower Roman": "小写罗马数字", "Upper Roman": "大写罗马数字", "Lower Alpha": "小写字母", "Upper Alpha": "大写字母", "Start with": "开始序号" }, paragraph: { "Enter something": "请输入内容" }, stub: { "The block can not be displayed correctly.": "该模块不能放置在这里" }, code: { "Enter your code": "输入代码", Copied: "已复制", "Unable to copy": "复制失败" }, convertTo: { "Convert to": "转化为" }, alert: { "alert-primary": "主要样式", "alert-secondary": "次要样式", "alert-info": "信息", "alert-success": "成功", "alert-warning": "警告", "alert-danger": "危险", "alert-light": "浅色", "alert-dark": "深色", "align-left": "左对齐", "align-center": "居中", "align-right": "右对齐", "Type here...": "输入内容" }, Color: { "#646a73": "灰色", "#d83931": "红色", "#de7802": "橙色", "#dc9b04": "黄色", "#2ea121": "绿色", "#245bdb": "蓝色", "#6425d0": "紫色", none: "恢复默认" } }, blockTunes: { delete: { Delete: "删除", "Click to delete": "点击删除" }, moveUp: { "Move up": "向上移" }, moveDown: { "Move down": "向下移" }, filter: { Filter: "过滤" }, blockAlignment: { "left align": "左对齐", "center align": "居中对齐", "right align": "右对齐", "justify align": "两端对齐" }, indent: { "Indent right": "向右缩进", "Indent left": "向左缩进" } } } }, Ln = /* @__PURE__ */ ((_ = []) => ({ version: "2.31.55", install: (e, t) => {
5334
+ const Ei = { messages: { ui: { blockTunes: { toggler: { "Click to tune": "可拖拽和点击" } }, toolbar: { toolbox: { Add: "添加", Filter: "过滤", "Nothing found": "无内容" }, popover: { Filter: "过滤", "Nothing found": "无内容" } }, popover: { Filter: "筛选", "Nothing found": "未找到任何内容", "Convert to": "转化为", "Add below": "在下方插入" } }, toolNames: { Text: "段落", H1: "一级标题", H2: "二级标题", H3: "三级标题", H4: "四级标题", H5: "五级标题", H6: "六级标题", "Ordered List": "有序列表", "Unordered List": "无序列表", Checklist: "任务列表", Quote: "引用", Code: "代码块", Delimiter: "分割线", Link: "链接", LinkTool: "链接", Bold: "加粗", BoldTool: "粗体", Italic: "倾斜", ItalicTool: "斜体", Alert: "高亮块", indent: "缩进", Marker: "文本高亮", Color: "文本颜色", Underline: "下划线", InlineCode: "行内代码", Table: "表格", Image: "图片", Strikethrough: "删除线" }, tools: { image: { "Couldn’t upload image. Please try another.": "上传图片失败,请稍后重试。" }, table: { "Add row above": "在上面插入行", "Add row below": "在下面插入行", "Delete row": "删除行", "Add column to left": "在左边插入列", "Add column to right": "在右边插入列", "Delete column": "删除列", "With headings": "使用标题行", "Without headings": "不使用标题行" }, marker: { Marker: "突出显示" }, linkTool: { "Add a link": "添加链接", Save: "确定", "Pasted link is not valid.": "链接地址无效" }, List: { Unordered: "无序", Ordered: "有序", Checklist: "任务列表", "Convert to Unordered": "转化为无序列表", "Convert to Ordered": "转化为有序列表", "Convert to Checklist": "转化为任务列表", "Counter type": "计数器类型", Numeric: "阿拉伯数字", "Lower Roman": "小写罗马数字", "Upper Roman": "大写罗马数字", "Lower Alpha": "小写字母", "Upper Alpha": "大写字母", "Start with": "开始序号" }, paragraph: { "Enter something": "请输入内容" }, stub: { "The block can not be displayed correctly.": "该模块不能放置在这里" }, code: { "Enter your code": "输入代码", Copied: "已复制", "Unable to copy": "复制失败" }, convertTo: { "Convert to": "转化为" }, alert: { "alert-primary": "主要样式", "alert-secondary": "次要样式", "alert-info": "信息", "alert-success": "成功", "alert-warning": "警告", "alert-danger": "危险", "alert-light": "浅色", "alert-dark": "深色", "align-left": "左对齐", "align-center": "居中", "align-right": "右对齐", "Type here...": "输入内容" }, Color: { "#646a73": "灰色", "#d83931": "红色", "#de7802": "橙色", "#dc9b04": "黄色", "#2ea121": "绿色", "#245bdb": "蓝色", "#6425d0": "紫色", none: "恢复默认" } }, blockTunes: { delete: { Delete: "删除", "Click to delete": "点击删除" }, moveUp: { "Move up": "向上移" }, moveDown: { "Move down": "向下移" }, filter: { Filter: "过滤" }, blockAlignment: { "left align": "左对齐", "center align": "居中对齐", "right align": "右对齐", "justify align": "两端对齐" }, indent: { "Indent right": "向右缩进", "Indent left": "向左缩进" } } } }, Ln = ((_ = []) => ({ version: "2.31.57", install: (e, t) => {
5008
5335
  e[Yt] || (e[Yt] = !0, _.forEach((n) => e.use(n)), e.provide("EblEditorSettings", t));
5009
- } }))(En), Ei = Ln.install, Li = Ln.version;
5336
+ } }))(En), Li = Ln.install, xi = Ln.version;
5010
5337
  export {
5011
- vi as EblEditor,
5338
+ Ci as EblEditor,
5012
5339
  Ln as default,
5013
- Ei as install,
5014
- Li as version,
5015
- Ti as zhCn
5340
+ Li as install,
5341
+ xi as version,
5342
+ Ei as zhCn
5016
5343
  };