UNPKG

vue-devui

Version:

DevUI components based on Vite and Vue3

1,255 lines 353 kB
var __defProp = Object.defineProperty; var __defProps = Object.defineProperties; var __getOwnPropDescs = Object.getOwnPropertyDescriptors; var __getOwnPropSymbols = Object.getOwnPropertySymbols; var __hasOwnProp = Object.prototype.hasOwnProperty; var __propIsEnum = Object.prototype.propertyIsEnumerable; var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; var __spreadValues = (a, b) => { for (var prop in b || (b = {})) if (__hasOwnProp.call(b, prop)) __defNormalProp(a, prop, b[prop]); if (__getOwnPropSymbols) for (var prop of __getOwnPropSymbols(b)) { if (__propIsEnum.call(b, prop)) __defNormalProp(a, prop, b[prop]); } return a; }; var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b)); var __publicField = (obj, key, value) => { __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value); return value; }; import { toRefs, onMounted, onUnmounted, watch, defineComponent, ref, renderSlot, useSlots, createVNode, reactive, computed, nextTick, onBeforeMount, onBeforeUnmount, Transition, mergeProps, unref, withModifiers, Comment, Text, h, Fragment, inject, withDirectives, cloneVNode, provide, Teleport, vShow, createTextVNode, isVNode } from "vue"; import "clipboard"; import { offset, autoPlacement, arrow, shift, computePosition } from "@floating-ui/dom"; import { onClickOutside } from "@vueuse/core"; import hljs from "highlight.js"; import MarkdownIt from "markdown-it"; import { getDefaultWhiteList, getDefaultCSSWhiteList, filterXSS } from "xss"; import Mermaid from "mermaid/dist/mermaid.js"; import Token from "markdown-it/lib/token"; const fullscreenProps = { modelValue: { type: Boolean, default: false }, mode: { type: String, default: "normal" }, zIndex: { type: Number, default: 10 } }; const ESC_KEY_CODE = 27; function useKeydown(props, ctx) { const { modelValue } = toRefs(props); const handleKeydown = (event) => { if (event.keyCode === ESC_KEY_CODE && modelValue) { ctx.emit("update:modelValue", false); } }; onMounted(() => { document.addEventListener("keydown", handleKeydown); }); onUnmounted(() => { document.removeEventListener("keydown", handleKeydown); }); } function debounce(func, wait, immediate) { let timer, result; return function(...args) { if (timer) { clearTimeout(timer); } if (immediate) { const localImmediate = !timer; timer = window.setTimeout(() => { timer = null; }, wait); if (localImmediate) { result = func.apply(this, args); } } else { timer = window.setTimeout(() => { func.apply(this, args); }, wait); } return result; }; } function getElement(element) { if (element instanceof Element) { return element; } if (element && typeof element === "object" && element.$el instanceof Element) { return element.$el; } return null; } function lockScroll() { if (document.documentElement.scrollHeight > document.documentElement.clientHeight) { const scrollTop = document.documentElement.scrollTop; const style = document.documentElement.getAttribute("style"); document.documentElement.style.position = "fixed"; document.documentElement.style.top = `-${scrollTop}px`; document.documentElement.style.width = document.documentElement.style.width || "100%"; document.documentElement.style.overflowY = "scroll"; return () => { if (style) { document.documentElement.setAttribute("style", style); } else { document.documentElement.removeAttribute("style"); } document.documentElement.scrollTop = scrollTop; }; } return; } function createBem$1(namespace, element, modifier) { let cls = namespace; if (element) { cls += `__${element}`; } if (modifier) { cls += `--${modifier}`; } return cls; } function useNamespace$1(block, needDot = false) { const namespace = needDot ? `.devui-${block}` : `devui-${block}`; const b = () => createBem$1(namespace); const e = (element) => element ? createBem$1(namespace, element) : ""; const m = (modifier) => modifier ? createBem$1(namespace, "", modifier) : ""; const em = (element, modifier) => element && modifier ? createBem$1(namespace, element, modifier) : ""; return { b, e, m, em }; } const ns$1 = useNamespace$1("fullscreen"); const launchNormalFullscreen = (targetElement, props) => { targetElement.classList.add(ns$1.b()); if (props.zIndex) { targetElement.setAttribute("style", `z-index: ${props.zIndex}`); } }; const exitNormalFullscreen = (targetElement) => { targetElement.classList.remove(ns$1.b()); targetElement.style.zIndex = ""; }; const launchImmersiveFullScreen = async (docElement) => { let fullscreenLaunch = null; if (docElement.requestFullscreen) { fullscreenLaunch = docElement.requestFullscreen(); } else if (docElement.mozRequestFullScreen) { fullscreenLaunch = docElement.mozRequestFullScreen(); } else if (docElement.webkitRequestFullScreen) { fullscreenLaunch = Promise.resolve(docElement.webkitRequestFullScreen()); } else if (docElement.msRequestFullscreen) { fullscreenLaunch = Promise.resolve(docElement.msRequestFullscreen()); } return await (fullscreenLaunch == null ? void 0 : fullscreenLaunch.then(() => !!document.fullscreenElement)); }; const exitImmersiveFullScreen = async (doc) => { let fullscreenExit = null; if (doc.exitFullscreen) { fullscreenExit = doc.exitFullscreen(); } else if (doc.mozCancelFullScreen) { fullscreenExit = doc.mozCancelFullScreen(); } else if (doc.webkitCancelFullScreen) { fullscreenExit = Promise.resolve(doc.webkitCancelFullScreen()); } else if (doc.msExitFullscreen) { fullscreenExit = Promise.resolve(doc.msExitFullscreen()); } return await (fullscreenExit == null ? void 0 : fullscreenExit.then(() => !!document.fullscreenElement)); }; const addFullScreenStyle = () => { document.getElementsByTagName("html")[0].classList.add(ns$1.e("html")); }; const removeFullScreenStyle = () => { document.getElementsByTagName("html")[0].classList.remove(ns$1.e("html")); }; function useFullscreen(props, slotElement, ctx) { const { modelValue, mode } = toRefs(props); let exitByKeydown = false; const handleNormalFullscreen = (isOpen) => { if (isOpen) { launchNormalFullscreen(slotElement.value, props); addFullScreenStyle(); } else { exitNormalFullscreen(slotElement.value); removeFullScreenStyle(); } }; const handleImmersiveFullscreen = (isOpen) => { if (isOpen) { launchImmersiveFullScreen(slotElement.value); } else { if (!exitByKeydown) { exitImmersiveFullScreen(document); } } }; watch(modelValue, (newVal) => { if (mode.value === "normal") { handleNormalFullscreen(newVal); } if (mode.value === "immersive") { handleImmersiveFullscreen(newVal); } }); const handleFullscreenChange = () => { if (!document.fullscreenElement) { ctx.emit("update:modelValue", false); exitByKeydown = true; } else { exitByKeydown = false; } }; onMounted(() => { document.addEventListener("fullscreenchange", handleFullscreenChange); }); onUnmounted(() => { document.removeEventListener("fullscreenchange", handleFullscreenChange); }); } var fullscreen = ""; var Fullscreen = defineComponent({ name: "DFullscreen", props: fullscreenProps, emits: ["update:modelValue"], setup(props, ctx) { const slotElement = ref(); useFullscreen(props, slotElement, ctx); useKeydown(props, ctx); return () => { const defaultSlot = renderSlot(useSlots(), "default"); return createVNode("div", { "ref": slotElement }, [defaultSlot]); }; } }); var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {}; function listCacheClear$1() { this.__data__ = []; this.size = 0; } var _listCacheClear = listCacheClear$1; function eq$2(value, other) { return value === other || value !== value && other !== other; } var eq_1 = eq$2; var eq$1 = eq_1; function assocIndexOf$4(array, key) { var length = array.length; while (length--) { if (eq$1(array[length][0], key)) { return length; } } return -1; } var _assocIndexOf = assocIndexOf$4; var assocIndexOf$3 = _assocIndexOf; var arrayProto = Array.prototype; var splice = arrayProto.splice; function listCacheDelete$1(key) { var data = this.__data__, index2 = assocIndexOf$3(data, key); if (index2 < 0) { return false; } var lastIndex = data.length - 1; if (index2 == lastIndex) { data.pop(); } else { splice.call(data, index2, 1); } --this.size; return true; } var _listCacheDelete = listCacheDelete$1; var assocIndexOf$2 = _assocIndexOf; function listCacheGet$1(key) { var data = this.__data__, index2 = assocIndexOf$2(data, key); return index2 < 0 ? void 0 : data[index2][1]; } var _listCacheGet = listCacheGet$1; var assocIndexOf$1 = _assocIndexOf; function listCacheHas$1(key) { return assocIndexOf$1(this.__data__, key) > -1; } var _listCacheHas = listCacheHas$1; var assocIndexOf = _assocIndexOf; function listCacheSet$1(key, value) { var data = this.__data__, index2 = assocIndexOf(data, key); if (index2 < 0) { ++this.size; data.push([key, value]); } else { data[index2][1] = value; } return this; } var _listCacheSet = listCacheSet$1; var listCacheClear = _listCacheClear, listCacheDelete = _listCacheDelete, listCacheGet = _listCacheGet, listCacheHas = _listCacheHas, listCacheSet = _listCacheSet; function ListCache$4(entries) { var index2 = -1, length = entries == null ? 0 : entries.length; this.clear(); while (++index2 < length) { var entry = entries[index2]; this.set(entry[0], entry[1]); } } ListCache$4.prototype.clear = listCacheClear; ListCache$4.prototype["delete"] = listCacheDelete; ListCache$4.prototype.get = listCacheGet; ListCache$4.prototype.has = listCacheHas; ListCache$4.prototype.set = listCacheSet; var _ListCache = ListCache$4; var ListCache$3 = _ListCache; function stackClear$1() { this.__data__ = new ListCache$3(); this.size = 0; } var _stackClear = stackClear$1; function stackDelete$1(key) { var data = this.__data__, result = data["delete"](key); this.size = data.size; return result; } var _stackDelete = stackDelete$1; function stackGet$1(key) { return this.__data__.get(key); } var _stackGet = stackGet$1; function stackHas$1(key) { return this.__data__.has(key); } var _stackHas = stackHas$1; var freeGlobal$1 = typeof commonjsGlobal == "object" && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal; var _freeGlobal = freeGlobal$1; var freeGlobal = _freeGlobal; var freeSelf = typeof self == "object" && self && self.Object === Object && self; var root$8 = freeGlobal || freeSelf || Function("return this")(); var _root = root$8; var root$7 = _root; var Symbol$4 = root$7.Symbol; var _Symbol = Symbol$4; var Symbol$3 = _Symbol; var objectProto$c = Object.prototype; var hasOwnProperty$9 = objectProto$c.hasOwnProperty; var nativeObjectToString$1 = objectProto$c.toString; var symToStringTag$1 = Symbol$3 ? Symbol$3.toStringTag : void 0; function getRawTag$1(value) { var isOwn = hasOwnProperty$9.call(value, symToStringTag$1), tag = value[symToStringTag$1]; try { value[symToStringTag$1] = void 0; var unmasked = true; } catch (e) { } var result = nativeObjectToString$1.call(value); if (unmasked) { if (isOwn) { value[symToStringTag$1] = tag; } else { delete value[symToStringTag$1]; } } return result; } var _getRawTag = getRawTag$1; var objectProto$b = Object.prototype; var nativeObjectToString = objectProto$b.toString; function objectToString$1(value) { return nativeObjectToString.call(value); } var _objectToString = objectToString$1; var Symbol$2 = _Symbol, getRawTag = _getRawTag, objectToString = _objectToString; var nullTag = "[object Null]", undefinedTag = "[object Undefined]"; var symToStringTag = Symbol$2 ? Symbol$2.toStringTag : void 0; function baseGetTag$4(value) { if (value == null) { return value === void 0 ? undefinedTag : nullTag; } return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value); } var _baseGetTag = baseGetTag$4; function isObject$6(value) { var type = typeof value; return value != null && (type == "object" || type == "function"); } var isObject_1 = isObject$6; var baseGetTag$3 = _baseGetTag, isObject$5 = isObject_1; var asyncTag = "[object AsyncFunction]", funcTag$2 = "[object Function]", genTag$1 = "[object GeneratorFunction]", proxyTag = "[object Proxy]"; function isFunction$2(value) { if (!isObject$5(value)) { return false; } var tag = baseGetTag$3(value); return tag == funcTag$2 || tag == genTag$1 || tag == asyncTag || tag == proxyTag; } var isFunction_1 = isFunction$2; var root$6 = _root; var coreJsData$1 = root$6["__core-js_shared__"]; var _coreJsData = coreJsData$1; var coreJsData = _coreJsData; var maskSrcKey = function() { var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ""); return uid ? "Symbol(src)_1." + uid : ""; }(); function isMasked$1(func) { return !!maskSrcKey && maskSrcKey in func; } var _isMasked = isMasked$1; var funcProto$1 = Function.prototype; var funcToString$1 = funcProto$1.toString; function toSource$2(func) { if (func != null) { try { return funcToString$1.call(func); } catch (e) { } try { return func + ""; } catch (e) { } } return ""; } var _toSource = toSource$2; var isFunction$1 = isFunction_1, isMasked = _isMasked, isObject$4 = isObject_1, toSource$1 = _toSource; var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; var reIsHostCtor = /^\[object .+?Constructor\]$/; var funcProto = Function.prototype, objectProto$a = Object.prototype; var funcToString = funcProto.toString; var hasOwnProperty$8 = objectProto$a.hasOwnProperty; var reIsNative = RegExp("^" + funcToString.call(hasOwnProperty$8).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"); function baseIsNative$1(value) { if (!isObject$4(value) || isMasked(value)) { return false; } var pattern = isFunction$1(value) ? reIsNative : reIsHostCtor; return pattern.test(toSource$1(value)); } var _baseIsNative = baseIsNative$1; function getValue$1(object, key) { return object == null ? void 0 : object[key]; } var _getValue = getValue$1; var baseIsNative = _baseIsNative, getValue = _getValue; function getNative$7(object, key) { var value = getValue(object, key); return baseIsNative(value) ? value : void 0; } var _getNative = getNative$7; var getNative$6 = _getNative, root$5 = _root; var Map$4 = getNative$6(root$5, "Map"); var _Map = Map$4; var getNative$5 = _getNative; var nativeCreate$4 = getNative$5(Object, "create"); var _nativeCreate = nativeCreate$4; var nativeCreate$3 = _nativeCreate; function hashClear$1() { this.__data__ = nativeCreate$3 ? nativeCreate$3(null) : {}; this.size = 0; } var _hashClear = hashClear$1; function hashDelete$1(key) { var result = this.has(key) && delete this.__data__[key]; this.size -= result ? 1 : 0; return result; } var _hashDelete = hashDelete$1; var nativeCreate$2 = _nativeCreate; var HASH_UNDEFINED$1 = "__lodash_hash_undefined__"; var objectProto$9 = Object.prototype; var hasOwnProperty$7 = objectProto$9.hasOwnProperty; function hashGet$1(key) { var data = this.__data__; if (nativeCreate$2) { var result = data[key]; return result === HASH_UNDEFINED$1 ? void 0 : result; } return hasOwnProperty$7.call(data, key) ? data[key] : void 0; } var _hashGet = hashGet$1; var nativeCreate$1 = _nativeCreate; var objectProto$8 = Object.prototype; var hasOwnProperty$6 = objectProto$8.hasOwnProperty; function hashHas$1(key) { var data = this.__data__; return nativeCreate$1 ? data[key] !== void 0 : hasOwnProperty$6.call(data, key); } var _hashHas = hashHas$1; var nativeCreate = _nativeCreate; var HASH_UNDEFINED = "__lodash_hash_undefined__"; function hashSet$1(key, value) { var data = this.__data__; this.size += this.has(key) ? 0 : 1; data[key] = nativeCreate && value === void 0 ? HASH_UNDEFINED : value; return this; } var _hashSet = hashSet$1; var hashClear = _hashClear, hashDelete = _hashDelete, hashGet = _hashGet, hashHas = _hashHas, hashSet = _hashSet; function Hash$1(entries) { var index2 = -1, length = entries == null ? 0 : entries.length; this.clear(); while (++index2 < length) { var entry = entries[index2]; this.set(entry[0], entry[1]); } } Hash$1.prototype.clear = hashClear; Hash$1.prototype["delete"] = hashDelete; Hash$1.prototype.get = hashGet; Hash$1.prototype.has = hashHas; Hash$1.prototype.set = hashSet; var _Hash = Hash$1; var Hash = _Hash, ListCache$2 = _ListCache, Map$3 = _Map; function mapCacheClear$1() { this.size = 0; this.__data__ = { "hash": new Hash(), "map": new (Map$3 || ListCache$2)(), "string": new Hash() }; } var _mapCacheClear = mapCacheClear$1; function isKeyable$1(value) { var type = typeof value; return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null; } var _isKeyable = isKeyable$1; var isKeyable = _isKeyable; function getMapData$4(map, key) { var data = map.__data__; return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map; } var _getMapData = getMapData$4; var getMapData$3 = _getMapData; function mapCacheDelete$1(key) { var result = getMapData$3(this, key)["delete"](key); this.size -= result ? 1 : 0; return result; } var _mapCacheDelete = mapCacheDelete$1; var getMapData$2 = _getMapData; function mapCacheGet$1(key) { return getMapData$2(this, key).get(key); } var _mapCacheGet = mapCacheGet$1; var getMapData$1 = _getMapData; function mapCacheHas$1(key) { return getMapData$1(this, key).has(key); } var _mapCacheHas = mapCacheHas$1; var getMapData = _getMapData; function mapCacheSet$1(key, value) { var data = getMapData(this, key), size = data.size; data.set(key, value); this.size += data.size == size ? 0 : 1; return this; } var _mapCacheSet = mapCacheSet$1; var mapCacheClear = _mapCacheClear, mapCacheDelete = _mapCacheDelete, mapCacheGet = _mapCacheGet, mapCacheHas = _mapCacheHas, mapCacheSet = _mapCacheSet; function MapCache$1(entries) { var index2 = -1, length = entries == null ? 0 : entries.length; this.clear(); while (++index2 < length) { var entry = entries[index2]; this.set(entry[0], entry[1]); } } MapCache$1.prototype.clear = mapCacheClear; MapCache$1.prototype["delete"] = mapCacheDelete; MapCache$1.prototype.get = mapCacheGet; MapCache$1.prototype.has = mapCacheHas; MapCache$1.prototype.set = mapCacheSet; var _MapCache = MapCache$1; var ListCache$1 = _ListCache, Map$2 = _Map, MapCache = _MapCache; var LARGE_ARRAY_SIZE = 200; function stackSet$1(key, value) { var data = this.__data__; if (data instanceof ListCache$1) { var pairs = data.__data__; if (!Map$2 || pairs.length < LARGE_ARRAY_SIZE - 1) { pairs.push([key, value]); this.size = ++data.size; return this; } data = this.__data__ = new MapCache(pairs); } data.set(key, value); this.size = data.size; return this; } var _stackSet = stackSet$1; var ListCache = _ListCache, stackClear = _stackClear, stackDelete = _stackDelete, stackGet = _stackGet, stackHas = _stackHas, stackSet = _stackSet; function Stack$1(entries) { var data = this.__data__ = new ListCache(entries); this.size = data.size; } Stack$1.prototype.clear = stackClear; Stack$1.prototype["delete"] = stackDelete; Stack$1.prototype.get = stackGet; Stack$1.prototype.has = stackHas; Stack$1.prototype.set = stackSet; var _Stack = Stack$1; function arrayEach$1(array, iteratee) { var index2 = -1, length = array == null ? 0 : array.length; while (++index2 < length) { if (iteratee(array[index2], index2, array) === false) { break; } } return array; } var _arrayEach = arrayEach$1; var getNative$4 = _getNative; var defineProperty$1 = function() { try { var func = getNative$4(Object, "defineProperty"); func({}, "", {}); return func; } catch (e) { } }(); var _defineProperty = defineProperty$1; var defineProperty = _defineProperty; function baseAssignValue$2(object, key, value) { if (key == "__proto__" && defineProperty) { defineProperty(object, key, { "configurable": true, "enumerable": true, "value": value, "writable": true }); } else { object[key] = value; } } var _baseAssignValue = baseAssignValue$2; var baseAssignValue$1 = _baseAssignValue, eq = eq_1; var objectProto$7 = Object.prototype; var hasOwnProperty$5 = objectProto$7.hasOwnProperty; function assignValue$2(object, key, value) { var objValue = object[key]; if (!(hasOwnProperty$5.call(object, key) && eq(objValue, value)) || value === void 0 && !(key in object)) { baseAssignValue$1(object, key, value); } } var _assignValue = assignValue$2; var assignValue$1 = _assignValue, baseAssignValue = _baseAssignValue; function copyObject$4(source, props, object, customizer) { var isNew = !object; object || (object = {}); var index2 = -1, length = props.length; while (++index2 < length) { var key = props[index2]; var newValue = customizer ? customizer(object[key], source[key], key, object, source) : void 0; if (newValue === void 0) { newValue = source[key]; } if (isNew) { baseAssignValue(object, key, newValue); } else { assignValue$1(object, key, newValue); } } return object; } var _copyObject = copyObject$4; function baseTimes$1(n, iteratee) { var index2 = -1, result = Array(n); while (++index2 < n) { result[index2] = iteratee(index2); } return result; } var _baseTimes = baseTimes$1; function isObjectLike$5(value) { return value != null && typeof value == "object"; } var isObjectLike_1 = isObjectLike$5; var baseGetTag$2 = _baseGetTag, isObjectLike$4 = isObjectLike_1; var argsTag$2 = "[object Arguments]"; function baseIsArguments$1(value) { return isObjectLike$4(value) && baseGetTag$2(value) == argsTag$2; } var _baseIsArguments = baseIsArguments$1; var baseIsArguments = _baseIsArguments, isObjectLike$3 = isObjectLike_1; var objectProto$6 = Object.prototype; var hasOwnProperty$4 = objectProto$6.hasOwnProperty; var propertyIsEnumerable$1 = objectProto$6.propertyIsEnumerable; var isArguments$1 = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) { return isObjectLike$3(value) && hasOwnProperty$4.call(value, "callee") && !propertyIsEnumerable$1.call(value, "callee"); }; var isArguments_1 = isArguments$1; var isArray$3 = Array.isArray; var isArray_1 = isArray$3; var isBuffer$2 = { exports: {} }; function stubFalse() { return false; } var stubFalse_1 = stubFalse; (function(module, exports) { var root2 = _root, stubFalse2 = stubFalse_1; var freeExports = exports && !exports.nodeType && exports; var freeModule = freeExports && true && module && !module.nodeType && module; var moduleExports = freeModule && freeModule.exports === freeExports; var Buffer2 = moduleExports ? root2.Buffer : void 0; var nativeIsBuffer = Buffer2 ? Buffer2.isBuffer : void 0; var isBuffer2 = nativeIsBuffer || stubFalse2; module.exports = isBuffer2; })(isBuffer$2, isBuffer$2.exports); var MAX_SAFE_INTEGER$1 = 9007199254740991; var reIsUint = /^(?:0|[1-9]\d*)$/; function isIndex$1(value, length) { var type = typeof value; length = length == null ? MAX_SAFE_INTEGER$1 : length; return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length); } var _isIndex = isIndex$1; var MAX_SAFE_INTEGER = 9007199254740991; function isLength$2(value) { return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; } var isLength_1 = isLength$2; var baseGetTag$1 = _baseGetTag, isLength$1 = isLength_1, isObjectLike$2 = isObjectLike_1; var argsTag$1 = "[object Arguments]", arrayTag$1 = "[object Array]", boolTag$2 = "[object Boolean]", dateTag$2 = "[object Date]", errorTag$1 = "[object Error]", funcTag$1 = "[object Function]", mapTag$4 = "[object Map]", numberTag$2 = "[object Number]", objectTag$2 = "[object Object]", regexpTag$2 = "[object RegExp]", setTag$4 = "[object Set]", stringTag$2 = "[object String]", weakMapTag$2 = "[object WeakMap]"; var arrayBufferTag$2 = "[object ArrayBuffer]", dataViewTag$3 = "[object DataView]", float32Tag$2 = "[object Float32Array]", float64Tag$2 = "[object Float64Array]", int8Tag$2 = "[object Int8Array]", int16Tag$2 = "[object Int16Array]", int32Tag$2 = "[object Int32Array]", uint8Tag$2 = "[object Uint8Array]", uint8ClampedTag$2 = "[object Uint8ClampedArray]", uint16Tag$2 = "[object Uint16Array]", uint32Tag$2 = "[object Uint32Array]"; var typedArrayTags = {}; typedArrayTags[float32Tag$2] = typedArrayTags[float64Tag$2] = typedArrayTags[int8Tag$2] = typedArrayTags[int16Tag$2] = typedArrayTags[int32Tag$2] = typedArrayTags[uint8Tag$2] = typedArrayTags[uint8ClampedTag$2] = typedArrayTags[uint16Tag$2] = typedArrayTags[uint32Tag$2] = true; typedArrayTags[argsTag$1] = typedArrayTags[arrayTag$1] = typedArrayTags[arrayBufferTag$2] = typedArrayTags[boolTag$2] = typedArrayTags[dataViewTag$3] = typedArrayTags[dateTag$2] = typedArrayTags[errorTag$1] = typedArrayTags[funcTag$1] = typedArrayTags[mapTag$4] = typedArrayTags[numberTag$2] = typedArrayTags[objectTag$2] = typedArrayTags[regexpTag$2] = typedArrayTags[setTag$4] = typedArrayTags[stringTag$2] = typedArrayTags[weakMapTag$2] = false; function baseIsTypedArray$1(value) { return isObjectLike$2(value) && isLength$1(value.length) && !!typedArrayTags[baseGetTag$1(value)]; } var _baseIsTypedArray = baseIsTypedArray$1; function baseUnary$3(func) { return function(value) { return func(value); }; } var _baseUnary = baseUnary$3; var _nodeUtil = { exports: {} }; (function(module, exports) { var freeGlobal2 = _freeGlobal; var freeExports = exports && !exports.nodeType && exports; var freeModule = freeExports && true && module && !module.nodeType && module; var moduleExports = freeModule && freeModule.exports === freeExports; var freeProcess = moduleExports && freeGlobal2.process; var nodeUtil2 = function() { try { var types = freeModule && freeModule.require && freeModule.require("util").types; if (types) { return types; } return freeProcess && freeProcess.binding && freeProcess.binding("util"); } catch (e) { } }(); module.exports = nodeUtil2; })(_nodeUtil, _nodeUtil.exports); var baseIsTypedArray = _baseIsTypedArray, baseUnary$2 = _baseUnary, nodeUtil$2 = _nodeUtil.exports; var nodeIsTypedArray = nodeUtil$2 && nodeUtil$2.isTypedArray; var isTypedArray$1 = nodeIsTypedArray ? baseUnary$2(nodeIsTypedArray) : baseIsTypedArray; var isTypedArray_1 = isTypedArray$1; var baseTimes = _baseTimes, isArguments = isArguments_1, isArray$2 = isArray_1, isBuffer$1 = isBuffer$2.exports, isIndex = _isIndex, isTypedArray = isTypedArray_1; var objectProto$5 = Object.prototype; var hasOwnProperty$3 = objectProto$5.hasOwnProperty; function arrayLikeKeys$2(value, inherited) { var isArr = isArray$2(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg && isBuffer$1(value), isType = !isArr && !isArg && !isBuff && isTypedArray(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes(value.length, String) : [], length = result.length; for (var key in value) { if ((inherited || hasOwnProperty$3.call(value, key)) && !(skipIndexes && (key == "length" || isBuff && (key == "offset" || key == "parent") || isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || isIndex(key, length)))) { result.push(key); } } return result; } var _arrayLikeKeys = arrayLikeKeys$2; var objectProto$4 = Object.prototype; function isPrototype$3(value) { var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto$4; return value === proto; } var _isPrototype = isPrototype$3; function overArg$2(func, transform) { return function(arg) { return func(transform(arg)); }; } var _overArg = overArg$2; var overArg$1 = _overArg; var nativeKeys$1 = overArg$1(Object.keys, Object); var _nativeKeys = nativeKeys$1; var isPrototype$2 = _isPrototype, nativeKeys = _nativeKeys; var objectProto$3 = Object.prototype; var hasOwnProperty$2 = objectProto$3.hasOwnProperty; function baseKeys$1(object) { if (!isPrototype$2(object)) { return nativeKeys(object); } var result = []; for (var key in Object(object)) { if (hasOwnProperty$2.call(object, key) && key != "constructor") { result.push(key); } } return result; } var _baseKeys = baseKeys$1; var isFunction = isFunction_1, isLength = isLength_1; function isArrayLike$2(value) { return value != null && isLength(value.length) && !isFunction(value); } var isArrayLike_1 = isArrayLike$2; var arrayLikeKeys$1 = _arrayLikeKeys, baseKeys = _baseKeys, isArrayLike$1 = isArrayLike_1; function keys$3(object) { return isArrayLike$1(object) ? arrayLikeKeys$1(object) : baseKeys(object); } var keys_1 = keys$3; var copyObject$3 = _copyObject, keys$2 = keys_1; function baseAssign$1(object, source) { return object && copyObject$3(source, keys$2(source), object); } var _baseAssign = baseAssign$1; function nativeKeysIn$1(object) { var result = []; if (object != null) { for (var key in Object(object)) { result.push(key); } } return result; } var _nativeKeysIn = nativeKeysIn$1; var isObject$3 = isObject_1, isPrototype$1 = _isPrototype, nativeKeysIn = _nativeKeysIn; var objectProto$2 = Object.prototype; var hasOwnProperty$1 = objectProto$2.hasOwnProperty; function baseKeysIn$1(object) { if (!isObject$3(object)) { return nativeKeysIn(object); } var isProto = isPrototype$1(object), result = []; for (var key in object) { if (!(key == "constructor" && (isProto || !hasOwnProperty$1.call(object, key)))) { result.push(key); } } return result; } var _baseKeysIn = baseKeysIn$1; var arrayLikeKeys = _arrayLikeKeys, baseKeysIn = _baseKeysIn, isArrayLike = isArrayLike_1; function keysIn$3(object) { return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); } var keysIn_1 = keysIn$3; var copyObject$2 = _copyObject, keysIn$2 = keysIn_1; function baseAssignIn$1(object, source) { return object && copyObject$2(source, keysIn$2(source), object); } var _baseAssignIn = baseAssignIn$1; var _cloneBuffer = { exports: {} }; (function(module, exports) { var root2 = _root; var freeExports = exports && !exports.nodeType && exports; var freeModule = freeExports && true && module && !module.nodeType && module; var moduleExports = freeModule && freeModule.exports === freeExports; var Buffer2 = moduleExports ? root2.Buffer : void 0, allocUnsafe = Buffer2 ? Buffer2.allocUnsafe : void 0; function cloneBuffer2(buffer, isDeep) { if (isDeep) { return buffer.slice(); } var length = buffer.length, result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length); buffer.copy(result); return result; } module.exports = cloneBuffer2; })(_cloneBuffer, _cloneBuffer.exports); function copyArray$1(source, array) { var index2 = -1, length = source.length; array || (array = Array(length)); while (++index2 < length) { array[index2] = source[index2]; } return array; } var _copyArray = copyArray$1; function arrayFilter$1(array, predicate) { var index2 = -1, length = array == null ? 0 : array.length, resIndex = 0, result = []; while (++index2 < length) { var value = array[index2]; if (predicate(value, index2, array)) { result[resIndex++] = value; } } return result; } var _arrayFilter = arrayFilter$1; function stubArray$2() { return []; } var stubArray_1 = stubArray$2; var arrayFilter = _arrayFilter, stubArray$1 = stubArray_1; var objectProto$1 = Object.prototype; var propertyIsEnumerable = objectProto$1.propertyIsEnumerable; var nativeGetSymbols$1 = Object.getOwnPropertySymbols; var getSymbols$3 = !nativeGetSymbols$1 ? stubArray$1 : function(object) { if (object == null) { return []; } object = Object(object); return arrayFilter(nativeGetSymbols$1(object), function(symbol) { return propertyIsEnumerable.call(object, symbol); }); }; var _getSymbols = getSymbols$3; var copyObject$1 = _copyObject, getSymbols$2 = _getSymbols; function copySymbols$1(source, object) { return copyObject$1(source, getSymbols$2(source), object); } var _copySymbols = copySymbols$1; function arrayPush$2(array, values) { var index2 = -1, length = values.length, offset2 = array.length; while (++index2 < length) { array[offset2 + index2] = values[index2]; } return array; } var _arrayPush = arrayPush$2; var overArg = _overArg; var getPrototype$2 = overArg(Object.getPrototypeOf, Object); var _getPrototype = getPrototype$2; var arrayPush$1 = _arrayPush, getPrototype$1 = _getPrototype, getSymbols$1 = _getSymbols, stubArray = stubArray_1; var nativeGetSymbols = Object.getOwnPropertySymbols; var getSymbolsIn$2 = !nativeGetSymbols ? stubArray : function(object) { var result = []; while (object) { arrayPush$1(result, getSymbols$1(object)); object = getPrototype$1(object); } return result; }; var _getSymbolsIn = getSymbolsIn$2; var copyObject = _copyObject, getSymbolsIn$1 = _getSymbolsIn; function copySymbolsIn$1(source, object) { return copyObject(source, getSymbolsIn$1(source), object); } var _copySymbolsIn = copySymbolsIn$1; var arrayPush = _arrayPush, isArray$1 = isArray_1; function baseGetAllKeys$2(object, keysFunc, symbolsFunc) { var result = keysFunc(object); return isArray$1(object) ? result : arrayPush(result, symbolsFunc(object)); } var _baseGetAllKeys = baseGetAllKeys$2; var baseGetAllKeys$1 = _baseGetAllKeys, getSymbols = _getSymbols, keys$1 = keys_1; function getAllKeys$1(object) { return baseGetAllKeys$1(object, keys$1, getSymbols); } var _getAllKeys = getAllKeys$1; var baseGetAllKeys = _baseGetAllKeys, getSymbolsIn = _getSymbolsIn, keysIn$1 = keysIn_1; function getAllKeysIn$1(object) { return baseGetAllKeys(object, keysIn$1, getSymbolsIn); } var _getAllKeysIn = getAllKeysIn$1; var getNative$3 = _getNative, root$4 = _root; var DataView$1 = getNative$3(root$4, "DataView"); var _DataView = DataView$1; var getNative$2 = _getNative, root$3 = _root; var Promise$2 = getNative$2(root$3, "Promise"); var _Promise = Promise$2; var getNative$1 = _getNative, root$2 = _root; var Set$1 = getNative$1(root$2, "Set"); var _Set = Set$1; var getNative = _getNative, root$1 = _root; var WeakMap$1 = getNative(root$1, "WeakMap"); var _WeakMap = WeakMap$1; var DataView = _DataView, Map$1 = _Map, Promise$1 = _Promise, Set = _Set, WeakMap2 = _WeakMap, baseGetTag = _baseGetTag, toSource = _toSource; var mapTag$3 = "[object Map]", objectTag$1 = "[object Object]", promiseTag = "[object Promise]", setTag$3 = "[object Set]", weakMapTag$1 = "[object WeakMap]"; var dataViewTag$2 = "[object DataView]"; var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map$1), promiseCtorString = toSource(Promise$1), setCtorString = toSource(Set), weakMapCtorString = toSource(WeakMap2); var getTag$3 = baseGetTag; if (DataView && getTag$3(new DataView(new ArrayBuffer(1))) != dataViewTag$2 || Map$1 && getTag$3(new Map$1()) != mapTag$3 || Promise$1 && getTag$3(Promise$1.resolve()) != promiseTag || Set && getTag$3(new Set()) != setTag$3 || WeakMap2 && getTag$3(new WeakMap2()) != weakMapTag$1) { getTag$3 = function(value) { var result = baseGetTag(value), Ctor = result == objectTag$1 ? value.constructor : void 0, ctorString = Ctor ? toSource(Ctor) : ""; if (ctorString) { switch (ctorString) { case dataViewCtorString: return dataViewTag$2; case mapCtorString: return mapTag$3; case promiseCtorString: return promiseTag; case setCtorString: return setTag$3; case weakMapCtorString: return weakMapTag$1; } } return result; }; } var _getTag = getTag$3; var objectProto = Object.prototype; var hasOwnProperty = objectProto.hasOwnProperty; function initCloneArray$1(array) { var length = array.length, result = new array.constructor(length); if (length && typeof array[0] == "string" && hasOwnProperty.call(array, "index")) { result.index = array.index; result.input = array.input; } return result; } var _initCloneArray = initCloneArray$1; var root = _root; var Uint8Array$1 = root.Uint8Array; var _Uint8Array = Uint8Array$1; var Uint8Array2 = _Uint8Array; function cloneArrayBuffer$3(arrayBuffer) { var result = new arrayBuffer.constructor(arrayBuffer.byteLength); new Uint8Array2(result).set(new Uint8Array2(arrayBuffer)); return result; } var _cloneArrayBuffer = cloneArrayBuffer$3; var cloneArrayBuffer$2 = _cloneArrayBuffer; function cloneDataView$1(dataView, isDeep) { var buffer = isDeep ? cloneArrayBuffer$2(dataView.buffer) : dataView.buffer; return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); } var _cloneDataView = cloneDataView$1; var reFlags = /\w*$/; function cloneRegExp$1(regexp) { var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); result.lastIndex = regexp.lastIndex; return result; } var _cloneRegExp = cloneRegExp$1; var Symbol$1 = _Symbol; var symbolProto = Symbol$1 ? Symbol$1.prototype : void 0, symbolValueOf = symbolProto ? symbolProto.valueOf : void 0; function cloneSymbol$1(symbol) { return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; } var _cloneSymbol = cloneSymbol$1; var cloneArrayBuffer$1 = _cloneArrayBuffer; function cloneTypedArray$1(typedArray, isDeep) { var buffer = isDeep ? cloneArrayBuffer$1(typedArray.buffer) : typedArray.buffer; return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); } var _cloneTypedArray = cloneTypedArray$1; var cloneArrayBuffer = _cloneArrayBuffer, cloneDataView = _cloneDataView, cloneRegExp = _cloneRegExp, cloneSymbol = _cloneSymbol, cloneTypedArray = _cloneTypedArray; var boolTag$1 = "[object Boolean]", dateTag$1 = "[object Date]", mapTag$2 = "[object Map]", numberTag$1 = "[object Number]", regexpTag$1 = "[object RegExp]", setTag$2 = "[object Set]", stringTag$1 = "[object String]", symbolTag$1 = "[object Symbol]"; var arrayBufferTag$1 = "[object ArrayBuffer]", dataViewTag$1 = "[object DataView]", float32Tag$1 = "[object Float32Array]", float64Tag$1 = "[object Float64Array]", int8Tag$1 = "[object Int8Array]", int16Tag$1 = "[object Int16Array]", int32Tag$1 = "[object Int32Array]", uint8Tag$1 = "[object Uint8Array]", uint8ClampedTag$1 = "[object Uint8ClampedArray]", uint16Tag$1 = "[object Uint16Array]", uint32Tag$1 = "[object Uint32Array]"; function initCloneByTag$1(object, tag, isDeep) { var Ctor = object.constructor; switch (tag) { case arrayBufferTag$1: return cloneArrayBuffer(object); case boolTag$1: case dateTag$1: return new Ctor(+object); case dataViewTag$1: return cloneDataView(object, isDeep); case float32Tag$1: case float64Tag$1: case int8Tag$1: case int16Tag$1: case int32Tag$1: case uint8Tag$1: case uint8ClampedTag$1: case uint16Tag$1: case uint32Tag$1: return cloneTypedArray(object, isDeep); case mapTag$2: return new Ctor(); case numberTag$1: case stringTag$1: return new Ctor(object); case regexpTag$1: return cloneRegExp(object); case setTag$2: return new Ctor(); case symbolTag$1: return cloneSymbol(object); } } var _initCloneByTag = initCloneByTag$1; var isObject$2 = isObject_1; var objectCreate = Object.create; var baseCreate$1 = function() { function object() { } return function(proto) { if (!isObject$2(proto)) { return {}; } if (objectCreate) { return objectCreate(proto); } object.prototype = proto; var result = new object(); object.prototype = void 0; return result; }; }(); var _baseCreate = baseCreate$1; var baseCreate = _baseCreate, getPrototype = _getPrototype, isPrototype = _isPrototype; function initCloneObject$1(object) { return typeof object.constructor == "function" && !isPrototype(object) ? baseCreate(getPrototype(object)) : {}; } var _initCloneObject = initCloneObject$1; var getTag$2 = _getTag, isObjectLike$1 = isObjectLike_1; var mapTag$1 = "[object Map]"; function baseIsMap$1(value) { return isObjectLike$1(value) && getTag$2(value) == mapTag$1; } var _baseIsMap = baseIsMap$1; var baseIsMap = _baseIsMap, baseUnary$1 = _baseUnary, nodeUtil$1 = _nodeUtil.exports; var nodeIsMap = nodeUtil$1 && nodeUtil$1.isMap; var isMap$1 = nodeIsMap ? baseUnary$1(nodeIsMap) : baseIsMap; var isMap_1 = isMap$1; var getTag$1 = _getTag, isObjectLike = isObjectLike_1; var setTag$1 = "[object Set]"; function baseIsSet$1(value) { return isObjectLike(value) && getTag$1(value) == setTag$1; } var _baseIsSet = baseIsSet$1; var baseIsSet = _baseIsSet, baseUnary = _baseUnary, nodeUtil = _nodeUtil.exports; var nodeIsSet = nodeUtil && nodeUtil.isSet; var isSet$1 = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet; var isSet_1 = isSet$1; var Stack = _Stack, arrayEach = _arrayEach, assignValue = _assignValue, baseAssign = _baseAssign, baseAssignIn = _baseAssignIn, cloneBuffer = _cloneBuffer.exports, copyArray = _copyArray, copySymbols = _copySymbols, copySymbolsIn = _copySymbolsIn, getAllKeys = _getAllKeys, getAllKeysIn = _getAllKeysIn, getTag = _getTag, initCloneArray = _initCloneArray, initCloneByTag = _initCloneByTag, initCloneObject = _initCloneObject, isArray = isArray_1, isBuffer = isBuffer$2.exports, isMap = isMap_1, isObject$1 = isObject_1, isSet = isSet_1, keys = keys_1, keysIn = keysIn_1; var CLONE_DEEP_FLAG$1 = 1, CLONE_FLAT_FLAG = 2, CLONE_SYMBOLS_FLAG$1 = 4; var argsTag = "[object Arguments]", arrayTag = "[object Array]", boolTag = "[object Boolean]", dateTag = "[object Date]", errorTag = "[object Error]", funcTag = "[object Function]", genTag = "[object GeneratorFunction]", mapTag = "[object Map]", numberTag = "[object Number]", objectTag = "[object Object]", regexpTag = "[object RegExp]", setTag = "[object Set]", stringTag = "[object String]", symbolTag = "[object Symbol]", weakMapTag = "[object WeakMap]"; var arrayBufferTag = "[object ArrayBuffer]", dataViewTag = "[object DataView]", float32Tag = "[object Float32Array]", float64Tag = "[object Float64Array]", int8Tag = "[object Int8Array]", int16Tag = "[object Int16Array]", int32Tag = "[object Int32Array]", uint8Tag = "[object Uint8Array]", uint8ClampedTag = "[object Uint8ClampedArray]", uint16Tag = "[object Uint16Array]", uint32Tag = "[object Uint32Array]"; var cloneableTags = {}; cloneableTags[argsTag] = cloneableTags[arrayTag] = cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = cloneableTags[boolTag] = cloneableTags[dateTag] = cloneableTags[float32Tag] = cloneableTags[float64Tag] = cloneableTags[int8Tag] = cloneableTags[int16Tag] = cloneableTags[int32Tag] = cloneableTags[mapTag] = cloneableTags[numberTag] = cloneableTags[objectTag] = cloneableTags[regexpTag] = cloneableTags[setTag] = cloneableTags[stringTag] = cloneableTags[symbolTag] = cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; cloneableTags[errorTag] = cloneableTags[funcTag] = cloneableTags[weakMapTag] = false; function baseClone$1(value, bitmask, customizer, key, object, stack) { var result, isDeep = bitmask & CLONE_DEEP_FLAG$1, isFlat = bitmask & CLONE_FLAT_FLAG, isFull = bitmask & CLONE_SYMBOLS_FLAG$1; if (customizer) { result = object ? customizer(value, key, object, stack) : customizer(value); } if (result !== void 0) { return result; } if (!isObject$1(value)) { return value; } var isArr = isArray(value); if (isArr) { result = initCloneArray(value); if (!isDeep) { return copyArray(value, result); } } else { var tag = getTag(value), isFunc = tag == funcTag || tag == genTag; if (isBuffer(value)) { return cloneBuffer(value, isDeep); } if (tag == objectTag || tag == argsTag || isFunc && !object) { result = isFlat || isFunc ? {} : initCloneObject(value); if (!isDeep) { return isFlat ? copySymbolsIn(value, baseAssignIn(result, value)) : copySymbols(value, baseAssign(result, value)); } } else { if (!cloneableTags[tag]) { return object ? value : {}; } result = initCloneByTag(value, tag, isDeep); } } stack || (stack = new Stack()); var stacked = stack.get(value); if (stacked) { return stacked; } stack.set(value, result); if (isSet(value)) { value.forEach(function(subValue) { result.add(baseClone$1(subValue, bitmask, customizer, subValue, value, stack)); }); } else if (isMap(value)) { value.forEach(function(subValue, key2) { result.set(key2, baseClone$1(subValue, bitmask, customizer, key2, value, stack)); }); } var keysFunc = isFull ? isFlat ? getAllKeysIn : getAllKeys : isFlat ? keysIn : keys; var props = isArr ? void 0 : keysFunc(value); arrayEach(props || value, function(subValue, key2) { if (props) { key2 = subValue; subValue = value[key2]; } assignValue(result, key2, baseClone$1(subValue, bitmask, customizer, key2, value, stack)); }); return result; } var _baseClone = baseClone$1; var baseClone = _baseClone; var CLONE_DEEP_FLAG = 1, CLONE_SYMBOLS_FLAG = 4; function cloneDeep(value) { return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG); } var cloneDeep_1 = cloneDeep; const UNDO_ICON = `<svg width="16px" height="14px" viewBox="0 0 16 14"> <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> <g fill="#293040"> <path d="M11,5 C13.7614237,5 16,7.23857625 16,10 C16,12.7614237 13.7614237,15 11,15 L7,15 L7,14 L11,14 C13.209139,14 15,12.209139 15,10 C15,7.790861 13.209139,6 11,6 L5,6 L5,10 L0,5.5 L5,1 L5,5 L11,5 Z" id="\u8DEF\u5F84"></path> </g> </g> </svg>`; const REDO_ICON = `<svg width="16px" height="14px" viewBox="0 0 16 14"> <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> <g fill="#293040"> <path d="M5,5 L11,5 L11,1 L16,5.5 L11,10 L11,6 L5,6 C2.790861,6 1,7.790861 1,10 C1,12.209139 2.790861,14 5,14 L9,14 L9,15 L5,15 C2.23857625,15 0,12.7614237 0,10 C0,7.23857625 2.23857625,5 5,5 Z" id="\u8DEF\u5F84"></path> </g> </g> </svg>`; const BOLD_ICON = `<svg width="16px" height="16px" viewBox="0 0 16 16"> <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> <g fill="#293040"> <path d="M14,11 C14,13.7614237 11.7614237,16 9,16 L2,16 L2,0 L8,0 C10.209139,-4.05812251e-16 12,1.790861 12,4 C12,4.93647913 11.6781808,5.79779336 11.1391019,6.4793831 C12.8303741,7.28108833 14,9.00395379 14,11 Z M9,8 L4,8 L4,14 L9,14 C10.6568542,14 12,12.6568542 12,11 C12,9.34314575 10.6568542,8 9,8 Z M8,6 C9.1045695,6 10,5.1045695 10,4 C10,2.8954305 9.1045695,2 8,2 L4,2 L4,6 L8,6 Z" id="\u5F62\u72B6"></path> </g> </g> </svg>`; const ITALIC_ICON = `<svg width="16px" height="16px" viewBox="0 0 16 16"> <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> <g fill="#293040"> <polygon id="\u8DEF\u5F84" points="6 15 9 1 6 1 6 0 13 0 13 1 10 1 7 15 10 15 10 16 3 16 3 15"></polygon> </g> </g> </svg>`; const UNDERLINE_ICON = `<svg width="16px" height="16px" viewBox="0 0 16 16"> <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> <g fill="#293040"> <path d="M4,0 L4,7 C4,9.209139 5.790861,11 8,11 C10.209139,11 12,9.209139 12,7 L12,0 L13,0 L13,7 C13,9.76142375 10.7614237,12 8,12 C5.23857625,12 3,9.76142375 3,7 L3,0 L4,0 Z M2,14 L14,14 L14,16 L2,16 L2,14 Z" id="\u5F62\u72B6"></path> </g> </g> </svg>`; const STRIKE_ICON = `<svg width="16px" height="16px" viewBox="0 0 16 16"> <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> <g fill="#293040"> <path d="M16,8 L16,10 L11.4648712,10 C11.8052114,10.5883467 12,11.2714257 12,12 C12,14.209139 10.209139,16 8,16 C5.790861,16 4,14.209139 4,12 C4,11.6547004 4.043753,11.3196199 4.12601749,11 L5.17070571,11 C5.06015422,11.3127789 5,11.6493646 5,12 C5,13.6568542 6.34314575,15 8,15 C9.65685425,15 11,13.6568542 11,12 C11,11.2316456 10.7111464,10.5307565 10.2361065,10 L0,10 L0,8 L5.3541756,8 C4.52375489,7.26705555 4,6.19469253 4,5 C4,2.790861 5.790861,1 8,1 C10.209139,1 12,2.790861 12,5 C12,5.72857429 11.8052114,6.41165327 11.4648712,7 L10.2361065,7 C10.7111464,6.46924351 11,5.76835444 11,5 C11,3.34314575 9.65685425,2 8,2 C6.34314575,2 5,3.34314575 5,5 C5,6.65685425 6.34314575,8 8,8 L16,8 Z M4.53512878,10 L5.76389349,10 L4.53512878,10 L4.53512878,10 Z" id="\u5F62\u72B6"></path> </g> </g> </svg>`; const COLOR_ICON = `<svg width="16px" height="16px" viewBox="0 0 16 16"> <g id="edit-icon/background-color" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> <g fill="#293040"> <g> <path d="M10.4761905,8 L5.52380952,8 L4,12 L3,12 L7.5,-3.84581256e-13 L8.5,-3.84581256e-13 L13,12 L12,12 L10.4761905,8 L10.4761905,8 Z M10.0952381,7 L8,1.5 L5.9047619,7 L10.0952381,7 Z M2,14 L14,14 L14,16 L2,16 L2,14 Z" id="\u5F62\u72B6"></path> </g> </g> </g> </svg>`; const LIST_UNORDERED_ICON = `<svg width="16px" height="16px" viewBox="0 0 16 16"> <g id="edit-icon/unordered-list" stroke