删除后台自带的客户端文件
|
Before Width: | Height: | Size: 37 KiB |
|
Before Width: | Height: | Size: 37 KiB |
@@ -1,17 +0,0 @@
|
||||
function _extends() {
|
||||
_extends = Object.assign ? Object.assign.bind() : function(target) {
|
||||
for (var i = 1; i < arguments.length; i++) {
|
||||
var source = arguments[i];
|
||||
for (var key in source) {
|
||||
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
||||
target[key] = source[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
return target;
|
||||
};
|
||||
return _extends.apply(this, arguments);
|
||||
}
|
||||
export {
|
||||
_extends as _
|
||||
};
|
||||
@@ -1,79 +0,0 @@
|
||||
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
||||
function getDefaultExportFromCjs(x) {
|
||||
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
||||
}
|
||||
function getAugmentedNamespace(n) {
|
||||
if (n.__esModule)
|
||||
return n;
|
||||
var f = n.default;
|
||||
if (typeof f == "function") {
|
||||
var a = function a2() {
|
||||
if (this instanceof a2) {
|
||||
return Reflect.construct(f, arguments, this.constructor);
|
||||
}
|
||||
return f.apply(this, arguments);
|
||||
};
|
||||
a.prototype = f.prototype;
|
||||
} else
|
||||
a = {};
|
||||
Object.defineProperty(a, "__esModule", { value: true });
|
||||
Object.keys(n).forEach(function(k) {
|
||||
var d = Object.getOwnPropertyDescriptor(n, k);
|
||||
Object.defineProperty(a, k, d.get ? d : {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return n[k];
|
||||
}
|
||||
});
|
||||
});
|
||||
return a;
|
||||
}
|
||||
var dist = {};
|
||||
(function(exports) {
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.sanitizeUrl = exports.BLANK_URL = void 0;
|
||||
var invalidProtocolRegex = /^([^\w]*)(javascript|data|vbscript)/im;
|
||||
var htmlEntitiesRegex = /&#(\w+)(^\w|;)?/g;
|
||||
var htmlCtrlEntityRegex = /&(newline|tab);/gi;
|
||||
var ctrlCharactersRegex = /[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim;
|
||||
var urlSchemeRegex = /^.+(:|:)/gim;
|
||||
var relativeFirstCharacters = [".", "/"];
|
||||
exports.BLANK_URL = "about:blank";
|
||||
function isRelativeUrlWithoutProtocol(url) {
|
||||
return relativeFirstCharacters.indexOf(url[0]) > -1;
|
||||
}
|
||||
function decodeHtmlCharacters(str) {
|
||||
var removedNullByte = str.replace(ctrlCharactersRegex, "");
|
||||
return removedNullByte.replace(htmlEntitiesRegex, function(match, dec) {
|
||||
return String.fromCharCode(dec);
|
||||
});
|
||||
}
|
||||
function sanitizeUrl(url) {
|
||||
if (!url) {
|
||||
return exports.BLANK_URL;
|
||||
}
|
||||
var sanitizedUrl = decodeHtmlCharacters(url).replace(htmlCtrlEntityRegex, "").replace(ctrlCharactersRegex, "").trim();
|
||||
if (!sanitizedUrl) {
|
||||
return exports.BLANK_URL;
|
||||
}
|
||||
if (isRelativeUrlWithoutProtocol(sanitizedUrl)) {
|
||||
return sanitizedUrl;
|
||||
}
|
||||
var urlSchemeParseResults = sanitizedUrl.match(urlSchemeRegex);
|
||||
if (!urlSchemeParseResults) {
|
||||
return sanitizedUrl;
|
||||
}
|
||||
var urlScheme = urlSchemeParseResults[0];
|
||||
if (invalidProtocolRegex.test(urlScheme)) {
|
||||
return exports.BLANK_URL;
|
||||
}
|
||||
return sanitizedUrl;
|
||||
}
|
||||
exports.sanitizeUrl = sanitizeUrl;
|
||||
})(dist);
|
||||
export {
|
||||
getAugmentedNamespace as a,
|
||||
commonjsGlobal as c,
|
||||
dist as d,
|
||||
getDefaultExportFromCjs as g
|
||||
};
|
||||
@@ -1,886 +0,0 @@
|
||||
function bound01(n, max) {
|
||||
if (isOnePointZero(n)) {
|
||||
n = "100%";
|
||||
}
|
||||
var isPercent = isPercentage(n);
|
||||
n = max === 360 ? n : Math.min(max, Math.max(0, parseFloat(n)));
|
||||
if (isPercent) {
|
||||
n = parseInt(String(n * max), 10) / 100;
|
||||
}
|
||||
if (Math.abs(n - max) < 1e-6) {
|
||||
return 1;
|
||||
}
|
||||
if (max === 360) {
|
||||
n = (n < 0 ? n % max + max : n % max) / parseFloat(String(max));
|
||||
} else {
|
||||
n = n % max / parseFloat(String(max));
|
||||
}
|
||||
return n;
|
||||
}
|
||||
function clamp01(val) {
|
||||
return Math.min(1, Math.max(0, val));
|
||||
}
|
||||
function isOnePointZero(n) {
|
||||
return typeof n === "string" && n.indexOf(".") !== -1 && parseFloat(n) === 1;
|
||||
}
|
||||
function isPercentage(n) {
|
||||
return typeof n === "string" && n.indexOf("%") !== -1;
|
||||
}
|
||||
function boundAlpha(a) {
|
||||
a = parseFloat(a);
|
||||
if (isNaN(a) || a < 0 || a > 1) {
|
||||
a = 1;
|
||||
}
|
||||
return a;
|
||||
}
|
||||
function convertToPercentage(n) {
|
||||
if (n <= 1) {
|
||||
return "".concat(Number(n) * 100, "%");
|
||||
}
|
||||
return n;
|
||||
}
|
||||
function pad2(c) {
|
||||
return c.length === 1 ? "0" + c : String(c);
|
||||
}
|
||||
function rgbToRgb(r, g, b) {
|
||||
return {
|
||||
r: bound01(r, 255) * 255,
|
||||
g: bound01(g, 255) * 255,
|
||||
b: bound01(b, 255) * 255
|
||||
};
|
||||
}
|
||||
function rgbToHsl(r, g, b) {
|
||||
r = bound01(r, 255);
|
||||
g = bound01(g, 255);
|
||||
b = bound01(b, 255);
|
||||
var max = Math.max(r, g, b);
|
||||
var min = Math.min(r, g, b);
|
||||
var h = 0;
|
||||
var s = 0;
|
||||
var l = (max + min) / 2;
|
||||
if (max === min) {
|
||||
s = 0;
|
||||
h = 0;
|
||||
} else {
|
||||
var d = max - min;
|
||||
s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
|
||||
switch (max) {
|
||||
case r:
|
||||
h = (g - b) / d + (g < b ? 6 : 0);
|
||||
break;
|
||||
case g:
|
||||
h = (b - r) / d + 2;
|
||||
break;
|
||||
case b:
|
||||
h = (r - g) / d + 4;
|
||||
break;
|
||||
}
|
||||
h /= 6;
|
||||
}
|
||||
return { h, s, l };
|
||||
}
|
||||
function hue2rgb(p, q, t) {
|
||||
if (t < 0) {
|
||||
t += 1;
|
||||
}
|
||||
if (t > 1) {
|
||||
t -= 1;
|
||||
}
|
||||
if (t < 1 / 6) {
|
||||
return p + (q - p) * (6 * t);
|
||||
}
|
||||
if (t < 1 / 2) {
|
||||
return q;
|
||||
}
|
||||
if (t < 2 / 3) {
|
||||
return p + (q - p) * (2 / 3 - t) * 6;
|
||||
}
|
||||
return p;
|
||||
}
|
||||
function hslToRgb(h, s, l) {
|
||||
var r;
|
||||
var g;
|
||||
var b;
|
||||
h = bound01(h, 360);
|
||||
s = bound01(s, 100);
|
||||
l = bound01(l, 100);
|
||||
if (s === 0) {
|
||||
g = l;
|
||||
b = l;
|
||||
r = l;
|
||||
} else {
|
||||
var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
|
||||
var p = 2 * l - q;
|
||||
r = hue2rgb(p, q, h + 1 / 3);
|
||||
g = hue2rgb(p, q, h);
|
||||
b = hue2rgb(p, q, h - 1 / 3);
|
||||
}
|
||||
return { r: r * 255, g: g * 255, b: b * 255 };
|
||||
}
|
||||
function rgbToHsv(r, g, b) {
|
||||
r = bound01(r, 255);
|
||||
g = bound01(g, 255);
|
||||
b = bound01(b, 255);
|
||||
var max = Math.max(r, g, b);
|
||||
var min = Math.min(r, g, b);
|
||||
var h = 0;
|
||||
var v = max;
|
||||
var d = max - min;
|
||||
var s = max === 0 ? 0 : d / max;
|
||||
if (max === min) {
|
||||
h = 0;
|
||||
} else {
|
||||
switch (max) {
|
||||
case r:
|
||||
h = (g - b) / d + (g < b ? 6 : 0);
|
||||
break;
|
||||
case g:
|
||||
h = (b - r) / d + 2;
|
||||
break;
|
||||
case b:
|
||||
h = (r - g) / d + 4;
|
||||
break;
|
||||
}
|
||||
h /= 6;
|
||||
}
|
||||
return { h, s, v };
|
||||
}
|
||||
function hsvToRgb(h, s, v) {
|
||||
h = bound01(h, 360) * 6;
|
||||
s = bound01(s, 100);
|
||||
v = bound01(v, 100);
|
||||
var i = Math.floor(h);
|
||||
var f = h - i;
|
||||
var p = v * (1 - s);
|
||||
var q = v * (1 - f * s);
|
||||
var t = v * (1 - (1 - f) * s);
|
||||
var mod = i % 6;
|
||||
var r = [v, q, p, p, t, v][mod];
|
||||
var g = [t, v, v, q, p, p][mod];
|
||||
var b = [p, p, t, v, v, q][mod];
|
||||
return { r: r * 255, g: g * 255, b: b * 255 };
|
||||
}
|
||||
function rgbToHex(r, g, b, allow3Char) {
|
||||
var hex = [
|
||||
pad2(Math.round(r).toString(16)),
|
||||
pad2(Math.round(g).toString(16)),
|
||||
pad2(Math.round(b).toString(16))
|
||||
];
|
||||
if (allow3Char && hex[0].startsWith(hex[0].charAt(1)) && hex[1].startsWith(hex[1].charAt(1)) && hex[2].startsWith(hex[2].charAt(1))) {
|
||||
return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0);
|
||||
}
|
||||
return hex.join("");
|
||||
}
|
||||
function rgbaToHex(r, g, b, a, allow4Char) {
|
||||
var hex = [
|
||||
pad2(Math.round(r).toString(16)),
|
||||
pad2(Math.round(g).toString(16)),
|
||||
pad2(Math.round(b).toString(16)),
|
||||
pad2(convertDecimalToHex(a))
|
||||
];
|
||||
if (allow4Char && hex[0].startsWith(hex[0].charAt(1)) && hex[1].startsWith(hex[1].charAt(1)) && hex[2].startsWith(hex[2].charAt(1)) && hex[3].startsWith(hex[3].charAt(1))) {
|
||||
return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0);
|
||||
}
|
||||
return hex.join("");
|
||||
}
|
||||
function convertDecimalToHex(d) {
|
||||
return Math.round(parseFloat(d) * 255).toString(16);
|
||||
}
|
||||
function convertHexToDecimal(h) {
|
||||
return parseIntFromHex(h) / 255;
|
||||
}
|
||||
function parseIntFromHex(val) {
|
||||
return parseInt(val, 16);
|
||||
}
|
||||
function numberInputToObject(color) {
|
||||
return {
|
||||
r: color >> 16,
|
||||
g: (color & 65280) >> 8,
|
||||
b: color & 255
|
||||
};
|
||||
}
|
||||
var names = {
|
||||
aliceblue: "#f0f8ff",
|
||||
antiquewhite: "#faebd7",
|
||||
aqua: "#00ffff",
|
||||
aquamarine: "#7fffd4",
|
||||
azure: "#f0ffff",
|
||||
beige: "#f5f5dc",
|
||||
bisque: "#ffe4c4",
|
||||
black: "#000000",
|
||||
blanchedalmond: "#ffebcd",
|
||||
blue: "#0000ff",
|
||||
blueviolet: "#8a2be2",
|
||||
brown: "#a52a2a",
|
||||
burlywood: "#deb887",
|
||||
cadetblue: "#5f9ea0",
|
||||
chartreuse: "#7fff00",
|
||||
chocolate: "#d2691e",
|
||||
coral: "#ff7f50",
|
||||
cornflowerblue: "#6495ed",
|
||||
cornsilk: "#fff8dc",
|
||||
crimson: "#dc143c",
|
||||
cyan: "#00ffff",
|
||||
darkblue: "#00008b",
|
||||
darkcyan: "#008b8b",
|
||||
darkgoldenrod: "#b8860b",
|
||||
darkgray: "#a9a9a9",
|
||||
darkgreen: "#006400",
|
||||
darkgrey: "#a9a9a9",
|
||||
darkkhaki: "#bdb76b",
|
||||
darkmagenta: "#8b008b",
|
||||
darkolivegreen: "#556b2f",
|
||||
darkorange: "#ff8c00",
|
||||
darkorchid: "#9932cc",
|
||||
darkred: "#8b0000",
|
||||
darksalmon: "#e9967a",
|
||||
darkseagreen: "#8fbc8f",
|
||||
darkslateblue: "#483d8b",
|
||||
darkslategray: "#2f4f4f",
|
||||
darkslategrey: "#2f4f4f",
|
||||
darkturquoise: "#00ced1",
|
||||
darkviolet: "#9400d3",
|
||||
deeppink: "#ff1493",
|
||||
deepskyblue: "#00bfff",
|
||||
dimgray: "#696969",
|
||||
dimgrey: "#696969",
|
||||
dodgerblue: "#1e90ff",
|
||||
firebrick: "#b22222",
|
||||
floralwhite: "#fffaf0",
|
||||
forestgreen: "#228b22",
|
||||
fuchsia: "#ff00ff",
|
||||
gainsboro: "#dcdcdc",
|
||||
ghostwhite: "#f8f8ff",
|
||||
goldenrod: "#daa520",
|
||||
gold: "#ffd700",
|
||||
gray: "#808080",
|
||||
green: "#008000",
|
||||
greenyellow: "#adff2f",
|
||||
grey: "#808080",
|
||||
honeydew: "#f0fff0",
|
||||
hotpink: "#ff69b4",
|
||||
indianred: "#cd5c5c",
|
||||
indigo: "#4b0082",
|
||||
ivory: "#fffff0",
|
||||
khaki: "#f0e68c",
|
||||
lavenderblush: "#fff0f5",
|
||||
lavender: "#e6e6fa",
|
||||
lawngreen: "#7cfc00",
|
||||
lemonchiffon: "#fffacd",
|
||||
lightblue: "#add8e6",
|
||||
lightcoral: "#f08080",
|
||||
lightcyan: "#e0ffff",
|
||||
lightgoldenrodyellow: "#fafad2",
|
||||
lightgray: "#d3d3d3",
|
||||
lightgreen: "#90ee90",
|
||||
lightgrey: "#d3d3d3",
|
||||
lightpink: "#ffb6c1",
|
||||
lightsalmon: "#ffa07a",
|
||||
lightseagreen: "#20b2aa",
|
||||
lightskyblue: "#87cefa",
|
||||
lightslategray: "#778899",
|
||||
lightslategrey: "#778899",
|
||||
lightsteelblue: "#b0c4de",
|
||||
lightyellow: "#ffffe0",
|
||||
lime: "#00ff00",
|
||||
limegreen: "#32cd32",
|
||||
linen: "#faf0e6",
|
||||
magenta: "#ff00ff",
|
||||
maroon: "#800000",
|
||||
mediumaquamarine: "#66cdaa",
|
||||
mediumblue: "#0000cd",
|
||||
mediumorchid: "#ba55d3",
|
||||
mediumpurple: "#9370db",
|
||||
mediumseagreen: "#3cb371",
|
||||
mediumslateblue: "#7b68ee",
|
||||
mediumspringgreen: "#00fa9a",
|
||||
mediumturquoise: "#48d1cc",
|
||||
mediumvioletred: "#c71585",
|
||||
midnightblue: "#191970",
|
||||
mintcream: "#f5fffa",
|
||||
mistyrose: "#ffe4e1",
|
||||
moccasin: "#ffe4b5",
|
||||
navajowhite: "#ffdead",
|
||||
navy: "#000080",
|
||||
oldlace: "#fdf5e6",
|
||||
olive: "#808000",
|
||||
olivedrab: "#6b8e23",
|
||||
orange: "#ffa500",
|
||||
orangered: "#ff4500",
|
||||
orchid: "#da70d6",
|
||||
palegoldenrod: "#eee8aa",
|
||||
palegreen: "#98fb98",
|
||||
paleturquoise: "#afeeee",
|
||||
palevioletred: "#db7093",
|
||||
papayawhip: "#ffefd5",
|
||||
peachpuff: "#ffdab9",
|
||||
peru: "#cd853f",
|
||||
pink: "#ffc0cb",
|
||||
plum: "#dda0dd",
|
||||
powderblue: "#b0e0e6",
|
||||
purple: "#800080",
|
||||
rebeccapurple: "#663399",
|
||||
red: "#ff0000",
|
||||
rosybrown: "#bc8f8f",
|
||||
royalblue: "#4169e1",
|
||||
saddlebrown: "#8b4513",
|
||||
salmon: "#fa8072",
|
||||
sandybrown: "#f4a460",
|
||||
seagreen: "#2e8b57",
|
||||
seashell: "#fff5ee",
|
||||
sienna: "#a0522d",
|
||||
silver: "#c0c0c0",
|
||||
skyblue: "#87ceeb",
|
||||
slateblue: "#6a5acd",
|
||||
slategray: "#708090",
|
||||
slategrey: "#708090",
|
||||
snow: "#fffafa",
|
||||
springgreen: "#00ff7f",
|
||||
steelblue: "#4682b4",
|
||||
tan: "#d2b48c",
|
||||
teal: "#008080",
|
||||
thistle: "#d8bfd8",
|
||||
tomato: "#ff6347",
|
||||
turquoise: "#40e0d0",
|
||||
violet: "#ee82ee",
|
||||
wheat: "#f5deb3",
|
||||
white: "#ffffff",
|
||||
whitesmoke: "#f5f5f5",
|
||||
yellow: "#ffff00",
|
||||
yellowgreen: "#9acd32"
|
||||
};
|
||||
function inputToRGB(color) {
|
||||
var rgb = { r: 0, g: 0, b: 0 };
|
||||
var a = 1;
|
||||
var s = null;
|
||||
var v = null;
|
||||
var l = null;
|
||||
var ok = false;
|
||||
var format = false;
|
||||
if (typeof color === "string") {
|
||||
color = stringInputToObject(color);
|
||||
}
|
||||
if (typeof color === "object") {
|
||||
if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) {
|
||||
rgb = rgbToRgb(color.r, color.g, color.b);
|
||||
ok = true;
|
||||
format = String(color.r).substr(-1) === "%" ? "prgb" : "rgb";
|
||||
} else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v)) {
|
||||
s = convertToPercentage(color.s);
|
||||
v = convertToPercentage(color.v);
|
||||
rgb = hsvToRgb(color.h, s, v);
|
||||
ok = true;
|
||||
format = "hsv";
|
||||
} else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l)) {
|
||||
s = convertToPercentage(color.s);
|
||||
l = convertToPercentage(color.l);
|
||||
rgb = hslToRgb(color.h, s, l);
|
||||
ok = true;
|
||||
format = "hsl";
|
||||
}
|
||||
if (Object.prototype.hasOwnProperty.call(color, "a")) {
|
||||
a = color.a;
|
||||
}
|
||||
}
|
||||
a = boundAlpha(a);
|
||||
return {
|
||||
ok,
|
||||
format: color.format || format,
|
||||
r: Math.min(255, Math.max(rgb.r, 0)),
|
||||
g: Math.min(255, Math.max(rgb.g, 0)),
|
||||
b: Math.min(255, Math.max(rgb.b, 0)),
|
||||
a
|
||||
};
|
||||
}
|
||||
var CSS_INTEGER = "[-\\+]?\\d+%?";
|
||||
var CSS_NUMBER = "[-\\+]?\\d*\\.\\d+%?";
|
||||
var CSS_UNIT = "(?:".concat(CSS_NUMBER, ")|(?:").concat(CSS_INTEGER, ")");
|
||||
var PERMISSIVE_MATCH3 = "[\\s|\\(]+(".concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")\\s*\\)?");
|
||||
var PERMISSIVE_MATCH4 = "[\\s|\\(]+(".concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")\\s*\\)?");
|
||||
var matchers = {
|
||||
CSS_UNIT: new RegExp(CSS_UNIT),
|
||||
rgb: new RegExp("rgb" + PERMISSIVE_MATCH3),
|
||||
rgba: new RegExp("rgba" + PERMISSIVE_MATCH4),
|
||||
hsl: new RegExp("hsl" + PERMISSIVE_MATCH3),
|
||||
hsla: new RegExp("hsla" + PERMISSIVE_MATCH4),
|
||||
hsv: new RegExp("hsv" + PERMISSIVE_MATCH3),
|
||||
hsva: new RegExp("hsva" + PERMISSIVE_MATCH4),
|
||||
hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
|
||||
hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
|
||||
hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
|
||||
hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
|
||||
};
|
||||
function stringInputToObject(color) {
|
||||
color = color.trim().toLowerCase();
|
||||
if (color.length === 0) {
|
||||
return false;
|
||||
}
|
||||
var named = false;
|
||||
if (names[color]) {
|
||||
color = names[color];
|
||||
named = true;
|
||||
} else if (color === "transparent") {
|
||||
return { r: 0, g: 0, b: 0, a: 0, format: "name" };
|
||||
}
|
||||
var match = matchers.rgb.exec(color);
|
||||
if (match) {
|
||||
return { r: match[1], g: match[2], b: match[3] };
|
||||
}
|
||||
match = matchers.rgba.exec(color);
|
||||
if (match) {
|
||||
return { r: match[1], g: match[2], b: match[3], a: match[4] };
|
||||
}
|
||||
match = matchers.hsl.exec(color);
|
||||
if (match) {
|
||||
return { h: match[1], s: match[2], l: match[3] };
|
||||
}
|
||||
match = matchers.hsla.exec(color);
|
||||
if (match) {
|
||||
return { h: match[1], s: match[2], l: match[3], a: match[4] };
|
||||
}
|
||||
match = matchers.hsv.exec(color);
|
||||
if (match) {
|
||||
return { h: match[1], s: match[2], v: match[3] };
|
||||
}
|
||||
match = matchers.hsva.exec(color);
|
||||
if (match) {
|
||||
return { h: match[1], s: match[2], v: match[3], a: match[4] };
|
||||
}
|
||||
match = matchers.hex8.exec(color);
|
||||
if (match) {
|
||||
return {
|
||||
r: parseIntFromHex(match[1]),
|
||||
g: parseIntFromHex(match[2]),
|
||||
b: parseIntFromHex(match[3]),
|
||||
a: convertHexToDecimal(match[4]),
|
||||
format: named ? "name" : "hex8"
|
||||
};
|
||||
}
|
||||
match = matchers.hex6.exec(color);
|
||||
if (match) {
|
||||
return {
|
||||
r: parseIntFromHex(match[1]),
|
||||
g: parseIntFromHex(match[2]),
|
||||
b: parseIntFromHex(match[3]),
|
||||
format: named ? "name" : "hex"
|
||||
};
|
||||
}
|
||||
match = matchers.hex4.exec(color);
|
||||
if (match) {
|
||||
return {
|
||||
r: parseIntFromHex(match[1] + match[1]),
|
||||
g: parseIntFromHex(match[2] + match[2]),
|
||||
b: parseIntFromHex(match[3] + match[3]),
|
||||
a: convertHexToDecimal(match[4] + match[4]),
|
||||
format: named ? "name" : "hex8"
|
||||
};
|
||||
}
|
||||
match = matchers.hex3.exec(color);
|
||||
if (match) {
|
||||
return {
|
||||
r: parseIntFromHex(match[1] + match[1]),
|
||||
g: parseIntFromHex(match[2] + match[2]),
|
||||
b: parseIntFromHex(match[3] + match[3]),
|
||||
format: named ? "name" : "hex"
|
||||
};
|
||||
}
|
||||
return false;
|
||||
}
|
||||
function isValidCSSUnit(color) {
|
||||
return Boolean(matchers.CSS_UNIT.exec(String(color)));
|
||||
}
|
||||
var TinyColor = (
|
||||
/** @class */
|
||||
function() {
|
||||
function TinyColor2(color, opts) {
|
||||
if (color === void 0) {
|
||||
color = "";
|
||||
}
|
||||
if (opts === void 0) {
|
||||
opts = {};
|
||||
}
|
||||
var _a;
|
||||
if (color instanceof TinyColor2) {
|
||||
return color;
|
||||
}
|
||||
if (typeof color === "number") {
|
||||
color = numberInputToObject(color);
|
||||
}
|
||||
this.originalInput = color;
|
||||
var rgb = inputToRGB(color);
|
||||
this.originalInput = color;
|
||||
this.r = rgb.r;
|
||||
this.g = rgb.g;
|
||||
this.b = rgb.b;
|
||||
this.a = rgb.a;
|
||||
this.roundA = Math.round(100 * this.a) / 100;
|
||||
this.format = (_a = opts.format) !== null && _a !== void 0 ? _a : rgb.format;
|
||||
this.gradientType = opts.gradientType;
|
||||
if (this.r < 1) {
|
||||
this.r = Math.round(this.r);
|
||||
}
|
||||
if (this.g < 1) {
|
||||
this.g = Math.round(this.g);
|
||||
}
|
||||
if (this.b < 1) {
|
||||
this.b = Math.round(this.b);
|
||||
}
|
||||
this.isValid = rgb.ok;
|
||||
}
|
||||
TinyColor2.prototype.isDark = function() {
|
||||
return this.getBrightness() < 128;
|
||||
};
|
||||
TinyColor2.prototype.isLight = function() {
|
||||
return !this.isDark();
|
||||
};
|
||||
TinyColor2.prototype.getBrightness = function() {
|
||||
var rgb = this.toRgb();
|
||||
return (rgb.r * 299 + rgb.g * 587 + rgb.b * 114) / 1e3;
|
||||
};
|
||||
TinyColor2.prototype.getLuminance = function() {
|
||||
var rgb = this.toRgb();
|
||||
var R;
|
||||
var G;
|
||||
var B;
|
||||
var RsRGB = rgb.r / 255;
|
||||
var GsRGB = rgb.g / 255;
|
||||
var BsRGB = rgb.b / 255;
|
||||
if (RsRGB <= 0.03928) {
|
||||
R = RsRGB / 12.92;
|
||||
} else {
|
||||
R = Math.pow((RsRGB + 0.055) / 1.055, 2.4);
|
||||
}
|
||||
if (GsRGB <= 0.03928) {
|
||||
G = GsRGB / 12.92;
|
||||
} else {
|
||||
G = Math.pow((GsRGB + 0.055) / 1.055, 2.4);
|
||||
}
|
||||
if (BsRGB <= 0.03928) {
|
||||
B = BsRGB / 12.92;
|
||||
} else {
|
||||
B = Math.pow((BsRGB + 0.055) / 1.055, 2.4);
|
||||
}
|
||||
return 0.2126 * R + 0.7152 * G + 0.0722 * B;
|
||||
};
|
||||
TinyColor2.prototype.getAlpha = function() {
|
||||
return this.a;
|
||||
};
|
||||
TinyColor2.prototype.setAlpha = function(alpha) {
|
||||
this.a = boundAlpha(alpha);
|
||||
this.roundA = Math.round(100 * this.a) / 100;
|
||||
return this;
|
||||
};
|
||||
TinyColor2.prototype.isMonochrome = function() {
|
||||
var s = this.toHsl().s;
|
||||
return s === 0;
|
||||
};
|
||||
TinyColor2.prototype.toHsv = function() {
|
||||
var hsv = rgbToHsv(this.r, this.g, this.b);
|
||||
return { h: hsv.h * 360, s: hsv.s, v: hsv.v, a: this.a };
|
||||
};
|
||||
TinyColor2.prototype.toHsvString = function() {
|
||||
var hsv = rgbToHsv(this.r, this.g, this.b);
|
||||
var h = Math.round(hsv.h * 360);
|
||||
var s = Math.round(hsv.s * 100);
|
||||
var v = Math.round(hsv.v * 100);
|
||||
return this.a === 1 ? "hsv(".concat(h, ", ").concat(s, "%, ").concat(v, "%)") : "hsva(".concat(h, ", ").concat(s, "%, ").concat(v, "%, ").concat(this.roundA, ")");
|
||||
};
|
||||
TinyColor2.prototype.toHsl = function() {
|
||||
var hsl = rgbToHsl(this.r, this.g, this.b);
|
||||
return { h: hsl.h * 360, s: hsl.s, l: hsl.l, a: this.a };
|
||||
};
|
||||
TinyColor2.prototype.toHslString = function() {
|
||||
var hsl = rgbToHsl(this.r, this.g, this.b);
|
||||
var h = Math.round(hsl.h * 360);
|
||||
var s = Math.round(hsl.s * 100);
|
||||
var l = Math.round(hsl.l * 100);
|
||||
return this.a === 1 ? "hsl(".concat(h, ", ").concat(s, "%, ").concat(l, "%)") : "hsla(".concat(h, ", ").concat(s, "%, ").concat(l, "%, ").concat(this.roundA, ")");
|
||||
};
|
||||
TinyColor2.prototype.toHex = function(allow3Char) {
|
||||
if (allow3Char === void 0) {
|
||||
allow3Char = false;
|
||||
}
|
||||
return rgbToHex(this.r, this.g, this.b, allow3Char);
|
||||
};
|
||||
TinyColor2.prototype.toHexString = function(allow3Char) {
|
||||
if (allow3Char === void 0) {
|
||||
allow3Char = false;
|
||||
}
|
||||
return "#" + this.toHex(allow3Char);
|
||||
};
|
||||
TinyColor2.prototype.toHex8 = function(allow4Char) {
|
||||
if (allow4Char === void 0) {
|
||||
allow4Char = false;
|
||||
}
|
||||
return rgbaToHex(this.r, this.g, this.b, this.a, allow4Char);
|
||||
};
|
||||
TinyColor2.prototype.toHex8String = function(allow4Char) {
|
||||
if (allow4Char === void 0) {
|
||||
allow4Char = false;
|
||||
}
|
||||
return "#" + this.toHex8(allow4Char);
|
||||
};
|
||||
TinyColor2.prototype.toHexShortString = function(allowShortChar) {
|
||||
if (allowShortChar === void 0) {
|
||||
allowShortChar = false;
|
||||
}
|
||||
return this.a === 1 ? this.toHexString(allowShortChar) : this.toHex8String(allowShortChar);
|
||||
};
|
||||
TinyColor2.prototype.toRgb = function() {
|
||||
return {
|
||||
r: Math.round(this.r),
|
||||
g: Math.round(this.g),
|
||||
b: Math.round(this.b),
|
||||
a: this.a
|
||||
};
|
||||
};
|
||||
TinyColor2.prototype.toRgbString = function() {
|
||||
var r = Math.round(this.r);
|
||||
var g = Math.round(this.g);
|
||||
var b = Math.round(this.b);
|
||||
return this.a === 1 ? "rgb(".concat(r, ", ").concat(g, ", ").concat(b, ")") : "rgba(".concat(r, ", ").concat(g, ", ").concat(b, ", ").concat(this.roundA, ")");
|
||||
};
|
||||
TinyColor2.prototype.toPercentageRgb = function() {
|
||||
var fmt = function(x) {
|
||||
return "".concat(Math.round(bound01(x, 255) * 100), "%");
|
||||
};
|
||||
return {
|
||||
r: fmt(this.r),
|
||||
g: fmt(this.g),
|
||||
b: fmt(this.b),
|
||||
a: this.a
|
||||
};
|
||||
};
|
||||
TinyColor2.prototype.toPercentageRgbString = function() {
|
||||
var rnd = function(x) {
|
||||
return Math.round(bound01(x, 255) * 100);
|
||||
};
|
||||
return this.a === 1 ? "rgb(".concat(rnd(this.r), "%, ").concat(rnd(this.g), "%, ").concat(rnd(this.b), "%)") : "rgba(".concat(rnd(this.r), "%, ").concat(rnd(this.g), "%, ").concat(rnd(this.b), "%, ").concat(this.roundA, ")");
|
||||
};
|
||||
TinyColor2.prototype.toName = function() {
|
||||
if (this.a === 0) {
|
||||
return "transparent";
|
||||
}
|
||||
if (this.a < 1) {
|
||||
return false;
|
||||
}
|
||||
var hex = "#" + rgbToHex(this.r, this.g, this.b, false);
|
||||
for (var _i = 0, _a = Object.entries(names); _i < _a.length; _i++) {
|
||||
var _b = _a[_i], key = _b[0], value = _b[1];
|
||||
if (hex === value) {
|
||||
return key;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
};
|
||||
TinyColor2.prototype.toString = function(format) {
|
||||
var formatSet = Boolean(format);
|
||||
format = format !== null && format !== void 0 ? format : this.format;
|
||||
var formattedString = false;
|
||||
var hasAlpha = this.a < 1 && this.a >= 0;
|
||||
var needsAlphaFormat = !formatSet && hasAlpha && (format.startsWith("hex") || format === "name");
|
||||
if (needsAlphaFormat) {
|
||||
if (format === "name" && this.a === 0) {
|
||||
return this.toName();
|
||||
}
|
||||
return this.toRgbString();
|
||||
}
|
||||
if (format === "rgb") {
|
||||
formattedString = this.toRgbString();
|
||||
}
|
||||
if (format === "prgb") {
|
||||
formattedString = this.toPercentageRgbString();
|
||||
}
|
||||
if (format === "hex" || format === "hex6") {
|
||||
formattedString = this.toHexString();
|
||||
}
|
||||
if (format === "hex3") {
|
||||
formattedString = this.toHexString(true);
|
||||
}
|
||||
if (format === "hex4") {
|
||||
formattedString = this.toHex8String(true);
|
||||
}
|
||||
if (format === "hex8") {
|
||||
formattedString = this.toHex8String();
|
||||
}
|
||||
if (format === "name") {
|
||||
formattedString = this.toName();
|
||||
}
|
||||
if (format === "hsl") {
|
||||
formattedString = this.toHslString();
|
||||
}
|
||||
if (format === "hsv") {
|
||||
formattedString = this.toHsvString();
|
||||
}
|
||||
return formattedString || this.toHexString();
|
||||
};
|
||||
TinyColor2.prototype.toNumber = function() {
|
||||
return (Math.round(this.r) << 16) + (Math.round(this.g) << 8) + Math.round(this.b);
|
||||
};
|
||||
TinyColor2.prototype.clone = function() {
|
||||
return new TinyColor2(this.toString());
|
||||
};
|
||||
TinyColor2.prototype.lighten = function(amount) {
|
||||
if (amount === void 0) {
|
||||
amount = 10;
|
||||
}
|
||||
var hsl = this.toHsl();
|
||||
hsl.l += amount / 100;
|
||||
hsl.l = clamp01(hsl.l);
|
||||
return new TinyColor2(hsl);
|
||||
};
|
||||
TinyColor2.prototype.brighten = function(amount) {
|
||||
if (amount === void 0) {
|
||||
amount = 10;
|
||||
}
|
||||
var rgb = this.toRgb();
|
||||
rgb.r = Math.max(0, Math.min(255, rgb.r - Math.round(255 * -(amount / 100))));
|
||||
rgb.g = Math.max(0, Math.min(255, rgb.g - Math.round(255 * -(amount / 100))));
|
||||
rgb.b = Math.max(0, Math.min(255, rgb.b - Math.round(255 * -(amount / 100))));
|
||||
return new TinyColor2(rgb);
|
||||
};
|
||||
TinyColor2.prototype.darken = function(amount) {
|
||||
if (amount === void 0) {
|
||||
amount = 10;
|
||||
}
|
||||
var hsl = this.toHsl();
|
||||
hsl.l -= amount / 100;
|
||||
hsl.l = clamp01(hsl.l);
|
||||
return new TinyColor2(hsl);
|
||||
};
|
||||
TinyColor2.prototype.tint = function(amount) {
|
||||
if (amount === void 0) {
|
||||
amount = 10;
|
||||
}
|
||||
return this.mix("white", amount);
|
||||
};
|
||||
TinyColor2.prototype.shade = function(amount) {
|
||||
if (amount === void 0) {
|
||||
amount = 10;
|
||||
}
|
||||
return this.mix("black", amount);
|
||||
};
|
||||
TinyColor2.prototype.desaturate = function(amount) {
|
||||
if (amount === void 0) {
|
||||
amount = 10;
|
||||
}
|
||||
var hsl = this.toHsl();
|
||||
hsl.s -= amount / 100;
|
||||
hsl.s = clamp01(hsl.s);
|
||||
return new TinyColor2(hsl);
|
||||
};
|
||||
TinyColor2.prototype.saturate = function(amount) {
|
||||
if (amount === void 0) {
|
||||
amount = 10;
|
||||
}
|
||||
var hsl = this.toHsl();
|
||||
hsl.s += amount / 100;
|
||||
hsl.s = clamp01(hsl.s);
|
||||
return new TinyColor2(hsl);
|
||||
};
|
||||
TinyColor2.prototype.greyscale = function() {
|
||||
return this.desaturate(100);
|
||||
};
|
||||
TinyColor2.prototype.spin = function(amount) {
|
||||
var hsl = this.toHsl();
|
||||
var hue = (hsl.h + amount) % 360;
|
||||
hsl.h = hue < 0 ? 360 + hue : hue;
|
||||
return new TinyColor2(hsl);
|
||||
};
|
||||
TinyColor2.prototype.mix = function(color, amount) {
|
||||
if (amount === void 0) {
|
||||
amount = 50;
|
||||
}
|
||||
var rgb1 = this.toRgb();
|
||||
var rgb2 = new TinyColor2(color).toRgb();
|
||||
var p = amount / 100;
|
||||
var rgba = {
|
||||
r: (rgb2.r - rgb1.r) * p + rgb1.r,
|
||||
g: (rgb2.g - rgb1.g) * p + rgb1.g,
|
||||
b: (rgb2.b - rgb1.b) * p + rgb1.b,
|
||||
a: (rgb2.a - rgb1.a) * p + rgb1.a
|
||||
};
|
||||
return new TinyColor2(rgba);
|
||||
};
|
||||
TinyColor2.prototype.analogous = function(results, slices) {
|
||||
if (results === void 0) {
|
||||
results = 6;
|
||||
}
|
||||
if (slices === void 0) {
|
||||
slices = 30;
|
||||
}
|
||||
var hsl = this.toHsl();
|
||||
var part = 360 / slices;
|
||||
var ret = [this];
|
||||
for (hsl.h = (hsl.h - (part * results >> 1) + 720) % 360; --results; ) {
|
||||
hsl.h = (hsl.h + part) % 360;
|
||||
ret.push(new TinyColor2(hsl));
|
||||
}
|
||||
return ret;
|
||||
};
|
||||
TinyColor2.prototype.complement = function() {
|
||||
var hsl = this.toHsl();
|
||||
hsl.h = (hsl.h + 180) % 360;
|
||||
return new TinyColor2(hsl);
|
||||
};
|
||||
TinyColor2.prototype.monochromatic = function(results) {
|
||||
if (results === void 0) {
|
||||
results = 6;
|
||||
}
|
||||
var hsv = this.toHsv();
|
||||
var h = hsv.h;
|
||||
var s = hsv.s;
|
||||
var v = hsv.v;
|
||||
var res = [];
|
||||
var modification = 1 / results;
|
||||
while (results--) {
|
||||
res.push(new TinyColor2({ h, s, v }));
|
||||
v = (v + modification) % 1;
|
||||
}
|
||||
return res;
|
||||
};
|
||||
TinyColor2.prototype.splitcomplement = function() {
|
||||
var hsl = this.toHsl();
|
||||
var h = hsl.h;
|
||||
return [
|
||||
this,
|
||||
new TinyColor2({ h: (h + 72) % 360, s: hsl.s, l: hsl.l }),
|
||||
new TinyColor2({ h: (h + 216) % 360, s: hsl.s, l: hsl.l })
|
||||
];
|
||||
};
|
||||
TinyColor2.prototype.onBackground = function(background) {
|
||||
var fg = this.toRgb();
|
||||
var bg = new TinyColor2(background).toRgb();
|
||||
var alpha = fg.a + bg.a * (1 - fg.a);
|
||||
return new TinyColor2({
|
||||
r: (fg.r * fg.a + bg.r * bg.a * (1 - fg.a)) / alpha,
|
||||
g: (fg.g * fg.a + bg.g * bg.a * (1 - fg.a)) / alpha,
|
||||
b: (fg.b * fg.a + bg.b * bg.a * (1 - fg.a)) / alpha,
|
||||
a: alpha
|
||||
});
|
||||
};
|
||||
TinyColor2.prototype.triad = function() {
|
||||
return this.polyad(3);
|
||||
};
|
||||
TinyColor2.prototype.tetrad = function() {
|
||||
return this.polyad(4);
|
||||
};
|
||||
TinyColor2.prototype.polyad = function(n) {
|
||||
var hsl = this.toHsl();
|
||||
var h = hsl.h;
|
||||
var result = [this];
|
||||
var increment = 360 / n;
|
||||
for (var i = 1; i < n; i++) {
|
||||
result.push(new TinyColor2({ h: (h + i * increment) % 360, s: hsl.s, l: hsl.l }));
|
||||
}
|
||||
return result;
|
||||
};
|
||||
TinyColor2.prototype.equals = function(color) {
|
||||
return this.toRgbString() === new TinyColor2(color).toRgbString();
|
||||
};
|
||||
return TinyColor2;
|
||||
}()
|
||||
);
|
||||
export {
|
||||
TinyColor as T
|
||||
};
|
||||
@@ -1 +0,0 @@
|
||||
|
||||
@@ -1,554 +0,0 @@
|
||||
var E = "top", R = "bottom", W = "right", P = "left", me = "auto", G = [E, R, W, P], U = "start", J = "end", Xe = "clippingParents", je = "viewport", K = "popper", Ye = "reference", De = G.reduce(function(t, e) {
|
||||
return t.concat([e + "-" + U, e + "-" + J]);
|
||||
}, []), Ee = [].concat(G, [me]).reduce(function(t, e) {
|
||||
return t.concat([e, e + "-" + U, e + "-" + J]);
|
||||
}, []), Ge = "beforeRead", Je = "read", Ke = "afterRead", Qe = "beforeMain", Ze = "main", et = "afterMain", tt = "beforeWrite", nt = "write", rt = "afterWrite", ot = [Ge, Je, Ke, Qe, Ze, et, tt, nt, rt];
|
||||
function C(t) {
|
||||
return t ? (t.nodeName || "").toLowerCase() : null;
|
||||
}
|
||||
function H(t) {
|
||||
if (t == null)
|
||||
return window;
|
||||
if (t.toString() !== "[object Window]") {
|
||||
var e = t.ownerDocument;
|
||||
return e && e.defaultView || window;
|
||||
}
|
||||
return t;
|
||||
}
|
||||
function Q(t) {
|
||||
var e = H(t).Element;
|
||||
return t instanceof e || t instanceof Element;
|
||||
}
|
||||
function B(t) {
|
||||
var e = H(t).HTMLElement;
|
||||
return t instanceof e || t instanceof HTMLElement;
|
||||
}
|
||||
function Pe(t) {
|
||||
if (typeof ShadowRoot == "undefined")
|
||||
return false;
|
||||
var e = H(t).ShadowRoot;
|
||||
return t instanceof e || t instanceof ShadowRoot;
|
||||
}
|
||||
function Mt(t) {
|
||||
var e = t.state;
|
||||
Object.keys(e.elements).forEach(function(n) {
|
||||
var r = e.styles[n] || {}, o = e.attributes[n] || {}, i = e.elements[n];
|
||||
!B(i) || !C(i) || (Object.assign(i.style, r), Object.keys(o).forEach(function(a) {
|
||||
var s = o[a];
|
||||
s === false ? i.removeAttribute(a) : i.setAttribute(a, s === true ? "" : s);
|
||||
}));
|
||||
});
|
||||
}
|
||||
function Rt(t) {
|
||||
var e = t.state, n = { popper: { position: e.options.strategy, left: "0", top: "0", margin: "0" }, arrow: { position: "absolute" }, reference: {} };
|
||||
return Object.assign(e.elements.popper.style, n.popper), e.styles = n, e.elements.arrow && Object.assign(e.elements.arrow.style, n.arrow), function() {
|
||||
Object.keys(e.elements).forEach(function(r) {
|
||||
var o = e.elements[r], i = e.attributes[r] || {}, a = Object.keys(e.styles.hasOwnProperty(r) ? e.styles[r] : n[r]), s = a.reduce(function(f, c) {
|
||||
return f[c] = "", f;
|
||||
}, {});
|
||||
!B(o) || !C(o) || (Object.assign(o.style, s), Object.keys(i).forEach(function(f) {
|
||||
o.removeAttribute(f);
|
||||
}));
|
||||
});
|
||||
};
|
||||
}
|
||||
var Ae = { name: "applyStyles", enabled: true, phase: "write", fn: Mt, effect: Rt, requires: ["computeStyles"] };
|
||||
function q(t) {
|
||||
return t.split("-")[0];
|
||||
}
|
||||
var X = Math.max, ve = Math.min, Z = Math.round;
|
||||
function ee(t, e) {
|
||||
e === void 0 && (e = false);
|
||||
var n = t.getBoundingClientRect(), r = 1, o = 1;
|
||||
if (B(t) && e) {
|
||||
var i = t.offsetHeight, a = t.offsetWidth;
|
||||
a > 0 && (r = Z(n.width) / a || 1), i > 0 && (o = Z(n.height) / i || 1);
|
||||
}
|
||||
return { width: n.width / r, height: n.height / o, top: n.top / o, right: n.right / r, bottom: n.bottom / o, left: n.left / r, x: n.left / r, y: n.top / o };
|
||||
}
|
||||
function ke(t) {
|
||||
var e = ee(t), n = t.offsetWidth, r = t.offsetHeight;
|
||||
return Math.abs(e.width - n) <= 1 && (n = e.width), Math.abs(e.height - r) <= 1 && (r = e.height), { x: t.offsetLeft, y: t.offsetTop, width: n, height: r };
|
||||
}
|
||||
function it(t, e) {
|
||||
var n = e.getRootNode && e.getRootNode();
|
||||
if (t.contains(e))
|
||||
return true;
|
||||
if (n && Pe(n)) {
|
||||
var r = e;
|
||||
do {
|
||||
if (r && t.isSameNode(r))
|
||||
return true;
|
||||
r = r.parentNode || r.host;
|
||||
} while (r);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
function N(t) {
|
||||
return H(t).getComputedStyle(t);
|
||||
}
|
||||
function Wt(t) {
|
||||
return ["table", "td", "th"].indexOf(C(t)) >= 0;
|
||||
}
|
||||
function I(t) {
|
||||
return ((Q(t) ? t.ownerDocument : t.document) || window.document).documentElement;
|
||||
}
|
||||
function ge(t) {
|
||||
return C(t) === "html" ? t : t.assignedSlot || t.parentNode || (Pe(t) ? t.host : null) || I(t);
|
||||
}
|
||||
function at(t) {
|
||||
return !B(t) || N(t).position === "fixed" ? null : t.offsetParent;
|
||||
}
|
||||
function Bt(t) {
|
||||
var e = navigator.userAgent.toLowerCase().indexOf("firefox") !== -1, n = navigator.userAgent.indexOf("Trident") !== -1;
|
||||
if (n && B(t)) {
|
||||
var r = N(t);
|
||||
if (r.position === "fixed")
|
||||
return null;
|
||||
}
|
||||
var o = ge(t);
|
||||
for (Pe(o) && (o = o.host); B(o) && ["html", "body"].indexOf(C(o)) < 0; ) {
|
||||
var i = N(o);
|
||||
if (i.transform !== "none" || i.perspective !== "none" || i.contain === "paint" || ["transform", "perspective"].indexOf(i.willChange) !== -1 || e && i.willChange === "filter" || e && i.filter && i.filter !== "none")
|
||||
return o;
|
||||
o = o.parentNode;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
function se(t) {
|
||||
for (var e = H(t), n = at(t); n && Wt(n) && N(n).position === "static"; )
|
||||
n = at(n);
|
||||
return n && (C(n) === "html" || C(n) === "body" && N(n).position === "static") ? e : n || Bt(t) || e;
|
||||
}
|
||||
function Le(t) {
|
||||
return ["top", "bottom"].indexOf(t) >= 0 ? "x" : "y";
|
||||
}
|
||||
function fe(t, e, n) {
|
||||
return X(t, ve(e, n));
|
||||
}
|
||||
function St(t, e, n) {
|
||||
var r = fe(t, e, n);
|
||||
return r > n ? n : r;
|
||||
}
|
||||
function st() {
|
||||
return { top: 0, right: 0, bottom: 0, left: 0 };
|
||||
}
|
||||
function ft(t) {
|
||||
return Object.assign({}, st(), t);
|
||||
}
|
||||
function ct(t, e) {
|
||||
return e.reduce(function(n, r) {
|
||||
return n[r] = t, n;
|
||||
}, {});
|
||||
}
|
||||
var Tt = function(t, e) {
|
||||
return t = typeof t == "function" ? t(Object.assign({}, e.rects, { placement: e.placement })) : t, ft(typeof t != "number" ? t : ct(t, G));
|
||||
};
|
||||
function Ht(t) {
|
||||
var e, n = t.state, r = t.name, o = t.options, i = n.elements.arrow, a = n.modifiersData.popperOffsets, s = q(n.placement), f = Le(s), c = [P, W].indexOf(s) >= 0, u = c ? "height" : "width";
|
||||
if (!(!i || !a)) {
|
||||
var m = Tt(o.padding, n), v = ke(i), l = f === "y" ? E : P, h = f === "y" ? R : W, p = n.rects.reference[u] + n.rects.reference[f] - a[f] - n.rects.popper[u], g = a[f] - n.rects.reference[f], x = se(i), y = x ? f === "y" ? x.clientHeight || 0 : x.clientWidth || 0 : 0, $ = p / 2 - g / 2, d = m[l], b = y - v[u] - m[h], w = y / 2 - v[u] / 2 + $, O = fe(d, w, b), j = f;
|
||||
n.modifiersData[r] = (e = {}, e[j] = O, e.centerOffset = O - w, e);
|
||||
}
|
||||
}
|
||||
function Ct(t) {
|
||||
var e = t.state, n = t.options, r = n.element, o = r === void 0 ? "[data-popper-arrow]" : r;
|
||||
o != null && (typeof o == "string" && (o = e.elements.popper.querySelector(o), !o) || !it(e.elements.popper, o) || (e.elements.arrow = o));
|
||||
}
|
||||
var pt = { name: "arrow", enabled: true, phase: "main", fn: Ht, effect: Ct, requires: ["popperOffsets"], requiresIfExists: ["preventOverflow"] };
|
||||
function te(t) {
|
||||
return t.split("-")[1];
|
||||
}
|
||||
var qt = { top: "auto", right: "auto", bottom: "auto", left: "auto" };
|
||||
function Vt(t) {
|
||||
var e = t.x, n = t.y, r = window, o = r.devicePixelRatio || 1;
|
||||
return { x: Z(e * o) / o || 0, y: Z(n * o) / o || 0 };
|
||||
}
|
||||
function ut(t) {
|
||||
var e, n = t.popper, r = t.popperRect, o = t.placement, i = t.variation, a = t.offsets, s = t.position, f = t.gpuAcceleration, c = t.adaptive, u = t.roundOffsets, m = t.isFixed, v = a.x, l = v === void 0 ? 0 : v, h = a.y, p = h === void 0 ? 0 : h, g = typeof u == "function" ? u({ x: l, y: p }) : { x: l, y: p };
|
||||
l = g.x, p = g.y;
|
||||
var x = a.hasOwnProperty("x"), y = a.hasOwnProperty("y"), $ = P, d = E, b = window;
|
||||
if (c) {
|
||||
var w = se(n), O = "clientHeight", j = "clientWidth";
|
||||
if (w === H(n) && (w = I(n), N(w).position !== "static" && s === "absolute" && (O = "scrollHeight", j = "scrollWidth")), w = w, o === E || (o === P || o === W) && i === J) {
|
||||
d = R;
|
||||
var A = m && w === b && b.visualViewport ? b.visualViewport.height : w[O];
|
||||
p -= A - r.height, p *= f ? 1 : -1;
|
||||
}
|
||||
if (o === P || (o === E || o === R) && i === J) {
|
||||
$ = W;
|
||||
var k = m && w === b && b.visualViewport ? b.visualViewport.width : w[j];
|
||||
l -= k - r.width, l *= f ? 1 : -1;
|
||||
}
|
||||
}
|
||||
var D = Object.assign({ position: s }, c && qt), S = u === true ? Vt({ x: l, y: p }) : { x: l, y: p };
|
||||
if (l = S.x, p = S.y, f) {
|
||||
var L;
|
||||
return Object.assign({}, D, (L = {}, L[d] = y ? "0" : "", L[$] = x ? "0" : "", L.transform = (b.devicePixelRatio || 1) <= 1 ? "translate(" + l + "px, " + p + "px)" : "translate3d(" + l + "px, " + p + "px, 0)", L));
|
||||
}
|
||||
return Object.assign({}, D, (e = {}, e[d] = y ? p + "px" : "", e[$] = x ? l + "px" : "", e.transform = "", e));
|
||||
}
|
||||
function Nt(t) {
|
||||
var e = t.state, n = t.options, r = n.gpuAcceleration, o = r === void 0 ? true : r, i = n.adaptive, a = i === void 0 ? true : i, s = n.roundOffsets, f = s === void 0 ? true : s, c = { placement: q(e.placement), variation: te(e.placement), popper: e.elements.popper, popperRect: e.rects.popper, gpuAcceleration: o, isFixed: e.options.strategy === "fixed" };
|
||||
e.modifiersData.popperOffsets != null && (e.styles.popper = Object.assign({}, e.styles.popper, ut(Object.assign({}, c, { offsets: e.modifiersData.popperOffsets, position: e.options.strategy, adaptive: a, roundOffsets: f })))), e.modifiersData.arrow != null && (e.styles.arrow = Object.assign({}, e.styles.arrow, ut(Object.assign({}, c, { offsets: e.modifiersData.arrow, position: "absolute", adaptive: false, roundOffsets: f })))), e.attributes.popper = Object.assign({}, e.attributes.popper, { "data-popper-placement": e.placement });
|
||||
}
|
||||
var Me = { name: "computeStyles", enabled: true, phase: "beforeWrite", fn: Nt, data: {} }, ye = { passive: true };
|
||||
function It(t) {
|
||||
var e = t.state, n = t.instance, r = t.options, o = r.scroll, i = o === void 0 ? true : o, a = r.resize, s = a === void 0 ? true : a, f = H(e.elements.popper), c = [].concat(e.scrollParents.reference, e.scrollParents.popper);
|
||||
return i && c.forEach(function(u) {
|
||||
u.addEventListener("scroll", n.update, ye);
|
||||
}), s && f.addEventListener("resize", n.update, ye), function() {
|
||||
i && c.forEach(function(u) {
|
||||
u.removeEventListener("scroll", n.update, ye);
|
||||
}), s && f.removeEventListener("resize", n.update, ye);
|
||||
};
|
||||
}
|
||||
var Re = { name: "eventListeners", enabled: true, phase: "write", fn: function() {
|
||||
}, effect: It, data: {} }, _t = { left: "right", right: "left", bottom: "top", top: "bottom" };
|
||||
function be(t) {
|
||||
return t.replace(/left|right|bottom|top/g, function(e) {
|
||||
return _t[e];
|
||||
});
|
||||
}
|
||||
var zt = { start: "end", end: "start" };
|
||||
function lt(t) {
|
||||
return t.replace(/start|end/g, function(e) {
|
||||
return zt[e];
|
||||
});
|
||||
}
|
||||
function We(t) {
|
||||
var e = H(t), n = e.pageXOffset, r = e.pageYOffset;
|
||||
return { scrollLeft: n, scrollTop: r };
|
||||
}
|
||||
function Be(t) {
|
||||
return ee(I(t)).left + We(t).scrollLeft;
|
||||
}
|
||||
function Ft(t) {
|
||||
var e = H(t), n = I(t), r = e.visualViewport, o = n.clientWidth, i = n.clientHeight, a = 0, s = 0;
|
||||
return r && (o = r.width, i = r.height, /^((?!chrome|android).)*safari/i.test(navigator.userAgent) || (a = r.offsetLeft, s = r.offsetTop)), { width: o, height: i, x: a + Be(t), y: s };
|
||||
}
|
||||
function Ut(t) {
|
||||
var e, n = I(t), r = We(t), o = (e = t.ownerDocument) == null ? void 0 : e.body, i = X(n.scrollWidth, n.clientWidth, o ? o.scrollWidth : 0, o ? o.clientWidth : 0), a = X(n.scrollHeight, n.clientHeight, o ? o.scrollHeight : 0, o ? o.clientHeight : 0), s = -r.scrollLeft + Be(t), f = -r.scrollTop;
|
||||
return N(o || n).direction === "rtl" && (s += X(n.clientWidth, o ? o.clientWidth : 0) - i), { width: i, height: a, x: s, y: f };
|
||||
}
|
||||
function Se(t) {
|
||||
var e = N(t), n = e.overflow, r = e.overflowX, o = e.overflowY;
|
||||
return /auto|scroll|overlay|hidden/.test(n + o + r);
|
||||
}
|
||||
function dt(t) {
|
||||
return ["html", "body", "#document"].indexOf(C(t)) >= 0 ? t.ownerDocument.body : B(t) && Se(t) ? t : dt(ge(t));
|
||||
}
|
||||
function ce(t, e) {
|
||||
var n;
|
||||
e === void 0 && (e = []);
|
||||
var r = dt(t), o = r === ((n = t.ownerDocument) == null ? void 0 : n.body), i = H(r), a = o ? [i].concat(i.visualViewport || [], Se(r) ? r : []) : r, s = e.concat(a);
|
||||
return o ? s : s.concat(ce(ge(a)));
|
||||
}
|
||||
function Te(t) {
|
||||
return Object.assign({}, t, { left: t.x, top: t.y, right: t.x + t.width, bottom: t.y + t.height });
|
||||
}
|
||||
function Xt(t) {
|
||||
var e = ee(t);
|
||||
return e.top = e.top + t.clientTop, e.left = e.left + t.clientLeft, e.bottom = e.top + t.clientHeight, e.right = e.left + t.clientWidth, e.width = t.clientWidth, e.height = t.clientHeight, e.x = e.left, e.y = e.top, e;
|
||||
}
|
||||
function ht(t, e) {
|
||||
return e === je ? Te(Ft(t)) : Q(e) ? Xt(e) : Te(Ut(I(t)));
|
||||
}
|
||||
function Yt(t) {
|
||||
var e = ce(ge(t)), n = ["absolute", "fixed"].indexOf(N(t).position) >= 0, r = n && B(t) ? se(t) : t;
|
||||
return Q(r) ? e.filter(function(o) {
|
||||
return Q(o) && it(o, r) && C(o) !== "body";
|
||||
}) : [];
|
||||
}
|
||||
function Gt(t, e, n) {
|
||||
var r = e === "clippingParents" ? Yt(t) : [].concat(e), o = [].concat(r, [n]), i = o[0], a = o.reduce(function(s, f) {
|
||||
var c = ht(t, f);
|
||||
return s.top = X(c.top, s.top), s.right = ve(c.right, s.right), s.bottom = ve(c.bottom, s.bottom), s.left = X(c.left, s.left), s;
|
||||
}, ht(t, i));
|
||||
return a.width = a.right - a.left, a.height = a.bottom - a.top, a.x = a.left, a.y = a.top, a;
|
||||
}
|
||||
function mt(t) {
|
||||
var e = t.reference, n = t.element, r = t.placement, o = r ? q(r) : null, i = r ? te(r) : null, a = e.x + e.width / 2 - n.width / 2, s = e.y + e.height / 2 - n.height / 2, f;
|
||||
switch (o) {
|
||||
case E:
|
||||
f = { x: a, y: e.y - n.height };
|
||||
break;
|
||||
case R:
|
||||
f = { x: a, y: e.y + e.height };
|
||||
break;
|
||||
case W:
|
||||
f = { x: e.x + e.width, y: s };
|
||||
break;
|
||||
case P:
|
||||
f = { x: e.x - n.width, y: s };
|
||||
break;
|
||||
default:
|
||||
f = { x: e.x, y: e.y };
|
||||
}
|
||||
var c = o ? Le(o) : null;
|
||||
if (c != null) {
|
||||
var u = c === "y" ? "height" : "width";
|
||||
switch (i) {
|
||||
case U:
|
||||
f[c] = f[c] - (e[u] / 2 - n[u] / 2);
|
||||
break;
|
||||
case J:
|
||||
f[c] = f[c] + (e[u] / 2 - n[u] / 2);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return f;
|
||||
}
|
||||
function ne(t, e) {
|
||||
e === void 0 && (e = {});
|
||||
var n = e, r = n.placement, o = r === void 0 ? t.placement : r, i = n.boundary, a = i === void 0 ? Xe : i, s = n.rootBoundary, f = s === void 0 ? je : s, c = n.elementContext, u = c === void 0 ? K : c, m = n.altBoundary, v = m === void 0 ? false : m, l = n.padding, h = l === void 0 ? 0 : l, p = ft(typeof h != "number" ? h : ct(h, G)), g = u === K ? Ye : K, x = t.rects.popper, y = t.elements[v ? g : u], $ = Gt(Q(y) ? y : y.contextElement || I(t.elements.popper), a, f), d = ee(t.elements.reference), b = mt({ reference: d, element: x, strategy: "absolute", placement: o }), w = Te(Object.assign({}, x, b)), O = u === K ? w : d, j = { top: $.top - O.top + p.top, bottom: O.bottom - $.bottom + p.bottom, left: $.left - O.left + p.left, right: O.right - $.right + p.right }, A = t.modifiersData.offset;
|
||||
if (u === K && A) {
|
||||
var k = A[o];
|
||||
Object.keys(j).forEach(function(D) {
|
||||
var S = [W, R].indexOf(D) >= 0 ? 1 : -1, L = [E, R].indexOf(D) >= 0 ? "y" : "x";
|
||||
j[D] += k[L] * S;
|
||||
});
|
||||
}
|
||||
return j;
|
||||
}
|
||||
function Jt(t, e) {
|
||||
e === void 0 && (e = {});
|
||||
var n = e, r = n.placement, o = n.boundary, i = n.rootBoundary, a = n.padding, s = n.flipVariations, f = n.allowedAutoPlacements, c = f === void 0 ? Ee : f, u = te(r), m = u ? s ? De : De.filter(function(h) {
|
||||
return te(h) === u;
|
||||
}) : G, v = m.filter(function(h) {
|
||||
return c.indexOf(h) >= 0;
|
||||
});
|
||||
v.length === 0 && (v = m);
|
||||
var l = v.reduce(function(h, p) {
|
||||
return h[p] = ne(t, { placement: p, boundary: o, rootBoundary: i, padding: a })[q(p)], h;
|
||||
}, {});
|
||||
return Object.keys(l).sort(function(h, p) {
|
||||
return l[h] - l[p];
|
||||
});
|
||||
}
|
||||
function Kt(t) {
|
||||
if (q(t) === me)
|
||||
return [];
|
||||
var e = be(t);
|
||||
return [lt(t), e, lt(e)];
|
||||
}
|
||||
function Qt(t) {
|
||||
var e = t.state, n = t.options, r = t.name;
|
||||
if (!e.modifiersData[r]._skip) {
|
||||
for (var o = n.mainAxis, i = o === void 0 ? true : o, a = n.altAxis, s = a === void 0 ? true : a, f = n.fallbackPlacements, c = n.padding, u = n.boundary, m = n.rootBoundary, v = n.altBoundary, l = n.flipVariations, h = l === void 0 ? true : l, p = n.allowedAutoPlacements, g = e.options.placement, x = q(g), y = x === g, $ = f || (y || !h ? [be(g)] : Kt(g)), d = [g].concat($).reduce(function(z, V) {
|
||||
return z.concat(q(V) === me ? Jt(e, { placement: V, boundary: u, rootBoundary: m, padding: c, flipVariations: h, allowedAutoPlacements: p }) : V);
|
||||
}, []), b = e.rects.reference, w = e.rects.popper, O = /* @__PURE__ */ new Map(), j = true, A = d[0], k = 0; k < d.length; k++) {
|
||||
var D = d[k], S = q(D), L = te(D) === U, re = [E, R].indexOf(S) >= 0, oe = re ? "width" : "height", M = ne(e, { placement: D, boundary: u, rootBoundary: m, altBoundary: v, padding: c }), T = re ? L ? W : P : L ? R : E;
|
||||
b[oe] > w[oe] && (T = be(T));
|
||||
var pe = be(T), _ = [];
|
||||
if (i && _.push(M[S] <= 0), s && _.push(M[T] <= 0, M[pe] <= 0), _.every(function(z) {
|
||||
return z;
|
||||
})) {
|
||||
A = D, j = false;
|
||||
break;
|
||||
}
|
||||
O.set(D, _);
|
||||
}
|
||||
if (j)
|
||||
for (var ue = h ? 3 : 1, xe = function(z) {
|
||||
var V = d.find(function(de) {
|
||||
var ae = O.get(de);
|
||||
if (ae)
|
||||
return ae.slice(0, z).every(function(Y) {
|
||||
return Y;
|
||||
});
|
||||
});
|
||||
if (V)
|
||||
return A = V, "break";
|
||||
}, ie = ue; ie > 0; ie--) {
|
||||
var le = xe(ie);
|
||||
if (le === "break")
|
||||
break;
|
||||
}
|
||||
e.placement !== A && (e.modifiersData[r]._skip = true, e.placement = A, e.reset = true);
|
||||
}
|
||||
}
|
||||
var vt = { name: "flip", enabled: true, phase: "main", fn: Qt, requiresIfExists: ["offset"], data: { _skip: false } };
|
||||
function gt(t, e, n) {
|
||||
return n === void 0 && (n = { x: 0, y: 0 }), { top: t.top - e.height - n.y, right: t.right - e.width + n.x, bottom: t.bottom - e.height + n.y, left: t.left - e.width - n.x };
|
||||
}
|
||||
function yt(t) {
|
||||
return [E, W, R, P].some(function(e) {
|
||||
return t[e] >= 0;
|
||||
});
|
||||
}
|
||||
function Zt(t) {
|
||||
var e = t.state, n = t.name, r = e.rects.reference, o = e.rects.popper, i = e.modifiersData.preventOverflow, a = ne(e, { elementContext: "reference" }), s = ne(e, { altBoundary: true }), f = gt(a, r), c = gt(s, o, i), u = yt(f), m = yt(c);
|
||||
e.modifiersData[n] = { referenceClippingOffsets: f, popperEscapeOffsets: c, isReferenceHidden: u, hasPopperEscaped: m }, e.attributes.popper = Object.assign({}, e.attributes.popper, { "data-popper-reference-hidden": u, "data-popper-escaped": m });
|
||||
}
|
||||
var bt = { name: "hide", enabled: true, phase: "main", requiresIfExists: ["preventOverflow"], fn: Zt };
|
||||
function en(t, e, n) {
|
||||
var r = q(t), o = [P, E].indexOf(r) >= 0 ? -1 : 1, i = typeof n == "function" ? n(Object.assign({}, e, { placement: t })) : n, a = i[0], s = i[1];
|
||||
return a = a || 0, s = (s || 0) * o, [P, W].indexOf(r) >= 0 ? { x: s, y: a } : { x: a, y: s };
|
||||
}
|
||||
function tn(t) {
|
||||
var e = t.state, n = t.options, r = t.name, o = n.offset, i = o === void 0 ? [0, 0] : o, a = Ee.reduce(function(u, m) {
|
||||
return u[m] = en(m, e.rects, i), u;
|
||||
}, {}), s = a[e.placement], f = s.x, c = s.y;
|
||||
e.modifiersData.popperOffsets != null && (e.modifiersData.popperOffsets.x += f, e.modifiersData.popperOffsets.y += c), e.modifiersData[r] = a;
|
||||
}
|
||||
var wt = { name: "offset", enabled: true, phase: "main", requires: ["popperOffsets"], fn: tn };
|
||||
function nn(t) {
|
||||
var e = t.state, n = t.name;
|
||||
e.modifiersData[n] = mt({ reference: e.rects.reference, element: e.rects.popper, strategy: "absolute", placement: e.placement });
|
||||
}
|
||||
var He = { name: "popperOffsets", enabled: true, phase: "read", fn: nn, data: {} };
|
||||
function rn(t) {
|
||||
return t === "x" ? "y" : "x";
|
||||
}
|
||||
function on(t) {
|
||||
var e = t.state, n = t.options, r = t.name, o = n.mainAxis, i = o === void 0 ? true : o, a = n.altAxis, s = a === void 0 ? false : a, f = n.boundary, c = n.rootBoundary, u = n.altBoundary, m = n.padding, v = n.tether, l = v === void 0 ? true : v, h = n.tetherOffset, p = h === void 0 ? 0 : h, g = ne(e, { boundary: f, rootBoundary: c, padding: m, altBoundary: u }), x = q(e.placement), y = te(e.placement), $ = !y, d = Le(x), b = rn(d), w = e.modifiersData.popperOffsets, O = e.rects.reference, j = e.rects.popper, A = typeof p == "function" ? p(Object.assign({}, e.rects, { placement: e.placement })) : p, k = typeof A == "number" ? { mainAxis: A, altAxis: A } : Object.assign({ mainAxis: 0, altAxis: 0 }, A), D = e.modifiersData.offset ? e.modifiersData.offset[e.placement] : null, S = { x: 0, y: 0 };
|
||||
if (w) {
|
||||
if (i) {
|
||||
var L, re = d === "y" ? E : P, oe = d === "y" ? R : W, M = d === "y" ? "height" : "width", T = w[d], pe = T + g[re], _ = T - g[oe], ue = l ? -j[M] / 2 : 0, xe = y === U ? O[M] : j[M], ie = y === U ? -j[M] : -O[M], le = e.elements.arrow, z = l && le ? ke(le) : { width: 0, height: 0 }, V = e.modifiersData["arrow#persistent"] ? e.modifiersData["arrow#persistent"].padding : st(), de = V[re], ae = V[oe], Y = fe(0, O[M], z[M]), jt = $ ? O[M] / 2 - ue - Y - de - k.mainAxis : xe - Y - de - k.mainAxis, Dt = $ ? -O[M] / 2 + ue + Y + ae + k.mainAxis : ie + Y + ae + k.mainAxis, Oe = e.elements.arrow && se(e.elements.arrow), Et = Oe ? d === "y" ? Oe.clientTop || 0 : Oe.clientLeft || 0 : 0, Ce = (L = D == null ? void 0 : D[d]) != null ? L : 0, Pt = T + jt - Ce - Et, At = T + Dt - Ce, qe = fe(l ? ve(pe, Pt) : pe, T, l ? X(_, At) : _);
|
||||
w[d] = qe, S[d] = qe - T;
|
||||
}
|
||||
if (s) {
|
||||
var Ve, kt = d === "x" ? E : P, Lt = d === "x" ? R : W, F = w[b], he = b === "y" ? "height" : "width", Ne = F + g[kt], Ie = F - g[Lt], $e = [E, P].indexOf(x) !== -1, _e = (Ve = D == null ? void 0 : D[b]) != null ? Ve : 0, ze = $e ? Ne : F - O[he] - j[he] - _e + k.altAxis, Fe = $e ? F + O[he] + j[he] - _e - k.altAxis : Ie, Ue = l && $e ? St(ze, F, Fe) : fe(l ? ze : Ne, F, l ? Fe : Ie);
|
||||
w[b] = Ue, S[b] = Ue - F;
|
||||
}
|
||||
e.modifiersData[r] = S;
|
||||
}
|
||||
}
|
||||
var xt = { name: "preventOverflow", enabled: true, phase: "main", fn: on, requiresIfExists: ["offset"] };
|
||||
function an(t) {
|
||||
return { scrollLeft: t.scrollLeft, scrollTop: t.scrollTop };
|
||||
}
|
||||
function sn(t) {
|
||||
return t === H(t) || !B(t) ? We(t) : an(t);
|
||||
}
|
||||
function fn(t) {
|
||||
var e = t.getBoundingClientRect(), n = Z(e.width) / t.offsetWidth || 1, r = Z(e.height) / t.offsetHeight || 1;
|
||||
return n !== 1 || r !== 1;
|
||||
}
|
||||
function cn(t, e, n) {
|
||||
n === void 0 && (n = false);
|
||||
var r = B(e), o = B(e) && fn(e), i = I(e), a = ee(t, o), s = { scrollLeft: 0, scrollTop: 0 }, f = { x: 0, y: 0 };
|
||||
return (r || !r && !n) && ((C(e) !== "body" || Se(i)) && (s = sn(e)), B(e) ? (f = ee(e, true), f.x += e.clientLeft, f.y += e.clientTop) : i && (f.x = Be(i))), { x: a.left + s.scrollLeft - f.x, y: a.top + s.scrollTop - f.y, width: a.width, height: a.height };
|
||||
}
|
||||
function pn(t) {
|
||||
var e = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Set(), r = [];
|
||||
t.forEach(function(i) {
|
||||
e.set(i.name, i);
|
||||
});
|
||||
function o(i) {
|
||||
n.add(i.name);
|
||||
var a = [].concat(i.requires || [], i.requiresIfExists || []);
|
||||
a.forEach(function(s) {
|
||||
if (!n.has(s)) {
|
||||
var f = e.get(s);
|
||||
f && o(f);
|
||||
}
|
||||
}), r.push(i);
|
||||
}
|
||||
return t.forEach(function(i) {
|
||||
n.has(i.name) || o(i);
|
||||
}), r;
|
||||
}
|
||||
function un(t) {
|
||||
var e = pn(t);
|
||||
return ot.reduce(function(n, r) {
|
||||
return n.concat(e.filter(function(o) {
|
||||
return o.phase === r;
|
||||
}));
|
||||
}, []);
|
||||
}
|
||||
function ln(t) {
|
||||
var e;
|
||||
return function() {
|
||||
return e || (e = new Promise(function(n) {
|
||||
Promise.resolve().then(function() {
|
||||
e = void 0, n(t());
|
||||
});
|
||||
})), e;
|
||||
};
|
||||
}
|
||||
function dn(t) {
|
||||
var e = t.reduce(function(n, r) {
|
||||
var o = n[r.name];
|
||||
return n[r.name] = o ? Object.assign({}, o, r, { options: Object.assign({}, o.options, r.options), data: Object.assign({}, o.data, r.data) }) : r, n;
|
||||
}, {});
|
||||
return Object.keys(e).map(function(n) {
|
||||
return e[n];
|
||||
});
|
||||
}
|
||||
var Ot = { placement: "bottom", modifiers: [], strategy: "absolute" };
|
||||
function $t() {
|
||||
for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++)
|
||||
e[n] = arguments[n];
|
||||
return !e.some(function(r) {
|
||||
return !(r && typeof r.getBoundingClientRect == "function");
|
||||
});
|
||||
}
|
||||
function we(t) {
|
||||
t === void 0 && (t = {});
|
||||
var e = t, n = e.defaultModifiers, r = n === void 0 ? [] : n, o = e.defaultOptions, i = o === void 0 ? Ot : o;
|
||||
return function(a, s, f) {
|
||||
f === void 0 && (f = i);
|
||||
var c = { placement: "bottom", orderedModifiers: [], options: Object.assign({}, Ot, i), modifiersData: {}, elements: { reference: a, popper: s }, attributes: {}, styles: {} }, u = [], m = false, v = { state: c, setOptions: function(p) {
|
||||
var g = typeof p == "function" ? p(c.options) : p;
|
||||
h(), c.options = Object.assign({}, i, c.options, g), c.scrollParents = { reference: Q(a) ? ce(a) : a.contextElement ? ce(a.contextElement) : [], popper: ce(s) };
|
||||
var x = un(dn([].concat(r, c.options.modifiers)));
|
||||
return c.orderedModifiers = x.filter(function(y) {
|
||||
return y.enabled;
|
||||
}), l(), v.update();
|
||||
}, forceUpdate: function() {
|
||||
if (!m) {
|
||||
var p = c.elements, g = p.reference, x = p.popper;
|
||||
if ($t(g, x)) {
|
||||
c.rects = { reference: cn(g, se(x), c.options.strategy === "fixed"), popper: ke(x) }, c.reset = false, c.placement = c.options.placement, c.orderedModifiers.forEach(function(j) {
|
||||
return c.modifiersData[j.name] = Object.assign({}, j.data);
|
||||
});
|
||||
for (var y = 0; y < c.orderedModifiers.length; y++) {
|
||||
if (c.reset === true) {
|
||||
c.reset = false, y = -1;
|
||||
continue;
|
||||
}
|
||||
var $ = c.orderedModifiers[y], d = $.fn, b = $.options, w = b === void 0 ? {} : b, O = $.name;
|
||||
typeof d == "function" && (c = d({ state: c, options: w, name: O, instance: v }) || c);
|
||||
}
|
||||
}
|
||||
}
|
||||
}, update: ln(function() {
|
||||
return new Promise(function(p) {
|
||||
v.forceUpdate(), p(c);
|
||||
});
|
||||
}), destroy: function() {
|
||||
h(), m = true;
|
||||
} };
|
||||
if (!$t(a, s))
|
||||
return v;
|
||||
v.setOptions(f).then(function(p) {
|
||||
!m && f.onFirstUpdate && f.onFirstUpdate(p);
|
||||
});
|
||||
function l() {
|
||||
c.orderedModifiers.forEach(function(p) {
|
||||
var g = p.name, x = p.options, y = x === void 0 ? {} : x, $ = p.effect;
|
||||
if (typeof $ == "function") {
|
||||
var d = $({ state: c, name: g, instance: v, options: y }), b = function() {
|
||||
};
|
||||
u.push(d || b);
|
||||
}
|
||||
});
|
||||
}
|
||||
function h() {
|
||||
u.forEach(function(p) {
|
||||
return p();
|
||||
}), u = [];
|
||||
}
|
||||
return v;
|
||||
};
|
||||
}
|
||||
we();
|
||||
var mn = [Re, He, Me, Ae];
|
||||
we({ defaultModifiers: mn });
|
||||
var gn = [Re, He, Me, Ae, wt, vt, xt, pt, bt], yn = we({ defaultModifiers: gn });
|
||||
export {
|
||||
Ee as E,
|
||||
yn as y
|
||||
};
|
||||
@@ -1,899 +0,0 @@
|
||||
import { g as getCurrentInstance, b as onMounted, n as nextTick, u as unref, d as getCurrentScope, e as onScopeDispose, r as ref, f as readonly, h as computed, w as watch, s as shallowRef, i as watchEffect } from "./@vue-364b3ba4.js";
|
||||
var __defProp$9 = Object.defineProperty;
|
||||
var __defProps$6 = Object.defineProperties;
|
||||
var __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;
|
||||
var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
|
||||
var __hasOwnProp$b = Object.prototype.hasOwnProperty;
|
||||
var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
|
||||
var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
||||
var __spreadValues$9 = (a, b) => {
|
||||
for (var prop in b || (b = {}))
|
||||
if (__hasOwnProp$b.call(b, prop))
|
||||
__defNormalProp$9(a, prop, b[prop]);
|
||||
if (__getOwnPropSymbols$b)
|
||||
for (var prop of __getOwnPropSymbols$b(b)) {
|
||||
if (__propIsEnum$b.call(b, prop))
|
||||
__defNormalProp$9(a, prop, b[prop]);
|
||||
}
|
||||
return a;
|
||||
};
|
||||
var __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));
|
||||
function computedEager(fn, options) {
|
||||
var _a2;
|
||||
const result = shallowRef();
|
||||
watchEffect(() => {
|
||||
result.value = fn();
|
||||
}, __spreadProps$6(__spreadValues$9({}, options), {
|
||||
flush: (_a2 = options == null ? void 0 : options.flush) != null ? _a2 : "sync"
|
||||
}));
|
||||
return readonly(result);
|
||||
}
|
||||
var _a;
|
||||
const isClient = typeof window !== "undefined";
|
||||
const isDef = (val) => typeof val !== "undefined";
|
||||
const isFunction = (val) => typeof val === "function";
|
||||
const isString = (val) => typeof val === "string";
|
||||
const noop = () => {
|
||||
};
|
||||
const isIOS = isClient && ((_a = window == null ? void 0 : window.navigator) == null ? void 0 : _a.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
|
||||
function resolveUnref(r) {
|
||||
return typeof r === "function" ? r() : unref(r);
|
||||
}
|
||||
function createFilterWrapper(filter, fn) {
|
||||
function wrapper(...args) {
|
||||
return new Promise((resolve, reject) => {
|
||||
Promise.resolve(filter(() => fn.apply(this, args), { fn, thisArg: this, args })).then(resolve).catch(reject);
|
||||
});
|
||||
}
|
||||
return wrapper;
|
||||
}
|
||||
const bypassFilter = (invoke) => {
|
||||
return invoke();
|
||||
};
|
||||
function debounceFilter(ms, options = {}) {
|
||||
let timer;
|
||||
let maxTimer;
|
||||
let lastRejector = noop;
|
||||
const _clearTimeout = (timer2) => {
|
||||
clearTimeout(timer2);
|
||||
lastRejector();
|
||||
lastRejector = noop;
|
||||
};
|
||||
const filter = (invoke) => {
|
||||
const duration = resolveUnref(ms);
|
||||
const maxDuration = resolveUnref(options.maxWait);
|
||||
if (timer)
|
||||
_clearTimeout(timer);
|
||||
if (duration <= 0 || maxDuration !== void 0 && maxDuration <= 0) {
|
||||
if (maxTimer) {
|
||||
_clearTimeout(maxTimer);
|
||||
maxTimer = null;
|
||||
}
|
||||
return Promise.resolve(invoke());
|
||||
}
|
||||
return new Promise((resolve, reject) => {
|
||||
lastRejector = options.rejectOnCancel ? reject : resolve;
|
||||
if (maxDuration && !maxTimer) {
|
||||
maxTimer = setTimeout(() => {
|
||||
if (timer)
|
||||
_clearTimeout(timer);
|
||||
maxTimer = null;
|
||||
resolve(invoke());
|
||||
}, maxDuration);
|
||||
}
|
||||
timer = setTimeout(() => {
|
||||
if (maxTimer)
|
||||
_clearTimeout(maxTimer);
|
||||
maxTimer = null;
|
||||
resolve(invoke());
|
||||
}, duration);
|
||||
});
|
||||
};
|
||||
return filter;
|
||||
}
|
||||
function throttleFilter(ms, trailing = true, leading = true, rejectOnCancel = false) {
|
||||
let lastExec = 0;
|
||||
let timer;
|
||||
let isLeading = true;
|
||||
let lastRejector = noop;
|
||||
let lastValue;
|
||||
const clear = () => {
|
||||
if (timer) {
|
||||
clearTimeout(timer);
|
||||
timer = void 0;
|
||||
lastRejector();
|
||||
lastRejector = noop;
|
||||
}
|
||||
};
|
||||
const filter = (_invoke) => {
|
||||
const duration = resolveUnref(ms);
|
||||
const elapsed = Date.now() - lastExec;
|
||||
const invoke = () => {
|
||||
return lastValue = _invoke();
|
||||
};
|
||||
clear();
|
||||
if (duration <= 0) {
|
||||
lastExec = Date.now();
|
||||
return invoke();
|
||||
}
|
||||
if (elapsed > duration && (leading || !isLeading)) {
|
||||
lastExec = Date.now();
|
||||
invoke();
|
||||
} else if (trailing) {
|
||||
lastValue = new Promise((resolve, reject) => {
|
||||
lastRejector = rejectOnCancel ? reject : resolve;
|
||||
timer = setTimeout(() => {
|
||||
lastExec = Date.now();
|
||||
isLeading = true;
|
||||
resolve(invoke());
|
||||
clear();
|
||||
}, Math.max(0, duration - elapsed));
|
||||
});
|
||||
}
|
||||
if (!leading && !timer)
|
||||
timer = setTimeout(() => isLeading = true, duration);
|
||||
isLeading = false;
|
||||
return lastValue;
|
||||
};
|
||||
return filter;
|
||||
}
|
||||
function pausableFilter(extendFilter = bypassFilter) {
|
||||
const isActive = ref(true);
|
||||
function pause() {
|
||||
isActive.value = false;
|
||||
}
|
||||
function resume() {
|
||||
isActive.value = true;
|
||||
}
|
||||
const eventFilter = (...args) => {
|
||||
if (isActive.value)
|
||||
extendFilter(...args);
|
||||
};
|
||||
return { isActive: readonly(isActive), pause, resume, eventFilter };
|
||||
}
|
||||
function identity(arg) {
|
||||
return arg;
|
||||
}
|
||||
function tryOnScopeDispose(fn) {
|
||||
if (getCurrentScope()) {
|
||||
onScopeDispose(fn);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
function useDebounceFn(fn, ms = 200, options = {}) {
|
||||
return createFilterWrapper(debounceFilter(ms, options), fn);
|
||||
}
|
||||
function refDebounced(value, ms = 200, options = {}) {
|
||||
const debounced = ref(value.value);
|
||||
const updater = useDebounceFn(() => {
|
||||
debounced.value = value.value;
|
||||
}, ms, options);
|
||||
watch(value, () => updater());
|
||||
return debounced;
|
||||
}
|
||||
function useThrottleFn(fn, ms = 200, trailing = false, leading = true, rejectOnCancel = false) {
|
||||
return createFilterWrapper(throttleFilter(ms, trailing, leading, rejectOnCancel), fn);
|
||||
}
|
||||
function resolveRef(r) {
|
||||
return typeof r === "function" ? computed(r) : ref(r);
|
||||
}
|
||||
function tryOnMounted(fn, sync = true) {
|
||||
if (getCurrentInstance())
|
||||
onMounted(fn);
|
||||
else if (sync)
|
||||
fn();
|
||||
else
|
||||
nextTick(fn);
|
||||
}
|
||||
function useTimeoutFn(cb, interval, options = {}) {
|
||||
const {
|
||||
immediate = true
|
||||
} = options;
|
||||
const isPending = ref(false);
|
||||
let timer = null;
|
||||
function clear() {
|
||||
if (timer) {
|
||||
clearTimeout(timer);
|
||||
timer = null;
|
||||
}
|
||||
}
|
||||
function stop() {
|
||||
isPending.value = false;
|
||||
clear();
|
||||
}
|
||||
function start(...args) {
|
||||
clear();
|
||||
isPending.value = true;
|
||||
timer = setTimeout(() => {
|
||||
isPending.value = false;
|
||||
timer = null;
|
||||
cb(...args);
|
||||
}, resolveUnref(interval));
|
||||
}
|
||||
if (immediate) {
|
||||
isPending.value = true;
|
||||
if (isClient)
|
||||
start();
|
||||
}
|
||||
tryOnScopeDispose(stop);
|
||||
return {
|
||||
isPending: readonly(isPending),
|
||||
start,
|
||||
stop
|
||||
};
|
||||
}
|
||||
var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
|
||||
var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
|
||||
var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
|
||||
var __objRest$5 = (source, exclude) => {
|
||||
var target = {};
|
||||
for (var prop in source)
|
||||
if (__hasOwnProp$6.call(source, prop) && exclude.indexOf(prop) < 0)
|
||||
target[prop] = source[prop];
|
||||
if (source != null && __getOwnPropSymbols$6)
|
||||
for (var prop of __getOwnPropSymbols$6(source)) {
|
||||
if (exclude.indexOf(prop) < 0 && __propIsEnum$6.call(source, prop))
|
||||
target[prop] = source[prop];
|
||||
}
|
||||
return target;
|
||||
};
|
||||
function watchWithFilter(source, cb, options = {}) {
|
||||
const _a2 = options, {
|
||||
eventFilter = bypassFilter
|
||||
} = _a2, watchOptions = __objRest$5(_a2, [
|
||||
"eventFilter"
|
||||
]);
|
||||
return watch(source, createFilterWrapper(eventFilter, cb), watchOptions);
|
||||
}
|
||||
var __defProp$2 = Object.defineProperty;
|
||||
var __defProps$2 = Object.defineProperties;
|
||||
var __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;
|
||||
var __getOwnPropSymbols$2 = Object.getOwnPropertySymbols;
|
||||
var __hasOwnProp$2 = Object.prototype.hasOwnProperty;
|
||||
var __propIsEnum$2 = Object.prototype.propertyIsEnumerable;
|
||||
var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
||||
var __spreadValues$2 = (a, b) => {
|
||||
for (var prop in b || (b = {}))
|
||||
if (__hasOwnProp$2.call(b, prop))
|
||||
__defNormalProp$2(a, prop, b[prop]);
|
||||
if (__getOwnPropSymbols$2)
|
||||
for (var prop of __getOwnPropSymbols$2(b)) {
|
||||
if (__propIsEnum$2.call(b, prop))
|
||||
__defNormalProp$2(a, prop, b[prop]);
|
||||
}
|
||||
return a;
|
||||
};
|
||||
var __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));
|
||||
var __objRest$1 = (source, exclude) => {
|
||||
var target = {};
|
||||
for (var prop in source)
|
||||
if (__hasOwnProp$2.call(source, prop) && exclude.indexOf(prop) < 0)
|
||||
target[prop] = source[prop];
|
||||
if (source != null && __getOwnPropSymbols$2)
|
||||
for (var prop of __getOwnPropSymbols$2(source)) {
|
||||
if (exclude.indexOf(prop) < 0 && __propIsEnum$2.call(source, prop))
|
||||
target[prop] = source[prop];
|
||||
}
|
||||
return target;
|
||||
};
|
||||
function watchPausable(source, cb, options = {}) {
|
||||
const _a2 = options, {
|
||||
eventFilter: filter
|
||||
} = _a2, watchOptions = __objRest$1(_a2, [
|
||||
"eventFilter"
|
||||
]);
|
||||
const { eventFilter, pause, resume, isActive } = pausableFilter(filter);
|
||||
const stop = watchWithFilter(source, cb, __spreadProps$2(__spreadValues$2({}, watchOptions), {
|
||||
eventFilter
|
||||
}));
|
||||
return { stop, pause, resume, isActive };
|
||||
}
|
||||
function unrefElement(elRef) {
|
||||
var _a2;
|
||||
const plain = resolveUnref(elRef);
|
||||
return (_a2 = plain == null ? void 0 : plain.$el) != null ? _a2 : plain;
|
||||
}
|
||||
const defaultWindow = isClient ? window : void 0;
|
||||
const defaultDocument = isClient ? window.document : void 0;
|
||||
function useEventListener(...args) {
|
||||
let target;
|
||||
let events;
|
||||
let listeners;
|
||||
let options;
|
||||
if (isString(args[0]) || Array.isArray(args[0])) {
|
||||
[events, listeners, options] = args;
|
||||
target = defaultWindow;
|
||||
} else {
|
||||
[target, events, listeners, options] = args;
|
||||
}
|
||||
if (!target)
|
||||
return noop;
|
||||
if (!Array.isArray(events))
|
||||
events = [events];
|
||||
if (!Array.isArray(listeners))
|
||||
listeners = [listeners];
|
||||
const cleanups = [];
|
||||
const cleanup = () => {
|
||||
cleanups.forEach((fn) => fn());
|
||||
cleanups.length = 0;
|
||||
};
|
||||
const register = (el, event, listener, options2) => {
|
||||
el.addEventListener(event, listener, options2);
|
||||
return () => el.removeEventListener(event, listener, options2);
|
||||
};
|
||||
const stopWatch = watch(() => [unrefElement(target), resolveUnref(options)], ([el, options2]) => {
|
||||
cleanup();
|
||||
if (!el)
|
||||
return;
|
||||
cleanups.push(...events.flatMap((event) => {
|
||||
return listeners.map((listener) => register(el, event, listener, options2));
|
||||
}));
|
||||
}, { immediate: true, flush: "post" });
|
||||
const stop = () => {
|
||||
stopWatch();
|
||||
cleanup();
|
||||
};
|
||||
tryOnScopeDispose(stop);
|
||||
return stop;
|
||||
}
|
||||
let _iOSWorkaround = false;
|
||||
function onClickOutside(target, handler, options = {}) {
|
||||
const { window: window2 = defaultWindow, ignore = [], capture = true, detectIframe = false } = options;
|
||||
if (!window2)
|
||||
return;
|
||||
if (isIOS && !_iOSWorkaround) {
|
||||
_iOSWorkaround = true;
|
||||
Array.from(window2.document.body.children).forEach((el) => el.addEventListener("click", noop));
|
||||
}
|
||||
let shouldListen = true;
|
||||
const shouldIgnore = (event) => {
|
||||
return ignore.some((target2) => {
|
||||
if (typeof target2 === "string") {
|
||||
return Array.from(window2.document.querySelectorAll(target2)).some((el) => el === event.target || event.composedPath().includes(el));
|
||||
} else {
|
||||
const el = unrefElement(target2);
|
||||
return el && (event.target === el || event.composedPath().includes(el));
|
||||
}
|
||||
});
|
||||
};
|
||||
const listener = (event) => {
|
||||
const el = unrefElement(target);
|
||||
if (!el || el === event.target || event.composedPath().includes(el))
|
||||
return;
|
||||
if (event.detail === 0)
|
||||
shouldListen = !shouldIgnore(event);
|
||||
if (!shouldListen) {
|
||||
shouldListen = true;
|
||||
return;
|
||||
}
|
||||
handler(event);
|
||||
};
|
||||
const cleanup = [
|
||||
useEventListener(window2, "click", listener, { passive: true, capture }),
|
||||
useEventListener(window2, "pointerdown", (e) => {
|
||||
const el = unrefElement(target);
|
||||
if (el)
|
||||
shouldListen = !e.composedPath().includes(el) && !shouldIgnore(e);
|
||||
}, { passive: true }),
|
||||
detectIframe && useEventListener(window2, "blur", (event) => {
|
||||
var _a2;
|
||||
const el = unrefElement(target);
|
||||
if (((_a2 = window2.document.activeElement) == null ? void 0 : _a2.tagName) === "IFRAME" && !(el == null ? void 0 : el.contains(window2.document.activeElement)))
|
||||
handler(event);
|
||||
})
|
||||
].filter(Boolean);
|
||||
const stop = () => cleanup.forEach((fn) => fn());
|
||||
return stop;
|
||||
}
|
||||
function useSupported(callback, sync = false) {
|
||||
const isSupported = ref();
|
||||
const update = () => isSupported.value = Boolean(callback());
|
||||
update();
|
||||
tryOnMounted(update, sync);
|
||||
return isSupported;
|
||||
}
|
||||
function useMediaQuery(query, options = {}) {
|
||||
const { window: window2 = defaultWindow } = options;
|
||||
const isSupported = useSupported(() => window2 && "matchMedia" in window2 && typeof window2.matchMedia === "function");
|
||||
let mediaQuery;
|
||||
const matches = ref(false);
|
||||
const cleanup = () => {
|
||||
if (!mediaQuery)
|
||||
return;
|
||||
if ("removeEventListener" in mediaQuery)
|
||||
mediaQuery.removeEventListener("change", update);
|
||||
else
|
||||
mediaQuery.removeListener(update);
|
||||
};
|
||||
const update = () => {
|
||||
if (!isSupported.value)
|
||||
return;
|
||||
cleanup();
|
||||
mediaQuery = window2.matchMedia(resolveRef(query).value);
|
||||
matches.value = mediaQuery.matches;
|
||||
if ("addEventListener" in mediaQuery)
|
||||
mediaQuery.addEventListener("change", update);
|
||||
else
|
||||
mediaQuery.addListener(update);
|
||||
};
|
||||
watchEffect(update);
|
||||
tryOnScopeDispose(() => cleanup());
|
||||
return matches;
|
||||
}
|
||||
function cloneFnJSON(source) {
|
||||
return JSON.parse(JSON.stringify(source));
|
||||
}
|
||||
const _global = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
||||
const globalKey = "__vueuse_ssr_handlers__";
|
||||
_global[globalKey] = _global[globalKey] || {};
|
||||
const handlers = _global[globalKey];
|
||||
function getSSRHandler(key, fallback) {
|
||||
return handlers[key] || fallback;
|
||||
}
|
||||
function guessSerializerType(rawInit) {
|
||||
return rawInit == null ? "any" : rawInit instanceof Set ? "set" : rawInit instanceof Map ? "map" : rawInit instanceof Date ? "date" : typeof rawInit === "boolean" ? "boolean" : typeof rawInit === "string" ? "string" : typeof rawInit === "object" ? "object" : !Number.isNaN(rawInit) ? "number" : "any";
|
||||
}
|
||||
var __defProp$k = Object.defineProperty;
|
||||
var __getOwnPropSymbols$m = Object.getOwnPropertySymbols;
|
||||
var __hasOwnProp$m = Object.prototype.hasOwnProperty;
|
||||
var __propIsEnum$m = Object.prototype.propertyIsEnumerable;
|
||||
var __defNormalProp$k = (obj, key, value) => key in obj ? __defProp$k(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
||||
var __spreadValues$k = (a, b) => {
|
||||
for (var prop in b || (b = {}))
|
||||
if (__hasOwnProp$m.call(b, prop))
|
||||
__defNormalProp$k(a, prop, b[prop]);
|
||||
if (__getOwnPropSymbols$m)
|
||||
for (var prop of __getOwnPropSymbols$m(b)) {
|
||||
if (__propIsEnum$m.call(b, prop))
|
||||
__defNormalProp$k(a, prop, b[prop]);
|
||||
}
|
||||
return a;
|
||||
};
|
||||
const StorageSerializers = {
|
||||
boolean: {
|
||||
read: (v) => v === "true",
|
||||
write: (v) => String(v)
|
||||
},
|
||||
object: {
|
||||
read: (v) => JSON.parse(v),
|
||||
write: (v) => JSON.stringify(v)
|
||||
},
|
||||
number: {
|
||||
read: (v) => Number.parseFloat(v),
|
||||
write: (v) => String(v)
|
||||
},
|
||||
any: {
|
||||
read: (v) => v,
|
||||
write: (v) => String(v)
|
||||
},
|
||||
string: {
|
||||
read: (v) => v,
|
||||
write: (v) => String(v)
|
||||
},
|
||||
map: {
|
||||
read: (v) => new Map(JSON.parse(v)),
|
||||
write: (v) => JSON.stringify(Array.from(v.entries()))
|
||||
},
|
||||
set: {
|
||||
read: (v) => new Set(JSON.parse(v)),
|
||||
write: (v) => JSON.stringify(Array.from(v))
|
||||
},
|
||||
date: {
|
||||
read: (v) => new Date(v),
|
||||
write: (v) => v.toISOString()
|
||||
}
|
||||
};
|
||||
const customStorageEventName = "vueuse-storage";
|
||||
function useStorage(key, defaults, storage, options = {}) {
|
||||
var _a2;
|
||||
const {
|
||||
flush = "pre",
|
||||
deep = true,
|
||||
listenToStorageChanges = true,
|
||||
writeDefaults = true,
|
||||
mergeDefaults = false,
|
||||
shallow,
|
||||
window: window2 = defaultWindow,
|
||||
eventFilter,
|
||||
onError = (e) => {
|
||||
console.error(e);
|
||||
}
|
||||
} = options;
|
||||
const data = (shallow ? shallowRef : ref)(defaults);
|
||||
if (!storage) {
|
||||
try {
|
||||
storage = getSSRHandler("getDefaultStorage", () => {
|
||||
var _a22;
|
||||
return (_a22 = defaultWindow) == null ? void 0 : _a22.localStorage;
|
||||
})();
|
||||
} catch (e) {
|
||||
onError(e);
|
||||
}
|
||||
}
|
||||
if (!storage)
|
||||
return data;
|
||||
const rawInit = resolveUnref(defaults);
|
||||
const type = guessSerializerType(rawInit);
|
||||
const serializer = (_a2 = options.serializer) != null ? _a2 : StorageSerializers[type];
|
||||
const { pause: pauseWatch, resume: resumeWatch } = watchPausable(data, () => write(data.value), { flush, deep, eventFilter });
|
||||
if (window2 && listenToStorageChanges) {
|
||||
useEventListener(window2, "storage", update);
|
||||
useEventListener(window2, customStorageEventName, updateFromCustomEvent);
|
||||
}
|
||||
update();
|
||||
return data;
|
||||
function write(v) {
|
||||
try {
|
||||
if (v == null) {
|
||||
storage.removeItem(key);
|
||||
} else {
|
||||
const serialized = serializer.write(v);
|
||||
const oldValue = storage.getItem(key);
|
||||
if (oldValue !== serialized) {
|
||||
storage.setItem(key, serialized);
|
||||
if (window2) {
|
||||
window2.dispatchEvent(new CustomEvent(customStorageEventName, {
|
||||
detail: {
|
||||
key,
|
||||
oldValue,
|
||||
newValue: serialized,
|
||||
storageArea: storage
|
||||
}
|
||||
}));
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
onError(e);
|
||||
}
|
||||
}
|
||||
function read(event) {
|
||||
const rawValue = event ? event.newValue : storage.getItem(key);
|
||||
if (rawValue == null) {
|
||||
if (writeDefaults && rawInit !== null)
|
||||
storage.setItem(key, serializer.write(rawInit));
|
||||
return rawInit;
|
||||
} else if (!event && mergeDefaults) {
|
||||
const value = serializer.read(rawValue);
|
||||
if (isFunction(mergeDefaults))
|
||||
return mergeDefaults(value, rawInit);
|
||||
else if (type === "object" && !Array.isArray(value))
|
||||
return __spreadValues$k(__spreadValues$k({}, rawInit), value);
|
||||
return value;
|
||||
} else if (typeof rawValue !== "string") {
|
||||
return rawValue;
|
||||
} else {
|
||||
return serializer.read(rawValue);
|
||||
}
|
||||
}
|
||||
function updateFromCustomEvent(event) {
|
||||
update(event.detail);
|
||||
}
|
||||
function update(event) {
|
||||
if (event && event.storageArea !== storage)
|
||||
return;
|
||||
if (event && event.key == null) {
|
||||
data.value = rawInit;
|
||||
return;
|
||||
}
|
||||
if (event && event.key !== key)
|
||||
return;
|
||||
pauseWatch();
|
||||
try {
|
||||
data.value = read(event);
|
||||
} catch (e) {
|
||||
onError(e);
|
||||
} finally {
|
||||
if (event)
|
||||
nextTick(resumeWatch);
|
||||
else
|
||||
resumeWatch();
|
||||
}
|
||||
}
|
||||
}
|
||||
function usePreferredDark(options) {
|
||||
return useMediaQuery("(prefers-color-scheme: dark)", options);
|
||||
}
|
||||
var __defProp$j = Object.defineProperty;
|
||||
var __getOwnPropSymbols$l = Object.getOwnPropertySymbols;
|
||||
var __hasOwnProp$l = Object.prototype.hasOwnProperty;
|
||||
var __propIsEnum$l = Object.prototype.propertyIsEnumerable;
|
||||
var __defNormalProp$j = (obj, key, value) => key in obj ? __defProp$j(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
||||
var __spreadValues$j = (a, b) => {
|
||||
for (var prop in b || (b = {}))
|
||||
if (__hasOwnProp$l.call(b, prop))
|
||||
__defNormalProp$j(a, prop, b[prop]);
|
||||
if (__getOwnPropSymbols$l)
|
||||
for (var prop of __getOwnPropSymbols$l(b)) {
|
||||
if (__propIsEnum$l.call(b, prop))
|
||||
__defNormalProp$j(a, prop, b[prop]);
|
||||
}
|
||||
return a;
|
||||
};
|
||||
function useColorMode(options = {}) {
|
||||
const {
|
||||
selector = "html",
|
||||
attribute = "class",
|
||||
initialValue = "auto",
|
||||
window: window2 = defaultWindow,
|
||||
storage,
|
||||
storageKey = "vueuse-color-scheme",
|
||||
listenToStorageChanges = true,
|
||||
storageRef,
|
||||
emitAuto
|
||||
} = options;
|
||||
const modes = __spreadValues$j({
|
||||
auto: "",
|
||||
light: "light",
|
||||
dark: "dark"
|
||||
}, options.modes || {});
|
||||
const preferredDark = usePreferredDark({ window: window2 });
|
||||
const preferredMode = computed(() => preferredDark.value ? "dark" : "light");
|
||||
const store = storageRef || (storageKey == null ? ref(initialValue) : useStorage(storageKey, initialValue, storage, { window: window2, listenToStorageChanges }));
|
||||
const state = computed({
|
||||
get() {
|
||||
return store.value === "auto" && !emitAuto ? preferredMode.value : store.value;
|
||||
},
|
||||
set(v) {
|
||||
store.value = v;
|
||||
}
|
||||
});
|
||||
const updateHTMLAttrs = getSSRHandler("updateHTMLAttrs", (selector2, attribute2, value) => {
|
||||
const el = window2 == null ? void 0 : window2.document.querySelector(selector2);
|
||||
if (!el)
|
||||
return;
|
||||
if (attribute2 === "class") {
|
||||
const current = value.split(/\s/g);
|
||||
Object.values(modes).flatMap((i) => (i || "").split(/\s/g)).filter(Boolean).forEach((v) => {
|
||||
if (current.includes(v))
|
||||
el.classList.add(v);
|
||||
else
|
||||
el.classList.remove(v);
|
||||
});
|
||||
} else {
|
||||
el.setAttribute(attribute2, value);
|
||||
}
|
||||
});
|
||||
function defaultOnChanged(mode) {
|
||||
var _a2;
|
||||
const resolvedMode = mode === "auto" ? preferredMode.value : mode;
|
||||
updateHTMLAttrs(selector, attribute, (_a2 = modes[resolvedMode]) != null ? _a2 : resolvedMode);
|
||||
}
|
||||
function onChanged(mode) {
|
||||
if (options.onChanged)
|
||||
options.onChanged(mode, defaultOnChanged);
|
||||
else
|
||||
defaultOnChanged(mode);
|
||||
}
|
||||
watch(state, onChanged, { flush: "post", immediate: true });
|
||||
if (emitAuto)
|
||||
watch(preferredMode, () => onChanged(state.value), { flush: "post" });
|
||||
tryOnMounted(() => onChanged(state.value));
|
||||
return state;
|
||||
}
|
||||
var __defProp$i = Object.defineProperty;
|
||||
var __defProps$7 = Object.defineProperties;
|
||||
var __getOwnPropDescs$7 = Object.getOwnPropertyDescriptors;
|
||||
var __getOwnPropSymbols$k = Object.getOwnPropertySymbols;
|
||||
var __hasOwnProp$k = Object.prototype.hasOwnProperty;
|
||||
var __propIsEnum$k = Object.prototype.propertyIsEnumerable;
|
||||
var __defNormalProp$i = (obj, key, value) => key in obj ? __defProp$i(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
||||
var __spreadValues$i = (a, b) => {
|
||||
for (var prop in b || (b = {}))
|
||||
if (__hasOwnProp$k.call(b, prop))
|
||||
__defNormalProp$i(a, prop, b[prop]);
|
||||
if (__getOwnPropSymbols$k)
|
||||
for (var prop of __getOwnPropSymbols$k(b)) {
|
||||
if (__propIsEnum$k.call(b, prop))
|
||||
__defNormalProp$i(a, prop, b[prop]);
|
||||
}
|
||||
return a;
|
||||
};
|
||||
var __spreadProps$7 = (a, b) => __defProps$7(a, __getOwnPropDescs$7(b));
|
||||
function useDark(options = {}) {
|
||||
const {
|
||||
valueDark = "dark",
|
||||
valueLight = "",
|
||||
window: window2 = defaultWindow
|
||||
} = options;
|
||||
const mode = useColorMode(__spreadProps$7(__spreadValues$i({}, options), {
|
||||
onChanged: (mode2, defaultHandler) => {
|
||||
var _a2;
|
||||
if (options.onChanged)
|
||||
(_a2 = options.onChanged) == null ? void 0 : _a2.call(options, mode2 === "dark");
|
||||
else
|
||||
defaultHandler(mode2);
|
||||
},
|
||||
modes: {
|
||||
dark: valueDark,
|
||||
light: valueLight
|
||||
}
|
||||
}));
|
||||
const preferredDark = usePreferredDark({ window: window2 });
|
||||
const isDark = computed({
|
||||
get() {
|
||||
return mode.value === "dark";
|
||||
},
|
||||
set(v) {
|
||||
if (v === preferredDark.value)
|
||||
mode.value = "auto";
|
||||
else
|
||||
mode.value = v ? "dark" : "light";
|
||||
}
|
||||
});
|
||||
return isDark;
|
||||
}
|
||||
function useDocumentVisibility({ document = defaultDocument } = {}) {
|
||||
if (!document)
|
||||
return ref("visible");
|
||||
const visibility = ref(document.visibilityState);
|
||||
useEventListener(document, "visibilitychange", () => {
|
||||
visibility.value = document.visibilityState;
|
||||
});
|
||||
return visibility;
|
||||
}
|
||||
var __getOwnPropSymbols$g = Object.getOwnPropertySymbols;
|
||||
var __hasOwnProp$g = Object.prototype.hasOwnProperty;
|
||||
var __propIsEnum$g = Object.prototype.propertyIsEnumerable;
|
||||
var __objRest$2 = (source, exclude) => {
|
||||
var target = {};
|
||||
for (var prop in source)
|
||||
if (__hasOwnProp$g.call(source, prop) && exclude.indexOf(prop) < 0)
|
||||
target[prop] = source[prop];
|
||||
if (source != null && __getOwnPropSymbols$g)
|
||||
for (var prop of __getOwnPropSymbols$g(source)) {
|
||||
if (exclude.indexOf(prop) < 0 && __propIsEnum$g.call(source, prop))
|
||||
target[prop] = source[prop];
|
||||
}
|
||||
return target;
|
||||
};
|
||||
function useResizeObserver(target, callback, options = {}) {
|
||||
const _a2 = options, { window: window2 = defaultWindow } = _a2, observerOptions = __objRest$2(_a2, ["window"]);
|
||||
let observer;
|
||||
const isSupported = useSupported(() => window2 && "ResizeObserver" in window2);
|
||||
const cleanup = () => {
|
||||
if (observer) {
|
||||
observer.disconnect();
|
||||
observer = void 0;
|
||||
}
|
||||
};
|
||||
const stopWatch = watch(() => unrefElement(target), (el) => {
|
||||
cleanup();
|
||||
if (isSupported.value && window2 && el) {
|
||||
observer = new ResizeObserver(callback);
|
||||
observer.observe(el, observerOptions);
|
||||
}
|
||||
}, { immediate: true, flush: "post" });
|
||||
const stop = () => {
|
||||
cleanup();
|
||||
stopWatch();
|
||||
};
|
||||
tryOnScopeDispose(stop);
|
||||
return {
|
||||
isSupported,
|
||||
stop
|
||||
};
|
||||
}
|
||||
var SwipeDirection;
|
||||
(function(SwipeDirection2) {
|
||||
SwipeDirection2["UP"] = "UP";
|
||||
SwipeDirection2["RIGHT"] = "RIGHT";
|
||||
SwipeDirection2["DOWN"] = "DOWN";
|
||||
SwipeDirection2["LEFT"] = "LEFT";
|
||||
SwipeDirection2["NONE"] = "NONE";
|
||||
})(SwipeDirection || (SwipeDirection = {}));
|
||||
var __defProp = Object.defineProperty;
|
||||
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;
|
||||
};
|
||||
const _TransitionPresets = {
|
||||
easeInSine: [0.12, 0, 0.39, 0],
|
||||
easeOutSine: [0.61, 1, 0.88, 1],
|
||||
easeInOutSine: [0.37, 0, 0.63, 1],
|
||||
easeInQuad: [0.11, 0, 0.5, 0],
|
||||
easeOutQuad: [0.5, 1, 0.89, 1],
|
||||
easeInOutQuad: [0.45, 0, 0.55, 1],
|
||||
easeInCubic: [0.32, 0, 0.67, 0],
|
||||
easeOutCubic: [0.33, 1, 0.68, 1],
|
||||
easeInOutCubic: [0.65, 0, 0.35, 1],
|
||||
easeInQuart: [0.5, 0, 0.75, 0],
|
||||
easeOutQuart: [0.25, 1, 0.5, 1],
|
||||
easeInOutQuart: [0.76, 0, 0.24, 1],
|
||||
easeInQuint: [0.64, 0, 0.78, 0],
|
||||
easeOutQuint: [0.22, 1, 0.36, 1],
|
||||
easeInOutQuint: [0.83, 0, 0.17, 1],
|
||||
easeInExpo: [0.7, 0, 0.84, 0],
|
||||
easeOutExpo: [0.16, 1, 0.3, 1],
|
||||
easeInOutExpo: [0.87, 0, 0.13, 1],
|
||||
easeInCirc: [0.55, 0, 1, 0.45],
|
||||
easeOutCirc: [0, 0.55, 0.45, 1],
|
||||
easeInOutCirc: [0.85, 0, 0.15, 1],
|
||||
easeInBack: [0.36, 0, 0.66, -0.56],
|
||||
easeOutBack: [0.34, 1.56, 0.64, 1],
|
||||
easeInOutBack: [0.68, -0.6, 0.32, 1.6]
|
||||
};
|
||||
__spreadValues({
|
||||
linear: identity
|
||||
}, _TransitionPresets);
|
||||
function useVModel(props, key, emit, options = {}) {
|
||||
var _a2, _b, _c;
|
||||
const {
|
||||
clone = false,
|
||||
passive = false,
|
||||
eventName,
|
||||
deep = false,
|
||||
defaultValue
|
||||
} = options;
|
||||
const vm = getCurrentInstance();
|
||||
const _emit = emit || (vm == null ? void 0 : vm.emit) || ((_a2 = vm == null ? void 0 : vm.$emit) == null ? void 0 : _a2.bind(vm)) || ((_c = (_b = vm == null ? void 0 : vm.proxy) == null ? void 0 : _b.$emit) == null ? void 0 : _c.bind(vm == null ? void 0 : vm.proxy));
|
||||
let event = eventName;
|
||||
if (!key) {
|
||||
{
|
||||
key = "modelValue";
|
||||
}
|
||||
}
|
||||
event = eventName || event || `update:${key.toString()}`;
|
||||
const cloneFn = (val) => !clone ? val : isFunction(clone) ? clone(val) : cloneFnJSON(val);
|
||||
const getValue = () => isDef(props[key]) ? cloneFn(props[key]) : defaultValue;
|
||||
if (passive) {
|
||||
const initialValue = getValue();
|
||||
const proxy = ref(initialValue);
|
||||
watch(() => props[key], (v) => proxy.value = cloneFn(v));
|
||||
watch(proxy, (v) => {
|
||||
if (v !== props[key] || deep)
|
||||
_emit(event, v);
|
||||
}, { deep });
|
||||
return proxy;
|
||||
} else {
|
||||
return computed({
|
||||
get() {
|
||||
return getValue();
|
||||
},
|
||||
set(value) {
|
||||
_emit(event, value);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
function useWindowFocus({ window: window2 = defaultWindow } = {}) {
|
||||
if (!window2)
|
||||
return ref(false);
|
||||
const focused = ref(window2.document.hasFocus());
|
||||
useEventListener(window2, "blur", () => {
|
||||
focused.value = false;
|
||||
});
|
||||
useEventListener(window2, "focus", () => {
|
||||
focused.value = true;
|
||||
});
|
||||
return focused;
|
||||
}
|
||||
export {
|
||||
useResizeObserver as a,
|
||||
unrefElement as b,
|
||||
useThrottleFn as c,
|
||||
useTimeoutFn as d,
|
||||
isIOS as e,
|
||||
useDocumentVisibility as f,
|
||||
useWindowFocus as g,
|
||||
computedEager as h,
|
||||
isClient as i,
|
||||
useVModel as j,
|
||||
useDark as k,
|
||||
onClickOutside as o,
|
||||
refDebounced as r,
|
||||
tryOnScopeDispose as t,
|
||||
useEventListener as u
|
||||
};
|
||||
@@ -1,173 +0,0 @@
|
||||
import { p as provideKeyCurArticleInfo, o as openNewArticleReferenceWindow, a as openNewArticleLogWindow, _ as _export_sfc } from "./index-c0c27055.js";
|
||||
import { E as defineComponent, z as inject, ah as resolveComponent, o as openBlock, c as createElementBlock, O as createVNode, R as withCtx, a as createBaseVNode, W as toDisplayString, u as unref, X as createCommentVNode, V as createTextVNode, ab as toRaw, ay as pushScopeId, az as popScopeId } from "./@vue-364b3ba4.js";
|
||||
import "./element-plus-e2d52cdd.js";
|
||||
import "./lodash-es-42b2b1f3.js";
|
||||
import "./async-validator-3256c125.js";
|
||||
import "./@vueuse-19bc569b.js";
|
||||
import "./@element-plus-0eaea524.js";
|
||||
import "./dayjs-6d657463.js";
|
||||
import "./@braintree-12043bbe.js";
|
||||
import "./@ctrl-ab5a38b7.js";
|
||||
import "./@popperjs-8eb851c6.js";
|
||||
import "./escape-html-4392a897.js";
|
||||
import "./normalize-wheel-es-a50d6d2e.js";
|
||||
import "./vue-router-f8cb7117.js";
|
||||
import "./axios-52a074ad.js";
|
||||
import "./pinia-12acb2c6.js";
|
||||
import "./lodash-a31254c0.js";
|
||||
import "./echarts-81ee5d1a.js";
|
||||
import "./zrender-7e0bbddb.js";
|
||||
import "./@codemirror-1642cad3.js";
|
||||
import "./@lezer-f512215d.js";
|
||||
import "./crelt-e4f1dcc3.js";
|
||||
import "./style-mod-9b511968.js";
|
||||
import "./w3c-keyname-2f5b428c.js";
|
||||
import "./marked-5af8cb72.js";
|
||||
import "./marked-katex-extension-3867ecbe.js";
|
||||
import "./katex-80f36097.js";
|
||||
import "./marked-highlight-2c456749.js";
|
||||
import "./highlight.js-e85a0efa.js";
|
||||
import "./mermaid-00332b60.js";
|
||||
import "./d3-transition-fc8016c4.js";
|
||||
import "./d3-dispatch-9936551e.js";
|
||||
import "./d3-timer-98fd67ae.js";
|
||||
import "./d3-interpolate-44ef0aea.js";
|
||||
import "./d3-color-65ecfa0f.js";
|
||||
import "./d3-selection-ec178582.js";
|
||||
import "./d3-ease-921d15ba.js";
|
||||
import "./d3-zoom-f0aa3407.js";
|
||||
import "./d3-drag-e94a8d41.js";
|
||||
import "./dompurify-4ba20628.js";
|
||||
import "./dagre-d3-es-921003d2.js";
|
||||
import "./d3-shape-a0afbb89.js";
|
||||
import "./d3-path-5f8d6c00.js";
|
||||
import "./d3-fetch-bbc298d1.js";
|
||||
import "./khroma-36c1e783.js";
|
||||
import "./uuid-3874c49c.js";
|
||||
import "./d3-scale-8ddd7af4.js";
|
||||
import "./internmap-0ab9411c.js";
|
||||
import "./d3-array-511ddb60.js";
|
||||
import "./d3-format-6c965616.js";
|
||||
import "./d3-time-format-b4bed30c.js";
|
||||
import "./d3-time-a52c0c86.js";
|
||||
import "./d3-axis-c99728e0.js";
|
||||
import "./elkjs-f7b2278c.js";
|
||||
import "./ts-dedent-eeefe080.js";
|
||||
import "./mdast-util-from-markdown-64cdcdcb.js";
|
||||
import "./micromark-f6c6e66c.js";
|
||||
import "./micromark-util-combine-extensions-25166568.js";
|
||||
import "./micromark-util-chunked-b50d5f7c.js";
|
||||
import "./micromark-factory-space-6db398ce.js";
|
||||
import "./micromark-util-character-89d8b557.js";
|
||||
import "./micromark-core-commonmark-e993cb99.js";
|
||||
import "./micromark-util-classify-character-5d623242.js";
|
||||
import "./micromark-util-resolve-all-e737a054.js";
|
||||
import "./decode-named-character-reference-3508650d.js";
|
||||
import "./micromark-util-subtokenize-b5a12a10.js";
|
||||
import "./micromark-factory-destination-9634da8c.js";
|
||||
import "./micromark-factory-label-685637c9.js";
|
||||
import "./micromark-factory-title-6caff633.js";
|
||||
import "./micromark-factory-whitespace-25e35b8b.js";
|
||||
import "./micromark-util-normalize-identifier-4f823864.js";
|
||||
import "./micromark-util-html-tag-name-b67bc85d.js";
|
||||
import "./micromark-util-decode-numeric-character-reference-334bc6ac.js";
|
||||
import "./micromark-util-decode-string-c5a05620.js";
|
||||
import "./unist-util-stringify-position-f4d19e8d.js";
|
||||
import "./mdast-util-to-string-e503658e.js";
|
||||
import "./cytoscape-4694d5ae.js";
|
||||
import "./cytoscape-cose-bilkent-2ffcadaf.js";
|
||||
import "./cose-base-d024680b.js";
|
||||
import "./layout-base-c9290116.js";
|
||||
import "./stylis-bacbcf2a.js";
|
||||
import "./d3-sankey-57c9b703.js";
|
||||
import "./d3-scale-chromatic-fa461606.js";
|
||||
import "./markmap-lib-4e7f7dd6.js";
|
||||
import "./@babel-d9a14db7.js";
|
||||
import "./remarkable-9ef756fc.js";
|
||||
import "./markmap-common-e19b15e2.js";
|
||||
import "./remarkable-katex-9c6f6947.js";
|
||||
import "./js-yaml-54b37f1b.js";
|
||||
import "./markmap-view-ae516497.js";
|
||||
import "./hotkeys-js-926ea2e6.js";
|
||||
import "./codemirror-1bcbe02b.js";
|
||||
import "./prettier-e922c0c2.js";
|
||||
const _withScopeId = (n) => (pushScopeId("data-v-14c9d11d"), n = n(), popScopeId(), n);
|
||||
const _hoisted_1 = { class: "editor-status-root" };
|
||||
const _hoisted_2 = { key: 0 };
|
||||
const _hoisted_3 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createBaseVNode("span", { class: "iconbl bl-a-filehistory-line" }, null, -1));
|
||||
const _hoisted_4 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createBaseVNode("span", { class: "iconbl bl-correlation-line" }, null, -1));
|
||||
const _sfc_main = /* @__PURE__ */ defineComponent({
|
||||
__name: "EditorStatus",
|
||||
props: {
|
||||
renderInterval: {
|
||||
type: Number,
|
||||
default: 0
|
||||
}
|
||||
},
|
||||
setup(__props) {
|
||||
const props = __props;
|
||||
const curDoc = inject(provideKeyCurArticleInfo);
|
||||
const openArticleReferenceWindow = () => {
|
||||
if (curDoc && curDoc.value) {
|
||||
openNewArticleReferenceWindow(toRaw(curDoc.value));
|
||||
}
|
||||
};
|
||||
const openArticleLogWindow = () => {
|
||||
if (curDoc && curDoc.value) {
|
||||
openNewArticleLogWindow(toRaw(curDoc.value));
|
||||
}
|
||||
};
|
||||
return (_ctx, _cache) => {
|
||||
const _component_bl_row = resolveComponent("bl-row");
|
||||
const _component_bl_col = resolveComponent("bl-col");
|
||||
return openBlock(), createElementBlock("div", _hoisted_1, [
|
||||
createVNode(_component_bl_row, {
|
||||
width: "calc(100% - 240px)",
|
||||
height: "100%",
|
||||
class: "status-item-container"
|
||||
}, {
|
||||
default: withCtx(() => [
|
||||
createBaseVNode("div", null, " 《" + toDisplayString(unref(curDoc)?.name) + "》 ", 1),
|
||||
createBaseVNode("div", null, " 版本:" + toDisplayString(unref(curDoc)?.version), 1),
|
||||
createBaseVNode("div", null, " 字数:" + toDisplayString(unref(curDoc)?.words), 1),
|
||||
createBaseVNode("div", null, " 最近修改:" + toDisplayString(unref(curDoc)?.updTime), 1),
|
||||
unref(curDoc)?.openTime ? (openBlock(), createElementBlock("div", _hoisted_2, " 发布:" + toDisplayString(unref(curDoc)?.openTime), 1)) : createCommentVNode("", true)
|
||||
]),
|
||||
_: 1
|
||||
}),
|
||||
createVNode(_component_bl_row, {
|
||||
just: "flex-end",
|
||||
width: "240px",
|
||||
height: "100%",
|
||||
class: "status-item-container"
|
||||
}, {
|
||||
default: withCtx(() => [
|
||||
createBaseVNode("div", { onClick: openArticleLogWindow }, [
|
||||
_hoisted_3,
|
||||
createTextVNode(" 编辑记录 ")
|
||||
]),
|
||||
createBaseVNode("div", { onClick: openArticleReferenceWindow }, [
|
||||
_hoisted_4,
|
||||
createTextVNode(" 引用网络 ")
|
||||
]),
|
||||
createVNode(_component_bl_col, {
|
||||
width: "100px",
|
||||
just: "center"
|
||||
}, {
|
||||
default: withCtx(() => [
|
||||
createTextVNode(" 渲染用时: " + toDisplayString(props.renderInterval) + "ms ", 1)
|
||||
]),
|
||||
_: 1
|
||||
})
|
||||
]),
|
||||
_: 1
|
||||
})
|
||||
]);
|
||||
};
|
||||
}
|
||||
});
|
||||
const EditorStatus_vue_vue_type_style_index_0_scoped_14c9d11d_lang = "";
|
||||
const EditorStatus = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-14c9d11d"]]);
|
||||
export {
|
||||
EditorStatus as default
|
||||
};
|
||||
@@ -1,36 +0,0 @@
|
||||
.editor-status-root[data-v-14c9d11d] {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
font-size: 10px;
|
||||
font-weight: 500;
|
||||
color: var(--bl-editor-color);
|
||||
background-color: var(--bl-editor-gutters-bg-color);
|
||||
}
|
||||
.editor-status-root .status-item-container[data-v-14c9d11d] {
|
||||
overflow-x: overlay;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.editor-status-root .status-item-container > div[data-v-14c9d11d] {
|
||||
height: 100%;
|
||||
padding: 0 5px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.editor-status-root .status-item-container > div .iconbl[data-v-14c9d11d] {
|
||||
padding-right: 4px;
|
||||
}
|
||||
.editor-status-root .status-item-container > div[data-v-14c9d11d]:hover {
|
||||
background-color: var(--bl-editor-bg-color);
|
||||
}
|
||||
.editor-status-root .tag-root[data-v-14c9d11d] {
|
||||
cursor: pointer;
|
||||
}
|
||||
.editor-status-root div[data-v-14c9d11d] {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
}
|
||||
|
Before Width: | Height: | Size: 437 KiB |
|
Before Width: | Height: | Size: 469 KiB |
|
Before Width: | Height: | Size: 423 KiB |
|
Before Width: | Height: | Size: 352 KiB |
|
Before Width: | Height: | Size: 5.5 KiB |
|
Before Width: | Height: | Size: 35 KiB |
|
Before Width: | Height: | Size: 74 KiB |
|
Before Width: | Height: | Size: 420 KiB |
|
Before Width: | Height: | Size: 468 KiB |
|
Before Width: | Height: | Size: 427 KiB |
|
Before Width: | Height: | Size: 437 KiB |
|
Before Width: | Height: | Size: 6.1 KiB |
@@ -1,32 +0,0 @@
|
||||
import { l as lineNumbers, h as highlightActiveLineGutter, a as highlightSpecialChars, b as history, f as foldGutter, d as drawSelection, c as dropCursor, E as EditorState, i as indentOnInput, s as syntaxHighlighting, e as bracketMatching, g as closeBrackets, j as autocompletion, r as rectangularSelection, k as crosshairCursor, m as highlightActiveLine, n as highlightSelectionMatches, o as keymap, p as closeBracketsKeymap, q as defaultKeymap, t as searchKeymap, u as historyKeymap, v as foldKeymap, w as completionKeymap, x as lintKeymap, y as defaultHighlightStyle } from "./@codemirror-1642cad3.js";
|
||||
const basicSetup = /* @__PURE__ */ (() => [
|
||||
lineNumbers(),
|
||||
highlightActiveLineGutter(),
|
||||
highlightSpecialChars(),
|
||||
history(),
|
||||
foldGutter(),
|
||||
drawSelection(),
|
||||
dropCursor(),
|
||||
EditorState.allowMultipleSelections.of(true),
|
||||
indentOnInput(),
|
||||
syntaxHighlighting(defaultHighlightStyle, { fallback: true }),
|
||||
bracketMatching(),
|
||||
closeBrackets(),
|
||||
autocompletion(),
|
||||
rectangularSelection(),
|
||||
crosshairCursor(),
|
||||
highlightActiveLine(),
|
||||
highlightSelectionMatches(),
|
||||
keymap.of([
|
||||
...closeBracketsKeymap,
|
||||
...defaultKeymap,
|
||||
...searchKeymap,
|
||||
...historyKeymap,
|
||||
...foldKeymap,
|
||||
...completionKeymap,
|
||||
...lintKeymap
|
||||
])
|
||||
])();
|
||||
export {
|
||||
basicSetup as b
|
||||
};
|
||||
|
Before Width: | Height: | Size: 430 KiB |
@@ -1,37 +0,0 @@
|
||||
function crelt() {
|
||||
var elt = arguments[0];
|
||||
if (typeof elt == "string")
|
||||
elt = document.createElement(elt);
|
||||
var i = 1, next = arguments[1];
|
||||
if (next && typeof next == "object" && next.nodeType == null && !Array.isArray(next)) {
|
||||
for (var name in next)
|
||||
if (Object.prototype.hasOwnProperty.call(next, name)) {
|
||||
var value = next[name];
|
||||
if (typeof value == "string")
|
||||
elt.setAttribute(name, value);
|
||||
else if (value != null)
|
||||
elt[name] = value;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
for (; i < arguments.length; i++)
|
||||
add(elt, arguments[i]);
|
||||
return elt;
|
||||
}
|
||||
function add(elt, child) {
|
||||
if (typeof child == "string") {
|
||||
elt.appendChild(document.createTextNode(child));
|
||||
} else if (child == null)
|
||||
;
|
||||
else if (child.nodeType != null) {
|
||||
elt.appendChild(child);
|
||||
} else if (Array.isArray(child)) {
|
||||
for (var i = 0; i < child.length; i++)
|
||||
add(elt, child[i]);
|
||||
} else {
|
||||
throw new RangeError("Unsupported child node: " + child);
|
||||
}
|
||||
}
|
||||
export {
|
||||
crelt as c
|
||||
};
|
||||
@@ -1,383 +0,0 @@
|
||||
import { c as commonjsGlobal, g as getDefaultExportFromCjs } from "./@braintree-12043bbe.js";
|
||||
import { r as requireCoseBase } from "./cose-base-d024680b.js";
|
||||
var cytoscapeCoseBilkent = { exports: {} };
|
||||
(function(module, exports) {
|
||||
(function webpackUniversalModuleDefinition(root, factory) {
|
||||
module.exports = factory(requireCoseBase());
|
||||
})(commonjsGlobal, function(__WEBPACK_EXTERNAL_MODULE_0__) {
|
||||
return (
|
||||
/******/
|
||||
function(modules) {
|
||||
var installedModules = {};
|
||||
function __webpack_require__(moduleId) {
|
||||
if (installedModules[moduleId]) {
|
||||
return installedModules[moduleId].exports;
|
||||
}
|
||||
var module2 = installedModules[moduleId] = {
|
||||
/******/
|
||||
i: moduleId,
|
||||
/******/
|
||||
l: false,
|
||||
/******/
|
||||
exports: {}
|
||||
/******/
|
||||
};
|
||||
modules[moduleId].call(module2.exports, module2, module2.exports, __webpack_require__);
|
||||
module2.l = true;
|
||||
return module2.exports;
|
||||
}
|
||||
__webpack_require__.m = modules;
|
||||
__webpack_require__.c = installedModules;
|
||||
__webpack_require__.i = function(value) {
|
||||
return value;
|
||||
};
|
||||
__webpack_require__.d = function(exports2, name, getter) {
|
||||
if (!__webpack_require__.o(exports2, name)) {
|
||||
Object.defineProperty(exports2, name, {
|
||||
/******/
|
||||
configurable: false,
|
||||
/******/
|
||||
enumerable: true,
|
||||
/******/
|
||||
get: getter
|
||||
/******/
|
||||
});
|
||||
}
|
||||
};
|
||||
__webpack_require__.n = function(module2) {
|
||||
var getter = module2 && module2.__esModule ? (
|
||||
/******/
|
||||
function getDefault() {
|
||||
return module2["default"];
|
||||
}
|
||||
) : (
|
||||
/******/
|
||||
function getModuleExports() {
|
||||
return module2;
|
||||
}
|
||||
);
|
||||
__webpack_require__.d(getter, "a", getter);
|
||||
return getter;
|
||||
};
|
||||
__webpack_require__.o = function(object, property) {
|
||||
return Object.prototype.hasOwnProperty.call(object, property);
|
||||
};
|
||||
__webpack_require__.p = "";
|
||||
return __webpack_require__(__webpack_require__.s = 1);
|
||||
}([
|
||||
/* 0 */
|
||||
/***/
|
||||
function(module2, exports2) {
|
||||
module2.exports = __WEBPACK_EXTERNAL_MODULE_0__;
|
||||
},
|
||||
/* 1 */
|
||||
/***/
|
||||
function(module2, exports2, __webpack_require__) {
|
||||
var LayoutConstants = __webpack_require__(0).layoutBase.LayoutConstants;
|
||||
var FDLayoutConstants = __webpack_require__(0).layoutBase.FDLayoutConstants;
|
||||
var CoSEConstants = __webpack_require__(0).CoSEConstants;
|
||||
var CoSELayout = __webpack_require__(0).CoSELayout;
|
||||
var CoSENode = __webpack_require__(0).CoSENode;
|
||||
var PointD = __webpack_require__(0).layoutBase.PointD;
|
||||
var DimensionD = __webpack_require__(0).layoutBase.DimensionD;
|
||||
var defaults = {
|
||||
// Called on `layoutready`
|
||||
ready: function ready() {
|
||||
},
|
||||
// Called on `layoutstop`
|
||||
stop: function stop() {
|
||||
},
|
||||
// 'draft', 'default' or 'proof"
|
||||
// - 'draft' fast cooling rate
|
||||
// - 'default' moderate cooling rate
|
||||
// - "proof" slow cooling rate
|
||||
quality: "default",
|
||||
// include labels in node dimensions
|
||||
nodeDimensionsIncludeLabels: false,
|
||||
// number of ticks per frame; higher is faster but more jerky
|
||||
refresh: 30,
|
||||
// Whether to fit the network view after when done
|
||||
fit: true,
|
||||
// Padding on fit
|
||||
padding: 10,
|
||||
// Whether to enable incremental mode
|
||||
randomize: true,
|
||||
// Node repulsion (non overlapping) multiplier
|
||||
nodeRepulsion: 4500,
|
||||
// Ideal edge (non nested) length
|
||||
idealEdgeLength: 50,
|
||||
// Divisor to compute edge forces
|
||||
edgeElasticity: 0.45,
|
||||
// Nesting factor (multiplier) to compute ideal edge length for nested edges
|
||||
nestingFactor: 0.1,
|
||||
// Gravity force (constant)
|
||||
gravity: 0.25,
|
||||
// Maximum number of iterations to perform
|
||||
numIter: 2500,
|
||||
// For enabling tiling
|
||||
tile: true,
|
||||
// Type of layout animation. The option set is {'during', 'end', false}
|
||||
animate: "end",
|
||||
// Duration for animate:end
|
||||
animationDuration: 500,
|
||||
// Represents the amount of the vertical space to put between the zero degree members during the tiling operation(can also be a function)
|
||||
tilingPaddingVertical: 10,
|
||||
// Represents the amount of the horizontal space to put between the zero degree members during the tiling operation(can also be a function)
|
||||
tilingPaddingHorizontal: 10,
|
||||
// Gravity range (constant) for compounds
|
||||
gravityRangeCompound: 1.5,
|
||||
// Gravity force (constant) for compounds
|
||||
gravityCompound: 1,
|
||||
// Gravity range (constant)
|
||||
gravityRange: 3.8,
|
||||
// Initial cooling factor for incremental layout
|
||||
initialEnergyOnIncremental: 0.5
|
||||
};
|
||||
function extend(defaults2, options) {
|
||||
var obj = {};
|
||||
for (var i in defaults2) {
|
||||
obj[i] = defaults2[i];
|
||||
}
|
||||
for (var i in options) {
|
||||
obj[i] = options[i];
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
function _CoSELayout(_options) {
|
||||
this.options = extend(defaults, _options);
|
||||
getUserOptions(this.options);
|
||||
}
|
||||
var getUserOptions = function getUserOptions2(options) {
|
||||
if (options.nodeRepulsion != null)
|
||||
CoSEConstants.DEFAULT_REPULSION_STRENGTH = FDLayoutConstants.DEFAULT_REPULSION_STRENGTH = options.nodeRepulsion;
|
||||
if (options.idealEdgeLength != null)
|
||||
CoSEConstants.DEFAULT_EDGE_LENGTH = FDLayoutConstants.DEFAULT_EDGE_LENGTH = options.idealEdgeLength;
|
||||
if (options.edgeElasticity != null)
|
||||
CoSEConstants.DEFAULT_SPRING_STRENGTH = FDLayoutConstants.DEFAULT_SPRING_STRENGTH = options.edgeElasticity;
|
||||
if (options.nestingFactor != null)
|
||||
CoSEConstants.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = FDLayoutConstants.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = options.nestingFactor;
|
||||
if (options.gravity != null)
|
||||
CoSEConstants.DEFAULT_GRAVITY_STRENGTH = FDLayoutConstants.DEFAULT_GRAVITY_STRENGTH = options.gravity;
|
||||
if (options.numIter != null)
|
||||
CoSEConstants.MAX_ITERATIONS = FDLayoutConstants.MAX_ITERATIONS = options.numIter;
|
||||
if (options.gravityRange != null)
|
||||
CoSEConstants.DEFAULT_GRAVITY_RANGE_FACTOR = FDLayoutConstants.DEFAULT_GRAVITY_RANGE_FACTOR = options.gravityRange;
|
||||
if (options.gravityCompound != null)
|
||||
CoSEConstants.DEFAULT_COMPOUND_GRAVITY_STRENGTH = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_STRENGTH = options.gravityCompound;
|
||||
if (options.gravityRangeCompound != null)
|
||||
CoSEConstants.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = options.gravityRangeCompound;
|
||||
if (options.initialEnergyOnIncremental != null)
|
||||
CoSEConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL = options.initialEnergyOnIncremental;
|
||||
if (options.quality == "draft")
|
||||
LayoutConstants.QUALITY = 0;
|
||||
else if (options.quality == "proof")
|
||||
LayoutConstants.QUALITY = 2;
|
||||
else
|
||||
LayoutConstants.QUALITY = 1;
|
||||
CoSEConstants.NODE_DIMENSIONS_INCLUDE_LABELS = FDLayoutConstants.NODE_DIMENSIONS_INCLUDE_LABELS = LayoutConstants.NODE_DIMENSIONS_INCLUDE_LABELS = options.nodeDimensionsIncludeLabels;
|
||||
CoSEConstants.DEFAULT_INCREMENTAL = FDLayoutConstants.DEFAULT_INCREMENTAL = LayoutConstants.DEFAULT_INCREMENTAL = !options.randomize;
|
||||
CoSEConstants.ANIMATE = FDLayoutConstants.ANIMATE = LayoutConstants.ANIMATE = options.animate;
|
||||
CoSEConstants.TILE = options.tile;
|
||||
CoSEConstants.TILING_PADDING_VERTICAL = typeof options.tilingPaddingVertical === "function" ? options.tilingPaddingVertical.call() : options.tilingPaddingVertical;
|
||||
CoSEConstants.TILING_PADDING_HORIZONTAL = typeof options.tilingPaddingHorizontal === "function" ? options.tilingPaddingHorizontal.call() : options.tilingPaddingHorizontal;
|
||||
};
|
||||
_CoSELayout.prototype.run = function() {
|
||||
var ready;
|
||||
var frameId;
|
||||
var options = this.options;
|
||||
this.idToLNode = {};
|
||||
var layout = this.layout = new CoSELayout();
|
||||
var self = this;
|
||||
self.stopped = false;
|
||||
this.cy = this.options.cy;
|
||||
this.cy.trigger({ type: "layoutstart", layout: this });
|
||||
var gm = layout.newGraphManager();
|
||||
this.gm = gm;
|
||||
var nodes = this.options.eles.nodes();
|
||||
var edges = this.options.eles.edges();
|
||||
this.root = gm.addRoot();
|
||||
this.processChildrenList(this.root, this.getTopMostNodes(nodes), layout);
|
||||
for (var i = 0; i < edges.length; i++) {
|
||||
var edge = edges[i];
|
||||
var sourceNode = this.idToLNode[edge.data("source")];
|
||||
var targetNode = this.idToLNode[edge.data("target")];
|
||||
if (sourceNode !== targetNode && sourceNode.getEdgesBetween(targetNode).length == 0) {
|
||||
var e1 = gm.add(layout.newEdge(), sourceNode, targetNode);
|
||||
e1.id = edge.id();
|
||||
}
|
||||
}
|
||||
var getPositions = function getPositions2(ele, i2) {
|
||||
if (typeof ele === "number") {
|
||||
ele = i2;
|
||||
}
|
||||
var theId = ele.data("id");
|
||||
var lNode = self.idToLNode[theId];
|
||||
return {
|
||||
x: lNode.getRect().getCenterX(),
|
||||
y: lNode.getRect().getCenterY()
|
||||
};
|
||||
};
|
||||
var iterateAnimated = function iterateAnimated2() {
|
||||
var afterReposition = function afterReposition2() {
|
||||
if (options.fit) {
|
||||
options.cy.fit(options.eles, options.padding);
|
||||
}
|
||||
if (!ready) {
|
||||
ready = true;
|
||||
self.cy.one("layoutready", options.ready);
|
||||
self.cy.trigger({ type: "layoutready", layout: self });
|
||||
}
|
||||
};
|
||||
var ticksPerFrame = self.options.refresh;
|
||||
var isDone;
|
||||
for (var i2 = 0; i2 < ticksPerFrame && !isDone; i2++) {
|
||||
isDone = self.stopped || self.layout.tick();
|
||||
}
|
||||
if (isDone) {
|
||||
if (layout.checkLayoutSuccess() && !layout.isSubLayout) {
|
||||
layout.doPostLayout();
|
||||
}
|
||||
if (layout.tilingPostLayout) {
|
||||
layout.tilingPostLayout();
|
||||
}
|
||||
layout.isLayoutFinished = true;
|
||||
self.options.eles.nodes().positions(getPositions);
|
||||
afterReposition();
|
||||
self.cy.one("layoutstop", self.options.stop);
|
||||
self.cy.trigger({ type: "layoutstop", layout: self });
|
||||
if (frameId) {
|
||||
cancelAnimationFrame(frameId);
|
||||
}
|
||||
ready = false;
|
||||
return;
|
||||
}
|
||||
var animationData = self.layout.getPositionsData();
|
||||
options.eles.nodes().positions(function(ele, i3) {
|
||||
if (typeof ele === "number") {
|
||||
ele = i3;
|
||||
}
|
||||
if (!ele.isParent()) {
|
||||
var theId = ele.id();
|
||||
var pNode = animationData[theId];
|
||||
var temp = ele;
|
||||
while (pNode == null) {
|
||||
pNode = animationData[temp.data("parent")] || animationData["DummyCompound_" + temp.data("parent")];
|
||||
animationData[theId] = pNode;
|
||||
temp = temp.parent()[0];
|
||||
if (temp == void 0) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (pNode != null) {
|
||||
return {
|
||||
x: pNode.x,
|
||||
y: pNode.y
|
||||
};
|
||||
} else {
|
||||
return {
|
||||
x: ele.position("x"),
|
||||
y: ele.position("y")
|
||||
};
|
||||
}
|
||||
}
|
||||
});
|
||||
afterReposition();
|
||||
frameId = requestAnimationFrame(iterateAnimated2);
|
||||
};
|
||||
layout.addListener("layoutstarted", function() {
|
||||
if (self.options.animate === "during") {
|
||||
frameId = requestAnimationFrame(iterateAnimated);
|
||||
}
|
||||
});
|
||||
layout.runLayout();
|
||||
if (this.options.animate !== "during") {
|
||||
self.options.eles.nodes().not(":parent").layoutPositions(self, self.options, getPositions);
|
||||
ready = false;
|
||||
}
|
||||
return this;
|
||||
};
|
||||
_CoSELayout.prototype.getTopMostNodes = function(nodes) {
|
||||
var nodesMap = {};
|
||||
for (var i = 0; i < nodes.length; i++) {
|
||||
nodesMap[nodes[i].id()] = true;
|
||||
}
|
||||
var roots = nodes.filter(function(ele, i2) {
|
||||
if (typeof ele === "number") {
|
||||
ele = i2;
|
||||
}
|
||||
var parent = ele.parent()[0];
|
||||
while (parent != null) {
|
||||
if (nodesMap[parent.id()]) {
|
||||
return false;
|
||||
}
|
||||
parent = parent.parent()[0];
|
||||
}
|
||||
return true;
|
||||
});
|
||||
return roots;
|
||||
};
|
||||
_CoSELayout.prototype.processChildrenList = function(parent, children, layout) {
|
||||
var size = children.length;
|
||||
for (var i = 0; i < size; i++) {
|
||||
var theChild = children[i];
|
||||
var children_of_children = theChild.children();
|
||||
var theNode;
|
||||
var dimensions = theChild.layoutDimensions({
|
||||
nodeDimensionsIncludeLabels: this.options.nodeDimensionsIncludeLabels
|
||||
});
|
||||
if (theChild.outerWidth() != null && theChild.outerHeight() != null) {
|
||||
theNode = parent.add(new CoSENode(layout.graphManager, new PointD(theChild.position("x") - dimensions.w / 2, theChild.position("y") - dimensions.h / 2), new DimensionD(parseFloat(dimensions.w), parseFloat(dimensions.h))));
|
||||
} else {
|
||||
theNode = parent.add(new CoSENode(this.graphManager));
|
||||
}
|
||||
theNode.id = theChild.data("id");
|
||||
theNode.paddingLeft = parseInt(theChild.css("padding"));
|
||||
theNode.paddingTop = parseInt(theChild.css("padding"));
|
||||
theNode.paddingRight = parseInt(theChild.css("padding"));
|
||||
theNode.paddingBottom = parseInt(theChild.css("padding"));
|
||||
if (this.options.nodeDimensionsIncludeLabels) {
|
||||
if (theChild.isParent()) {
|
||||
var labelWidth = theChild.boundingBox({ includeLabels: true, includeNodes: false }).w;
|
||||
var labelHeight = theChild.boundingBox({ includeLabels: true, includeNodes: false }).h;
|
||||
var labelPos = theChild.css("text-halign");
|
||||
theNode.labelWidth = labelWidth;
|
||||
theNode.labelHeight = labelHeight;
|
||||
theNode.labelPos = labelPos;
|
||||
}
|
||||
}
|
||||
this.idToLNode[theChild.data("id")] = theNode;
|
||||
if (isNaN(theNode.rect.x)) {
|
||||
theNode.rect.x = 0;
|
||||
}
|
||||
if (isNaN(theNode.rect.y)) {
|
||||
theNode.rect.y = 0;
|
||||
}
|
||||
if (children_of_children != null && children_of_children.length > 0) {
|
||||
var theNewGraph;
|
||||
theNewGraph = layout.getGraphManager().add(layout.newGraph(), theNode);
|
||||
this.processChildrenList(theNewGraph, children_of_children, layout);
|
||||
}
|
||||
}
|
||||
};
|
||||
_CoSELayout.prototype.stop = function() {
|
||||
this.stopped = true;
|
||||
return this;
|
||||
};
|
||||
var register = function register2(cytoscape2) {
|
||||
cytoscape2("layout", "cose-bilkent", _CoSELayout);
|
||||
};
|
||||
if (typeof cytoscape !== "undefined") {
|
||||
register(cytoscape);
|
||||
}
|
||||
module2.exports = register;
|
||||
}
|
||||
/******/
|
||||
])
|
||||
);
|
||||
});
|
||||
})(cytoscapeCoseBilkent);
|
||||
var cytoscapeCoseBilkentExports = cytoscapeCoseBilkent.exports;
|
||||
const coseBilkent = /* @__PURE__ */ getDefaultExportFromCjs(cytoscapeCoseBilkentExports);
|
||||
export {
|
||||
coseBilkent as c
|
||||
};
|
||||
@@ -1,2 +0,0 @@
|
||||
import "./d3-transition-fc8016c4.js";
|
||||
import "./d3-zoom-f0aa3407.js";
|
||||