@wangeditor-next/list-module 1.1.11 → 1.1.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/src/config/index.d.ts +13 -0
- package/dist/core/src/config/interface.d.ts +58 -0
- package/dist/core/src/config/register.d.ts +12 -0
- package/dist/core/src/constants/index.d.ts +1 -0
- package/dist/core/src/constants/svg.d.ts +12 -0
- package/dist/core/src/create/bind-node-relation.d.ts +15 -0
- package/dist/core/src/create/create-editor.d.ts +21 -0
- package/dist/core/src/create/create-toolbar.d.ts +14 -0
- package/dist/core/src/create/helper.d.ts +30 -0
- package/dist/core/src/create/index.d.ts +7 -0
- package/dist/core/src/editor/dom-editor.d.ts +143 -0
- package/dist/core/src/editor/interface.d.ts +67 -0
- package/dist/core/src/editor/plugins/with-config.d.ts +7 -0
- package/dist/core/src/editor/plugins/with-content.d.ts +7 -0
- package/dist/core/src/editor/plugins/with-dom.d.ts +10 -0
- package/dist/core/src/editor/plugins/with-emitter.d.ts +7 -0
- package/dist/core/src/editor/plugins/with-event-data.d.ts +7 -0
- package/dist/core/src/editor/plugins/with-max-length.d.ts +7 -0
- package/dist/core/src/editor/plugins/with-selection.d.ts +7 -0
- package/dist/core/src/i18n/index.d.ts +32 -0
- package/dist/core/src/index.d.ts +32 -0
- package/dist/core/src/menus/bar/HoverBar.d.ts +48 -0
- package/dist/core/src/menus/bar/Toolbar.d.ts +35 -0
- package/dist/core/src/menus/bar-item/BaseButton.d.ts +26 -0
- package/dist/core/src/menus/bar-item/DropPanelButton.d.ts +14 -0
- package/dist/core/src/menus/bar-item/GroupButton.d.ts +17 -0
- package/dist/core/src/menus/bar-item/ModalButton.d.ts +25 -0
- package/dist/core/src/menus/bar-item/Select.d.ts +22 -0
- package/dist/core/src/menus/bar-item/SimpleButton.d.ts +11 -0
- package/dist/core/src/menus/bar-item/index.d.ts +24 -0
- package/dist/core/src/menus/bar-item/tooltip.d.ts +6 -0
- package/dist/core/src/menus/helpers/helpers.d.ts +18 -0
- package/dist/core/src/menus/helpers/position.d.ts +36 -0
- package/dist/core/src/menus/index.d.ts +9 -0
- package/dist/core/src/menus/interface.d.ts +66 -0
- package/dist/core/src/menus/panel-and-modal/BaseClass.d.ts +26 -0
- package/dist/core/src/menus/panel-and-modal/DropPanel.d.ts +14 -0
- package/dist/core/src/menus/panel-and-modal/Modal.d.ts +44 -0
- package/dist/core/src/menus/panel-and-modal/SelectList.d.ts +20 -0
- package/dist/core/src/menus/register.d.ts +16 -0
- package/dist/core/src/parse-html/helper.d.ts +10 -0
- package/dist/core/src/parse-html/index.d.ts +35 -0
- package/dist/core/src/parse-html/parse-common-elem-html.d.ts +15 -0
- package/dist/core/src/parse-html/parse-elem-html.d.ts +15 -0
- package/dist/core/src/parse-html/parse-text-elem-html.d.ts +15 -0
- package/dist/core/src/render/element/getRenderElem.d.ts +11 -0
- package/dist/core/src/render/element/renderElement.d.ts +9 -0
- package/dist/core/src/render/element/renderStyle.d.ts +13 -0
- package/dist/core/src/render/helper.d.ts +6 -0
- package/dist/core/src/render/index.d.ts +27 -0
- package/dist/core/src/render/node2Vnode.d.ts +15 -0
- package/dist/core/src/render/text/genVnode.d.ts +9 -0
- package/dist/core/src/render/text/renderStyle.d.ts +13 -0
- package/dist/core/src/render/text/renderText.d.ts +9 -0
- package/dist/core/src/text-area/TextArea.d.ts +47 -0
- package/dist/core/src/text-area/event-handlers/beforeInput.d.ts +8 -0
- package/dist/core/src/text-area/event-handlers/blur.d.ts +8 -0
- package/dist/core/src/text-area/event-handlers/click.d.ts +8 -0
- package/dist/core/src/text-area/event-handlers/composition.d.ts +27 -0
- package/dist/core/src/text-area/event-handlers/copy.d.ts +8 -0
- package/dist/core/src/text-area/event-handlers/cut.d.ts +8 -0
- package/dist/core/src/text-area/event-handlers/drag.d.ts +9 -0
- package/dist/core/src/text-area/event-handlers/drop.d.ts +8 -0
- package/dist/core/src/text-area/event-handlers/focus.d.ts +8 -0
- package/dist/core/src/text-area/event-handlers/index.d.ts +35 -0
- package/dist/core/src/text-area/event-handlers/keydown.d.ts +8 -0
- package/dist/core/src/text-area/event-handlers/keypress.d.ts +8 -0
- package/dist/core/src/text-area/event-handlers/paste.d.ts +8 -0
- package/dist/core/src/text-area/helpers.d.ts +26 -0
- package/dist/core/src/text-area/place-holder.d.ts +18 -0
- package/dist/core/src/text-area/syncSelection.d.ts +19 -0
- package/dist/core/src/text-area/update-view.d.ts +13 -0
- package/dist/core/src/to-html/elem2html.d.ts +8 -0
- package/dist/core/src/to-html/index.d.ts +32 -0
- package/dist/core/src/to-html/node2html.d.ts +8 -0
- package/dist/core/src/to-html/text2html.d.ts +8 -0
- package/dist/core/src/upload/createUploader.d.ts +8 -0
- package/dist/core/src/upload/index.d.ts +7 -0
- package/dist/core/src/upload/interface.d.ts +28 -0
- package/dist/core/src/utils/dom.d.ts +102 -0
- package/dist/core/src/utils/hotkeys.d.ts +35 -0
- package/dist/core/src/utils/key.d.ts +11 -0
- package/dist/core/src/utils/line.d.ts +14 -0
- package/dist/core/src/utils/ua.d.ts +14 -0
- package/dist/core/src/utils/util.d.ts +28 -0
- package/dist/core/src/utils/vdom.d.ts +34 -0
- package/dist/core/src/utils/weak-maps.d.ts +56 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -0
- package/dist/index.mjs.map +1 -0
- package/dist/list-module/src/constants/svg.d.ts +11 -11
- package/dist/list-module/src/index.d.ts +8 -8
- package/dist/list-module/src/locale/en.d.ts +11 -11
- package/dist/list-module/src/locale/index.d.ts +5 -5
- package/dist/list-module/src/locale/zh-CN.d.ts +11 -11
- package/dist/list-module/src/module/custom-types.d.ts +11 -11
- package/dist/list-module/src/module/elem-to-html.d.ts +15 -15
- package/dist/list-module/src/module/helpers.d.ts +13 -13
- package/dist/list-module/src/module/index.d.ts +7 -7
- package/dist/list-module/src/module/menu/BaseMenu.d.ts +18 -18
- package/dist/list-module/src/module/menu/BulletedListMenu.d.ts +11 -11
- package/dist/list-module/src/module/menu/NumberedListMenu.d.ts +11 -11
- package/dist/list-module/src/module/menu/index.d.ts +14 -14
- package/dist/list-module/src/module/parse-elem-html.d.ts +19 -19
- package/dist/list-module/src/module/plugin.d.ts +7 -7
- package/dist/list-module/src/module/render-elem.d.ts +13 -13
- package/dist/list-module/src/utils/dom.d.ts +19 -19
- package/dist/list-module/src/utils/maps.d.ts +6 -6
- package/dist/list-module/src/utils/util.d.ts +6 -6
- package/package.json +10 -7
- package/dist/index.esm.js +0 -2
- package/dist/index.esm.js.map +0 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @description icon svg
|
|
3
|
-
* @author wangfupeng
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* 【注意】svg 字符串的长度 ,否则会导致代码体积过大
|
|
7
|
-
* 尽量选择 https://www.iconfont.cn/collections/detail?spm=a313x.7781069.0.da5a778a4&cid=20293
|
|
8
|
-
* 找不到再从 iconfont.com 搜索
|
|
9
|
-
*/
|
|
10
|
-
export declare const BULLETED_LIST_SVG = "<svg viewBox=\"0 0 1024 1024\"><path d=\"M384 64h640v128H384V64z m0 384h640v128H384v-128z m0 384h640v128H384v-128zM0 128a128 128 0 1 1 256 0 128 128 0 0 1-256 0z m0 384a128 128 0 1 1 256 0 128 128 0 0 1-256 0z m0 384a128 128 0 1 1 256 0 128 128 0 0 1-256 0z\"></path></svg>";
|
|
11
|
-
export declare const NUMBERED_LIST_SVG = "<svg viewBox=\"0 0 1024 1024\"><path d=\"M384 832h640v128H384z m0-384h640v128H384z m0-384h640v128H384zM192 0v256H128V64H64V0zM128 526.016v50.016h128v64H64v-146.016l128-60V384H64v-64h192v146.016zM256 704v320H64v-64h128v-64H64v-64h128v-64H64v-64z\"></path></svg>";
|
|
1
|
+
/**
|
|
2
|
+
* @description icon svg
|
|
3
|
+
* @author wangfupeng
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* 【注意】svg 字符串的长度 ,否则会导致代码体积过大
|
|
7
|
+
* 尽量选择 https://www.iconfont.cn/collections/detail?spm=a313x.7781069.0.da5a778a4&cid=20293
|
|
8
|
+
* 找不到再从 iconfont.com 搜索
|
|
9
|
+
*/
|
|
10
|
+
export declare const BULLETED_LIST_SVG = "<svg viewBox=\"0 0 1024 1024\"><path d=\"M384 64h640v128H384V64z m0 384h640v128H384v-128z m0 384h640v128H384v-128zM0 128a128 128 0 1 1 256 0 128 128 0 0 1-256 0z m0 384a128 128 0 1 1 256 0 128 128 0 0 1-256 0z m0 384a128 128 0 1 1 256 0 128 128 0 0 1-256 0z\"></path></svg>";
|
|
11
|
+
export declare const NUMBERED_LIST_SVG = "<svg viewBox=\"0 0 1024 1024\"><path d=\"M384 832h640v128H384z m0-384h640v128H384z m0-384h640v128H384zM192 0v256H128V64H64V0zM128 526.016v50.016h128v64H64v-146.016l128-60V384H64v-64h192v146.016zM256 704v320H64v-64h128v-64H64v-64h128v-64H64v-64z\"></path></svg>";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @description list module
|
|
3
|
-
* @author wangfupeng
|
|
4
|
-
*/
|
|
5
|
-
import './assets/index.less';
|
|
6
|
-
import './locale/index';
|
|
7
|
-
import wangEditorListModule from './module/index';
|
|
8
|
-
export default wangEditorListModule;
|
|
1
|
+
/**
|
|
2
|
+
* @description list module
|
|
3
|
+
* @author wangfupeng
|
|
4
|
+
*/
|
|
5
|
+
import './assets/index.less';
|
|
6
|
+
import './locale/index';
|
|
7
|
+
import wangEditorListModule from './module/index';
|
|
8
|
+
export default wangEditorListModule;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @description i18n en
|
|
3
|
-
* @author wangfupeng
|
|
4
|
-
*/
|
|
5
|
-
declare const _default: {
|
|
6
|
-
listModule: {
|
|
7
|
-
unOrderedList: string;
|
|
8
|
-
orderedList: string;
|
|
9
|
-
};
|
|
10
|
-
};
|
|
11
|
-
export default _default;
|
|
1
|
+
/**
|
|
2
|
+
* @description i18n en
|
|
3
|
+
* @author wangfupeng
|
|
4
|
+
*/
|
|
5
|
+
declare const _default: {
|
|
6
|
+
listModule: {
|
|
7
|
+
unOrderedList: string;
|
|
8
|
+
orderedList: string;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export default _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @description i18n entry
|
|
3
|
-
* @author wangfupeng
|
|
4
|
-
*/
|
|
5
|
-
export {};
|
|
1
|
+
/**
|
|
2
|
+
* @description i18n entry
|
|
3
|
+
* @author wangfupeng
|
|
4
|
+
*/
|
|
5
|
+
export {};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @description i18n zh-CN
|
|
3
|
-
* @author wangfupeng
|
|
4
|
-
*/
|
|
5
|
-
declare const _default: {
|
|
6
|
-
listModule: {
|
|
7
|
-
unOrderedList: string;
|
|
8
|
-
orderedList: string;
|
|
9
|
-
};
|
|
10
|
-
};
|
|
11
|
-
export default _default;
|
|
1
|
+
/**
|
|
2
|
+
* @description i18n zh-CN
|
|
3
|
+
* @author wangfupeng
|
|
4
|
+
*/
|
|
5
|
+
declare const _default: {
|
|
6
|
+
listModule: {
|
|
7
|
+
unOrderedList: string;
|
|
8
|
+
orderedList: string;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export default _default;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @description list element
|
|
3
|
-
* @author wangfupeng
|
|
4
|
-
*/
|
|
5
|
-
import { Text } from 'slate';
|
|
6
|
-
export type ListItemElement = {
|
|
7
|
-
type: 'list-item';
|
|
8
|
-
ordered: boolean;
|
|
9
|
-
level: number;
|
|
10
|
-
children: Text[];
|
|
11
|
-
};
|
|
1
|
+
/**
|
|
2
|
+
* @description list element
|
|
3
|
+
* @author wangfupeng
|
|
4
|
+
*/
|
|
5
|
+
import { Text } from 'slate';
|
|
6
|
+
export type ListItemElement = {
|
|
7
|
+
type: 'list-item';
|
|
8
|
+
ordered: boolean;
|
|
9
|
+
level: number;
|
|
10
|
+
children: Text[];
|
|
11
|
+
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @description to html
|
|
3
|
-
* @author wangfupeng
|
|
4
|
-
*/
|
|
5
|
-
import { Element } from 'slate';
|
|
6
|
-
declare function elemToHtml(elem: Element, childrenHtml: string): {
|
|
7
|
-
html: string;
|
|
8
|
-
prefix?: string;
|
|
9
|
-
suffix?: string;
|
|
10
|
-
};
|
|
11
|
-
declare const listItemToHtmlConf: {
|
|
12
|
-
type: string;
|
|
13
|
-
elemToHtml: typeof elemToHtml;
|
|
14
|
-
};
|
|
15
|
-
export default listItemToHtmlConf;
|
|
1
|
+
/**
|
|
2
|
+
* @description to html
|
|
3
|
+
* @author wangfupeng
|
|
4
|
+
*/
|
|
5
|
+
import { Element } from 'slate';
|
|
6
|
+
declare function elemToHtml(elem: Element, childrenHtml: string): {
|
|
7
|
+
html: string;
|
|
8
|
+
prefix?: string;
|
|
9
|
+
suffix?: string;
|
|
10
|
+
};
|
|
11
|
+
declare const listItemToHtmlConf: {
|
|
12
|
+
type: string;
|
|
13
|
+
elemToHtml: typeof elemToHtml;
|
|
14
|
+
};
|
|
15
|
+
export default listItemToHtmlConf;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @description table menu helpers
|
|
3
|
-
* @author wangfupeng
|
|
4
|
-
*/
|
|
5
|
-
import { IDomEditor } from '@wangeditor-next/core';
|
|
6
|
-
import { ListItemElement } from './custom-types';
|
|
7
|
-
/**
|
|
8
|
-
* 获取上一个同一 level 的 list item
|
|
9
|
-
* @param editor 编辑器实例
|
|
10
|
-
* @param elem elem
|
|
11
|
-
*/
|
|
12
|
-
export declare function getBrotherListNodeByLevel(editor: IDomEditor, elem: ListItemElement, level?: number): ListItemElement | null;
|
|
13
|
-
export declare function hasSameOrderWithBrother(editor: IDomEditor, elem: ListItemElement, level?: number): boolean;
|
|
1
|
+
/**
|
|
2
|
+
* @description table menu helpers
|
|
3
|
+
* @author wangfupeng
|
|
4
|
+
*/
|
|
5
|
+
import { IDomEditor } from '@wangeditor-next/core';
|
|
6
|
+
import { ListItemElement } from './custom-types';
|
|
7
|
+
/**
|
|
8
|
+
* 获取上一个同一 level 的 list item
|
|
9
|
+
* @param editor 编辑器实例
|
|
10
|
+
* @param elem elem
|
|
11
|
+
*/
|
|
12
|
+
export declare function getBrotherListNodeByLevel(editor: IDomEditor, elem: ListItemElement, level?: number): ListItemElement | null;
|
|
13
|
+
export declare function hasSameOrderWithBrother(editor: IDomEditor, elem: ListItemElement, level?: number): boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @description list module entry
|
|
3
|
-
* @author wangfupeng
|
|
4
|
-
*/
|
|
5
|
-
import { IModuleConf } from '@wangeditor-next/core';
|
|
6
|
-
declare const list: Partial<IModuleConf>;
|
|
7
|
-
export default list;
|
|
1
|
+
/**
|
|
2
|
+
* @description list module entry
|
|
3
|
+
* @author wangfupeng
|
|
4
|
+
*/
|
|
5
|
+
import { IModuleConf } from '@wangeditor-next/core';
|
|
6
|
+
declare const list: Partial<IModuleConf>;
|
|
7
|
+
export default list;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @description base menu
|
|
3
|
-
* @author wangfupeng
|
|
4
|
-
*/
|
|
5
|
-
import { IButtonMenu, IDomEditor } from '@wangeditor-next/core';
|
|
6
|
-
declare abstract class BaseMenu implements IButtonMenu {
|
|
7
|
-
readonly type = "list-item";
|
|
8
|
-
abstract readonly ordered: boolean;
|
|
9
|
-
abstract readonly title: string;
|
|
10
|
-
abstract readonly iconSvg: string;
|
|
11
|
-
readonly tag = "button";
|
|
12
|
-
private getListNode;
|
|
13
|
-
getValue(_editor: IDomEditor): string | boolean;
|
|
14
|
-
isActive(editor: IDomEditor): boolean;
|
|
15
|
-
isDisabled(editor: IDomEditor): boolean;
|
|
16
|
-
exec(editor: IDomEditor, _value: string | boolean): void;
|
|
17
|
-
}
|
|
18
|
-
export default BaseMenu;
|
|
1
|
+
/**
|
|
2
|
+
* @description base menu
|
|
3
|
+
* @author wangfupeng
|
|
4
|
+
*/
|
|
5
|
+
import { IButtonMenu, IDomEditor } from '@wangeditor-next/core';
|
|
6
|
+
declare abstract class BaseMenu implements IButtonMenu {
|
|
7
|
+
readonly type = "list-item";
|
|
8
|
+
abstract readonly ordered: boolean;
|
|
9
|
+
abstract readonly title: string;
|
|
10
|
+
abstract readonly iconSvg: string;
|
|
11
|
+
readonly tag = "button";
|
|
12
|
+
private getListNode;
|
|
13
|
+
getValue(_editor: IDomEditor): string | boolean;
|
|
14
|
+
isActive(editor: IDomEditor): boolean;
|
|
15
|
+
isDisabled(editor: IDomEditor): boolean;
|
|
16
|
+
exec(editor: IDomEditor, _value: string | boolean): void;
|
|
17
|
+
}
|
|
18
|
+
export default BaseMenu;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @description bulleted list menu
|
|
3
|
-
* @author wangfupeng
|
|
4
|
-
*/
|
|
5
|
-
import BaseMenu from './BaseMenu';
|
|
6
|
-
declare class BulletedListMenu extends BaseMenu {
|
|
7
|
-
readonly ordered = false;
|
|
8
|
-
readonly title: string;
|
|
9
|
-
readonly iconSvg = "<svg viewBox=\"0 0 1024 1024\"><path d=\"M384 64h640v128H384V64z m0 384h640v128H384v-128z m0 384h640v128H384v-128zM0 128a128 128 0 1 1 256 0 128 128 0 0 1-256 0z m0 384a128 128 0 1 1 256 0 128 128 0 0 1-256 0z m0 384a128 128 0 1 1 256 0 128 128 0 0 1-256 0z\"></path></svg>";
|
|
10
|
-
}
|
|
11
|
-
export default BulletedListMenu;
|
|
1
|
+
/**
|
|
2
|
+
* @description bulleted list menu
|
|
3
|
+
* @author wangfupeng
|
|
4
|
+
*/
|
|
5
|
+
import BaseMenu from './BaseMenu';
|
|
6
|
+
declare class BulletedListMenu extends BaseMenu {
|
|
7
|
+
readonly ordered = false;
|
|
8
|
+
readonly title: string;
|
|
9
|
+
readonly iconSvg = "<svg viewBox=\"0 0 1024 1024\"><path d=\"M384 64h640v128H384V64z m0 384h640v128H384v-128z m0 384h640v128H384v-128zM0 128a128 128 0 1 1 256 0 128 128 0 0 1-256 0z m0 384a128 128 0 1 1 256 0 128 128 0 0 1-256 0z m0 384a128 128 0 1 1 256 0 128 128 0 0 1-256 0z\"></path></svg>";
|
|
10
|
+
}
|
|
11
|
+
export default BulletedListMenu;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @description numbered list menu
|
|
3
|
-
* @author wangfupeng
|
|
4
|
-
*/
|
|
5
|
-
import BaseMenu from './BaseMenu';
|
|
6
|
-
declare class NumberedListMenu extends BaseMenu {
|
|
7
|
-
readonly ordered = true;
|
|
8
|
-
readonly title: string;
|
|
9
|
-
readonly iconSvg = "<svg viewBox=\"0 0 1024 1024\"><path d=\"M384 832h640v128H384z m0-384h640v128H384z m0-384h640v128H384zM192 0v256H128V64H64V0zM128 526.016v50.016h128v64H64v-146.016l128-60V384H64v-64h192v146.016zM256 704v320H64v-64h128v-64H64v-64h128v-64H64v-64z\"></path></svg>";
|
|
10
|
-
}
|
|
11
|
-
export default NumberedListMenu;
|
|
1
|
+
/**
|
|
2
|
+
* @description numbered list menu
|
|
3
|
+
* @author wangfupeng
|
|
4
|
+
*/
|
|
5
|
+
import BaseMenu from './BaseMenu';
|
|
6
|
+
declare class NumberedListMenu extends BaseMenu {
|
|
7
|
+
readonly ordered = true;
|
|
8
|
+
readonly title: string;
|
|
9
|
+
readonly iconSvg = "<svg viewBox=\"0 0 1024 1024\"><path d=\"M384 832h640v128H384z m0-384h640v128H384z m0-384h640v128H384zM192 0v256H128V64H64V0zM128 526.016v50.016h128v64H64v-146.016l128-60V384H64v-64h192v146.016zM256 704v320H64v-64h128v-64H64v-64h128v-64H64v-64z\"></path></svg>";
|
|
10
|
+
}
|
|
11
|
+
export default NumberedListMenu;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @description menu entry
|
|
3
|
-
* @author wangfupeng
|
|
4
|
-
*/
|
|
5
|
-
import BulletedListMenu from './BulletedListMenu';
|
|
6
|
-
import NumberedListMenu from './NumberedListMenu';
|
|
7
|
-
export declare const bulletedListMenuConf: {
|
|
8
|
-
key: string;
|
|
9
|
-
factory(): BulletedListMenu;
|
|
10
|
-
};
|
|
11
|
-
export declare const numberedListMenuConf: {
|
|
12
|
-
key: string;
|
|
13
|
-
factory(): NumberedListMenu;
|
|
14
|
-
};
|
|
1
|
+
/**
|
|
2
|
+
* @description menu entry
|
|
3
|
+
* @author wangfupeng
|
|
4
|
+
*/
|
|
5
|
+
import BulletedListMenu from './BulletedListMenu';
|
|
6
|
+
import NumberedListMenu from './NumberedListMenu';
|
|
7
|
+
export declare const bulletedListMenuConf: {
|
|
8
|
+
key: string;
|
|
9
|
+
factory(): BulletedListMenu;
|
|
10
|
+
};
|
|
11
|
+
export declare const numberedListMenuConf: {
|
|
12
|
+
key: string;
|
|
13
|
+
factory(): NumberedListMenu;
|
|
14
|
+
};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @description parse elem html
|
|
3
|
-
* @author wangfupeng
|
|
4
|
-
*/
|
|
5
|
-
import { IDomEditor } from '@wangeditor-next/core';
|
|
6
|
-
import { Descendant } from 'slate';
|
|
7
|
-
import { DOMElement } from '../utils/dom';
|
|
8
|
-
import { ListItemElement } from './custom-types';
|
|
9
|
-
declare function parseItemHtml(elem: DOMElement, children: Descendant[], editor: IDomEditor): ListItemElement;
|
|
10
|
-
export declare const parseItemHtmlConf: {
|
|
11
|
-
selector: string;
|
|
12
|
-
parseElemHtml: typeof parseItemHtml;
|
|
13
|
-
};
|
|
14
|
-
declare function parseListHtml(_elem: DOMElement, children: Descendant[], _editor: IDomEditor): ListItemElement[];
|
|
15
|
-
export declare const parseListHtmlConf: {
|
|
16
|
-
selector: string;
|
|
17
|
-
parseElemHtml: typeof parseListHtml;
|
|
18
|
-
};
|
|
19
|
-
export {};
|
|
1
|
+
/**
|
|
2
|
+
* @description parse elem html
|
|
3
|
+
* @author wangfupeng
|
|
4
|
+
*/
|
|
5
|
+
import { IDomEditor } from '@wangeditor-next/core';
|
|
6
|
+
import { Descendant } from 'slate';
|
|
7
|
+
import { DOMElement } from '../utils/dom';
|
|
8
|
+
import { ListItemElement } from './custom-types';
|
|
9
|
+
declare function parseItemHtml(elem: DOMElement, children: Descendant[], editor: IDomEditor): ListItemElement;
|
|
10
|
+
export declare const parseItemHtmlConf: {
|
|
11
|
+
selector: string;
|
|
12
|
+
parseElemHtml: typeof parseItemHtml;
|
|
13
|
+
};
|
|
14
|
+
declare function parseListHtml(_elem: DOMElement, children: Descendant[], _editor: IDomEditor): ListItemElement[];
|
|
15
|
+
export declare const parseListHtmlConf: {
|
|
16
|
+
selector: string;
|
|
17
|
+
parseElemHtml: typeof parseListHtml;
|
|
18
|
+
};
|
|
19
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @description editor 插件,重写 editor API
|
|
3
|
-
* @author wangfupeng
|
|
4
|
-
*/
|
|
5
|
-
import { IDomEditor } from '@wangeditor-next/core';
|
|
6
|
-
declare function withList<T extends IDomEditor>(editor: T): T;
|
|
7
|
-
export default withList;
|
|
1
|
+
/**
|
|
2
|
+
* @description editor 插件,重写 editor API
|
|
3
|
+
* @author wangfupeng
|
|
4
|
+
*/
|
|
5
|
+
import { IDomEditor } from '@wangeditor-next/core';
|
|
6
|
+
declare function withList<T extends IDomEditor>(editor: T): T;
|
|
7
|
+
export default withList;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @description render list elem
|
|
3
|
-
* @author wangfupeng
|
|
4
|
-
*/
|
|
5
|
-
import { IDomEditor } from '@wangeditor-next/core';
|
|
6
|
-
import { Element as SlateElement } from 'slate';
|
|
7
|
-
import { VNode } from 'snabbdom';
|
|
8
|
-
declare function renderListElem(elemNode: SlateElement, children: VNode[] | null, editor: IDomEditor): VNode;
|
|
9
|
-
declare const renderListItemConf: {
|
|
10
|
-
type: string;
|
|
11
|
-
renderElem: typeof renderListElem;
|
|
12
|
-
};
|
|
13
|
-
export default renderListItemConf;
|
|
1
|
+
/**
|
|
2
|
+
* @description render list elem
|
|
3
|
+
* @author wangfupeng
|
|
4
|
+
*/
|
|
5
|
+
import { IDomEditor } from '@wangeditor-next/core';
|
|
6
|
+
import { Element as SlateElement } from 'slate';
|
|
7
|
+
import { VNode } from 'snabbdom';
|
|
8
|
+
declare function renderListElem(elemNode: SlateElement, children: VNode[] | null, editor: IDomEditor): VNode;
|
|
9
|
+
declare const renderListItemConf: {
|
|
10
|
+
type: string;
|
|
11
|
+
renderElem: typeof renderListElem;
|
|
12
|
+
};
|
|
13
|
+
export default renderListItemConf;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @description DOM 操作
|
|
3
|
-
* @author wangfupeng
|
|
4
|
-
*/
|
|
5
|
-
import $, { Dom7Array } from 'dom7';
|
|
6
|
-
import DOMNode = globalThis.Node;
|
|
7
|
-
import DOMComment = globalThis.Comment;
|
|
8
|
-
import DOMElement = globalThis.Element;
|
|
9
|
-
import DOMText = globalThis.Text;
|
|
10
|
-
import DOMRange = globalThis.Range;
|
|
11
|
-
import DOMSelection = globalThis.Selection;
|
|
12
|
-
import DOMStaticRange = globalThis.StaticRange;
|
|
13
|
-
export default $;
|
|
14
|
-
export { DOMComment, DOMElement, DOMNode, DOMRange, DOMSelection, DOMStaticRange, DOMText, };
|
|
15
|
-
/**
|
|
16
|
-
* 获取 tagName lower-case
|
|
17
|
-
* @param $elem $elem
|
|
18
|
-
*/
|
|
19
|
-
export declare function getTagName($elem: Dom7Array): string;
|
|
1
|
+
/**
|
|
2
|
+
* @description DOM 操作
|
|
3
|
+
* @author wangfupeng
|
|
4
|
+
*/
|
|
5
|
+
import $, { Dom7Array } from 'dom7';
|
|
6
|
+
import DOMNode = globalThis.Node;
|
|
7
|
+
import DOMComment = globalThis.Comment;
|
|
8
|
+
import DOMElement = globalThis.Element;
|
|
9
|
+
import DOMText = globalThis.Text;
|
|
10
|
+
import DOMRange = globalThis.Range;
|
|
11
|
+
import DOMSelection = globalThis.Selection;
|
|
12
|
+
import DOMStaticRange = globalThis.StaticRange;
|
|
13
|
+
export default $;
|
|
14
|
+
export { DOMComment, DOMElement, DOMNode, DOMRange, DOMSelection, DOMStaticRange, DOMText, };
|
|
15
|
+
/**
|
|
16
|
+
* 获取 tagName lower-case
|
|
17
|
+
* @param $elem $elem
|
|
18
|
+
*/
|
|
19
|
+
export declare function getTagName($elem: Dom7Array): string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @description maps
|
|
3
|
-
* @author wangfupeng
|
|
4
|
-
*/
|
|
5
|
-
import { IDomEditor } from '@wangeditor-next/core';
|
|
6
|
-
export declare const ELEM_TO_EDITOR: WeakMap<import("
|
|
1
|
+
/**
|
|
2
|
+
* @description maps
|
|
3
|
+
* @author wangfupeng
|
|
4
|
+
*/
|
|
5
|
+
import { IDomEditor } from '@wangeditor-next/core';
|
|
6
|
+
export declare const ELEM_TO_EDITOR: WeakMap<import("packages/custom-types").CustomElement, IDomEditor>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Element as SlateElement } from 'slate';
|
|
2
|
-
/**
|
|
3
|
-
* 获取第一个 text-node 的颜色
|
|
4
|
-
* @param elem elem
|
|
5
|
-
*/
|
|
6
|
-
export declare function getListItemColor(elem: SlateElement): string;
|
|
1
|
+
import { Element as SlateElement } from 'slate';
|
|
2
|
+
/**
|
|
3
|
+
* 获取第一个 text-node 的颜色
|
|
4
|
+
* @param elem elem
|
|
5
|
+
*/
|
|
6
|
+
export declare function getListItemColor(elem: SlateElement): string;
|
package/package.json
CHANGED
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wangeditor-next/list-module",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.13",
|
|
4
4
|
"description": "wangEditor list module",
|
|
5
5
|
"author": "cycleccc <2991205548@qq.com>",
|
|
6
|
-
"
|
|
6
|
+
"type": "module",
|
|
7
7
|
"homepage": "https://github.com/cycleccc/wangEditor#readme",
|
|
8
8
|
"license": "MIT",
|
|
9
9
|
"types": "dist/list-module/src/index.d.ts",
|
|
10
10
|
"main": "dist/index.js",
|
|
11
|
-
"module": "dist/index.
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
|
|
11
|
+
"module": "dist/index.mjs",
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"types": "./dist/list-module/src/index.d.ts",
|
|
15
|
+
"import": "./dist/index.mjs",
|
|
16
|
+
"require": "./dist/index.js"
|
|
17
|
+
}
|
|
15
18
|
},
|
|
16
19
|
"directories": {
|
|
17
20
|
"lib": "dist",
|
|
@@ -40,7 +43,7 @@
|
|
|
40
43
|
"url": "https://github.com/cycleccc/wangEditor/issues"
|
|
41
44
|
},
|
|
42
45
|
"peerDependencies": {
|
|
43
|
-
"@wangeditor-next/core": "1.7.
|
|
46
|
+
"@wangeditor-next/core": "1.7.8",
|
|
44
47
|
"dom7": "^3.0.0",
|
|
45
48
|
"slate": "^0.72.0",
|
|
46
49
|
"snabbdom": "^3.1.0"
|
package/dist/index.esm.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{i18nAddResources as t,DomEditor as e,t as r}from"@wangeditor-next/core";import{Text as n,Path as o,Editor as i,Transforms as u,Range as a}from"slate";import c,{append as f,attr as l,parent as s}from"dom7";import{jsx as d}from"snabbdom";t("en",{listModule:{unOrderedList:"Unordered list",orderedList:"Ordered list"}}),t("zh-CN",{listModule:{unOrderedList:"无序列表",orderedList:"有序列表"}});var v="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function p(t){var e={exports:{}};return t(e,e.exports),e.exports}var y,h,g=function(t){return t&&t.Math===Math&&t},b=g("object"==typeof globalThis&&globalThis)||g("object"==typeof window&&window)||g("object"==typeof self&&self)||g("object"==typeof v&&v)||g("object"==typeof v&&v)||function(){return this}()||Function("return this")(),m=function(t){try{return!!t()}catch(t){return!0}},w=!m((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})),O=!m((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})),S=Function.prototype.call,x=O?S.bind(S):function(){return S.apply(S,arguments)},E={}.propertyIsEnumerable,j=Object.getOwnPropertyDescriptor,T={f:j&&!E.call({1:2},1)?function(t){var e=j(this,t);return!!e&&e.enumerable}:E},A=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},I=Function.prototype,P=I.call,L=O&&I.bind.bind(P,P),R=O?L:function(t){return function(){return P.apply(t,arguments)}},k=R({}.toString),N=R("".slice),z=function(t){return N(k(t),8,-1)},M=Object,_=R("".split),C=m((function(){return!M("z").propertyIsEnumerable(0)}))?function(t){return"String"===z(t)?_(t,""):M(t)}:M,F=function(t){return null==t},D=TypeError,B=function(t){if(F(t))throw new D("Can't call method on "+t);return t},H=function(t){return C(B(t))},$="object"==typeof document&&document.all,G=void 0===$&&void 0!==$?function(t){return"function"==typeof t||t===$}:function(t){return"function"==typeof t},V=function(t){return"object"==typeof t?null!==t:G(t)},W=function(t,e){return arguments.length<2?(r=b[t],G(r)?r:void 0):b[t]&&b[t][e];var r},U=R({}.isPrototypeOf),K=b.navigator,Y=K&&K.userAgent,X=Y?String(Y):"",q=b.process,J=b.Deno,Q=q&&q.versions||J&&J.version,Z=Q&&Q.v8;Z&&(h=(y=Z.split("."))[0]>0&&y[0]<4?1:+(y[0]+y[1])),!h&&X&&(!(y=X.match(/Edge\/(\d+)/))||y[1]>=74)&&(y=X.match(/Chrome\/(\d+)/))&&(h=+y[1]);var tt=h,et=b.String,rt=!!Object.getOwnPropertySymbols&&!m((function(){var t=Symbol("symbol detection");return!et(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&tt&&tt<41})),nt=rt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,ot=Object,it=nt?function(t){return"symbol"==typeof t}:function(t){var e=W("Symbol");return G(e)&&U(e.prototype,ot(t))},ut=String,at=function(t){try{return ut(t)}catch(t){return"Object"}},ct=TypeError,ft=function(t){if(G(t))return t;throw new ct(at(t)+" is not a function")},lt=function(t,e){var r=t[e];return F(r)?void 0:ft(r)},st=TypeError,dt=Object.defineProperty,vt=function(t,e){try{dt(b,t,{value:e,configurable:!0,writable:!0})}catch(r){b[t]=e}return e},pt=p((function(t){var e="__core-js_shared__",r=t.exports=b[e]||vt(e,{});(r.versions||(r.versions=[])).push({version:"3.38.1",mode:"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.38.1/LICENSE",source:"https://github.com/zloirock/core-js"})})),yt=function(t,e){return pt[t]||(pt[t]=e||{})},ht=Object,gt=function(t){return ht(B(t))},bt=R({}.hasOwnProperty),mt=Object.hasOwn||function(t,e){return bt(gt(t),e)},wt=0,Ot=Math.random(),St=R(1..toString),xt=function(t){return"Symbol("+(void 0===t?"":t)+")_"+St(++wt+Ot,36)},Et=b.Symbol,jt=yt("wks"),Tt=nt?Et.for||Et:Et&&Et.withoutSetter||xt,At=function(t){return mt(jt,t)||(jt[t]=rt&&mt(Et,t)?Et[t]:Tt("Symbol."+t)),jt[t]},It=TypeError,Pt=At("toPrimitive"),Lt=function(t,e){if(!V(t)||it(t))return t;var r,n=lt(t,Pt);if(n){if(void 0===e&&(e="default"),r=x(n,t,e),!V(r)||it(r))return r;throw new It("Can't convert object to primitive value")}return void 0===e&&(e="number"),function(t,e){var r,n;if("string"===e&&G(r=t.toString)&&!V(n=x(r,t)))return n;if(G(r=t.valueOf)&&!V(n=x(r,t)))return n;if("string"!==e&&G(r=t.toString)&&!V(n=x(r,t)))return n;throw new st("Can't convert object to primitive value")}(t,e)},Rt=function(t){var e=Lt(t,"string");return it(e)?e:e+""},kt=b.document,Nt=V(kt)&&V(kt.createElement),zt=function(t){return Nt?kt.createElement(t):{}},Mt=!w&&!m((function(){return 7!==Object.defineProperty(zt("div"),"a",{get:function(){return 7}}).a})),_t=Object.getOwnPropertyDescriptor,Ct={f:w?_t:function(t,e){if(t=H(t),e=Rt(e),Mt)try{return _t(t,e)}catch(t){}if(mt(t,e))return A(!x(T.f,t,e),t[e])}},Ft=w&&m((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Dt=String,Bt=TypeError,Ht=function(t){if(V(t))return t;throw new Bt(Dt(t)+" is not an object")},$t=TypeError,Gt=Object.defineProperty,Vt=Object.getOwnPropertyDescriptor,Wt="enumerable",Ut="configurable",Kt="writable",Yt={f:w?Ft?function(t,e,r){if(Ht(t),e=Rt(e),Ht(r),"function"==typeof t&&"prototype"===e&&"value"in r&&Kt in r&&!r[Kt]){var n=Vt(t,e);n&&n[Kt]&&(t[e]=r.value,r={configurable:Ut in r?r[Ut]:n[Ut],enumerable:Wt in r?r[Wt]:n[Wt],writable:!1})}return Gt(t,e,r)}:Gt:function(t,e,r){if(Ht(t),e=Rt(e),Ht(r),Mt)try{return Gt(t,e,r)}catch(t){}if("get"in r||"set"in r)throw new $t("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},Xt=w?function(t,e,r){return Yt.f(t,e,A(1,r))}:function(t,e,r){return t[e]=r,t},qt=Function.prototype,Jt=w&&Object.getOwnPropertyDescriptor,Qt=mt(qt,"name"),Zt={EXISTS:Qt,PROPER:Qt&&"something"===function(){}.name,CONFIGURABLE:Qt&&(!w||w&&Jt(qt,"name").configurable)},te=R(Function.toString);G(pt.inspectSource)||(pt.inspectSource=function(t){return te(t)});var ee,re,ne,oe=pt.inspectSource,ie=b.WeakMap,ue=G(ie)&&/native code/.test(String(ie)),ae=yt("keys"),ce=function(t){return ae[t]||(ae[t]=xt(t))},fe={},le="Object already initialized",se=b.TypeError,de=b.WeakMap;if(ue||pt.state){var ve=pt.state||(pt.state=new de);ve.get=ve.get,ve.has=ve.has,ve.set=ve.set,ee=function(t,e){if(ve.has(t))throw new se(le);return e.facade=t,ve.set(t,e),e},re=function(t){return ve.get(t)||{}},ne=function(t){return ve.has(t)}}else{var pe=ce("state");fe[pe]=!0,ee=function(t,e){if(mt(t,pe))throw new se(le);return e.facade=t,Xt(t,pe,e),e},re=function(t){return mt(t,pe)?t[pe]:{}},ne=function(t){return mt(t,pe)}}var ye={set:ee,get:re,has:ne,enforce:function(t){return ne(t)?re(t):ee(t,{})},getterFor:function(t){return function(e){var r;if(!V(e)||(r=re(e)).type!==t)throw new se("Incompatible receiver, "+t+" required");return r}}},he=p((function(t){var e=Zt.CONFIGURABLE,r=ye.enforce,n=ye.get,o=String,i=Object.defineProperty,u=R("".slice),a=R("".replace),c=R([].join),f=w&&!m((function(){return 8!==i((function(){}),"length",{value:8}).length})),l=String(String).split("String"),s=t.exports=function(t,n,s){"Symbol("===u(o(n),0,7)&&(n="["+a(o(n),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),s&&s.getter&&(n="get "+n),s&&s.setter&&(n="set "+n),(!mt(t,"name")||e&&t.name!==n)&&(w?i(t,"name",{value:n,configurable:!0}):t.name=n),f&&s&&mt(s,"arity")&&t.length!==s.arity&&i(t,"length",{value:s.arity});try{s&&mt(s,"constructor")&&s.constructor?w&&i(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var d=r(t);return mt(d,"source")||(d.source=c(l,"string"==typeof n?n:"")),t};Function.prototype.toString=s((function(){return G(this)&&n(this).source||oe(this)}),"toString")})),ge=function(t,e,r,n){n||(n={});var o=n.enumerable,i=void 0!==n.name?n.name:e;if(G(r)&&he(r,i,n),n.global)o?t[e]=r:vt(e,r);else{try{n.unsafe?t[e]&&(o=!0):delete t[e]}catch(t){}o?t[e]=r:Yt.f(t,e,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return t},be=Math.ceil,me=Math.floor,we=Math.trunc||function(t){var e=+t;return(e>0?me:be)(e)},Oe=function(t){var e=+t;return e!=e||0===e?0:we(e)},Se=Math.max,xe=Math.min,Ee=Math.min,je=function(t){var e=Oe(t);return e>0?Ee(e,9007199254740991):0},Te=function(t){return je(t.length)},Ae=function(t){return function(e,r,n){var o=H(e),i=Te(o);if(0===i)return!t&&-1;var u,a=function(t,e){var r=Oe(t);return r<0?Se(r+e,0):xe(r,e)}(n,i);if(t&&r!=r){for(;i>a;)if((u=o[a++])!=u)return!0}else for(;i>a;a++)if((t||a in o)&&o[a]===r)return t||a||0;return!t&&-1}},Ie={includes:Ae(!0),indexOf:Ae(!1)},Pe=Ie.indexOf,Le=R([].push),Re=function(t,e){var r,n=H(t),o=0,i=[];for(r in n)!mt(fe,r)&&mt(n,r)&&Le(i,r);for(;e.length>o;)mt(n,r=e[o++])&&(~Pe(i,r)||Le(i,r));return i},ke=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Ne=ke.concat("length","prototype"),ze={f:Object.getOwnPropertyNames||function(t){return Re(t,Ne)}},Me={f:Object.getOwnPropertySymbols},_e=R([].concat),Ce=W("Reflect","ownKeys")||function(t){var e=ze.f(Ht(t)),r=Me.f;return r?_e(e,r(t)):e},Fe=function(t,e,r){for(var n=Ce(e),o=Yt.f,i=Ct.f,u=0;u<n.length;u++){var a=n[u];mt(t,a)||r&&mt(r,a)||o(t,a,i(e,a))}},De=/#|\.prototype\./,Be=function(t,e){var r=$e[He(t)];return r===Ve||r!==Ge&&(G(e)?m(e):!!e)},He=Be.normalize=function(t){return String(t).replace(De,".").toLowerCase()},$e=Be.data={},Ge=Be.NATIVE="N",Ve=Be.POLYFILL="P",We=Be,Ue=Ct.f,Ke=function(t,e){var r,n,o,i,u,a=t.target,c=t.global,f=t.stat;if(r=c?b:f?b[a]||vt(a,{}):b[a]&&b[a].prototype)for(n in e){if(i=e[n],o=t.dontCallGetSet?(u=Ue(r,n))&&u.value:r[n],!We(c?n:a+(f?".":"#")+n,t.forced)&&void 0!==o){if(typeof i==typeof o)continue;Fe(i,o)}(t.sham||o&&o.sham)&&Xt(i,"sham",!0),ge(r,n,i,t)}},Ye=Array.isArray||function(t){return"Array"===z(t)},Xe=TypeError,qe=function(t){if(t>9007199254740991)throw Xe("Maximum allowed index exceeded");return t},Je=function(t,e,r){w?Yt.f(t,e,A(0,r)):t[e]=r},Qe={};Qe[At("toStringTag")]="z";var Ze="[object z]"===String(Qe),tr=At("toStringTag"),er=Object,rr="Arguments"===z(function(){return arguments}()),nr=Ze?z:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=er(t),tr))?r:rr?z(e):"Object"===(n=z(e))&&G(e.callee)?"Arguments":n},or=function(){},ir=W("Reflect","construct"),ur=/^\s*(?:class|function)\b/,ar=R(ur.exec),cr=!ur.test(or),fr=function(t){if(!G(t))return!1;try{return ir(or,[],t),!0}catch(t){return!1}},lr=function(t){if(!G(t))return!1;switch(nr(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return cr||!!ar(ur,oe(t))}catch(t){return!0}};lr.sham=!0;var sr=!ir||m((function(){var t;return fr(fr.call)||!fr(Object)||!fr((function(){t=!0}))||t}))?lr:fr,dr=At("species"),vr=Array,pr=function(t,e){return new(function(t){var e;return Ye(t)&&(e=t.constructor,(sr(e)&&(e===vr||Ye(e.prototype))||V(e)&&null===(e=e[dr]))&&(e=void 0)),void 0===e?vr:e}(t))(0===e?0:e)},yr=At("species"),hr=function(t){return tt>=51||!m((function(){var e=[];return(e.constructor={})[yr]=function(){return{foo:1}},1!==e[t](Boolean).foo}))},gr=At("isConcatSpreadable"),br=tt>=51||!m((function(){var t=[];return t[gr]=!1,t.concat()[0]!==t})),mr=function(t){if(!V(t))return!1;var e=t[gr];return void 0!==e?!!e:Ye(t)},wr=!br||!hr("concat");Ke({target:"Array",proto:!0,arity:1,forced:wr},{concat:function(t){var e,r,n,o,i,u=gt(this),a=pr(u,0),c=0;for(e=-1,n=arguments.length;e<n;e++)if(mr(i=-1===e?u:arguments[e]))for(o=Te(i),qe(c+o),r=0;r<o;r++,c++)r in i&&Je(a,c,i[r]);else qe(c+1),Je(a,c++,i);return a.length=c,a}});var Or=function(t,e){return Or=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},Or(t,e)};function Sr(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}Or(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}function xr(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Er(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),u=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)u.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u}"function"==typeof SuppressedError&&SuppressedError;var jr,Tr=Object.keys||function(t){return Re(t,ke)},Ar=w&&!Ft?Object.defineProperties:function(t,e){Ht(t);for(var r,n=H(e),o=Tr(e),i=o.length,u=0;i>u;)Yt.f(t,r=o[u++],n[r]);return t},Ir={f:Ar},Pr=W("document","documentElement"),Lr="prototype",Rr="script",kr=ce("IE_PROTO"),Nr=function(){},zr=function(t){return"<"+Rr+">"+t+"</"+Rr+">"},Mr=function(t){t.write(zr("")),t.close();var e=t.parentWindow.Object;return t=null,e},_r=function(){try{jr=new ActiveXObject("htmlfile")}catch(t){}var t,e,r;_r="undefined"!=typeof document?document.domain&&jr?Mr(jr):(e=zt("iframe"),r="java"+Rr+":",e.style.display="none",Pr.appendChild(e),e.src=String(r),(t=e.contentWindow.document).open(),t.write(zr("document.F=Object")),t.close(),t.F):Mr(jr);for(var n=ke.length;n--;)delete _r[Lr][ke[n]];return _r()};fe[kr]=!0;var Cr=Object.create||function(t,e){var r;return null!==t?(Nr[Lr]=Ht(t),r=new Nr,Nr[Lr]=null,r[kr]=t):r=_r(),void 0===e?r:Ir.f(r,e)},Fr=Yt.f,Dr=At("unscopables"),Br=Array.prototype;void 0===Br[Dr]&&Fr(Br,Dr,{configurable:!0,value:Cr(null)});var Hr,$r,Gr,Vr=function(t){Br[Dr][t]=!0},Wr={},Ur=!m((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),Kr=ce("IE_PROTO"),Yr=Object,Xr=Yr.prototype,qr=Ur?Yr.getPrototypeOf:function(t){var e=gt(t);if(mt(e,Kr))return e[Kr];var r=e.constructor;return G(r)&&e instanceof r?r.prototype:e instanceof Yr?Xr:null},Jr=At("iterator"),Qr=!1;[].keys&&("next"in(Gr=[].keys())?($r=qr(qr(Gr)))!==Object.prototype&&(Hr=$r):Qr=!0);var Zr=!V(Hr)||m((function(){var t={};return Hr[Jr].call(t)!==t}));Zr&&(Hr={}),G(Hr[Jr])||ge(Hr,Jr,(function(){return this}));var tn={IteratorPrototype:Hr,BUGGY_SAFARI_ITERATORS:Qr},en=Yt.f,rn=At("toStringTag"),nn=function(t,e,r){t&&!r&&(t=t.prototype),t&&!mt(t,rn)&&en(t,rn,{configurable:!0,value:e})},on=tn.IteratorPrototype,un=function(){return this},an=String,cn=TypeError,fn=function(t){if(function(t){return V(t)||null===t}(t))return t;throw new cn("Can't set "+an(t)+" as a prototype")},ln=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{(t=function(t,e,r){try{return R(ft(Object.getOwnPropertyDescriptor(t,e)[r]))}catch(t){}}(Object.prototype,"__proto__","set"))(r,[]),e=r instanceof Array}catch(t){}return function(r,n){return B(r),fn(n),V(r)?(e?t(r,n):r.__proto__=n,r):r}}():void 0),sn=Zt.PROPER,dn=Zt.CONFIGURABLE,vn=tn.IteratorPrototype,pn=tn.BUGGY_SAFARI_ITERATORS,yn=At("iterator"),hn="keys",gn="values",bn="entries",mn=function(){return this},wn=function(t,e,r,n,o,i,u){!function(t,e,r,n){var o=e+" Iterator";t.prototype=Cr(on,{next:A(+!n,r)}),nn(t,o,!1),Wr[o]=un}(r,e,n);var a,c,f,l=function(t){if(t===o&&y)return y;if(!pn&&t&&t in v)return v[t];switch(t){case hn:case gn:case bn:return function(){return new r(this,t)}}return function(){return new r(this)}},s=e+" Iterator",d=!1,v=t.prototype,p=v[yn]||v["@@iterator"]||o&&v[o],y=!pn&&p||l(o),h="Array"===e&&v.entries||p;if(h&&(a=qr(h.call(new t)))!==Object.prototype&&a.next&&(qr(a)!==vn&&(ln?ln(a,vn):G(a[yn])||ge(a,yn,mn)),nn(a,s,!0)),sn&&o===gn&&p&&p.name!==gn&&(dn?Xt(v,"name",gn):(d=!0,y=function(){return x(p,this)})),o)if(c={values:l(gn),keys:i?y:l(hn),entries:l(bn)},u)for(f in c)(pn||d||!(f in v))&&ge(v,f,c[f]);else Ke({target:e,proto:!0,forced:pn||d},c);return v[yn]!==y&&ge(v,yn,y,{name:o}),Wr[e]=y,c},On=function(t,e){return{value:t,done:e}},Sn=Yt.f,xn="Array Iterator",En=ye.set,jn=ye.getterFor(xn),Tn=wn(Array,"Array",(function(t,e){En(this,{type:xn,target:H(t),index:0,kind:e})}),(function(){var t=jn(this),e=t.target,r=t.index++;if(!e||r>=e.length)return t.target=null,On(void 0,!0);switch(t.kind){case"keys":return On(r,!1);case"values":return On(e[r],!1)}return On([r,e[r]],!1)}),"values"),An=Wr.Arguments=Wr.Array;if(Vr("keys"),Vr("values"),Vr("entries"),w&&"values"!==An.name)try{Sn(An,"name",{value:"values"})}catch(t){}var In=Ze?{}.toString:function(){return"[object "+nr(this)+"]"};Ze||ge(Object.prototype,"toString",In,{unsafe:!0});var Pn=String,Ln=function(t){if("Symbol"===nr(t))throw new TypeError("Cannot convert a Symbol value to a string");return Pn(t)},Rn=R("".charAt),kn=R("".charCodeAt),Nn=R("".slice),zn=function(t){return function(e,r){var n,o,i=Ln(B(e)),u=Oe(r),a=i.length;return u<0||u>=a?t?"":void 0:(n=kn(i,u))<55296||n>56319||u+1===a||(o=kn(i,u+1))<56320||o>57343?t?Rn(i,u):n:t?Nn(i,u,u+2):o-56320+(n-55296<<10)+65536}},Mn={codeAt:zn(!1),charAt:zn(!0)},_n=Mn.charAt,Cn="String Iterator",Fn=ye.set,Dn=ye.getterFor(Cn);wn(String,"String",(function(t){Fn(this,{type:Cn,string:Ln(t),index:0})}),(function(){var t,e=Dn(this),r=e.string,n=e.index;return n>=r.length?On(void 0,!0):(t=_n(r,n),e.index+=t.length,On(t,!1))}));var Bn=!m((function(){return Object.isExtensible(Object.preventExtensions({}))})),Hn=function(t,e,r){for(var n in e)ge(t,n,e[n],r);return t},$n=R([].slice),Gn=ze.f,Vn="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],Wn={f:function(t){return Vn&&"Window"===z(t)?function(t){try{return Gn(t)}catch(t){return $n(Vn)}}(t):Gn(H(t))}},Un=m((function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}})),Kn=Object.isExtensible,Yn=m((function(){Kn(1)}))||Un?function(t){return!!V(t)&&((!Un||"ArrayBuffer"!==z(t))&&(!Kn||Kn(t)))}:Kn,Xn=p((function(t){var e=Yt.f,r=!1,n=xt("meta"),o=0,i=function(t){e(t,n,{value:{objectID:"O"+o++,weakData:{}}})},u=t.exports={enable:function(){u.enable=function(){},r=!0;var t=ze.f,e=R([].splice),o={};o[n]=1,t(o).length&&(ze.f=function(r){for(var o=t(r),i=0,u=o.length;i<u;i++)if(o[i]===n){e(o,i,1);break}return o},Ke({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:Wn.f}))},fastKey:function(t,e){if(!V(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!mt(t,n)){if(!Yn(t))return"F";if(!e)return"E";i(t)}return t[n].objectID},getWeakData:function(t,e){if(!mt(t,n)){if(!Yn(t))return!0;if(!e)return!1;i(t)}return t[n].weakData},onFreeze:function(t){return Bn&&r&&Yn(t)&&!mt(t,n)&&i(t),t}};fe[n]=!0})),qn=function(t){if("Function"===z(t))return R(t)},Jn=qn(qn.bind),Qn=function(t,e){return ft(t),void 0===e?t:O?Jn(t,e):function(){return t.apply(e,arguments)}},Zn=At("iterator"),to=Array.prototype,eo=At("iterator"),ro=function(t){if(!F(t))return lt(t,eo)||lt(t,"@@iterator")||Wr[nr(t)]},no=TypeError,oo=function(t,e,r){var n,o;Ht(t);try{if(!(n=lt(t,"return"))){if("throw"===e)throw r;return r}n=x(n,t)}catch(t){o=!0,n=t}if("throw"===e)throw r;if(o)throw n;return Ht(n),r},io=TypeError,uo=function(t,e){this.stopped=t,this.result=e},ao=uo.prototype,co=function(t,e,r){var n,o,i,u,a,c,f,l,s=r&&r.that,d=!(!r||!r.AS_ENTRIES),v=!(!r||!r.IS_RECORD),p=!(!r||!r.IS_ITERATOR),y=!(!r||!r.INTERRUPTED),h=Qn(e,s),g=function(t){return n&&oo(n,"normal",t),new uo(!0,t)},b=function(t){return d?(Ht(t),y?h(t[0],t[1],g):h(t[0],t[1])):y?h(t,g):h(t)};if(v)n=t.iterator;else if(p)n=t;else{if(!(o=ro(t)))throw new io(at(t)+" is not iterable");if(void 0!==(l=o)&&(Wr.Array===l||to[Zn]===l)){for(i=0,u=Te(t);u>i;i++)if((a=b(t[i]))&&U(ao,a))return a;return new uo(!1)}n=function(t,e){var r=arguments.length<2?ro(t):e;if(ft(r))return Ht(x(r,t));throw new no(at(t)+" is not iterable")}(t,o)}for(c=v?t.next:n.next;!(f=x(c,n)).done;){try{a=b(f.value)}catch(t){oo(n,"throw",t)}if("object"==typeof a&&a&&U(ao,a))return a}return new uo(!1)},fo=TypeError,lo=function(t,e){if(U(e,t))return t;throw new fo("Incorrect invocation")},so=At("iterator"),vo=!1;try{var po=0,yo={next:function(){return{done:!!po++}},return:function(){vo=!0}};yo[so]=function(){return this},Array.from(yo,(function(){throw 2}))}catch(t){}var ho=R([].push),go=function(t){var e=1===t,r=2===t,n=3===t,o=4===t,i=6===t,u=7===t,a=5===t||i;return function(c,f,l,s){for(var d,v,p=gt(c),y=C(p),h=Te(y),g=Qn(f,l),b=0,m=s||pr,w=e?m(c,h):r||u?m(c,0):void 0;h>b;b++)if((a||b in y)&&(v=g(d=y[b],b,p),t))if(e)w[b]=v;else if(v)switch(t){case 3:return!0;case 5:return d;case 6:return b;case 2:ho(w,d)}else switch(t){case 4:return!1;case 7:ho(w,d)}return i?-1:n||o?o:w}},bo={forEach:go(0),map:go(1),filter:go(2),some:go(3),every:go(4),find:go(5),findIndex:go(6),filterReject:go(7)},mo=Xn.getWeakData,wo=ye.set,Oo=ye.getterFor,So=bo.find,xo=bo.findIndex,Eo=R([].splice),jo=0,To=function(t){return t.frozen||(t.frozen=new Ao)},Ao=function(){this.entries=[]},Io=function(t,e){return So(t.entries,(function(t){return t[0]===e}))};Ao.prototype={get:function(t){var e=Io(this,t);if(e)return e[1]},has:function(t){return!!Io(this,t)},set:function(t,e){var r=Io(this,t);r?r[1]=e:this.entries.push([t,e])},delete:function(t){var e=xo(this.entries,(function(e){return e[0]===t}));return~e&&Eo(this.entries,e,1),!!~e}};var Po,Lo={getConstructor:function(t,e,r,n){var o=t((function(t,o){lo(t,i),wo(t,{type:e,id:jo++,frozen:null}),F(o)||co(o,t[n],{that:t,AS_ENTRIES:r})})),i=o.prototype,u=Oo(e),a=function(t,e,r){var n=u(t),o=mo(Ht(e),!0);return!0===o?To(n).set(e,r):o[n.id]=r,t};return Hn(i,{delete:function(t){var e=u(this);if(!V(t))return!1;var r=mo(t);return!0===r?To(e).delete(t):r&&mt(r,e.id)&&delete r[e.id]},has:function(t){var e=u(this);if(!V(t))return!1;var r=mo(t);return!0===r?To(e).has(t):r&&mt(r,e.id)}}),Hn(i,r?{get:function(t){var e=u(this);if(V(t)){var r=mo(t);if(!0===r)return To(e).get(t);if(r)return r[e.id]}},set:function(t,e){return a(this,t,e)}}:{add:function(t){return a(this,t,!0)}}),o}},Ro=ye.enforce,ko=Object,No=Array.isArray,zo=ko.isExtensible,Mo=ko.isFrozen,_o=ko.isSealed,Co=ko.freeze,Fo=ko.seal,Do=!b.ActiveXObject&&"ActiveXObject"in b,Bo=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},Ho=function(t,e,r){var n=-1!==t.indexOf("Map"),o=-1!==t.indexOf("Weak"),i=n?"set":"add",u=b[t],a=u&&u.prototype,c=u,f={},l=function(t){var e=R(a[t]);ge(a,t,"add"===t?function(t){return e(this,0===t?0:t),this}:"delete"===t?function(t){return!(o&&!V(t))&&e(this,0===t?0:t)}:"get"===t?function(t){return o&&!V(t)?void 0:e(this,0===t?0:t)}:"has"===t?function(t){return!(o&&!V(t))&&e(this,0===t?0:t)}:function(t,r){return e(this,0===t?0:t,r),this})};if(We(t,!G(u)||!(o||a.forEach&&!m((function(){(new u).entries().next()})))))c=r.getConstructor(e,t,n,i),Xn.enable();else if(We(t,!0)){var s=new c,d=s[i](o?{}:-0,1)!==s,v=m((function(){s.has(1)})),p=function(t,e){try{if(!e&&!vo)return!1}catch(t){return!1}var r=!1;try{var n={};n[so]=function(){return{next:function(){return{done:r=!0}}}},t(n)}catch(t){}return r}((function(t){new u(t)})),y=!o&&m((function(){for(var t=new u,e=5;e--;)t[i](e,e);return!t.has(-0)}));p||((c=e((function(t,e){lo(t,a);var r=function(t,e,r){var n,o;return ln&&G(n=e.constructor)&&n!==r&&V(o=n.prototype)&&o!==r.prototype&&ln(t,o),t}(new u,t,c);return F(e)||co(e,r[i],{that:r,AS_ENTRIES:n}),r}))).prototype=a,a.constructor=c),(v||y)&&(l("delete"),l("has"),n&&l("get")),(y||d)&&l(i),o&&a.clear&&delete a.clear}return f[t]=c,Ke({global:!0,constructor:!0,forced:c!==u},f),nn(c,t),o||r.setStrong(c,t,n),c}("WeakMap",Bo,Lo),$o=Ho.prototype,Go=R($o.set);if(ue)if(Do){Po=Lo.getConstructor(Bo,"WeakMap",!0),Xn.enable();var Vo=R($o.delete),Wo=R($o.has),Uo=R($o.get);Hn($o,{delete:function(t){if(V(t)&&!zo(t)){var e=Ro(this);return e.frozen||(e.frozen=new Po),Vo(this,t)||e.frozen.delete(t)}return Vo(this,t)},has:function(t){if(V(t)&&!zo(t)){var e=Ro(this);return e.frozen||(e.frozen=new Po),Wo(this,t)||e.frozen.has(t)}return Wo(this,t)},get:function(t){if(V(t)&&!zo(t)){var e=Ro(this);return e.frozen||(e.frozen=new Po),Wo(this,t)?Uo(this,t):e.frozen.get(t)}return Uo(this,t)},set:function(t,e){if(V(t)&&!zo(t)){var r=Ro(this);r.frozen||(r.frozen=new Po),Wo(this,t)?Go(this,t,e):r.frozen.set(t,e)}else Go(this,t,e);return this}})}else Bn&&m((function(){var t=Co([]);return Go(new Ho,t,1),!Mo(t)}))&&Hn($o,{set:function(t,e){var r;return No(t)&&(Mo(t)?r=Co:_o(t)&&(r=Fo)),Go(this,t,e),r&&r(t),this}});var Ko={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},Yo=zt("span").classList,Xo=Yo&&Yo.constructor&&Yo.constructor.prototype,qo=Xo===Object.prototype?void 0:Xo,Jo=At("iterator"),Qo=Tn.values,Zo=function(t,e){if(t){if(t[Jo]!==Qo)try{Xt(t,Jo,Qo)}catch(e){t[Jo]=Qo}if(nn(t,e,!0),Ko[e])for(var r in Tn)if(t[r]!==Tn[r])try{Xt(t,r,Tn[r])}catch(e){t[r]=Tn[r]}}};for(var ti in Ko)Zo(b[ti]&&b[ti].prototype,ti);Zo(qo,"DOMTokenList");var ei=new WeakMap;function ri(t){var e,r=t.children||[],o=r.length;if(0===o)return"";for(var i=0;i<o&&!e;i+=1){var u=r[i];n.isText(u)&&(e=u)}return null==e?"":e.color||""}function ni(t,r,n){for(var u=r.type,a=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r}(r,["type"]),c=void 0!==n?n:a.level||0,f=e.findPath(t,r),l=f;;){if(0===l.length||0===f[f.length-1])return null;l=o.previous(l);var s=i.node(t,l);if(!s)return null;var d=Er(s,1)[0],v=d.level,p=void 0===v?0:v;if(e.getNodeType(d)!==u)return null;if(p===c)return d}}function oi(t,e,r){var n=ni(t,e,r);return!!n&&n.ordered===e.ordered}var ii=[];var ui={type:"list-item",elemToHtml:function(t,r){var n="",u="",a=t.ordered,c=void 0!==a&&a?"ol":"ul",f=function(t){var r=ei.get(t);if(null==r)return 0;var n=t,u=n.type,a=n.ordered,c=void 0!==a&&a,f=n.level,l=void 0===f?0:f,s=e.findPath(r,t);if(0===s[0])return l+1;var d=o.previous(s),v=i.node(r,d);if(!v)return 0;var p=Er(v,1)[0];if(e.getNodeType(p)!==u)return l+1;var y=p,h=y.ordered,g=void 0!==h&&h,b=y.level,m=void 0===b?0:b;return m<l?l-m:m>l?oi(r,t)?0:1:m===l?g===c?0:1:0}(t);if(f>0)for(var l=0;l<f;l+=1)n+="<".concat(c,">"),ii.push(c);var s=function(t){var r=ei.get(t);if(null==r)return 0;var n=t,u=n.type,a=n.ordered,c=void 0!==a&&a,f=n.level,l=void 0===f?0:f,s=e.findPath(r,t);if(s[0]===r.children.length-1)return l+1;var d=o.next(s),v=i.node(r,d);if(!v)return 0;var p=Er(v,1)[0];if(e.getNodeType(p)!==u)return l+1;var y=p,h=y.ordered,g=void 0!==h&&h,b=y.level,m=void 0===b?0:b;return m<l?oi(r,p)?l-m:l-m+1:m>l?0:m===l?g===c?0:1:0}(t);if(s>0)for(l=0;l<s;l+=1){var d=ii.pop();u+="</".concat(d,">")}var v=ri(t),p=v?' style="color:'.concat(v,'"'):"";return{html:"<li".concat(p,">").concat(r,"</li>"),prefix:n,suffix:u}}},ai=Ie.includes,ci=m((function(){return!Array(1).includes()}));Ke({target:"Array",proto:!0,forced:ci},{includes:function(t){return ai(this,t,arguments.length>1?arguments[1]:void 0)}}),Vr("includes");var fi,li,si=function(){var t=Ht(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.unicodeSets&&(e+="v"),t.sticky&&(e+="y"),e},di=b.RegExp,vi=m((function(){var t=di("a","y");return t.lastIndex=2,null!==t.exec("abcd")})),pi=vi||m((function(){return!di("a","y").sticky})),yi={BROKEN_CARET:vi||m((function(){var t=di("^r","gy");return t.lastIndex=2,null!==t.exec("str")})),MISSED_STICKY:pi,UNSUPPORTED_Y:vi},hi=b.RegExp,gi=m((function(){var t=hi(".","s");return!(t.dotAll&&t.test("\n")&&"s"===t.flags)})),bi=b.RegExp,mi=m((function(){var t=bi("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")})),wi=ye.get,Oi=yt("native-string-replace",String.prototype.replace),Si=RegExp.prototype.exec,xi=Si,Ei=R("".charAt),ji=R("".indexOf),Ti=R("".replace),Ai=R("".slice),Ii=(li=/b*/g,x(Si,fi=/a/,"a"),x(Si,li,"a"),0!==fi.lastIndex||0!==li.lastIndex),Pi=yi.BROKEN_CARET,Li=void 0!==/()??/.exec("")[1];(Ii||Li||Pi||gi||mi)&&(xi=function(t){var e,r,n,o,i,u,a,c=this,f=wi(c),l=Ln(t),s=f.raw;if(s)return s.lastIndex=c.lastIndex,e=x(xi,s,l),c.lastIndex=s.lastIndex,e;var d=f.groups,v=Pi&&c.sticky,p=x(si,c),y=c.source,h=0,g=l;if(v&&(p=Ti(p,"y",""),-1===ji(p,"g")&&(p+="g"),g=Ai(l,c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&"\n"!==Ei(l,c.lastIndex-1))&&(y="(?: "+y+")",g=" "+g,h++),r=new RegExp("^(?:"+y+")",p)),Li&&(r=new RegExp("^"+y+"$(?!\\s)",p)),Ii&&(n=c.lastIndex),o=x(Si,v?r:c,g),v?o?(o.input=Ai(o.input,h),o[0]=Ai(o[0],h),o.index=c.lastIndex,c.lastIndex+=o[0].length):c.lastIndex=0:Ii&&o&&(c.lastIndex=c.global?o.index+o[0].length:n),Li&&o&&o.length>1&&x(Oi,o[0],r,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(o[i]=void 0)})),o&&d)for(o.groups=u=Cr(null),i=0;i<d.length;i++)u[(a=d[i])[0]]=o[a[1]];return o});var Ri=xi;Ke({target:"RegExp",proto:!0,forced:/./.exec!==Ri},{exec:Ri});var ki=function(){function t(){this.type="list-item",this.tag="button"}return t.prototype.getListNode=function(t){var r=this.type;return e.getSelectedNodeByType(t,r)},t.prototype.getValue=function(t){return""},t.prototype.isActive=function(t){var e=this.getListNode(t);if(null==e)return!1;var r=e.ordered;return(void 0!==r&&r)===this.ordered},t.prototype.isDisabled=function(t){return null==t.selection||!!e.getSelectedElems(t).some((function(e){if(i.isVoid(t,e)&&i.isBlock(t,e))return!0;var r=e.type;return!!["pre","code","table"].includes(r)}))},t.prototype.exec=function(t,e){this.isActive(t)?u.setNodes(t,{type:"paragraph",ordered:void 0,level:void 0}):u.setNodes(t,{type:"list-item",ordered:this.ordered,indent:void 0})},t}(),Ni=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.ordered=!1,e.title=r("listModule.unOrderedList"),e.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M384 64h640v128H384V64z m0 384h640v128H384v-128z m0 384h640v128H384v-128zM0 128a128 128 0 1 1 256 0 128 128 0 0 1-256 0z m0 384a128 128 0 1 1 256 0 128 128 0 0 1-256 0z m0 384a128 128 0 1 1 256 0 128 128 0 0 1-256 0z"></path></svg>',e}return Sr(e,t),e}(ki),zi=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.ordered=!0,e.title=r("listModule.orderedList"),e.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M384 832h640v128H384z m0-384h640v128H384z m0-384h640v128H384zM192 0v256H128V64H64V0zM128 526.016v50.016h128v64H64v-146.016l128-60V384H64v-64h192v146.016zM256 704v320H64v-64h128v-64H64v-64h128v-64H64v-64z"></path></svg>',e}return Sr(e,t),e}(ki),Mi={key:"bulletedList",factory:function(){return new Ni}},_i={key:"numberedList",factory:function(){return new zi}},Ci=bo.filter,Fi=hr("filter");Ke({target:"Array",proto:!0,forced:!Fi},{filter:function(t){return Ci(this,t,arguments.length>1?arguments[1]:void 0)}});var Di=function(t,e,r,n,o,i,u,a){for(var c,f,l=o,s=0,d=!!u&&Qn(u,a);s<n;)s in r&&(c=d?d(r[s],s,e):r[s],i>0&&Ye(c)?(f=Te(c),l=Di(t,e,c,f,l,i-1)-1):(qe(l+1),t[l]=c),l++),s++;return l},Bi=Di;Ke({target:"Array",proto:!0},{flat:function(){var t=arguments.length?arguments[0]:void 0,e=gt(this),r=Te(e),n=pr(e,0);return n.length=Bi(n,e,e,r,0,void 0===t?1:Oe(t)),n}}),Vr("flat");var Hi=Function.prototype,$i=Hi.apply,Gi=Hi.call,Vi="object"==typeof Reflect&&Reflect.apply||(O?Gi.bind($i):function(){return Gi.apply($i,arguments)}),Wi=At("species"),Ui=RegExp.prototype,Ki=Mn.charAt,Yi=function(t,e,r){return e+(r?Ki(t,e).length:1)},Xi=Math.floor,qi=R("".charAt),Ji=R("".replace),Qi=R("".slice),Zi=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,tu=/\$([$&'`]|\d{1,2})/g,eu=function(t,e,r,n,o,i){var u=r+t.length,a=n.length,c=tu;return void 0!==o&&(o=gt(o),c=Zi),Ji(i,c,(function(i,c){var f;switch(qi(c,0)){case"$":return"$";case"&":return t;case"`":return Qi(e,0,r);case"'":return Qi(e,u);case"<":f=o[Qi(c,1,-1)];break;default:var l=+c;if(0===l)return i;if(l>a){var s=Xi(l/10);return 0===s?i:s<=a?void 0===n[s-1]?qi(c,1):n[s-1]+qi(c,1):i}f=n[l-1]}return void 0===f?"":f}))},ru=TypeError,nu=function(t,e){var r=t.exec;if(G(r)){var n=x(r,t,e);return null!==n&&Ht(n),n}if("RegExp"===z(t))return x(Ri,t,e);throw new ru("RegExp#exec called on incompatible receiver")},ou=At("replace"),iu=Math.max,uu=Math.min,au=R([].concat),cu=R([].push),fu=R("".indexOf),lu=R("".slice),su="$0"==="a".replace(/./,"$0"),du=!!/./[ou]&&""===/./[ou]("a","$0");function vu(t){return t.length?t[0].tagName.toLowerCase():""}function pu(t){return i.nodes(t,{at:t.selection||void 0,match:function(r){return 1===e.findPath(t,r).length}})}!function(t,e,r,n){var o=At(t),i=!m((function(){var e={};return e[o]=function(){return 7},7!==""[t](e)})),u=i&&!m((function(){var e=!1,r=/a/;return"split"===t&&((r={}).constructor={},r.constructor[Wi]=function(){return r},r.flags="",r[o]=/./[o]),r.exec=function(){return e=!0,null},r[o](""),!e}));if(!i||!u||r){var a=/./[o],c=e(o,""[t],(function(t,e,r,n,o){var u=e.exec;return u===Ri||u===Ui.exec?i&&!o?{done:!0,value:x(a,e,r,n)}:{done:!0,value:x(t,r,e,n)}:{done:!1}}));ge(String.prototype,t,c[0]),ge(Ui,o,c[1])}n&&Xt(Ui[o],"sham",!0)}("replace",(function(t,e,r){var n=du?"$":"$0";return[function(t,r){var n=B(this),o=F(t)?void 0:lt(t,ou);return o?x(o,t,n,r):x(e,Ln(n),t,r)},function(t,o){var i=Ht(this),u=Ln(t);if("string"==typeof o&&-1===fu(o,n)&&-1===fu(o,"$<")){var a=r(e,i,u,o);if(a.done)return a.value}var c=G(o);c||(o=Ln(o));var f,l=i.global;l&&(f=i.unicode,i.lastIndex=0);for(var s,d=[];null!==(s=nu(i,u))&&(cu(d,s),l);){""===Ln(s[0])&&(i.lastIndex=Yi(u,je(i.lastIndex),f))}for(var v,p="",y=0,h=0;h<d.length;h++){for(var g,b=Ln((s=d[h])[0]),m=iu(uu(Oe(s.index),u.length),0),w=[],O=1;O<s.length;O++)cu(w,void 0===(v=s[O])?v:String(v));var S=s.groups;if(c){var x=au([b],w,m,u);void 0!==S&&cu(x,S),g=Ln(Vi(o,void 0,x))}else g=eu(b,u,m,w,S,o);m>=y&&(p+=lu(u,y,m)+g,y=m+b.length)}return p+lu(u,y)}]}),!!m((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}))||!su||du),Ke({global:!0,forced:b.globalThis!==b},{globalThis:b}),f&&(c.fn.append=f),l&&(c.fn.attr=l),s&&(c.fn.parent=s);var yu={renderElems:[{type:"list-item",renderElem:function(t,r,n){ei.set(t,n);var u=t,a=u.level,c=void 0===a?0:a,f=u.ordered,l=void 0!==f&&f,s={margin:"5px 0 5px ".concat(20*c,"px")},v="";if(l){var p=function(t,r){var n=r,u=n.type,a=n.level,c=void 0===a?0:a,f=n.ordered,l=void 0!==f&&f,s=1,d=r,v=e.findPath(t,d);if(0===v[0])return 1;for(;v[0]>0;){var p=o.previous(v),y=i.node(t,p);if(null==y)break;var h=y[0],g=h.level,b=void 0===g?0:g,m=h.type,w=h.ordered;if(m!==u)break;if(b<c)break;if(b===c){if(w!==l)break;s+=1}d=h,v=p}return s}(n,t);v="".concat(p,".")}else v=function(t){void 0===t&&(t=0);var e="";switch(t){case 0:e="•";break;case 1:e="◦";break;default:e="▪"}return e}(c);var y=ri(t);return d("div",{style:s},d("span",{contentEditable:!1,style:{marginRight:"0.5em",color:y},"data-w-e-reserve":!0},v),d("span",null,r))}}],editorPlugin:function(t){var r=t.deleteBackward,n=t.handleTab,o=t.normalizeNode,c=t.insertBreak,f=t;return f.insertBreak=function(){var r=Er(i.nodes(t,{match:function(t){return e.checkNodeType(t,"list-item")},universal:!0}),1)[0];return r?""!==r[0].children[0].text?c():void u.setNodes(f,{type:"paragraph",ordered:void 0,level:void 0}):c()},f.deleteBackward=function(n){var o=f.selection;if(null!=o)if(a.isExpanded(o))r(n);else{var i=e.getSelectedNodeByType(f,"list-item");if(null!=i)if(0!==o.focus.offset)r(n);else{var c=i,l=c.level,s=void 0===l?0:l,d=c.ordered,v=void 0!==d&&d;if(s>0){var p=ni(t,i,s-1);p&&p.ordered!==v?u.setNodes(f,{level:s-1,ordered:!v}):u.setNodes(f,{level:s-1})}else u.setNodes(f,{type:"paragraph",ordered:void 0,level:void 0})}else r(n)}else r(n)},f.handleTab=function(){var t,r,o,i,c=f.selection;if(null!=c){if(a.isCollapsed(c)){var l=e.getSelectedNodeByType(f,"list-item");if(null==l)return void n();if(0===c.focus.offset){var s=l.level,d=void 0===s?0:s;return void u.setNodes(f,{level:d+1})}}if(a.isExpanded(c)){var v=0,p=!1;try{for(var y=xr(pu(f)),h=y.next();!h.done;h=y.next()){var g=Er(h.value,1)[0];"list-item"===e.getNodeType(g)?v+=1:p=!0}}catch(e){t={error:e}}finally{try{h&&!h.done&&(r=y.return)&&r.call(y)}finally{if(t)throw t.error}}if(p||v<=1)return void n();try{for(var b=xr(pu(f)),m=b.next();!m.done;m=b.next()){var w=Er(m.value,2),O=(g=w[0],w[1]),S=g.level;d=void 0===S?0:S;u.setNodes(f,{level:d+1},{at:O})}}catch(t){o={error:t}}finally{try{m&&!m.done&&(i=b.return)&&i.call(b)}finally{if(o)throw o.error}}}else n()}else n()},f.normalizeNode=function(t){var r=Er(t,2),n=r[0],i=r[1],a=e.getNodeType(n);return"bulleted-list"!==a&&"numbered-list"!==a||u.unwrapNodes(f,{at:i}),o([n,i])},f},menus:[Mi,_i],elemsToHtml:[ui],parseElemsHtml:[{selector:"ul:not([data-w-e-type]),ol:not([data-w-e-type])",parseElemHtml:function(t,e,r){return e.flat(1/0)}},{selector:"li:not([data-w-e-type])",parseElemHtml:function(t,e,r){var o=c(t);0===(e=e.filter((function(t){return!!n.isText(t)||!!r.isInline(t)}))).length&&(e=[{text:o.text().replace(/\s+/gm," ")}]);var i=function(t){return"ol"===vu(t.parent())}(o),u=function(t){for(var e=0,r=t.parent(),n=vu(r);"ul"===n||"ol"===n;)n=vu(r=r.parent()),e+=1;return e-1}(o);return{type:"list-item",ordered:i,level:u,children:e}}}]};export{yu as default};
|
|
2
|
-
//# sourceMappingURL=index.esm.js.map
|