@wangeditor-next/list-module 1.3.0 → 2.0.0

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 (128) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +3 -3
  3. package/dist/basic-modules/src/modules/image/custom-types.d.ts +22 -0
  4. package/dist/core/src/config/index.d.ts +13 -0
  5. package/dist/core/src/config/interface.d.ts +270 -0
  6. package/dist/core/src/config/register.d.ts +12 -0
  7. package/dist/core/src/config/style-mode.d.ts +8 -0
  8. package/dist/core/src/constants/index.d.ts +1 -0
  9. package/dist/core/src/constants/svg.d.ts +12 -0
  10. package/dist/core/src/create/bind-node-relation.d.ts +15 -0
  11. package/dist/core/src/create/create-editor.d.ts +10 -0
  12. package/dist/core/src/create/create-toolbar.d.ts +14 -0
  13. package/dist/core/src/create/helper.d.ts +37 -0
  14. package/dist/core/src/create/index.d.ts +7 -0
  15. package/dist/core/src/editor/dom-editor.d.ts +144 -0
  16. package/dist/core/src/editor/interface.d.ts +73 -0
  17. package/dist/core/src/editor/plugins/with-config.d.ts +7 -0
  18. package/dist/core/src/editor/plugins/with-content.d.ts +7 -0
  19. package/dist/core/src/editor/plugins/with-dom.d.ts +10 -0
  20. package/dist/core/src/editor/plugins/with-emitter.d.ts +7 -0
  21. package/dist/core/src/editor/plugins/with-event-data.d.ts +7 -0
  22. package/dist/core/src/editor/plugins/with-max-length.d.ts +7 -0
  23. package/dist/core/src/editor/plugins/with-selection.d.ts +7 -0
  24. package/dist/core/src/i18n/index.d.ts +32 -0
  25. package/dist/core/src/index.d.ts +33 -0
  26. package/dist/core/src/menus/bar/HoverBar.d.ts +48 -0
  27. package/dist/core/src/menus/bar/Toolbar.d.ts +36 -0
  28. package/dist/core/src/menus/bar-item/BaseButton.d.ts +26 -0
  29. package/dist/core/src/menus/bar-item/DropPanelButton.d.ts +14 -0
  30. package/dist/core/src/menus/bar-item/GroupButton.d.ts +17 -0
  31. package/dist/core/src/menus/bar-item/ModalButton.d.ts +25 -0
  32. package/dist/core/src/menus/bar-item/Select.d.ts +22 -0
  33. package/dist/core/src/menus/bar-item/SimpleButton.d.ts +11 -0
  34. package/dist/core/src/menus/bar-item/index.d.ts +24 -0
  35. package/dist/core/src/menus/bar-item/tooltip.d.ts +6 -0
  36. package/dist/core/src/menus/helpers/helpers.d.ts +18 -0
  37. package/dist/core/src/menus/helpers/position.d.ts +36 -0
  38. package/dist/core/src/menus/index.d.ts +9 -0
  39. package/dist/core/src/menus/interface.d.ts +65 -0
  40. package/dist/core/src/menus/panel-and-modal/BaseClass.d.ts +26 -0
  41. package/dist/core/src/menus/panel-and-modal/DropPanel.d.ts +14 -0
  42. package/dist/core/src/menus/panel-and-modal/Modal.d.ts +44 -0
  43. package/dist/core/src/menus/panel-and-modal/SelectList.d.ts +20 -0
  44. package/dist/core/src/menus/register.d.ts +15 -0
  45. package/dist/core/src/parse-html/helper.d.ts +10 -0
  46. package/dist/core/src/parse-html/index.d.ts +35 -0
  47. package/dist/core/src/parse-html/parse-common-elem-html.d.ts +15 -0
  48. package/dist/core/src/parse-html/parse-elem-html.d.ts +15 -0
  49. package/dist/core/src/parse-html/parse-text-elem-html.d.ts +16 -0
  50. package/dist/core/src/render/element/getRenderElem.d.ts +11 -0
  51. package/dist/core/src/render/element/renderElement.d.ts +9 -0
  52. package/dist/core/src/render/element/renderStyle.d.ts +15 -0
  53. package/dist/core/src/render/helper.d.ts +7 -0
  54. package/dist/core/src/render/index.d.ts +27 -0
  55. package/dist/core/src/render/node2Vnode.d.ts +15 -0
  56. package/dist/core/src/render/text/genVnode.d.ts +9 -0
  57. package/dist/core/src/render/text/renderStyle.d.ts +15 -0
  58. package/dist/core/src/render/text/renderText.d.ts +9 -0
  59. package/dist/core/src/text-area/TextArea.d.ts +52 -0
  60. package/dist/core/src/text-area/event-handlers/beforeInput.d.ts +8 -0
  61. package/dist/core/src/text-area/event-handlers/blur.d.ts +8 -0
  62. package/dist/core/src/text-area/event-handlers/click.d.ts +8 -0
  63. package/dist/core/src/text-area/event-handlers/composition.d.ts +27 -0
  64. package/dist/core/src/text-area/event-handlers/copy.d.ts +8 -0
  65. package/dist/core/src/text-area/event-handlers/cut.d.ts +8 -0
  66. package/dist/core/src/text-area/event-handlers/drag.d.ts +9 -0
  67. package/dist/core/src/text-area/event-handlers/drop.d.ts +8 -0
  68. package/dist/core/src/text-area/event-handlers/focus.d.ts +8 -0
  69. package/dist/core/src/text-area/event-handlers/index.d.ts +35 -0
  70. package/dist/core/src/text-area/event-handlers/keydown.d.ts +8 -0
  71. package/dist/core/src/text-area/event-handlers/keypress.d.ts +8 -0
  72. package/dist/core/src/text-area/event-handlers/paste.d.ts +8 -0
  73. package/dist/core/src/text-area/helpers.d.ts +30 -0
  74. package/dist/core/src/text-area/place-holder.d.ts +18 -0
  75. package/dist/core/src/text-area/syncSelection.d.ts +19 -0
  76. package/dist/core/src/text-area/update-view.d.ts +13 -0
  77. package/dist/core/src/to-html/elem2html.d.ts +8 -0
  78. package/dist/core/src/to-html/index.d.ts +32 -0
  79. package/dist/core/src/to-html/node2html.d.ts +8 -0
  80. package/dist/core/src/to-html/text2html.d.ts +8 -0
  81. package/dist/core/src/upload/createUploader.d.ts +12 -0
  82. package/dist/core/src/upload/createUppyUploader.d.ts +7 -0
  83. package/dist/core/src/upload/index.d.ts +9 -0
  84. package/dist/core/src/upload/interface.d.ts +72 -0
  85. package/dist/core/src/utils/dom.d.ts +103 -0
  86. package/dist/core/src/utils/hotkeys.d.ts +35 -0
  87. package/dist/core/src/utils/key.d.ts +11 -0
  88. package/dist/core/src/utils/line.d.ts +14 -0
  89. package/dist/core/src/utils/sanitize-html.d.ts +5 -0
  90. package/dist/core/src/utils/ua.d.ts +14 -0
  91. package/dist/core/src/utils/util.d.ts +28 -0
  92. package/dist/core/src/utils/vdom.d.ts +34 -0
  93. package/dist/core/src/utils/weak-maps.d.ts +60 -0
  94. package/dist/css/style.css +1 -0
  95. package/dist/index.js +2 -0
  96. package/dist/index.js.map +1 -0
  97. package/dist/index.mjs +2 -0
  98. package/dist/index.mjs.map +1 -0
  99. package/dist/list-module/src/constants/svg.d.ts +11 -0
  100. package/dist/list-module/src/index.d.ts +8 -0
  101. package/dist/list-module/src/locale/en.d.ts +11 -0
  102. package/dist/list-module/src/locale/index.d.ts +5 -0
  103. package/dist/list-module/src/locale/zh-CN.d.ts +11 -0
  104. package/dist/list-module/src/module/custom-types.d.ts +11 -0
  105. package/dist/list-module/src/module/elem-to-html.d.ts +16 -0
  106. package/dist/list-module/src/module/helpers.d.ts +13 -0
  107. package/dist/list-module/src/module/index.d.ts +7 -0
  108. package/dist/list-module/src/module/menu/BaseMenu.d.ts +18 -0
  109. package/dist/list-module/src/module/menu/BulletedListMenu.d.ts +11 -0
  110. package/dist/list-module/src/module/menu/NumberedListMenu.d.ts +11 -0
  111. package/dist/list-module/src/module/menu/index.d.ts +14 -0
  112. package/dist/list-module/src/module/parse-elem-html.d.ts +19 -0
  113. package/dist/list-module/src/module/plugin.d.ts +7 -0
  114. package/dist/list-module/src/module/render-elem.d.ts +13 -0
  115. package/dist/list-module/src/module/style-class.d.ts +6 -0
  116. package/dist/list-module/src/utils/dom.d.ts +19 -0
  117. package/dist/list-module/src/utils/maps.d.ts +6 -0
  118. package/dist/list-module/src/utils/util.d.ts +6 -0
  119. package/dist/table-module/src/utils/has-common.d.ts +7 -0
  120. package/dist/table-module/src/utils/index.d.ts +5 -0
  121. package/dist/table-module/src/utils/is-of-type.d.ts +6 -0
  122. package/dist/table-module/src/utils/matrices.d.ts +9 -0
  123. package/dist/table-module/src/utils/options.d.ts +25 -0
  124. package/dist/table-module/src/utils/point.d.ts +7 -0
  125. package/dist/table-module/src/utils/types.d.ts +19 -0
  126. package/dist/video-module/src/module/custom-types.d.ts +23 -0
  127. package/package.json +29 -23
  128. package/CHANGELOG.md +0 -115
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @description create default uppy uploader
3
+ * @author wangfupeng
4
+ */
5
+ import type { IUploadConfig, IUploader } from './interface';
6
+ declare function createUppyUploader(config: IUploadConfig): IUploader;
7
+ export default createUppyUploader;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @description upload entry
3
+ * @author wangfupeng
4
+ */
5
+ import createUploader from './createUploader';
6
+ import createUppyUploader from './createUppyUploader';
7
+ import type { IUploadAdapter, IUploadAdapterContext, IUploadConfig, IUploader, IUploadFile, IUploadResultFile } from './interface';
8
+ export { createUploader, createUppyUploader };
9
+ export type { IUploadAdapter, IUploadAdapterContext, IUploadConfig, IUploader, IUploadFile, IUploadResultFile, };
@@ -0,0 +1,72 @@
1
+ /**
2
+ * @description upload interface
3
+ * @author wangfupeng
4
+ */
5
+ import type { IDomEditor } from '../editor/interface';
6
+ export type IUploadHeaders = Record<string, string | number>;
7
+ export interface IUploadResultFile {
8
+ name: string;
9
+ type?: string;
10
+ size?: number;
11
+ [key: string]: any;
12
+ }
13
+ export interface IUploadFile {
14
+ name: string;
15
+ type: string;
16
+ size: number;
17
+ data: Blob | File;
18
+ source?: string;
19
+ }
20
+ export interface IUploader {
21
+ addFiles: (files: IUploadFile[]) => void;
22
+ upload: () => Promise<unknown>;
23
+ destroy?: () => void;
24
+ }
25
+ type FilesType = Record<string, any>;
26
+ type InsertFn = (src: string, poster?: string, alt?: string, href?: string) => void | Promise<void>;
27
+ export interface IUploadAdapterContext {
28
+ config: IUploadConfig;
29
+ editor?: IDomEditor;
30
+ }
31
+ export type IUploadAdapter = (context: IUploadAdapterContext) => IUploader;
32
+ interface IBaseUploadConfig {
33
+ fieldName?: string;
34
+ maxFileSize?: number;
35
+ maxNumberOfFiles?: number;
36
+ meta?: Record<string, unknown>;
37
+ metaWithUrl: boolean;
38
+ headers?: IUploadHeaders | ((file: IUploadResultFile) => IUploadHeaders) | undefined;
39
+ withCredentials?: boolean;
40
+ timeout?: number;
41
+ onBeforeUpload?: (files: FilesType) => boolean | FilesType;
42
+ onSuccess: (file: IUploadResultFile, response: any) => void;
43
+ onProgress?: (progress: number) => void;
44
+ onFailed: (file: IUploadResultFile, response: any) => void;
45
+ onError: (file: IUploadResultFile, error: any, res: any) => void;
46
+ allowedFileTypes?: string[];
47
+ customInsert?: (res: any, insertFn: InsertFn) => void;
48
+ customUpload?: (files: File, insertFn: InsertFn, editor: IDomEditor) => void;
49
+ customBrowseAndUpload?: (insertFn: InsertFn) => void;
50
+ uploadAdapter?: IUploadAdapter;
51
+ uppyConfig?: Record<string, any>;
52
+ xhrConfig?: Record<string, any>;
53
+ }
54
+ interface IUploadConfigWithCustomUpload extends IBaseUploadConfig {
55
+ server?: string;
56
+ customUpload: (files: File, insertFn: InsertFn, editor: IDomEditor) => void;
57
+ }
58
+ interface IUploadConfigWithUploadAdapter extends IBaseUploadConfig {
59
+ server?: string;
60
+ uploadAdapter: IUploadAdapter;
61
+ customUpload?: (files: File, insertFn: InsertFn, editor: IDomEditor) => void;
62
+ }
63
+ interface IUploadConfigWithoutCustomUpload extends IBaseUploadConfig {
64
+ server: string;
65
+ customUpload?: never;
66
+ uploadAdapter?: never;
67
+ }
68
+ /**
69
+ * 配置参考 https://uppy.io/docs/uppy/
70
+ */
71
+ export type IUploadConfig = IUploadConfigWithCustomUpload | IUploadConfigWithUploadAdapter | IUploadConfigWithoutCustomUpload;
72
+ export {};
@@ -0,0 +1,103 @@
1
+ /**
2
+ * @description DOM 操作 part1 - DOM7 文档 https://framework7.io/docs/dom7.html
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 { Dom7Array } from 'dom7';
14
+ export default $;
15
+ export declare enum NodeType {
16
+ ELEMENT_NODE = 1,
17
+ TEXT_NODE = 3,
18
+ CDATA_SECTION_NODE = 4,
19
+ PROCESSING_INSTRUCTION_NODE = 7,
20
+ COMMENT_NODE = 8,
21
+ DOCUMENT_NODE = 9,
22
+ DOCUMENT_TYPE_NODE = 10,
23
+ DOCUMENT_FRAGMENT_NODE = 11
24
+ }
25
+ export declare const isDocument: (value: any) => value is Document;
26
+ export declare const isShadowRoot: (value: any) => value is ShadowRoot;
27
+ export declare const isDataTransfer: (value: any) => value is DataTransfer;
28
+ export declare const isUnprocessedListElement: (el: Element) => boolean;
29
+ export declare const isHTMLElememt: (value: any) => value is HTMLElement;
30
+ export { DOMComment, DOMElement, DOMNode, DOMRange, DOMSelection, DOMStaticRange, DOMText, };
31
+ export type DOMPoint = [Node, number];
32
+ /**
33
+ * Returns the host window of a DOM node
34
+ */
35
+ export declare const getDefaultView: (value: any) => Window | null;
36
+ /**
37
+ * Check if a value is a DOM node.
38
+ */
39
+ export declare const isDOMNode: (value: any) => value is DOMNode;
40
+ /**
41
+ * Check if a DOM node is a comment node.
42
+ */
43
+ export declare const isDOMComment: (value: any) => value is DOMComment;
44
+ /**
45
+ * Check if a DOM node is an element node.
46
+ */
47
+ export declare const isDOMElement: (value: any) => value is DOMElement;
48
+ /**
49
+ * Check if a value is a DOM selection.
50
+ */
51
+ export declare const isDOMSelection: (value: any) => value is DOMSelection;
52
+ /**
53
+ * Check if a DOM node is an element node.
54
+ */
55
+ export declare const isDOMText: (value: any) => value is DOMText;
56
+ /**
57
+ * Checks whether a paste event is a plaintext-only event.
58
+ */
59
+ export declare const isPlainTextOnlyPaste: (event: ClipboardEvent) => boolean | null;
60
+ /**
61
+ * Normalize a DOM point so that it always refers to a text node.
62
+ */
63
+ export declare const normalizeDOMPoint: (domPoint: DOMPoint) => DOMPoint;
64
+ /**
65
+ * Determines wether the active element is nested within a shadowRoot
66
+ */
67
+ export declare const hasShadowRoot: () => boolean;
68
+ /**
69
+ * Get the element with the specified id
70
+ */
71
+ export declare const getElementById: (id: string) => null | HTMLElement;
72
+ /**
73
+ * Get the nearest editable child and index at `index` in a `parent`, preferring `direction`.
74
+ */
75
+ export declare const getEditableChildAndIndex: (parent: DOMElement, index: number, direction: "forward" | "backward") => [DOMNode, number];
76
+ /**
77
+ * Get the nearest editable child at `index` in a `parent`, preferring
78
+ * `direction`.
79
+ */
80
+ export declare const getEditableChild: (parent: DOMElement, index: number, direction: "forward" | "backward") => DOMNode;
81
+ /**
82
+ * Get a plaintext representation of the content of a node, accounting for block
83
+ * elements which get a newline appended.
84
+ *
85
+ * The domNode must be attached to the DOM.
86
+ */
87
+ export declare const getPlainText: (domNode: DOMNode) => string;
88
+ /**
89
+ * 在下级节点中找到第一个 void elem
90
+ * @param elem elem
91
+ */
92
+ export declare function getFirstVoidChild(elem: DOMElement): DOMElement | null;
93
+ /**
94
+ * 遍历一个 elem 内所有的 text node ,执行函数
95
+ * @param elem elem
96
+ * @param handler handler
97
+ */
98
+ export declare function walkTextNodes(elem: DOMElement, handler: (textNode: DOMNode, parent: DOMElement) => void): void;
99
+ /**
100
+ * 获取 tagName lower-case
101
+ * @param $elem $elem
102
+ */
103
+ export declare function getTagName($elem: Dom7Array): string;
@@ -0,0 +1,35 @@
1
+ /**
2
+ * @description 快捷键
3
+ * @author wangfupeng
4
+ */
5
+ /**
6
+ * Hotkeys.
7
+ */
8
+ declare const _default: {
9
+ isBold: (event: KeyboardEvent) => boolean;
10
+ isCompose: (event: KeyboardEvent) => boolean;
11
+ isMoveBackward: (event: KeyboardEvent) => boolean;
12
+ isMoveForward: (event: KeyboardEvent) => boolean;
13
+ isDeleteBackward: (event: KeyboardEvent) => boolean;
14
+ isDeleteForward: (event: KeyboardEvent) => boolean;
15
+ isDeleteLineBackward: (event: KeyboardEvent) => boolean;
16
+ isDeleteLineForward: (event: KeyboardEvent) => boolean;
17
+ isDeleteWordBackward: (event: KeyboardEvent) => boolean;
18
+ isDeleteWordForward: (event: KeyboardEvent) => boolean;
19
+ isExtendBackward: (event: KeyboardEvent) => boolean;
20
+ isExtendForward: (event: KeyboardEvent) => boolean;
21
+ isExtendLineBackward: (event: KeyboardEvent) => boolean;
22
+ isExtendLineForward: (event: KeyboardEvent) => boolean;
23
+ isItalic: (event: KeyboardEvent) => boolean;
24
+ isMoveLineBackward: (event: KeyboardEvent) => boolean;
25
+ isMoveLineForward: (event: KeyboardEvent) => boolean;
26
+ isMoveWordBackward: (event: KeyboardEvent) => boolean;
27
+ isMoveWordForward: (event: KeyboardEvent) => boolean;
28
+ isRedo: (event: KeyboardEvent) => boolean;
29
+ isSplitBlock: (event: KeyboardEvent) => boolean;
30
+ isTransposeCharacter: (event: KeyboardEvent) => boolean;
31
+ isUndo: (event: KeyboardEvent) => boolean;
32
+ isTab: (event: KeyboardEvent) => boolean;
33
+ isSelectAll: (event: KeyboardEvent) => boolean;
34
+ };
35
+ export default _default;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * An auto-incrementing identifier for keys.
3
+ */
4
+ /**
5
+ * A class that keeps track of a key string. We use a full class here because we
6
+ * want to be able to use them as keys in `WeakMap` objects.
7
+ */
8
+ export declare class Key {
9
+ id: string;
10
+ constructor();
11
+ }
@@ -0,0 +1,14 @@
1
+ /**
2
+ * @description Utilities for single-line deletion
3
+ */
4
+ import { Range } from 'slate';
5
+ import { IDomEditor } from '../editor/interface';
6
+ /**
7
+ * A helper utility that returns the end portion of a `Range`
8
+ * which is located on a single line.
9
+ *
10
+ * @param {Editor} editor The editor object to compare against
11
+ * @param {Range} parentRange The parent range to compare against
12
+ * @returns {Range} A valid portion of the parentRange which is one a single line
13
+ */
14
+ export declare const findCurrentLineRange: (editor: IDomEditor, parentRange: Range) => Range;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * @description sanitize html before parsing/importing into editor
3
+ * @author Codex
4
+ */
5
+ export declare function defaultSanitizeHtml(html?: string): string;
@@ -0,0 +1,14 @@
1
+ /**
2
+ * @description 通过 UA 判断浏览器
3
+ * @author wangfupeng
4
+ */
5
+ export declare const IS_IOS: boolean;
6
+ export declare const IS_APPLE: boolean;
7
+ export declare const IS_FIREFOX: boolean;
8
+ export declare const IS_FIREFOX_LEGACY: boolean;
9
+ export declare const IS_SAFARI: boolean;
10
+ export declare const IS_EDGE_LEGACY: boolean;
11
+ export declare const IS_CHROME_LEGACY: boolean;
12
+ export declare const IS_CHROME: boolean;
13
+ export declare const IS_QQBROWSER: boolean;
14
+ export declare const HAS_BEFORE_INPUT_SUPPORT: boolean;
@@ -0,0 +1,28 @@
1
+ /**
2
+ * @description 工具函数
3
+ * @author wangfupeng
4
+ */
5
+ /**
6
+ * 获取随机数字符串
7
+ * @param prefix 前缀
8
+ * @returns 随机数字符串
9
+ */
10
+ export declare function genRandomStr(prefix?: string): string;
11
+ export declare function promiseResolveThen(fn: Function): void;
12
+ /**
13
+ * 追加 url query 参数
14
+ * @param url url
15
+ * @param data data
16
+ */
17
+ export declare function addQueryToUrl(url: string, data: object): string;
18
+ /**
19
+ * 替换 html 特殊字符,如 > 替换为 &gt;
20
+ * @param str html str
21
+ */
22
+ export declare function replaceHtmlSpecialSymbols(str: string): string;
23
+ /**
24
+ *【反转】替换 html 特殊字符,如 &gt; 替换为 >
25
+ * @param str html str
26
+ */
27
+ export declare function deReplaceHtmlSpecialSymbols(str: string): string;
28
+ export declare const toString: (val: unknown) => string;
@@ -0,0 +1,34 @@
1
+ /**
2
+ * @description vdom 相关方法
3
+ * @author wangfupeng
4
+ */
5
+ import { VNode, VNodeStyle, Props, Dataset } from 'snabbdom';
6
+ export type PatchFn = (oldVnode: VNode | Element, vnode: VNode) => VNode;
7
+ /**
8
+ * 创建 snabbdom patch
9
+ * @returns snabbdom patch 函数
10
+ */
11
+ export declare function genPatchFn(): PatchFn;
12
+ /**
13
+ * 整理 vnode.data ,将暴露出来的零散属性(如 id className data-xxx)放在 data.props 或 data.dataset
14
+ * @param vnode vnode
15
+ */
16
+ export declare function normalizeVnodeData(vnode: VNode): void;
17
+ /**
18
+ * 给 vnode 添加 prop
19
+ * @param vnode vnode
20
+ * @param newProp { key: val }
21
+ */
22
+ export declare function addVnodeProp(vnode: VNode, newProp: Props): void;
23
+ /**
24
+ * 给 vnode 添加 dataset
25
+ * @param vnode vnode
26
+ * @param newDataset { key: val }
27
+ */
28
+ export declare function addVnodeDataset(vnode: VNode, newDataset: Dataset): void;
29
+ /**
30
+ * 给 vnode 添加样式
31
+ * @param vnode vnode
32
+ * @param newStyle { key: val }
33
+ */
34
+ export declare function addVnodeStyle(vnode: VNode, newStyle: VNodeStyle): void;
@@ -0,0 +1,60 @@
1
+ /**
2
+ * @description 对象关联关系(部分参考 slate-react weak-maps.ts)
3
+ * @author wangfupeng
4
+ */
5
+ import { Emitter } from 'event-emitter';
6
+ import { Ancestor, Editor, Node, Path, Range } from 'slate';
7
+ import { VNode } from 'snabbdom';
8
+ import { IEditorConfig } from '../config/interface';
9
+ import { IDomEditor } from '../editor/interface';
10
+ import HoverBar from '../menus/bar/HoverBar';
11
+ import Toolbar from '../menus/bar/Toolbar';
12
+ import { IBarItem } from '../menus/bar-item/index';
13
+ import PanelAndModal from '../menus/panel-and-modal/BaseClass';
14
+ import TextArea from '../text-area/TextArea';
15
+ import { PatchFn } from '../utils/vdom';
16
+ import { Key } from './key';
17
+ export declare const EDITOR_TO_TEXTAREA: WeakMap<IDomEditor, TextArea>;
18
+ export declare const TEXTAREA_TO_EDITOR: WeakMap<TextArea, IDomEditor>;
19
+ export declare const TOOLBAR_TO_EDITOR: WeakMap<Toolbar, IDomEditor>;
20
+ export declare const EDITOR_TO_TOOLBAR: WeakMap<IDomEditor, Toolbar>;
21
+ export declare const HOVER_BAR_TO_EDITOR: WeakMap<HoverBar, IDomEditor>;
22
+ export declare const EDITOR_TO_HOVER_BAR: WeakMap<IDomEditor, HoverBar>;
23
+ export declare const BAR_ITEM_TO_EDITOR: WeakMap<IBarItem, IDomEditor>;
24
+ export declare const EDITOR_TO_PANEL_AND_MODAL: WeakMap<IDomEditor, Set<PanelAndModal>>;
25
+ export declare const PANEL_OR_MODAL_TO_EDITOR: WeakMap<PanelAndModal, IDomEditor>;
26
+ export declare const EDITOR_TO_CONFIG: WeakMap<IDomEditor, IEditorConfig>;
27
+ export declare const IS_FIRST_PATCH: WeakMap<TextArea, boolean>;
28
+ export declare const TEXTAREA_TO_PATCH_FN: WeakMap<TextArea, PatchFn>;
29
+ export declare const TEXTAREA_TO_VNODE: WeakMap<TextArea, VNode>;
30
+ export declare const NODE_TO_VNODE: WeakMap<Node, [number, VNode]>;
31
+ export declare const NODE_TO_HTML: WeakMap<Node, String>;
32
+ /**
33
+ * Two weak maps that allow us rebuild a path given a node. They are populated
34
+ * at render time such that after a render occurs we can always backtrack.
35
+ */
36
+ export declare const NODE_TO_INDEX: WeakMap<Node, number>;
37
+ export declare const NODE_TO_PARENT: WeakMap<Node, Ancestor>;
38
+ /**
39
+ * Weak maps that allow us to go between Slate nodes and DOM nodes. These
40
+ * are used to resolve DOM event-related logic into Slate actions.
41
+ */
42
+ export declare const EDITOR_TO_ELEMENT: WeakMap<Editor, HTMLElement>;
43
+ export declare const EDITOR_TO_PLACEHOLDER: WeakMap<Editor, string>;
44
+ export declare const ELEMENT_TO_NODE: WeakMap<HTMLElement, Node>;
45
+ export declare const KEY_TO_ELEMENT: WeakMap<Key, HTMLElement>;
46
+ export declare const NODE_TO_ELEMENT: WeakMap<Node, HTMLElement>;
47
+ export declare const NODE_TO_KEY: WeakMap<Node, Key>;
48
+ export declare const EDITOR_TO_WINDOW: WeakMap<Editor, Window>;
49
+ /**
50
+ * Weak maps for storing editor-related state.
51
+ */
52
+ export declare const IS_FOCUSED: WeakMap<Editor, boolean>;
53
+ export declare const IS_DRAGGING: WeakMap<Editor, boolean>;
54
+ export declare const IS_CLICKING: WeakMap<Editor, boolean>;
55
+ export declare const CHANGING_NODE_PATH: WeakMap<Editor, Path>;
56
+ export declare const EDITOR_TO_SELECTION: WeakMap<Editor, Range>;
57
+ export declare const EDITOR_TO_EMITTER: WeakMap<Editor, Emitter>;
58
+ export declare const EDITOR_TO_CAN_PASTE: WeakMap<Editor, boolean>;
59
+ export declare const EDITOR_TO_PENDING_COMPOSITION_END: WeakMap<Editor, boolean>;
60
+ export declare const EDITOR_TO_PENDING_SELECTION: WeakMap<Editor, Range | null>;
@@ -0,0 +1 @@
1
+ .w-e-list-color-ewtzuf{color:#000}.w-e-list-color-4xvty2{color:#262626}.w-e-list-color-sqycuk{color:#595959}.w-e-list-color-3z8psd{color:#8c8c8c}.w-e-list-color-wksmh8{color:#bfbfbf}.w-e-list-color-paasa7{color:#d9d9d9}.w-e-list-color-6bm9m5{color:#e9e9e9}.w-e-list-color-l91prz{color:#f5f5f5}.w-e-list-color-k3jp27{color:#fafafa}.w-e-list-color-67tap4{color:#fff}.w-e-list-color-tunwkj{color:#e13c39}.w-e-list-color-s85xre{color:#e75f33}.w-e-list-color-xx8cx7{color:#eb903a}.w-e-list-color-8hp23z{color:#f5db4d}.w-e-list-color-vbyzhj{color:#72c040}.w-e-list-color-a0scch{color:#59bfc0}.w-e-list-color-786vrv{color:#4290f7}.w-e-list-color-jztut9{color:#3658e2}.w-e-list-color-wh1hr9{color:#6a39c9}.w-e-list-color-enuf5u{color:#d84493}.w-e-list-color-ofga0e{color:#fbe9e6}.w-e-list-color-n2n1ob{color:#fcede1}.w-e-list-color-o0q9nf{color:#fcefd4}.w-e-list-color-e2ltc0{color:#fcfbcf}.w-e-list-color-sx4s4b{color:#e7f6d5}.w-e-list-color-t4t3jr{color:#daf4f0}.w-e-list-color-j4jejh{color:#d9edfa}.w-e-list-color-wb7pdv{color:#e0e8fa}.w-e-list-color-f3wgv5{color:#ede1f8}.w-e-list-color-omv2nm{color:#f6e2ea}.w-e-list-color-qn194t{color:#ffa39e}.w-e-list-color-mdg9z8{color:#ffbb96}.w-e-list-color-hl8b9g{color:#ffd591}.w-e-list-color-4bm5ce{color:#fffb8f}.w-e-list-color-xyf4ks{color:#b7eb8f}.w-e-list-color-wj8ykc{color:#87e8de}.w-e-list-color-9gfdr3{color:#91d5ff}.w-e-list-color-hsaivy{color:#adc6ff}.w-e-list-color-v3pqyx{color:#d3adf7}.w-e-list-color-5sw276{color:#ffadd2}.w-e-list-color-bsc56c{color:#ff4d4f}.w-e-list-color-qg254p{color:#ff7a45}.w-e-list-color-sg36qp{color:#ffa940}.w-e-list-color-6556xy{color:#ffec3d}.w-e-list-color-byp7re{color:#73d13d}.w-e-list-color-eyz4ng{color:#36cfc9}.w-e-list-color-9xmyha{color:#40a9ff}.w-e-list-color-g6x347{color:#597ef7}.w-e-list-color-qkkoll{color:#9254de}.w-e-list-color-4uljq8{color:#f759ab}.w-e-list-color-2zmrji{color:#cf1322}.w-e-list-color-8epkxl{color:#d4380d}.w-e-list-color-6ff92a{color:#d46b08}.w-e-list-color-6j9t63{color:#d4b106}.w-e-list-color-xsysfa{color:#389e0d}.w-e-list-color-qic72q{color:#08979c}.w-e-list-color-oounuc{color:#096dd9}.w-e-list-color-dcs2ck{color:#1d39c4}.w-e-list-color-nkq71x{color:#531dab}.w-e-list-color-v640ve{color:#c41d7f}.w-e-list-color-beewzy{color:#820014}.w-e-list-color-dsgatp{color:#871400}.w-e-list-color-du7iiy{color:#873800}.w-e-list-color-aoputq{color:#614700}.w-e-list-color-mkf87m{color:#135200}.w-e-list-color-l4iwsq{color:#00474f}.w-e-list-color-p38mu9{color:#003a8c}.w-e-list-color-z5ty33{color:#061178}.w-e-list-color-6t1egh{color:#22075e}.w-e-list-color-i6ncxa{color:#780650}
package/dist/index.js ADDED
@@ -0,0 +1,2 @@
1
+ !function(r,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("@wangeditor-next/core"),require("slate"),require("dom7"),require("snabbdom")):"function"==typeof define&&define.amd?define(["@wangeditor-next/core","slate","dom7","snabbdom"],t):(r="undefined"!=typeof globalThis?globalThis:r||self).WangEditorListModule=t(r.core,r.slate,r.$,r.snabbdom)}(this,function(r,t,n,e){"use strict";r.i18nAddResources("en",{listModule:{unOrderedList:"Unordered list",orderedList:"Ordered list"}}),r.i18nAddResources("zh-CN",{listModule:{unOrderedList:"无序列表",orderedList:"有序列表"}});var i,o,u="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},a={};function f(){if(o)return i;o=1;var r=function(r){return r&&r.Math===Math&&r};return i=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof u&&u)||r("object"==typeof i&&i)||function(){return this}()||Function("return this")()}var c,s,l,v,d,p,g,y,h={};function b(){return s?c:(s=1,c=function(r){try{return!!r()}catch(r){return!0}})}function m(){if(v)return l;v=1;var r=b();return l=!r(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})}function w(){if(p)return d;p=1;var r=b();return d=!r(function(){var r=function(){}.bind();return"function"!=typeof r||r.hasOwnProperty("prototype")})}function x(){if(y)return g;y=1;var r=w(),t=Function.prototype.call;return g=r?t.bind(t):function(){return t.apply(t,arguments)},g}var S,O,E,T,j,A,P,I,R,k,z,L,N,C,M,_,D,F,B,H,$,G,V,W,U,q,K,Y,X,J,Q,Z,rr,tr,nr,er,ir,or,ur,ar,fr,cr={};function sr(){return E?O:(E=1,O=function(r,t){return{enumerable:!(1&r),configurable:!(2&r),writable:!(4&r),value:t}})}function lr(){if(j)return T;j=1;var r=w(),t=Function.prototype,n=t.call,e=r&&t.bind.bind(n,n);return T=r?e:function(r){return function(){return n.apply(r,arguments)}},T}function vr(){if(P)return A;P=1;var r=lr(),t=r({}.toString),n=r("".slice);return A=function(r){return n(t(r),8,-1)}}function dr(){if(R)return I;R=1;var r=lr(),t=b(),n=vr(),e=Object,i=r("".split);return I=t(function(){return!e("z").propertyIsEnumerable(0)})?function(r){return"String"===n(r)?i(r,""):e(r)}:e}function pr(){return z?k:(z=1,k=function(r){return null==r})}function gr(){if(N)return L;N=1;var r=pr(),t=TypeError;return L=function(n){if(r(n))throw new t("Can't call method on "+n);return n}}function yr(){if(M)return C;M=1;var r=dr(),t=gr();return C=function(n){return r(t(n))}}function hr(){if(D)return _;D=1;var r="object"==typeof document&&document.all;return _=void 0===r&&void 0!==r?function(t){return"function"==typeof t||t===r}:function(r){return"function"==typeof r}}function br(){if(B)return F;B=1;var r=hr();return F=function(t){return"object"==typeof t?null!==t:r(t)}}function mr(){if($)return H;$=1;var r=f(),t=hr();return H=function(n,e){return arguments.length<2?(i=r[n],t(i)?i:void 0):r[n]&&r[n][e];var i},H}function wr(){if(V)return G;V=1;var r=lr();return G=r({}.isPrototypeOf)}function xr(){if(K)return q;K=1;var r,t,n=f(),e=function(){if(U)return W;U=1;var r=f().navigator,t=r&&r.userAgent;return W=t?String(t):""}(),i=n.process,o=n.Deno,u=i&&i.versions||o&&o.version,a=u&&u.v8;return a&&(t=(r=a.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!t&&e&&(!(r=e.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=e.match(/Chrome\/(\d+)/))&&(t=+r[1]),q=t}function Sr(){if(X)return Y;X=1;var r=xr(),t=b(),n=f().String;return Y=!!Object.getOwnPropertySymbols&&!t(function(){var t=Symbol("symbol detection");return!n(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&r&&r<41})}function Or(){if(Q)return J;Q=1;var r=Sr();return J=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator}function Er(){if(rr)return Z;rr=1;var r=mr(),t=hr(),n=wr(),e=Or(),i=Object;return Z=e?function(r){return"symbol"==typeof r}:function(e){var o=r("Symbol");return t(o)&&n(o.prototype,i(e))}}function Tr(){if(nr)return tr;nr=1;var r=String;return tr=function(t){try{return r(t)}catch(r){return"Object"}}}function jr(){if(ir)return er;ir=1;var r=hr(),t=Tr(),n=TypeError;return er=function(e){if(r(e))return e;throw new n(t(e)+" is not a function")}}function Ar(){if(ur)return or;ur=1;var r=jr(),t=pr();return or=function(n,e){var i=n[e];return t(i)?void 0:r(i)}}function Pr(){if(fr)return ar;fr=1;var r=x(),t=hr(),n=br(),e=TypeError;return ar=function(i,o){var u,a;if("string"===o&&t(u=i.toString)&&!n(a=r(u,i)))return a;if(t(u=i.valueOf)&&!n(a=r(u,i)))return a;if("string"!==o&&t(u=i.toString)&&!n(a=r(u,i)))return a;throw new e("Can't convert object to primitive value")}}var Ir,Rr,kr,zr,Lr,Nr,Cr,Mr,_r,Dr,Fr,Br,Hr,$r,Gr,Vr,Wr,Ur,qr,Kr,Yr,Xr,Jr,Qr,Zr={exports:{}};function rt(){return Rr?Ir:(Rr=1,Ir=!1)}function tt(){if(zr)return kr;zr=1;var r=f(),t=Object.defineProperty;return kr=function(n,e){try{t(r,n,{value:e,configurable:!0,writable:!0})}catch(t){r[n]=e}return e}}function nt(){if(Lr)return Zr.exports;Lr=1;var r=rt(),t=f(),n=tt(),e="__core-js_shared__",i=Zr.exports=t[e]||n(e,{});return(i.versions||(i.versions=[])).push({version:"3.47.0",mode:r?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru), 2025 CoreJS Company (core-js.io)",license:"https://github.com/zloirock/core-js/blob/v3.47.0/LICENSE",source:"https://github.com/zloirock/core-js"}),Zr.exports}function et(){if(Cr)return Nr;Cr=1;var r=nt();return Nr=function(t,n){return r[t]||(r[t]=n||{})}}function it(){if(_r)return Mr;_r=1;var r=gr(),t=Object;return Mr=function(n){return t(r(n))}}function ot(){if(Fr)return Dr;Fr=1;var r=lr(),t=it(),n=r({}.hasOwnProperty);return Dr=Object.hasOwn||function(r,e){return n(t(r),e)}}function ut(){if(Hr)return Br;Hr=1;var r=lr(),t=0,n=Math.random(),e=r(1.1.toString);return Br=function(r){return"Symbol("+(void 0===r?"":r)+")_"+e(++t+n,36)}}function at(){if(Gr)return $r;Gr=1;var r=f(),t=et(),n=ot(),e=ut(),i=Sr(),o=Or(),u=r.Symbol,a=t("wks"),c=o?u.for||u:u&&u.withoutSetter||e;return $r=function(r){return n(a,r)||(a[r]=i&&n(u,r)?u[r]:c("Symbol."+r)),a[r]}}function ft(){if(Wr)return Vr;Wr=1;var r=x(),t=br(),n=Er(),e=Ar(),i=Pr(),o=at(),u=TypeError,a=o("toPrimitive");return Vr=function(o,f){if(!t(o)||n(o))return o;var c,s=e(o,a);if(s){if(void 0===f&&(f="default"),c=r(s,o,f),!t(c)||n(c))return c;throw new u("Can't convert object to primitive value")}return void 0===f&&(f="number"),i(o,f)}}function ct(){if(qr)return Ur;qr=1;var r=ft(),t=Er();return Ur=function(n){var e=r(n,"string");return t(e)?e:e+""}}function st(){if(Yr)return Kr;Yr=1;var r=f(),t=br(),n=r.document,e=t(n)&&t(n.createElement);return Kr=function(r){return e?n.createElement(r):{}}}function lt(){if(Jr)return Xr;Jr=1;var r=m(),t=b(),n=st();return Xr=!r&&!t(function(){return 7!==Object.defineProperty(n("div"),"a",{get:function(){return 7}}).a})}function vt(){if(Qr)return h;Qr=1;var r=m(),t=x(),n=function(){if(S)return cr;S=1;var r={}.propertyIsEnumerable,t=Object.getOwnPropertyDescriptor,n=t&&!r.call({1:2},1);return cr.f=n?function(r){var n=t(this,r);return!!n&&n.enumerable}:r,cr}(),e=sr(),i=yr(),o=ct(),u=ot(),a=lt(),f=Object.getOwnPropertyDescriptor;return h.f=r?f:function(r,c){if(r=i(r),c=o(c),a)try{return f(r,c)}catch(r){}if(u(r,c))return e(!t(n.f,r,c),r[c])},h}var dt,pt,gt,yt,ht,bt,mt,wt={};function xt(){if(pt)return dt;pt=1;var r=m(),t=b();return dt=r&&t(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})}function St(){if(yt)return gt;yt=1;var r=br(),t=String,n=TypeError;return gt=function(e){if(r(e))return e;throw new n(t(e)+" is not an object")}}function Ot(){if(ht)return wt;ht=1;var r=m(),t=lt(),n=xt(),e=St(),i=ct(),o=TypeError,u=Object.defineProperty,a=Object.getOwnPropertyDescriptor,f="enumerable",c="configurable",s="writable";return wt.f=r?n?function(r,t,n){if(e(r),t=i(t),e(n),"function"==typeof r&&"prototype"===t&&"value"in n&&s in n&&!n[s]){var o=a(r,t);o&&o[s]&&(r[t]=n.value,n={configurable:c in n?n[c]:o[c],enumerable:f in n?n[f]:o[f],writable:!1})}return u(r,t,n)}:u:function(r,n,a){if(e(r),n=i(n),e(a),t)try{return u(r,n,a)}catch(r){}if("get"in a||"set"in a)throw new o("Accessors not supported");return"value"in a&&(r[n]=a.value),r},wt}function Et(){if(mt)return bt;mt=1;var r=m(),t=Ot(),n=sr();return bt=r?function(r,e,i){return t.f(r,e,n(1,i))}:function(r,t,n){return r[t]=n,r}}var Tt,jt,At,Pt,It,Rt,kt,zt,Lt,Nt,Ct,Mt,_t,Dt,Ft,Bt={exports:{}};function Ht(){if(jt)return Tt;jt=1;var r=m(),t=ot(),n=Function.prototype,e=r&&Object.getOwnPropertyDescriptor,i=t(n,"name"),o=i&&"something"===function(){}.name,u=i&&(!r||r&&e(n,"name").configurable);return Tt={EXISTS:i,PROPER:o,CONFIGURABLE:u}}function $t(){if(Pt)return At;Pt=1;var r=lr(),t=hr(),n=nt(),e=r(Function.toString);return t(n.inspectSource)||(n.inspectSource=function(r){return e(r)}),At=n.inspectSource}function Gt(){if(Rt)return It;Rt=1;var r=f(),t=hr(),n=r.WeakMap;return It=t(n)&&/native code/.test(String(n))}function Vt(){if(zt)return kt;zt=1;var r=et(),t=ut(),n=r("keys");return kt=function(r){return n[r]||(n[r]=t(r))}}function Wt(){return Nt?Lt:(Nt=1,Lt={})}function Ut(){if(Mt)return Ct;Mt=1;var r,t,n,e=Gt(),i=f(),o=br(),u=Et(),a=ot(),c=nt(),s=Vt(),l=Wt(),v="Object already initialized",d=i.TypeError,p=i.WeakMap;if(e||c.state){var g=c.state||(c.state=new p);g.get=g.get,g.has=g.has,g.set=g.set,r=function(r,t){if(g.has(r))throw new d(v);return t.facade=r,g.set(r,t),t},t=function(r){return g.get(r)||{}},n=function(r){return g.has(r)}}else{var y=s("state");l[y]=!0,r=function(r,t){if(a(r,y))throw new d(v);return t.facade=r,u(r,y,t),t},t=function(r){return a(r,y)?r[y]:{}},n=function(r){return a(r,y)}}return Ct={set:r,get:t,has:n,enforce:function(e){return n(e)?t(e):r(e,{})},getterFor:function(r){return function(n){var e;if(!o(n)||(e=t(n)).type!==r)throw new d("Incompatible receiver, "+r+" required");return e}}}}function qt(){if(_t)return Bt.exports;_t=1;var r=lr(),t=b(),n=hr(),e=ot(),i=m(),o=Ht().CONFIGURABLE,u=$t(),a=Ut(),f=a.enforce,c=a.get,s=String,l=Object.defineProperty,v=r("".slice),d=r("".replace),p=r([].join),g=i&&!t(function(){return 8!==l(function(){},"length",{value:8}).length}),y=String(String).split("String"),h=Bt.exports=function(r,t,n){"Symbol("===v(s(t),0,7)&&(t="["+d(s(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!e(r,"name")||o&&r.name!==t)&&(i?l(r,"name",{value:t,configurable:!0}):r.name=t),g&&n&&e(n,"arity")&&r.length!==n.arity&&l(r,"length",{value:n.arity});try{n&&e(n,"constructor")&&n.constructor?i&&l(r,"prototype",{writable:!1}):r.prototype&&(r.prototype=void 0)}catch(r){}var u=f(r);return e(u,"source")||(u.source=p(y,"string"==typeof t?t:"")),r};return Function.prototype.toString=h(function(){return n(this)&&c(this).source||u(this)},"toString"),Bt.exports}function Kt(){if(Ft)return Dt;Ft=1;var r=hr(),t=Ot(),n=qt(),e=tt();return Dt=function(i,o,u,a){a||(a={});var f=a.enumerable,c=void 0!==a.name?a.name:o;if(r(u)&&n(u,c,a),a.global)f?i[o]=u:e(o,u);else{try{a.unsafe?i[o]&&(f=!0):delete i[o]}catch(r){}f?i[o]=u:t.f(i,o,{value:u,enumerable:!1,configurable:!a.nonConfigurable,writable:!a.nonWritable})}return i}}var Yt,Xt,Jt,Qt,Zt,rn,tn,nn,en,on,un,an,fn,cn,sn,ln,vn,dn={};function pn(){if(Qt)return Jt;Qt=1;var r=function(){if(Xt)return Yt;Xt=1;var r=Math.ceil,t=Math.floor;return Yt=Math.trunc||function(n){var e=+n;return(e>0?t:r)(e)}}();return Jt=function(t){var n=+t;return n!=n||0===n?0:r(n)}}function gn(){if(rn)return Zt;rn=1;var r=pn(),t=Math.max,n=Math.min;return Zt=function(e,i){var o=r(e);return o<0?t(o+i,0):n(o,i)}}function yn(){if(nn)return tn;nn=1;var r=pn(),t=Math.min;return tn=function(n){var e=r(n);return e>0?t(e,9007199254740991):0}}function hn(){if(on)return en;on=1;var r=yn();return en=function(t){return r(t.length)}}function bn(){if(an)return un;an=1;var r=yr(),t=gn(),n=hn(),e=function(e){return function(i,o,u){var a=r(i),f=n(a);if(0===f)return!e&&-1;var c,s=t(u,f);if(e&&o!=o){for(;f>s;)if((c=a[s++])!=c)return!0}else for(;f>s;s++)if((e||s in a)&&a[s]===o)return e||s||0;return!e&&-1}};return un={includes:e(!0),indexOf:e(!1)}}function mn(){if(cn)return fn;cn=1;var r=lr(),t=ot(),n=yr(),e=bn().indexOf,i=Wt(),o=r([].push);return fn=function(r,u){var a,f=n(r),c=0,s=[];for(a in f)!t(i,a)&&t(f,a)&&o(s,a);for(;u.length>c;)t(f,a=u[c++])&&(~e(s,a)||o(s,a));return s}}function wn(){return ln?sn:(ln=1,sn=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"])}function xn(){if(vn)return dn;vn=1;var r=mn(),t=wn().concat("length","prototype");return dn.f=Object.getOwnPropertyNames||function(n){return r(n,t)},dn}var Sn,On,En,Tn,jn,An,Pn,In,Rn,kn,zn,Ln,Nn,Cn,Mn,_n,Dn,Fn,Bn,Hn,$n,Gn,Vn,Wn,Un,qn,Kn,Yn,Xn={};function Jn(){if(En)return On;En=1;var r=mr(),t=lr(),n=xn(),e=(Sn||(Sn=1,Xn.f=Object.getOwnPropertySymbols),Xn),i=St(),o=t([].concat);return On=r("Reflect","ownKeys")||function(r){var t=n.f(i(r)),u=e.f;return u?o(t,u(r)):t}}function Qn(){if(jn)return Tn;jn=1;var r=ot(),t=Jn(),n=vt(),e=Ot();return Tn=function(i,o,u){for(var a=t(o),f=e.f,c=n.f,s=0;s<a.length;s++){var l=a[s];r(i,l)||u&&r(u,l)||f(i,l,c(o,l))}}}function Zn(){if(Pn)return An;Pn=1;var r=b(),t=hr(),n=/#|\.prototype\./,e=function(n,e){var f=o[i(n)];return f===a||f!==u&&(t(e)?r(e):!!e)},i=e.normalize=function(r){return String(r).replace(n,".").toLowerCase()},o=e.data={},u=e.NATIVE="N",a=e.POLYFILL="P";return An=e}function re(){if(Rn)return In;Rn=1;var r=f(),t=vt().f,n=Et(),e=Kt(),i=tt(),o=Qn(),u=Zn();return In=function(a,f){var c,s,l,v,d,p=a.target,g=a.global,y=a.stat;if(c=g?r:y?r[p]||i(p,{}):r[p]&&r[p].prototype)for(s in f){if(v=f[s],l=a.dontCallGetSet?(d=t(c,s))&&d.value:c[s],!u(g?s:p+(y?".":"#")+s,a.forced)&&void 0!==l){if(typeof v==typeof l)continue;o(v,l)}(a.sham||l&&l.sham)&&n(v,"sham",!0),e(c,s,v,a)}}}function te(){if(zn)return kn;zn=1;var r=vr();return kn=Array.isArray||function(t){return"Array"===r(t)}}function ne(){if(Nn)return Ln;Nn=1;var r=TypeError;return Ln=function(t){if(t>9007199254740991)throw r("Maximum allowed index exceeded");return t}}function ee(){if(Mn)return Cn;Mn=1;var r=m(),t=Ot(),n=sr();return Cn=function(e,i,o){r?t.f(e,i,n(0,o)):e[i]=o}}function ie(){if(Dn)return _n;Dn=1;var r={};return r[at()("toStringTag")]="z",_n="[object z]"===String(r)}function oe(){if(Bn)return Fn;Bn=1;var r=ie(),t=hr(),n=vr(),e=at()("toStringTag"),i=Object,o="Arguments"===n(function(){return arguments}());return Fn=r?n:function(r){var u,a,f;return void 0===r?"Undefined":null===r?"Null":"string"==typeof(a=function(r,t){try{return r[t]}catch(r){}}(u=i(r),e))?a:o?n(u):"Object"===(f=n(u))&&t(u.callee)?"Arguments":f}}function ue(){if($n)return Hn;$n=1;var r=lr(),t=b(),n=hr(),e=oe(),i=mr(),o=$t(),u=function(){},a=i("Reflect","construct"),f=/^\s*(?:class|function)\b/,c=r(f.exec),s=!f.test(u),l=function(r){if(!n(r))return!1;try{return a(u,[],r),!0}catch(r){return!1}},v=function(r){if(!n(r))return!1;switch(e(r)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return s||!!c(f,o(r))}catch(r){return!0}};return v.sham=!0,Hn=!a||t(function(){var r;return l(l.call)||!l(Object)||!l(function(){r=!0})||r})?v:l}function ae(){if(Vn)return Gn;Vn=1;var r=te(),t=ue(),n=br(),e=at()("species"),i=Array;return Gn=function(o){var u;return r(o)&&(u=o.constructor,(t(u)&&(u===i||r(u.prototype))||n(u)&&null===(u=u[e]))&&(u=void 0)),void 0===u?i:u}}function fe(){if(Un)return Wn;Un=1;var r=ae();return Wn=function(t,n){return new(r(t))(0===n?0:n)}}function ce(){if(Kn)return qn;Kn=1;var r=b(),t=at(),n=xr(),e=t("species");return qn=function(t){return n>=51||!r(function(){var r=[];return(r.constructor={})[e]=function(){return{foo:1}},1!==r[t](Boolean).foo})}}!function(){if(Yn)return a;Yn=1;var r=re(),t=b(),n=te(),e=br(),i=it(),o=hn(),u=ne(),f=ee(),c=fe(),s=ce(),l=at(),v=xr(),d=l("isConcatSpreadable"),p=v>=51||!t(function(){var r=[];return r[d]=!1,r.concat()[0]!==r}),g=function(r){if(!e(r))return!1;var t=r[d];return void 0!==t?!!t:n(r)};r({target:"Array",proto:!0,arity:1,forced:!p||!s("concat")},{concat:function(r){var t,n,e,a,s,l=i(this),v=c(l,0),d=0;for(t=-1,e=arguments.length;t<e;t++)if(g(s=-1===t?l:arguments[t]))for(a=o(s),u(d+a),n=0;n<a;n++,d++)n in s&&f(v,d,s[n]);else u(d+1),f(v,d++,s);return v.length=d,v}})}();var se=function(r,t){return se=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,t){r.__proto__=t}||function(r,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n])},se(r,t)};function le(r,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=r}se(r,t),r.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function ve(r){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&r[t],e=0;if(n)return n.call(r);if(r&&"number"==typeof r.length)return{next:function(){return r&&e>=r.length&&(r=void 0),{value:r&&r[e++],done:!r}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function de(r,t){var n="function"==typeof Symbol&&r[Symbol.iterator];if(!n)return r;var e,i,o=n.call(r),u=[];try{for(;(void 0===t||t-- >0)&&!(e=o.next()).done;)u.push(e.value)}catch(r){i={error:r}}finally{try{e&&!e.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return u}function pe(r,t,n){if(n||2===arguments.length)for(var e,i=0,o=t.length;i<o;i++)!e&&i in t||(e||(e=Array.prototype.slice.call(t,0,i)),e[i]=t[i]);return r.concat(e||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError;var ge,ye,he,be,me,we,xe,Se,Oe,Ee,Te,je,Ae,Pe,Ie,Re,ke,ze,Le,Ne,Ce,Me,_e,De,Fe,Be,He,$e,Ge,Ve,We,Ue,qe,Ke,Ye,Xe={};function Je(){if(ye)return ge;ye=1;var r=mn(),t=wn();return ge=Object.keys||function(n){return r(n,t)}}function Qe(){if(me)return be;me=1;var r=mr();return be=r("document","documentElement")}function Ze(){if(xe)return we;xe=1;var r,t=St(),n=function(){if(he)return Xe;he=1;var r=m(),t=xt(),n=Ot(),e=St(),i=yr(),o=Je();return Xe.f=r&&!t?Object.defineProperties:function(r,t){e(r);for(var u,a=i(t),f=o(t),c=f.length,s=0;c>s;)n.f(r,u=f[s++],a[u]);return r},Xe}(),e=wn(),i=Wt(),o=Qe(),u=st(),a=Vt(),f="prototype",c="script",s=a("IE_PROTO"),l=function(){},v=function(r){return"<"+c+">"+r+"</"+c+">"},d=function(r){r.write(v("")),r.close();var t=r.parentWindow.Object;return r=null,t},p=function(){try{r=new ActiveXObject("htmlfile")}catch(r){}var t,n,i;p="undefined"!=typeof document?document.domain&&r?d(r):(n=u("iframe"),i="java"+c+":",n.style.display="none",o.appendChild(n),n.src=String(i),(t=n.contentWindow.document).open(),t.write(v("document.F=Object")),t.close(),t.F):d(r);for(var a=e.length;a--;)delete p[f][e[a]];return p()};return i[s]=!0,we=Object.create||function(r,e){var i;return null!==r?(l[f]=t(r),i=new l,l[f]=null,i[s]=r):i=p(),void 0===e?i:n.f(i,e)}}function ri(){if(Oe)return Se;Oe=1;var r=at(),t=Ze(),n=Ot().f,e=r("unscopables"),i=Array.prototype;return void 0===i[e]&&n(i,e,{configurable:!0,value:t(null)}),Se=function(r){i[e][r]=!0}}function ti(){return Te?Ee:(Te=1,Ee={})}function ni(){if(Ie)return Pe;Ie=1;var r=ot(),t=hr(),n=it(),e=Vt(),i=function(){if(Ae)return je;Ae=1;var r=b();return je=!r(function(){function r(){}return r.prototype.constructor=null,Object.getPrototypeOf(new r)!==r.prototype})}(),o=e("IE_PROTO"),u=Object,a=u.prototype;return Pe=i?u.getPrototypeOf:function(e){var i=n(e);if(r(i,o))return i[o];var f=i.constructor;return t(f)&&i instanceof f?f.prototype:i instanceof u?a:null}}function ei(){if(ke)return Re;ke=1;var r,t,n,e=b(),i=hr(),o=br(),u=Ze(),a=ni(),f=Kt(),c=at(),s=rt(),l=c("iterator"),v=!1;return[].keys&&("next"in(n=[].keys())?(t=a(a(n)))!==Object.prototype&&(r=t):v=!0),!o(r)||e(function(){var t={};return r[l].call(t)!==t})?r={}:s&&(r=u(r)),i(r[l])||f(r,l,function(){return this}),Re={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:v}}function ii(){if(Le)return ze;Le=1;var r=Ot().f,t=ot(),n=at()("toStringTag");return ze=function(e,i,o){e&&!o&&(e=e.prototype),e&&!t(e,n)&&r(e,n,{configurable:!0,value:i})}}function oi(){if(Fe)return De;Fe=1;var r=br();return De=function(t){return r(t)||null===t}}function ui(){if(He)return Be;He=1;var r=oi(),t=String,n=TypeError;return Be=function(e){if(r(e))return e;throw new n("Can't set "+t(e)+" as a prototype")}}function ai(){if(Ge)return $e;Ge=1;var r=function(){if(_e)return Me;_e=1;var r=lr(),t=jr();return Me=function(n,e,i){try{return r(t(Object.getOwnPropertyDescriptor(n,e)[i]))}catch(r){}}}(),t=br(),n=gr(),e=ui();return $e=Object.setPrototypeOf||("__proto__"in{}?function(){var i,o=!1,u={};try{(i=r(Object.prototype,"__proto__","set"))(u,[]),o=u instanceof Array}catch(r){}return function(r,u){return n(r),e(u),t(r)?(o?i(r,u):r.__proto__=u,r):r}}():void 0)}function fi(){if(We)return Ve;We=1;var r=re(),t=x(),n=rt(),e=Ht(),i=hr(),o=function(){if(Ce)return Ne;Ce=1;var r=ei().IteratorPrototype,t=Ze(),n=sr(),e=ii(),i=ti(),o=function(){return this};return Ne=function(u,a,f,c){var s=a+" Iterator";return u.prototype=t(r,{next:n(+!c,f)}),e(u,s,!1,!0),i[s]=o,u}}(),u=ni(),a=ai(),f=ii(),c=Et(),s=Kt(),l=at(),v=ti(),d=ei(),p=e.PROPER,g=e.CONFIGURABLE,y=d.IteratorPrototype,h=d.BUGGY_SAFARI_ITERATORS,b=l("iterator"),m="keys",w="values",S="entries",O=function(){return this};return Ve=function(e,l,d,x,E,T,j){o(d,l,x);var A,P,I,R=function(r){if(r===E&&C)return C;if(!h&&r&&r in L)return L[r];switch(r){case m:case w:case S:return function(){return new d(this,r)}}return function(){return new d(this)}},k=l+" Iterator",z=!1,L=e.prototype,N=L[b]||L["@@iterator"]||E&&L[E],C=!h&&N||R(E),M="Array"===l&&L.entries||N;if(M&&(A=u(M.call(new e)))!==Object.prototype&&A.next&&(n||u(A)===y||(a?a(A,y):i(A[b])||s(A,b,O)),f(A,k,!0,!0),n&&(v[k]=O)),p&&E===w&&N&&N.name!==w&&(!n&&g?c(L,"name",w):(z=!0,C=function(){return t(N,this)})),E)if(P={values:R(w),keys:T?C:R(m),entries:R(S)},j)for(I in P)(h||z||!(I in L))&&s(L,I,P[I]);else r({target:l,proto:!0,forced:h||z},P);return n&&!j||L[b]===C||s(L,b,C,{name:E}),v[l]=C,P}}function ci(){return qe?Ue:(qe=1,Ue=function(r,t){return{value:r,done:t}})}function si(){if(Ye)return Ke;Ye=1;var r=yr(),t=ri(),n=ti(),e=Ut(),i=Ot().f,o=fi(),u=ci(),a=rt(),f=m(),c="Array Iterator",s=e.set,l=e.getterFor(c);Ke=o(Array,"Array",function(t,n){s(this,{type:c,target:r(t),index:0,kind:n})},function(){var r=l(this),t=r.target,n=r.index++;if(!t||n>=t.length)return r.target=null,u(void 0,!0);switch(r.kind){case"keys":return u(n,!1);case"values":return u(t[n],!1)}return u([n,t[n]],!1)},"values");var v=n.Arguments=n.Array;if(t("keys"),t("values"),t("entries"),!a&&f&&"values"!==v.name)try{i(v,"name",{value:"values"})}catch(r){}return Ke}si();var li,vi,di,pi={};!function(){if(di)return pi;di=1;var r=ie(),t=Kt(),n=function(){if(vi)return li;vi=1;var r=ie(),t=oe();return li=r?{}.toString:function(){return"[object "+t(this)+"]"}}();r||t(Object.prototype,"toString",n,{unsafe:!0})}();var gi,yi,hi,bi,mi,wi={};function xi(){if(yi)return gi;yi=1;var r=oe(),t=String;return gi=function(n){if("Symbol"===r(n))throw new TypeError("Cannot convert a Symbol value to a string");return t(n)}}function Si(){if(bi)return hi;bi=1;var r=lr(),t=pn(),n=xi(),e=gr(),i=r("".charAt),o=r("".charCodeAt),u=r("".slice),a=function(r){return function(a,f){var c,s,l=n(e(a)),v=t(f),d=l.length;return v<0||v>=d?r?"":void 0:(c=o(l,v))<55296||c>56319||v+1===d||(s=o(l,v+1))<56320||s>57343?r?i(l,v):c:r?u(l,v,v+2):s-56320+(c-55296<<10)+65536}};return hi={codeAt:a(!1),charAt:a(!0)}}!function(){if(mi)return wi;mi=1;var r=Si().charAt,t=xi(),n=Ut(),e=fi(),i=ci(),o="String Iterator",u=n.set,a=n.getterFor(o);e(String,"String",function(r){u(this,{type:o,string:t(r),index:0})},function(){var t,n=a(this),e=n.string,o=n.index;return o>=e.length?i(void 0,!0):(t=r(e,o),n.index+=t.length,i(t,!1))})}();var Oi,Ei,Ti,ji,Ai={};function Pi(){if(Ei)return Oi;Ei=1;var r=b();return Oi=!r(function(){return Object.isExtensible(Object.preventExtensions({}))})}function Ii(){if(ji)return Ti;ji=1;var r=Kt();return Ti=function(t,n,e){for(var i in n)r(t,i,n[i],e);return t}}var Ri,ki,zi,Li,Ni,Ci,Mi,_i,Di,Fi,Bi,Hi,$i,Gi,Vi,Wi,Ui,qi,Ki,Yi,Xi,Ji,Qi,Zi,ro,to,no,eo,io,oo,uo,ao,fo,co,so,lo,vo={exports:{}},po={};function go(){if(ki)return Ri;ki=1;var r=lr();return Ri=r([].slice)}function yo(){if(zi)return po;zi=1;var r=vr(),t=yr(),n=xn().f,e=go(),i="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];return po.f=function(o){return i&&"Window"===r(o)?function(r){try{return n(r)}catch(r){return e(i)}}(o):n(t(o))},po}function ho(){if(Mi)return Ci;Mi=1;var r=b(),t=br(),n=vr(),e=function(){if(Ni)return Li;Ni=1;var r=b();return Li=r(function(){if("function"==typeof ArrayBuffer){var r=new ArrayBuffer(8);Object.isExtensible(r)&&Object.defineProperty(r,"a",{value:8})}})}(),i=Object.isExtensible,o=r(function(){});return Ci=o||e?function(r){return!!t(r)&&((!e||"ArrayBuffer"!==n(r))&&(!i||i(r)))}:i}function bo(){if(_i)return vo.exports;_i=1;var r=re(),t=lr(),n=Wt(),e=br(),i=ot(),o=Ot().f,u=xn(),a=yo(),f=ho(),c=ut(),s=Pi(),l=!1,v=c("meta"),d=0,p=function(r){o(r,v,{value:{objectID:"O"+d++,weakData:{}}})},g=vo.exports={enable:function(){g.enable=function(){},l=!0;var n=u.f,e=t([].splice),i={};i[v]=1,n(i).length&&(u.f=function(r){for(var t=n(r),i=0,o=t.length;i<o;i++)if(t[i]===v){e(t,i,1);break}return t},r({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:a.f}))},fastKey:function(r,t){if(!e(r))return"symbol"==typeof r?r:("string"==typeof r?"S":"P")+r;if(!i(r,v)){if(!f(r))return"F";if(!t)return"E";p(r)}return r[v].objectID},getWeakData:function(r,t){if(!i(r,v)){if(!f(r))return!0;if(!t)return!1;p(r)}return r[v].weakData},onFreeze:function(r){return s&&l&&f(r)&&!i(r,v)&&p(r),r}};return n[v]=!0,vo.exports}function mo(){if(Hi)return Bi;Hi=1;var r=function(){if(Fi)return Di;Fi=1;var r=vr(),t=lr();return Di=function(n){if("Function"===r(n))return t(n)}}(),t=jr(),n=w(),e=r(r.bind);return Bi=function(r,i){return t(r),void 0===i?r:n?e(r,i):function(){return r.apply(i,arguments)}},Bi}function wo(){if(Gi)return $i;Gi=1;var r=at(),t=ti(),n=r("iterator"),e=Array.prototype;return $i=function(r){return void 0!==r&&(t.Array===r||e[n]===r)}}function xo(){if(Wi)return Vi;Wi=1;var r=oe(),t=Ar(),n=pr(),e=ti(),i=at()("iterator");return Vi=function(o){if(!n(o))return t(o,i)||t(o,"@@iterator")||e[r(o)]}}function So(){if(qi)return Ui;qi=1;var r=x(),t=jr(),n=St(),e=Tr(),i=xo(),o=TypeError;return Ui=function(u,a){var f=arguments.length<2?i(u):a;if(t(f))return n(r(f,u));throw new o(e(u)+" is not iterable")},Ui}function Oo(){if(Yi)return Ki;Yi=1;var r=x(),t=St(),n=Ar();return Ki=function(e,i,o){var u,a;t(e);try{if(!(u=n(e,"return"))){if("throw"===i)throw o;return o}u=r(u,e)}catch(r){a=!0,u=r}if("throw"===i)throw o;if(a)throw u;return t(u),o}}function Eo(){if(Ji)return Xi;Ji=1;var r=mo(),t=x(),n=St(),e=Tr(),i=wo(),o=hn(),u=wr(),a=So(),f=xo(),c=Oo(),s=TypeError,l=function(r,t){this.stopped=r,this.result=t},v=l.prototype;return Xi=function(d,p,g){var y,h,b,m,w,x,S,O=g&&g.that,E=!(!g||!g.AS_ENTRIES),T=!(!g||!g.IS_RECORD),j=!(!g||!g.IS_ITERATOR),A=!(!g||!g.INTERRUPTED),P=r(p,O),I=function(r){return y&&c(y,"normal"),new l(!0,r)},R=function(r){return E?(n(r),A?P(r[0],r[1],I):P(r[0],r[1])):A?P(r,I):P(r)};if(T)y=d.iterator;else if(j)y=d;else{if(!(h=f(d)))throw new s(e(d)+" is not iterable");if(i(h)){for(b=0,m=o(d);m>b;b++)if((w=R(d[b]))&&u(v,w))return w;return new l(!1)}y=a(d,h)}for(x=T?d.next:y.next;!(S=t(x,y)).done;){try{w=R(S.value)}catch(r){c(y,"throw",r)}if("object"==typeof w&&w&&u(v,w))return w}return new l(!1)}}function To(){if(Zi)return Qi;Zi=1;var r=wr(),t=TypeError;return Qi=function(n,e){if(r(e,n))return n;throw new t("Incorrect invocation")}}function jo(){if(to)return ro;to=1;var r=at()("iterator"),t=!1;try{var n=0,e={next:function(){return{done:!!n++}},return:function(){t=!0}};e[r]=function(){return this},Array.from(e,function(){throw 2})}catch(r){}return ro=function(n,e){try{if(!e&&!t)return!1}catch(r){return!1}var i=!1;try{var o={};o[r]=function(){return{next:function(){return{done:i=!0}}}},n(o)}catch(r){}return i}}function Ao(){if(eo)return no;eo=1;var r=hr(),t=br(),n=ai();return no=function(e,i,o){var u,a;return n&&r(u=i.constructor)&&u!==o&&t(a=u.prototype)&&a!==o.prototype&&n(e,a),e}}function Po(){if(oo)return io;oo=1;var r=re(),t=f(),n=lr(),e=Zn(),i=Kt(),o=bo(),u=Eo(),a=To(),c=hr(),s=pr(),l=br(),v=b(),d=jo(),p=ii(),g=Ao();return io=function(f,y,h){var b=-1!==f.indexOf("Map"),m=-1!==f.indexOf("Weak"),w=b?"set":"add",x=t[f],S=x&&x.prototype,O=x,E={},T=function(r){var t=n(S[r]);i(S,r,"add"===r?function(r){return t(this,0===r?0:r),this}:"delete"===r?function(r){return!(m&&!l(r))&&t(this,0===r?0:r)}:"get"===r?function(r){return m&&!l(r)?void 0:t(this,0===r?0:r)}:"has"===r?function(r){return!(m&&!l(r))&&t(this,0===r?0:r)}:function(r,n){return t(this,0===r?0:r,n),this})};if(e(f,!c(x)||!(m||S.forEach&&!v(function(){(new x).entries().next()}))))O=h.getConstructor(y,f,b,w),o.enable();else if(e(f,!0)){var j=new O,A=j[w](m?{}:-0,1)!==j,P=v(function(){j.has(1)}),I=d(function(r){new x(r)}),R=!m&&v(function(){for(var r=new x,t=5;t--;)r[w](t,t);return!r.has(-0)});I||((O=y(function(r,t){a(r,S);var n=g(new x,r,O);return s(t)||u(t,n[w],{that:n,AS_ENTRIES:b}),n})).prototype=S,S.constructor=O),(P||R)&&(T("delete"),T("has"),b&&T("get")),(R||A)&&T(w),m&&S.clear&&delete S.clear}return E[f]=O,r({global:!0,constructor:!0,forced:O!==x},E),p(O,f),m||h.setStrong(O,f,b),O}}function Io(){if(ao)return uo;ao=1;var r=mo(),t=lr(),n=dr(),e=it(),i=hn(),o=fe(),u=t([].push),a=function(t){var a=1===t,f=2===t,c=3===t,s=4===t,l=6===t,v=7===t,d=5===t||l;return function(p,g,y,h){for(var b,m,w=e(p),x=n(w),S=i(x),O=r(g,y),E=0,T=h||o,j=a?T(p,S):f||v?T(p,0):void 0;S>E;E++)if((d||E in x)&&(m=O(b=x[E],E,w),t))if(a)j[E]=m;else if(m)switch(t){case 3:return!0;case 5:return b;case 6:return E;case 2:u(j,b)}else switch(t){case 4:return!1;case 7:u(j,b)}return l?-1:c||s?s:j}};return uo={forEach:a(0),map:a(1),filter:a(2),some:a(3),every:a(4),find:a(5),findIndex:a(6),filterReject:a(7)}}function Ro(){if(co)return fo;co=1;var r=lr(),t=Ii(),n=bo().getWeakData,e=To(),i=St(),o=pr(),u=br(),a=Eo(),f=Io(),c=ot(),s=Ut(),l=s.set,v=s.getterFor,d=f.find,p=f.findIndex,g=r([].splice),y=0,h=function(r){return r.frozen||(r.frozen=new b)},b=function(){this.entries=[]},m=function(r,t){return d(r.entries,function(r){return r[0]===t})};return b.prototype={get:function(r){var t=m(this,r);if(t)return t[1]},has:function(r){return!!m(this,r)},set:function(r,t){var n=m(this,r);n?n[1]=t:this.entries.push([r,t])},delete:function(r){var t=p(this.entries,function(t){return t[0]===r});return~t&&g(this.entries,t,1),!!~t}},fo={getConstructor:function(r,f,s,d){var p=r(function(r,t){e(r,g),l(r,{type:f,id:y++,frozen:null}),o(t)||a(t,r[d],{that:r,AS_ENTRIES:s})}),g=p.prototype,b=v(f),m=function(r,t,e){var o=b(r),u=n(i(t),!0);return!0===u?h(o).set(t,e):u[o.id]=e,r};return t(g,{delete:function(r){var t=b(this);if(!u(r))return!1;var e=n(r);return!0===e?h(t).delete(r):e&&c(e,t.id)&&delete e[t.id]},has:function(r){var t=b(this);if(!u(r))return!1;var e=n(r);return!0===e?h(t).has(r):e&&c(e,t.id)}}),t(g,s?{get:function(r){var t=b(this);if(u(r)){var e=n(r);if(!0===e)return h(t).get(r);if(e)return e[t.id]}},set:function(r,t){return m(this,r,t)}}:{add:function(r){return m(this,r,!0)}}),p}}}lo||(lo=1,function(){if(so)return Ai;so=1;var r,t=Pi(),n=f(),e=lr(),i=Ii(),o=bo(),u=Po(),a=Ro(),c=br(),s=Ut().enforce,l=b(),v=Gt(),d=Object,p=Array.isArray,g=d.isExtensible,y=d.isFrozen,h=d.isSealed,m=d.freeze,w=d.seal,x=!n.ActiveXObject&&"ActiveXObject"in n,S=function(r){return function(){return r(this,arguments.length?arguments[0]:void 0)}},O=u("WeakMap",S,a),E=O.prototype,T=e(E.set);if(v)if(x){r=a.getConstructor(S,"WeakMap",!0),o.enable();var j=e(E.delete),A=e(E.has),P=e(E.get);i(E,{delete:function(t){if(c(t)&&!g(t)){var n=s(this);return n.frozen||(n.frozen=new r),j(this,t)||n.frozen.delete(t)}return j(this,t)},has:function(t){if(c(t)&&!g(t)){var n=s(this);return n.frozen||(n.frozen=new r),A(this,t)||n.frozen.has(t)}return A(this,t)},get:function(t){if(c(t)&&!g(t)){var n=s(this);return n.frozen||(n.frozen=new r),A(this,t)?P(this,t):n.frozen.get(t)}return P(this,t)},set:function(t,n){if(c(t)&&!g(t)){var e=s(this);e.frozen||(e.frozen=new r),A(this,t)?T(this,t,n):e.frozen.set(t,n)}else T(this,t,n);return this}})}else t&&l(function(){var r=m([]);return T(new O,r,1),!y(r)})&&i(E,{set:function(r,t){var n;return p(r)&&(y(r)?n=m:h(r)&&(n=w)),T(this,r,t),n&&n(r),this}})}());var ko,zo,Lo,No,Co,Mo={};!function(){if(Co)return Mo;Co=1;var r=f(),t=zo?ko:(zo=1,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}),n=function(){if(No)return Lo;No=1;var r=st()("span").classList,t=r&&r.constructor&&r.constructor.prototype;return Lo=t===Object.prototype?void 0:t}(),e=si(),i=Et(),o=ii(),u=at()("iterator"),a=e.values,c=function(r,n){if(r){if(r[u]!==a)try{i(r,u,a)}catch(t){r[u]=a}if(o(r,n,!0),t[n])for(var f in e)if(r[f]!==e[f])try{i(r,f,e[f])}catch(t){r[f]=e[f]}}};for(var s in t)c(r[s]&&r[s].prototype,s);c(n,"DOMTokenList")}();var _o=new WeakMap;function Do(r){var n,e=r.children||[],i=e.length;if(0===i)return"";for(var o=0;o<i&&!n;o+=1){var u=e[o];t.Text.isText(u)&&(n=u)}return null==n?"":n.color||""}function Fo(n,e,i){for(var o=e.type,u=function(r,t){var n={};for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&t.indexOf(e)<0&&(n[e]=r[e]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(e=Object.getOwnPropertySymbols(r);i<e.length;i++)t.indexOf(e[i])<0&&Object.prototype.propertyIsEnumerable.call(r,e[i])&&(n[e[i]]=r[e[i]])}return n}(e,["type"]),a=void 0!==i?i:u.level||0,f=r.DomEditor.findPath(n,e);;){if(0===f.length||0===f[f.length-1])return null;f=t.Path.previous(f);var c=t.Editor.node(n,f);if(!c)return null;var s=de(c,1)[0],l=s.level,v=void 0===l?0:l;if(r.DomEditor.getNodeType(s)!==o)return null;if(v===a)return s}}function Bo(r,t,n){var e=Fo(r,t,n);return!!e&&e.ordered===t.ordered}var Ho,$o={};!function(){if(Ho)return $o;Ho=1;var r=re(),t=Io().map;r({target:"Array",proto:!0,forced:!ce()("map")},{map:function(r){return t(this,r,arguments.length>1?arguments[1]:void 0)}})}();var Go,Vo,Wo,Uo,qo,Ko,Yo,Xo,Jo,Qo,Zo,ru={};function tu(){if(Vo)return Go;Vo=1;var r=St();return Go=function(){var t=r(this),n="";return t.hasIndices&&(n+="d"),t.global&&(n+="g"),t.ignoreCase&&(n+="i"),t.multiline&&(n+="m"),t.dotAll&&(n+="s"),t.unicode&&(n+="u"),t.unicodeSets&&(n+="v"),t.sticky&&(n+="y"),n}}function nu(){if(Qo)return Jo;Qo=1;var r,t,n=x(),e=lr(),i=xi(),o=tu(),u=function(){if(Uo)return Wo;Uo=1;var r=b(),t=f().RegExp,n=r(function(){var r=t("a","y");return r.lastIndex=2,null!==r.exec("abcd")}),e=n||r(function(){return!t("a","y").sticky}),i=n||r(function(){var r=t("^r","gy");return r.lastIndex=2,null!==r.exec("str")});return Wo={BROKEN_CARET:i,MISSED_STICKY:e,UNSUPPORTED_Y:n}}(),a=et(),c=Ze(),s=Ut().get,l=function(){if(Ko)return qo;Ko=1;var r=b(),t=f().RegExp;return qo=r(function(){var r=t(".","s");return!(r.dotAll&&r.test("\n")&&"s"===r.flags)})}(),v=function(){if(Xo)return Yo;Xo=1;var r=b(),t=f().RegExp;return Yo=r(function(){var r=t("(?<a>b)","g");return"b"!==r.exec("b").groups.a||"bc"!=="b".replace(r,"$<a>c")})}(),d=a("native-string-replace",String.prototype.replace),p=RegExp.prototype.exec,g=p,y=e("".charAt),h=e("".indexOf),m=e("".replace),w=e("".slice),S=(t=/b*/g,n(p,r=/a/,"a"),n(p,t,"a"),0!==r.lastIndex||0!==t.lastIndex),O=u.BROKEN_CARET,E=void 0!==/()??/.exec("")[1];return(S||E||O||l||v)&&(g=function(r){var t,e,u,a,f,l,v,b=this,x=s(b),T=i(r),j=x.raw;if(j)return j.lastIndex=b.lastIndex,t=n(g,j,T),b.lastIndex=j.lastIndex,t;var A=x.groups,P=O&&b.sticky,I=n(o,b),R=b.source,k=0,z=T;if(P&&(I=m(I,"y",""),-1===h(I,"g")&&(I+="g"),z=w(T,b.lastIndex),b.lastIndex>0&&(!b.multiline||b.multiline&&"\n"!==y(T,b.lastIndex-1))&&(R="(?: "+R+")",z=" "+z,k++),e=new RegExp("^(?:"+R+")",I)),E&&(e=new RegExp("^"+R+"$(?!\\s)",I)),S&&(u=b.lastIndex),a=n(p,P?e:b,z),P?a?(a.input=w(a.input,k),a[0]=w(a[0],k),a.index=b.lastIndex,b.lastIndex+=a[0].length):b.lastIndex=0:S&&a&&(b.lastIndex=b.global?a.index+a[0].length:u),E&&a&&a.length>1&&n(d,a[0],e,function(){for(f=1;f<arguments.length-2;f++)void 0===arguments[f]&&(a[f]=void 0)}),a&&A)for(a.groups=l=c(null),f=0;f<A.length;f++)l[(v=A[f])[0]]=a[v[1]];return a}),Jo=g}function eu(){if(Zo)return ru;Zo=1;var r=re(),t=nu();return r({target:"RegExp",proto:!0,forced:/./.exec!==t},{exec:t}),ru}eu();var iu,ou,uu,au,fu,cu={};function su(){if(au)return uu;au=1;var r=x(),t=ot(),n=wr(),e=function(){if(ou)return iu;ou=1;var r=f(),t=b(),n=r.RegExp,e=!t(function(){var r=!0;try{n(".","d")}catch(t){r=!1}var t={},e="",i=r?"dgimsy":"gimsy",o=function(r,n){Object.defineProperty(t,r,{get:function(){return e+=n,!0}})},u={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};for(var a in r&&(u.hasIndices="d"),u)o(a,u[a]);return Object.getOwnPropertyDescriptor(n.prototype,"flags").get.call(t)!==i||e!==i});return iu={correct:e}}(),i=tu(),o=RegExp.prototype;return uu=e.correct?function(r){return r.flags}:function(u){return e.correct||!n(o,u)||t(u,"flags")?u.flags:r(i,u)}}!function(){if(fu)return cu;fu=1;var r=Ht().PROPER,t=Kt(),n=St(),e=xi(),i=b(),o=su(),u="toString",a=RegExp.prototype,f=a[u],c=i(function(){return"/a/b"!==f.call({source:"a",flags:"b"})}),s=r&&f.name!==u;(c||s)&&t(a,u,function(){var r=n(this);return"/"+e(r.source)+"/"+e(o(r))},{unsafe:!0})}();var lu,vu,du,pu,gu,yu,hu,bu;function mu(){if(vu)return lu;vu=1;var r=qt(),t=Ot();return lu=function(n,e,i){return i.get&&r(i.get,e,{getter:!0}),i.set&&r(i.set,e,{setter:!0}),t.f(n,e,i)}}function wu(){if(pu)return du;pu=1;var r=mr(),t=mu(),n=at(),e=m(),i=n("species");return du=function(n){var o=r(n);e&&o&&!o[i]&&t(o,i,{configurable:!0,get:function(){return this}})}}bu||(bu=1,hu||(hu=1,Po()("Set",function(r){return function(){return r(this,arguments.length?arguments[0]:void 0)}},function(){if(yu)return gu;yu=1;var r=Ze(),t=mu(),n=Ii(),e=mo(),i=To(),o=pr(),u=Eo(),a=fi(),f=ci(),c=wu(),s=m(),l=bo().fastKey,v=Ut(),d=v.set,p=v.getterFor;return gu={getConstructor:function(a,f,c,v){var g=a(function(t,n){i(t,y),d(t,{type:f,index:r(null),first:null,last:null,size:0}),s||(t.size=0),o(n)||u(n,t[v],{that:t,AS_ENTRIES:c})}),y=g.prototype,h=p(f),b=function(r,t,n){var e,i,o=h(r),u=m(r,t);return u?u.value=n:(o.last=u={index:i=l(t,!0),key:t,value:n,previous:e=o.last,next:null,removed:!1},o.first||(o.first=u),e&&(e.next=u),s?o.size++:r.size++,"F"!==i&&(o.index[i]=u)),r},m=function(r,t){var n,e=h(r),i=l(t);if("F"!==i)return e.index[i];for(n=e.first;n;n=n.next)if(n.key===t)return n};return n(y,{clear:function(){for(var t=h(this),n=t.first;n;)n.removed=!0,n.previous&&(n.previous=n.previous.next=null),n=n.next;t.first=t.last=null,t.index=r(null),s?t.size=0:this.size=0},delete:function(r){var t=this,n=h(t),e=m(t,r);if(e){var i=e.next,o=e.previous;delete n.index[e.index],e.removed=!0,o&&(o.next=i),i&&(i.previous=o),n.first===e&&(n.first=i),n.last===e&&(n.last=o),s?n.size--:t.size--}return!!e},forEach:function(r){for(var t,n=h(this),i=e(r,arguments.length>1?arguments[1]:void 0);t=t?t.next:n.first;)for(i(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(r){return!!m(this,r)}}),n(y,c?{get:function(r){var t=m(this,r);return t&&t.value},set:function(r,t){return b(this,0===r?0:r,t)}}:{add:function(r){return b(this,r=0===r?0:r,r)}}),s&&t(y,"size",{configurable:!0,get:function(){return h(this).size}}),g},setStrong:function(r,t,n){var e=t+" Iterator",i=p(t),o=p(e);a(r,t,function(r,t){d(this,{type:e,target:r,state:i(r),kind:t,last:null})},function(){for(var r=o(this),t=r.kind,n=r.last;n&&n.removed;)n=n.previous;return r.target&&(r.last=n=n?n.next:r.state.first)?f("keys"===t?n.key:"values"===t?n.value:[n.key,n.value],!1):(r.target=null,f(void 0,!0))},n?"entries":"values",!n,!0),c(t)}},gu}())));var xu,Su={};!function(){if(xu)return Su;xu=1;var r=re(),t=Si().codeAt;r({target:"String",proto:!0},{codePointAt:function(r){return t(this,r)}})}();var Ou,Eu,Tu,ju,Au,Pu,Iu,Ru,ku,zu,Lu,Nu={};function Cu(){if(Pu)return Au;Pu=1;var r=Si().charAt;return Au=function(t,n,e){return n+(e?r(t,n).length:1)}}function Mu(){if(Ru)return Iu;Ru=1;var r=lr(),t=it(),n=Math.floor,e=r("".charAt),i=r("".replace),o=r("".slice),u=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,a=/\$([$&'`]|\d{1,2})/g;return Iu=function(r,f,c,s,l,v){var d=c+r.length,p=s.length,g=a;return void 0!==l&&(l=t(l),g=u),i(v,g,function(t,i){var u;switch(e(i,0)){case"$":return"$";case"&":return r;case"`":return o(f,0,c);case"'":return o(f,d);case"<":u=l[o(i,1,-1)];break;default:var a=+i;if(0===a)return t;if(a>p){var v=n(a/10);return 0===v?t:v<=p?void 0===s[v-1]?e(i,1):s[v-1]+e(i,1):t}u=s[a-1]}return void 0===u?"":u})}}!function(){if(Lu)return Nu;Lu=1;var r=function(){if(Eu)return Ou;Eu=1;var r=w(),t=Function.prototype,n=t.apply,e=t.call;return Ou="object"==typeof Reflect&&Reflect.apply||(r?e.bind(n):function(){return e.apply(n,arguments)}),Ou}(),t=x(),n=lr(),e=function(){if(ju)return Tu;ju=1,eu();var r=x(),t=Kt(),n=nu(),e=b(),i=at(),o=Et(),u=i("species"),a=RegExp.prototype;return Tu=function(f,c,s,l){var v=i(f),d=!e(function(){var r={};return r[v]=function(){return 7},7!==""[f](r)}),p=d&&!e(function(){var r=!1,t=/a/;if("split"===f){var n={};n[u]=function(){return t},(t={constructor:n,flags:""})[v]=/./[v]}return t.exec=function(){return r=!0,null},t[v](""),!r});if(!d||!p||s){var g=/./[v],y=c(v,""[f],function(t,e,i,o,u){var f=e.exec;return f===n||f===a.exec?d&&!u?{done:!0,value:r(g,e,i,o)}:{done:!0,value:r(t,i,e,o)}:{done:!1}});t(String.prototype,f,y[0]),t(a,v,y[1])}l&&o(a[v],"sham",!0)}}(),i=b(),o=St(),u=hr(),a=br(),f=pn(),c=yn(),s=xi(),l=gr(),v=Cu(),d=Ar(),p=Mu(),g=su(),y=function(){if(zu)return ku;zu=1;var r=x(),t=St(),n=hr(),e=vr(),i=nu(),o=TypeError;return ku=function(u,a){var f=u.exec;if(n(f)){var c=r(f,u,a);return null!==c&&t(c),c}if("RegExp"===e(u))return r(i,u,a);throw new o("RegExp#exec called on incompatible receiver")}}(),h=at()("replace"),m=Math.max,S=Math.min,O=n([].concat),E=n([].push),T=n("".indexOf),j=n("".slice),A=function(r){return void 0===r?r:String(r)},P="$0"==="a".replace(/./,"$0"),I=!!/./[h]&&""===/./[h]("a","$0");e("replace",function(n,e,i){var b=I?"$":"$0";return[function(r,n){var i=l(this),o=a(r)?d(r,h):void 0;return o?t(o,r,i,n):t(e,s(i),r,n)},function(t,n){var a=o(this),l=s(t);if("string"==typeof n&&-1===T(n,b)&&-1===T(n,"$<")){var d=i(e,a,l,n);if(d.done)return d.value}var h=u(n);h||(n=s(n));var w,x=s(g(a)),P=-1!==T(x,"g");P&&(w=-1!==T(x,"u"),a.lastIndex=0);for(var I,R=[];null!==(I=y(a,l))&&(E(R,I),P);){""===s(I[0])&&(a.lastIndex=v(l,c(a.lastIndex),w))}for(var k="",z=0,L=0;L<R.length;L++){for(var N,C=s((I=R[L])[0]),M=m(S(f(I.index),l.length),0),_=[],D=1;D<I.length;D++)E(_,A(I[D]));var F=I.groups;if(h){var B=O([C],_,M,l);void 0!==F&&E(B,F),N=s(r(n,void 0,B))}else N=p(C,l,M,_,F,n);M>=z&&(k+=j(l,z,M)+N,z=M+C.length)}return k+j(l,z)}]},!!i(function(){var r=/./;return r.exec=function(){var r=[];return r.groups={a:"7"},r},"7"!=="".replace(r,"$<a>")})||!P||I)}();var _u,Du,Fu,Bu,Hu,$u,Gu,Vu={};function Wu(){return Du?_u:(Du=1,_u="\t\n\v\f\r                 \u2028\u2029\ufeff")}!function(){if(Gu)return Vu;Gu=1;var r=re(),t=function(){if(Bu)return Fu;Bu=1;var r=lr(),t=gr(),n=xi(),e=Wu(),i=r("".replace),o=RegExp("^["+e+"]+"),u=RegExp("(^|[^"+e+"])["+e+"]+$"),a=function(r){return function(e){var a=n(t(e));return 1&r&&(a=i(a,o,"")),2&r&&(a=i(a,u,"$1")),a}};return Fu={start:a(1),end:a(2),trim:a(3)}}().trim,n=function(){if($u)return Hu;$u=1;var r=Ht().PROPER,t=b(),n=Wu();return Hu=function(e){return t(function(){return!!n[e]()||"​…᠎"!=="​…᠎"[e]()||r&&n[e].name!==e})}}();r({target:"String",proto:!0,forced:n("trim")},{trim:function(){return t(this)}})}();var Uu=new Set;function qu(r){return(r||"").trim().replace(/\s+/g,"").toLowerCase()}var Ku=new Set(["rgb(0, 0, 0)","rgb(38, 38, 38)","rgb(89, 89, 89)","rgb(140, 140, 140)","rgb(191, 191, 191)","rgb(217, 217, 217)","rgb(233, 233, 233)","rgb(245, 245, 245)","rgb(250, 250, 250)","rgb(255, 255, 255)","rgb(225, 60, 57)","rgb(231, 95, 51)","rgb(235, 144, 58)","rgb(245, 219, 77)","rgb(114, 192, 64)","rgb(89, 191, 192)","rgb(66, 144, 247)","rgb(54, 88, 226)","rgb(106, 57, 201)","rgb(216, 68, 147)","rgb(251, 233, 230)","rgb(252, 237, 225)","rgb(252, 239, 212)","rgb(252, 251, 207)","rgb(231, 246, 213)","rgb(218, 244, 240)","rgb(217, 237, 250)","rgb(224, 232, 250)","rgb(237, 225, 248)","rgb(246, 226, 234)","rgb(255, 163, 158)","rgb(255, 187, 150)","rgb(255, 213, 145)","rgb(255, 251, 143)","rgb(183, 235, 143)","rgb(135, 232, 222)","rgb(145, 213, 255)","rgb(173, 198, 255)","rgb(211, 173, 247)","rgb(255, 173, 210)","rgb(255, 77, 79)","rgb(255, 122, 69)","rgb(255, 169, 64)","rgb(255, 236, 61)","rgb(115, 209, 61)","rgb(54, 207, 201)","rgb(64, 169, 255)","rgb(89, 126, 247)","rgb(146, 84, 222)","rgb(247, 89, 171)","rgb(207, 19, 34)","rgb(212, 56, 13)","rgb(212, 107, 8)","rgb(212, 177, 6)","rgb(56, 158, 13)","rgb(8, 151, 156)","rgb(9, 109, 217)","rgb(29, 57, 196)","rgb(83, 29, 171)","rgb(196, 29, 127)","rgb(130, 0, 20)","rgb(135, 20, 0)","rgb(135, 56, 0)","rgb(97, 71, 0)","rgb(19, 82, 0)","rgb(0, 71, 79)","rgb(0, 58, 140)","rgb(6, 17, 120)","rgb(34, 7, 94)","rgb(120, 6, 80)"].map(function(r){return qu(r)}));function Yu(r){var t=qu(r);return"w-e-list-color-".concat(function(r){var t,n,e=7;try{for(var i=ve(r),o=i.next();!o.done;o=i.next())e=(31*e+(o.value.codePointAt(0)||0))%2147483647}catch(r){t={error:r}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return e.toString(36)}("color:".concat(t)))}function Xu(r,t){var n=qu(t);return!!n&&(!!Ku.has(n)||!!function(r,t){for(var n,e=(null===(n=null==r?void 0:r.getConfig().styleClassTokens)||void 0===n?void 0:n.color)||[],i=qu(t),o=0;o<e.length;o+=1)if(qu(e[o])===i)return!0;return!1}(r,t))}var Ju=[];var Qu,Zu={type:"list-item",elemToHtml:function(n,e,i){var o="",u="",a=n.ordered,f=void 0!==a&&a?"ol":"ul",c=function(n){var e=_o.get(n);if(null==e)return 0;var i=n,o=i.type,u=i.ordered,a=void 0!==u&&u,f=i.level,c=void 0===f?0:f,s=r.DomEditor.findPath(e,n);if(0===s[0])return c+1;var l=t.Path.previous(s),v=t.Editor.node(e,l);if(!v)return 0;var d=de(v,1)[0];if(r.DomEditor.getNodeType(d)!==o)return c+1;var p=d,g=p.ordered,y=void 0!==g&&g,h=p.level,b=void 0===h?0:h;return b<c?c-b:b>c?Bo(e,n)?0:1:b===c?y===a?0:1:0}(n);if(c>0)for(var s=0;s<c;s+=1)o+="<".concat(f,">"),Ju.push(f);var l=function(n){var e=_o.get(n);if(null==e)return 0;var i=n,o=i.type,u=i.ordered,a=void 0!==u&&u,f=i.level,c=void 0===f?0:f,s=r.DomEditor.findPath(e,n);if(s[0]===e.children.length-1)return c+1;var l=t.Path.next(s),v=t.Editor.node(e,l);if(!v)return 0;var d=de(v,1)[0];if(r.DomEditor.getNodeType(d)!==o)return c+1;var p=d,g=p.ordered,y=void 0!==g&&g,h=p.level,b=void 0===h?0:h;return b<c?Bo(e,d)?c-b:c-b+1:b>c?0:b===c?y===a?0:1:0}(n);if(l>0)for(s=0;s<l;s+=1){var v=Ju.pop();u+="</".concat(v,">")}var d=Do(n),p=r.getTextStyleMode(i),g="",y="",h="";if(d)if("class"===p){h=' data-w-e-color="'.concat(d,'"');var b=function(t,n){if(Xu(t,n))return"class";var e=r.getClassStylePolicy(t),i="preserve-data";"fallback-inline"===e&&(i="inline"),"strict"===e&&(i="throw");var o="[wangeditor] Unsupported list color class token color=".concat(n,". policy=").concat(e),u="".concat(n,"|").concat(i);if(Uu.has(u)||(Uu.add(u),r.reportUnsupportedClassStyle(t,{type:"color",value:n,scene:"toHtml",fallback:i,message:o})),"throw"===i)throw new Error(o);return"inline"===i?"inline":"preserve-data"}(i,d);"class"===b?y=' class="'.concat(Yu(d),'"'):"inline"===b&&(g=' style="color:'.concat(d,'"'))}else g=' style="color:'.concat(d,'"');return{html:"<li".concat(y).concat(h).concat(g,">").concat(e,"</li>"),prefix:o,suffix:u}}},ra={};!function(){if(Qu)return ra;Qu=1;var r=re(),t=bn().includes,n=b(),e=ri();r({target:"Array",proto:!0,forced:n(function(){return!Array(1).includes()})},{includes:function(r){return t(this,r,arguments.length>1?arguments[1]:void 0)}}),e("includes")}();var ta,na=function(){function n(){this.type="list-item",this.tag="button"}return n.prototype.getListNode=function(t){var n=this.type;return r.DomEditor.getSelectedNodeByType(t,n)},n.prototype.getValue=function(r){return""},n.prototype.isActive=function(r){var t=this.getListNode(r);if(null==t)return!1;var n=t.ordered;return(void 0!==n&&n)===this.ordered},n.prototype.isDisabled=function(n){return null==n.selection||!!r.DomEditor.getSelectedElems(n).some(function(r){if(t.Editor.isVoid(n,r)&&t.Editor.isBlock(n,r))return!0;var e=r.type;return!!["pre","code","table"].includes(e)})},n.prototype.exec=function(r,n){this.isActive(r)?t.Transforms.setNodes(r,{type:"paragraph",ordered:void 0,level:void 0}):t.Transforms.setNodes(r,{type:"list-item",ordered:this.ordered,indent:void 0})},n}(),ea=function(t){function n(){var n=t.apply(this,pe([],de(arguments),!1))||this;return n.ordered=!1,n.title=r.t("listModule.unOrderedList"),n.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>',n}return le(n,t),n}(na),ia=function(t){function n(){var n=t.apply(this,pe([],de(arguments),!1))||this;return n.ordered=!0,n.title=r.t("listModule.orderedList"),n.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>',n}return le(n,t),n}(na),oa={key:"bulletedList",factory:function(){return new ea}},ua={key:"numberedList",factory:function(){return new ia}},aa={};!function(){if(ta)return aa;ta=1;var r=re(),t=Io().filter;r({target:"Array",proto:!0,forced:!ce()("filter")},{filter:function(r){return t(this,r,arguments.length>1?arguments[1]:void 0)}})}();var fa,ca,sa,la={};!function(){if(sa)return la;sa=1;var r=re(),t=function(){if(ca)return fa;ca=1;var r=te(),t=hn(),n=ne(),e=mo(),i=function(o,u,a,f,c,s,l,v){for(var d,p,g=c,y=0,h=!!l&&e(l,v);y<f;)y in a&&(d=h?h(a[y],y,u):a[y],s>0&&r(d)?(p=t(d),g=i(o,u,d,p,g,s-1)-1):(n(g+1),o[g]=d),g++),y++;return g};return fa=i}(),n=it(),e=hn(),i=pn(),o=fe();r({target:"Array",proto:!0},{flat:function(){var r=arguments.length?arguments[0]:void 0,u=n(this),a=e(u),f=o(u,0);return f.length=t(f,u,u,a,0,void 0===r?1:i(r)),f}})}();var va;va||(va=1,ri()("flat"));var da,pa,ga={};function ya(r){return r.length?r[0].tagName.toLowerCase():""}function ha(n){return t.Editor.nodes(n,{at:n.selection||void 0,match:function(t){return 1===r.DomEditor.findPath(n,t).length}})}return pa||(pa=1,function(){if(da)return ga;da=1;var r=re(),t=f();r({global:!0,forced:t.globalThis!==t},{globalThis:t})}()),n.append&&(n.fn.append=n.append),n.attr&&(n.fn.attr=n.attr),n.parent&&(n.fn.parent=n.parent),{renderElems:[{type:"list-item",renderElem:function(n,i,o){_o.set(n,o);var u=n,a=u.level,f=void 0===a?0:a,c=u.ordered,s=void 0!==c&&c,l={margin:"5px 0 5px ".concat(20*f,"px"),display:"flex",alignItems:"flex-start"},v="";if(s){var d=function(n,e){var i=e,o=i.type,u=i.level,a=void 0===u?0:u,f=i.ordered,c=void 0!==f&&f,s=1,l=e,v=r.DomEditor.findPath(n,l);if(0===v[0])return 1;for(;v[0]>0;){var d=t.Path.previous(v),p=t.Editor.node(n,d);if(null==p)break;var g=p[0],y=g.level,h=void 0===y?0:y,b=g.type,m=g.ordered;if(b!==o)break;if(h<a)break;if(h===a){if(m!==c)break;s+=1}l=g,v=d}return s}(o,n);v="".concat(d,".")}else v=function(r){void 0===r&&(r=0);var t="";switch(r){case 0:t="•";break;case 1:t="◦";break;default:t="▪"}return t}(f);var p=Do(n);return e.jsx("div",{style:l},e.jsx("span",{contentEditable:!1,style:{marginRight:"0.5em",color:p},"data-w-e-reserve":!0},v),e.jsx("span",{style:{flex:"1",wordBreak:"break-word"}},i))}}],editorPlugin:function(n){var e=n.deleteBackward,i=n.handleTab,o=n.normalizeNode,u=n.insertBreak,a=n;return a.insertBreak=function(){var e=de(t.Editor.nodes(n,{match:function(t){return r.DomEditor.checkNodeType(t,"list-item")},universal:!0}),1)[0];return e?""!==e[0].children[0].text?u():void t.Transforms.setNodes(a,{type:"paragraph",ordered:void 0,level:void 0}):u()},a.deleteBackward=function(i){var o=a.selection;if(null!=o)if(t.Range.isExpanded(o))e(i);else{var u=r.DomEditor.getSelectedNodeByType(a,"list-item");if(null!=u)if(0!==o.focus.offset)e(i);else{var f=u,c=f.level,s=void 0===c?0:c,l=f.ordered,v=void 0!==l&&l;if(s>0){var d=Fo(n,u,s-1);d&&d.ordered!==v?t.Transforms.setNodes(a,{level:s-1,ordered:!v}):t.Transforms.setNodes(a,{level:s-1})}else t.Transforms.setNodes(a,{type:"paragraph",ordered:void 0,level:void 0})}else e(i)}else e(i)},a.handleTab=function(){var n,e,o,u,f=a.selection;if(null!=f){if(t.Range.isCollapsed(f)){var c=r.DomEditor.getSelectedNodeByType(a,"list-item");if(null==c)return void i();if(0===f.focus.offset){var s=c.level,l=void 0===s?0:s;return void t.Transforms.setNodes(a,{level:l+1})}}if(t.Range.isExpanded(f)){var v=0,d=!1;try{for(var p=ve(ha(a)),g=p.next();!g.done;g=p.next()){var y=de(g.value,1)[0];"list-item"===r.DomEditor.getNodeType(y)?v+=1:d=!0}}catch(r){n={error:r}}finally{try{g&&!g.done&&(e=p.return)&&e.call(p)}finally{if(n)throw n.error}}if(d||v<=1)return void i();try{for(var h=ve(ha(a)),b=h.next();!b.done;b=h.next()){var m=de(b.value,2),w=(y=m[0],m[1]),x=y.level;l=void 0===x?0:x;t.Transforms.setNodes(a,{level:l+1},{at:w})}}catch(r){o={error:r}}finally{try{b&&!b.done&&(u=h.return)&&u.call(h)}finally{if(o)throw o.error}}}else i()}else i()},a.normalizeNode=function(n){var e=de(n,2),i=e[0],u=e[1],f=r.DomEditor.getNodeType(i);return"bulleted-list"!==f&&"numbered-list"!==f||t.Transforms.unwrapNodes(a,{at:u}),o([i,u])},a},menus:[oa,ua],elemsToHtml:[Zu],parseElemsHtml:[{selector:"ul:not([data-w-e-type]),ol:not([data-w-e-type])",parseElemHtml:function(r,t,n){return t.flat(1/0)}},{selector:"li:not([data-w-e-type])",parseElemHtml:function(r,e,i){var o=n(r);0===(e=e.filter(function(r){return!!t.Text.isText(r)||!!i.isInline(r)})).length&&(e=[{text:o.text().replace(/\s+/gm," ")}]);var u=function(r){return"ol"===ya(r.parent())}(o),a=function(r){for(var t=0,n=r.parent(),e=ya(n);"ul"===e||"ol"===e;)e=ya(n=n.parent()),t+=1;return t-1}(o);return{type:"list-item",ordered:u,level:a,children:e}}}]}});
2
+ //# sourceMappingURL=index.js.map