|
- var __create = Object.create;
- var __defProp = Object.defineProperty;
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
- var __getOwnPropNames = Object.getOwnPropertyNames;
- var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
- var __require = /* @__PURE__ */ ((x) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(x, {
- get: (a3, b) => (typeof require < "u" ? require : a3)[b]
- }) : x)(function(x) {
- if (typeof require < "u") return require.apply(this, arguments);
- throw Error('Dynamic require of "' + x + '" is not supported');
- });
- var __esm = (fn4, res) => function() {
- return fn4 && (res = (0, fn4[__getOwnPropNames(fn4)[0]])(fn4 = 0)), res;
- };
- var __commonJS = (cb, mod) => function() {
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
- };
- var __export = (target, all) => {
- for (var name in all)
- __defProp(target, name, { get: all[name], enumerable: !0 });
- }, __copyProps = (to, from2, except, desc) => {
- if (from2 && typeof from2 == "object" || typeof from2 == "function")
- for (let key of __getOwnPropNames(from2))
- !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc(from2, key)) || desc.enumerable });
- return to;
- };
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
- // If the importer is in node compatibility mode or this is not an ESM
- // file that has been converted to a CommonJS file using a Babel-
- // compatible transform (i.e. "__esModule" has not been set), then set
- // "default" to the CommonJS "module.exports" for node compatibility.
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
- mod
- ));
-
- // ../../node_modules/react/cjs/react.production.min.js
- var require_react_production_min = __commonJS({
- "../../node_modules/react/cjs/react.production.min.js"(exports) {
- "use strict";
- var l = Symbol.for("react.element"), n = Symbol.for("react.portal"), p3 = Symbol.for("react.fragment"), q = Symbol.for("react.strict_mode"), r2 = Symbol.for("react.profiler"), t = Symbol.for("react.provider"), u2 = Symbol.for("react.context"), v = Symbol.for("react.forward_ref"), w = Symbol.for("react.suspense"), x = Symbol.for("react.memo"), y = Symbol.for("react.lazy"), z = Symbol.iterator;
- function A3(a3) {
- return a3 === null || typeof a3 != "object" ? null : (a3 = z && a3[z] || a3["@@iterator"], typeof a3 == "function" ? a3 : null);
- }
- var B3 = { isMounted: function() {
- return !1;
- }, enqueueForceUpdate: function() {
- }, enqueueReplaceState: function() {
- }, enqueueSetState: function() {
- } }, C3 = Object.assign, D = {};
- function E(a3, b, e) {
- this.props = a3, this.context = b, this.refs = D, this.updater = e || B3;
- }
- E.prototype.isReactComponent = {};
- E.prototype.setState = function(a3, b) {
- if (typeof a3 != "object" && typeof a3 != "function" && a3 != null) throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");
- this.updater.enqueueSetState(this, a3, b, "setState");
- };
- E.prototype.forceUpdate = function(a3) {
- this.updater.enqueueForceUpdate(this, a3, "forceUpdate");
- };
- function F() {
- }
- F.prototype = E.prototype;
- function G(a3, b, e) {
- this.props = a3, this.context = b, this.refs = D, this.updater = e || B3;
- }
- var H = G.prototype = new F();
- H.constructor = G;
- C3(H, E.prototype);
- H.isPureReactComponent = !0;
- var I = Array.isArray, J = Object.prototype.hasOwnProperty, K2 = { current: null }, L = { key: !0, ref: !0, __self: !0, __source: !0 };
- function M(a3, b, e) {
- var d, c = {}, k = null, h3 = null;
- if (b != null) for (d in b.ref !== void 0 && (h3 = b.ref), b.key !== void 0 && (k = "" + b.key), b) J.call(b, d) && !L.hasOwnProperty(d) && (c[d] = b[d]);
- var g2 = arguments.length - 2;
- if (g2 === 1) c.children = e;
- else if (1 < g2) {
- for (var f4 = Array(g2), m3 = 0; m3 < g2; m3++) f4[m3] = arguments[m3 + 2];
- c.children = f4;
- }
- if (a3 && a3.defaultProps) for (d in g2 = a3.defaultProps, g2) c[d] === void 0 && (c[d] = g2[d]);
- return { $$typeof: l, type: a3, key: k, ref: h3, props: c, _owner: K2.current };
- }
- function N(a3, b) {
- return { $$typeof: l, type: a3.type, key: b, ref: a3.ref, props: a3.props, _owner: a3._owner };
- }
- function O(a3) {
- return typeof a3 == "object" && a3 !== null && a3.$$typeof === l;
- }
- function escape4(a3) {
- var b = { "=": "=0", ":": "=2" };
- return "$" + a3.replace(/[=:]/g, function(a4) {
- return b[a4];
- });
- }
- var P3 = /\/+/g;
- function Q(a3, b) {
- return typeof a3 == "object" && a3 !== null && a3.key != null ? escape4("" + a3.key) : b.toString(36);
- }
- function R(a3, b, e, d, c) {
- var k = typeof a3;
- (k === "undefined" || k === "boolean") && (a3 = null);
- var h3 = !1;
- if (a3 === null) h3 = !0;
- else switch (k) {
- case "string":
- case "number":
- h3 = !0;
- break;
- case "object":
- switch (a3.$$typeof) {
- case l:
- case n:
- h3 = !0;
- }
- }
- if (h3) return h3 = a3, c = c(h3), a3 = d === "" ? "." + Q(h3, 0) : d, I(c) ? (e = "", a3 != null && (e = a3.replace(P3, "$&/") + "/"), R(c, b, e, "", function(a4) {
- return a4;
- })) : c != null && (O(c) && (c = N(c, e + (!c.key || h3 && h3.key === c.key ? "" : ("" + c.key).replace(P3, "$&/") + "/") + a3)), b.push(c)), 1;
- if (h3 = 0, d = d === "" ? "." : d + ":", I(a3)) for (var g2 = 0; g2 < a3.length; g2++) {
- k = a3[g2];
- var f4 = d + Q(k, g2);
- h3 += R(k, b, e, f4, c);
- }
- else if (f4 = A3(a3), typeof f4 == "function") for (a3 = f4.call(a3), g2 = 0; !(k = a3.next()).done; ) k = k.value, f4 = d + Q(k, g2++), h3 += R(k, b, e, f4, c);
- else if (k === "object") throw b = String(a3), Error("Objects are not valid as a React child (found: " + (b === "[object Object]" ? "object with keys {" + Object.keys(a3).join(", ") + "}" : b) + "). If you meant to render a collection of children, use an array instead.");
- return h3;
- }
- function S(a3, b, e) {
- if (a3 == null) return a3;
- var d = [], c = 0;
- return R(a3, d, "", "", function(a4) {
- return b.call(e, a4, c++);
- }), d;
- }
- function T2(a3) {
- if (a3._status === -1) {
- var b = a3._result;
- b = b(), b.then(function(b2) {
- (a3._status === 0 || a3._status === -1) && (a3._status = 1, a3._result = b2);
- }, function(b2) {
- (a3._status === 0 || a3._status === -1) && (a3._status = 2, a3._result = b2);
- }), a3._status === -1 && (a3._status = 0, a3._result = b);
- }
- if (a3._status === 1) return a3._result.default;
- throw a3._result;
- }
- var U = { current: null }, V = { transition: null }, W = { ReactCurrentDispatcher: U, ReactCurrentBatchConfig: V, ReactCurrentOwner: K2 };
- function X() {
- throw Error("act(...) is not supported in production builds of React.");
- }
- exports.Children = { map: S, forEach: function(a3, b, e) {
- S(a3, function() {
- b.apply(this, arguments);
- }, e);
- }, count: function(a3) {
- var b = 0;
- return S(a3, function() {
- b++;
- }), b;
- }, toArray: function(a3) {
- return S(a3, function(a4) {
- return a4;
- }) || [];
- }, only: function(a3) {
- if (!O(a3)) throw Error("React.Children.only expected to receive a single React element child.");
- return a3;
- } };
- exports.Component = E;
- exports.Fragment = p3;
- exports.Profiler = r2;
- exports.PureComponent = G;
- exports.StrictMode = q;
- exports.Suspense = w;
- exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = W;
- exports.act = X;
- exports.cloneElement = function(a3, b, e) {
- if (a3 == null) throw Error("React.cloneElement(...): The argument must be a React element, but you passed " + a3 + ".");
- var d = C3({}, a3.props), c = a3.key, k = a3.ref, h3 = a3._owner;
- if (b != null) {
- if (b.ref !== void 0 && (k = b.ref, h3 = K2.current), b.key !== void 0 && (c = "" + b.key), a3.type && a3.type.defaultProps) var g2 = a3.type.defaultProps;
- for (f4 in b) J.call(b, f4) && !L.hasOwnProperty(f4) && (d[f4] = b[f4] === void 0 && g2 !== void 0 ? g2[f4] : b[f4]);
- }
- var f4 = arguments.length - 2;
- if (f4 === 1) d.children = e;
- else if (1 < f4) {
- g2 = Array(f4);
- for (var m3 = 0; m3 < f4; m3++) g2[m3] = arguments[m3 + 2];
- d.children = g2;
- }
- return { $$typeof: l, type: a3.type, key: c, ref: k, props: d, _owner: h3 };
- };
- exports.createContext = function(a3) {
- return a3 = { $$typeof: u2, _currentValue: a3, _currentValue2: a3, _threadCount: 0, Provider: null, Consumer: null, _defaultValue: null, _globalName: null }, a3.Provider = { $$typeof: t, _context: a3 }, a3.Consumer = a3;
- };
- exports.createElement = M;
- exports.createFactory = function(a3) {
- var b = M.bind(null, a3);
- return b.type = a3, b;
- };
- exports.createRef = function() {
- return { current: null };
- };
- exports.forwardRef = function(a3) {
- return { $$typeof: v, render: a3 };
- };
- exports.isValidElement = O;
- exports.lazy = function(a3) {
- return { $$typeof: y, _payload: { _status: -1, _result: a3 }, _init: T2 };
- };
- exports.memo = function(a3, b) {
- return { $$typeof: x, type: a3, compare: b === void 0 ? null : b };
- };
- exports.startTransition = function(a3) {
- var b = V.transition;
- V.transition = {};
- try {
- a3();
- } finally {
- V.transition = b;
- }
- };
- exports.unstable_act = X;
- exports.useCallback = function(a3, b) {
- return U.current.useCallback(a3, b);
- };
- exports.useContext = function(a3) {
- return U.current.useContext(a3);
- };
- exports.useDebugValue = function() {
- };
- exports.useDeferredValue = function(a3) {
- return U.current.useDeferredValue(a3);
- };
- exports.useEffect = function(a3, b) {
- return U.current.useEffect(a3, b);
- };
- exports.useId = function() {
- return U.current.useId();
- };
- exports.useImperativeHandle = function(a3, b, e) {
- return U.current.useImperativeHandle(a3, b, e);
- };
- exports.useInsertionEffect = function(a3, b) {
- return U.current.useInsertionEffect(a3, b);
- };
- exports.useLayoutEffect = function(a3, b) {
- return U.current.useLayoutEffect(a3, b);
- };
- exports.useMemo = function(a3, b) {
- return U.current.useMemo(a3, b);
- };
- exports.useReducer = function(a3, b, e) {
- return U.current.useReducer(a3, b, e);
- };
- exports.useRef = function(a3) {
- return U.current.useRef(a3);
- };
- exports.useState = function(a3) {
- return U.current.useState(a3);
- };
- exports.useSyncExternalStore = function(a3, b, e) {
- return U.current.useSyncExternalStore(a3, b, e);
- };
- exports.useTransition = function() {
- return U.current.useTransition();
- };
- exports.version = "18.3.1";
- }
- });
-
- // ../../node_modules/react/index.js
- var require_react = __commonJS({
- "../../node_modules/react/index.js"(exports, module2) {
- "use strict";
- module2.exports = require_react_production_min();
- }
- });
-
- // ../../node_modules/scheduler/cjs/scheduler.production.min.js
- var require_scheduler_production_min = __commonJS({
- "../../node_modules/scheduler/cjs/scheduler.production.min.js"(exports) {
- "use strict";
- function f4(a3, b) {
- var c = a3.length;
- a3.push(b);
- a: for (; 0 < c; ) {
- var d = c - 1 >>> 1, e = a3[d];
- if (0 < g2(e, b)) a3[d] = b, a3[c] = e, c = d;
- else break a;
- }
- }
- function h3(a3) {
- return a3.length === 0 ? null : a3[0];
- }
- function k(a3) {
- if (a3.length === 0) return null;
- var b = a3[0], c = a3.pop();
- if (c !== b) {
- a3[0] = c;
- a: for (var d = 0, e = a3.length, w = e >>> 1; d < w; ) {
- var m3 = 2 * (d + 1) - 1, C3 = a3[m3], n = m3 + 1, x = a3[n];
- if (0 > g2(C3, c)) n < e && 0 > g2(x, C3) ? (a3[d] = x, a3[n] = c, d = n) : (a3[d] = C3, a3[m3] = c, d = m3);
- else if (n < e && 0 > g2(x, c)) a3[d] = x, a3[n] = c, d = n;
- else break a;
- }
- }
- return b;
- }
- function g2(a3, b) {
- var c = a3.sortIndex - b.sortIndex;
- return c !== 0 ? c : a3.id - b.id;
- }
- typeof performance == "object" && typeof performance.now == "function" ? (l = performance, exports.unstable_now = function() {
- return l.now();
- }) : (p3 = Date, q = p3.now(), exports.unstable_now = function() {
- return p3.now() - q;
- });
- var l, p3, q, r2 = [], t = [], u2 = 1, v = null, y = 3, z = !1, A3 = !1, B3 = !1, D = typeof setTimeout == "function" ? setTimeout : null, E = typeof clearTimeout == "function" ? clearTimeout : null, F = typeof setImmediate < "u" ? setImmediate : null;
- typeof navigator < "u" && navigator.scheduling !== void 0 && navigator.scheduling.isInputPending !== void 0 && navigator.scheduling.isInputPending.bind(navigator.scheduling);
- function G(a3) {
- for (var b = h3(t); b !== null; ) {
- if (b.callback === null) k(t);
- else if (b.startTime <= a3) k(t), b.sortIndex = b.expirationTime, f4(r2, b);
- else break;
- b = h3(t);
- }
- }
- function H(a3) {
- if (B3 = !1, G(a3), !A3) if (h3(r2) !== null) A3 = !0, I(J);
- else {
- var b = h3(t);
- b !== null && K2(H, b.startTime - a3);
- }
- }
- function J(a3, b) {
- A3 = !1, B3 && (B3 = !1, E(L), L = -1), z = !0;
- var c = y;
- try {
- for (G(b), v = h3(r2); v !== null && (!(v.expirationTime > b) || a3 && !M()); ) {
- var d = v.callback;
- if (typeof d == "function") {
- v.callback = null, y = v.priorityLevel;
- var e = d(v.expirationTime <= b);
- b = exports.unstable_now(), typeof e == "function" ? v.callback = e : v === h3(r2) && k(r2), G(b);
- } else k(r2);
- v = h3(r2);
- }
- if (v !== null) var w = !0;
- else {
- var m3 = h3(t);
- m3 !== null && K2(H, m3.startTime - b), w = !1;
- }
- return w;
- } finally {
- v = null, y = c, z = !1;
- }
- }
- var N = !1, O = null, L = -1, P3 = 5, Q = -1;
- function M() {
- return !(exports.unstable_now() - Q < P3);
- }
- function R() {
- if (O !== null) {
- var a3 = exports.unstable_now();
- Q = a3;
- var b = !0;
- try {
- b = O(!0, a3);
- } finally {
- b ? S() : (N = !1, O = null);
- }
- } else N = !1;
- }
- var S;
- typeof F == "function" ? S = function() {
- F(R);
- } : typeof MessageChannel < "u" ? (T2 = new MessageChannel(), U = T2.port2, T2.port1.onmessage = R, S = function() {
- U.postMessage(null);
- }) : S = function() {
- D(R, 0);
- };
- var T2, U;
- function I(a3) {
- O = a3, N || (N = !0, S());
- }
- function K2(a3, b) {
- L = D(function() {
- a3(exports.unstable_now());
- }, b);
- }
- exports.unstable_IdlePriority = 5;
- exports.unstable_ImmediatePriority = 1;
- exports.unstable_LowPriority = 4;
- exports.unstable_NormalPriority = 3;
- exports.unstable_Profiling = null;
- exports.unstable_UserBlockingPriority = 2;
- exports.unstable_cancelCallback = function(a3) {
- a3.callback = null;
- };
- exports.unstable_continueExecution = function() {
- A3 || z || (A3 = !0, I(J));
- };
- exports.unstable_forceFrameRate = function(a3) {
- 0 > a3 || 125 < a3 ? console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported") : P3 = 0 < a3 ? Math.floor(1e3 / a3) : 5;
- };
- exports.unstable_getCurrentPriorityLevel = function() {
- return y;
- };
- exports.unstable_getFirstCallbackNode = function() {
- return h3(r2);
- };
- exports.unstable_next = function(a3) {
- switch (y) {
- case 1:
- case 2:
- case 3:
- var b = 3;
- break;
- default:
- b = y;
- }
- var c = y;
- y = b;
- try {
- return a3();
- } finally {
- y = c;
- }
- };
- exports.unstable_pauseExecution = function() {
- };
- exports.unstable_requestPaint = function() {
- };
- exports.unstable_runWithPriority = function(a3, b) {
- switch (a3) {
- case 1:
- case 2:
- case 3:
- case 4:
- case 5:
- break;
- default:
- a3 = 3;
- }
- var c = y;
- y = a3;
- try {
- return b();
- } finally {
- y = c;
- }
- };
- exports.unstable_scheduleCallback = function(a3, b, c) {
- var d = exports.unstable_now();
- switch (typeof c == "object" && c !== null ? (c = c.delay, c = typeof c == "number" && 0 < c ? d + c : d) : c = d, a3) {
- case 1:
- var e = -1;
- break;
- case 2:
- e = 250;
- break;
- case 5:
- e = 1073741823;
- break;
- case 4:
- e = 1e4;
- break;
- default:
- e = 5e3;
- }
- return e = c + e, a3 = { id: u2++, callback: b, priorityLevel: a3, startTime: c, expirationTime: e, sortIndex: -1 }, c > d ? (a3.sortIndex = c, f4(t, a3), h3(r2) === null && a3 === h3(t) && (B3 ? (E(L), L = -1) : B3 = !0, K2(H, c - d))) : (a3.sortIndex = e, f4(r2, a3), A3 || z || (A3 = !0, I(J))), a3;
- };
- exports.unstable_shouldYield = M;
- exports.unstable_wrapCallback = function(a3) {
- var b = y;
- return function() {
- var c = y;
- y = b;
- try {
- return a3.apply(this, arguments);
- } finally {
- y = c;
- }
- };
- };
- }
- });
-
- // ../../node_modules/scheduler/index.js
- var require_scheduler = __commonJS({
- "../../node_modules/scheduler/index.js"(exports, module2) {
- "use strict";
- module2.exports = require_scheduler_production_min();
- }
- });
-
- // ../../node_modules/react-dom/cjs/react-dom.production.min.js
- var require_react_dom_production_min = __commonJS({
- "../../node_modules/react-dom/cjs/react-dom.production.min.js"(exports) {
- "use strict";
- var aa = require_react(), ca = require_scheduler();
- function p3(a3) {
- for (var b = "https://reactjs.org/docs/error-decoder.html?invariant=" + a3, c = 1; c < arguments.length; c++) b += "&args[]=" + encodeURIComponent(arguments[c]);
- return "Minified React error #" + a3 + "; visit " + b + " for the full message or use the non-minified dev environment for full errors and additional helpful warnings.";
- }
- var da = /* @__PURE__ */ new Set(), ea = {};
- function fa(a3, b) {
- ha(a3, b), ha(a3 + "Capture", b);
- }
- function ha(a3, b) {
- for (ea[a3] = b, a3 = 0; a3 < b.length; a3++) da.add(b[a3]);
- }
- var ia = !(typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u"), ja = Object.prototype.hasOwnProperty, ka = /^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/, la = {}, ma = {};
- function oa(a3) {
- return ja.call(ma, a3) ? !0 : ja.call(la, a3) ? !1 : ka.test(a3) ? ma[a3] = !0 : (la[a3] = !0, !1);
- }
- function pa(a3, b, c, d) {
- if (c !== null && c.type === 0) return !1;
- switch (typeof b) {
- case "function":
- case "symbol":
- return !0;
- case "boolean":
- return d ? !1 : c !== null ? !c.acceptsBooleans : (a3 = a3.toLowerCase().slice(0, 5), a3 !== "data-" && a3 !== "aria-");
- default:
- return !1;
- }
- }
- function qa(a3, b, c, d) {
- if (b === null || typeof b > "u" || pa(a3, b, c, d)) return !0;
- if (d) return !1;
- if (c !== null) switch (c.type) {
- case 3:
- return !b;
- case 4:
- return b === !1;
- case 5:
- return isNaN(b);
- case 6:
- return isNaN(b) || 1 > b;
- }
- return !1;
- }
- function v(a3, b, c, d, e, f4, g2) {
- this.acceptsBooleans = b === 2 || b === 3 || b === 4, this.attributeName = d, this.attributeNamespace = e, this.mustUseProperty = c, this.propertyName = a3, this.type = b, this.sanitizeURL = f4, this.removeEmptyString = g2;
- }
- var z = {};
- "children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a3) {
- z[a3] = new v(a3, 0, !1, a3, null, !1, !1);
- });
- [["acceptCharset", "accept-charset"], ["className", "class"], ["htmlFor", "for"], ["httpEquiv", "http-equiv"]].forEach(function(a3) {
- var b = a3[0];
- z[b] = new v(b, 1, !1, a3[1], null, !1, !1);
- });
- ["contentEditable", "draggable", "spellCheck", "value"].forEach(function(a3) {
- z[a3] = new v(a3, 2, !1, a3.toLowerCase(), null, !1, !1);
- });
- ["autoReverse", "externalResourcesRequired", "focusable", "preserveAlpha"].forEach(function(a3) {
- z[a3] = new v(a3, 2, !1, a3, null, !1, !1);
- });
- "allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a3) {
- z[a3] = new v(a3, 3, !1, a3.toLowerCase(), null, !1, !1);
- });
- ["checked", "multiple", "muted", "selected"].forEach(function(a3) {
- z[a3] = new v(a3, 3, !0, a3, null, !1, !1);
- });
- ["capture", "download"].forEach(function(a3) {
- z[a3] = new v(a3, 4, !1, a3, null, !1, !1);
- });
- ["cols", "rows", "size", "span"].forEach(function(a3) {
- z[a3] = new v(a3, 6, !1, a3, null, !1, !1);
- });
- ["rowSpan", "start"].forEach(function(a3) {
- z[a3] = new v(a3, 5, !1, a3.toLowerCase(), null, !1, !1);
- });
- var ra = /[\-:]([a-z])/g;
- function sa(a3) {
- return a3[1].toUpperCase();
- }
- "accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(a3) {
- var b = a3.replace(
- ra,
- sa
- );
- z[b] = new v(b, 1, !1, a3, null, !1, !1);
- });
- "xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a3) {
- var b = a3.replace(ra, sa);
- z[b] = new v(b, 1, !1, a3, "http://www.w3.org/1999/xlink", !1, !1);
- });
- ["xml:base", "xml:lang", "xml:space"].forEach(function(a3) {
- var b = a3.replace(ra, sa);
- z[b] = new v(b, 1, !1, a3, "http://www.w3.org/XML/1998/namespace", !1, !1);
- });
- ["tabIndex", "crossOrigin"].forEach(function(a3) {
- z[a3] = new v(a3, 1, !1, a3.toLowerCase(), null, !1, !1);
- });
- z.xlinkHref = new v("xlinkHref", 1, !1, "xlink:href", "http://www.w3.org/1999/xlink", !0, !1);
- ["src", "href", "action", "formAction"].forEach(function(a3) {
- z[a3] = new v(a3, 1, !1, a3.toLowerCase(), null, !0, !0);
- });
- function ta(a3, b, c, d) {
- var e = z.hasOwnProperty(b) ? z[b] : null;
- (e !== null ? e.type !== 0 : d || !(2 < b.length) || b[0] !== "o" && b[0] !== "O" || b[1] !== "n" && b[1] !== "N") && (qa(b, c, e, d) && (c = null), d || e === null ? oa(b) && (c === null ? a3.removeAttribute(b) : a3.setAttribute(b, "" + c)) : e.mustUseProperty ? a3[e.propertyName] = c === null ? e.type === 3 ? !1 : "" : c : (b = e.attributeName, d = e.attributeNamespace, c === null ? a3.removeAttribute(b) : (e = e.type, c = e === 3 || e === 4 && c === !0 ? "" : "" + c, d ? a3.setAttributeNS(d, b, c) : a3.setAttribute(b, c))));
- }
- var ua = aa.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, va = Symbol.for("react.element"), wa = Symbol.for("react.portal"), ya = Symbol.for("react.fragment"), za = Symbol.for("react.strict_mode"), Aa = Symbol.for("react.profiler"), Ba = Symbol.for("react.provider"), Ca = Symbol.for("react.context"), Da = Symbol.for("react.forward_ref"), Ea = Symbol.for("react.suspense"), Fa = Symbol.for("react.suspense_list"), Ga = Symbol.for("react.memo"), Ha = Symbol.for("react.lazy");
- Symbol.for("react.scope");
- Symbol.for("react.debug_trace_mode");
- var Ia = Symbol.for("react.offscreen");
- Symbol.for("react.legacy_hidden");
- Symbol.for("react.cache");
- Symbol.for("react.tracing_marker");
- var Ja = Symbol.iterator;
- function Ka(a3) {
- return a3 === null || typeof a3 != "object" ? null : (a3 = Ja && a3[Ja] || a3["@@iterator"], typeof a3 == "function" ? a3 : null);
- }
- var A3 = Object.assign, La;
- function Ma(a3) {
- if (La === void 0) try {
- throw Error();
- } catch (c) {
- var b = c.stack.trim().match(/\n( *(at )?)/);
- La = b && b[1] || "";
- }
- return `
- ` + La + a3;
- }
- var Na = !1;
- function Oa(a3, b) {
- if (!a3 || Na) return "";
- Na = !0;
- var c = Error.prepareStackTrace;
- Error.prepareStackTrace = void 0;
- try {
- if (b) if (b = function() {
- throw Error();
- }, Object.defineProperty(b.prototype, "props", { set: function() {
- throw Error();
- } }), typeof Reflect == "object" && Reflect.construct) {
- try {
- Reflect.construct(b, []);
- } catch (l) {
- var d = l;
- }
- Reflect.construct(a3, [], b);
- } else {
- try {
- b.call();
- } catch (l) {
- d = l;
- }
- a3.call(b.prototype);
- }
- else {
- try {
- throw Error();
- } catch (l) {
- d = l;
- }
- a3();
- }
- } catch (l) {
- if (l && d && typeof l.stack == "string") {
- for (var e = l.stack.split(`
- `), f4 = d.stack.split(`
- `), g2 = e.length - 1, h3 = f4.length - 1; 1 <= g2 && 0 <= h3 && e[g2] !== f4[h3]; ) h3--;
- for (; 1 <= g2 && 0 <= h3; g2--, h3--) if (e[g2] !== f4[h3]) {
- if (g2 !== 1 || h3 !== 1)
- do
- if (g2--, h3--, 0 > h3 || e[g2] !== f4[h3]) {
- var k = `
- ` + e[g2].replace(" at new ", " at ");
- return a3.displayName && k.includes("<anonymous>") && (k = k.replace("<anonymous>", a3.displayName)), k;
- }
- while (1 <= g2 && 0 <= h3);
- break;
- }
- }
- } finally {
- Na = !1, Error.prepareStackTrace = c;
- }
- return (a3 = a3 ? a3.displayName || a3.name : "") ? Ma(a3) : "";
- }
- function Pa(a3) {
- switch (a3.tag) {
- case 5:
- return Ma(a3.type);
- case 16:
- return Ma("Lazy");
- case 13:
- return Ma("Suspense");
- case 19:
- return Ma("SuspenseList");
- case 0:
- case 2:
- case 15:
- return a3 = Oa(a3.type, !1), a3;
- case 11:
- return a3 = Oa(a3.type.render, !1), a3;
- case 1:
- return a3 = Oa(a3.type, !0), a3;
- default:
- return "";
- }
- }
- function Qa(a3) {
- if (a3 == null) return null;
- if (typeof a3 == "function") return a3.displayName || a3.name || null;
- if (typeof a3 == "string") return a3;
- switch (a3) {
- case ya:
- return "Fragment";
- case wa:
- return "Portal";
- case Aa:
- return "Profiler";
- case za:
- return "StrictMode";
- case Ea:
- return "Suspense";
- case Fa:
- return "SuspenseList";
- }
- if (typeof a3 == "object") switch (a3.$$typeof) {
- case Ca:
- return (a3.displayName || "Context") + ".Consumer";
- case Ba:
- return (a3._context.displayName || "Context") + ".Provider";
- case Da:
- var b = a3.render;
- return a3 = a3.displayName, a3 || (a3 = b.displayName || b.name || "", a3 = a3 !== "" ? "ForwardRef(" + a3 + ")" : "ForwardRef"), a3;
- case Ga:
- return b = a3.displayName || null, b !== null ? b : Qa(a3.type) || "Memo";
- case Ha:
- b = a3._payload, a3 = a3._init;
- try {
- return Qa(a3(b));
- } catch {
- }
- }
- return null;
- }
- function Ra(a3) {
- var b = a3.type;
- switch (a3.tag) {
- case 24:
- return "Cache";
- case 9:
- return (b.displayName || "Context") + ".Consumer";
- case 10:
- return (b._context.displayName || "Context") + ".Provider";
- case 18:
- return "DehydratedFragment";
- case 11:
- return a3 = b.render, a3 = a3.displayName || a3.name || "", b.displayName || (a3 !== "" ? "ForwardRef(" + a3 + ")" : "ForwardRef");
- case 7:
- return "Fragment";
- case 5:
- return b;
- case 4:
- return "Portal";
- case 3:
- return "Root";
- case 6:
- return "Text";
- case 16:
- return Qa(b);
- case 8:
- return b === za ? "StrictMode" : "Mode";
- case 22:
- return "Offscreen";
- case 12:
- return "Profiler";
- case 21:
- return "Scope";
- case 13:
- return "Suspense";
- case 19:
- return "SuspenseList";
- case 25:
- return "TracingMarker";
- case 1:
- case 0:
- case 17:
- case 2:
- case 14:
- case 15:
- if (typeof b == "function") return b.displayName || b.name || null;
- if (typeof b == "string") return b;
- }
- return null;
- }
- function Sa(a3) {
- switch (typeof a3) {
- case "boolean":
- case "number":
- case "string":
- case "undefined":
- return a3;
- case "object":
- return a3;
- default:
- return "";
- }
- }
- function Ta(a3) {
- var b = a3.type;
- return (a3 = a3.nodeName) && a3.toLowerCase() === "input" && (b === "checkbox" || b === "radio");
- }
- function Ua(a3) {
- var b = Ta(a3) ? "checked" : "value", c = Object.getOwnPropertyDescriptor(a3.constructor.prototype, b), d = "" + a3[b];
- if (!a3.hasOwnProperty(b) && typeof c < "u" && typeof c.get == "function" && typeof c.set == "function") {
- var e = c.get, f4 = c.set;
- return Object.defineProperty(a3, b, { configurable: !0, get: function() {
- return e.call(this);
- }, set: function(a4) {
- d = "" + a4, f4.call(this, a4);
- } }), Object.defineProperty(a3, b, { enumerable: c.enumerable }), { getValue: function() {
- return d;
- }, setValue: function(a4) {
- d = "" + a4;
- }, stopTracking: function() {
- a3._valueTracker = null, delete a3[b];
- } };
- }
- }
- function Va(a3) {
- a3._valueTracker || (a3._valueTracker = Ua(a3));
- }
- function Wa(a3) {
- if (!a3) return !1;
- var b = a3._valueTracker;
- if (!b) return !0;
- var c = b.getValue(), d = "";
- return a3 && (d = Ta(a3) ? a3.checked ? "true" : "false" : a3.value), a3 = d, a3 !== c ? (b.setValue(a3), !0) : !1;
- }
- function Xa(a3) {
- if (a3 = a3 || (typeof document < "u" ? document : void 0), typeof a3 > "u") return null;
- try {
- return a3.activeElement || a3.body;
- } catch {
- return a3.body;
- }
- }
- function Ya(a3, b) {
- var c = b.checked;
- return A3({}, b, { defaultChecked: void 0, defaultValue: void 0, value: void 0, checked: c ?? a3._wrapperState.initialChecked });
- }
- function Za(a3, b) {
- var c = b.defaultValue == null ? "" : b.defaultValue, d = b.checked != null ? b.checked : b.defaultChecked;
- c = Sa(b.value != null ? b.value : c), a3._wrapperState = { initialChecked: d, initialValue: c, controlled: b.type === "checkbox" || b.type === "radio" ? b.checked != null : b.value != null };
- }
- function ab(a3, b) {
- b = b.checked, b != null && ta(a3, "checked", b, !1);
- }
- function bb(a3, b) {
- ab(a3, b);
- var c = Sa(b.value), d = b.type;
- if (c != null) d === "number" ? (c === 0 && a3.value === "" || a3.value != c) && (a3.value = "" + c) : a3.value !== "" + c && (a3.value = "" + c);
- else if (d === "submit" || d === "reset") {
- a3.removeAttribute("value");
- return;
- }
- b.hasOwnProperty("value") ? cb(a3, b.type, c) : b.hasOwnProperty("defaultValue") && cb(a3, b.type, Sa(b.defaultValue)), b.checked == null && b.defaultChecked != null && (a3.defaultChecked = !!b.defaultChecked);
- }
- function db(a3, b, c) {
- if (b.hasOwnProperty("value") || b.hasOwnProperty("defaultValue")) {
- var d = b.type;
- if (!(d !== "submit" && d !== "reset" || b.value !== void 0 && b.value !== null)) return;
- b = "" + a3._wrapperState.initialValue, c || b === a3.value || (a3.value = b), a3.defaultValue = b;
- }
- c = a3.name, c !== "" && (a3.name = ""), a3.defaultChecked = !!a3._wrapperState.initialChecked, c !== "" && (a3.name = c);
- }
- function cb(a3, b, c) {
- (b !== "number" || Xa(a3.ownerDocument) !== a3) && (c == null ? a3.defaultValue = "" + a3._wrapperState.initialValue : a3.defaultValue !== "" + c && (a3.defaultValue = "" + c));
- }
- var eb = Array.isArray;
- function fb(a3, b, c, d) {
- if (a3 = a3.options, b) {
- b = {};
- for (var e = 0; e < c.length; e++) b["$" + c[e]] = !0;
- for (c = 0; c < a3.length; c++) e = b.hasOwnProperty("$" + a3[c].value), a3[c].selected !== e && (a3[c].selected = e), e && d && (a3[c].defaultSelected = !0);
- } else {
- for (c = "" + Sa(c), b = null, e = 0; e < a3.length; e++) {
- if (a3[e].value === c) {
- a3[e].selected = !0, d && (a3[e].defaultSelected = !0);
- return;
- }
- b !== null || a3[e].disabled || (b = a3[e]);
- }
- b !== null && (b.selected = !0);
- }
- }
- function gb(a3, b) {
- if (b.dangerouslySetInnerHTML != null) throw Error(p3(91));
- return A3({}, b, { value: void 0, defaultValue: void 0, children: "" + a3._wrapperState.initialValue });
- }
- function hb(a3, b) {
- var c = b.value;
- if (c == null) {
- if (c = b.children, b = b.defaultValue, c != null) {
- if (b != null) throw Error(p3(92));
- if (eb(c)) {
- if (1 < c.length) throw Error(p3(93));
- c = c[0];
- }
- b = c;
- }
- b == null && (b = ""), c = b;
- }
- a3._wrapperState = { initialValue: Sa(c) };
- }
- function ib(a3, b) {
- var c = Sa(b.value), d = Sa(b.defaultValue);
- c != null && (c = "" + c, c !== a3.value && (a3.value = c), b.defaultValue == null && a3.defaultValue !== c && (a3.defaultValue = c)), d != null && (a3.defaultValue = "" + d);
- }
- function jb(a3) {
- var b = a3.textContent;
- b === a3._wrapperState.initialValue && b !== "" && b !== null && (a3.value = b);
- }
- function kb(a3) {
- switch (a3) {
- case "svg":
- return "http://www.w3.org/2000/svg";
- case "math":
- return "http://www.w3.org/1998/Math/MathML";
- default:
- return "http://www.w3.org/1999/xhtml";
- }
- }
- function lb(a3, b) {
- return a3 == null || a3 === "http://www.w3.org/1999/xhtml" ? kb(b) : a3 === "http://www.w3.org/2000/svg" && b === "foreignObject" ? "http://www.w3.org/1999/xhtml" : a3;
- }
- var mb, nb = (function(a3) {
- return typeof MSApp < "u" && MSApp.execUnsafeLocalFunction ? function(b, c, d, e) {
- MSApp.execUnsafeLocalFunction(function() {
- return a3(b, c, d, e);
- });
- } : a3;
- })(function(a3, b) {
- if (a3.namespaceURI !== "http://www.w3.org/2000/svg" || "innerHTML" in a3) a3.innerHTML = b;
- else {
- for (mb = mb || document.createElement("div"), mb.innerHTML = "<svg>" + b.valueOf().toString() + "</svg>", b = mb.firstChild; a3.firstChild; ) a3.removeChild(a3.firstChild);
- for (; b.firstChild; ) a3.appendChild(b.firstChild);
- }
- });
- function ob(a3, b) {
- if (b) {
- var c = a3.firstChild;
- if (c && c === a3.lastChild && c.nodeType === 3) {
- c.nodeValue = b;
- return;
- }
- }
- a3.textContent = b;
- }
- var pb = {
- animationIterationCount: !0,
- aspectRatio: !0,
- borderImageOutset: !0,
- borderImageSlice: !0,
- borderImageWidth: !0,
- boxFlex: !0,
- boxFlexGroup: !0,
- boxOrdinalGroup: !0,
- columnCount: !0,
- columns: !0,
- flex: !0,
- flexGrow: !0,
- flexPositive: !0,
- flexShrink: !0,
- flexNegative: !0,
- flexOrder: !0,
- gridArea: !0,
- gridRow: !0,
- gridRowEnd: !0,
- gridRowSpan: !0,
- gridRowStart: !0,
- gridColumn: !0,
- gridColumnEnd: !0,
- gridColumnSpan: !0,
- gridColumnStart: !0,
- fontWeight: !0,
- lineClamp: !0,
- lineHeight: !0,
- opacity: !0,
- order: !0,
- orphans: !0,
- tabSize: !0,
- widows: !0,
- zIndex: !0,
- zoom: !0,
- fillOpacity: !0,
- floodOpacity: !0,
- stopOpacity: !0,
- strokeDasharray: !0,
- strokeDashoffset: !0,
- strokeMiterlimit: !0,
- strokeOpacity: !0,
- strokeWidth: !0
- }, qb = ["Webkit", "ms", "Moz", "O"];
- Object.keys(pb).forEach(function(a3) {
- qb.forEach(function(b) {
- b = b + a3.charAt(0).toUpperCase() + a3.substring(1), pb[b] = pb[a3];
- });
- });
- function rb(a3, b, c) {
- return b == null || typeof b == "boolean" || b === "" ? "" : c || typeof b != "number" || b === 0 || pb.hasOwnProperty(a3) && pb[a3] ? ("" + b).trim() : b + "px";
- }
- function sb2(a3, b) {
- a3 = a3.style;
- for (var c in b) if (b.hasOwnProperty(c)) {
- var d = c.indexOf("--") === 0, e = rb(c, b[c], d);
- c === "float" && (c = "cssFloat"), d ? a3.setProperty(c, e) : a3[c] = e;
- }
- }
- var tb = A3({ menuitem: !0 }, { area: !0, base: !0, br: !0, col: !0, embed: !0, hr: !0, img: !0, input: !0, keygen: !0, link: !0, meta: !0, param: !0, source: !0, track: !0, wbr: !0 });
- function ub(a3, b) {
- if (b) {
- if (tb[a3] && (b.children != null || b.dangerouslySetInnerHTML != null)) throw Error(p3(137, a3));
- if (b.dangerouslySetInnerHTML != null) {
- if (b.children != null) throw Error(p3(60));
- if (typeof b.dangerouslySetInnerHTML != "object" || !("__html" in b.dangerouslySetInnerHTML)) throw Error(p3(61));
- }
- if (b.style != null && typeof b.style != "object") throw Error(p3(62));
- }
- }
- function vb(a3, b) {
- if (a3.indexOf("-") === -1) return typeof b.is == "string";
- switch (a3) {
- case "annotation-xml":
- case "color-profile":
- case "font-face":
- case "font-face-src":
- case "font-face-uri":
- case "font-face-format":
- case "font-face-name":
- case "missing-glyph":
- return !1;
- default:
- return !0;
- }
- }
- var wb = null;
- function xb(a3) {
- return a3 = a3.target || a3.srcElement || window, a3.correspondingUseElement && (a3 = a3.correspondingUseElement), a3.nodeType === 3 ? a3.parentNode : a3;
- }
- var yb = null, zb = null, Ab = null;
- function Bb(a3) {
- if (a3 = Cb(a3)) {
- if (typeof yb != "function") throw Error(p3(280));
- var b = a3.stateNode;
- b && (b = Db(b), yb(a3.stateNode, a3.type, b));
- }
- }
- function Eb(a3) {
- zb ? Ab ? Ab.push(a3) : Ab = [a3] : zb = a3;
- }
- function Fb() {
- if (zb) {
- var a3 = zb, b = Ab;
- if (Ab = zb = null, Bb(a3), b) for (a3 = 0; a3 < b.length; a3++) Bb(b[a3]);
- }
- }
- function Gb(a3, b) {
- return a3(b);
- }
- function Hb() {
- }
- var Ib = !1;
- function Jb(a3, b, c) {
- if (Ib) return a3(b, c);
- Ib = !0;
- try {
- return Gb(a3, b, c);
- } finally {
- Ib = !1, (zb !== null || Ab !== null) && (Hb(), Fb());
- }
- }
- function Kb(a3, b) {
- var c = a3.stateNode;
- if (c === null) return null;
- var d = Db(c);
- if (d === null) return null;
- c = d[b];
- a: switch (b) {
- case "onClick":
- case "onClickCapture":
- case "onDoubleClick":
- case "onDoubleClickCapture":
- case "onMouseDown":
- case "onMouseDownCapture":
- case "onMouseMove":
- case "onMouseMoveCapture":
- case "onMouseUp":
- case "onMouseUpCapture":
- case "onMouseEnter":
- (d = !d.disabled) || (a3 = a3.type, d = !(a3 === "button" || a3 === "input" || a3 === "select" || a3 === "textarea")), a3 = !d;
- break a;
- default:
- a3 = !1;
- }
- if (a3) return null;
- if (c && typeof c != "function") throw Error(p3(231, b, typeof c));
- return c;
- }
- var Lb = !1;
- if (ia) try {
- Mb = {}, Object.defineProperty(Mb, "passive", { get: function() {
- Lb = !0;
- } }), window.addEventListener("test", Mb, Mb), window.removeEventListener("test", Mb, Mb);
- } catch {
- Lb = !1;
- }
- var Mb;
- function Nb(a3, b, c, d, e, f4, g2, h3, k) {
- var l = Array.prototype.slice.call(arguments, 3);
- try {
- b.apply(c, l);
- } catch (m3) {
- this.onError(m3);
- }
- }
- var Ob = !1, Pb = null, Qb = !1, Rb = null, Sb = { onError: function(a3) {
- Ob = !0, Pb = a3;
- } };
- function Tb(a3, b, c, d, e, f4, g2, h3, k) {
- Ob = !1, Pb = null, Nb.apply(Sb, arguments);
- }
- function Ub(a3, b, c, d, e, f4, g2, h3, k) {
- if (Tb.apply(this, arguments), Ob) {
- if (Ob) {
- var l = Pb;
- Ob = !1, Pb = null;
- } else throw Error(p3(198));
- Qb || (Qb = !0, Rb = l);
- }
- }
- function Vb(a3) {
- var b = a3, c = a3;
- if (a3.alternate) for (; b.return; ) b = b.return;
- else {
- a3 = b;
- do
- b = a3, (b.flags & 4098) !== 0 && (c = b.return), a3 = b.return;
- while (a3);
- }
- return b.tag === 3 ? c : null;
- }
- function Wb(a3) {
- if (a3.tag === 13) {
- var b = a3.memoizedState;
- if (b === null && (a3 = a3.alternate, a3 !== null && (b = a3.memoizedState)), b !== null) return b.dehydrated;
- }
- return null;
- }
- function Xb(a3) {
- if (Vb(a3) !== a3) throw Error(p3(188));
- }
- function Yb(a3) {
- var b = a3.alternate;
- if (!b) {
- if (b = Vb(a3), b === null) throw Error(p3(188));
- return b !== a3 ? null : a3;
- }
- for (var c = a3, d = b; ; ) {
- var e = c.return;
- if (e === null) break;
- var f4 = e.alternate;
- if (f4 === null) {
- if (d = e.return, d !== null) {
- c = d;
- continue;
- }
- break;
- }
- if (e.child === f4.child) {
- for (f4 = e.child; f4; ) {
- if (f4 === c) return Xb(e), a3;
- if (f4 === d) return Xb(e), b;
- f4 = f4.sibling;
- }
- throw Error(p3(188));
- }
- if (c.return !== d.return) c = e, d = f4;
- else {
- for (var g2 = !1, h3 = e.child; h3; ) {
- if (h3 === c) {
- g2 = !0, c = e, d = f4;
- break;
- }
- if (h3 === d) {
- g2 = !0, d = e, c = f4;
- break;
- }
- h3 = h3.sibling;
- }
- if (!g2) {
- for (h3 = f4.child; h3; ) {
- if (h3 === c) {
- g2 = !0, c = f4, d = e;
- break;
- }
- if (h3 === d) {
- g2 = !0, d = f4, c = e;
- break;
- }
- h3 = h3.sibling;
- }
- if (!g2) throw Error(p3(189));
- }
- }
- if (c.alternate !== d) throw Error(p3(190));
- }
- if (c.tag !== 3) throw Error(p3(188));
- return c.stateNode.current === c ? a3 : b;
- }
- function Zb(a3) {
- return a3 = Yb(a3), a3 !== null ? $b(a3) : null;
- }
- function $b(a3) {
- if (a3.tag === 5 || a3.tag === 6) return a3;
- for (a3 = a3.child; a3 !== null; ) {
- var b = $b(a3);
- if (b !== null) return b;
- a3 = a3.sibling;
- }
- return null;
- }
- var ac = ca.unstable_scheduleCallback, bc = ca.unstable_cancelCallback, cc = ca.unstable_shouldYield, dc = ca.unstable_requestPaint, B3 = ca.unstable_now, ec = ca.unstable_getCurrentPriorityLevel, fc = ca.unstable_ImmediatePriority, gc = ca.unstable_UserBlockingPriority, hc = ca.unstable_NormalPriority, ic = ca.unstable_LowPriority, jc = ca.unstable_IdlePriority, kc = null, lc = null;
- function mc(a3) {
- if (lc && typeof lc.onCommitFiberRoot == "function") try {
- lc.onCommitFiberRoot(kc, a3, void 0, (a3.current.flags & 128) === 128);
- } catch {
- }
- }
- var oc = Math.clz32 ? Math.clz32 : nc, pc = Math.log, qc = Math.LN2;
- function nc(a3) {
- return a3 >>>= 0, a3 === 0 ? 32 : 31 - (pc(a3) / qc | 0) | 0;
- }
- var rc = 64, sc = 4194304;
- function tc(a3) {
- switch (a3 & -a3) {
- case 1:
- return 1;
- case 2:
- return 2;
- case 4:
- return 4;
- case 8:
- return 8;
- case 16:
- return 16;
- case 32:
- return 32;
- case 64:
- case 128:
- case 256:
- case 512:
- case 1024:
- case 2048:
- case 4096:
- case 8192:
- case 16384:
- case 32768:
- case 65536:
- case 131072:
- case 262144:
- case 524288:
- case 1048576:
- case 2097152:
- return a3 & 4194240;
- case 4194304:
- case 8388608:
- case 16777216:
- case 33554432:
- case 67108864:
- return a3 & 130023424;
- case 134217728:
- return 134217728;
- case 268435456:
- return 268435456;
- case 536870912:
- return 536870912;
- case 1073741824:
- return 1073741824;
- default:
- return a3;
- }
- }
- function uc(a3, b) {
- var c = a3.pendingLanes;
- if (c === 0) return 0;
- var d = 0, e = a3.suspendedLanes, f4 = a3.pingedLanes, g2 = c & 268435455;
- if (g2 !== 0) {
- var h3 = g2 & ~e;
- h3 !== 0 ? d = tc(h3) : (f4 &= g2, f4 !== 0 && (d = tc(f4)));
- } else g2 = c & ~e, g2 !== 0 ? d = tc(g2) : f4 !== 0 && (d = tc(f4));
- if (d === 0) return 0;
- if (b !== 0 && b !== d && (b & e) === 0 && (e = d & -d, f4 = b & -b, e >= f4 || e === 16 && (f4 & 4194240) !== 0)) return b;
- if ((d & 4) !== 0 && (d |= c & 16), b = a3.entangledLanes, b !== 0) for (a3 = a3.entanglements, b &= d; 0 < b; ) c = 31 - oc(b), e = 1 << c, d |= a3[c], b &= ~e;
- return d;
- }
- function vc(a3, b) {
- switch (a3) {
- case 1:
- case 2:
- case 4:
- return b + 250;
- case 8:
- case 16:
- case 32:
- case 64:
- case 128:
- case 256:
- case 512:
- case 1024:
- case 2048:
- case 4096:
- case 8192:
- case 16384:
- case 32768:
- case 65536:
- case 131072:
- case 262144:
- case 524288:
- case 1048576:
- case 2097152:
- return b + 5e3;
- case 4194304:
- case 8388608:
- case 16777216:
- case 33554432:
- case 67108864:
- return -1;
- case 134217728:
- case 268435456:
- case 536870912:
- case 1073741824:
- return -1;
- default:
- return -1;
- }
- }
- function wc(a3, b) {
- for (var c = a3.suspendedLanes, d = a3.pingedLanes, e = a3.expirationTimes, f4 = a3.pendingLanes; 0 < f4; ) {
- var g2 = 31 - oc(f4), h3 = 1 << g2, k = e[g2];
- k === -1 ? ((h3 & c) === 0 || (h3 & d) !== 0) && (e[g2] = vc(h3, b)) : k <= b && (a3.expiredLanes |= h3), f4 &= ~h3;
- }
- }
- function xc(a3) {
- return a3 = a3.pendingLanes & -1073741825, a3 !== 0 ? a3 : a3 & 1073741824 ? 1073741824 : 0;
- }
- function yc() {
- var a3 = rc;
- return rc <<= 1, (rc & 4194240) === 0 && (rc = 64), a3;
- }
- function zc(a3) {
- for (var b = [], c = 0; 31 > c; c++) b.push(a3);
- return b;
- }
- function Ac(a3, b, c) {
- a3.pendingLanes |= b, b !== 536870912 && (a3.suspendedLanes = 0, a3.pingedLanes = 0), a3 = a3.eventTimes, b = 31 - oc(b), a3[b] = c;
- }
- function Bc(a3, b) {
- var c = a3.pendingLanes & ~b;
- a3.pendingLanes = b, a3.suspendedLanes = 0, a3.pingedLanes = 0, a3.expiredLanes &= b, a3.mutableReadLanes &= b, a3.entangledLanes &= b, b = a3.entanglements;
- var d = a3.eventTimes;
- for (a3 = a3.expirationTimes; 0 < c; ) {
- var e = 31 - oc(c), f4 = 1 << e;
- b[e] = 0, d[e] = -1, a3[e] = -1, c &= ~f4;
- }
- }
- function Cc(a3, b) {
- var c = a3.entangledLanes |= b;
- for (a3 = a3.entanglements; c; ) {
- var d = 31 - oc(c), e = 1 << d;
- e & b | a3[d] & b && (a3[d] |= b), c &= ~e;
- }
- }
- var C3 = 0;
- function Dc(a3) {
- return a3 &= -a3, 1 < a3 ? 4 < a3 ? (a3 & 268435455) !== 0 ? 16 : 536870912 : 4 : 1;
- }
- var Ec, Fc, Gc, Hc, Ic, Jc = !1, Kc = [], Lc = null, Mc = null, Nc = null, Oc = /* @__PURE__ */ new Map(), Pc = /* @__PURE__ */ new Map(), Qc = [], Rc = "mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");
- function Sc(a3, b) {
- switch (a3) {
- case "focusin":
- case "focusout":
- Lc = null;
- break;
- case "dragenter":
- case "dragleave":
- Mc = null;
- break;
- case "mouseover":
- case "mouseout":
- Nc = null;
- break;
- case "pointerover":
- case "pointerout":
- Oc.delete(b.pointerId);
- break;
- case "gotpointercapture":
- case "lostpointercapture":
- Pc.delete(b.pointerId);
- }
- }
- function Tc(a3, b, c, d, e, f4) {
- return a3 === null || a3.nativeEvent !== f4 ? (a3 = { blockedOn: b, domEventName: c, eventSystemFlags: d, nativeEvent: f4, targetContainers: [e] }, b !== null && (b = Cb(b), b !== null && Fc(b)), a3) : (a3.eventSystemFlags |= d, b = a3.targetContainers, e !== null && b.indexOf(e) === -1 && b.push(e), a3);
- }
- function Uc(a3, b, c, d, e) {
- switch (b) {
- case "focusin":
- return Lc = Tc(Lc, a3, b, c, d, e), !0;
- case "dragenter":
- return Mc = Tc(Mc, a3, b, c, d, e), !0;
- case "mouseover":
- return Nc = Tc(Nc, a3, b, c, d, e), !0;
- case "pointerover":
- var f4 = e.pointerId;
- return Oc.set(f4, Tc(Oc.get(f4) || null, a3, b, c, d, e)), !0;
- case "gotpointercapture":
- return f4 = e.pointerId, Pc.set(f4, Tc(Pc.get(f4) || null, a3, b, c, d, e)), !0;
- }
- return !1;
- }
- function Vc(a3) {
- var b = Wc(a3.target);
- if (b !== null) {
- var c = Vb(b);
- if (c !== null) {
- if (b = c.tag, b === 13) {
- if (b = Wb(c), b !== null) {
- a3.blockedOn = b, Ic(a3.priority, function() {
- Gc(c);
- });
- return;
- }
- } else if (b === 3 && c.stateNode.current.memoizedState.isDehydrated) {
- a3.blockedOn = c.tag === 3 ? c.stateNode.containerInfo : null;
- return;
- }
- }
- }
- a3.blockedOn = null;
- }
- function Xc(a3) {
- if (a3.blockedOn !== null) return !1;
- for (var b = a3.targetContainers; 0 < b.length; ) {
- var c = Yc(a3.domEventName, a3.eventSystemFlags, b[0], a3.nativeEvent);
- if (c === null) {
- c = a3.nativeEvent;
- var d = new c.constructor(c.type, c);
- wb = d, c.target.dispatchEvent(d), wb = null;
- } else return b = Cb(c), b !== null && Fc(b), a3.blockedOn = c, !1;
- b.shift();
- }
- return !0;
- }
- function Zc(a3, b, c) {
- Xc(a3) && c.delete(b);
- }
- function $c() {
- Jc = !1, Lc !== null && Xc(Lc) && (Lc = null), Mc !== null && Xc(Mc) && (Mc = null), Nc !== null && Xc(Nc) && (Nc = null), Oc.forEach(Zc), Pc.forEach(Zc);
- }
- function ad(a3, b) {
- a3.blockedOn === b && (a3.blockedOn = null, Jc || (Jc = !0, ca.unstable_scheduleCallback(ca.unstable_NormalPriority, $c)));
- }
- function bd(a3) {
- function b(b2) {
- return ad(b2, a3);
- }
- if (0 < Kc.length) {
- ad(Kc[0], a3);
- for (var c = 1; c < Kc.length; c++) {
- var d = Kc[c];
- d.blockedOn === a3 && (d.blockedOn = null);
- }
- }
- for (Lc !== null && ad(Lc, a3), Mc !== null && ad(Mc, a3), Nc !== null && ad(Nc, a3), Oc.forEach(b), Pc.forEach(b), c = 0; c < Qc.length; c++) d = Qc[c], d.blockedOn === a3 && (d.blockedOn = null);
- for (; 0 < Qc.length && (c = Qc[0], c.blockedOn === null); ) Vc(c), c.blockedOn === null && Qc.shift();
- }
- var cd = ua.ReactCurrentBatchConfig, dd = !0;
- function ed(a3, b, c, d) {
- var e = C3, f4 = cd.transition;
- cd.transition = null;
- try {
- C3 = 1, fd(a3, b, c, d);
- } finally {
- C3 = e, cd.transition = f4;
- }
- }
- function gd(a3, b, c, d) {
- var e = C3, f4 = cd.transition;
- cd.transition = null;
- try {
- C3 = 4, fd(a3, b, c, d);
- } finally {
- C3 = e, cd.transition = f4;
- }
- }
- function fd(a3, b, c, d) {
- if (dd) {
- var e = Yc(a3, b, c, d);
- if (e === null) hd(a3, b, d, id, c), Sc(a3, d);
- else if (Uc(e, a3, b, c, d)) d.stopPropagation();
- else if (Sc(a3, d), b & 4 && -1 < Rc.indexOf(a3)) {
- for (; e !== null; ) {
- var f4 = Cb(e);
- if (f4 !== null && Ec(f4), f4 = Yc(a3, b, c, d), f4 === null && hd(a3, b, d, id, c), f4 === e) break;
- e = f4;
- }
- e !== null && d.stopPropagation();
- } else hd(a3, b, d, null, c);
- }
- }
- var id = null;
- function Yc(a3, b, c, d) {
- if (id = null, a3 = xb(d), a3 = Wc(a3), a3 !== null) if (b = Vb(a3), b === null) a3 = null;
- else if (c = b.tag, c === 13) {
- if (a3 = Wb(b), a3 !== null) return a3;
- a3 = null;
- } else if (c === 3) {
- if (b.stateNode.current.memoizedState.isDehydrated) return b.tag === 3 ? b.stateNode.containerInfo : null;
- a3 = null;
- } else b !== a3 && (a3 = null);
- return id = a3, null;
- }
- function jd(a3) {
- switch (a3) {
- case "cancel":
- case "click":
- case "close":
- case "contextmenu":
- case "copy":
- case "cut":
- case "auxclick":
- case "dblclick":
- case "dragend":
- case "dragstart":
- case "drop":
- case "focusin":
- case "focusout":
- case "input":
- case "invalid":
- case "keydown":
- case "keypress":
- case "keyup":
- case "mousedown":
- case "mouseup":
- case "paste":
- case "pause":
- case "play":
- case "pointercancel":
- case "pointerdown":
- case "pointerup":
- case "ratechange":
- case "reset":
- case "resize":
- case "seeked":
- case "submit":
- case "touchcancel":
- case "touchend":
- case "touchstart":
- case "volumechange":
- case "change":
- case "selectionchange":
- case "textInput":
- case "compositionstart":
- case "compositionend":
- case "compositionupdate":
- case "beforeblur":
- case "afterblur":
- case "beforeinput":
- case "blur":
- case "fullscreenchange":
- case "focus":
- case "hashchange":
- case "popstate":
- case "select":
- case "selectstart":
- return 1;
- case "drag":
- case "dragenter":
- case "dragexit":
- case "dragleave":
- case "dragover":
- case "mousemove":
- case "mouseout":
- case "mouseover":
- case "pointermove":
- case "pointerout":
- case "pointerover":
- case "scroll":
- case "toggle":
- case "touchmove":
- case "wheel":
- case "mouseenter":
- case "mouseleave":
- case "pointerenter":
- case "pointerleave":
- return 4;
- case "message":
- switch (ec()) {
- case fc:
- return 1;
- case gc:
- return 4;
- case hc:
- case ic:
- return 16;
- case jc:
- return 536870912;
- default:
- return 16;
- }
- default:
- return 16;
- }
- }
- var kd = null, ld = null, md = null;
- function nd() {
- if (md) return md;
- var a3, b = ld, c = b.length, d, e = "value" in kd ? kd.value : kd.textContent, f4 = e.length;
- for (a3 = 0; a3 < c && b[a3] === e[a3]; a3++) ;
- var g2 = c - a3;
- for (d = 1; d <= g2 && b[c - d] === e[f4 - d]; d++) ;
- return md = e.slice(a3, 1 < d ? 1 - d : void 0);
- }
- function od(a3) {
- var b = a3.keyCode;
- return "charCode" in a3 ? (a3 = a3.charCode, a3 === 0 && b === 13 && (a3 = 13)) : a3 = b, a3 === 10 && (a3 = 13), 32 <= a3 || a3 === 13 ? a3 : 0;
- }
- function pd() {
- return !0;
- }
- function qd() {
- return !1;
- }
- function rd(a3) {
- function b(b2, d, e, f4, g2) {
- this._reactName = b2, this._targetInst = e, this.type = d, this.nativeEvent = f4, this.target = g2, this.currentTarget = null;
- for (var c in a3) a3.hasOwnProperty(c) && (b2 = a3[c], this[c] = b2 ? b2(f4) : f4[c]);
- return this.isDefaultPrevented = (f4.defaultPrevented != null ? f4.defaultPrevented : f4.returnValue === !1) ? pd : qd, this.isPropagationStopped = qd, this;
- }
- return A3(b.prototype, { preventDefault: function() {
- this.defaultPrevented = !0;
- var a4 = this.nativeEvent;
- a4 && (a4.preventDefault ? a4.preventDefault() : typeof a4.returnValue != "unknown" && (a4.returnValue = !1), this.isDefaultPrevented = pd);
- }, stopPropagation: function() {
- var a4 = this.nativeEvent;
- a4 && (a4.stopPropagation ? a4.stopPropagation() : typeof a4.cancelBubble != "unknown" && (a4.cancelBubble = !0), this.isPropagationStopped = pd);
- }, persist: function() {
- }, isPersistent: pd }), b;
- }
- var sd = { eventPhase: 0, bubbles: 0, cancelable: 0, timeStamp: function(a3) {
- return a3.timeStamp || Date.now();
- }, defaultPrevented: 0, isTrusted: 0 }, td = rd(sd), ud = A3({}, sd, { view: 0, detail: 0 }), vd = rd(ud), wd, xd, yd, Ad = A3({}, ud, { screenX: 0, screenY: 0, clientX: 0, clientY: 0, pageX: 0, pageY: 0, ctrlKey: 0, shiftKey: 0, altKey: 0, metaKey: 0, getModifierState: zd, button: 0, buttons: 0, relatedTarget: function(a3) {
- return a3.relatedTarget === void 0 ? a3.fromElement === a3.srcElement ? a3.toElement : a3.fromElement : a3.relatedTarget;
- }, movementX: function(a3) {
- return "movementX" in a3 ? a3.movementX : (a3 !== yd && (yd && a3.type === "mousemove" ? (wd = a3.screenX - yd.screenX, xd = a3.screenY - yd.screenY) : xd = wd = 0, yd = a3), wd);
- }, movementY: function(a3) {
- return "movementY" in a3 ? a3.movementY : xd;
- } }), Bd = rd(Ad), Cd = A3({}, Ad, { dataTransfer: 0 }), Dd = rd(Cd), Ed = A3({}, ud, { relatedTarget: 0 }), Fd = rd(Ed), Gd = A3({}, sd, { animationName: 0, elapsedTime: 0, pseudoElement: 0 }), Hd = rd(Gd), Id = A3({}, sd, { clipboardData: function(a3) {
- return "clipboardData" in a3 ? a3.clipboardData : window.clipboardData;
- } }), Jd = rd(Id), Kd = A3({}, sd, { data: 0 }), Ld = rd(Kd), Md = {
- Esc: "Escape",
- Spacebar: " ",
- Left: "ArrowLeft",
- Up: "ArrowUp",
- Right: "ArrowRight",
- Down: "ArrowDown",
- Del: "Delete",
- Win: "OS",
- Menu: "ContextMenu",
- Apps: "ContextMenu",
- Scroll: "ScrollLock",
- MozPrintableKey: "Unidentified"
- }, Nd = {
- 8: "Backspace",
- 9: "Tab",
- 12: "Clear",
- 13: "Enter",
- 16: "Shift",
- 17: "Control",
- 18: "Alt",
- 19: "Pause",
- 20: "CapsLock",
- 27: "Escape",
- 32: " ",
- 33: "PageUp",
- 34: "PageDown",
- 35: "End",
- 36: "Home",
- 37: "ArrowLeft",
- 38: "ArrowUp",
- 39: "ArrowRight",
- 40: "ArrowDown",
- 45: "Insert",
- 46: "Delete",
- 112: "F1",
- 113: "F2",
- 114: "F3",
- 115: "F4",
- 116: "F5",
- 117: "F6",
- 118: "F7",
- 119: "F8",
- 120: "F9",
- 121: "F10",
- 122: "F11",
- 123: "F12",
- 144: "NumLock",
- 145: "ScrollLock",
- 224: "Meta"
- }, Od = { Alt: "altKey", Control: "ctrlKey", Meta: "metaKey", Shift: "shiftKey" };
- function Pd(a3) {
- var b = this.nativeEvent;
- return b.getModifierState ? b.getModifierState(a3) : (a3 = Od[a3]) ? !!b[a3] : !1;
- }
- function zd() {
- return Pd;
- }
- var Qd = A3({}, ud, { key: function(a3) {
- if (a3.key) {
- var b = Md[a3.key] || a3.key;
- if (b !== "Unidentified") return b;
- }
- return a3.type === "keypress" ? (a3 = od(a3), a3 === 13 ? "Enter" : String.fromCharCode(a3)) : a3.type === "keydown" || a3.type === "keyup" ? Nd[a3.keyCode] || "Unidentified" : "";
- }, code: 0, location: 0, ctrlKey: 0, shiftKey: 0, altKey: 0, metaKey: 0, repeat: 0, locale: 0, getModifierState: zd, charCode: function(a3) {
- return a3.type === "keypress" ? od(a3) : 0;
- }, keyCode: function(a3) {
- return a3.type === "keydown" || a3.type === "keyup" ? a3.keyCode : 0;
- }, which: function(a3) {
- return a3.type === "keypress" ? od(a3) : a3.type === "keydown" || a3.type === "keyup" ? a3.keyCode : 0;
- } }), Rd = rd(Qd), Sd = A3({}, Ad, { pointerId: 0, width: 0, height: 0, pressure: 0, tangentialPressure: 0, tiltX: 0, tiltY: 0, twist: 0, pointerType: 0, isPrimary: 0 }), Td = rd(Sd), Ud = A3({}, ud, { touches: 0, targetTouches: 0, changedTouches: 0, altKey: 0, metaKey: 0, ctrlKey: 0, shiftKey: 0, getModifierState: zd }), Vd = rd(Ud), Wd = A3({}, sd, { propertyName: 0, elapsedTime: 0, pseudoElement: 0 }), Xd = rd(Wd), Yd = A3({}, Ad, {
- deltaX: function(a3) {
- return "deltaX" in a3 ? a3.deltaX : "wheelDeltaX" in a3 ? -a3.wheelDeltaX : 0;
- },
- deltaY: function(a3) {
- return "deltaY" in a3 ? a3.deltaY : "wheelDeltaY" in a3 ? -a3.wheelDeltaY : "wheelDelta" in a3 ? -a3.wheelDelta : 0;
- },
- deltaZ: 0,
- deltaMode: 0
- }), Zd = rd(Yd), $d = [9, 13, 27, 32], ae = ia && "CompositionEvent" in window, be = null;
- ia && "documentMode" in document && (be = document.documentMode);
- var ce = ia && "TextEvent" in window && !be, de = ia && (!ae || be && 8 < be && 11 >= be), ee = " ", fe = !1;
- function ge(a3, b) {
- switch (a3) {
- case "keyup":
- return $d.indexOf(b.keyCode) !== -1;
- case "keydown":
- return b.keyCode !== 229;
- case "keypress":
- case "mousedown":
- case "focusout":
- return !0;
- default:
- return !1;
- }
- }
- function he(a3) {
- return a3 = a3.detail, typeof a3 == "object" && "data" in a3 ? a3.data : null;
- }
- var ie = !1;
- function je(a3, b) {
- switch (a3) {
- case "compositionend":
- return he(b);
- case "keypress":
- return b.which !== 32 ? null : (fe = !0, ee);
- case "textInput":
- return a3 = b.data, a3 === ee && fe ? null : a3;
- default:
- return null;
- }
- }
- function ke(a3, b) {
- if (ie) return a3 === "compositionend" || !ae && ge(a3, b) ? (a3 = nd(), md = ld = kd = null, ie = !1, a3) : null;
- switch (a3) {
- case "paste":
- return null;
- case "keypress":
- if (!(b.ctrlKey || b.altKey || b.metaKey) || b.ctrlKey && b.altKey) {
- if (b.char && 1 < b.char.length) return b.char;
- if (b.which) return String.fromCharCode(b.which);
- }
- return null;
- case "compositionend":
- return de && b.locale !== "ko" ? null : b.data;
- default:
- return null;
- }
- }
- var le = { color: !0, date: !0, datetime: !0, "datetime-local": !0, email: !0, month: !0, number: !0, password: !0, range: !0, search: !0, tel: !0, text: !0, time: !0, url: !0, week: !0 };
- function me(a3) {
- var b = a3 && a3.nodeName && a3.nodeName.toLowerCase();
- return b === "input" ? !!le[a3.type] : b === "textarea";
- }
- function ne(a3, b, c, d) {
- Eb(d), b = oe(b, "onChange"), 0 < b.length && (c = new td("onChange", "change", null, c, d), a3.push({ event: c, listeners: b }));
- }
- var pe = null, qe = null;
- function re(a3) {
- se(a3, 0);
- }
- function te(a3) {
- var b = ue(a3);
- if (Wa(b)) return a3;
- }
- function ve(a3, b) {
- if (a3 === "change") return b;
- }
- var we = !1;
- ia && (ia ? (ye = "oninput" in document, ye || (ze = document.createElement("div"), ze.setAttribute("oninput", "return;"), ye = typeof ze.oninput == "function"), xe = ye) : xe = !1, we = xe && (!document.documentMode || 9 < document.documentMode));
- var xe, ye, ze;
- function Ae() {
- pe && (pe.detachEvent("onpropertychange", Be), qe = pe = null);
- }
- function Be(a3) {
- if (a3.propertyName === "value" && te(qe)) {
- var b = [];
- ne(b, qe, a3, xb(a3)), Jb(re, b);
- }
- }
- function Ce(a3, b, c) {
- a3 === "focusin" ? (Ae(), pe = b, qe = c, pe.attachEvent("onpropertychange", Be)) : a3 === "focusout" && Ae();
- }
- function De(a3) {
- if (a3 === "selectionchange" || a3 === "keyup" || a3 === "keydown") return te(qe);
- }
- function Ee(a3, b) {
- if (a3 === "click") return te(b);
- }
- function Fe(a3, b) {
- if (a3 === "input" || a3 === "change") return te(b);
- }
- function Ge(a3, b) {
- return a3 === b && (a3 !== 0 || 1 / a3 === 1 / b) || a3 !== a3 && b !== b;
- }
- var He = typeof Object.is == "function" ? Object.is : Ge;
- function Ie(a3, b) {
- if (He(a3, b)) return !0;
- if (typeof a3 != "object" || a3 === null || typeof b != "object" || b === null) return !1;
- var c = Object.keys(a3), d = Object.keys(b);
- if (c.length !== d.length) return !1;
- for (d = 0; d < c.length; d++) {
- var e = c[d];
- if (!ja.call(b, e) || !He(a3[e], b[e])) return !1;
- }
- return !0;
- }
- function Je(a3) {
- for (; a3 && a3.firstChild; ) a3 = a3.firstChild;
- return a3;
- }
- function Ke(a3, b) {
- var c = Je(a3);
- a3 = 0;
- for (var d; c; ) {
- if (c.nodeType === 3) {
- if (d = a3 + c.textContent.length, a3 <= b && d >= b) return { node: c, offset: b - a3 };
- a3 = d;
- }
- a: {
- for (; c; ) {
- if (c.nextSibling) {
- c = c.nextSibling;
- break a;
- }
- c = c.parentNode;
- }
- c = void 0;
- }
- c = Je(c);
- }
- }
- function Le(a3, b) {
- return a3 && b ? a3 === b ? !0 : a3 && a3.nodeType === 3 ? !1 : b && b.nodeType === 3 ? Le(a3, b.parentNode) : "contains" in a3 ? a3.contains(b) : a3.compareDocumentPosition ? !!(a3.compareDocumentPosition(b) & 16) : !1 : !1;
- }
- function Me() {
- for (var a3 = window, b = Xa(); b instanceof a3.HTMLIFrameElement; ) {
- try {
- var c = typeof b.contentWindow.location.href == "string";
- } catch {
- c = !1;
- }
- if (c) a3 = b.contentWindow;
- else break;
- b = Xa(a3.document);
- }
- return b;
- }
- function Ne(a3) {
- var b = a3 && a3.nodeName && a3.nodeName.toLowerCase();
- return b && (b === "input" && (a3.type === "text" || a3.type === "search" || a3.type === "tel" || a3.type === "url" || a3.type === "password") || b === "textarea" || a3.contentEditable === "true");
- }
- function Oe(a3) {
- var b = Me(), c = a3.focusedElem, d = a3.selectionRange;
- if (b !== c && c && c.ownerDocument && Le(c.ownerDocument.documentElement, c)) {
- if (d !== null && Ne(c)) {
- if (b = d.start, a3 = d.end, a3 === void 0 && (a3 = b), "selectionStart" in c) c.selectionStart = b, c.selectionEnd = Math.min(a3, c.value.length);
- else if (a3 = (b = c.ownerDocument || document) && b.defaultView || window, a3.getSelection) {
- a3 = a3.getSelection();
- var e = c.textContent.length, f4 = Math.min(d.start, e);
- d = d.end === void 0 ? f4 : Math.min(d.end, e), !a3.extend && f4 > d && (e = d, d = f4, f4 = e), e = Ke(c, f4);
- var g2 = Ke(
- c,
- d
- );
- e && g2 && (a3.rangeCount !== 1 || a3.anchorNode !== e.node || a3.anchorOffset !== e.offset || a3.focusNode !== g2.node || a3.focusOffset !== g2.offset) && (b = b.createRange(), b.setStart(e.node, e.offset), a3.removeAllRanges(), f4 > d ? (a3.addRange(b), a3.extend(g2.node, g2.offset)) : (b.setEnd(g2.node, g2.offset), a3.addRange(b)));
- }
- }
- for (b = [], a3 = c; a3 = a3.parentNode; ) a3.nodeType === 1 && b.push({ element: a3, left: a3.scrollLeft, top: a3.scrollTop });
- for (typeof c.focus == "function" && c.focus(), c = 0; c < b.length; c++) a3 = b[c], a3.element.scrollLeft = a3.left, a3.element.scrollTop = a3.top;
- }
- }
- var Pe = ia && "documentMode" in document && 11 >= document.documentMode, Qe = null, Re = null, Se = null, Te = !1;
- function Ue(a3, b, c) {
- var d = c.window === c ? c.document : c.nodeType === 9 ? c : c.ownerDocument;
- Te || Qe == null || Qe !== Xa(d) || (d = Qe, "selectionStart" in d && Ne(d) ? d = { start: d.selectionStart, end: d.selectionEnd } : (d = (d.ownerDocument && d.ownerDocument.defaultView || window).getSelection(), d = { anchorNode: d.anchorNode, anchorOffset: d.anchorOffset, focusNode: d.focusNode, focusOffset: d.focusOffset }), Se && Ie(Se, d) || (Se = d, d = oe(Re, "onSelect"), 0 < d.length && (b = new td("onSelect", "select", null, b, c), a3.push({ event: b, listeners: d }), b.target = Qe)));
- }
- function Ve(a3, b) {
- var c = {};
- return c[a3.toLowerCase()] = b.toLowerCase(), c["Webkit" + a3] = "webkit" + b, c["Moz" + a3] = "moz" + b, c;
- }
- var We = { animationend: Ve("Animation", "AnimationEnd"), animationiteration: Ve("Animation", "AnimationIteration"), animationstart: Ve("Animation", "AnimationStart"), transitionend: Ve("Transition", "TransitionEnd") }, Xe = {}, Ye = {};
- ia && (Ye = document.createElement("div").style, "AnimationEvent" in window || (delete We.animationend.animation, delete We.animationiteration.animation, delete We.animationstart.animation), "TransitionEvent" in window || delete We.transitionend.transition);
- function Ze(a3) {
- if (Xe[a3]) return Xe[a3];
- if (!We[a3]) return a3;
- var b = We[a3], c;
- for (c in b) if (b.hasOwnProperty(c) && c in Ye) return Xe[a3] = b[c];
- return a3;
- }
- var $e = Ze("animationend"), af = Ze("animationiteration"), bf = Ze("animationstart"), cf = Ze("transitionend"), df = /* @__PURE__ */ new Map(), ef = "abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");
- function ff(a3, b) {
- df.set(a3, b), fa(b, [a3]);
- }
- for (gf = 0; gf < ef.length; gf++)
- hf = ef[gf], jf = hf.toLowerCase(), kf = hf[0].toUpperCase() + hf.slice(1), ff(jf, "on" + kf);
- var hf, jf, kf, gf;
- ff($e, "onAnimationEnd");
- ff(af, "onAnimationIteration");
- ff(bf, "onAnimationStart");
- ff("dblclick", "onDoubleClick");
- ff("focusin", "onFocus");
- ff("focusout", "onBlur");
- ff(cf, "onTransitionEnd");
- ha("onMouseEnter", ["mouseout", "mouseover"]);
- ha("onMouseLeave", ["mouseout", "mouseover"]);
- ha("onPointerEnter", ["pointerout", "pointerover"]);
- ha("onPointerLeave", ["pointerout", "pointerover"]);
- fa("onChange", "change click focusin focusout input keydown keyup selectionchange".split(" "));
- fa("onSelect", "focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));
- fa("onBeforeInput", ["compositionend", "keypress", "textInput", "paste"]);
- fa("onCompositionEnd", "compositionend focusout keydown keypress keyup mousedown".split(" "));
- fa("onCompositionStart", "compositionstart focusout keydown keypress keyup mousedown".split(" "));
- fa("onCompositionUpdate", "compositionupdate focusout keydown keypress keyup mousedown".split(" "));
- var lf = "abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "), mf = new Set("cancel close invalid load scroll toggle".split(" ").concat(lf));
- function nf(a3, b, c) {
- var d = a3.type || "unknown-event";
- a3.currentTarget = c, Ub(d, b, void 0, a3), a3.currentTarget = null;
- }
- function se(a3, b) {
- b = (b & 4) !== 0;
- for (var c = 0; c < a3.length; c++) {
- var d = a3[c], e = d.event;
- d = d.listeners;
- a: {
- var f4 = void 0;
- if (b) for (var g2 = d.length - 1; 0 <= g2; g2--) {
- var h3 = d[g2], k = h3.instance, l = h3.currentTarget;
- if (h3 = h3.listener, k !== f4 && e.isPropagationStopped()) break a;
- nf(e, h3, l), f4 = k;
- }
- else for (g2 = 0; g2 < d.length; g2++) {
- if (h3 = d[g2], k = h3.instance, l = h3.currentTarget, h3 = h3.listener, k !== f4 && e.isPropagationStopped()) break a;
- nf(e, h3, l), f4 = k;
- }
- }
- }
- if (Qb) throw a3 = Rb, Qb = !1, Rb = null, a3;
- }
- function D(a3, b) {
- var c = b[of];
- c === void 0 && (c = b[of] = /* @__PURE__ */ new Set());
- var d = a3 + "__bubble";
- c.has(d) || (pf(b, a3, 2, !1), c.add(d));
- }
- function qf(a3, b, c) {
- var d = 0;
- b && (d |= 4), pf(c, a3, d, b);
- }
- var rf = "_reactListening" + Math.random().toString(36).slice(2);
- function sf(a3) {
- if (!a3[rf]) {
- a3[rf] = !0, da.forEach(function(b2) {
- b2 !== "selectionchange" && (mf.has(b2) || qf(b2, !1, a3), qf(b2, !0, a3));
- });
- var b = a3.nodeType === 9 ? a3 : a3.ownerDocument;
- b === null || b[rf] || (b[rf] = !0, qf("selectionchange", !1, b));
- }
- }
- function pf(a3, b, c, d) {
- switch (jd(b)) {
- case 1:
- var e = ed;
- break;
- case 4:
- e = gd;
- break;
- default:
- e = fd;
- }
- c = e.bind(null, b, c, a3), e = void 0, !Lb || b !== "touchstart" && b !== "touchmove" && b !== "wheel" || (e = !0), d ? e !== void 0 ? a3.addEventListener(b, c, { capture: !0, passive: e }) : a3.addEventListener(b, c, !0) : e !== void 0 ? a3.addEventListener(b, c, { passive: e }) : a3.addEventListener(b, c, !1);
- }
- function hd(a3, b, c, d, e) {
- var f4 = d;
- if ((b & 1) === 0 && (b & 2) === 0 && d !== null) a: for (; ; ) {
- if (d === null) return;
- var g2 = d.tag;
- if (g2 === 3 || g2 === 4) {
- var h3 = d.stateNode.containerInfo;
- if (h3 === e || h3.nodeType === 8 && h3.parentNode === e) break;
- if (g2 === 4) for (g2 = d.return; g2 !== null; ) {
- var k = g2.tag;
- if ((k === 3 || k === 4) && (k = g2.stateNode.containerInfo, k === e || k.nodeType === 8 && k.parentNode === e)) return;
- g2 = g2.return;
- }
- for (; h3 !== null; ) {
- if (g2 = Wc(h3), g2 === null) return;
- if (k = g2.tag, k === 5 || k === 6) {
- d = f4 = g2;
- continue a;
- }
- h3 = h3.parentNode;
- }
- }
- d = d.return;
- }
- Jb(function() {
- var d2 = f4, e2 = xb(c), g3 = [];
- a: {
- var h4 = df.get(a3);
- if (h4 !== void 0) {
- var k2 = td, n = a3;
- switch (a3) {
- case "keypress":
- if (od(c) === 0) break a;
- case "keydown":
- case "keyup":
- k2 = Rd;
- break;
- case "focusin":
- n = "focus", k2 = Fd;
- break;
- case "focusout":
- n = "blur", k2 = Fd;
- break;
- case "beforeblur":
- case "afterblur":
- k2 = Fd;
- break;
- case "click":
- if (c.button === 2) break a;
- case "auxclick":
- case "dblclick":
- case "mousedown":
- case "mousemove":
- case "mouseup":
- case "mouseout":
- case "mouseover":
- case "contextmenu":
- k2 = Bd;
- break;
- case "drag":
- case "dragend":
- case "dragenter":
- case "dragexit":
- case "dragleave":
- case "dragover":
- case "dragstart":
- case "drop":
- k2 = Dd;
- break;
- case "touchcancel":
- case "touchend":
- case "touchmove":
- case "touchstart":
- k2 = Vd;
- break;
- case $e:
- case af:
- case bf:
- k2 = Hd;
- break;
- case cf:
- k2 = Xd;
- break;
- case "scroll":
- k2 = vd;
- break;
- case "wheel":
- k2 = Zd;
- break;
- case "copy":
- case "cut":
- case "paste":
- k2 = Jd;
- break;
- case "gotpointercapture":
- case "lostpointercapture":
- case "pointercancel":
- case "pointerdown":
- case "pointermove":
- case "pointerout":
- case "pointerover":
- case "pointerup":
- k2 = Td;
- }
- var t = (b & 4) !== 0, J = !t && a3 === "scroll", x = t ? h4 !== null ? h4 + "Capture" : null : h4;
- t = [];
- for (var w = d2, u2; w !== null; ) {
- u2 = w;
- var F = u2.stateNode;
- if (u2.tag === 5 && F !== null && (u2 = F, x !== null && (F = Kb(w, x), F != null && t.push(tf(w, F, u2)))), J) break;
- w = w.return;
- }
- 0 < t.length && (h4 = new k2(h4, n, null, c, e2), g3.push({ event: h4, listeners: t }));
- }
- }
- if ((b & 7) === 0) {
- a: {
- if (h4 = a3 === "mouseover" || a3 === "pointerover", k2 = a3 === "mouseout" || a3 === "pointerout", h4 && c !== wb && (n = c.relatedTarget || c.fromElement) && (Wc(n) || n[uf])) break a;
- if ((k2 || h4) && (h4 = e2.window === e2 ? e2 : (h4 = e2.ownerDocument) ? h4.defaultView || h4.parentWindow : window, k2 ? (n = c.relatedTarget || c.toElement, k2 = d2, n = n ? Wc(n) : null, n !== null && (J = Vb(n), n !== J || n.tag !== 5 && n.tag !== 6) && (n = null)) : (k2 = null, n = d2), k2 !== n)) {
- if (t = Bd, F = "onMouseLeave", x = "onMouseEnter", w = "mouse", (a3 === "pointerout" || a3 === "pointerover") && (t = Td, F = "onPointerLeave", x = "onPointerEnter", w = "pointer"), J = k2 == null ? h4 : ue(k2), u2 = n == null ? h4 : ue(n), h4 = new t(F, w + "leave", k2, c, e2), h4.target = J, h4.relatedTarget = u2, F = null, Wc(e2) === d2 && (t = new t(x, w + "enter", n, c, e2), t.target = u2, t.relatedTarget = J, F = t), J = F, k2 && n) b: {
- for (t = k2, x = n, w = 0, u2 = t; u2; u2 = vf(u2)) w++;
- for (u2 = 0, F = x; F; F = vf(F)) u2++;
- for (; 0 < w - u2; ) t = vf(t), w--;
- for (; 0 < u2 - w; ) x = vf(x), u2--;
- for (; w--; ) {
- if (t === x || x !== null && t === x.alternate) break b;
- t = vf(t), x = vf(x);
- }
- t = null;
- }
- else t = null;
- k2 !== null && wf(g3, h4, k2, t, !1), n !== null && J !== null && wf(g3, J, n, t, !0);
- }
- }
- a: {
- if (h4 = d2 ? ue(d2) : window, k2 = h4.nodeName && h4.nodeName.toLowerCase(), k2 === "select" || k2 === "input" && h4.type === "file") var na = ve;
- else if (me(h4)) if (we) na = Fe;
- else {
- na = De;
- var xa = Ce;
- }
- else (k2 = h4.nodeName) && k2.toLowerCase() === "input" && (h4.type === "checkbox" || h4.type === "radio") && (na = Ee);
- if (na && (na = na(a3, d2))) {
- ne(g3, na, c, e2);
- break a;
- }
- xa && xa(a3, h4, d2), a3 === "focusout" && (xa = h4._wrapperState) && xa.controlled && h4.type === "number" && cb(h4, "number", h4.value);
- }
- switch (xa = d2 ? ue(d2) : window, a3) {
- case "focusin":
- (me(xa) || xa.contentEditable === "true") && (Qe = xa, Re = d2, Se = null);
- break;
- case "focusout":
- Se = Re = Qe = null;
- break;
- case "mousedown":
- Te = !0;
- break;
- case "contextmenu":
- case "mouseup":
- case "dragend":
- Te = !1, Ue(g3, c, e2);
- break;
- case "selectionchange":
- if (Pe) break;
- case "keydown":
- case "keyup":
- Ue(g3, c, e2);
- }
- var $a;
- if (ae) b: {
- switch (a3) {
- case "compositionstart":
- var ba = "onCompositionStart";
- break b;
- case "compositionend":
- ba = "onCompositionEnd";
- break b;
- case "compositionupdate":
- ba = "onCompositionUpdate";
- break b;
- }
- ba = void 0;
- }
- else ie ? ge(a3, c) && (ba = "onCompositionEnd") : a3 === "keydown" && c.keyCode === 229 && (ba = "onCompositionStart");
- ba && (de && c.locale !== "ko" && (ie || ba !== "onCompositionStart" ? ba === "onCompositionEnd" && ie && ($a = nd()) : (kd = e2, ld = "value" in kd ? kd.value : kd.textContent, ie = !0)), xa = oe(d2, ba), 0 < xa.length && (ba = new Ld(ba, a3, null, c, e2), g3.push({ event: ba, listeners: xa }), $a ? ba.data = $a : ($a = he(c), $a !== null && (ba.data = $a)))), ($a = ce ? je(a3, c) : ke(a3, c)) && (d2 = oe(d2, "onBeforeInput"), 0 < d2.length && (e2 = new Ld("onBeforeInput", "beforeinput", null, c, e2), g3.push({ event: e2, listeners: d2 }), e2.data = $a));
- }
- se(g3, b);
- });
- }
- function tf(a3, b, c) {
- return { instance: a3, listener: b, currentTarget: c };
- }
- function oe(a3, b) {
- for (var c = b + "Capture", d = []; a3 !== null; ) {
- var e = a3, f4 = e.stateNode;
- e.tag === 5 && f4 !== null && (e = f4, f4 = Kb(a3, c), f4 != null && d.unshift(tf(a3, f4, e)), f4 = Kb(a3, b), f4 != null && d.push(tf(a3, f4, e))), a3 = a3.return;
- }
- return d;
- }
- function vf(a3) {
- if (a3 === null) return null;
- do
- a3 = a3.return;
- while (a3 && a3.tag !== 5);
- return a3 || null;
- }
- function wf(a3, b, c, d, e) {
- for (var f4 = b._reactName, g2 = []; c !== null && c !== d; ) {
- var h3 = c, k = h3.alternate, l = h3.stateNode;
- if (k !== null && k === d) break;
- h3.tag === 5 && l !== null && (h3 = l, e ? (k = Kb(c, f4), k != null && g2.unshift(tf(c, k, h3))) : e || (k = Kb(c, f4), k != null && g2.push(tf(c, k, h3)))), c = c.return;
- }
- g2.length !== 0 && a3.push({ event: b, listeners: g2 });
- }
- var xf = /\r\n?/g, yf = /\u0000|\uFFFD/g;
- function zf(a3) {
- return (typeof a3 == "string" ? a3 : "" + a3).replace(xf, `
- `).replace(yf, "");
- }
- function Af(a3, b, c) {
- if (b = zf(b), zf(a3) !== b && c) throw Error(p3(425));
- }
- function Bf() {
- }
- var Cf = null, Df = null;
- function Ef(a3, b) {
- return a3 === "textarea" || a3 === "noscript" || typeof b.children == "string" || typeof b.children == "number" || typeof b.dangerouslySetInnerHTML == "object" && b.dangerouslySetInnerHTML !== null && b.dangerouslySetInnerHTML.__html != null;
- }
- var Ff = typeof setTimeout == "function" ? setTimeout : void 0, Gf = typeof clearTimeout == "function" ? clearTimeout : void 0, Hf = typeof Promise == "function" ? Promise : void 0, Jf = typeof queueMicrotask == "function" ? queueMicrotask : typeof Hf < "u" ? function(a3) {
- return Hf.resolve(null).then(a3).catch(If);
- } : Ff;
- function If(a3) {
- setTimeout(function() {
- throw a3;
- });
- }
- function Kf(a3, b) {
- var c = b, d = 0;
- do {
- var e = c.nextSibling;
- if (a3.removeChild(c), e && e.nodeType === 8) if (c = e.data, c === "/$") {
- if (d === 0) {
- a3.removeChild(e), bd(b);
- return;
- }
- d--;
- } else c !== "$" && c !== "$?" && c !== "$!" || d++;
- c = e;
- } while (c);
- bd(b);
- }
- function Lf(a3) {
- for (; a3 != null; a3 = a3.nextSibling) {
- var b = a3.nodeType;
- if (b === 1 || b === 3) break;
- if (b === 8) {
- if (b = a3.data, b === "$" || b === "$!" || b === "$?") break;
- if (b === "/$") return null;
- }
- }
- return a3;
- }
- function Mf(a3) {
- a3 = a3.previousSibling;
- for (var b = 0; a3; ) {
- if (a3.nodeType === 8) {
- var c = a3.data;
- if (c === "$" || c === "$!" || c === "$?") {
- if (b === 0) return a3;
- b--;
- } else c === "/$" && b++;
- }
- a3 = a3.previousSibling;
- }
- return null;
- }
- var Nf = Math.random().toString(36).slice(2), Of = "__reactFiber$" + Nf, Pf = "__reactProps$" + Nf, uf = "__reactContainer$" + Nf, of = "__reactEvents$" + Nf, Qf = "__reactListeners$" + Nf, Rf = "__reactHandles$" + Nf;
- function Wc(a3) {
- var b = a3[Of];
- if (b) return b;
- for (var c = a3.parentNode; c; ) {
- if (b = c[uf] || c[Of]) {
- if (c = b.alternate, b.child !== null || c !== null && c.child !== null) for (a3 = Mf(a3); a3 !== null; ) {
- if (c = a3[Of]) return c;
- a3 = Mf(a3);
- }
- return b;
- }
- a3 = c, c = a3.parentNode;
- }
- return null;
- }
- function Cb(a3) {
- return a3 = a3[Of] || a3[uf], !a3 || a3.tag !== 5 && a3.tag !== 6 && a3.tag !== 13 && a3.tag !== 3 ? null : a3;
- }
- function ue(a3) {
- if (a3.tag === 5 || a3.tag === 6) return a3.stateNode;
- throw Error(p3(33));
- }
- function Db(a3) {
- return a3[Pf] || null;
- }
- var Sf = [], Tf = -1;
- function Uf(a3) {
- return { current: a3 };
- }
- function E(a3) {
- 0 > Tf || (a3.current = Sf[Tf], Sf[Tf] = null, Tf--);
- }
- function G(a3, b) {
- Tf++, Sf[Tf] = a3.current, a3.current = b;
- }
- var Vf = {}, H = Uf(Vf), Wf = Uf(!1), Xf = Vf;
- function Yf(a3, b) {
- var c = a3.type.contextTypes;
- if (!c) return Vf;
- var d = a3.stateNode;
- if (d && d.__reactInternalMemoizedUnmaskedChildContext === b) return d.__reactInternalMemoizedMaskedChildContext;
- var e = {}, f4;
- for (f4 in c) e[f4] = b[f4];
- return d && (a3 = a3.stateNode, a3.__reactInternalMemoizedUnmaskedChildContext = b, a3.__reactInternalMemoizedMaskedChildContext = e), e;
- }
- function Zf(a3) {
- return a3 = a3.childContextTypes, a3 != null;
- }
- function $f() {
- E(Wf), E(H);
- }
- function ag(a3, b, c) {
- if (H.current !== Vf) throw Error(p3(168));
- G(H, b), G(Wf, c);
- }
- function bg(a3, b, c) {
- var d = a3.stateNode;
- if (b = b.childContextTypes, typeof d.getChildContext != "function") return c;
- d = d.getChildContext();
- for (var e in d) if (!(e in b)) throw Error(p3(108, Ra(a3) || "Unknown", e));
- return A3({}, c, d);
- }
- function cg(a3) {
- return a3 = (a3 = a3.stateNode) && a3.__reactInternalMemoizedMergedChildContext || Vf, Xf = H.current, G(H, a3), G(Wf, Wf.current), !0;
- }
- function dg(a3, b, c) {
- var d = a3.stateNode;
- if (!d) throw Error(p3(169));
- c ? (a3 = bg(a3, b, Xf), d.__reactInternalMemoizedMergedChildContext = a3, E(Wf), E(H), G(H, a3)) : E(Wf), G(Wf, c);
- }
- var eg = null, fg = !1, gg = !1;
- function hg(a3) {
- eg === null ? eg = [a3] : eg.push(a3);
- }
- function ig(a3) {
- fg = !0, hg(a3);
- }
- function jg() {
- if (!gg && eg !== null) {
- gg = !0;
- var a3 = 0, b = C3;
- try {
- var c = eg;
- for (C3 = 1; a3 < c.length; a3++) {
- var d = c[a3];
- do
- d = d(!0);
- while (d !== null);
- }
- eg = null, fg = !1;
- } catch (e) {
- throw eg !== null && (eg = eg.slice(a3 + 1)), ac(fc, jg), e;
- } finally {
- C3 = b, gg = !1;
- }
- }
- return null;
- }
- var kg = [], lg = 0, mg = null, ng = 0, og = [], pg = 0, qg = null, rg = 1, sg = "";
- function tg(a3, b) {
- kg[lg++] = ng, kg[lg++] = mg, mg = a3, ng = b;
- }
- function ug(a3, b, c) {
- og[pg++] = rg, og[pg++] = sg, og[pg++] = qg, qg = a3;
- var d = rg;
- a3 = sg;
- var e = 32 - oc(d) - 1;
- d &= ~(1 << e), c += 1;
- var f4 = 32 - oc(b) + e;
- if (30 < f4) {
- var g2 = e - e % 5;
- f4 = (d & (1 << g2) - 1).toString(32), d >>= g2, e -= g2, rg = 1 << 32 - oc(b) + e | c << e | d, sg = f4 + a3;
- } else rg = 1 << f4 | c << e | d, sg = a3;
- }
- function vg(a3) {
- a3.return !== null && (tg(a3, 1), ug(a3, 1, 0));
- }
- function wg(a3) {
- for (; a3 === mg; ) mg = kg[--lg], kg[lg] = null, ng = kg[--lg], kg[lg] = null;
- for (; a3 === qg; ) qg = og[--pg], og[pg] = null, sg = og[--pg], og[pg] = null, rg = og[--pg], og[pg] = null;
- }
- var xg = null, yg = null, I = !1, zg = null;
- function Ag(a3, b) {
- var c = Bg(5, null, null, 0);
- c.elementType = "DELETED", c.stateNode = b, c.return = a3, b = a3.deletions, b === null ? (a3.deletions = [c], a3.flags |= 16) : b.push(c);
- }
- function Cg(a3, b) {
- switch (a3.tag) {
- case 5:
- var c = a3.type;
- return b = b.nodeType !== 1 || c.toLowerCase() !== b.nodeName.toLowerCase() ? null : b, b !== null ? (a3.stateNode = b, xg = a3, yg = Lf(b.firstChild), !0) : !1;
- case 6:
- return b = a3.pendingProps === "" || b.nodeType !== 3 ? null : b, b !== null ? (a3.stateNode = b, xg = a3, yg = null, !0) : !1;
- case 13:
- return b = b.nodeType !== 8 ? null : b, b !== null ? (c = qg !== null ? { id: rg, overflow: sg } : null, a3.memoizedState = { dehydrated: b, treeContext: c, retryLane: 1073741824 }, c = Bg(18, null, null, 0), c.stateNode = b, c.return = a3, a3.child = c, xg = a3, yg = null, !0) : !1;
- default:
- return !1;
- }
- }
- function Dg(a3) {
- return (a3.mode & 1) !== 0 && (a3.flags & 128) === 0;
- }
- function Eg(a3) {
- if (I) {
- var b = yg;
- if (b) {
- var c = b;
- if (!Cg(a3, b)) {
- if (Dg(a3)) throw Error(p3(418));
- b = Lf(c.nextSibling);
- var d = xg;
- b && Cg(a3, b) ? Ag(d, c) : (a3.flags = a3.flags & -4097 | 2, I = !1, xg = a3);
- }
- } else {
- if (Dg(a3)) throw Error(p3(418));
- a3.flags = a3.flags & -4097 | 2, I = !1, xg = a3;
- }
- }
- }
- function Fg(a3) {
- for (a3 = a3.return; a3 !== null && a3.tag !== 5 && a3.tag !== 3 && a3.tag !== 13; ) a3 = a3.return;
- xg = a3;
- }
- function Gg(a3) {
- if (a3 !== xg) return !1;
- if (!I) return Fg(a3), I = !0, !1;
- var b;
- if ((b = a3.tag !== 3) && !(b = a3.tag !== 5) && (b = a3.type, b = b !== "head" && b !== "body" && !Ef(a3.type, a3.memoizedProps)), b && (b = yg)) {
- if (Dg(a3)) throw Hg(), Error(p3(418));
- for (; b; ) Ag(a3, b), b = Lf(b.nextSibling);
- }
- if (Fg(a3), a3.tag === 13) {
- if (a3 = a3.memoizedState, a3 = a3 !== null ? a3.dehydrated : null, !a3) throw Error(p3(317));
- a: {
- for (a3 = a3.nextSibling, b = 0; a3; ) {
- if (a3.nodeType === 8) {
- var c = a3.data;
- if (c === "/$") {
- if (b === 0) {
- yg = Lf(a3.nextSibling);
- break a;
- }
- b--;
- } else c !== "$" && c !== "$!" && c !== "$?" || b++;
- }
- a3 = a3.nextSibling;
- }
- yg = null;
- }
- } else yg = xg ? Lf(a3.stateNode.nextSibling) : null;
- return !0;
- }
- function Hg() {
- for (var a3 = yg; a3; ) a3 = Lf(a3.nextSibling);
- }
- function Ig() {
- yg = xg = null, I = !1;
- }
- function Jg(a3) {
- zg === null ? zg = [a3] : zg.push(a3);
- }
- var Kg = ua.ReactCurrentBatchConfig;
- function Lg(a3, b, c) {
- if (a3 = c.ref, a3 !== null && typeof a3 != "function" && typeof a3 != "object") {
- if (c._owner) {
- if (c = c._owner, c) {
- if (c.tag !== 1) throw Error(p3(309));
- var d = c.stateNode;
- }
- if (!d) throw Error(p3(147, a3));
- var e = d, f4 = "" + a3;
- return b !== null && b.ref !== null && typeof b.ref == "function" && b.ref._stringRef === f4 ? b.ref : (b = function(a4) {
- var b2 = e.refs;
- a4 === null ? delete b2[f4] : b2[f4] = a4;
- }, b._stringRef = f4, b);
- }
- if (typeof a3 != "string") throw Error(p3(284));
- if (!c._owner) throw Error(p3(290, a3));
- }
- return a3;
- }
- function Mg(a3, b) {
- throw a3 = Object.prototype.toString.call(b), Error(p3(31, a3 === "[object Object]" ? "object with keys {" + Object.keys(b).join(", ") + "}" : a3));
- }
- function Ng(a3) {
- var b = a3._init;
- return b(a3._payload);
- }
- function Og(a3) {
- function b(b2, c2) {
- if (a3) {
- var d2 = b2.deletions;
- d2 === null ? (b2.deletions = [c2], b2.flags |= 16) : d2.push(c2);
- }
- }
- function c(c2, d2) {
- if (!a3) return null;
- for (; d2 !== null; ) b(c2, d2), d2 = d2.sibling;
- return null;
- }
- function d(a4, b2) {
- for (a4 = /* @__PURE__ */ new Map(); b2 !== null; ) b2.key !== null ? a4.set(b2.key, b2) : a4.set(b2.index, b2), b2 = b2.sibling;
- return a4;
- }
- function e(a4, b2) {
- return a4 = Pg(a4, b2), a4.index = 0, a4.sibling = null, a4;
- }
- function f4(b2, c2, d2) {
- return b2.index = d2, a3 ? (d2 = b2.alternate, d2 !== null ? (d2 = d2.index, d2 < c2 ? (b2.flags |= 2, c2) : d2) : (b2.flags |= 2, c2)) : (b2.flags |= 1048576, c2);
- }
- function g2(b2) {
- return a3 && b2.alternate === null && (b2.flags |= 2), b2;
- }
- function h3(a4, b2, c2, d2) {
- return b2 === null || b2.tag !== 6 ? (b2 = Qg(c2, a4.mode, d2), b2.return = a4, b2) : (b2 = e(b2, c2), b2.return = a4, b2);
- }
- function k(a4, b2, c2, d2) {
- var f5 = c2.type;
- return f5 === ya ? m3(a4, b2, c2.props.children, d2, c2.key) : b2 !== null && (b2.elementType === f5 || typeof f5 == "object" && f5 !== null && f5.$$typeof === Ha && Ng(f5) === b2.type) ? (d2 = e(b2, c2.props), d2.ref = Lg(a4, b2, c2), d2.return = a4, d2) : (d2 = Rg(c2.type, c2.key, c2.props, null, a4.mode, d2), d2.ref = Lg(a4, b2, c2), d2.return = a4, d2);
- }
- function l(a4, b2, c2, d2) {
- return b2 === null || b2.tag !== 4 || b2.stateNode.containerInfo !== c2.containerInfo || b2.stateNode.implementation !== c2.implementation ? (b2 = Sg(c2, a4.mode, d2), b2.return = a4, b2) : (b2 = e(b2, c2.children || []), b2.return = a4, b2);
- }
- function m3(a4, b2, c2, d2, f5) {
- return b2 === null || b2.tag !== 7 ? (b2 = Tg(c2, a4.mode, d2, f5), b2.return = a4, b2) : (b2 = e(b2, c2), b2.return = a4, b2);
- }
- function q(a4, b2, c2) {
- if (typeof b2 == "string" && b2 !== "" || typeof b2 == "number") return b2 = Qg("" + b2, a4.mode, c2), b2.return = a4, b2;
- if (typeof b2 == "object" && b2 !== null) {
- switch (b2.$$typeof) {
- case va:
- return c2 = Rg(b2.type, b2.key, b2.props, null, a4.mode, c2), c2.ref = Lg(a4, null, b2), c2.return = a4, c2;
- case wa:
- return b2 = Sg(b2, a4.mode, c2), b2.return = a4, b2;
- case Ha:
- var d2 = b2._init;
- return q(a4, d2(b2._payload), c2);
- }
- if (eb(b2) || Ka(b2)) return b2 = Tg(b2, a4.mode, c2, null), b2.return = a4, b2;
- Mg(a4, b2);
- }
- return null;
- }
- function r2(a4, b2, c2, d2) {
- var e2 = b2 !== null ? b2.key : null;
- if (typeof c2 == "string" && c2 !== "" || typeof c2 == "number") return e2 !== null ? null : h3(a4, b2, "" + c2, d2);
- if (typeof c2 == "object" && c2 !== null) {
- switch (c2.$$typeof) {
- case va:
- return c2.key === e2 ? k(a4, b2, c2, d2) : null;
- case wa:
- return c2.key === e2 ? l(a4, b2, c2, d2) : null;
- case Ha:
- return e2 = c2._init, r2(
- a4,
- b2,
- e2(c2._payload),
- d2
- );
- }
- if (eb(c2) || Ka(c2)) return e2 !== null ? null : m3(a4, b2, c2, d2, null);
- Mg(a4, c2);
- }
- return null;
- }
- function y(a4, b2, c2, d2, e2) {
- if (typeof d2 == "string" && d2 !== "" || typeof d2 == "number") return a4 = a4.get(c2) || null, h3(b2, a4, "" + d2, e2);
- if (typeof d2 == "object" && d2 !== null) {
- switch (d2.$$typeof) {
- case va:
- return a4 = a4.get(d2.key === null ? c2 : d2.key) || null, k(b2, a4, d2, e2);
- case wa:
- return a4 = a4.get(d2.key === null ? c2 : d2.key) || null, l(b2, a4, d2, e2);
- case Ha:
- var f5 = d2._init;
- return y(a4, b2, c2, f5(d2._payload), e2);
- }
- if (eb(d2) || Ka(d2)) return a4 = a4.get(c2) || null, m3(b2, a4, d2, e2, null);
- Mg(b2, d2);
- }
- return null;
- }
- function n(e2, g3, h4, k2) {
- for (var l2 = null, m4 = null, u2 = g3, w = g3 = 0, x = null; u2 !== null && w < h4.length; w++) {
- u2.index > w ? (x = u2, u2 = null) : x = u2.sibling;
- var n2 = r2(e2, u2, h4[w], k2);
- if (n2 === null) {
- u2 === null && (u2 = x);
- break;
- }
- a3 && u2 && n2.alternate === null && b(e2, u2), g3 = f4(n2, g3, w), m4 === null ? l2 = n2 : m4.sibling = n2, m4 = n2, u2 = x;
- }
- if (w === h4.length) return c(e2, u2), I && tg(e2, w), l2;
- if (u2 === null) {
- for (; w < h4.length; w++) u2 = q(e2, h4[w], k2), u2 !== null && (g3 = f4(u2, g3, w), m4 === null ? l2 = u2 : m4.sibling = u2, m4 = u2);
- return I && tg(e2, w), l2;
- }
- for (u2 = d(e2, u2); w < h4.length; w++) x = y(u2, e2, w, h4[w], k2), x !== null && (a3 && x.alternate !== null && u2.delete(x.key === null ? w : x.key), g3 = f4(x, g3, w), m4 === null ? l2 = x : m4.sibling = x, m4 = x);
- return a3 && u2.forEach(function(a4) {
- return b(e2, a4);
- }), I && tg(e2, w), l2;
- }
- function t(e2, g3, h4, k2) {
- var l2 = Ka(h4);
- if (typeof l2 != "function") throw Error(p3(150));
- if (h4 = l2.call(h4), h4 == null) throw Error(p3(151));
- for (var u2 = l2 = null, m4 = g3, w = g3 = 0, x = null, n2 = h4.next(); m4 !== null && !n2.done; w++, n2 = h4.next()) {
- m4.index > w ? (x = m4, m4 = null) : x = m4.sibling;
- var t2 = r2(e2, m4, n2.value, k2);
- if (t2 === null) {
- m4 === null && (m4 = x);
- break;
- }
- a3 && m4 && t2.alternate === null && b(e2, m4), g3 = f4(t2, g3, w), u2 === null ? l2 = t2 : u2.sibling = t2, u2 = t2, m4 = x;
- }
- if (n2.done) return c(
- e2,
- m4
- ), I && tg(e2, w), l2;
- if (m4 === null) {
- for (; !n2.done; w++, n2 = h4.next()) n2 = q(e2, n2.value, k2), n2 !== null && (g3 = f4(n2, g3, w), u2 === null ? l2 = n2 : u2.sibling = n2, u2 = n2);
- return I && tg(e2, w), l2;
- }
- for (m4 = d(e2, m4); !n2.done; w++, n2 = h4.next()) n2 = y(m4, e2, w, n2.value, k2), n2 !== null && (a3 && n2.alternate !== null && m4.delete(n2.key === null ? w : n2.key), g3 = f4(n2, g3, w), u2 === null ? l2 = n2 : u2.sibling = n2, u2 = n2);
- return a3 && m4.forEach(function(a4) {
- return b(e2, a4);
- }), I && tg(e2, w), l2;
- }
- function J(a4, d2, f5, h4) {
- if (typeof f5 == "object" && f5 !== null && f5.type === ya && f5.key === null && (f5 = f5.props.children), typeof f5 == "object" && f5 !== null) {
- switch (f5.$$typeof) {
- case va:
- a: {
- for (var k2 = f5.key, l2 = d2; l2 !== null; ) {
- if (l2.key === k2) {
- if (k2 = f5.type, k2 === ya) {
- if (l2.tag === 7) {
- c(a4, l2.sibling), d2 = e(l2, f5.props.children), d2.return = a4, a4 = d2;
- break a;
- }
- } else if (l2.elementType === k2 || typeof k2 == "object" && k2 !== null && k2.$$typeof === Ha && Ng(k2) === l2.type) {
- c(a4, l2.sibling), d2 = e(l2, f5.props), d2.ref = Lg(a4, l2, f5), d2.return = a4, a4 = d2;
- break a;
- }
- c(a4, l2);
- break;
- } else b(a4, l2);
- l2 = l2.sibling;
- }
- f5.type === ya ? (d2 = Tg(f5.props.children, a4.mode, h4, f5.key), d2.return = a4, a4 = d2) : (h4 = Rg(f5.type, f5.key, f5.props, null, a4.mode, h4), h4.ref = Lg(a4, d2, f5), h4.return = a4, a4 = h4);
- }
- return g2(a4);
- case wa:
- a: {
- for (l2 = f5.key; d2 !== null; ) {
- if (d2.key === l2) if (d2.tag === 4 && d2.stateNode.containerInfo === f5.containerInfo && d2.stateNode.implementation === f5.implementation) {
- c(a4, d2.sibling), d2 = e(d2, f5.children || []), d2.return = a4, a4 = d2;
- break a;
- } else {
- c(a4, d2);
- break;
- }
- else b(a4, d2);
- d2 = d2.sibling;
- }
- d2 = Sg(f5, a4.mode, h4), d2.return = a4, a4 = d2;
- }
- return g2(a4);
- case Ha:
- return l2 = f5._init, J(a4, d2, l2(f5._payload), h4);
- }
- if (eb(f5)) return n(a4, d2, f5, h4);
- if (Ka(f5)) return t(a4, d2, f5, h4);
- Mg(a4, f5);
- }
- return typeof f5 == "string" && f5 !== "" || typeof f5 == "number" ? (f5 = "" + f5, d2 !== null && d2.tag === 6 ? (c(a4, d2.sibling), d2 = e(d2, f5), d2.return = a4, a4 = d2) : (c(a4, d2), d2 = Qg(f5, a4.mode, h4), d2.return = a4, a4 = d2), g2(a4)) : c(a4, d2);
- }
- return J;
- }
- var Ug = Og(!0), Vg = Og(!1), Wg = Uf(null), Xg = null, Yg = null, Zg = null;
- function $g() {
- Zg = Yg = Xg = null;
- }
- function ah(a3) {
- var b = Wg.current;
- E(Wg), a3._currentValue = b;
- }
- function bh(a3, b, c) {
- for (; a3 !== null; ) {
- var d = a3.alternate;
- if ((a3.childLanes & b) !== b ? (a3.childLanes |= b, d !== null && (d.childLanes |= b)) : d !== null && (d.childLanes & b) !== b && (d.childLanes |= b), a3 === c) break;
- a3 = a3.return;
- }
- }
- function ch(a3, b) {
- Xg = a3, Zg = Yg = null, a3 = a3.dependencies, a3 !== null && a3.firstContext !== null && ((a3.lanes & b) !== 0 && (dh = !0), a3.firstContext = null);
- }
- function eh(a3) {
- var b = a3._currentValue;
- if (Zg !== a3) if (a3 = { context: a3, memoizedValue: b, next: null }, Yg === null) {
- if (Xg === null) throw Error(p3(308));
- Yg = a3, Xg.dependencies = { lanes: 0, firstContext: a3 };
- } else Yg = Yg.next = a3;
- return b;
- }
- var fh = null;
- function gh(a3) {
- fh === null ? fh = [a3] : fh.push(a3);
- }
- function hh(a3, b, c, d) {
- var e = b.interleaved;
- return e === null ? (c.next = c, gh(b)) : (c.next = e.next, e.next = c), b.interleaved = c, ih(a3, d);
- }
- function ih(a3, b) {
- a3.lanes |= b;
- var c = a3.alternate;
- for (c !== null && (c.lanes |= b), c = a3, a3 = a3.return; a3 !== null; ) a3.childLanes |= b, c = a3.alternate, c !== null && (c.childLanes |= b), c = a3, a3 = a3.return;
- return c.tag === 3 ? c.stateNode : null;
- }
- var jh = !1;
- function kh(a3) {
- a3.updateQueue = { baseState: a3.memoizedState, firstBaseUpdate: null, lastBaseUpdate: null, shared: { pending: null, interleaved: null, lanes: 0 }, effects: null };
- }
- function lh(a3, b) {
- a3 = a3.updateQueue, b.updateQueue === a3 && (b.updateQueue = { baseState: a3.baseState, firstBaseUpdate: a3.firstBaseUpdate, lastBaseUpdate: a3.lastBaseUpdate, shared: a3.shared, effects: a3.effects });
- }
- function mh(a3, b) {
- return { eventTime: a3, lane: b, tag: 0, payload: null, callback: null, next: null };
- }
- function nh(a3, b, c) {
- var d = a3.updateQueue;
- if (d === null) return null;
- if (d = d.shared, (K2 & 2) !== 0) {
- var e = d.pending;
- return e === null ? b.next = b : (b.next = e.next, e.next = b), d.pending = b, ih(a3, c);
- }
- return e = d.interleaved, e === null ? (b.next = b, gh(d)) : (b.next = e.next, e.next = b), d.interleaved = b, ih(a3, c);
- }
- function oh(a3, b, c) {
- if (b = b.updateQueue, b !== null && (b = b.shared, (c & 4194240) !== 0)) {
- var d = b.lanes;
- d &= a3.pendingLanes, c |= d, b.lanes = c, Cc(a3, c);
- }
- }
- function ph(a3, b) {
- var c = a3.updateQueue, d = a3.alternate;
- if (d !== null && (d = d.updateQueue, c === d)) {
- var e = null, f4 = null;
- if (c = c.firstBaseUpdate, c !== null) {
- do {
- var g2 = { eventTime: c.eventTime, lane: c.lane, tag: c.tag, payload: c.payload, callback: c.callback, next: null };
- f4 === null ? e = f4 = g2 : f4 = f4.next = g2, c = c.next;
- } while (c !== null);
- f4 === null ? e = f4 = b : f4 = f4.next = b;
- } else e = f4 = b;
- c = { baseState: d.baseState, firstBaseUpdate: e, lastBaseUpdate: f4, shared: d.shared, effects: d.effects }, a3.updateQueue = c;
- return;
- }
- a3 = c.lastBaseUpdate, a3 === null ? c.firstBaseUpdate = b : a3.next = b, c.lastBaseUpdate = b;
- }
- function qh(a3, b, c, d) {
- var e = a3.updateQueue;
- jh = !1;
- var f4 = e.firstBaseUpdate, g2 = e.lastBaseUpdate, h3 = e.shared.pending;
- if (h3 !== null) {
- e.shared.pending = null;
- var k = h3, l = k.next;
- k.next = null, g2 === null ? f4 = l : g2.next = l, g2 = k;
- var m3 = a3.alternate;
- m3 !== null && (m3 = m3.updateQueue, h3 = m3.lastBaseUpdate, h3 !== g2 && (h3 === null ? m3.firstBaseUpdate = l : h3.next = l, m3.lastBaseUpdate = k));
- }
- if (f4 !== null) {
- var q = e.baseState;
- g2 = 0, m3 = l = k = null, h3 = f4;
- do {
- var r2 = h3.lane, y = h3.eventTime;
- if ((d & r2) === r2) {
- m3 !== null && (m3 = m3.next = {
- eventTime: y,
- lane: 0,
- tag: h3.tag,
- payload: h3.payload,
- callback: h3.callback,
- next: null
- });
- a: {
- var n = a3, t = h3;
- switch (r2 = b, y = c, t.tag) {
- case 1:
- if (n = t.payload, typeof n == "function") {
- q = n.call(y, q, r2);
- break a;
- }
- q = n;
- break a;
- case 3:
- n.flags = n.flags & -65537 | 128;
- case 0:
- if (n = t.payload, r2 = typeof n == "function" ? n.call(y, q, r2) : n, r2 == null) break a;
- q = A3({}, q, r2);
- break a;
- case 2:
- jh = !0;
- }
- }
- h3.callback !== null && h3.lane !== 0 && (a3.flags |= 64, r2 = e.effects, r2 === null ? e.effects = [h3] : r2.push(h3));
- } else y = { eventTime: y, lane: r2, tag: h3.tag, payload: h3.payload, callback: h3.callback, next: null }, m3 === null ? (l = m3 = y, k = q) : m3 = m3.next = y, g2 |= r2;
- if (h3 = h3.next, h3 === null) {
- if (h3 = e.shared.pending, h3 === null) break;
- r2 = h3, h3 = r2.next, r2.next = null, e.lastBaseUpdate = r2, e.shared.pending = null;
- }
- } while (!0);
- if (m3 === null && (k = q), e.baseState = k, e.firstBaseUpdate = l, e.lastBaseUpdate = m3, b = e.shared.interleaved, b !== null) {
- e = b;
- do
- g2 |= e.lane, e = e.next;
- while (e !== b);
- } else f4 === null && (e.shared.lanes = 0);
- rh |= g2, a3.lanes = g2, a3.memoizedState = q;
- }
- }
- function sh(a3, b, c) {
- if (a3 = b.effects, b.effects = null, a3 !== null) for (b = 0; b < a3.length; b++) {
- var d = a3[b], e = d.callback;
- if (e !== null) {
- if (d.callback = null, d = c, typeof e != "function") throw Error(p3(191, e));
- e.call(d);
- }
- }
- }
- var th = {}, uh = Uf(th), vh = Uf(th), wh = Uf(th);
- function xh(a3) {
- if (a3 === th) throw Error(p3(174));
- return a3;
- }
- function yh(a3, b) {
- switch (G(wh, b), G(vh, a3), G(uh, th), a3 = b.nodeType, a3) {
- case 9:
- case 11:
- b = (b = b.documentElement) ? b.namespaceURI : lb(null, "");
- break;
- default:
- a3 = a3 === 8 ? b.parentNode : b, b = a3.namespaceURI || null, a3 = a3.tagName, b = lb(b, a3);
- }
- E(uh), G(uh, b);
- }
- function zh() {
- E(uh), E(vh), E(wh);
- }
- function Ah(a3) {
- xh(wh.current);
- var b = xh(uh.current), c = lb(b, a3.type);
- b !== c && (G(vh, a3), G(uh, c));
- }
- function Bh(a3) {
- vh.current === a3 && (E(uh), E(vh));
- }
- var L = Uf(0);
- function Ch(a3) {
- for (var b = a3; b !== null; ) {
- if (b.tag === 13) {
- var c = b.memoizedState;
- if (c !== null && (c = c.dehydrated, c === null || c.data === "$?" || c.data === "$!")) return b;
- } else if (b.tag === 19 && b.memoizedProps.revealOrder !== void 0) {
- if ((b.flags & 128) !== 0) return b;
- } else if (b.child !== null) {
- b.child.return = b, b = b.child;
- continue;
- }
- if (b === a3) break;
- for (; b.sibling === null; ) {
- if (b.return === null || b.return === a3) return null;
- b = b.return;
- }
- b.sibling.return = b.return, b = b.sibling;
- }
- return null;
- }
- var Dh = [];
- function Eh() {
- for (var a3 = 0; a3 < Dh.length; a3++) Dh[a3]._workInProgressVersionPrimary = null;
- Dh.length = 0;
- }
- var Fh = ua.ReactCurrentDispatcher, Gh = ua.ReactCurrentBatchConfig, Hh = 0, M = null, N = null, O = null, Ih = !1, Jh = !1, Kh = 0, Lh = 0;
- function P3() {
- throw Error(p3(321));
- }
- function Mh(a3, b) {
- if (b === null) return !1;
- for (var c = 0; c < b.length && c < a3.length; c++) if (!He(a3[c], b[c])) return !1;
- return !0;
- }
- function Nh(a3, b, c, d, e, f4) {
- if (Hh = f4, M = b, b.memoizedState = null, b.updateQueue = null, b.lanes = 0, Fh.current = a3 === null || a3.memoizedState === null ? Oh : Ph, a3 = c(d, e), Jh) {
- f4 = 0;
- do {
- if (Jh = !1, Kh = 0, 25 <= f4) throw Error(p3(301));
- f4 += 1, O = N = null, b.updateQueue = null, Fh.current = Qh, a3 = c(d, e);
- } while (Jh);
- }
- if (Fh.current = Rh, b = N !== null && N.next !== null, Hh = 0, O = N = M = null, Ih = !1, b) throw Error(p3(300));
- return a3;
- }
- function Sh() {
- var a3 = Kh !== 0;
- return Kh = 0, a3;
- }
- function Th() {
- var a3 = { memoizedState: null, baseState: null, baseQueue: null, queue: null, next: null };
- return O === null ? M.memoizedState = O = a3 : O = O.next = a3, O;
- }
- function Uh() {
- if (N === null) {
- var a3 = M.alternate;
- a3 = a3 !== null ? a3.memoizedState : null;
- } else a3 = N.next;
- var b = O === null ? M.memoizedState : O.next;
- if (b !== null) O = b, N = a3;
- else {
- if (a3 === null) throw Error(p3(310));
- N = a3, a3 = { memoizedState: N.memoizedState, baseState: N.baseState, baseQueue: N.baseQueue, queue: N.queue, next: null }, O === null ? M.memoizedState = O = a3 : O = O.next = a3;
- }
- return O;
- }
- function Vh(a3, b) {
- return typeof b == "function" ? b(a3) : b;
- }
- function Wh(a3) {
- var b = Uh(), c = b.queue;
- if (c === null) throw Error(p3(311));
- c.lastRenderedReducer = a3;
- var d = N, e = d.baseQueue, f4 = c.pending;
- if (f4 !== null) {
- if (e !== null) {
- var g2 = e.next;
- e.next = f4.next, f4.next = g2;
- }
- d.baseQueue = e = f4, c.pending = null;
- }
- if (e !== null) {
- f4 = e.next, d = d.baseState;
- var h3 = g2 = null, k = null, l = f4;
- do {
- var m3 = l.lane;
- if ((Hh & m3) === m3) k !== null && (k = k.next = { lane: 0, action: l.action, hasEagerState: l.hasEagerState, eagerState: l.eagerState, next: null }), d = l.hasEagerState ? l.eagerState : a3(d, l.action);
- else {
- var q = {
- lane: m3,
- action: l.action,
- hasEagerState: l.hasEagerState,
- eagerState: l.eagerState,
- next: null
- };
- k === null ? (h3 = k = q, g2 = d) : k = k.next = q, M.lanes |= m3, rh |= m3;
- }
- l = l.next;
- } while (l !== null && l !== f4);
- k === null ? g2 = d : k.next = h3, He(d, b.memoizedState) || (dh = !0), b.memoizedState = d, b.baseState = g2, b.baseQueue = k, c.lastRenderedState = d;
- }
- if (a3 = c.interleaved, a3 !== null) {
- e = a3;
- do
- f4 = e.lane, M.lanes |= f4, rh |= f4, e = e.next;
- while (e !== a3);
- } else e === null && (c.lanes = 0);
- return [b.memoizedState, c.dispatch];
- }
- function Xh(a3) {
- var b = Uh(), c = b.queue;
- if (c === null) throw Error(p3(311));
- c.lastRenderedReducer = a3;
- var d = c.dispatch, e = c.pending, f4 = b.memoizedState;
- if (e !== null) {
- c.pending = null;
- var g2 = e = e.next;
- do
- f4 = a3(f4, g2.action), g2 = g2.next;
- while (g2 !== e);
- He(f4, b.memoizedState) || (dh = !0), b.memoizedState = f4, b.baseQueue === null && (b.baseState = f4), c.lastRenderedState = f4;
- }
- return [f4, d];
- }
- function Yh() {
- }
- function Zh(a3, b) {
- var c = M, d = Uh(), e = b(), f4 = !He(d.memoizedState, e);
- if (f4 && (d.memoizedState = e, dh = !0), d = d.queue, $h(ai.bind(null, c, d, a3), [a3]), d.getSnapshot !== b || f4 || O !== null && O.memoizedState.tag & 1) {
- if (c.flags |= 2048, bi(9, ci.bind(null, c, d, e, b), void 0, null), Q === null) throw Error(p3(349));
- (Hh & 30) !== 0 || di(c, b, e);
- }
- return e;
- }
- function di(a3, b, c) {
- a3.flags |= 16384, a3 = { getSnapshot: b, value: c }, b = M.updateQueue, b === null ? (b = { lastEffect: null, stores: null }, M.updateQueue = b, b.stores = [a3]) : (c = b.stores, c === null ? b.stores = [a3] : c.push(a3));
- }
- function ci(a3, b, c, d) {
- b.value = c, b.getSnapshot = d, ei(b) && fi(a3);
- }
- function ai(a3, b, c) {
- return c(function() {
- ei(b) && fi(a3);
- });
- }
- function ei(a3) {
- var b = a3.getSnapshot;
- a3 = a3.value;
- try {
- var c = b();
- return !He(a3, c);
- } catch {
- return !0;
- }
- }
- function fi(a3) {
- var b = ih(a3, 1);
- b !== null && gi(b, a3, 1, -1);
- }
- function hi(a3) {
- var b = Th();
- return typeof a3 == "function" && (a3 = a3()), b.memoizedState = b.baseState = a3, a3 = { pending: null, interleaved: null, lanes: 0, dispatch: null, lastRenderedReducer: Vh, lastRenderedState: a3 }, b.queue = a3, a3 = a3.dispatch = ii.bind(null, M, a3), [b.memoizedState, a3];
- }
- function bi(a3, b, c, d) {
- return a3 = { tag: a3, create: b, destroy: c, deps: d, next: null }, b = M.updateQueue, b === null ? (b = { lastEffect: null, stores: null }, M.updateQueue = b, b.lastEffect = a3.next = a3) : (c = b.lastEffect, c === null ? b.lastEffect = a3.next = a3 : (d = c.next, c.next = a3, a3.next = d, b.lastEffect = a3)), a3;
- }
- function ji() {
- return Uh().memoizedState;
- }
- function ki(a3, b, c, d) {
- var e = Th();
- M.flags |= a3, e.memoizedState = bi(1 | b, c, void 0, d === void 0 ? null : d);
- }
- function li(a3, b, c, d) {
- var e = Uh();
- d = d === void 0 ? null : d;
- var f4 = void 0;
- if (N !== null) {
- var g2 = N.memoizedState;
- if (f4 = g2.destroy, d !== null && Mh(d, g2.deps)) {
- e.memoizedState = bi(b, c, f4, d);
- return;
- }
- }
- M.flags |= a3, e.memoizedState = bi(1 | b, c, f4, d);
- }
- function mi(a3, b) {
- return ki(8390656, 8, a3, b);
- }
- function $h(a3, b) {
- return li(2048, 8, a3, b);
- }
- function ni(a3, b) {
- return li(4, 2, a3, b);
- }
- function oi(a3, b) {
- return li(4, 4, a3, b);
- }
- function pi(a3, b) {
- if (typeof b == "function") return a3 = a3(), b(a3), function() {
- b(null);
- };
- if (b != null) return a3 = a3(), b.current = a3, function() {
- b.current = null;
- };
- }
- function qi(a3, b, c) {
- return c = c != null ? c.concat([a3]) : null, li(4, 4, pi.bind(null, b, a3), c);
- }
- function ri() {
- }
- function si(a3, b) {
- var c = Uh();
- b = b === void 0 ? null : b;
- var d = c.memoizedState;
- return d !== null && b !== null && Mh(b, d[1]) ? d[0] : (c.memoizedState = [a3, b], a3);
- }
- function ti(a3, b) {
- var c = Uh();
- b = b === void 0 ? null : b;
- var d = c.memoizedState;
- return d !== null && b !== null && Mh(b, d[1]) ? d[0] : (a3 = a3(), c.memoizedState = [a3, b], a3);
- }
- function ui(a3, b, c) {
- return (Hh & 21) === 0 ? (a3.baseState && (a3.baseState = !1, dh = !0), a3.memoizedState = c) : (He(c, b) || (c = yc(), M.lanes |= c, rh |= c, a3.baseState = !0), b);
- }
- function vi(a3, b) {
- var c = C3;
- C3 = c !== 0 && 4 > c ? c : 4, a3(!0);
- var d = Gh.transition;
- Gh.transition = {};
- try {
- a3(!1), b();
- } finally {
- C3 = c, Gh.transition = d;
- }
- }
- function wi() {
- return Uh().memoizedState;
- }
- function xi(a3, b, c) {
- var d = yi(a3);
- if (c = { lane: d, action: c, hasEagerState: !1, eagerState: null, next: null }, zi(a3)) Ai(b, c);
- else if (c = hh(a3, b, c, d), c !== null) {
- var e = R();
- gi(c, a3, d, e), Bi(c, b, d);
- }
- }
- function ii(a3, b, c) {
- var d = yi(a3), e = { lane: d, action: c, hasEagerState: !1, eagerState: null, next: null };
- if (zi(a3)) Ai(b, e);
- else {
- var f4 = a3.alternate;
- if (a3.lanes === 0 && (f4 === null || f4.lanes === 0) && (f4 = b.lastRenderedReducer, f4 !== null)) try {
- var g2 = b.lastRenderedState, h3 = f4(g2, c);
- if (e.hasEagerState = !0, e.eagerState = h3, He(h3, g2)) {
- var k = b.interleaved;
- k === null ? (e.next = e, gh(b)) : (e.next = k.next, k.next = e), b.interleaved = e;
- return;
- }
- } catch {
- } finally {
- }
- c = hh(a3, b, e, d), c !== null && (e = R(), gi(c, a3, d, e), Bi(c, b, d));
- }
- }
- function zi(a3) {
- var b = a3.alternate;
- return a3 === M || b !== null && b === M;
- }
- function Ai(a3, b) {
- Jh = Ih = !0;
- var c = a3.pending;
- c === null ? b.next = b : (b.next = c.next, c.next = b), a3.pending = b;
- }
- function Bi(a3, b, c) {
- if ((c & 4194240) !== 0) {
- var d = b.lanes;
- d &= a3.pendingLanes, c |= d, b.lanes = c, Cc(a3, c);
- }
- }
- var Rh = { readContext: eh, useCallback: P3, useContext: P3, useEffect: P3, useImperativeHandle: P3, useInsertionEffect: P3, useLayoutEffect: P3, useMemo: P3, useReducer: P3, useRef: P3, useState: P3, useDebugValue: P3, useDeferredValue: P3, useTransition: P3, useMutableSource: P3, useSyncExternalStore: P3, useId: P3, unstable_isNewReconciler: !1 }, Oh = { readContext: eh, useCallback: function(a3, b) {
- return Th().memoizedState = [a3, b === void 0 ? null : b], a3;
- }, useContext: eh, useEffect: mi, useImperativeHandle: function(a3, b, c) {
- return c = c != null ? c.concat([a3]) : null, ki(
- 4194308,
- 4,
- pi.bind(null, b, a3),
- c
- );
- }, useLayoutEffect: function(a3, b) {
- return ki(4194308, 4, a3, b);
- }, useInsertionEffect: function(a3, b) {
- return ki(4, 2, a3, b);
- }, useMemo: function(a3, b) {
- var c = Th();
- return b = b === void 0 ? null : b, a3 = a3(), c.memoizedState = [a3, b], a3;
- }, useReducer: function(a3, b, c) {
- var d = Th();
- return b = c !== void 0 ? c(b) : b, d.memoizedState = d.baseState = b, a3 = { pending: null, interleaved: null, lanes: 0, dispatch: null, lastRenderedReducer: a3, lastRenderedState: b }, d.queue = a3, a3 = a3.dispatch = xi.bind(null, M, a3), [d.memoizedState, a3];
- }, useRef: function(a3) {
- var b = Th();
- return a3 = { current: a3 }, b.memoizedState = a3;
- }, useState: hi, useDebugValue: ri, useDeferredValue: function(a3) {
- return Th().memoizedState = a3;
- }, useTransition: function() {
- var a3 = hi(!1), b = a3[0];
- return a3 = vi.bind(null, a3[1]), Th().memoizedState = a3, [b, a3];
- }, useMutableSource: function() {
- }, useSyncExternalStore: function(a3, b, c) {
- var d = M, e = Th();
- if (I) {
- if (c === void 0) throw Error(p3(407));
- c = c();
- } else {
- if (c = b(), Q === null) throw Error(p3(349));
- (Hh & 30) !== 0 || di(d, b, c);
- }
- e.memoizedState = c;
- var f4 = { value: c, getSnapshot: b };
- return e.queue = f4, mi(ai.bind(
- null,
- d,
- f4,
- a3
- ), [a3]), d.flags |= 2048, bi(9, ci.bind(null, d, f4, c, b), void 0, null), c;
- }, useId: function() {
- var a3 = Th(), b = Q.identifierPrefix;
- if (I) {
- var c = sg, d = rg;
- c = (d & ~(1 << 32 - oc(d) - 1)).toString(32) + c, b = ":" + b + "R" + c, c = Kh++, 0 < c && (b += "H" + c.toString(32)), b += ":";
- } else c = Lh++, b = ":" + b + "r" + c.toString(32) + ":";
- return a3.memoizedState = b;
- }, unstable_isNewReconciler: !1 }, Ph = {
- readContext: eh,
- useCallback: si,
- useContext: eh,
- useEffect: $h,
- useImperativeHandle: qi,
- useInsertionEffect: ni,
- useLayoutEffect: oi,
- useMemo: ti,
- useReducer: Wh,
- useRef: ji,
- useState: function() {
- return Wh(Vh);
- },
- useDebugValue: ri,
- useDeferredValue: function(a3) {
- var b = Uh();
- return ui(b, N.memoizedState, a3);
- },
- useTransition: function() {
- var a3 = Wh(Vh)[0], b = Uh().memoizedState;
- return [a3, b];
- },
- useMutableSource: Yh,
- useSyncExternalStore: Zh,
- useId: wi,
- unstable_isNewReconciler: !1
- }, Qh = { readContext: eh, useCallback: si, useContext: eh, useEffect: $h, useImperativeHandle: qi, useInsertionEffect: ni, useLayoutEffect: oi, useMemo: ti, useReducer: Xh, useRef: ji, useState: function() {
- return Xh(Vh);
- }, useDebugValue: ri, useDeferredValue: function(a3) {
- var b = Uh();
- return N === null ? b.memoizedState = a3 : ui(b, N.memoizedState, a3);
- }, useTransition: function() {
- var a3 = Xh(Vh)[0], b = Uh().memoizedState;
- return [a3, b];
- }, useMutableSource: Yh, useSyncExternalStore: Zh, useId: wi, unstable_isNewReconciler: !1 };
- function Ci(a3, b) {
- if (a3 && a3.defaultProps) {
- b = A3({}, b), a3 = a3.defaultProps;
- for (var c in a3) b[c] === void 0 && (b[c] = a3[c]);
- return b;
- }
- return b;
- }
- function Di(a3, b, c, d) {
- b = a3.memoizedState, c = c(d, b), c = c == null ? b : A3({}, b, c), a3.memoizedState = c, a3.lanes === 0 && (a3.updateQueue.baseState = c);
- }
- var Ei = { isMounted: function(a3) {
- return (a3 = a3._reactInternals) ? Vb(a3) === a3 : !1;
- }, enqueueSetState: function(a3, b, c) {
- a3 = a3._reactInternals;
- var d = R(), e = yi(a3), f4 = mh(d, e);
- f4.payload = b, c != null && (f4.callback = c), b = nh(a3, f4, e), b !== null && (gi(b, a3, e, d), oh(b, a3, e));
- }, enqueueReplaceState: function(a3, b, c) {
- a3 = a3._reactInternals;
- var d = R(), e = yi(a3), f4 = mh(d, e);
- f4.tag = 1, f4.payload = b, c != null && (f4.callback = c), b = nh(a3, f4, e), b !== null && (gi(b, a3, e, d), oh(b, a3, e));
- }, enqueueForceUpdate: function(a3, b) {
- a3 = a3._reactInternals;
- var c = R(), d = yi(a3), e = mh(c, d);
- e.tag = 2, b != null && (e.callback = b), b = nh(a3, e, d), b !== null && (gi(b, a3, d, c), oh(b, a3, d));
- } };
- function Fi(a3, b, c, d, e, f4, g2) {
- return a3 = a3.stateNode, typeof a3.shouldComponentUpdate == "function" ? a3.shouldComponentUpdate(d, f4, g2) : b.prototype && b.prototype.isPureReactComponent ? !Ie(c, d) || !Ie(e, f4) : !0;
- }
- function Gi(a3, b, c) {
- var d = !1, e = Vf, f4 = b.contextType;
- return typeof f4 == "object" && f4 !== null ? f4 = eh(f4) : (e = Zf(b) ? Xf : H.current, d = b.contextTypes, f4 = (d = d != null) ? Yf(a3, e) : Vf), b = new b(c, f4), a3.memoizedState = b.state !== null && b.state !== void 0 ? b.state : null, b.updater = Ei, a3.stateNode = b, b._reactInternals = a3, d && (a3 = a3.stateNode, a3.__reactInternalMemoizedUnmaskedChildContext = e, a3.__reactInternalMemoizedMaskedChildContext = f4), b;
- }
- function Hi(a3, b, c, d) {
- a3 = b.state, typeof b.componentWillReceiveProps == "function" && b.componentWillReceiveProps(c, d), typeof b.UNSAFE_componentWillReceiveProps == "function" && b.UNSAFE_componentWillReceiveProps(c, d), b.state !== a3 && Ei.enqueueReplaceState(b, b.state, null);
- }
- function Ii(a3, b, c, d) {
- var e = a3.stateNode;
- e.props = c, e.state = a3.memoizedState, e.refs = {}, kh(a3);
- var f4 = b.contextType;
- typeof f4 == "object" && f4 !== null ? e.context = eh(f4) : (f4 = Zf(b) ? Xf : H.current, e.context = Yf(a3, f4)), e.state = a3.memoizedState, f4 = b.getDerivedStateFromProps, typeof f4 == "function" && (Di(a3, b, f4, c), e.state = a3.memoizedState), typeof b.getDerivedStateFromProps == "function" || typeof e.getSnapshotBeforeUpdate == "function" || typeof e.UNSAFE_componentWillMount != "function" && typeof e.componentWillMount != "function" || (b = e.state, typeof e.componentWillMount == "function" && e.componentWillMount(), typeof e.UNSAFE_componentWillMount == "function" && e.UNSAFE_componentWillMount(), b !== e.state && Ei.enqueueReplaceState(e, e.state, null), qh(a3, c, e, d), e.state = a3.memoizedState), typeof e.componentDidMount == "function" && (a3.flags |= 4194308);
- }
- function Ji(a3, b) {
- try {
- var c = "", d = b;
- do
- c += Pa(d), d = d.return;
- while (d);
- var e = c;
- } catch (f4) {
- e = `
- Error generating stack: ` + f4.message + `
- ` + f4.stack;
- }
- return { value: a3, source: b, stack: e, digest: null };
- }
- function Ki(a3, b, c) {
- return { value: a3, source: null, stack: c ?? null, digest: b ?? null };
- }
- function Li(a3, b) {
- try {
- console.error(b.value);
- } catch (c) {
- setTimeout(function() {
- throw c;
- });
- }
- }
- var Mi = typeof WeakMap == "function" ? WeakMap : Map;
- function Ni(a3, b, c) {
- c = mh(-1, c), c.tag = 3, c.payload = { element: null };
- var d = b.value;
- return c.callback = function() {
- Oi || (Oi = !0, Pi = d), Li(a3, b);
- }, c;
- }
- function Qi(a3, b, c) {
- c = mh(-1, c), c.tag = 3;
- var d = a3.type.getDerivedStateFromError;
- if (typeof d == "function") {
- var e = b.value;
- c.payload = function() {
- return d(e);
- }, c.callback = function() {
- Li(a3, b);
- };
- }
- var f4 = a3.stateNode;
- return f4 !== null && typeof f4.componentDidCatch == "function" && (c.callback = function() {
- Li(a3, b), typeof d != "function" && (Ri === null ? Ri = /* @__PURE__ */ new Set([this]) : Ri.add(this));
- var c2 = b.stack;
- this.componentDidCatch(b.value, { componentStack: c2 !== null ? c2 : "" });
- }), c;
- }
- function Si(a3, b, c) {
- var d = a3.pingCache;
- if (d === null) {
- d = a3.pingCache = new Mi();
- var e = /* @__PURE__ */ new Set();
- d.set(b, e);
- } else e = d.get(b), e === void 0 && (e = /* @__PURE__ */ new Set(), d.set(b, e));
- e.has(c) || (e.add(c), a3 = Ti.bind(null, a3, b, c), b.then(a3, a3));
- }
- function Ui(a3) {
- do {
- var b;
- if ((b = a3.tag === 13) && (b = a3.memoizedState, b = b !== null ? b.dehydrated !== null : !0), b) return a3;
- a3 = a3.return;
- } while (a3 !== null);
- return null;
- }
- function Vi(a3, b, c, d, e) {
- return (a3.mode & 1) === 0 ? (a3 === b ? a3.flags |= 65536 : (a3.flags |= 128, c.flags |= 131072, c.flags &= -52805, c.tag === 1 && (c.alternate === null ? c.tag = 17 : (b = mh(-1, 1), b.tag = 2, nh(c, b, 1))), c.lanes |= 1), a3) : (a3.flags |= 65536, a3.lanes = e, a3);
- }
- var Wi = ua.ReactCurrentOwner, dh = !1;
- function Xi(a3, b, c, d) {
- b.child = a3 === null ? Vg(b, null, c, d) : Ug(b, a3.child, c, d);
- }
- function Yi(a3, b, c, d, e) {
- c = c.render;
- var f4 = b.ref;
- return ch(b, e), d = Nh(a3, b, c, d, f4, e), c = Sh(), a3 !== null && !dh ? (b.updateQueue = a3.updateQueue, b.flags &= -2053, a3.lanes &= ~e, Zi(a3, b, e)) : (I && c && vg(b), b.flags |= 1, Xi(a3, b, d, e), b.child);
- }
- function $i(a3, b, c, d, e) {
- if (a3 === null) {
- var f4 = c.type;
- return typeof f4 == "function" && !aj(f4) && f4.defaultProps === void 0 && c.compare === null && c.defaultProps === void 0 ? (b.tag = 15, b.type = f4, bj(a3, b, f4, d, e)) : (a3 = Rg(c.type, null, d, b, b.mode, e), a3.ref = b.ref, a3.return = b, b.child = a3);
- }
- if (f4 = a3.child, (a3.lanes & e) === 0) {
- var g2 = f4.memoizedProps;
- if (c = c.compare, c = c !== null ? c : Ie, c(g2, d) && a3.ref === b.ref) return Zi(a3, b, e);
- }
- return b.flags |= 1, a3 = Pg(f4, d), a3.ref = b.ref, a3.return = b, b.child = a3;
- }
- function bj(a3, b, c, d, e) {
- if (a3 !== null) {
- var f4 = a3.memoizedProps;
- if (Ie(f4, d) && a3.ref === b.ref) if (dh = !1, b.pendingProps = d = f4, (a3.lanes & e) !== 0) (a3.flags & 131072) !== 0 && (dh = !0);
- else return b.lanes = a3.lanes, Zi(a3, b, e);
- }
- return cj(a3, b, c, d, e);
- }
- function dj(a3, b, c) {
- var d = b.pendingProps, e = d.children, f4 = a3 !== null ? a3.memoizedState : null;
- if (d.mode === "hidden") if ((b.mode & 1) === 0) b.memoizedState = { baseLanes: 0, cachePool: null, transitions: null }, G(ej, fj), fj |= c;
- else {
- if ((c & 1073741824) === 0) return a3 = f4 !== null ? f4.baseLanes | c : c, b.lanes = b.childLanes = 1073741824, b.memoizedState = { baseLanes: a3, cachePool: null, transitions: null }, b.updateQueue = null, G(ej, fj), fj |= a3, null;
- b.memoizedState = { baseLanes: 0, cachePool: null, transitions: null }, d = f4 !== null ? f4.baseLanes : c, G(ej, fj), fj |= d;
- }
- else f4 !== null ? (d = f4.baseLanes | c, b.memoizedState = null) : d = c, G(ej, fj), fj |= d;
- return Xi(a3, b, e, c), b.child;
- }
- function gj(a3, b) {
- var c = b.ref;
- (a3 === null && c !== null || a3 !== null && a3.ref !== c) && (b.flags |= 512, b.flags |= 2097152);
- }
- function cj(a3, b, c, d, e) {
- var f4 = Zf(c) ? Xf : H.current;
- return f4 = Yf(b, f4), ch(b, e), c = Nh(a3, b, c, d, f4, e), d = Sh(), a3 !== null && !dh ? (b.updateQueue = a3.updateQueue, b.flags &= -2053, a3.lanes &= ~e, Zi(a3, b, e)) : (I && d && vg(b), b.flags |= 1, Xi(a3, b, c, e), b.child);
- }
- function hj(a3, b, c, d, e) {
- if (Zf(c)) {
- var f4 = !0;
- cg(b);
- } else f4 = !1;
- if (ch(b, e), b.stateNode === null) ij(a3, b), Gi(b, c, d), Ii(b, c, d, e), d = !0;
- else if (a3 === null) {
- var g2 = b.stateNode, h3 = b.memoizedProps;
- g2.props = h3;
- var k = g2.context, l = c.contextType;
- typeof l == "object" && l !== null ? l = eh(l) : (l = Zf(c) ? Xf : H.current, l = Yf(b, l));
- var m3 = c.getDerivedStateFromProps, q = typeof m3 == "function" || typeof g2.getSnapshotBeforeUpdate == "function";
- q || typeof g2.UNSAFE_componentWillReceiveProps != "function" && typeof g2.componentWillReceiveProps != "function" || (h3 !== d || k !== l) && Hi(b, g2, d, l), jh = !1;
- var r2 = b.memoizedState;
- g2.state = r2, qh(b, d, g2, e), k = b.memoizedState, h3 !== d || r2 !== k || Wf.current || jh ? (typeof m3 == "function" && (Di(b, c, m3, d), k = b.memoizedState), (h3 = jh || Fi(b, c, h3, d, r2, k, l)) ? (q || typeof g2.UNSAFE_componentWillMount != "function" && typeof g2.componentWillMount != "function" || (typeof g2.componentWillMount == "function" && g2.componentWillMount(), typeof g2.UNSAFE_componentWillMount == "function" && g2.UNSAFE_componentWillMount()), typeof g2.componentDidMount == "function" && (b.flags |= 4194308)) : (typeof g2.componentDidMount == "function" && (b.flags |= 4194308), b.memoizedProps = d, b.memoizedState = k), g2.props = d, g2.state = k, g2.context = l, d = h3) : (typeof g2.componentDidMount == "function" && (b.flags |= 4194308), d = !1);
- } else {
- g2 = b.stateNode, lh(a3, b), h3 = b.memoizedProps, l = b.type === b.elementType ? h3 : Ci(b.type, h3), g2.props = l, q = b.pendingProps, r2 = g2.context, k = c.contextType, typeof k == "object" && k !== null ? k = eh(k) : (k = Zf(c) ? Xf : H.current, k = Yf(b, k));
- var y = c.getDerivedStateFromProps;
- (m3 = typeof y == "function" || typeof g2.getSnapshotBeforeUpdate == "function") || typeof g2.UNSAFE_componentWillReceiveProps != "function" && typeof g2.componentWillReceiveProps != "function" || (h3 !== q || r2 !== k) && Hi(b, g2, d, k), jh = !1, r2 = b.memoizedState, g2.state = r2, qh(b, d, g2, e);
- var n = b.memoizedState;
- h3 !== q || r2 !== n || Wf.current || jh ? (typeof y == "function" && (Di(b, c, y, d), n = b.memoizedState), (l = jh || Fi(b, c, l, d, r2, n, k) || !1) ? (m3 || typeof g2.UNSAFE_componentWillUpdate != "function" && typeof g2.componentWillUpdate != "function" || (typeof g2.componentWillUpdate == "function" && g2.componentWillUpdate(d, n, k), typeof g2.UNSAFE_componentWillUpdate == "function" && g2.UNSAFE_componentWillUpdate(d, n, k)), typeof g2.componentDidUpdate == "function" && (b.flags |= 4), typeof g2.getSnapshotBeforeUpdate == "function" && (b.flags |= 1024)) : (typeof g2.componentDidUpdate != "function" || h3 === a3.memoizedProps && r2 === a3.memoizedState || (b.flags |= 4), typeof g2.getSnapshotBeforeUpdate != "function" || h3 === a3.memoizedProps && r2 === a3.memoizedState || (b.flags |= 1024), b.memoizedProps = d, b.memoizedState = n), g2.props = d, g2.state = n, g2.context = k, d = l) : (typeof g2.componentDidUpdate != "function" || h3 === a3.memoizedProps && r2 === a3.memoizedState || (b.flags |= 4), typeof g2.getSnapshotBeforeUpdate != "function" || h3 === a3.memoizedProps && r2 === a3.memoizedState || (b.flags |= 1024), d = !1);
- }
- return jj(a3, b, c, d, f4, e);
- }
- function jj(a3, b, c, d, e, f4) {
- gj(a3, b);
- var g2 = (b.flags & 128) !== 0;
- if (!d && !g2) return e && dg(b, c, !1), Zi(a3, b, f4);
- d = b.stateNode, Wi.current = b;
- var h3 = g2 && typeof c.getDerivedStateFromError != "function" ? null : d.render();
- return b.flags |= 1, a3 !== null && g2 ? (b.child = Ug(b, a3.child, null, f4), b.child = Ug(b, null, h3, f4)) : Xi(a3, b, h3, f4), b.memoizedState = d.state, e && dg(b, c, !0), b.child;
- }
- function kj(a3) {
- var b = a3.stateNode;
- b.pendingContext ? ag(a3, b.pendingContext, b.pendingContext !== b.context) : b.context && ag(a3, b.context, !1), yh(a3, b.containerInfo);
- }
- function lj(a3, b, c, d, e) {
- return Ig(), Jg(e), b.flags |= 256, Xi(a3, b, c, d), b.child;
- }
- var mj = { dehydrated: null, treeContext: null, retryLane: 0 };
- function nj(a3) {
- return { baseLanes: a3, cachePool: null, transitions: null };
- }
- function oj(a3, b, c) {
- var d = b.pendingProps, e = L.current, f4 = !1, g2 = (b.flags & 128) !== 0, h3;
- if ((h3 = g2) || (h3 = a3 !== null && a3.memoizedState === null ? !1 : (e & 2) !== 0), h3 ? (f4 = !0, b.flags &= -129) : (a3 === null || a3.memoizedState !== null) && (e |= 1), G(L, e & 1), a3 === null)
- return Eg(b), a3 = b.memoizedState, a3 !== null && (a3 = a3.dehydrated, a3 !== null) ? ((b.mode & 1) === 0 ? b.lanes = 1 : a3.data === "$!" ? b.lanes = 8 : b.lanes = 1073741824, null) : (g2 = d.children, a3 = d.fallback, f4 ? (d = b.mode, f4 = b.child, g2 = { mode: "hidden", children: g2 }, (d & 1) === 0 && f4 !== null ? (f4.childLanes = 0, f4.pendingProps = g2) : f4 = pj(g2, d, 0, null), a3 = Tg(a3, d, c, null), f4.return = b, a3.return = b, f4.sibling = a3, b.child = f4, b.child.memoizedState = nj(c), b.memoizedState = mj, a3) : qj(b, g2));
- if (e = a3.memoizedState, e !== null && (h3 = e.dehydrated, h3 !== null)) return rj(a3, b, g2, d, h3, e, c);
- if (f4) {
- f4 = d.fallback, g2 = b.mode, e = a3.child, h3 = e.sibling;
- var k = { mode: "hidden", children: d.children };
- return (g2 & 1) === 0 && b.child !== e ? (d = b.child, d.childLanes = 0, d.pendingProps = k, b.deletions = null) : (d = Pg(e, k), d.subtreeFlags = e.subtreeFlags & 14680064), h3 !== null ? f4 = Pg(h3, f4) : (f4 = Tg(f4, g2, c, null), f4.flags |= 2), f4.return = b, d.return = b, d.sibling = f4, b.child = d, d = f4, f4 = b.child, g2 = a3.child.memoizedState, g2 = g2 === null ? nj(c) : { baseLanes: g2.baseLanes | c, cachePool: null, transitions: g2.transitions }, f4.memoizedState = g2, f4.childLanes = a3.childLanes & ~c, b.memoizedState = mj, d;
- }
- return f4 = a3.child, a3 = f4.sibling, d = Pg(f4, { mode: "visible", children: d.children }), (b.mode & 1) === 0 && (d.lanes = c), d.return = b, d.sibling = null, a3 !== null && (c = b.deletions, c === null ? (b.deletions = [a3], b.flags |= 16) : c.push(a3)), b.child = d, b.memoizedState = null, d;
- }
- function qj(a3, b) {
- return b = pj({ mode: "visible", children: b }, a3.mode, 0, null), b.return = a3, a3.child = b;
- }
- function sj(a3, b, c, d) {
- return d !== null && Jg(d), Ug(b, a3.child, null, c), a3 = qj(b, b.pendingProps.children), a3.flags |= 2, b.memoizedState = null, a3;
- }
- function rj(a3, b, c, d, e, f4, g2) {
- if (c)
- return b.flags & 256 ? (b.flags &= -257, d = Ki(Error(p3(422))), sj(a3, b, g2, d)) : b.memoizedState !== null ? (b.child = a3.child, b.flags |= 128, null) : (f4 = d.fallback, e = b.mode, d = pj({ mode: "visible", children: d.children }, e, 0, null), f4 = Tg(f4, e, g2, null), f4.flags |= 2, d.return = b, f4.return = b, d.sibling = f4, b.child = d, (b.mode & 1) !== 0 && Ug(b, a3.child, null, g2), b.child.memoizedState = nj(g2), b.memoizedState = mj, f4);
- if ((b.mode & 1) === 0) return sj(a3, b, g2, null);
- if (e.data === "$!") {
- if (d = e.nextSibling && e.nextSibling.dataset, d) var h3 = d.dgst;
- return d = h3, f4 = Error(p3(419)), d = Ki(f4, d, void 0), sj(a3, b, g2, d);
- }
- if (h3 = (g2 & a3.childLanes) !== 0, dh || h3) {
- if (d = Q, d !== null) {
- switch (g2 & -g2) {
- case 4:
- e = 2;
- break;
- case 16:
- e = 8;
- break;
- case 64:
- case 128:
- case 256:
- case 512:
- case 1024:
- case 2048:
- case 4096:
- case 8192:
- case 16384:
- case 32768:
- case 65536:
- case 131072:
- case 262144:
- case 524288:
- case 1048576:
- case 2097152:
- case 4194304:
- case 8388608:
- case 16777216:
- case 33554432:
- case 67108864:
- e = 32;
- break;
- case 536870912:
- e = 268435456;
- break;
- default:
- e = 0;
- }
- e = (e & (d.suspendedLanes | g2)) !== 0 ? 0 : e, e !== 0 && e !== f4.retryLane && (f4.retryLane = e, ih(a3, e), gi(d, a3, e, -1));
- }
- return tj(), d = Ki(Error(p3(421))), sj(a3, b, g2, d);
- }
- return e.data === "$?" ? (b.flags |= 128, b.child = a3.child, b = uj.bind(null, a3), e._reactRetry = b, null) : (a3 = f4.treeContext, yg = Lf(e.nextSibling), xg = b, I = !0, zg = null, a3 !== null && (og[pg++] = rg, og[pg++] = sg, og[pg++] = qg, rg = a3.id, sg = a3.overflow, qg = b), b = qj(b, d.children), b.flags |= 4096, b);
- }
- function vj(a3, b, c) {
- a3.lanes |= b;
- var d = a3.alternate;
- d !== null && (d.lanes |= b), bh(a3.return, b, c);
- }
- function wj(a3, b, c, d, e) {
- var f4 = a3.memoizedState;
- f4 === null ? a3.memoizedState = { isBackwards: b, rendering: null, renderingStartTime: 0, last: d, tail: c, tailMode: e } : (f4.isBackwards = b, f4.rendering = null, f4.renderingStartTime = 0, f4.last = d, f4.tail = c, f4.tailMode = e);
- }
- function xj(a3, b, c) {
- var d = b.pendingProps, e = d.revealOrder, f4 = d.tail;
- if (Xi(a3, b, d.children, c), d = L.current, (d & 2) !== 0) d = d & 1 | 2, b.flags |= 128;
- else {
- if (a3 !== null && (a3.flags & 128) !== 0) a: for (a3 = b.child; a3 !== null; ) {
- if (a3.tag === 13) a3.memoizedState !== null && vj(a3, c, b);
- else if (a3.tag === 19) vj(a3, c, b);
- else if (a3.child !== null) {
- a3.child.return = a3, a3 = a3.child;
- continue;
- }
- if (a3 === b) break a;
- for (; a3.sibling === null; ) {
- if (a3.return === null || a3.return === b) break a;
- a3 = a3.return;
- }
- a3.sibling.return = a3.return, a3 = a3.sibling;
- }
- d &= 1;
- }
- if (G(L, d), (b.mode & 1) === 0) b.memoizedState = null;
- else switch (e) {
- case "forwards":
- for (c = b.child, e = null; c !== null; ) a3 = c.alternate, a3 !== null && Ch(a3) === null && (e = c), c = c.sibling;
- c = e, c === null ? (e = b.child, b.child = null) : (e = c.sibling, c.sibling = null), wj(b, !1, e, c, f4);
- break;
- case "backwards":
- for (c = null, e = b.child, b.child = null; e !== null; ) {
- if (a3 = e.alternate, a3 !== null && Ch(a3) === null) {
- b.child = e;
- break;
- }
- a3 = e.sibling, e.sibling = c, c = e, e = a3;
- }
- wj(b, !0, c, null, f4);
- break;
- case "together":
- wj(b, !1, null, null, void 0);
- break;
- default:
- b.memoizedState = null;
- }
- return b.child;
- }
- function ij(a3, b) {
- (b.mode & 1) === 0 && a3 !== null && (a3.alternate = null, b.alternate = null, b.flags |= 2);
- }
- function Zi(a3, b, c) {
- if (a3 !== null && (b.dependencies = a3.dependencies), rh |= b.lanes, (c & b.childLanes) === 0) return null;
- if (a3 !== null && b.child !== a3.child) throw Error(p3(153));
- if (b.child !== null) {
- for (a3 = b.child, c = Pg(a3, a3.pendingProps), b.child = c, c.return = b; a3.sibling !== null; ) a3 = a3.sibling, c = c.sibling = Pg(a3, a3.pendingProps), c.return = b;
- c.sibling = null;
- }
- return b.child;
- }
- function yj(a3, b, c) {
- switch (b.tag) {
- case 3:
- kj(b), Ig();
- break;
- case 5:
- Ah(b);
- break;
- case 1:
- Zf(b.type) && cg(b);
- break;
- case 4:
- yh(b, b.stateNode.containerInfo);
- break;
- case 10:
- var d = b.type._context, e = b.memoizedProps.value;
- G(Wg, d._currentValue), d._currentValue = e;
- break;
- case 13:
- if (d = b.memoizedState, d !== null)
- return d.dehydrated !== null ? (G(L, L.current & 1), b.flags |= 128, null) : (c & b.child.childLanes) !== 0 ? oj(a3, b, c) : (G(L, L.current & 1), a3 = Zi(a3, b, c), a3 !== null ? a3.sibling : null);
- G(L, L.current & 1);
- break;
- case 19:
- if (d = (c & b.childLanes) !== 0, (a3.flags & 128) !== 0) {
- if (d) return xj(a3, b, c);
- b.flags |= 128;
- }
- if (e = b.memoizedState, e !== null && (e.rendering = null, e.tail = null, e.lastEffect = null), G(L, L.current), d) break;
- return null;
- case 22:
- case 23:
- return b.lanes = 0, dj(a3, b, c);
- }
- return Zi(a3, b, c);
- }
- var zj, Aj, Bj, Cj;
- zj = function(a3, b) {
- for (var c = b.child; c !== null; ) {
- if (c.tag === 5 || c.tag === 6) a3.appendChild(c.stateNode);
- else if (c.tag !== 4 && c.child !== null) {
- c.child.return = c, c = c.child;
- continue;
- }
- if (c === b) break;
- for (; c.sibling === null; ) {
- if (c.return === null || c.return === b) return;
- c = c.return;
- }
- c.sibling.return = c.return, c = c.sibling;
- }
- };
- Aj = function() {
- };
- Bj = function(a3, b, c, d) {
- var e = a3.memoizedProps;
- if (e !== d) {
- a3 = b.stateNode, xh(uh.current);
- var f4 = null;
- switch (c) {
- case "input":
- e = Ya(a3, e), d = Ya(a3, d), f4 = [];
- break;
- case "select":
- e = A3({}, e, { value: void 0 }), d = A3({}, d, { value: void 0 }), f4 = [];
- break;
- case "textarea":
- e = gb(a3, e), d = gb(a3, d), f4 = [];
- break;
- default:
- typeof e.onClick != "function" && typeof d.onClick == "function" && (a3.onclick = Bf);
- }
- ub(c, d);
- var g2;
- c = null;
- for (l in e) if (!d.hasOwnProperty(l) && e.hasOwnProperty(l) && e[l] != null) if (l === "style") {
- var h3 = e[l];
- for (g2 in h3) h3.hasOwnProperty(g2) && (c || (c = {}), c[g2] = "");
- } else l !== "dangerouslySetInnerHTML" && l !== "children" && l !== "suppressContentEditableWarning" && l !== "suppressHydrationWarning" && l !== "autoFocus" && (ea.hasOwnProperty(l) ? f4 || (f4 = []) : (f4 = f4 || []).push(l, null));
- for (l in d) {
- var k = d[l];
- if (h3 = e?.[l], d.hasOwnProperty(l) && k !== h3 && (k != null || h3 != null)) if (l === "style") if (h3) {
- for (g2 in h3) !h3.hasOwnProperty(g2) || k && k.hasOwnProperty(g2) || (c || (c = {}), c[g2] = "");
- for (g2 in k) k.hasOwnProperty(g2) && h3[g2] !== k[g2] && (c || (c = {}), c[g2] = k[g2]);
- } else c || (f4 || (f4 = []), f4.push(
- l,
- c
- )), c = k;
- else l === "dangerouslySetInnerHTML" ? (k = k ? k.__html : void 0, h3 = h3 ? h3.__html : void 0, k != null && h3 !== k && (f4 = f4 || []).push(l, k)) : l === "children" ? typeof k != "string" && typeof k != "number" || (f4 = f4 || []).push(l, "" + k) : l !== "suppressContentEditableWarning" && l !== "suppressHydrationWarning" && (ea.hasOwnProperty(l) ? (k != null && l === "onScroll" && D("scroll", a3), f4 || h3 === k || (f4 = [])) : (f4 = f4 || []).push(l, k));
- }
- c && (f4 = f4 || []).push("style", c);
- var l = f4;
- (b.updateQueue = l) && (b.flags |= 4);
- }
- };
- Cj = function(a3, b, c, d) {
- c !== d && (b.flags |= 4);
- };
- function Dj(a3, b) {
- if (!I) switch (a3.tailMode) {
- case "hidden":
- b = a3.tail;
- for (var c = null; b !== null; ) b.alternate !== null && (c = b), b = b.sibling;
- c === null ? a3.tail = null : c.sibling = null;
- break;
- case "collapsed":
- c = a3.tail;
- for (var d = null; c !== null; ) c.alternate !== null && (d = c), c = c.sibling;
- d === null ? b || a3.tail === null ? a3.tail = null : a3.tail.sibling = null : d.sibling = null;
- }
- }
- function S(a3) {
- var b = a3.alternate !== null && a3.alternate.child === a3.child, c = 0, d = 0;
- if (b) for (var e = a3.child; e !== null; ) c |= e.lanes | e.childLanes, d |= e.subtreeFlags & 14680064, d |= e.flags & 14680064, e.return = a3, e = e.sibling;
- else for (e = a3.child; e !== null; ) c |= e.lanes | e.childLanes, d |= e.subtreeFlags, d |= e.flags, e.return = a3, e = e.sibling;
- return a3.subtreeFlags |= d, a3.childLanes = c, b;
- }
- function Ej(a3, b, c) {
- var d = b.pendingProps;
- switch (wg(b), b.tag) {
- case 2:
- case 16:
- case 15:
- case 0:
- case 11:
- case 7:
- case 8:
- case 12:
- case 9:
- case 14:
- return S(b), null;
- case 1:
- return Zf(b.type) && $f(), S(b), null;
- case 3:
- return d = b.stateNode, zh(), E(Wf), E(H), Eh(), d.pendingContext && (d.context = d.pendingContext, d.pendingContext = null), (a3 === null || a3.child === null) && (Gg(b) ? b.flags |= 4 : a3 === null || a3.memoizedState.isDehydrated && (b.flags & 256) === 0 || (b.flags |= 1024, zg !== null && (Fj(zg), zg = null))), Aj(a3, b), S(b), null;
- case 5:
- Bh(b);
- var e = xh(wh.current);
- if (c = b.type, a3 !== null && b.stateNode != null) Bj(a3, b, c, d, e), a3.ref !== b.ref && (b.flags |= 512, b.flags |= 2097152);
- else {
- if (!d) {
- if (b.stateNode === null) throw Error(p3(166));
- return S(b), null;
- }
- if (a3 = xh(uh.current), Gg(b)) {
- d = b.stateNode, c = b.type;
- var f4 = b.memoizedProps;
- switch (d[Of] = b, d[Pf] = f4, a3 = (b.mode & 1) !== 0, c) {
- case "dialog":
- D("cancel", d), D("close", d);
- break;
- case "iframe":
- case "object":
- case "embed":
- D("load", d);
- break;
- case "video":
- case "audio":
- for (e = 0; e < lf.length; e++) D(lf[e], d);
- break;
- case "source":
- D("error", d);
- break;
- case "img":
- case "image":
- case "link":
- D(
- "error",
- d
- ), D("load", d);
- break;
- case "details":
- D("toggle", d);
- break;
- case "input":
- Za(d, f4), D("invalid", d);
- break;
- case "select":
- d._wrapperState = { wasMultiple: !!f4.multiple }, D("invalid", d);
- break;
- case "textarea":
- hb(d, f4), D("invalid", d);
- }
- ub(c, f4), e = null;
- for (var g2 in f4) if (f4.hasOwnProperty(g2)) {
- var h3 = f4[g2];
- g2 === "children" ? typeof h3 == "string" ? d.textContent !== h3 && (f4.suppressHydrationWarning !== !0 && Af(d.textContent, h3, a3), e = ["children", h3]) : typeof h3 == "number" && d.textContent !== "" + h3 && (f4.suppressHydrationWarning !== !0 && Af(
- d.textContent,
- h3,
- a3
- ), e = ["children", "" + h3]) : ea.hasOwnProperty(g2) && h3 != null && g2 === "onScroll" && D("scroll", d);
- }
- switch (c) {
- case "input":
- Va(d), db(d, f4, !0);
- break;
- case "textarea":
- Va(d), jb(d);
- break;
- case "select":
- case "option":
- break;
- default:
- typeof f4.onClick == "function" && (d.onclick = Bf);
- }
- d = e, b.updateQueue = d, d !== null && (b.flags |= 4);
- } else {
- g2 = e.nodeType === 9 ? e : e.ownerDocument, a3 === "http://www.w3.org/1999/xhtml" && (a3 = kb(c)), a3 === "http://www.w3.org/1999/xhtml" ? c === "script" ? (a3 = g2.createElement("div"), a3.innerHTML = "<script><\/script>", a3 = a3.removeChild(a3.firstChild)) : typeof d.is == "string" ? a3 = g2.createElement(c, { is: d.is }) : (a3 = g2.createElement(c), c === "select" && (g2 = a3, d.multiple ? g2.multiple = !0 : d.size && (g2.size = d.size))) : a3 = g2.createElementNS(a3, c), a3[Of] = b, a3[Pf] = d, zj(a3, b, !1, !1), b.stateNode = a3;
- a: {
- switch (g2 = vb(c, d), c) {
- case "dialog":
- D("cancel", a3), D("close", a3), e = d;
- break;
- case "iframe":
- case "object":
- case "embed":
- D("load", a3), e = d;
- break;
- case "video":
- case "audio":
- for (e = 0; e < lf.length; e++) D(lf[e], a3);
- e = d;
- break;
- case "source":
- D("error", a3), e = d;
- break;
- case "img":
- case "image":
- case "link":
- D(
- "error",
- a3
- ), D("load", a3), e = d;
- break;
- case "details":
- D("toggle", a3), e = d;
- break;
- case "input":
- Za(a3, d), e = Ya(a3, d), D("invalid", a3);
- break;
- case "option":
- e = d;
- break;
- case "select":
- a3._wrapperState = { wasMultiple: !!d.multiple }, e = A3({}, d, { value: void 0 }), D("invalid", a3);
- break;
- case "textarea":
- hb(a3, d), e = gb(a3, d), D("invalid", a3);
- break;
- default:
- e = d;
- }
- ub(c, e), h3 = e;
- for (f4 in h3) if (h3.hasOwnProperty(f4)) {
- var k = h3[f4];
- f4 === "style" ? sb2(a3, k) : f4 === "dangerouslySetInnerHTML" ? (k = k ? k.__html : void 0, k != null && nb(a3, k)) : f4 === "children" ? typeof k == "string" ? (c !== "textarea" || k !== "") && ob(a3, k) : typeof k == "number" && ob(a3, "" + k) : f4 !== "suppressContentEditableWarning" && f4 !== "suppressHydrationWarning" && f4 !== "autoFocus" && (ea.hasOwnProperty(f4) ? k != null && f4 === "onScroll" && D("scroll", a3) : k != null && ta(a3, f4, k, g2));
- }
- switch (c) {
- case "input":
- Va(a3), db(a3, d, !1);
- break;
- case "textarea":
- Va(a3), jb(a3);
- break;
- case "option":
- d.value != null && a3.setAttribute("value", "" + Sa(d.value));
- break;
- case "select":
- a3.multiple = !!d.multiple, f4 = d.value, f4 != null ? fb(a3, !!d.multiple, f4, !1) : d.defaultValue != null && fb(
- a3,
- !!d.multiple,
- d.defaultValue,
- !0
- );
- break;
- default:
- typeof e.onClick == "function" && (a3.onclick = Bf);
- }
- switch (c) {
- case "button":
- case "input":
- case "select":
- case "textarea":
- d = !!d.autoFocus;
- break a;
- case "img":
- d = !0;
- break a;
- default:
- d = !1;
- }
- }
- d && (b.flags |= 4);
- }
- b.ref !== null && (b.flags |= 512, b.flags |= 2097152);
- }
- return S(b), null;
- case 6:
- if (a3 && b.stateNode != null) Cj(a3, b, a3.memoizedProps, d);
- else {
- if (typeof d != "string" && b.stateNode === null) throw Error(p3(166));
- if (c = xh(wh.current), xh(uh.current), Gg(b)) {
- if (d = b.stateNode, c = b.memoizedProps, d[Of] = b, (f4 = d.nodeValue !== c) && (a3 = xg, a3 !== null)) switch (a3.tag) {
- case 3:
- Af(d.nodeValue, c, (a3.mode & 1) !== 0);
- break;
- case 5:
- a3.memoizedProps.suppressHydrationWarning !== !0 && Af(d.nodeValue, c, (a3.mode & 1) !== 0);
- }
- f4 && (b.flags |= 4);
- } else d = (c.nodeType === 9 ? c : c.ownerDocument).createTextNode(d), d[Of] = b, b.stateNode = d;
- }
- return S(b), null;
- case 13:
- if (E(L), d = b.memoizedState, a3 === null || a3.memoizedState !== null && a3.memoizedState.dehydrated !== null) {
- if (I && yg !== null && (b.mode & 1) !== 0 && (b.flags & 128) === 0) Hg(), Ig(), b.flags |= 98560, f4 = !1;
- else if (f4 = Gg(b), d !== null && d.dehydrated !== null) {
- if (a3 === null) {
- if (!f4) throw Error(p3(318));
- if (f4 = b.memoizedState, f4 = f4 !== null ? f4.dehydrated : null, !f4) throw Error(p3(317));
- f4[Of] = b;
- } else Ig(), (b.flags & 128) === 0 && (b.memoizedState = null), b.flags |= 4;
- S(b), f4 = !1;
- } else zg !== null && (Fj(zg), zg = null), f4 = !0;
- if (!f4) return b.flags & 65536 ? b : null;
- }
- return (b.flags & 128) !== 0 ? (b.lanes = c, b) : (d = d !== null, d !== (a3 !== null && a3.memoizedState !== null) && d && (b.child.flags |= 8192, (b.mode & 1) !== 0 && (a3 === null || (L.current & 1) !== 0 ? T2 === 0 && (T2 = 3) : tj())), b.updateQueue !== null && (b.flags |= 4), S(b), null);
- case 4:
- return zh(), Aj(a3, b), a3 === null && sf(b.stateNode.containerInfo), S(b), null;
- case 10:
- return ah(b.type._context), S(b), null;
- case 17:
- return Zf(b.type) && $f(), S(b), null;
- case 19:
- if (E(L), f4 = b.memoizedState, f4 === null) return S(b), null;
- if (d = (b.flags & 128) !== 0, g2 = f4.rendering, g2 === null) if (d) Dj(f4, !1);
- else {
- if (T2 !== 0 || a3 !== null && (a3.flags & 128) !== 0) for (a3 = b.child; a3 !== null; ) {
- if (g2 = Ch(a3), g2 !== null) {
- for (b.flags |= 128, Dj(f4, !1), d = g2.updateQueue, d !== null && (b.updateQueue = d, b.flags |= 4), b.subtreeFlags = 0, d = c, c = b.child; c !== null; ) f4 = c, a3 = d, f4.flags &= 14680066, g2 = f4.alternate, g2 === null ? (f4.childLanes = 0, f4.lanes = a3, f4.child = null, f4.subtreeFlags = 0, f4.memoizedProps = null, f4.memoizedState = null, f4.updateQueue = null, f4.dependencies = null, f4.stateNode = null) : (f4.childLanes = g2.childLanes, f4.lanes = g2.lanes, f4.child = g2.child, f4.subtreeFlags = 0, f4.deletions = null, f4.memoizedProps = g2.memoizedProps, f4.memoizedState = g2.memoizedState, f4.updateQueue = g2.updateQueue, f4.type = g2.type, a3 = g2.dependencies, f4.dependencies = a3 === null ? null : { lanes: a3.lanes, firstContext: a3.firstContext }), c = c.sibling;
- return G(L, L.current & 1 | 2), b.child;
- }
- a3 = a3.sibling;
- }
- f4.tail !== null && B3() > Gj && (b.flags |= 128, d = !0, Dj(f4, !1), b.lanes = 4194304);
- }
- else {
- if (!d) if (a3 = Ch(g2), a3 !== null) {
- if (b.flags |= 128, d = !0, c = a3.updateQueue, c !== null && (b.updateQueue = c, b.flags |= 4), Dj(f4, !0), f4.tail === null && f4.tailMode === "hidden" && !g2.alternate && !I) return S(b), null;
- } else 2 * B3() - f4.renderingStartTime > Gj && c !== 1073741824 && (b.flags |= 128, d = !0, Dj(f4, !1), b.lanes = 4194304);
- f4.isBackwards ? (g2.sibling = b.child, b.child = g2) : (c = f4.last, c !== null ? c.sibling = g2 : b.child = g2, f4.last = g2);
- }
- return f4.tail !== null ? (b = f4.tail, f4.rendering = b, f4.tail = b.sibling, f4.renderingStartTime = B3(), b.sibling = null, c = L.current, G(L, d ? c & 1 | 2 : c & 1), b) : (S(b), null);
- case 22:
- case 23:
- return Hj(), d = b.memoizedState !== null, a3 !== null && a3.memoizedState !== null !== d && (b.flags |= 8192), d && (b.mode & 1) !== 0 ? (fj & 1073741824) !== 0 && (S(b), b.subtreeFlags & 6 && (b.flags |= 8192)) : S(b), null;
- case 24:
- return null;
- case 25:
- return null;
- }
- throw Error(p3(156, b.tag));
- }
- function Ij(a3, b) {
- switch (wg(b), b.tag) {
- case 1:
- return Zf(b.type) && $f(), a3 = b.flags, a3 & 65536 ? (b.flags = a3 & -65537 | 128, b) : null;
- case 3:
- return zh(), E(Wf), E(H), Eh(), a3 = b.flags, (a3 & 65536) !== 0 && (a3 & 128) === 0 ? (b.flags = a3 & -65537 | 128, b) : null;
- case 5:
- return Bh(b), null;
- case 13:
- if (E(L), a3 = b.memoizedState, a3 !== null && a3.dehydrated !== null) {
- if (b.alternate === null) throw Error(p3(340));
- Ig();
- }
- return a3 = b.flags, a3 & 65536 ? (b.flags = a3 & -65537 | 128, b) : null;
- case 19:
- return E(L), null;
- case 4:
- return zh(), null;
- case 10:
- return ah(b.type._context), null;
- case 22:
- case 23:
- return Hj(), null;
- case 24:
- return null;
- default:
- return null;
- }
- }
- var Jj = !1, U = !1, Kj = typeof WeakSet == "function" ? WeakSet : Set, V = null;
- function Lj(a3, b) {
- var c = a3.ref;
- if (c !== null) if (typeof c == "function") try {
- c(null);
- } catch (d) {
- W(a3, b, d);
- }
- else c.current = null;
- }
- function Mj(a3, b, c) {
- try {
- c();
- } catch (d) {
- W(a3, b, d);
- }
- }
- var Nj = !1;
- function Oj(a3, b) {
- if (Cf = dd, a3 = Me(), Ne(a3)) {
- if ("selectionStart" in a3) var c = { start: a3.selectionStart, end: a3.selectionEnd };
- else a: {
- c = (c = a3.ownerDocument) && c.defaultView || window;
- var d = c.getSelection && c.getSelection();
- if (d && d.rangeCount !== 0) {
- c = d.anchorNode;
- var e = d.anchorOffset, f4 = d.focusNode;
- d = d.focusOffset;
- try {
- c.nodeType, f4.nodeType;
- } catch {
- c = null;
- break a;
- }
- var g2 = 0, h3 = -1, k = -1, l = 0, m3 = 0, q = a3, r2 = null;
- b: for (; ; ) {
- for (var y; q !== c || e !== 0 && q.nodeType !== 3 || (h3 = g2 + e), q !== f4 || d !== 0 && q.nodeType !== 3 || (k = g2 + d), q.nodeType === 3 && (g2 += q.nodeValue.length), (y = q.firstChild) !== null; )
- r2 = q, q = y;
- for (; ; ) {
- if (q === a3) break b;
- if (r2 === c && ++l === e && (h3 = g2), r2 === f4 && ++m3 === d && (k = g2), (y = q.nextSibling) !== null) break;
- q = r2, r2 = q.parentNode;
- }
- q = y;
- }
- c = h3 === -1 || k === -1 ? null : { start: h3, end: k };
- } else c = null;
- }
- c = c || { start: 0, end: 0 };
- } else c = null;
- for (Df = { focusedElem: a3, selectionRange: c }, dd = !1, V = b; V !== null; ) if (b = V, a3 = b.child, (b.subtreeFlags & 1028) !== 0 && a3 !== null) a3.return = b, V = a3;
- else for (; V !== null; ) {
- b = V;
- try {
- var n = b.alternate;
- if ((b.flags & 1024) !== 0) switch (b.tag) {
- case 0:
- case 11:
- case 15:
- break;
- case 1:
- if (n !== null) {
- var t = n.memoizedProps, J = n.memoizedState, x = b.stateNode, w = x.getSnapshotBeforeUpdate(b.elementType === b.type ? t : Ci(b.type, t), J);
- x.__reactInternalSnapshotBeforeUpdate = w;
- }
- break;
- case 3:
- var u2 = b.stateNode.containerInfo;
- u2.nodeType === 1 ? u2.textContent = "" : u2.nodeType === 9 && u2.documentElement && u2.removeChild(u2.documentElement);
- break;
- case 5:
- case 6:
- case 4:
- case 17:
- break;
- default:
- throw Error(p3(163));
- }
- } catch (F) {
- W(b, b.return, F);
- }
- if (a3 = b.sibling, a3 !== null) {
- a3.return = b.return, V = a3;
- break;
- }
- V = b.return;
- }
- return n = Nj, Nj = !1, n;
- }
- function Pj(a3, b, c) {
- var d = b.updateQueue;
- if (d = d !== null ? d.lastEffect : null, d !== null) {
- var e = d = d.next;
- do {
- if ((e.tag & a3) === a3) {
- var f4 = e.destroy;
- e.destroy = void 0, f4 !== void 0 && Mj(b, c, f4);
- }
- e = e.next;
- } while (e !== d);
- }
- }
- function Qj(a3, b) {
- if (b = b.updateQueue, b = b !== null ? b.lastEffect : null, b !== null) {
- var c = b = b.next;
- do {
- if ((c.tag & a3) === a3) {
- var d = c.create;
- c.destroy = d();
- }
- c = c.next;
- } while (c !== b);
- }
- }
- function Rj(a3) {
- var b = a3.ref;
- if (b !== null) {
- var c = a3.stateNode;
- switch (a3.tag) {
- case 5:
- a3 = c;
- break;
- default:
- a3 = c;
- }
- typeof b == "function" ? b(a3) : b.current = a3;
- }
- }
- function Sj(a3) {
- var b = a3.alternate;
- b !== null && (a3.alternate = null, Sj(b)), a3.child = null, a3.deletions = null, a3.sibling = null, a3.tag === 5 && (b = a3.stateNode, b !== null && (delete b[Of], delete b[Pf], delete b[of], delete b[Qf], delete b[Rf])), a3.stateNode = null, a3.return = null, a3.dependencies = null, a3.memoizedProps = null, a3.memoizedState = null, a3.pendingProps = null, a3.stateNode = null, a3.updateQueue = null;
- }
- function Tj(a3) {
- return a3.tag === 5 || a3.tag === 3 || a3.tag === 4;
- }
- function Uj(a3) {
- a: for (; ; ) {
- for (; a3.sibling === null; ) {
- if (a3.return === null || Tj(a3.return)) return null;
- a3 = a3.return;
- }
- for (a3.sibling.return = a3.return, a3 = a3.sibling; a3.tag !== 5 && a3.tag !== 6 && a3.tag !== 18; ) {
- if (a3.flags & 2 || a3.child === null || a3.tag === 4) continue a;
- a3.child.return = a3, a3 = a3.child;
- }
- if (!(a3.flags & 2)) return a3.stateNode;
- }
- }
- function Vj(a3, b, c) {
- var d = a3.tag;
- if (d === 5 || d === 6) a3 = a3.stateNode, b ? c.nodeType === 8 ? c.parentNode.insertBefore(a3, b) : c.insertBefore(a3, b) : (c.nodeType === 8 ? (b = c.parentNode, b.insertBefore(a3, c)) : (b = c, b.appendChild(a3)), c = c._reactRootContainer, c != null || b.onclick !== null || (b.onclick = Bf));
- else if (d !== 4 && (a3 = a3.child, a3 !== null)) for (Vj(a3, b, c), a3 = a3.sibling; a3 !== null; ) Vj(a3, b, c), a3 = a3.sibling;
- }
- function Wj(a3, b, c) {
- var d = a3.tag;
- if (d === 5 || d === 6) a3 = a3.stateNode, b ? c.insertBefore(a3, b) : c.appendChild(a3);
- else if (d !== 4 && (a3 = a3.child, a3 !== null)) for (Wj(a3, b, c), a3 = a3.sibling; a3 !== null; ) Wj(a3, b, c), a3 = a3.sibling;
- }
- var X = null, Xj = !1;
- function Yj(a3, b, c) {
- for (c = c.child; c !== null; ) Zj(a3, b, c), c = c.sibling;
- }
- function Zj(a3, b, c) {
- if (lc && typeof lc.onCommitFiberUnmount == "function") try {
- lc.onCommitFiberUnmount(kc, c);
- } catch {
- }
- switch (c.tag) {
- case 5:
- U || Lj(c, b);
- case 6:
- var d = X, e = Xj;
- X = null, Yj(a3, b, c), X = d, Xj = e, X !== null && (Xj ? (a3 = X, c = c.stateNode, a3.nodeType === 8 ? a3.parentNode.removeChild(c) : a3.removeChild(c)) : X.removeChild(c.stateNode));
- break;
- case 18:
- X !== null && (Xj ? (a3 = X, c = c.stateNode, a3.nodeType === 8 ? Kf(a3.parentNode, c) : a3.nodeType === 1 && Kf(a3, c), bd(a3)) : Kf(X, c.stateNode));
- break;
- case 4:
- d = X, e = Xj, X = c.stateNode.containerInfo, Xj = !0, Yj(a3, b, c), X = d, Xj = e;
- break;
- case 0:
- case 11:
- case 14:
- case 15:
- if (!U && (d = c.updateQueue, d !== null && (d = d.lastEffect, d !== null))) {
- e = d = d.next;
- do {
- var f4 = e, g2 = f4.destroy;
- f4 = f4.tag, g2 !== void 0 && ((f4 & 2) !== 0 || (f4 & 4) !== 0) && Mj(c, b, g2), e = e.next;
- } while (e !== d);
- }
- Yj(a3, b, c);
- break;
- case 1:
- if (!U && (Lj(c, b), d = c.stateNode, typeof d.componentWillUnmount == "function")) try {
- d.props = c.memoizedProps, d.state = c.memoizedState, d.componentWillUnmount();
- } catch (h3) {
- W(c, b, h3);
- }
- Yj(a3, b, c);
- break;
- case 21:
- Yj(a3, b, c);
- break;
- case 22:
- c.mode & 1 ? (U = (d = U) || c.memoizedState !== null, Yj(a3, b, c), U = d) : Yj(a3, b, c);
- break;
- default:
- Yj(a3, b, c);
- }
- }
- function ak(a3) {
- var b = a3.updateQueue;
- if (b !== null) {
- a3.updateQueue = null;
- var c = a3.stateNode;
- c === null && (c = a3.stateNode = new Kj()), b.forEach(function(b2) {
- var d = bk.bind(null, a3, b2);
- c.has(b2) || (c.add(b2), b2.then(d, d));
- });
- }
- }
- function ck(a3, b) {
- var c = b.deletions;
- if (c !== null) for (var d = 0; d < c.length; d++) {
- var e = c[d];
- try {
- var f4 = a3, g2 = b, h3 = g2;
- a: for (; h3 !== null; ) {
- switch (h3.tag) {
- case 5:
- X = h3.stateNode, Xj = !1;
- break a;
- case 3:
- X = h3.stateNode.containerInfo, Xj = !0;
- break a;
- case 4:
- X = h3.stateNode.containerInfo, Xj = !0;
- break a;
- }
- h3 = h3.return;
- }
- if (X === null) throw Error(p3(160));
- Zj(f4, g2, e), X = null, Xj = !1;
- var k = e.alternate;
- k !== null && (k.return = null), e.return = null;
- } catch (l) {
- W(e, b, l);
- }
- }
- if (b.subtreeFlags & 12854) for (b = b.child; b !== null; ) dk(b, a3), b = b.sibling;
- }
- function dk(a3, b) {
- var c = a3.alternate, d = a3.flags;
- switch (a3.tag) {
- case 0:
- case 11:
- case 14:
- case 15:
- if (ck(b, a3), ek(a3), d & 4) {
- try {
- Pj(3, a3, a3.return), Qj(3, a3);
- } catch (t) {
- W(a3, a3.return, t);
- }
- try {
- Pj(5, a3, a3.return);
- } catch (t) {
- W(a3, a3.return, t);
- }
- }
- break;
- case 1:
- ck(b, a3), ek(a3), d & 512 && c !== null && Lj(c, c.return);
- break;
- case 5:
- if (ck(b, a3), ek(a3), d & 512 && c !== null && Lj(c, c.return), a3.flags & 32) {
- var e = a3.stateNode;
- try {
- ob(e, "");
- } catch (t) {
- W(a3, a3.return, t);
- }
- }
- if (d & 4 && (e = a3.stateNode, e != null)) {
- var f4 = a3.memoizedProps, g2 = c !== null ? c.memoizedProps : f4, h3 = a3.type, k = a3.updateQueue;
- if (a3.updateQueue = null, k !== null) try {
- h3 === "input" && f4.type === "radio" && f4.name != null && ab(e, f4), vb(h3, g2);
- var l = vb(h3, f4);
- for (g2 = 0; g2 < k.length; g2 += 2) {
- var m3 = k[g2], q = k[g2 + 1];
- m3 === "style" ? sb2(e, q) : m3 === "dangerouslySetInnerHTML" ? nb(e, q) : m3 === "children" ? ob(e, q) : ta(e, m3, q, l);
- }
- switch (h3) {
- case "input":
- bb(e, f4);
- break;
- case "textarea":
- ib(e, f4);
- break;
- case "select":
- var r2 = e._wrapperState.wasMultiple;
- e._wrapperState.wasMultiple = !!f4.multiple;
- var y = f4.value;
- y != null ? fb(e, !!f4.multiple, y, !1) : r2 !== !!f4.multiple && (f4.defaultValue != null ? fb(
- e,
- !!f4.multiple,
- f4.defaultValue,
- !0
- ) : fb(e, !!f4.multiple, f4.multiple ? [] : "", !1));
- }
- e[Pf] = f4;
- } catch (t) {
- W(a3, a3.return, t);
- }
- }
- break;
- case 6:
- if (ck(b, a3), ek(a3), d & 4) {
- if (a3.stateNode === null) throw Error(p3(162));
- e = a3.stateNode, f4 = a3.memoizedProps;
- try {
- e.nodeValue = f4;
- } catch (t) {
- W(a3, a3.return, t);
- }
- }
- break;
- case 3:
- if (ck(b, a3), ek(a3), d & 4 && c !== null && c.memoizedState.isDehydrated) try {
- bd(b.containerInfo);
- } catch (t) {
- W(a3, a3.return, t);
- }
- break;
- case 4:
- ck(b, a3), ek(a3);
- break;
- case 13:
- ck(b, a3), ek(a3), e = a3.child, e.flags & 8192 && (f4 = e.memoizedState !== null, e.stateNode.isHidden = f4, !f4 || e.alternate !== null && e.alternate.memoizedState !== null || (fk = B3())), d & 4 && ak(a3);
- break;
- case 22:
- if (m3 = c !== null && c.memoizedState !== null, a3.mode & 1 ? (U = (l = U) || m3, ck(b, a3), U = l) : ck(b, a3), ek(a3), d & 8192) {
- if (l = a3.memoizedState !== null, (a3.stateNode.isHidden = l) && !m3 && (a3.mode & 1) !== 0) for (V = a3, m3 = a3.child; m3 !== null; ) {
- for (q = V = m3; V !== null; ) {
- switch (r2 = V, y = r2.child, r2.tag) {
- case 0:
- case 11:
- case 14:
- case 15:
- Pj(4, r2, r2.return);
- break;
- case 1:
- Lj(r2, r2.return);
- var n = r2.stateNode;
- if (typeof n.componentWillUnmount == "function") {
- d = r2, c = r2.return;
- try {
- b = d, n.props = b.memoizedProps, n.state = b.memoizedState, n.componentWillUnmount();
- } catch (t) {
- W(d, c, t);
- }
- }
- break;
- case 5:
- Lj(r2, r2.return);
- break;
- case 22:
- if (r2.memoizedState !== null) {
- gk(q);
- continue;
- }
- }
- y !== null ? (y.return = r2, V = y) : gk(q);
- }
- m3 = m3.sibling;
- }
- a: for (m3 = null, q = a3; ; ) {
- if (q.tag === 5) {
- if (m3 === null) {
- m3 = q;
- try {
- e = q.stateNode, l ? (f4 = e.style, typeof f4.setProperty == "function" ? f4.setProperty("display", "none", "important") : f4.display = "none") : (h3 = q.stateNode, k = q.memoizedProps.style, g2 = k != null && k.hasOwnProperty("display") ? k.display : null, h3.style.display = rb("display", g2));
- } catch (t) {
- W(a3, a3.return, t);
- }
- }
- } else if (q.tag === 6) {
- if (m3 === null) try {
- q.stateNode.nodeValue = l ? "" : q.memoizedProps;
- } catch (t) {
- W(a3, a3.return, t);
- }
- } else if ((q.tag !== 22 && q.tag !== 23 || q.memoizedState === null || q === a3) && q.child !== null) {
- q.child.return = q, q = q.child;
- continue;
- }
- if (q === a3) break a;
- for (; q.sibling === null; ) {
- if (q.return === null || q.return === a3) break a;
- m3 === q && (m3 = null), q = q.return;
- }
- m3 === q && (m3 = null), q.sibling.return = q.return, q = q.sibling;
- }
- }
- break;
- case 19:
- ck(b, a3), ek(a3), d & 4 && ak(a3);
- break;
- case 21:
- break;
- default:
- ck(
- b,
- a3
- ), ek(a3);
- }
- }
- function ek(a3) {
- var b = a3.flags;
- if (b & 2) {
- try {
- a: {
- for (var c = a3.return; c !== null; ) {
- if (Tj(c)) {
- var d = c;
- break a;
- }
- c = c.return;
- }
- throw Error(p3(160));
- }
- switch (d.tag) {
- case 5:
- var e = d.stateNode;
- d.flags & 32 && (ob(e, ""), d.flags &= -33);
- var f4 = Uj(a3);
- Wj(a3, f4, e);
- break;
- case 3:
- case 4:
- var g2 = d.stateNode.containerInfo, h3 = Uj(a3);
- Vj(a3, h3, g2);
- break;
- default:
- throw Error(p3(161));
- }
- } catch (k) {
- W(a3, a3.return, k);
- }
- a3.flags &= -3;
- }
- b & 4096 && (a3.flags &= -4097);
- }
- function hk(a3, b, c) {
- V = a3, ik(a3, b, c);
- }
- function ik(a3, b, c) {
- for (var d = (a3.mode & 1) !== 0; V !== null; ) {
- var e = V, f4 = e.child;
- if (e.tag === 22 && d) {
- var g2 = e.memoizedState !== null || Jj;
- if (!g2) {
- var h3 = e.alternate, k = h3 !== null && h3.memoizedState !== null || U;
- h3 = Jj;
- var l = U;
- if (Jj = g2, (U = k) && !l) for (V = e; V !== null; ) g2 = V, k = g2.child, g2.tag === 22 && g2.memoizedState !== null ? jk(e) : k !== null ? (k.return = g2, V = k) : jk(e);
- for (; f4 !== null; ) V = f4, ik(f4, b, c), f4 = f4.sibling;
- V = e, Jj = h3, U = l;
- }
- kk(a3, b, c);
- } else (e.subtreeFlags & 8772) !== 0 && f4 !== null ? (f4.return = e, V = f4) : kk(a3, b, c);
- }
- }
- function kk(a3) {
- for (; V !== null; ) {
- var b = V;
- if ((b.flags & 8772) !== 0) {
- var c = b.alternate;
- try {
- if ((b.flags & 8772) !== 0) switch (b.tag) {
- case 0:
- case 11:
- case 15:
- U || Qj(5, b);
- break;
- case 1:
- var d = b.stateNode;
- if (b.flags & 4 && !U) if (c === null) d.componentDidMount();
- else {
- var e = b.elementType === b.type ? c.memoizedProps : Ci(b.type, c.memoizedProps);
- d.componentDidUpdate(e, c.memoizedState, d.__reactInternalSnapshotBeforeUpdate);
- }
- var f4 = b.updateQueue;
- f4 !== null && sh(b, f4, d);
- break;
- case 3:
- var g2 = b.updateQueue;
- if (g2 !== null) {
- if (c = null, b.child !== null) switch (b.child.tag) {
- case 5:
- c = b.child.stateNode;
- break;
- case 1:
- c = b.child.stateNode;
- }
- sh(b, g2, c);
- }
- break;
- case 5:
- var h3 = b.stateNode;
- if (c === null && b.flags & 4) {
- c = h3;
- var k = b.memoizedProps;
- switch (b.type) {
- case "button":
- case "input":
- case "select":
- case "textarea":
- k.autoFocus && c.focus();
- break;
- case "img":
- k.src && (c.src = k.src);
- }
- }
- break;
- case 6:
- break;
- case 4:
- break;
- case 12:
- break;
- case 13:
- if (b.memoizedState === null) {
- var l = b.alternate;
- if (l !== null) {
- var m3 = l.memoizedState;
- if (m3 !== null) {
- var q = m3.dehydrated;
- q !== null && bd(q);
- }
- }
- }
- break;
- case 19:
- case 17:
- case 21:
- case 22:
- case 23:
- case 25:
- break;
- default:
- throw Error(p3(163));
- }
- U || b.flags & 512 && Rj(b);
- } catch (r2) {
- W(b, b.return, r2);
- }
- }
- if (b === a3) {
- V = null;
- break;
- }
- if (c = b.sibling, c !== null) {
- c.return = b.return, V = c;
- break;
- }
- V = b.return;
- }
- }
- function gk(a3) {
- for (; V !== null; ) {
- var b = V;
- if (b === a3) {
- V = null;
- break;
- }
- var c = b.sibling;
- if (c !== null) {
- c.return = b.return, V = c;
- break;
- }
- V = b.return;
- }
- }
- function jk(a3) {
- for (; V !== null; ) {
- var b = V;
- try {
- switch (b.tag) {
- case 0:
- case 11:
- case 15:
- var c = b.return;
- try {
- Qj(4, b);
- } catch (k) {
- W(b, c, k);
- }
- break;
- case 1:
- var d = b.stateNode;
- if (typeof d.componentDidMount == "function") {
- var e = b.return;
- try {
- d.componentDidMount();
- } catch (k) {
- W(b, e, k);
- }
- }
- var f4 = b.return;
- try {
- Rj(b);
- } catch (k) {
- W(b, f4, k);
- }
- break;
- case 5:
- var g2 = b.return;
- try {
- Rj(b);
- } catch (k) {
- W(b, g2, k);
- }
- }
- } catch (k) {
- W(b, b.return, k);
- }
- if (b === a3) {
- V = null;
- break;
- }
- var h3 = b.sibling;
- if (h3 !== null) {
- h3.return = b.return, V = h3;
- break;
- }
- V = b.return;
- }
- }
- var lk = Math.ceil, mk = ua.ReactCurrentDispatcher, nk = ua.ReactCurrentOwner, ok = ua.ReactCurrentBatchConfig, K2 = 0, Q = null, Y = null, Z = 0, fj = 0, ej = Uf(0), T2 = 0, pk = null, rh = 0, qk = 0, rk = 0, sk = null, tk = null, fk = 0, Gj = 1 / 0, uk = null, Oi = !1, Pi = null, Ri = null, vk = !1, wk = null, xk = 0, yk = 0, zk = null, Ak = -1, Bk = 0;
- function R() {
- return (K2 & 6) !== 0 ? B3() : Ak !== -1 ? Ak : Ak = B3();
- }
- function yi(a3) {
- return (a3.mode & 1) === 0 ? 1 : (K2 & 2) !== 0 && Z !== 0 ? Z & -Z : Kg.transition !== null ? (Bk === 0 && (Bk = yc()), Bk) : (a3 = C3, a3 !== 0 || (a3 = window.event, a3 = a3 === void 0 ? 16 : jd(a3.type)), a3);
- }
- function gi(a3, b, c, d) {
- if (50 < yk) throw yk = 0, zk = null, Error(p3(185));
- Ac(a3, c, d), ((K2 & 2) === 0 || a3 !== Q) && (a3 === Q && ((K2 & 2) === 0 && (qk |= c), T2 === 4 && Ck(a3, Z)), Dk(a3, d), c === 1 && K2 === 0 && (b.mode & 1) === 0 && (Gj = B3() + 500, fg && jg()));
- }
- function Dk(a3, b) {
- var c = a3.callbackNode;
- wc(a3, b);
- var d = uc(a3, a3 === Q ? Z : 0);
- if (d === 0) c !== null && bc(c), a3.callbackNode = null, a3.callbackPriority = 0;
- else if (b = d & -d, a3.callbackPriority !== b) {
- if (c != null && bc(c), b === 1) a3.tag === 0 ? ig(Ek.bind(null, a3)) : hg(Ek.bind(null, a3)), Jf(function() {
- (K2 & 6) === 0 && jg();
- }), c = null;
- else {
- switch (Dc(d)) {
- case 1:
- c = fc;
- break;
- case 4:
- c = gc;
- break;
- case 16:
- c = hc;
- break;
- case 536870912:
- c = jc;
- break;
- default:
- c = hc;
- }
- c = Fk(c, Gk.bind(null, a3));
- }
- a3.callbackPriority = b, a3.callbackNode = c;
- }
- }
- function Gk(a3, b) {
- if (Ak = -1, Bk = 0, (K2 & 6) !== 0) throw Error(p3(327));
- var c = a3.callbackNode;
- if (Hk() && a3.callbackNode !== c) return null;
- var d = uc(a3, a3 === Q ? Z : 0);
- if (d === 0) return null;
- if ((d & 30) !== 0 || (d & a3.expiredLanes) !== 0 || b) b = Ik(a3, d);
- else {
- b = d;
- var e = K2;
- K2 |= 2;
- var f4 = Jk();
- (Q !== a3 || Z !== b) && (uk = null, Gj = B3() + 500, Kk(a3, b));
- do
- try {
- Lk();
- break;
- } catch (h3) {
- Mk(a3, h3);
- }
- while (!0);
- $g(), mk.current = f4, K2 = e, Y !== null ? b = 0 : (Q = null, Z = 0, b = T2);
- }
- if (b !== 0) {
- if (b === 2 && (e = xc(a3), e !== 0 && (d = e, b = Nk(a3, e))), b === 1) throw c = pk, Kk(a3, 0), Ck(a3, d), Dk(a3, B3()), c;
- if (b === 6) Ck(a3, d);
- else {
- if (e = a3.current.alternate, (d & 30) === 0 && !Ok(e) && (b = Ik(a3, d), b === 2 && (f4 = xc(a3), f4 !== 0 && (d = f4, b = Nk(a3, f4))), b === 1)) throw c = pk, Kk(a3, 0), Ck(a3, d), Dk(a3, B3()), c;
- switch (a3.finishedWork = e, a3.finishedLanes = d, b) {
- case 0:
- case 1:
- throw Error(p3(345));
- case 2:
- Pk(a3, tk, uk);
- break;
- case 3:
- if (Ck(a3, d), (d & 130023424) === d && (b = fk + 500 - B3(), 10 < b)) {
- if (uc(a3, 0) !== 0) break;
- if (e = a3.suspendedLanes, (e & d) !== d) {
- R(), a3.pingedLanes |= a3.suspendedLanes & e;
- break;
- }
- a3.timeoutHandle = Ff(Pk.bind(null, a3, tk, uk), b);
- break;
- }
- Pk(a3, tk, uk);
- break;
- case 4:
- if (Ck(a3, d), (d & 4194240) === d) break;
- for (b = a3.eventTimes, e = -1; 0 < d; ) {
- var g2 = 31 - oc(d);
- f4 = 1 << g2, g2 = b[g2], g2 > e && (e = g2), d &= ~f4;
- }
- if (d = e, d = B3() - d, d = (120 > d ? 120 : 480 > d ? 480 : 1080 > d ? 1080 : 1920 > d ? 1920 : 3e3 > d ? 3e3 : 4320 > d ? 4320 : 1960 * lk(d / 1960)) - d, 10 < d) {
- a3.timeoutHandle = Ff(Pk.bind(null, a3, tk, uk), d);
- break;
- }
- Pk(a3, tk, uk);
- break;
- case 5:
- Pk(a3, tk, uk);
- break;
- default:
- throw Error(p3(329));
- }
- }
- }
- return Dk(a3, B3()), a3.callbackNode === c ? Gk.bind(null, a3) : null;
- }
- function Nk(a3, b) {
- var c = sk;
- return a3.current.memoizedState.isDehydrated && (Kk(a3, b).flags |= 256), a3 = Ik(a3, b), a3 !== 2 && (b = tk, tk = c, b !== null && Fj(b)), a3;
- }
- function Fj(a3) {
- tk === null ? tk = a3 : tk.push.apply(tk, a3);
- }
- function Ok(a3) {
- for (var b = a3; ; ) {
- if (b.flags & 16384) {
- var c = b.updateQueue;
- if (c !== null && (c = c.stores, c !== null)) for (var d = 0; d < c.length; d++) {
- var e = c[d], f4 = e.getSnapshot;
- e = e.value;
- try {
- if (!He(f4(), e)) return !1;
- } catch {
- return !1;
- }
- }
- }
- if (c = b.child, b.subtreeFlags & 16384 && c !== null) c.return = b, b = c;
- else {
- if (b === a3) break;
- for (; b.sibling === null; ) {
- if (b.return === null || b.return === a3) return !0;
- b = b.return;
- }
- b.sibling.return = b.return, b = b.sibling;
- }
- }
- return !0;
- }
- function Ck(a3, b) {
- for (b &= ~rk, b &= ~qk, a3.suspendedLanes |= b, a3.pingedLanes &= ~b, a3 = a3.expirationTimes; 0 < b; ) {
- var c = 31 - oc(b), d = 1 << c;
- a3[c] = -1, b &= ~d;
- }
- }
- function Ek(a3) {
- if ((K2 & 6) !== 0) throw Error(p3(327));
- Hk();
- var b = uc(a3, 0);
- if ((b & 1) === 0) return Dk(a3, B3()), null;
- var c = Ik(a3, b);
- if (a3.tag !== 0 && c === 2) {
- var d = xc(a3);
- d !== 0 && (b = d, c = Nk(a3, d));
- }
- if (c === 1) throw c = pk, Kk(a3, 0), Ck(a3, b), Dk(a3, B3()), c;
- if (c === 6) throw Error(p3(345));
- return a3.finishedWork = a3.current.alternate, a3.finishedLanes = b, Pk(a3, tk, uk), Dk(a3, B3()), null;
- }
- function Qk(a3, b) {
- var c = K2;
- K2 |= 1;
- try {
- return a3(b);
- } finally {
- K2 = c, K2 === 0 && (Gj = B3() + 500, fg && jg());
- }
- }
- function Rk(a3) {
- wk !== null && wk.tag === 0 && (K2 & 6) === 0 && Hk();
- var b = K2;
- K2 |= 1;
- var c = ok.transition, d = C3;
- try {
- if (ok.transition = null, C3 = 1, a3) return a3();
- } finally {
- C3 = d, ok.transition = c, K2 = b, (K2 & 6) === 0 && jg();
- }
- }
- function Hj() {
- fj = ej.current, E(ej);
- }
- function Kk(a3, b) {
- a3.finishedWork = null, a3.finishedLanes = 0;
- var c = a3.timeoutHandle;
- if (c !== -1 && (a3.timeoutHandle = -1, Gf(c)), Y !== null) for (c = Y.return; c !== null; ) {
- var d = c;
- switch (wg(d), d.tag) {
- case 1:
- d = d.type.childContextTypes, d != null && $f();
- break;
- case 3:
- zh(), E(Wf), E(H), Eh();
- break;
- case 5:
- Bh(d);
- break;
- case 4:
- zh();
- break;
- case 13:
- E(L);
- break;
- case 19:
- E(L);
- break;
- case 10:
- ah(d.type._context);
- break;
- case 22:
- case 23:
- Hj();
- }
- c = c.return;
- }
- if (Q = a3, Y = a3 = Pg(a3.current, null), Z = fj = b, T2 = 0, pk = null, rk = qk = rh = 0, tk = sk = null, fh !== null) {
- for (b = 0; b < fh.length; b++) if (c = fh[b], d = c.interleaved, d !== null) {
- c.interleaved = null;
- var e = d.next, f4 = c.pending;
- if (f4 !== null) {
- var g2 = f4.next;
- f4.next = e, d.next = g2;
- }
- c.pending = d;
- }
- fh = null;
- }
- return a3;
- }
- function Mk(a3, b) {
- do {
- var c = Y;
- try {
- if ($g(), Fh.current = Rh, Ih) {
- for (var d = M.memoizedState; d !== null; ) {
- var e = d.queue;
- e !== null && (e.pending = null), d = d.next;
- }
- Ih = !1;
- }
- if (Hh = 0, O = N = M = null, Jh = !1, Kh = 0, nk.current = null, c === null || c.return === null) {
- T2 = 1, pk = b, Y = null;
- break;
- }
- a: {
- var f4 = a3, g2 = c.return, h3 = c, k = b;
- if (b = Z, h3.flags |= 32768, k !== null && typeof k == "object" && typeof k.then == "function") {
- var l = k, m3 = h3, q = m3.tag;
- if ((m3.mode & 1) === 0 && (q === 0 || q === 11 || q === 15)) {
- var r2 = m3.alternate;
- r2 ? (m3.updateQueue = r2.updateQueue, m3.memoizedState = r2.memoizedState, m3.lanes = r2.lanes) : (m3.updateQueue = null, m3.memoizedState = null);
- }
- var y = Ui(g2);
- if (y !== null) {
- y.flags &= -257, Vi(y, g2, h3, f4, b), y.mode & 1 && Si(f4, l, b), b = y, k = l;
- var n = b.updateQueue;
- if (n === null) {
- var t = /* @__PURE__ */ new Set();
- t.add(k), b.updateQueue = t;
- } else n.add(k);
- break a;
- } else {
- if ((b & 1) === 0) {
- Si(f4, l, b), tj();
- break a;
- }
- k = Error(p3(426));
- }
- } else if (I && h3.mode & 1) {
- var J = Ui(g2);
- if (J !== null) {
- (J.flags & 65536) === 0 && (J.flags |= 256), Vi(J, g2, h3, f4, b), Jg(Ji(k, h3));
- break a;
- }
- }
- f4 = k = Ji(k, h3), T2 !== 4 && (T2 = 2), sk === null ? sk = [f4] : sk.push(f4), f4 = g2;
- do {
- switch (f4.tag) {
- case 3:
- f4.flags |= 65536, b &= -b, f4.lanes |= b;
- var x = Ni(f4, k, b);
- ph(f4, x);
- break a;
- case 1:
- h3 = k;
- var w = f4.type, u2 = f4.stateNode;
- if ((f4.flags & 128) === 0 && (typeof w.getDerivedStateFromError == "function" || u2 !== null && typeof u2.componentDidCatch == "function" && (Ri === null || !Ri.has(u2)))) {
- f4.flags |= 65536, b &= -b, f4.lanes |= b;
- var F = Qi(f4, h3, b);
- ph(f4, F);
- break a;
- }
- }
- f4 = f4.return;
- } while (f4 !== null);
- }
- Sk(c);
- } catch (na) {
- b = na, Y === c && c !== null && (Y = c = c.return);
- continue;
- }
- break;
- } while (!0);
- }
- function Jk() {
- var a3 = mk.current;
- return mk.current = Rh, a3 === null ? Rh : a3;
- }
- function tj() {
- (T2 === 0 || T2 === 3 || T2 === 2) && (T2 = 4), Q === null || (rh & 268435455) === 0 && (qk & 268435455) === 0 || Ck(Q, Z);
- }
- function Ik(a3, b) {
- var c = K2;
- K2 |= 2;
- var d = Jk();
- (Q !== a3 || Z !== b) && (uk = null, Kk(a3, b));
- do
- try {
- Tk();
- break;
- } catch (e) {
- Mk(a3, e);
- }
- while (!0);
- if ($g(), K2 = c, mk.current = d, Y !== null) throw Error(p3(261));
- return Q = null, Z = 0, T2;
- }
- function Tk() {
- for (; Y !== null; ) Uk(Y);
- }
- function Lk() {
- for (; Y !== null && !cc(); ) Uk(Y);
- }
- function Uk(a3) {
- var b = Vk(a3.alternate, a3, fj);
- a3.memoizedProps = a3.pendingProps, b === null ? Sk(a3) : Y = b, nk.current = null;
- }
- function Sk(a3) {
- var b = a3;
- do {
- var c = b.alternate;
- if (a3 = b.return, (b.flags & 32768) === 0) {
- if (c = Ej(c, b, fj), c !== null) {
- Y = c;
- return;
- }
- } else {
- if (c = Ij(c, b), c !== null) {
- c.flags &= 32767, Y = c;
- return;
- }
- if (a3 !== null) a3.flags |= 32768, a3.subtreeFlags = 0, a3.deletions = null;
- else {
- T2 = 6, Y = null;
- return;
- }
- }
- if (b = b.sibling, b !== null) {
- Y = b;
- return;
- }
- Y = b = a3;
- } while (b !== null);
- T2 === 0 && (T2 = 5);
- }
- function Pk(a3, b, c) {
- var d = C3, e = ok.transition;
- try {
- ok.transition = null, C3 = 1, Wk(a3, b, c, d);
- } finally {
- ok.transition = e, C3 = d;
- }
- return null;
- }
- function Wk(a3, b, c, d) {
- do
- Hk();
- while (wk !== null);
- if ((K2 & 6) !== 0) throw Error(p3(327));
- c = a3.finishedWork;
- var e = a3.finishedLanes;
- if (c === null) return null;
- if (a3.finishedWork = null, a3.finishedLanes = 0, c === a3.current) throw Error(p3(177));
- a3.callbackNode = null, a3.callbackPriority = 0;
- var f4 = c.lanes | c.childLanes;
- if (Bc(a3, f4), a3 === Q && (Y = Q = null, Z = 0), (c.subtreeFlags & 2064) === 0 && (c.flags & 2064) === 0 || vk || (vk = !0, Fk(hc, function() {
- return Hk(), null;
- })), f4 = (c.flags & 15990) !== 0, (c.subtreeFlags & 15990) !== 0 || f4) {
- f4 = ok.transition, ok.transition = null;
- var g2 = C3;
- C3 = 1;
- var h3 = K2;
- K2 |= 4, nk.current = null, Oj(a3, c), dk(c, a3), Oe(Df), dd = !!Cf, Df = Cf = null, a3.current = c, hk(c, a3, e), dc(), K2 = h3, C3 = g2, ok.transition = f4;
- } else a3.current = c;
- if (vk && (vk = !1, wk = a3, xk = e), f4 = a3.pendingLanes, f4 === 0 && (Ri = null), mc(c.stateNode, d), Dk(a3, B3()), b !== null) for (d = a3.onRecoverableError, c = 0; c < b.length; c++) e = b[c], d(e.value, { componentStack: e.stack, digest: e.digest });
- if (Oi) throw Oi = !1, a3 = Pi, Pi = null, a3;
- return (xk & 1) !== 0 && a3.tag !== 0 && Hk(), f4 = a3.pendingLanes, (f4 & 1) !== 0 ? a3 === zk ? yk++ : (yk = 0, zk = a3) : yk = 0, jg(), null;
- }
- function Hk() {
- if (wk !== null) {
- var a3 = Dc(xk), b = ok.transition, c = C3;
- try {
- if (ok.transition = null, C3 = 16 > a3 ? 16 : a3, wk === null) var d = !1;
- else {
- if (a3 = wk, wk = null, xk = 0, (K2 & 6) !== 0) throw Error(p3(331));
- var e = K2;
- for (K2 |= 4, V = a3.current; V !== null; ) {
- var f4 = V, g2 = f4.child;
- if ((V.flags & 16) !== 0) {
- var h3 = f4.deletions;
- if (h3 !== null) {
- for (var k = 0; k < h3.length; k++) {
- var l = h3[k];
- for (V = l; V !== null; ) {
- var m3 = V;
- switch (m3.tag) {
- case 0:
- case 11:
- case 15:
- Pj(8, m3, f4);
- }
- var q = m3.child;
- if (q !== null) q.return = m3, V = q;
- else for (; V !== null; ) {
- m3 = V;
- var r2 = m3.sibling, y = m3.return;
- if (Sj(m3), m3 === l) {
- V = null;
- break;
- }
- if (r2 !== null) {
- r2.return = y, V = r2;
- break;
- }
- V = y;
- }
- }
- }
- var n = f4.alternate;
- if (n !== null) {
- var t = n.child;
- if (t !== null) {
- n.child = null;
- do {
- var J = t.sibling;
- t.sibling = null, t = J;
- } while (t !== null);
- }
- }
- V = f4;
- }
- }
- if ((f4.subtreeFlags & 2064) !== 0 && g2 !== null) g2.return = f4, V = g2;
- else b: for (; V !== null; ) {
- if (f4 = V, (f4.flags & 2048) !== 0) switch (f4.tag) {
- case 0:
- case 11:
- case 15:
- Pj(9, f4, f4.return);
- }
- var x = f4.sibling;
- if (x !== null) {
- x.return = f4.return, V = x;
- break b;
- }
- V = f4.return;
- }
- }
- var w = a3.current;
- for (V = w; V !== null; ) {
- g2 = V;
- var u2 = g2.child;
- if ((g2.subtreeFlags & 2064) !== 0 && u2 !== null) u2.return = g2, V = u2;
- else b: for (g2 = w; V !== null; ) {
- if (h3 = V, (h3.flags & 2048) !== 0) try {
- switch (h3.tag) {
- case 0:
- case 11:
- case 15:
- Qj(9, h3);
- }
- } catch (na) {
- W(h3, h3.return, na);
- }
- if (h3 === g2) {
- V = null;
- break b;
- }
- var F = h3.sibling;
- if (F !== null) {
- F.return = h3.return, V = F;
- break b;
- }
- V = h3.return;
- }
- }
- if (K2 = e, jg(), lc && typeof lc.onPostCommitFiberRoot == "function") try {
- lc.onPostCommitFiberRoot(kc, a3);
- } catch {
- }
- d = !0;
- }
- return d;
- } finally {
- C3 = c, ok.transition = b;
- }
- }
- return !1;
- }
- function Xk(a3, b, c) {
- b = Ji(c, b), b = Ni(a3, b, 1), a3 = nh(a3, b, 1), b = R(), a3 !== null && (Ac(a3, 1, b), Dk(a3, b));
- }
- function W(a3, b, c) {
- if (a3.tag === 3) Xk(a3, a3, c);
- else for (; b !== null; ) {
- if (b.tag === 3) {
- Xk(b, a3, c);
- break;
- } else if (b.tag === 1) {
- var d = b.stateNode;
- if (typeof b.type.getDerivedStateFromError == "function" || typeof d.componentDidCatch == "function" && (Ri === null || !Ri.has(d))) {
- a3 = Ji(c, a3), a3 = Qi(b, a3, 1), b = nh(b, a3, 1), a3 = R(), b !== null && (Ac(b, 1, a3), Dk(b, a3));
- break;
- }
- }
- b = b.return;
- }
- }
- function Ti(a3, b, c) {
- var d = a3.pingCache;
- d !== null && d.delete(b), b = R(), a3.pingedLanes |= a3.suspendedLanes & c, Q === a3 && (Z & c) === c && (T2 === 4 || T2 === 3 && (Z & 130023424) === Z && 500 > B3() - fk ? Kk(a3, 0) : rk |= c), Dk(a3, b);
- }
- function Yk(a3, b) {
- b === 0 && ((a3.mode & 1) === 0 ? b = 1 : (b = sc, sc <<= 1, (sc & 130023424) === 0 && (sc = 4194304)));
- var c = R();
- a3 = ih(a3, b), a3 !== null && (Ac(a3, b, c), Dk(a3, c));
- }
- function uj(a3) {
- var b = a3.memoizedState, c = 0;
- b !== null && (c = b.retryLane), Yk(a3, c);
- }
- function bk(a3, b) {
- var c = 0;
- switch (a3.tag) {
- case 13:
- var d = a3.stateNode, e = a3.memoizedState;
- e !== null && (c = e.retryLane);
- break;
- case 19:
- d = a3.stateNode;
- break;
- default:
- throw Error(p3(314));
- }
- d !== null && d.delete(b), Yk(a3, c);
- }
- var Vk;
- Vk = function(a3, b, c) {
- if (a3 !== null) if (a3.memoizedProps !== b.pendingProps || Wf.current) dh = !0;
- else {
- if ((a3.lanes & c) === 0 && (b.flags & 128) === 0) return dh = !1, yj(a3, b, c);
- dh = (a3.flags & 131072) !== 0;
- }
- else dh = !1, I && (b.flags & 1048576) !== 0 && ug(b, ng, b.index);
- switch (b.lanes = 0, b.tag) {
- case 2:
- var d = b.type;
- ij(a3, b), a3 = b.pendingProps;
- var e = Yf(b, H.current);
- ch(b, c), e = Nh(null, b, d, a3, e, c);
- var f4 = Sh();
- return b.flags |= 1, typeof e == "object" && e !== null && typeof e.render == "function" && e.$$typeof === void 0 ? (b.tag = 1, b.memoizedState = null, b.updateQueue = null, Zf(d) ? (f4 = !0, cg(b)) : f4 = !1, b.memoizedState = e.state !== null && e.state !== void 0 ? e.state : null, kh(b), e.updater = Ei, b.stateNode = e, e._reactInternals = b, Ii(b, d, a3, c), b = jj(null, b, d, !0, f4, c)) : (b.tag = 0, I && f4 && vg(b), Xi(null, b, e, c), b = b.child), b;
- case 16:
- d = b.elementType;
- a: {
- switch (ij(a3, b), a3 = b.pendingProps, e = d._init, d = e(d._payload), b.type = d, e = b.tag = Zk(d), a3 = Ci(d, a3), e) {
- case 0:
- b = cj(null, b, d, a3, c);
- break a;
- case 1:
- b = hj(null, b, d, a3, c);
- break a;
- case 11:
- b = Yi(null, b, d, a3, c);
- break a;
- case 14:
- b = $i(null, b, d, Ci(d.type, a3), c);
- break a;
- }
- throw Error(p3(
- 306,
- d,
- ""
- ));
- }
- return b;
- case 0:
- return d = b.type, e = b.pendingProps, e = b.elementType === d ? e : Ci(d, e), cj(a3, b, d, e, c);
- case 1:
- return d = b.type, e = b.pendingProps, e = b.elementType === d ? e : Ci(d, e), hj(a3, b, d, e, c);
- case 3:
- a: {
- if (kj(b), a3 === null) throw Error(p3(387));
- d = b.pendingProps, f4 = b.memoizedState, e = f4.element, lh(a3, b), qh(b, d, null, c);
- var g2 = b.memoizedState;
- if (d = g2.element, f4.isDehydrated) if (f4 = { element: d, isDehydrated: !1, cache: g2.cache, pendingSuspenseBoundaries: g2.pendingSuspenseBoundaries, transitions: g2.transitions }, b.updateQueue.baseState = f4, b.memoizedState = f4, b.flags & 256) {
- e = Ji(Error(p3(423)), b), b = lj(a3, b, d, c, e);
- break a;
- } else if (d !== e) {
- e = Ji(Error(p3(424)), b), b = lj(a3, b, d, c, e);
- break a;
- } else for (yg = Lf(b.stateNode.containerInfo.firstChild), xg = b, I = !0, zg = null, c = Vg(b, null, d, c), b.child = c; c; ) c.flags = c.flags & -3 | 4096, c = c.sibling;
- else {
- if (Ig(), d === e) {
- b = Zi(a3, b, c);
- break a;
- }
- Xi(a3, b, d, c);
- }
- b = b.child;
- }
- return b;
- case 5:
- return Ah(b), a3 === null && Eg(b), d = b.type, e = b.pendingProps, f4 = a3 !== null ? a3.memoizedProps : null, g2 = e.children, Ef(d, e) ? g2 = null : f4 !== null && Ef(d, f4) && (b.flags |= 32), gj(a3, b), Xi(a3, b, g2, c), b.child;
- case 6:
- return a3 === null && Eg(b), null;
- case 13:
- return oj(a3, b, c);
- case 4:
- return yh(b, b.stateNode.containerInfo), d = b.pendingProps, a3 === null ? b.child = Ug(b, null, d, c) : Xi(a3, b, d, c), b.child;
- case 11:
- return d = b.type, e = b.pendingProps, e = b.elementType === d ? e : Ci(d, e), Yi(a3, b, d, e, c);
- case 7:
- return Xi(a3, b, b.pendingProps, c), b.child;
- case 8:
- return Xi(a3, b, b.pendingProps.children, c), b.child;
- case 12:
- return Xi(a3, b, b.pendingProps.children, c), b.child;
- case 10:
- a: {
- if (d = b.type._context, e = b.pendingProps, f4 = b.memoizedProps, g2 = e.value, G(Wg, d._currentValue), d._currentValue = g2, f4 !== null) if (He(f4.value, g2)) {
- if (f4.children === e.children && !Wf.current) {
- b = Zi(a3, b, c);
- break a;
- }
- } else for (f4 = b.child, f4 !== null && (f4.return = b); f4 !== null; ) {
- var h3 = f4.dependencies;
- if (h3 !== null) {
- g2 = f4.child;
- for (var k = h3.firstContext; k !== null; ) {
- if (k.context === d) {
- if (f4.tag === 1) {
- k = mh(-1, c & -c), k.tag = 2;
- var l = f4.updateQueue;
- if (l !== null) {
- l = l.shared;
- var m3 = l.pending;
- m3 === null ? k.next = k : (k.next = m3.next, m3.next = k), l.pending = k;
- }
- }
- f4.lanes |= c, k = f4.alternate, k !== null && (k.lanes |= c), bh(
- f4.return,
- c,
- b
- ), h3.lanes |= c;
- break;
- }
- k = k.next;
- }
- } else if (f4.tag === 10) g2 = f4.type === b.type ? null : f4.child;
- else if (f4.tag === 18) {
- if (g2 = f4.return, g2 === null) throw Error(p3(341));
- g2.lanes |= c, h3 = g2.alternate, h3 !== null && (h3.lanes |= c), bh(g2, c, b), g2 = f4.sibling;
- } else g2 = f4.child;
- if (g2 !== null) g2.return = f4;
- else for (g2 = f4; g2 !== null; ) {
- if (g2 === b) {
- g2 = null;
- break;
- }
- if (f4 = g2.sibling, f4 !== null) {
- f4.return = g2.return, g2 = f4;
- break;
- }
- g2 = g2.return;
- }
- f4 = g2;
- }
- Xi(a3, b, e.children, c), b = b.child;
- }
- return b;
- case 9:
- return e = b.type, d = b.pendingProps.children, ch(b, c), e = eh(e), d = d(e), b.flags |= 1, Xi(a3, b, d, c), b.child;
- case 14:
- return d = b.type, e = Ci(d, b.pendingProps), e = Ci(d.type, e), $i(a3, b, d, e, c);
- case 15:
- return bj(a3, b, b.type, b.pendingProps, c);
- case 17:
- return d = b.type, e = b.pendingProps, e = b.elementType === d ? e : Ci(d, e), ij(a3, b), b.tag = 1, Zf(d) ? (a3 = !0, cg(b)) : a3 = !1, ch(b, c), Gi(b, d, e), Ii(b, d, e, c), jj(null, b, d, !0, a3, c);
- case 19:
- return xj(a3, b, c);
- case 22:
- return dj(a3, b, c);
- }
- throw Error(p3(156, b.tag));
- };
- function Fk(a3, b) {
- return ac(a3, b);
- }
- function $k(a3, b, c, d) {
- this.tag = a3, this.key = c, this.sibling = this.child = this.return = this.stateNode = this.type = this.elementType = null, this.index = 0, this.ref = null, this.pendingProps = b, this.dependencies = this.memoizedState = this.updateQueue = this.memoizedProps = null, this.mode = d, this.subtreeFlags = this.flags = 0, this.deletions = null, this.childLanes = this.lanes = 0, this.alternate = null;
- }
- function Bg(a3, b, c, d) {
- return new $k(a3, b, c, d);
- }
- function aj(a3) {
- return a3 = a3.prototype, !(!a3 || !a3.isReactComponent);
- }
- function Zk(a3) {
- if (typeof a3 == "function") return aj(a3) ? 1 : 0;
- if (a3 != null) {
- if (a3 = a3.$$typeof, a3 === Da) return 11;
- if (a3 === Ga) return 14;
- }
- return 2;
- }
- function Pg(a3, b) {
- var c = a3.alternate;
- return c === null ? (c = Bg(a3.tag, b, a3.key, a3.mode), c.elementType = a3.elementType, c.type = a3.type, c.stateNode = a3.stateNode, c.alternate = a3, a3.alternate = c) : (c.pendingProps = b, c.type = a3.type, c.flags = 0, c.subtreeFlags = 0, c.deletions = null), c.flags = a3.flags & 14680064, c.childLanes = a3.childLanes, c.lanes = a3.lanes, c.child = a3.child, c.memoizedProps = a3.memoizedProps, c.memoizedState = a3.memoizedState, c.updateQueue = a3.updateQueue, b = a3.dependencies, c.dependencies = b === null ? null : { lanes: b.lanes, firstContext: b.firstContext }, c.sibling = a3.sibling, c.index = a3.index, c.ref = a3.ref, c;
- }
- function Rg(a3, b, c, d, e, f4) {
- var g2 = 2;
- if (d = a3, typeof a3 == "function") aj(a3) && (g2 = 1);
- else if (typeof a3 == "string") g2 = 5;
- else a: switch (a3) {
- case ya:
- return Tg(c.children, e, f4, b);
- case za:
- g2 = 8, e |= 8;
- break;
- case Aa:
- return a3 = Bg(12, c, b, e | 2), a3.elementType = Aa, a3.lanes = f4, a3;
- case Ea:
- return a3 = Bg(13, c, b, e), a3.elementType = Ea, a3.lanes = f4, a3;
- case Fa:
- return a3 = Bg(19, c, b, e), a3.elementType = Fa, a3.lanes = f4, a3;
- case Ia:
- return pj(c, e, f4, b);
- default:
- if (typeof a3 == "object" && a3 !== null) switch (a3.$$typeof) {
- case Ba:
- g2 = 10;
- break a;
- case Ca:
- g2 = 9;
- break a;
- case Da:
- g2 = 11;
- break a;
- case Ga:
- g2 = 14;
- break a;
- case Ha:
- g2 = 16, d = null;
- break a;
- }
- throw Error(p3(130, a3 == null ? a3 : typeof a3, ""));
- }
- return b = Bg(g2, c, b, e), b.elementType = a3, b.type = d, b.lanes = f4, b;
- }
- function Tg(a3, b, c, d) {
- return a3 = Bg(7, a3, d, b), a3.lanes = c, a3;
- }
- function pj(a3, b, c, d) {
- return a3 = Bg(22, a3, d, b), a3.elementType = Ia, a3.lanes = c, a3.stateNode = { isHidden: !1 }, a3;
- }
- function Qg(a3, b, c) {
- return a3 = Bg(6, a3, null, b), a3.lanes = c, a3;
- }
- function Sg(a3, b, c) {
- return b = Bg(4, a3.children !== null ? a3.children : [], a3.key, b), b.lanes = c, b.stateNode = { containerInfo: a3.containerInfo, pendingChildren: null, implementation: a3.implementation }, b;
- }
- function al(a3, b, c, d, e) {
- this.tag = b, this.containerInfo = a3, this.finishedWork = this.pingCache = this.current = this.pendingChildren = null, this.timeoutHandle = -1, this.callbackNode = this.pendingContext = this.context = null, this.callbackPriority = 0, this.eventTimes = zc(0), this.expirationTimes = zc(-1), this.entangledLanes = this.finishedLanes = this.mutableReadLanes = this.expiredLanes = this.pingedLanes = this.suspendedLanes = this.pendingLanes = 0, this.entanglements = zc(0), this.identifierPrefix = d, this.onRecoverableError = e, this.mutableSourceEagerHydrationData = null;
- }
- function bl(a3, b, c, d, e, f4, g2, h3, k) {
- return a3 = new al(a3, b, c, h3, k), b === 1 ? (b = 1, f4 === !0 && (b |= 8)) : b = 0, f4 = Bg(3, null, null, b), a3.current = f4, f4.stateNode = a3, f4.memoizedState = { element: d, isDehydrated: c, cache: null, transitions: null, pendingSuspenseBoundaries: null }, kh(f4), a3;
- }
- function cl(a3, b, c) {
- var d = 3 < arguments.length && arguments[3] !== void 0 ? arguments[3] : null;
- return { $$typeof: wa, key: d == null ? null : "" + d, children: a3, containerInfo: b, implementation: c };
- }
- function dl(a3) {
- if (!a3) return Vf;
- a3 = a3._reactInternals;
- a: {
- if (Vb(a3) !== a3 || a3.tag !== 1) throw Error(p3(170));
- var b = a3;
- do {
- switch (b.tag) {
- case 3:
- b = b.stateNode.context;
- break a;
- case 1:
- if (Zf(b.type)) {
- b = b.stateNode.__reactInternalMemoizedMergedChildContext;
- break a;
- }
- }
- b = b.return;
- } while (b !== null);
- throw Error(p3(171));
- }
- if (a3.tag === 1) {
- var c = a3.type;
- if (Zf(c)) return bg(a3, c, b);
- }
- return b;
- }
- function el(a3, b, c, d, e, f4, g2, h3, k) {
- return a3 = bl(c, d, !0, a3, e, f4, g2, h3, k), a3.context = dl(null), c = a3.current, d = R(), e = yi(c), f4 = mh(d, e), f4.callback = b ?? null, nh(c, f4, e), a3.current.lanes = e, Ac(a3, e, d), Dk(a3, d), a3;
- }
- function fl(a3, b, c, d) {
- var e = b.current, f4 = R(), g2 = yi(e);
- return c = dl(c), b.context === null ? b.context = c : b.pendingContext = c, b = mh(f4, g2), b.payload = { element: a3 }, d = d === void 0 ? null : d, d !== null && (b.callback = d), a3 = nh(e, b, g2), a3 !== null && (gi(a3, e, g2, f4), oh(a3, e, g2)), g2;
- }
- function gl(a3) {
- if (a3 = a3.current, !a3.child) return null;
- switch (a3.child.tag) {
- case 5:
- return a3.child.stateNode;
- default:
- return a3.child.stateNode;
- }
- }
- function hl(a3, b) {
- if (a3 = a3.memoizedState, a3 !== null && a3.dehydrated !== null) {
- var c = a3.retryLane;
- a3.retryLane = c !== 0 && c < b ? c : b;
- }
- }
- function il(a3, b) {
- hl(a3, b), (a3 = a3.alternate) && hl(a3, b);
- }
- function jl() {
- return null;
- }
- var kl = typeof reportError == "function" ? reportError : function(a3) {
- console.error(a3);
- };
- function ll(a3) {
- this._internalRoot = a3;
- }
- ml.prototype.render = ll.prototype.render = function(a3) {
- var b = this._internalRoot;
- if (b === null) throw Error(p3(409));
- fl(a3, b, null, null);
- };
- ml.prototype.unmount = ll.prototype.unmount = function() {
- var a3 = this._internalRoot;
- if (a3 !== null) {
- this._internalRoot = null;
- var b = a3.containerInfo;
- Rk(function() {
- fl(null, a3, null, null);
- }), b[uf] = null;
- }
- };
- function ml(a3) {
- this._internalRoot = a3;
- }
- ml.prototype.unstable_scheduleHydration = function(a3) {
- if (a3) {
- var b = Hc();
- a3 = { blockedOn: null, target: a3, priority: b };
- for (var c = 0; c < Qc.length && b !== 0 && b < Qc[c].priority; c++) ;
- Qc.splice(c, 0, a3), c === 0 && Vc(a3);
- }
- };
- function nl(a3) {
- return !(!a3 || a3.nodeType !== 1 && a3.nodeType !== 9 && a3.nodeType !== 11);
- }
- function ol(a3) {
- return !(!a3 || a3.nodeType !== 1 && a3.nodeType !== 9 && a3.nodeType !== 11 && (a3.nodeType !== 8 || a3.nodeValue !== " react-mount-point-unstable "));
- }
- function pl() {
- }
- function ql(a3, b, c, d, e) {
- if (e) {
- if (typeof d == "function") {
- var f4 = d;
- d = function() {
- var a4 = gl(g2);
- f4.call(a4);
- };
- }
- var g2 = el(b, d, a3, 0, null, !1, !1, "", pl);
- return a3._reactRootContainer = g2, a3[uf] = g2.current, sf(a3.nodeType === 8 ? a3.parentNode : a3), Rk(), g2;
- }
- for (; e = a3.lastChild; ) a3.removeChild(e);
- if (typeof d == "function") {
- var h3 = d;
- d = function() {
- var a4 = gl(k);
- h3.call(a4);
- };
- }
- var k = bl(a3, 0, !1, null, null, !1, !1, "", pl);
- return a3._reactRootContainer = k, a3[uf] = k.current, sf(a3.nodeType === 8 ? a3.parentNode : a3), Rk(function() {
- fl(b, k, c, d);
- }), k;
- }
- function rl(a3, b, c, d, e) {
- var f4 = c._reactRootContainer;
- if (f4) {
- var g2 = f4;
- if (typeof e == "function") {
- var h3 = e;
- e = function() {
- var a4 = gl(g2);
- h3.call(a4);
- };
- }
- fl(b, g2, a3, e);
- } else g2 = ql(c, b, a3, e, d);
- return gl(g2);
- }
- Ec = function(a3) {
- switch (a3.tag) {
- case 3:
- var b = a3.stateNode;
- if (b.current.memoizedState.isDehydrated) {
- var c = tc(b.pendingLanes);
- c !== 0 && (Cc(b, c | 1), Dk(b, B3()), (K2 & 6) === 0 && (Gj = B3() + 500, jg()));
- }
- break;
- case 13:
- Rk(function() {
- var b2 = ih(a3, 1);
- if (b2 !== null) {
- var c2 = R();
- gi(b2, a3, 1, c2);
- }
- }), il(a3, 1);
- }
- };
- Fc = function(a3) {
- if (a3.tag === 13) {
- var b = ih(a3, 134217728);
- if (b !== null) {
- var c = R();
- gi(b, a3, 134217728, c);
- }
- il(a3, 134217728);
- }
- };
- Gc = function(a3) {
- if (a3.tag === 13) {
- var b = yi(a3), c = ih(a3, b);
- if (c !== null) {
- var d = R();
- gi(c, a3, b, d);
- }
- il(a3, b);
- }
- };
- Hc = function() {
- return C3;
- };
- Ic = function(a3, b) {
- var c = C3;
- try {
- return C3 = a3, b();
- } finally {
- C3 = c;
- }
- };
- yb = function(a3, b, c) {
- switch (b) {
- case "input":
- if (bb(a3, c), b = c.name, c.type === "radio" && b != null) {
- for (c = a3; c.parentNode; ) c = c.parentNode;
- for (c = c.querySelectorAll("input[name=" + JSON.stringify("" + b) + '][type="radio"]'), b = 0; b < c.length; b++) {
- var d = c[b];
- if (d !== a3 && d.form === a3.form) {
- var e = Db(d);
- if (!e) throw Error(p3(90));
- Wa(d), bb(d, e);
- }
- }
- }
- break;
- case "textarea":
- ib(a3, c);
- break;
- case "select":
- b = c.value, b != null && fb(a3, !!c.multiple, b, !1);
- }
- };
- Gb = Qk;
- Hb = Rk;
- var sl = { usingClientEntryPoint: !1, Events: [Cb, ue, Db, Eb, Fb, Qk] }, tl = { findFiberByHostInstance: Wc, bundleType: 0, version: "18.3.1", rendererPackageName: "react-dom" }, ul = { bundleType: tl.bundleType, version: tl.version, rendererPackageName: tl.rendererPackageName, rendererConfig: tl.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, overrideProps: null, overridePropsDeletePath: null, overridePropsRenamePath: null, setErrorHandler: null, setSuspenseHandler: null, scheduleUpdate: null, currentDispatcherRef: ua.ReactCurrentDispatcher, findHostInstanceByFiber: function(a3) {
- return a3 = Zb(a3), a3 === null ? null : a3.stateNode;
- }, findFiberByHostInstance: tl.findFiberByHostInstance || jl, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, reconcilerVersion: "18.3.1-next-f1338f8080-20240426" };
- if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && (vl = __REACT_DEVTOOLS_GLOBAL_HOOK__, !vl.isDisabled && vl.supportsFiber))
- try {
- kc = vl.inject(ul), lc = vl;
- } catch {
- }
- var vl;
- exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = sl;
- exports.createPortal = function(a3, b) {
- var c = 2 < arguments.length && arguments[2] !== void 0 ? arguments[2] : null;
- if (!nl(b)) throw Error(p3(200));
- return cl(a3, b, null, c);
- };
- exports.createRoot = function(a3, b) {
- if (!nl(a3)) throw Error(p3(299));
- var c = !1, d = "", e = kl;
- return b != null && (b.unstable_strictMode === !0 && (c = !0), b.identifierPrefix !== void 0 && (d = b.identifierPrefix), b.onRecoverableError !== void 0 && (e = b.onRecoverableError)), b = bl(a3, 1, !1, null, null, c, !1, d, e), a3[uf] = b.current, sf(a3.nodeType === 8 ? a3.parentNode : a3), new ll(b);
- };
- exports.findDOMNode = function(a3) {
- if (a3 == null) return null;
- if (a3.nodeType === 1) return a3;
- var b = a3._reactInternals;
- if (b === void 0)
- throw typeof a3.render == "function" ? Error(p3(188)) : (a3 = Object.keys(a3).join(","), Error(p3(268, a3)));
- return a3 = Zb(b), a3 = a3 === null ? null : a3.stateNode, a3;
- };
- exports.flushSync = function(a3) {
- return Rk(a3);
- };
- exports.hydrate = function(a3, b, c) {
- if (!ol(b)) throw Error(p3(200));
- return rl(null, a3, b, !0, c);
- };
- exports.hydrateRoot = function(a3, b, c) {
- if (!nl(a3)) throw Error(p3(405));
- var d = c != null && c.hydratedSources || null, e = !1, f4 = "", g2 = kl;
- if (c != null && (c.unstable_strictMode === !0 && (e = !0), c.identifierPrefix !== void 0 && (f4 = c.identifierPrefix), c.onRecoverableError !== void 0 && (g2 = c.onRecoverableError)), b = el(b, null, a3, 1, c ?? null, e, !1, f4, g2), a3[uf] = b.current, sf(a3), d) for (a3 = 0; a3 < d.length; a3++) c = d[a3], e = c._getVersion, e = e(c._source), b.mutableSourceEagerHydrationData == null ? b.mutableSourceEagerHydrationData = [c, e] : b.mutableSourceEagerHydrationData.push(
- c,
- e
- );
- return new ml(b);
- };
- exports.render = function(a3, b, c) {
- if (!ol(b)) throw Error(p3(200));
- return rl(null, a3, b, !1, c);
- };
- exports.unmountComponentAtNode = function(a3) {
- if (!ol(a3)) throw Error(p3(40));
- return a3._reactRootContainer ? (Rk(function() {
- rl(null, null, a3, !1, function() {
- a3._reactRootContainer = null, a3[uf] = null;
- });
- }), !0) : !1;
- };
- exports.unstable_batchedUpdates = Qk;
- exports.unstable_renderSubtreeIntoContainer = function(a3, b, c, d) {
- if (!ol(c)) throw Error(p3(200));
- if (a3 == null || a3._reactInternals === void 0) throw Error(p3(38));
- return rl(a3, b, c, !1, d);
- };
- exports.version = "18.3.1-next-f1338f8080-20240426";
- }
- });
-
- // ../../node_modules/react-dom/index.js
- var require_react_dom = __commonJS({
- "../../node_modules/react-dom/index.js"(exports, module2) {
- "use strict";
- function checkDCE() {
- if (!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ > "u" || typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE != "function"))
- try {
- __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE);
- } catch (err) {
- console.error(err);
- }
- }
- checkDCE(), module2.exports = require_react_dom_production_min();
- }
- });
-
- // ../../node_modules/react-dom/client.js
- var require_client = __commonJS({
- "../../node_modules/react-dom/client.js"(exports) {
- "use strict";
- var m3 = require_react_dom();
- exports.createRoot = m3.createRoot, exports.hydrateRoot = m3.hydrateRoot;
- var i;
- }
- });
-
- // ../../node_modules/@storybook/global/dist/index.mjs
- var scope, init_dist = __esm({
- "../../node_modules/@storybook/global/dist/index.mjs"() {
- scope = (() => {
- let win;
- return typeof window < "u" ? win = window : typeof globalThis < "u" ? win = globalThis : typeof global < "u" ? win = global : typeof self < "u" ? win = self : win = {}, win;
- })();
- }
- });
-
- // ../../node_modules/ts-dedent/esm/index.js
- function dedent(templ) {
- for (var values = [], _i = 1; _i < arguments.length; _i++)
- values[_i - 1] = arguments[_i];
- var strings = Array.from(typeof templ == "string" ? [templ] : templ);
- strings[strings.length - 1] = strings[strings.length - 1].replace(/\r?\n([\t ]*)$/, "");
- var indentLengths = strings.reduce(function(arr, str2) {
- var matches4 = str2.match(/\n([\t ]+|(?!\s).)/g);
- return matches4 ? arr.concat(matches4.map(function(match3) {
- var _a4, _b;
- return (_b = (_a4 = match3.match(/[\t ]/g)) === null || _a4 === void 0 ? void 0 : _a4.length) !== null && _b !== void 0 ? _b : 0;
- })) : arr;
- }, []);
- if (indentLengths.length) {
- var pattern_1 = new RegExp(`
- [ ]{` + Math.min.apply(Math, indentLengths) + "}", "g");
- strings = strings.map(function(str2) {
- return str2.replace(pattern_1, `
- `);
- });
- }
- strings[0] = strings[0].replace(/^\r?\n/, "");
- var string = strings[0];
- return values.forEach(function(value, i) {
- var endentations = string.match(/(?:^|\n)( *)$/), endentation = endentations ? endentations[1] : "", indentedValue = value;
- typeof value == "string" && value.includes(`
- `) && (indentedValue = String(value).split(`
- `).map(function(str2, i2) {
- return i2 === 0 ? str2 : "" + endentation + str2;
- }).join(`
- `)), string += indentedValue + strings[i + 1];
- }), string;
- }
- var init_esm = __esm({
- "../../node_modules/ts-dedent/esm/index.js"() {
- }
- });
-
- // src/client-logger/index.ts
- var client_logger_exports = {};
- __export(client_logger_exports, {
- deprecate: () => deprecate,
- logger: () => logger,
- once: () => once,
- pretty: () => pretty
- });
- var LOGLEVEL, levels, currentLogLevelString, currentLogLevelNumber, logger, logged, once, deprecate, pretty, init_client_logger = __esm({
- "src/client-logger/index.ts"() {
- "use strict";
- init_dist();
- ({ LOGLEVEL } = scope), levels = {
- trace: 1,
- debug: 2,
- info: 3,
- warn: 4,
- error: 5,
- silent: 10
- }, currentLogLevelString = LOGLEVEL, currentLogLevelNumber = levels[currentLogLevelString] || levels.info, logger = {
- trace: (message, ...rest) => {
- currentLogLevelNumber <= levels.trace && console.trace(message, ...rest);
- },
- debug: (message, ...rest) => {
- currentLogLevelNumber <= levels.debug && console.debug(message, ...rest);
- },
- info: (message, ...rest) => {
- currentLogLevelNumber <= levels.info && console.info(message, ...rest);
- },
- warn: (message, ...rest) => {
- currentLogLevelNumber <= levels.warn && console.warn(message, ...rest);
- },
- error: (message, ...rest) => {
- currentLogLevelNumber <= levels.error && console.error(message, ...rest);
- },
- log: (message, ...rest) => {
- currentLogLevelNumber < levels.silent && console.log(message, ...rest);
- }
- }, logged = /* @__PURE__ */ new Set(), once = (type5) => (message, ...rest) => {
- if (!logged.has(message))
- return logged.add(message), logger[type5](message, ...rest);
- };
- once.clear = () => logged.clear();
- once.trace = once("trace");
- once.debug = once("debug");
- once.info = once("info");
- once.warn = once("warn");
- once.error = once("error");
- once.log = once("log");
- deprecate = once("warn"), pretty = (type5) => (...args) => {
- let argArray = [];
- if (args.length) {
- let startTagRe = /<span\s+style=(['"])([^'"]*)\1\s*>/gi, endTagRe = /<\/span>/gi, reResultArray;
- for (argArray.push(args[0].replace(startTagRe, "%c").replace(endTagRe, "%c")); reResultArray = startTagRe.exec(args[0]); )
- argArray.push(reResultArray[2]), argArray.push("");
- for (let j = 1; j < args.length; j++)
- argArray.push(args[j]);
- }
- logger[type5].apply(logger, argArray);
- };
- pretty.trace = pretty("trace");
- pretty.debug = pretty("debug");
- pretty.info = pretty("info");
- pretty.warn = pretty("warn");
- pretty.error = pretty("error");
- }
- });
-
- // ../../node_modules/@babel/runtime/helpers/esm/extends.js
- function _extends() {
- return _extends = Object.assign ? Object.assign.bind() : function(n) {
- for (var e = 1; e < arguments.length; e++) {
- var t = arguments[e];
- for (var r2 in t) ({}).hasOwnProperty.call(t, r2) && (n[r2] = t[r2]);
- }
- return n;
- }, _extends.apply(null, arguments);
- }
- var init_extends = __esm({
- "../../node_modules/@babel/runtime/helpers/esm/extends.js"() {
- }
- });
-
- // ../../node_modules/@emotion/sheet/dist/emotion-sheet.esm.js
- function sheetForTag(tag) {
- if (tag.sheet)
- return tag.sheet;
- for (var i = 0; i < document.styleSheets.length; i++)
- if (document.styleSheets[i].ownerNode === tag)
- return document.styleSheets[i];
- }
- function createStyleElement(options) {
- var tag = document.createElement("style");
- return tag.setAttribute("data-emotion", options.key), options.nonce !== void 0 && tag.setAttribute("nonce", options.nonce), tag.appendChild(document.createTextNode("")), tag.setAttribute("data-s", ""), tag;
- }
- var isDevelopment, StyleSheet, init_emotion_sheet_esm = __esm({
- "../../node_modules/@emotion/sheet/dist/emotion-sheet.esm.js"() {
- isDevelopment = !1;
- StyleSheet = (function() {
- function StyleSheet2(options) {
- var _this = this;
- this._insertTag = function(tag) {
- var before;
- _this.tags.length === 0 ? _this.insertionPoint ? before = _this.insertionPoint.nextSibling : _this.prepend ? before = _this.container.firstChild : before = _this.before : before = _this.tags[_this.tags.length - 1].nextSibling, _this.container.insertBefore(tag, before), _this.tags.push(tag);
- }, this.isSpeedy = options.speedy === void 0 ? !isDevelopment : options.speedy, this.tags = [], this.ctr = 0, this.nonce = options.nonce, this.key = options.key, this.container = options.container, this.prepend = options.prepend, this.insertionPoint = options.insertionPoint, this.before = null;
- }
- var _proto = StyleSheet2.prototype;
- return _proto.hydrate = function(nodes) {
- nodes.forEach(this._insertTag);
- }, _proto.insert = function(rule) {
- this.ctr % (this.isSpeedy ? 65e3 : 1) === 0 && this._insertTag(createStyleElement(this));
- var tag = this.tags[this.tags.length - 1];
- if (this.isSpeedy) {
- var sheet = sheetForTag(tag);
- try {
- sheet.insertRule(rule, sheet.cssRules.length);
- } catch {
- }
- } else
- tag.appendChild(document.createTextNode(rule));
- this.ctr++;
- }, _proto.flush = function() {
- this.tags.forEach(function(tag) {
- var _tag$parentNode;
- return (_tag$parentNode = tag.parentNode) == null ? void 0 : _tag$parentNode.removeChild(tag);
- }), this.tags = [], this.ctr = 0;
- }, StyleSheet2;
- })();
- }
- });
-
- // ../../node_modules/stylis/src/Enum.js
- var MS, MOZ, WEBKIT, COMMENT, RULESET, DECLARATION, IMPORT, KEYFRAMES, LAYER, init_Enum = __esm({
- "../../node_modules/stylis/src/Enum.js"() {
- MS = "-ms-", MOZ = "-moz-", WEBKIT = "-webkit-", COMMENT = "comm", RULESET = "rule", DECLARATION = "decl", IMPORT = "@import", KEYFRAMES = "@keyframes", LAYER = "@layer";
- }
- });
-
- // ../../node_modules/stylis/src/Utility.js
- function hash(value, length2) {
- return charat(value, 0) ^ 45 ? (((length2 << 2 ^ charat(value, 0)) << 2 ^ charat(value, 1)) << 2 ^ charat(value, 2)) << 2 ^ charat(value, 3) : 0;
- }
- function trim(value) {
- return value.trim();
- }
- function match(value, pattern) {
- return (value = pattern.exec(value)) ? value[0] : value;
- }
- function replace(value, pattern, replacement) {
- return value.replace(pattern, replacement);
- }
- function indexof(value, search) {
- return value.indexOf(search);
- }
- function charat(value, index4) {
- return value.charCodeAt(index4) | 0;
- }
- function substr(value, begin, end2) {
- return value.slice(begin, end2);
- }
- function strlen(value) {
- return value.length;
- }
- function sizeof(value) {
- return value.length;
- }
- function append(value, array) {
- return array.push(value), value;
- }
- function combine(array, callback) {
- return array.map(callback).join("");
- }
- var abs, from, assign, init_Utility = __esm({
- "../../node_modules/stylis/src/Utility.js"() {
- abs = Math.abs, from = String.fromCharCode, assign = Object.assign;
- }
- });
-
- // ../../node_modules/stylis/src/Tokenizer.js
- function node(value, root2, parent, type5, props, children, length2) {
- return { value, root: root2, parent, type: type5, props, children, line, column, length: length2, return: "" };
- }
- function copy(root2, props) {
- return assign(node("", null, null, "", null, null, 0), root2, { length: -root2.length }, props);
- }
- function char() {
- return character;
- }
- function prev() {
- return character = position > 0 ? charat(characters, --position) : 0, column--, character === 10 && (column = 1, line--), character;
- }
- function next() {
- return character = position < length ? charat(characters, position++) : 0, column++, character === 10 && (column = 1, line++), character;
- }
- function peek() {
- return charat(characters, position);
- }
- function caret() {
- return position;
- }
- function slice(begin, end2) {
- return substr(characters, begin, end2);
- }
- function token(type5) {
- switch (type5) {
- // \0 \t \n \r \s whitespace token
- case 0:
- case 9:
- case 10:
- case 13:
- case 32:
- return 5;
- // ! + , / > @ ~ isolate token
- case 33:
- case 43:
- case 44:
- case 47:
- case 62:
- case 64:
- case 126:
- // ; { } breakpoint token
- case 59:
- case 123:
- case 125:
- return 4;
- // : accompanied token
- case 58:
- return 3;
- // " ' ( [ opening delimit token
- case 34:
- case 39:
- case 40:
- case 91:
- return 2;
- // ) ] closing delimit token
- case 41:
- case 93:
- return 1;
- }
- return 0;
- }
- function alloc(value) {
- return line = column = 1, length = strlen(characters = value), position = 0, [];
- }
- function dealloc(value) {
- return characters = "", value;
- }
- function delimit(type5) {
- return trim(slice(position - 1, delimiter(type5 === 91 ? type5 + 2 : type5 === 40 ? type5 + 1 : type5)));
- }
- function whitespace(type5) {
- for (; (character = peek()) && character < 33; )
- next();
- return token(type5) > 2 || token(character) > 3 ? "" : " ";
- }
- function escaping(index4, count) {
- for (; --count && next() && !(character < 48 || character > 102 || character > 57 && character < 65 || character > 70 && character < 97); )
- ;
- return slice(index4, caret() + (count < 6 && peek() == 32 && next() == 32));
- }
- function delimiter(type5) {
- for (; next(); )
- switch (character) {
- // ] ) " '
- case type5:
- return position;
- // " '
- case 34:
- case 39:
- type5 !== 34 && type5 !== 39 && delimiter(character);
- break;
- // (
- case 40:
- type5 === 41 && delimiter(type5);
- break;
- // \
- case 92:
- next();
- break;
- }
- return position;
- }
- function commenter(type5, index4) {
- for (; next() && type5 + character !== 57; )
- if (type5 + character === 84 && peek() === 47)
- break;
- return "/*" + slice(index4, position - 1) + "*" + from(type5 === 47 ? type5 : next());
- }
- function identifier(index4) {
- for (; !token(peek()); )
- next();
- return slice(index4, position);
- }
- var line, column, length, position, character, characters, init_Tokenizer = __esm({
- "../../node_modules/stylis/src/Tokenizer.js"() {
- init_Utility();
- line = 1, column = 1, length = 0, position = 0, character = 0, characters = "";
- }
- });
-
- // ../../node_modules/stylis/src/Parser.js
- function compile(value) {
- return dealloc(parse2("", null, null, null, [""], value = alloc(value), 0, [0], value));
- }
- function parse2(value, root2, parent, rule, rules, rulesets, pseudo, points, declarations) {
- for (var index4 = 0, offset3 = 0, length2 = pseudo, atrule = 0, property = 0, previous = 0, variable = 1, scanning = 1, ampersand = 1, character2 = 0, type5 = "", props = rules, children = rulesets, reference2 = rule, characters2 = type5; scanning; )
- switch (previous = character2, character2 = next()) {
- // (
- case 40:
- if (previous != 108 && charat(characters2, length2 - 1) == 58) {
- indexof(characters2 += replace(delimit(character2), "&", "&\f"), "&\f") != -1 && (ampersand = -1);
- break;
- }
- // " ' [
- case 34:
- case 39:
- case 91:
- characters2 += delimit(character2);
- break;
- // \t \n \r \s
- case 9:
- case 10:
- case 13:
- case 32:
- characters2 += whitespace(previous);
- break;
- // \
- case 92:
- characters2 += escaping(caret() - 1, 7);
- continue;
- // /
- case 47:
- switch (peek()) {
- case 42:
- case 47:
- append(comment(commenter(next(), caret()), root2, parent), declarations);
- break;
- default:
- characters2 += "/";
- }
- break;
- // {
- case 123 * variable:
- points[index4++] = strlen(characters2) * ampersand;
- // } ; \0
- case 125 * variable:
- case 59:
- case 0:
- switch (character2) {
- // \0 }
- case 0:
- case 125:
- scanning = 0;
- // ;
- case 59 + offset3:
- ampersand == -1 && (characters2 = replace(characters2, /\f/g, "")), property > 0 && strlen(characters2) - length2 && append(property > 32 ? declaration(characters2 + ";", rule, parent, length2 - 1) : declaration(replace(characters2, " ", "") + ";", rule, parent, length2 - 2), declarations);
- break;
- // @ ;
- case 59:
- characters2 += ";";
- // { rule/at-rule
- default:
- if (append(reference2 = ruleset(characters2, root2, parent, index4, offset3, rules, points, type5, props = [], children = [], length2), rulesets), character2 === 123)
- if (offset3 === 0)
- parse2(characters2, root2, reference2, reference2, props, rulesets, length2, points, children);
- else
- switch (atrule === 99 && charat(characters2, 3) === 110 ? 100 : atrule) {
- // d l m s
- case 100:
- case 108:
- case 109:
- case 115:
- parse2(value, reference2, reference2, rule && append(ruleset(value, reference2, reference2, 0, 0, rules, points, type5, rules, props = [], length2), children), rules, children, length2, points, rule ? props : children);
- break;
- default:
- parse2(characters2, reference2, reference2, reference2, [""], children, 0, points, children);
- }
- }
- index4 = offset3 = property = 0, variable = ampersand = 1, type5 = characters2 = "", length2 = pseudo;
- break;
- // :
- case 58:
- length2 = 1 + strlen(characters2), property = previous;
- default:
- if (variable < 1) {
- if (character2 == 123)
- --variable;
- else if (character2 == 125 && variable++ == 0 && prev() == 125)
- continue;
- }
- switch (characters2 += from(character2), character2 * variable) {
- // &
- case 38:
- ampersand = offset3 > 0 ? 1 : (characters2 += "\f", -1);
- break;
- // ,
- case 44:
- points[index4++] = (strlen(characters2) - 1) * ampersand, ampersand = 1;
- break;
- // @
- case 64:
- peek() === 45 && (characters2 += delimit(next())), atrule = peek(), offset3 = length2 = strlen(type5 = characters2 += identifier(caret())), character2++;
- break;
- // -
- case 45:
- previous === 45 && strlen(characters2) == 2 && (variable = 0);
- }
- }
- return rulesets;
- }
- function ruleset(value, root2, parent, index4, offset3, rules, points, type5, props, children, length2) {
- for (var post = offset3 - 1, rule = offset3 === 0 ? rules : [""], size = sizeof(rule), i = 0, j = 0, k = 0; i < index4; ++i)
- for (var x = 0, y = substr(value, post + 1, post = abs(j = points[i])), z = value; x < size; ++x)
- (z = trim(j > 0 ? rule[x] + " " + y : replace(y, /&\f/g, rule[x]))) && (props[k++] = z);
- return node(value, root2, parent, offset3 === 0 ? RULESET : type5, props, children, length2);
- }
- function comment(value, root2, parent) {
- return node(value, root2, parent, COMMENT, from(char()), substr(value, 2, -2), 0);
- }
- function declaration(value, root2, parent, length2) {
- return node(value, root2, parent, DECLARATION, substr(value, 0, length2), substr(value, length2 + 1, -1), length2);
- }
- var init_Parser = __esm({
- "../../node_modules/stylis/src/Parser.js"() {
- init_Enum();
- init_Utility();
- init_Tokenizer();
- }
- });
-
- // ../../node_modules/stylis/src/Prefixer.js
- var init_Prefixer = __esm({
- "../../node_modules/stylis/src/Prefixer.js"() {
- init_Enum();
- init_Utility();
- }
- });
-
- // ../../node_modules/stylis/src/Serializer.js
- function serialize(children, callback) {
- for (var output = "", length2 = sizeof(children), i = 0; i < length2; i++)
- output += callback(children[i], i, children, callback) || "";
- return output;
- }
- function stringify2(element, index4, children, callback) {
- switch (element.type) {
- case LAYER:
- if (element.children.length) break;
- case IMPORT:
- case DECLARATION:
- return element.return = element.return || element.value;
- case COMMENT:
- return "";
- case KEYFRAMES:
- return element.return = element.value + "{" + serialize(element.children, callback) + "}";
- case RULESET:
- element.value = element.props.join(",");
- }
- return strlen(children = serialize(element.children, callback)) ? element.return = element.value + "{" + children + "}" : "";
- }
- var init_Serializer = __esm({
- "../../node_modules/stylis/src/Serializer.js"() {
- init_Enum();
- init_Utility();
- }
- });
-
- // ../../node_modules/stylis/src/Middleware.js
- function middleware(collection) {
- var length2 = sizeof(collection);
- return function(element, index4, children, callback) {
- for (var output = "", i = 0; i < length2; i++)
- output += collection[i](element, index4, children, callback) || "";
- return output;
- };
- }
- function rulesheet(callback) {
- return function(element) {
- element.root || (element = element.return) && callback(element);
- };
- }
- var init_Middleware = __esm({
- "../../node_modules/stylis/src/Middleware.js"() {
- init_Enum();
- init_Utility();
- init_Tokenizer();
- init_Serializer();
- init_Prefixer();
- }
- });
-
- // ../../node_modules/stylis/index.js
- var init_stylis = __esm({
- "../../node_modules/stylis/index.js"() {
- init_Enum();
- init_Utility();
- init_Parser();
- init_Prefixer();
- init_Tokenizer();
- init_Serializer();
- init_Middleware();
- }
- });
-
- // ../../node_modules/@emotion/weak-memoize/dist/emotion-weak-memoize.esm.js
- var weakMemoize, init_emotion_weak_memoize_esm = __esm({
- "../../node_modules/@emotion/weak-memoize/dist/emotion-weak-memoize.esm.js"() {
- weakMemoize = function(func) {
- var cache = /* @__PURE__ */ new WeakMap();
- return function(arg) {
- if (cache.has(arg))
- return cache.get(arg);
- var ret = func(arg);
- return cache.set(arg, ret), ret;
- };
- };
- }
- });
-
- // ../../node_modules/@emotion/memoize/dist/emotion-memoize.esm.js
- function memoize2(fn4) {
- var cache = /* @__PURE__ */ Object.create(null);
- return function(arg) {
- return cache[arg] === void 0 && (cache[arg] = fn4(arg)), cache[arg];
- };
- }
- var init_emotion_memoize_esm = __esm({
- "../../node_modules/@emotion/memoize/dist/emotion-memoize.esm.js"() {
- }
- });
-
- // ../../node_modules/@emotion/cache/dist/emotion-cache.browser.esm.js
- function prefix3(value, length2) {
- switch (hash(value, length2)) {
- // color-adjust
- case 5103:
- return WEBKIT + "print-" + value + value;
- // animation, animation-(delay|direction|duration|fill-mode|iteration-count|name|play-state|timing-function)
- case 5737:
- case 4201:
- case 3177:
- case 3433:
- case 1641:
- case 4457:
- case 2921:
- // text-decoration, filter, clip-path, backface-visibility, column, box-decoration-break
- case 5572:
- case 6356:
- case 5844:
- case 3191:
- case 6645:
- case 3005:
- // mask, mask-image, mask-(mode|clip|size), mask-(repeat|origin), mask-position, mask-composite,
- case 6391:
- case 5879:
- case 5623:
- case 6135:
- case 4599:
- case 4855:
- // background-clip, columns, column-(count|fill|gap|rule|rule-color|rule-style|rule-width|span|width)
- case 4215:
- case 6389:
- case 5109:
- case 5365:
- case 5621:
- case 3829:
- return WEBKIT + value + value;
- // appearance, user-select, transform, hyphens, text-size-adjust
- case 5349:
- case 4246:
- case 4810:
- case 6968:
- case 2756:
- return WEBKIT + value + MOZ + value + MS + value + value;
- // flex, flex-direction
- case 6828:
- case 4268:
- return WEBKIT + value + MS + value + value;
- // order
- case 6165:
- return WEBKIT + value + MS + "flex-" + value + value;
- // align-items
- case 5187:
- return WEBKIT + value + replace(value, /(\w+).+(:[^]+)/, WEBKIT + "box-$1$2" + MS + "flex-$1$2") + value;
- // align-self
- case 5443:
- return WEBKIT + value + MS + "flex-item-" + replace(value, /flex-|-self/, "") + value;
- // align-content
- case 4675:
- return WEBKIT + value + MS + "flex-line-pack" + replace(value, /align-content|flex-|-self/, "") + value;
- // flex-shrink
- case 5548:
- return WEBKIT + value + MS + replace(value, "shrink", "negative") + value;
- // flex-basis
- case 5292:
- return WEBKIT + value + MS + replace(value, "basis", "preferred-size") + value;
- // flex-grow
- case 6060:
- return WEBKIT + "box-" + replace(value, "-grow", "") + WEBKIT + value + MS + replace(value, "grow", "positive") + value;
- // transition
- case 4554:
- return WEBKIT + replace(value, /([^-])(transform)/g, "$1" + WEBKIT + "$2") + value;
- // cursor
- case 6187:
- return replace(replace(replace(value, /(zoom-|grab)/, WEBKIT + "$1"), /(image-set)/, WEBKIT + "$1"), value, "") + value;
- // background, background-image
- case 5495:
- case 3959:
- return replace(value, /(image-set\([^]*)/, WEBKIT + "$1$`$1");
- // justify-content
- case 4968:
- return replace(replace(value, /(.+:)(flex-)?(.*)/, WEBKIT + "box-pack:$3" + MS + "flex-pack:$3"), /s.+-b[^;]+/, "justify") + WEBKIT + value + value;
- // (margin|padding)-inline-(start|end)
- case 4095:
- case 3583:
- case 4068:
- case 2532:
- return replace(value, /(.+)-inline(.+)/, WEBKIT + "$1$2") + value;
- // (min|max)?(width|height|inline-size|block-size)
- case 8116:
- case 7059:
- case 5753:
- case 5535:
- case 5445:
- case 5701:
- case 4933:
- case 4677:
- case 5533:
- case 5789:
- case 5021:
- case 4765:
- if (strlen(value) - 1 - length2 > 6) switch (charat(value, length2 + 1)) {
- // (m)ax-content, (m)in-content
- case 109:
- if (charat(value, length2 + 4) !== 45) break;
- // (f)ill-available, (f)it-content
- case 102:
- return replace(value, /(.+:)(.+)-([^]+)/, "$1" + WEBKIT + "$2-$3$1" + MOZ + (charat(value, length2 + 3) == 108 ? "$3" : "$2-$3")) + value;
- // (s)tretch
- case 115:
- return ~indexof(value, "stretch") ? prefix3(replace(value, "stretch", "fill-available"), length2) + value : value;
- }
- break;
- // position: sticky
- case 4949:
- if (charat(value, length2 + 1) !== 115) break;
- // display: (flex|inline-flex)
- case 6444:
- switch (charat(value, strlen(value) - 3 - (~indexof(value, "!important") && 10))) {
- // stic(k)y
- case 107:
- return replace(value, ":", ":" + WEBKIT) + value;
- // (inline-)?fl(e)x
- case 101:
- return replace(value, /(.+:)([^;!]+)(;|!.+)?/, "$1" + WEBKIT + (charat(value, 14) === 45 ? "inline-" : "") + "box$3$1" + WEBKIT + "$2$3$1" + MS + "$2box$3") + value;
- }
- break;
- // writing-mode
- case 5936:
- switch (charat(value, length2 + 11)) {
- // vertical-l(r)
- case 114:
- return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, "tb") + value;
- // vertical-r(l)
- case 108:
- return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, "tb-rl") + value;
- // horizontal(-)tb
- case 45:
- return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, "lr") + value;
- }
- return WEBKIT + value + MS + value + value;
- }
- return value;
- }
- var identifierWithPointTracking, toRules, getRules, fixedElements, compat, removeLabel, prefixer, defaultStylisPlugins, createCache, init_emotion_cache_browser_esm = __esm({
- "../../node_modules/@emotion/cache/dist/emotion-cache.browser.esm.js"() {
- init_emotion_sheet_esm();
- init_stylis();
- init_emotion_weak_memoize_esm();
- init_emotion_memoize_esm();
- identifierWithPointTracking = function(begin, points, index4) {
- for (var previous = 0, character2 = 0; previous = character2, character2 = peek(), previous === 38 && character2 === 12 && (points[index4] = 1), !token(character2); )
- next();
- return slice(begin, position);
- }, toRules = function(parsed, points) {
- var index4 = -1, character2 = 44;
- do
- switch (token(character2)) {
- case 0:
- character2 === 38 && peek() === 12 && (points[index4] = 1), parsed[index4] += identifierWithPointTracking(position - 1, points, index4);
- break;
- case 2:
- parsed[index4] += delimit(character2);
- break;
- case 4:
- if (character2 === 44) {
- parsed[++index4] = peek() === 58 ? "&\f" : "", points[index4] = parsed[index4].length;
- break;
- }
- // fallthrough
- default:
- parsed[index4] += from(character2);
- }
- while (character2 = next());
- return parsed;
- }, getRules = function(value, points) {
- return dealloc(toRules(alloc(value), points));
- }, fixedElements = /* @__PURE__ */ new WeakMap(), compat = function(element) {
- if (!(element.type !== "rule" || !element.parent || // positive .length indicates that this rule contains pseudo
- // negative .length indicates that this rule has been already prefixed
- element.length < 1)) {
- for (var value = element.value, parent = element.parent, isImplicitRule = element.column === parent.column && element.line === parent.line; parent.type !== "rule"; )
- if (parent = parent.parent, !parent) return;
- if (!(element.props.length === 1 && value.charCodeAt(0) !== 58 && !fixedElements.get(parent)) && !isImplicitRule) {
- fixedElements.set(element, !0);
- for (var points = [], rules = getRules(value, points), parentRules = parent.props, i = 0, k = 0; i < rules.length; i++)
- for (var j = 0; j < parentRules.length; j++, k++)
- element.props[k] = points[i] ? rules[i].replace(/&\f/g, parentRules[j]) : parentRules[j] + " " + rules[i];
- }
- }
- }, removeLabel = function(element) {
- if (element.type === "decl") {
- var value = element.value;
- // charcode for l
- value.charCodeAt(0) === 108 && // charcode for b
- value.charCodeAt(2) === 98 && (element.return = "", element.value = "");
- }
- };
- prefixer = function(element, index4, children, callback) {
- if (element.length > -1 && !element.return) switch (element.type) {
- case DECLARATION:
- element.return = prefix3(element.value, element.length);
- break;
- case KEYFRAMES:
- return serialize([copy(element, {
- value: replace(element.value, "@", "@" + WEBKIT)
- })], callback);
- case RULESET:
- if (element.length) return combine(element.props, function(value) {
- switch (match(value, /(::plac\w+|:read-\w+)/)) {
- // :read-(only|write)
- case ":read-only":
- case ":read-write":
- return serialize([copy(element, {
- props: [replace(value, /:(read-\w+)/, ":" + MOZ + "$1")]
- })], callback);
- // :placeholder
- case "::placeholder":
- return serialize([copy(element, {
- props: [replace(value, /:(plac\w+)/, ":" + WEBKIT + "input-$1")]
- }), copy(element, {
- props: [replace(value, /:(plac\w+)/, ":" + MOZ + "$1")]
- }), copy(element, {
- props: [replace(value, /:(plac\w+)/, MS + "input-$1")]
- })], callback);
- }
- return "";
- });
- }
- }, defaultStylisPlugins = [prefixer], createCache = function(options) {
- var key = options.key;
- if (key === "css") {
- var ssrStyles = document.querySelectorAll("style[data-emotion]:not([data-s])");
- Array.prototype.forEach.call(ssrStyles, function(node2) {
- var dataEmotionAttribute = node2.getAttribute("data-emotion");
- dataEmotionAttribute.indexOf(" ") !== -1 && (document.head.appendChild(node2), node2.setAttribute("data-s", ""));
- });
- }
- var stylisPlugins = options.stylisPlugins || defaultStylisPlugins, inserted = {}, container, nodesToHydrate = [];
- container = options.container || document.head, Array.prototype.forEach.call(
- // this means we will ignore elements which don't have a space in them which
- // means that the style elements we're looking at are only Emotion 11 server-rendered style elements
- document.querySelectorAll('style[data-emotion^="' + key + ' "]'),
- function(node2) {
- for (var attrib = node2.getAttribute("data-emotion").split(" "), i = 1; i < attrib.length; i++)
- inserted[attrib[i]] = !0;
- nodesToHydrate.push(node2);
- }
- );
- var _insert, omnipresentPlugins = [compat, removeLabel];
- {
- var currentSheet, finalizingPlugins = [stringify2, rulesheet(function(rule) {
- currentSheet.insert(rule);
- })], serializer = middleware(omnipresentPlugins.concat(stylisPlugins, finalizingPlugins)), stylis = function(styles4) {
- return serialize(compile(styles4), serializer);
- };
- _insert = function(selector, serialized, sheet, shouldCache) {
- currentSheet = sheet, stylis(selector ? selector + "{" + serialized.styles + "}" : serialized.styles), shouldCache && (cache.inserted[serialized.name] = !0);
- };
- }
- var cache = {
- key,
- sheet: new StyleSheet({
- key,
- container,
- nonce: options.nonce,
- speedy: options.speedy,
- prepend: options.prepend,
- insertionPoint: options.insertionPoint
- }),
- nonce: options.nonce,
- inserted,
- registered: {},
- insert: _insert
- };
- return cache.sheet.hydrate(nodesToHydrate), cache;
- };
- }
- });
-
- // ../../node_modules/react-is/cjs/react-is.production.min.js
- var require_react_is_production_min = __commonJS({
- "../../node_modules/react-is/cjs/react-is.production.min.js"(exports) {
- "use strict";
- var b = typeof Symbol == "function" && Symbol.for, c = b ? Symbol.for("react.element") : 60103, d = b ? Symbol.for("react.portal") : 60106, e = b ? Symbol.for("react.fragment") : 60107, f4 = b ? Symbol.for("react.strict_mode") : 60108, g2 = b ? Symbol.for("react.profiler") : 60114, h3 = b ? Symbol.for("react.provider") : 60109, k = b ? Symbol.for("react.context") : 60110, l = b ? Symbol.for("react.async_mode") : 60111, m3 = b ? Symbol.for("react.concurrent_mode") : 60111, n = b ? Symbol.for("react.forward_ref") : 60112, p3 = b ? Symbol.for("react.suspense") : 60113, q = b ? Symbol.for("react.suspense_list") : 60120, r2 = b ? Symbol.for("react.memo") : 60115, t = b ? Symbol.for("react.lazy") : 60116, v = b ? Symbol.for("react.block") : 60121, w = b ? Symbol.for("react.fundamental") : 60117, x = b ? Symbol.for("react.responder") : 60118, y = b ? Symbol.for("react.scope") : 60119;
- function z(a3) {
- if (typeof a3 == "object" && a3 !== null) {
- var u2 = a3.$$typeof;
- switch (u2) {
- case c:
- switch (a3 = a3.type, a3) {
- case l:
- case m3:
- case e:
- case g2:
- case f4:
- case p3:
- return a3;
- default:
- switch (a3 = a3 && a3.$$typeof, a3) {
- case k:
- case n:
- case t:
- case r2:
- case h3:
- return a3;
- default:
- return u2;
- }
- }
- case d:
- return u2;
- }
- }
- }
- function A3(a3) {
- return z(a3) === m3;
- }
- exports.AsyncMode = l;
- exports.ConcurrentMode = m3;
- exports.ContextConsumer = k;
- exports.ContextProvider = h3;
- exports.Element = c;
- exports.ForwardRef = n;
- exports.Fragment = e;
- exports.Lazy = t;
- exports.Memo = r2;
- exports.Portal = d;
- exports.Profiler = g2;
- exports.StrictMode = f4;
- exports.Suspense = p3;
- exports.isAsyncMode = function(a3) {
- return A3(a3) || z(a3) === l;
- };
- exports.isConcurrentMode = A3;
- exports.isContextConsumer = function(a3) {
- return z(a3) === k;
- };
- exports.isContextProvider = function(a3) {
- return z(a3) === h3;
- };
- exports.isElement = function(a3) {
- return typeof a3 == "object" && a3 !== null && a3.$$typeof === c;
- };
- exports.isForwardRef = function(a3) {
- return z(a3) === n;
- };
- exports.isFragment = function(a3) {
- return z(a3) === e;
- };
- exports.isLazy = function(a3) {
- return z(a3) === t;
- };
- exports.isMemo = function(a3) {
- return z(a3) === r2;
- };
- exports.isPortal = function(a3) {
- return z(a3) === d;
- };
- exports.isProfiler = function(a3) {
- return z(a3) === g2;
- };
- exports.isStrictMode = function(a3) {
- return z(a3) === f4;
- };
- exports.isSuspense = function(a3) {
- return z(a3) === p3;
- };
- exports.isValidElementType = function(a3) {
- return typeof a3 == "string" || typeof a3 == "function" || a3 === e || a3 === m3 || a3 === g2 || a3 === f4 || a3 === p3 || a3 === q || typeof a3 == "object" && a3 !== null && (a3.$$typeof === t || a3.$$typeof === r2 || a3.$$typeof === h3 || a3.$$typeof === k || a3.$$typeof === n || a3.$$typeof === w || a3.$$typeof === x || a3.$$typeof === y || a3.$$typeof === v);
- };
- exports.typeOf = z;
- }
- });
-
- // ../../node_modules/react-is/index.js
- var require_react_is = __commonJS({
- "../../node_modules/react-is/index.js"(exports, module2) {
- "use strict";
- module2.exports = require_react_is_production_min();
- }
- });
-
- // ../../node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js
- var require_hoist_non_react_statics_cjs = __commonJS({
- "../../node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js"(exports, module2) {
- "use strict";
- var reactIs2 = require_react_is(), REACT_STATICS = {
- childContextTypes: !0,
- contextType: !0,
- contextTypes: !0,
- defaultProps: !0,
- displayName: !0,
- getDefaultProps: !0,
- getDerivedStateFromError: !0,
- getDerivedStateFromProps: !0,
- mixins: !0,
- propTypes: !0,
- type: !0
- }, KNOWN_STATICS = {
- name: !0,
- length: !0,
- prototype: !0,
- caller: !0,
- callee: !0,
- arguments: !0,
- arity: !0
- }, FORWARD_REF_STATICS = {
- $$typeof: !0,
- render: !0,
- defaultProps: !0,
- displayName: !0,
- propTypes: !0
- }, MEMO_STATICS = {
- $$typeof: !0,
- compare: !0,
- defaultProps: !0,
- displayName: !0,
- propTypes: !0,
- type: !0
- }, TYPE_STATICS = {};
- TYPE_STATICS[reactIs2.ForwardRef] = FORWARD_REF_STATICS;
- TYPE_STATICS[reactIs2.Memo] = MEMO_STATICS;
- function getStatics(component) {
- return reactIs2.isMemo(component) ? MEMO_STATICS : TYPE_STATICS[component.$$typeof] || REACT_STATICS;
- }
- var defineProperty = Object.defineProperty, getOwnPropertyNames = Object.getOwnPropertyNames, getOwnPropertySymbols = Object.getOwnPropertySymbols, getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor, getPrototypeOf = Object.getPrototypeOf, objectPrototype = Object.prototype;
- function hoistNonReactStatics2(targetComponent, sourceComponent, blacklist) {
- if (typeof sourceComponent != "string") {
- if (objectPrototype) {
- var inheritedComponent = getPrototypeOf(sourceComponent);
- inheritedComponent && inheritedComponent !== objectPrototype && hoistNonReactStatics2(targetComponent, inheritedComponent, blacklist);
- }
- var keys3 = getOwnPropertyNames(sourceComponent);
- getOwnPropertySymbols && (keys3 = keys3.concat(getOwnPropertySymbols(sourceComponent)));
- for (var targetStatics = getStatics(targetComponent), sourceStatics = getStatics(sourceComponent), i = 0; i < keys3.length; ++i) {
- var key = keys3[i];
- if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {
- var descriptor = getOwnPropertyDescriptor(sourceComponent, key);
- try {
- defineProperty(targetComponent, key, descriptor);
- } catch {
- }
- }
- }
- }
- return targetComponent;
- }
- module2.exports = hoistNonReactStatics2;
- }
- });
-
- // ../../node_modules/@emotion/react/_isolated-hnrs/dist/emotion-react-_isolated-hnrs.browser.esm.js
- var import_hoist_non_react_statics, hoistNonReactStatics, init_emotion_react_isolated_hnrs_browser_esm = __esm({
- "../../node_modules/@emotion/react/_isolated-hnrs/dist/emotion-react-_isolated-hnrs.browser.esm.js"() {
- import_hoist_non_react_statics = __toESM(require_hoist_non_react_statics_cjs()), hoistNonReactStatics = (function(targetComponent, sourceComponent) {
- return (0, import_hoist_non_react_statics.default)(targetComponent, sourceComponent);
- });
- }
- });
-
- // ../../node_modules/@emotion/utils/dist/emotion-utils.browser.esm.js
- function getRegisteredStyles(registered, registeredStyles, classNames) {
- var rawClassName = "";
- return classNames.split(" ").forEach(function(className) {
- registered[className] !== void 0 ? registeredStyles.push(registered[className] + ";") : className && (rawClassName += className + " ");
- }), rawClassName;
- }
- var isBrowser, registerStyles, insertStyles, init_emotion_utils_browser_esm = __esm({
- "../../node_modules/@emotion/utils/dist/emotion-utils.browser.esm.js"() {
- isBrowser = !0;
- registerStyles = function(cache, serialized, isStringTag) {
- var className = cache.key + "-" + serialized.name;
- // we only need to add the styles to the registered cache if the
- // class name could be used further down
- // the tree but if it's a string tag, we know it won't
- // so we don't have to add it to registered cache.
- // this improves memory usage since we can avoid storing the whole style string
- (isStringTag === !1 || // we need to always store it if we're in compat mode and
- // in node since emotion-server relies on whether a style is in
- // the registered cache to know whether a style is global or not
- // also, note that this check will be dead code eliminated in the browser
- isBrowser === !1) && cache.registered[className] === void 0 && (cache.registered[className] = serialized.styles);
- }, insertStyles = function(cache, serialized, isStringTag) {
- registerStyles(cache, serialized, isStringTag);
- var className = cache.key + "-" + serialized.name;
- if (cache.inserted[serialized.name] === void 0) {
- var current = serialized;
- do
- cache.insert(serialized === current ? "." + className : "", current, cache.sheet, !0), current = current.next;
- while (current !== void 0);
- }
- };
- }
- });
-
- // ../../node_modules/@emotion/hash/dist/emotion-hash.esm.js
- function murmur2(str2) {
- for (var h3 = 0, k, i = 0, len = str2.length; len >= 4; ++i, len -= 4)
- k = str2.charCodeAt(i) & 255 | (str2.charCodeAt(++i) & 255) << 8 | (str2.charCodeAt(++i) & 255) << 16 | (str2.charCodeAt(++i) & 255) << 24, k = /* Math.imul(k, m): */
- (k & 65535) * 1540483477 + ((k >>> 16) * 59797 << 16), k ^= /* k >>> r: */
- k >>> 24, h3 = /* Math.imul(k, m): */
- (k & 65535) * 1540483477 + ((k >>> 16) * 59797 << 16) ^ /* Math.imul(h, m): */
- (h3 & 65535) * 1540483477 + ((h3 >>> 16) * 59797 << 16);
- switch (len) {
- case 3:
- h3 ^= (str2.charCodeAt(i + 2) & 255) << 16;
- case 2:
- h3 ^= (str2.charCodeAt(i + 1) & 255) << 8;
- case 1:
- h3 ^= str2.charCodeAt(i) & 255, h3 = /* Math.imul(h, m): */
- (h3 & 65535) * 1540483477 + ((h3 >>> 16) * 59797 << 16);
- }
- return h3 ^= h3 >>> 13, h3 = /* Math.imul(h, m): */
- (h3 & 65535) * 1540483477 + ((h3 >>> 16) * 59797 << 16), ((h3 ^ h3 >>> 15) >>> 0).toString(36);
- }
- var init_emotion_hash_esm = __esm({
- "../../node_modules/@emotion/hash/dist/emotion-hash.esm.js"() {
- }
- });
-
- // ../../node_modules/@emotion/unitless/dist/emotion-unitless.esm.js
- var unitlessKeys, init_emotion_unitless_esm = __esm({
- "../../node_modules/@emotion/unitless/dist/emotion-unitless.esm.js"() {
- unitlessKeys = {
- animationIterationCount: 1,
- aspectRatio: 1,
- borderImageOutset: 1,
- borderImageSlice: 1,
- borderImageWidth: 1,
- boxFlex: 1,
- boxFlexGroup: 1,
- boxOrdinalGroup: 1,
- columnCount: 1,
- columns: 1,
- flex: 1,
- flexGrow: 1,
- flexPositive: 1,
- flexShrink: 1,
- flexNegative: 1,
- flexOrder: 1,
- gridRow: 1,
- gridRowEnd: 1,
- gridRowSpan: 1,
- gridRowStart: 1,
- gridColumn: 1,
- gridColumnEnd: 1,
- gridColumnSpan: 1,
- gridColumnStart: 1,
- msGridRow: 1,
- msGridRowSpan: 1,
- msGridColumn: 1,
- msGridColumnSpan: 1,
- fontWeight: 1,
- lineHeight: 1,
- opacity: 1,
- order: 1,
- orphans: 1,
- scale: 1,
- tabSize: 1,
- widows: 1,
- zIndex: 1,
- zoom: 1,
- WebkitLineClamp: 1,
- // SVG-related properties
- fillOpacity: 1,
- floodOpacity: 1,
- stopOpacity: 1,
- strokeDasharray: 1,
- strokeDashoffset: 1,
- strokeMiterlimit: 1,
- strokeOpacity: 1,
- strokeWidth: 1
- };
- }
- });
-
- // ../../node_modules/@emotion/serialize/dist/emotion-serialize.esm.js
- function handleInterpolation(mergedProps, registered, interpolation) {
- if (interpolation == null)
- return "";
- var componentSelector = interpolation;
- if (componentSelector.__emotion_styles !== void 0)
- return componentSelector;
- switch (typeof interpolation) {
- case "boolean":
- return "";
- case "object": {
- var keyframes2 = interpolation;
- if (keyframes2.anim === 1)
- return cursor = {
- name: keyframes2.name,
- styles: keyframes2.styles,
- next: cursor
- }, keyframes2.name;
- var serializedStyles = interpolation;
- if (serializedStyles.styles !== void 0) {
- var next2 = serializedStyles.next;
- if (next2 !== void 0)
- for (; next2 !== void 0; )
- cursor = {
- name: next2.name,
- styles: next2.styles,
- next: cursor
- }, next2 = next2.next;
- var styles4 = serializedStyles.styles + ";";
- return styles4;
- }
- return createStringFromObject(mergedProps, registered, interpolation);
- }
- case "function": {
- if (mergedProps !== void 0) {
- var previousCursor = cursor, result = interpolation(mergedProps);
- return cursor = previousCursor, handleInterpolation(mergedProps, registered, result);
- }
- break;
- }
- }
- var asString = interpolation;
- if (registered == null)
- return asString;
- var cached = registered[asString];
- return cached !== void 0 ? cached : asString;
- }
- function createStringFromObject(mergedProps, registered, obj) {
- var string = "";
- if (Array.isArray(obj))
- for (var i = 0; i < obj.length; i++)
- string += handleInterpolation(mergedProps, registered, obj[i]) + ";";
- else
- for (var key in obj) {
- var value = obj[key];
- if (typeof value != "object") {
- var asString = value;
- registered != null && registered[asString] !== void 0 ? string += key + "{" + registered[asString] + "}" : isProcessableValue(asString) && (string += processStyleName(key) + ":" + processStyleValue(key, asString) + ";");
- } else {
- if (key === "NO_COMPONENT_SELECTOR" && isDevelopment2)
- throw new Error(noComponentSelectorMessage);
- if (Array.isArray(value) && typeof value[0] == "string" && (registered == null || registered[value[0]] === void 0))
- for (var _i = 0; _i < value.length; _i++)
- isProcessableValue(value[_i]) && (string += processStyleName(key) + ":" + processStyleValue(key, value[_i]) + ";");
- else {
- var interpolated = handleInterpolation(mergedProps, registered, value);
- switch (key) {
- case "animation":
- case "animationName": {
- string += processStyleName(key) + ":" + interpolated + ";";
- break;
- }
- default:
- string += key + "{" + interpolated + "}";
- }
- }
- }
- }
- return string;
- }
- function serializeStyles(args, registered, mergedProps) {
- if (args.length === 1 && typeof args[0] == "object" && args[0] !== null && args[0].styles !== void 0)
- return args[0];
- var stringMode = !0, styles4 = "";
- cursor = void 0;
- var strings = args[0];
- if (strings == null || strings.raw === void 0)
- stringMode = !1, styles4 += handleInterpolation(mergedProps, registered, strings);
- else {
- var asTemplateStringsArr = strings;
- styles4 += asTemplateStringsArr[0];
- }
- for (var i = 1; i < args.length; i++)
- if (styles4 += handleInterpolation(mergedProps, registered, args[i]), stringMode) {
- var templateStringsArr = strings;
- styles4 += templateStringsArr[i];
- }
- labelPattern.lastIndex = 0;
- for (var identifierName = "", match3; (match3 = labelPattern.exec(styles4)) !== null; )
- identifierName += "-" + match3[1];
- var name = murmur2(styles4) + identifierName;
- return {
- name,
- styles: styles4,
- next: cursor
- };
- }
- var isDevelopment2, hyphenateRegex, animationRegex, isCustomProperty, isProcessableValue, processStyleName, processStyleValue, noComponentSelectorMessage, labelPattern, cursor, init_emotion_serialize_esm = __esm({
- "../../node_modules/@emotion/serialize/dist/emotion-serialize.esm.js"() {
- init_emotion_hash_esm();
- init_emotion_unitless_esm();
- init_emotion_memoize_esm();
- isDevelopment2 = !1, hyphenateRegex = /[A-Z]|^ms/g, animationRegex = /_EMO_([^_]+?)_([^]*?)_EMO_/g, isCustomProperty = function(property) {
- return property.charCodeAt(1) === 45;
- }, isProcessableValue = function(value) {
- return value != null && typeof value != "boolean";
- }, processStyleName = memoize2(function(styleName) {
- return isCustomProperty(styleName) ? styleName : styleName.replace(hyphenateRegex, "-$&").toLowerCase();
- }), processStyleValue = function(key, value) {
- switch (key) {
- case "animation":
- case "animationName":
- if (typeof value == "string")
- return value.replace(animationRegex, function(match3, p1, p22) {
- return cursor = {
- name: p1,
- styles: p22,
- next: cursor
- }, p1;
- });
- }
- return unitlessKeys[key] !== 1 && !isCustomProperty(key) && typeof value == "number" && value !== 0 ? value + "px" : value;
- }, noComponentSelectorMessage = "Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";
- labelPattern = /label:\s*([^\s;{]+)\s*(;|$)/g;
- }
- });
-
- // ../../node_modules/@emotion/use-insertion-effect-with-fallbacks/dist/emotion-use-insertion-effect-with-fallbacks.browser.esm.js
- var React, syncFallback, useInsertionEffect2, useInsertionEffectAlwaysWithSyncFallback, useInsertionEffectWithLayoutFallback, init_emotion_use_insertion_effect_with_fallbacks_browser_esm = __esm({
- "../../node_modules/@emotion/use-insertion-effect-with-fallbacks/dist/emotion-use-insertion-effect-with-fallbacks.browser.esm.js"() {
- React = __toESM(require_react()), syncFallback = function(create4) {
- return create4();
- }, useInsertionEffect2 = React.useInsertionEffect ? React.useInsertionEffect : !1, useInsertionEffectAlwaysWithSyncFallback = useInsertionEffect2 || syncFallback, useInsertionEffectWithLayoutFallback = useInsertionEffect2 || React.useLayoutEffect;
- }
- });
-
- // ../../node_modules/@emotion/react/dist/emotion-element-f0de968e.browser.esm.js
- function withTheme(Component5) {
- var componentName = Component5.displayName || Component5.name || "Component", WithTheme = React2.forwardRef(function(props, ref) {
- var theme3 = React2.useContext(ThemeContext);
- return React2.createElement(Component5, _extends({
- theme: theme3,
- ref
- }, props));
- });
- return WithTheme.displayName = "WithTheme(" + componentName + ")", hoistNonReactStatics(WithTheme, Component5);
- }
- var React2, import_react, isDevelopment3, EmotionCacheContext, CacheProvider, withEmotionCache, ThemeContext, useTheme, getTheme, createCacheWithTheme, ThemeProvider, hasOwn, typePropName, createEmotionProps, Insertion, Emotion, Emotion$1, init_emotion_element_f0de968e_browser_esm = __esm({
- "../../node_modules/@emotion/react/dist/emotion-element-f0de968e.browser.esm.js"() {
- React2 = __toESM(require_react()), import_react = __toESM(require_react());
- init_emotion_cache_browser_esm();
- init_extends();
- init_emotion_weak_memoize_esm();
- init_emotion_react_isolated_hnrs_browser_esm();
- init_emotion_utils_browser_esm();
- init_emotion_serialize_esm();
- init_emotion_use_insertion_effect_with_fallbacks_browser_esm();
- isDevelopment3 = !1, EmotionCacheContext = React2.createContext(
- // we're doing this to avoid preconstruct's dead code elimination in this one case
- // because this module is primarily intended for the browser and node
- // but it's also required in react native and similar environments sometimes
- // and we could have a special build just for that
- // but this is much easier and the native packages
- // might use a different theme context in the future anyway
- typeof HTMLElement < "u" ? createCache({
- key: "css"
- }) : null
- ), CacheProvider = EmotionCacheContext.Provider, withEmotionCache = function(func) {
- return (0, import_react.forwardRef)(function(props, ref) {
- var cache = (0, import_react.useContext)(EmotionCacheContext);
- return func(props, cache, ref);
- });
- }, ThemeContext = React2.createContext({}), useTheme = function() {
- return React2.useContext(ThemeContext);
- }, getTheme = function(outerTheme, theme3) {
- if (typeof theme3 == "function") {
- var mergedTheme = theme3(outerTheme);
- return mergedTheme;
- }
- return _extends({}, outerTheme, theme3);
- }, createCacheWithTheme = weakMemoize(function(outerTheme) {
- return weakMemoize(function(theme3) {
- return getTheme(outerTheme, theme3);
- });
- }), ThemeProvider = function(props) {
- var theme3 = React2.useContext(ThemeContext);
- return props.theme !== theme3 && (theme3 = createCacheWithTheme(theme3)(props.theme)), React2.createElement(ThemeContext.Provider, {
- value: theme3
- }, props.children);
- };
- hasOwn = {}.hasOwnProperty, typePropName = "__EMOTION_TYPE_PLEASE_DO_NOT_USE__", createEmotionProps = function(type5, props) {
- var newProps = {};
- for (var _key in props)
- hasOwn.call(props, _key) && (newProps[_key] = props[_key]);
- return newProps[typePropName] = type5, newProps;
- }, Insertion = function(_ref) {
- var cache = _ref.cache, serialized = _ref.serialized, isStringTag = _ref.isStringTag;
- return registerStyles(cache, serialized, isStringTag), useInsertionEffectAlwaysWithSyncFallback(function() {
- return insertStyles(cache, serialized, isStringTag);
- }), null;
- }, Emotion = withEmotionCache(function(props, cache, ref) {
- var cssProp = props.css;
- typeof cssProp == "string" && cache.registered[cssProp] !== void 0 && (cssProp = cache.registered[cssProp]);
- var WrappedComponent = props[typePropName], registeredStyles = [cssProp], className = "";
- typeof props.className == "string" ? className = getRegisteredStyles(cache.registered, registeredStyles, props.className) : props.className != null && (className = props.className + " ");
- var serialized = serializeStyles(registeredStyles, void 0, React2.useContext(ThemeContext));
- className += cache.key + "-" + serialized.name;
- var newProps = {};
- for (var _key2 in props)
- hasOwn.call(props, _key2) && _key2 !== "css" && _key2 !== typePropName && !isDevelopment3 && (newProps[_key2] = props[_key2]);
- return newProps.className = className, ref && (newProps.ref = ref), React2.createElement(React2.Fragment, null, React2.createElement(Insertion, {
- cache,
- serialized,
- isStringTag: typeof WrappedComponent == "string"
- }), React2.createElement(WrappedComponent, newProps));
- }), Emotion$1 = Emotion;
- }
- });
-
- // ../../node_modules/@emotion/react/dist/emotion-react.browser.esm.js
- function css() {
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++)
- args[_key] = arguments[_key];
- return serializeStyles(args);
- }
- function keyframes() {
- var insertable = css.apply(void 0, arguments), name = "animation-" + insertable.name;
- return {
- name,
- styles: "@keyframes " + name + "{" + insertable.styles + "}",
- anim: 1,
- toString: function() {
- return "_EMO_" + this.name + "_" + this.styles + "_EMO_";
- }
- };
- }
- function merge(registered, css3, className) {
- var registeredStyles = [], rawClassName = getRegisteredStyles(registered, registeredStyles, className);
- return registeredStyles.length < 2 ? className : rawClassName + css3(registeredStyles);
- }
- var React3, import_hoist_non_react_statics2, jsx, Global, classnames, Insertion3, ClassNames, init_emotion_react_browser_esm = __esm({
- "../../node_modules/@emotion/react/dist/emotion-react.browser.esm.js"() {
- init_emotion_element_f0de968e_browser_esm();
- init_emotion_element_f0de968e_browser_esm();
- React3 = __toESM(require_react());
- init_emotion_utils_browser_esm();
- init_emotion_use_insertion_effect_with_fallbacks_browser_esm();
- init_emotion_serialize_esm();
- init_emotion_cache_browser_esm();
- init_extends();
- init_emotion_weak_memoize_esm();
- init_emotion_react_isolated_hnrs_browser_esm();
- import_hoist_non_react_statics2 = __toESM(require_hoist_non_react_statics_cjs()), jsx = function(type5, props) {
- var args = arguments;
- if (props == null || !hasOwn.call(props, "css"))
- return React3.createElement.apply(void 0, args);
- var argsLength = args.length, createElementArgArray = new Array(argsLength);
- createElementArgArray[0] = Emotion$1, createElementArgArray[1] = createEmotionProps(type5, props);
- for (var i = 2; i < argsLength; i++)
- createElementArgArray[i] = args[i];
- return React3.createElement.apply(null, createElementArgArray);
- };
- (function(_jsx) {
- var JSX;
- JSX || (JSX = _jsx.JSX || (_jsx.JSX = {}));
- })(jsx || (jsx = {}));
- Global = withEmotionCache(function(props, cache) {
- var styles4 = props.styles, serialized = serializeStyles([styles4], void 0, React3.useContext(ThemeContext)), sheetRef = React3.useRef();
- return useInsertionEffectWithLayoutFallback(function() {
- var key = cache.key + "-global", sheet = new cache.sheet.constructor({
- key,
- nonce: cache.sheet.nonce,
- container: cache.sheet.container,
- speedy: cache.sheet.isSpeedy
- }), rehydrating = !1, node2 = document.querySelector('style[data-emotion="' + key + " " + serialized.name + '"]');
- return cache.sheet.tags.length && (sheet.before = cache.sheet.tags[0]), node2 !== null && (rehydrating = !0, node2.setAttribute("data-emotion", key), sheet.hydrate([node2])), sheetRef.current = [sheet, rehydrating], function() {
- sheet.flush();
- };
- }, [cache]), useInsertionEffectWithLayoutFallback(function() {
- var sheetRefCurrent = sheetRef.current, sheet = sheetRefCurrent[0], rehydrating = sheetRefCurrent[1];
- if (rehydrating) {
- sheetRefCurrent[1] = !1;
- return;
- }
- if (serialized.next !== void 0 && insertStyles(cache, serialized.next, !0), sheet.tags.length) {
- var element = sheet.tags[sheet.tags.length - 1].nextElementSibling;
- sheet.before = element, sheet.flush();
- }
- cache.insert("", serialized, sheet, !1);
- }, [cache, serialized.name]), null;
- });
- classnames = function classnames2(args) {
- for (var len = args.length, i = 0, cls = ""; i < len; i++) {
- var arg = args[i];
- if (arg != null) {
- var toAdd = void 0;
- switch (typeof arg) {
- case "boolean":
- break;
- case "object": {
- if (Array.isArray(arg))
- toAdd = classnames2(arg);
- else {
- toAdd = "";
- for (var k in arg)
- arg[k] && k && (toAdd && (toAdd += " "), toAdd += k);
- }
- break;
- }
- default:
- toAdd = arg;
- }
- toAdd && (cls && (cls += " "), cls += toAdd);
- }
- }
- return cls;
- };
- Insertion3 = function(_ref) {
- var cache = _ref.cache, serializedArr = _ref.serializedArr;
- return useInsertionEffectAlwaysWithSyncFallback(function() {
- for (var i = 0; i < serializedArr.length; i++)
- insertStyles(cache, serializedArr[i], !1);
- }), null;
- }, ClassNames = withEmotionCache(function(props, cache) {
- var hasRendered = !1, serializedArr = [], css3 = function() {
- if (hasRendered && isDevelopment3)
- throw new Error("css can only be used during render");
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++)
- args[_key] = arguments[_key];
- var serialized = serializeStyles(args, cache.registered);
- return serializedArr.push(serialized), registerStyles(cache, serialized, !1), cache.key + "-" + serialized.name;
- }, cx = function() {
- if (hasRendered && isDevelopment3)
- throw new Error("cx can only be used during render");
- for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++)
- args[_key2] = arguments[_key2];
- return merge(cache.registered, css3, classnames(args));
- }, content = {
- css: css3,
- cx,
- theme: React3.useContext(ThemeContext)
- }, ele = props.children(content);
- return hasRendered = !0, React3.createElement(React3.Fragment, null, React3.createElement(Insertion3, {
- cache,
- serializedArr
- }), ele);
- });
- }
- });
-
- // ../../node_modules/@emotion/is-prop-valid/dist/emotion-is-prop-valid.esm.js
- var reactPropsRegex, isPropValid, init_emotion_is_prop_valid_esm = __esm({
- "../../node_modules/@emotion/is-prop-valid/dist/emotion-is-prop-valid.esm.js"() {
- init_emotion_memoize_esm();
- reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/, isPropValid = memoize2(
- function(prop) {
- return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111 && prop.charCodeAt(1) === 110 && prop.charCodeAt(2) < 91;
- }
- /* Z+1 */
- );
- }
- });
-
- // ../../node_modules/@emotion/styled/base/dist/emotion-styled-base.browser.esm.js
- var React4, isDevelopment4, testOmitPropsOnStringTag, testOmitPropsOnComponent, getDefaultShouldForwardProp, composeShouldForwardProps, Insertion5, createStyled, init_emotion_styled_base_browser_esm = __esm({
- "../../node_modules/@emotion/styled/base/dist/emotion-styled-base.browser.esm.js"() {
- init_extends();
- init_emotion_react_browser_esm();
- init_emotion_serialize_esm();
- init_emotion_use_insertion_effect_with_fallbacks_browser_esm();
- init_emotion_utils_browser_esm();
- React4 = __toESM(require_react());
- init_emotion_is_prop_valid_esm();
- isDevelopment4 = !1, testOmitPropsOnStringTag = isPropValid, testOmitPropsOnComponent = function(key) {
- return key !== "theme";
- }, getDefaultShouldForwardProp = function(tag) {
- return typeof tag == "string" && // 96 is one less than the char code
- // for "a" so this is checking that
- // it's a lowercase character
- tag.charCodeAt(0) > 96 ? testOmitPropsOnStringTag : testOmitPropsOnComponent;
- }, composeShouldForwardProps = function(tag, options, isReal) {
- var shouldForwardProp;
- if (options) {
- var optionsShouldForwardProp = options.shouldForwardProp;
- shouldForwardProp = tag.__emotion_forwardProp && optionsShouldForwardProp ? function(propName) {
- return tag.__emotion_forwardProp(propName) && optionsShouldForwardProp(propName);
- } : optionsShouldForwardProp;
- }
- return typeof shouldForwardProp != "function" && isReal && (shouldForwardProp = tag.__emotion_forwardProp), shouldForwardProp;
- }, Insertion5 = function(_ref) {
- var cache = _ref.cache, serialized = _ref.serialized, isStringTag = _ref.isStringTag;
- return registerStyles(cache, serialized, isStringTag), useInsertionEffectAlwaysWithSyncFallback(function() {
- return insertStyles(cache, serialized, isStringTag);
- }), null;
- }, createStyled = function createStyled2(tag, options) {
- var isReal = tag.__emotion_real === tag, baseTag = isReal && tag.__emotion_base || tag, identifierName, targetClassName;
- options !== void 0 && (identifierName = options.label, targetClassName = options.target);
- var shouldForwardProp = composeShouldForwardProps(tag, options, isReal), defaultShouldForwardProp = shouldForwardProp || getDefaultShouldForwardProp(baseTag), shouldUseAs = !defaultShouldForwardProp("as");
- return function() {
- var args = arguments, styles4 = isReal && tag.__emotion_styles !== void 0 ? tag.__emotion_styles.slice(0) : [];
- if (identifierName !== void 0 && styles4.push("label:" + identifierName + ";"), args[0] == null || args[0].raw === void 0)
- styles4.push.apply(styles4, args);
- else {
- var templateStringsArr = args[0];
- styles4.push(templateStringsArr[0]);
- for (var len = args.length, i = 1; i < len; i++)
- styles4.push(args[i], templateStringsArr[i]);
- }
- var Styled = withEmotionCache(function(props, cache, ref) {
- var FinalTag = shouldUseAs && props.as || baseTag, className = "", classInterpolations = [], mergedProps = props;
- if (props.theme == null) {
- mergedProps = {};
- for (var key in props)
- mergedProps[key] = props[key];
- mergedProps.theme = React4.useContext(ThemeContext);
- }
- typeof props.className == "string" ? className = getRegisteredStyles(cache.registered, classInterpolations, props.className) : props.className != null && (className = props.className + " ");
- var serialized = serializeStyles(styles4.concat(classInterpolations), cache.registered, mergedProps);
- className += cache.key + "-" + serialized.name, targetClassName !== void 0 && (className += " " + targetClassName);
- var finalShouldForwardProp = shouldUseAs && shouldForwardProp === void 0 ? getDefaultShouldForwardProp(FinalTag) : defaultShouldForwardProp, newProps = {};
- for (var _key in props)
- shouldUseAs && _key === "as" || finalShouldForwardProp(_key) && (newProps[_key] = props[_key]);
- return newProps.className = className, ref && (newProps.ref = ref), React4.createElement(React4.Fragment, null, React4.createElement(Insertion5, {
- cache,
- serialized,
- isStringTag: typeof FinalTag == "string"
- }), React4.createElement(FinalTag, newProps));
- });
- return Styled.displayName = identifierName !== void 0 ? identifierName : "Styled(" + (typeof baseTag == "string" ? baseTag : baseTag.displayName || baseTag.name || "Component") + ")", Styled.defaultProps = tag.defaultProps, Styled.__emotion_real = Styled, Styled.__emotion_base = baseTag, Styled.__emotion_styles = styles4, Styled.__emotion_forwardProp = shouldForwardProp, Object.defineProperty(Styled, "toString", {
- value: function() {
- return targetClassName === void 0 && isDevelopment4 ? "NO_COMPONENT_SELECTOR" : "." + targetClassName;
- }
- }), Styled.withComponent = function(nextTag, nextOptions) {
- var newStyled = createStyled2(nextTag, _extends({}, options, nextOptions, {
- shouldForwardProp: composeShouldForwardProps(Styled, nextOptions, !0)
- }));
- return newStyled.apply(void 0, styles4);
- }, Styled;
- };
- };
- }
- });
-
- // ../../node_modules/@emotion/styled/dist/emotion-styled.browser.esm.js
- var import_react4, tags, styled, init_emotion_styled_browser_esm = __esm({
- "../../node_modules/@emotion/styled/dist/emotion-styled.browser.esm.js"() {
- init_emotion_styled_base_browser_esm();
- init_extends();
- init_emotion_react_browser_esm();
- init_emotion_serialize_esm();
- init_emotion_use_insertion_effect_with_fallbacks_browser_esm();
- init_emotion_utils_browser_esm();
- import_react4 = __toESM(require_react());
- init_emotion_is_prop_valid_esm();
- tags = [
- "a",
- "abbr",
- "address",
- "area",
- "article",
- "aside",
- "audio",
- "b",
- "base",
- "bdi",
- "bdo",
- "big",
- "blockquote",
- "body",
- "br",
- "button",
- "canvas",
- "caption",
- "cite",
- "code",
- "col",
- "colgroup",
- "data",
- "datalist",
- "dd",
- "del",
- "details",
- "dfn",
- "dialog",
- "div",
- "dl",
- "dt",
- "em",
- "embed",
- "fieldset",
- "figcaption",
- "figure",
- "footer",
- "form",
- "h1",
- "h2",
- "h3",
- "h4",
- "h5",
- "h6",
- "head",
- "header",
- "hgroup",
- "hr",
- "html",
- "i",
- "iframe",
- "img",
- "input",
- "ins",
- "kbd",
- "keygen",
- "label",
- "legend",
- "li",
- "link",
- "main",
- "map",
- "mark",
- "marquee",
- "menu",
- "menuitem",
- "meta",
- "meter",
- "nav",
- "noscript",
- "object",
- "ol",
- "optgroup",
- "option",
- "output",
- "p",
- "param",
- "picture",
- "pre",
- "progress",
- "q",
- "rp",
- "rt",
- "ruby",
- "s",
- "samp",
- "script",
- "section",
- "select",
- "small",
- "source",
- "span",
- "strong",
- "style",
- "sub",
- "summary",
- "sup",
- "table",
- "tbody",
- "td",
- "textarea",
- "tfoot",
- "th",
- "thead",
- "time",
- "title",
- "tr",
- "track",
- "u",
- "ul",
- "var",
- "video",
- "wbr",
- // SVG
- "circle",
- "clipPath",
- "defs",
- "ellipse",
- "foreignObject",
- "g",
- "image",
- "line",
- "linearGradient",
- "mask",
- "path",
- "pattern",
- "polygon",
- "polyline",
- "radialGradient",
- "rect",
- "stop",
- "svg",
- "text",
- "tspan"
- ], styled = createStyled.bind(null);
- tags.forEach(function(tagName) {
- styled[tagName] = styled(tagName);
- });
- }
- });
-
- // src/theming/base.ts
- var color, background, typography, tokens, init_base = __esm({
- "src/theming/base.ts"() {
- "use strict";
- color = {
- // Official color palette
- primary: "#FF4785",
- // coral
- secondary: "#006DEB",
- // ocean
- tertiary: "#FAFBFC",
- ancillary: "#22a699",
- // Complimentary
- orange: "#FC521F",
- gold: "#FFAE00",
- green: "#66BF3C",
- seafoam: "#37D5D3",
- purple: "#6F2CAC",
- ultraviolet: "#2A0481",
- // Monochrome
- lightest: "#FFFFFF",
- lighter: "#F6F9FC",
- light: "#EEF2F6",
- mediumlight: "#ECF2F9",
- medium: "#D9E5F2",
- mediumdark: "#737F8C",
- dark: "#5C6570",
- darker: "#454C54",
- darkest: "#2E3338",
- // For borders
- border: "hsl(212 50% 30% / 0.15)",
- // Status
- positive: "#66BF3C",
- warning: "#E69D00",
- negative: "#FF4400",
- critical: "#FFFFFF",
- // Text
- defaultText: "#2E3338",
- inverseText: "#FFFFFF",
- positiveText: "#427C27",
- warningText: "#955B1E",
- negativeText: "#C23400"
- }, background = {
- app: "#F6F9FC",
- bar: color.lightest,
- content: color.lightest,
- preview: color.lightest,
- gridCellSize: 10,
- hoverable: "#DBECFF",
- // Notification, error, and warning backgrounds
- positive: "#F1FFEB",
- warning: "#FFF9EB",
- negative: "#FFF0EB",
- critical: "#D13800"
- }, typography = {
- fonts: {
- base: [
- '"Nunito Sans"',
- "-apple-system",
- '".SFNSText-Regular"',
- '"San Francisco"',
- "BlinkMacSystemFont",
- '"Segoe UI"',
- '"Helvetica Neue"',
- "Helvetica",
- "Arial",
- "sans-serif"
- ].join(", "),
- mono: [
- "ui-monospace",
- "Menlo",
- "Monaco",
- '"Roboto Mono"',
- '"Oxygen Mono"',
- '"Ubuntu Monospace"',
- '"Source Code Pro"',
- '"Droid Sans Mono"',
- '"Courier New"',
- "monospace"
- ].join(", ")
- },
- weight: {
- regular: 400,
- bold: 700
- },
- size: {
- s1: 12,
- s2: 14,
- s3: 16,
- m1: 20,
- m2: 24,
- m3: 28,
- l1: 32,
- l2: 40,
- l3: 48,
- code: 90
- }
- }, tokens = {
- light: {
- fgColor: {
- default: color.darkest,
- muted: color.dark,
- accent: color.secondary,
- inverse: color.lightest,
- // TODO: add 'disabled'
- positive: "#427C27",
- warning: "#7A4100",
- negative: "#C23400",
- critical: "#FFFFFF"
- },
- bgColor: {
- default: color.lightest,
- muted: background.app,
- // TODO: add 'accent'? white or blue?
- positive: "#F1FFEB",
- warning: "#FFF7EB",
- negative: "#FFF0EB",
- critical: "#D13800"
- },
- borderColor: {
- default: color.border,
- muted: "hsl(0 0% 0% / 0.1)",
- inverse: "hsl(0 0% 100% / 0.1)",
- positive: "#BFE7AC",
- warning: "#FFCE85",
- negative: "#FFC3AD",
- critical: "hsl(16 100% 100% / 0)"
- }
- },
- dark: {
- fgColor: {
- default: "#C9CCCF",
- muted: "#95999D",
- accent: "#479DFF",
- inverse: "#1B1C1D",
- // TODO: add 'disabled'
- positive: "#86CE64",
- warning: "#FFAD33",
- negative: "#FF6933",
- critical: "#FF6933"
- },
- bgColor: {
- default: "#222325",
- muted: "#1B1C1D",
- // TODO: add 'accent'? white or blue?
- positive: "hsl(101 100% 100% / 0)",
- warning: "hsl(101 100% 100% / 0)",
- negative: "hsl(101 100% 100% / 0)",
- critical: "hsl(101 100% 100% / 0)"
- },
- borderColor: {
- default: "hsl(0 0% 100% / 0.1)",
- muted: "hsl(0 0% 100% / 0.5)",
- inverse: "hsl(0 0% 0% / 0.1)",
- positive: "hsl(101 52% 64% / 0.15)",
- warning: "hsl(36 100% 64% / 0.15)",
- negative: "hsl(16 100% 64% / 0.15)",
- critical: "#FF6933"
- }
- }
- };
- }
- });
-
- // src/theming/types.ts
- var init_types = __esm({
- "src/theming/types.ts"() {
- "use strict";
- }
- });
-
- // ../../node_modules/memoizerific/memoizerific.js
- var require_memoizerific = __commonJS({
- "../../node_modules/memoizerific/memoizerific.js"(exports, module2) {
- (function(f4) {
- if (typeof exports == "object" && typeof module2 < "u")
- module2.exports = f4();
- else if (typeof define == "function" && define.amd)
- define([], f4);
- else {
- var g2;
- typeof window < "u" ? g2 = window : typeof global < "u" ? g2 = global : typeof self < "u" ? g2 = self : g2 = this, g2.memoizerific = f4();
- }
- })(function() {
- var define3, module3, exports2;
- return (function e(t, n, r2) {
- function s3(o2, u2) {
- if (!n[o2]) {
- if (!t[o2]) {
- var a3 = typeof __require == "function" && __require;
- if (!u2 && a3) return a3(o2, !0);
- if (i) return i(o2, !0);
- var f4 = new Error("Cannot find module '" + o2 + "'");
- throw f4.code = "MODULE_NOT_FOUND", f4;
- }
- var l = n[o2] = { exports: {} };
- t[o2][0].call(l.exports, function(e2) {
- var n2 = t[o2][1][e2];
- return s3(n2 || e2);
- }, l, l.exports, e, t, n, r2);
- }
- return n[o2].exports;
- }
- for (var i = typeof __require == "function" && __require, o = 0; o < r2.length; o++) s3(r2[o]);
- return s3;
- })({ 1: [function(_dereq_, module4, exports3) {
- module4.exports = function(forceSimilar) {
- if (typeof Map != "function" || forceSimilar) {
- var Similar = _dereq_("./similar");
- return new Similar();
- } else
- return /* @__PURE__ */ new Map();
- };
- }, { "./similar": 2 }], 2: [function(_dereq_, module4, exports3) {
- function Similar() {
- return this.list = [], this.lastItem = void 0, this.size = 0, this;
- }
- Similar.prototype.get = function(key) {
- var index4;
- if (this.lastItem && this.isEqual(this.lastItem.key, key))
- return this.lastItem.val;
- if (index4 = this.indexOf(key), index4 >= 0)
- return this.lastItem = this.list[index4], this.list[index4].val;
- }, Similar.prototype.set = function(key, val) {
- var index4;
- return this.lastItem && this.isEqual(this.lastItem.key, key) ? (this.lastItem.val = val, this) : (index4 = this.indexOf(key), index4 >= 0 ? (this.lastItem = this.list[index4], this.list[index4].val = val, this) : (this.lastItem = { key, val }, this.list.push(this.lastItem), this.size++, this));
- }, Similar.prototype.delete = function(key) {
- var index4;
- if (this.lastItem && this.isEqual(this.lastItem.key, key) && (this.lastItem = void 0), index4 = this.indexOf(key), index4 >= 0)
- return this.size--, this.list.splice(index4, 1)[0];
- }, Similar.prototype.has = function(key) {
- var index4;
- return this.lastItem && this.isEqual(this.lastItem.key, key) ? !0 : (index4 = this.indexOf(key), index4 >= 0 ? (this.lastItem = this.list[index4], !0) : !1);
- }, Similar.prototype.forEach = function(callback, thisArg) {
- var i;
- for (i = 0; i < this.size; i++)
- callback.call(thisArg || this, this.list[i].val, this.list[i].key, this);
- }, Similar.prototype.indexOf = function(key) {
- var i;
- for (i = 0; i < this.size; i++)
- if (this.isEqual(this.list[i].key, key))
- return i;
- return -1;
- }, Similar.prototype.isEqual = function(val1, val2) {
- return val1 === val2 || val1 !== val1 && val2 !== val2;
- }, module4.exports = Similar;
- }, {}], 3: [function(_dereq_, module4, exports3) {
- var MapOrSimilar = _dereq_("map-or-similar");
- module4.exports = function(limit) {
- var cache = new MapOrSimilar(!1), lru = [];
- return function(fn4) {
- var memoizerific = function() {
- var currentCache = cache, newMap, fnResult, argsLengthMinusOne = arguments.length - 1, lruPath = Array(argsLengthMinusOne + 1), isMemoized = !0, i;
- if ((memoizerific.numArgs || memoizerific.numArgs === 0) && memoizerific.numArgs !== argsLengthMinusOne + 1)
- throw new Error("Memoizerific functions should always be called with the same number of arguments");
- for (i = 0; i < argsLengthMinusOne; i++) {
- if (lruPath[i] = {
- cacheItem: currentCache,
- arg: arguments[i]
- }, currentCache.has(arguments[i])) {
- currentCache = currentCache.get(arguments[i]);
- continue;
- }
- isMemoized = !1, newMap = new MapOrSimilar(!1), currentCache.set(arguments[i], newMap), currentCache = newMap;
- }
- return isMemoized && (currentCache.has(arguments[argsLengthMinusOne]) ? fnResult = currentCache.get(arguments[argsLengthMinusOne]) : isMemoized = !1), isMemoized || (fnResult = fn4.apply(null, arguments), currentCache.set(arguments[argsLengthMinusOne], fnResult)), limit > 0 && (lruPath[argsLengthMinusOne] = {
- cacheItem: currentCache,
- arg: arguments[argsLengthMinusOne]
- }, isMemoized ? moveToMostRecentLru(lru, lruPath) : lru.push(lruPath), lru.length > limit && removeCachedResult(lru.shift())), memoizerific.wasMemoized = isMemoized, memoizerific.numArgs = argsLengthMinusOne + 1, fnResult;
- };
- return memoizerific.limit = limit, memoizerific.wasMemoized = !1, memoizerific.cache = cache, memoizerific.lru = lru, memoizerific;
- };
- };
- function moveToMostRecentLru(lru, lruPath) {
- var lruLen = lru.length, lruPathLen = lruPath.length, isMatch, i, ii;
- for (i = 0; i < lruLen; i++) {
- for (isMatch = !0, ii = 0; ii < lruPathLen; ii++)
- if (!isEqual4(lru[i][ii].arg, lruPath[ii].arg)) {
- isMatch = !1;
- break;
- }
- if (isMatch)
- break;
- }
- lru.push(lru.splice(i, 1)[0]);
- }
- function removeCachedResult(removedLru) {
- var removedLruLen = removedLru.length, currentLru = removedLru[removedLruLen - 1], tmp, i;
- for (currentLru.cacheItem.delete(currentLru.arg), i = removedLruLen - 2; i >= 0 && (currentLru = removedLru[i], tmp = currentLru.cacheItem.get(currentLru.arg), !tmp || !tmp.size); i--)
- currentLru.cacheItem.delete(currentLru.arg);
- }
- function isEqual4(val1, val2) {
- return val1 === val2 || val1 !== val1 && val2 !== val2;
- }
- }, { "map-or-similar": 1 }] }, {}, [3])(3);
- });
- }
- });
-
- // src/theming/global.ts
- var import_memoizerific, srOnlyStyles, createReset, createGlobal, init_global = __esm({
- "src/theming/global.ts"() {
- "use strict";
- import_memoizerific = __toESM(require_memoizerific(), 1), srOnlyStyles = {
- position: "absolute",
- width: 1,
- height: 1,
- padding: 0,
- margin: -1,
- overflow: "hidden",
- whiteSpace: "nowrap",
- clip: "rect(0, 0, 0, 0)",
- clipPath: "inset(50%)",
- border: 0
- }, createReset = (0, import_memoizerific.default)(1)(
- ({ typography: typography2 }) => ({
- body: {
- fontFamily: typography2.fonts.base,
- fontSize: typography2.size.s3,
- margin: 0,
- WebkitFontSmoothing: "antialiased",
- MozOsxFontSmoothing: "grayscale",
- WebkitTapHighlightColor: "rgba(0, 0, 0, 0)",
- WebkitOverflowScrolling: "touch"
- },
- "*": {
- boxSizing: "border-box"
- },
- "h1, h2, h3, h4, h5, h6": {
- fontWeight: typography2.weight.regular,
- margin: 0,
- padding: 0
- },
- "button, input, textarea, select": {
- fontFamily: "inherit",
- fontSize: "inherit",
- boxSizing: "border-box"
- },
- sub: {
- fontSize: "0.8em",
- bottom: "-0.2em"
- },
- sup: {
- fontSize: "0.8em",
- top: "-0.2em"
- },
- "b, strong": {
- fontWeight: typography2.weight.bold
- },
- hr: {
- border: "none",
- borderTop: "1px solid silver",
- clear: "both",
- marginBottom: "1.25rem"
- },
- code: {
- fontFamily: typography2.fonts.mono,
- WebkitFontSmoothing: "antialiased",
- MozOsxFontSmoothing: "grayscale",
- display: "inline-block",
- paddingLeft: 2,
- paddingRight: 2,
- verticalAlign: "baseline",
- color: "inherit"
- },
- pre: {
- fontFamily: typography2.fonts.mono,
- WebkitFontSmoothing: "antialiased",
- MozOsxFontSmoothing: "grayscale",
- lineHeight: "18px",
- padding: "11px 1rem",
- whiteSpace: "pre-wrap",
- color: "inherit",
- borderRadius: 3,
- margin: "1rem 0"
- }
- })
- ), createGlobal = (0, import_memoizerific.default)(1)(({
- color: color2,
- background: background2,
- typography: typography2
- }) => {
- let resetStyles = createReset({ typography: typography2 });
- return {
- ...resetStyles,
- body: {
- ...resetStyles.body,
- position: "fixed",
- width: "100vw",
- height: "100vh",
- overflow: "hidden",
- color: color2.defaultText,
- background: background2.app
- },
- hr: {
- ...resetStyles.hr,
- borderTop: `1px solid ${color2.border}`
- },
- ".sb-sr-only, .sb-hidden-until-focus:not(:focus)": srOnlyStyles,
- ".sb-hidden-until-focus": {
- opacity: 0,
- transition: "opacity 150ms ease-out"
- },
- ".sb-hidden-until-focus:focus": {
- opacity: 1
- },
- "[data-sb-landmark]": {
- position: "relative"
- },
- "[data-sb-landmark]:focus-visible": {
- outline: "none"
- },
- "[data-sb-landmark]:focus-visible::after": {
- outline: `2px solid ${color2.primary}`,
- outlineOffset: "-2px"
- },
- "[data-sb-landmark]::after": {
- content: "''",
- position: "absolute",
- inset: 0,
- pointerEvents: "none"
- },
- ".react-aria-Popover:focus-visible": {
- outline: "none"
- }
- };
- });
- }
- });
-
- // src/theming/themes/dark.ts
- var theme, dark_default, init_dark = __esm({
- "src/theming/themes/dark.ts"() {
- "use strict";
- init_base();
- theme = {
- base: "dark",
- // Storybook-specific color palette
- colorPrimary: "#FF4785",
- // coral
- colorSecondary: "#479DFF",
- // UI
- appBg: "#1B1C1D",
- appContentBg: "#222325",
- appHoverBg: "#233952",
- appPreviewBg: color.lightest,
- appBorderColor: "hsl(0 0% 100% / 0.1)",
- appBorderRadius: 4,
- // Fonts
- fontBase: typography.fonts.base,
- fontCode: typography.fonts.mono,
- // Text colors
- textColor: "#C9CCCF",
- textInverseColor: "#1B1C1D",
- textMutedColor: "#95999D",
- // Toolbar default and active colors
- barTextColor: "#95999D",
- barHoverColor: "#70B3FF",
- barSelectedColor: "#479DFF",
- barBg: "#222325",
- // Form colors
- buttonBg: "#1B1C1D",
- buttonBorder: "hsl(0 0% 100% / 0.1)",
- booleanBg: "#1B1C1D",
- booleanSelectedBg: "#292B2E",
- inputBg: "#1B1C1D",
- inputBorder: "hsl(0 0% 100% / 0.1)",
- inputTextColor: "#C9CCCF",
- inputBorderRadius: 4
- }, dark_default = theme;
- }
- });
-
- // src/theming/themes/light.ts
- var theme2, light_default, init_light = __esm({
- "src/theming/themes/light.ts"() {
- "use strict";
- init_base();
- theme2 = {
- base: "light",
- // Storybook-specific color palette
- colorPrimary: color.primary,
- colorSecondary: color.secondary,
- // UI
- appBg: background.app,
- appContentBg: color.lightest,
- appHoverBg: "#DBECFF",
- appPreviewBg: color.lightest,
- appBorderColor: color.border,
- appBorderRadius: 4,
- // Fonts
- fontBase: typography.fonts.base,
- fontCode: typography.fonts.mono,
- // Text colors
- textColor: color.darkest,
- textInverseColor: color.lightest,
- textMutedColor: color.dark,
- // Toolbar default and active colors
- barTextColor: color.dark,
- barHoverColor: "#005CC7",
- barSelectedColor: "#0063D6",
- barBg: color.lightest,
- // Form colors
- buttonBg: background.app,
- buttonBorder: color.medium,
- booleanBg: color.mediumlight,
- booleanSelectedBg: color.lightest,
- inputBg: color.lightest,
- inputBorder: color.border,
- inputTextColor: color.darkest,
- inputBorderRadius: 4
- }, light_default = theme2;
- }
- });
-
- // ../../node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js
- function _assertThisInitialized(e) {
- if (e === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
- return e;
- }
- var init_assertThisInitialized = __esm({
- "../../node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js"() {
- }
- });
-
- // ../../node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js
- function _setPrototypeOf(t, e) {
- return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t2, e2) {
- return t2.__proto__ = e2, t2;
- }, _setPrototypeOf(t, e);
- }
- var init_setPrototypeOf = __esm({
- "../../node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js"() {
- }
- });
-
- // ../../node_modules/@babel/runtime/helpers/esm/inheritsLoose.js
- function _inheritsLoose(t, o) {
- t.prototype = Object.create(o.prototype), t.prototype.constructor = t, _setPrototypeOf(t, o);
- }
- var init_inheritsLoose = __esm({
- "../../node_modules/@babel/runtime/helpers/esm/inheritsLoose.js"() {
- init_setPrototypeOf();
- }
- });
-
- // ../../node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js
- function _getPrototypeOf(t) {
- return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t2) {
- return t2.__proto__ || Object.getPrototypeOf(t2);
- }, _getPrototypeOf(t);
- }
- var init_getPrototypeOf = __esm({
- "../../node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"() {
- }
- });
-
- // ../../node_modules/@babel/runtime/helpers/esm/isNativeFunction.js
- function _isNativeFunction(t) {
- try {
- return Function.toString.call(t).indexOf("[native code]") !== -1;
- } catch {
- return typeof t == "function";
- }
- }
- var init_isNativeFunction = __esm({
- "../../node_modules/@babel/runtime/helpers/esm/isNativeFunction.js"() {
- }
- });
-
- // ../../node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js
- function _isNativeReflectConstruct() {
- try {
- var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
- }));
- } catch {
- }
- return (_isNativeReflectConstruct = function() {
- return !!t;
- })();
- }
- var init_isNativeReflectConstruct = __esm({
- "../../node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js"() {
- }
- });
-
- // ../../node_modules/@babel/runtime/helpers/esm/construct.js
- function _construct(t, e, r2) {
- if (_isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments);
- var o = [null];
- o.push.apply(o, e);
- var p3 = new (t.bind.apply(t, o))();
- return r2 && _setPrototypeOf(p3, r2.prototype), p3;
- }
- var init_construct = __esm({
- "../../node_modules/@babel/runtime/helpers/esm/construct.js"() {
- init_isNativeReflectConstruct();
- init_setPrototypeOf();
- }
- });
-
- // ../../node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js
- function _wrapNativeSuper(t) {
- var r2 = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
- return _wrapNativeSuper = function(t2) {
- if (t2 === null || !_isNativeFunction(t2)) return t2;
- if (typeof t2 != "function") throw new TypeError("Super expression must either be null or a function");
- if (r2 !== void 0) {
- if (r2.has(t2)) return r2.get(t2);
- r2.set(t2, Wrapper9);
- }
- function Wrapper9() {
- return _construct(t2, arguments, _getPrototypeOf(this).constructor);
- }
- return Wrapper9.prototype = Object.create(t2.prototype, {
- constructor: {
- value: Wrapper9,
- enumerable: !1,
- writable: !0,
- configurable: !0
- }
- }), _setPrototypeOf(Wrapper9, t2);
- }, _wrapNativeSuper(t);
- }
- var init_wrapNativeSuper = __esm({
- "../../node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js"() {
- init_getPrototypeOf();
- init_setPrototypeOf();
- init_isNativeFunction();
- init_construct();
- }
- });
-
- // ../../node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteralLoose.js
- var init_taggedTemplateLiteralLoose = __esm({
- "../../node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteralLoose.js"() {
- }
- });
-
- // ../../node_modules/polished/dist/polished.esm.js
- function endsWith(string, suffix) {
- return string.substr(-suffix.length) === suffix;
- }
- function stripUnit(value) {
- if (typeof value != "string") return value;
- var matchedValue = value.match(cssRegex$1);
- return matchedValue ? parseFloat(value) : value;
- }
- function colorToInt(color2) {
- return Math.round(color2 * 255);
- }
- function convertToInt(red, green, blue) {
- return colorToInt(red) + "," + colorToInt(green) + "," + colorToInt(blue);
- }
- function hslToRgb(hue, saturation, lightness, convert6) {
- if (convert6 === void 0 && (convert6 = convertToInt), saturation === 0)
- return convert6(lightness, lightness, lightness);
- var huePrime = (hue % 360 + 360) % 360 / 60, chroma = (1 - Math.abs(2 * lightness - 1)) * saturation, secondComponent = chroma * (1 - Math.abs(huePrime % 2 - 1)), red = 0, green = 0, blue = 0;
- huePrime >= 0 && huePrime < 1 ? (red = chroma, green = secondComponent) : huePrime >= 1 && huePrime < 2 ? (red = secondComponent, green = chroma) : huePrime >= 2 && huePrime < 3 ? (green = chroma, blue = secondComponent) : huePrime >= 3 && huePrime < 4 ? (green = secondComponent, blue = chroma) : huePrime >= 4 && huePrime < 5 ? (red = secondComponent, blue = chroma) : huePrime >= 5 && huePrime < 6 && (red = chroma, blue = secondComponent);
- var lightnessModification = lightness - chroma / 2, finalRed = red + lightnessModification, finalGreen = green + lightnessModification, finalBlue = blue + lightnessModification;
- return convert6(finalRed, finalGreen, finalBlue);
- }
- function nameToHex(color2) {
- if (typeof color2 != "string") return color2;
- var normalizedColorName = color2.toLowerCase();
- return namedColorMap[normalizedColorName] ? "#" + namedColorMap[normalizedColorName] : color2;
- }
- function parseToRgb(color2) {
- if (typeof color2 != "string")
- throw new PolishedError(3);
- var normalizedColor = nameToHex(color2);
- if (normalizedColor.match(hexRegex))
- return {
- red: parseInt("" + normalizedColor[1] + normalizedColor[2], 16),
- green: parseInt("" + normalizedColor[3] + normalizedColor[4], 16),
- blue: parseInt("" + normalizedColor[5] + normalizedColor[6], 16)
- };
- if (normalizedColor.match(hexRgbaRegex)) {
- var alpha = parseFloat((parseInt("" + normalizedColor[7] + normalizedColor[8], 16) / 255).toFixed(2));
- return {
- red: parseInt("" + normalizedColor[1] + normalizedColor[2], 16),
- green: parseInt("" + normalizedColor[3] + normalizedColor[4], 16),
- blue: parseInt("" + normalizedColor[5] + normalizedColor[6], 16),
- alpha
- };
- }
- if (normalizedColor.match(reducedHexRegex))
- return {
- red: parseInt("" + normalizedColor[1] + normalizedColor[1], 16),
- green: parseInt("" + normalizedColor[2] + normalizedColor[2], 16),
- blue: parseInt("" + normalizedColor[3] + normalizedColor[3], 16)
- };
- if (normalizedColor.match(reducedRgbaHexRegex)) {
- var _alpha = parseFloat((parseInt("" + normalizedColor[4] + normalizedColor[4], 16) / 255).toFixed(2));
- return {
- red: parseInt("" + normalizedColor[1] + normalizedColor[1], 16),
- green: parseInt("" + normalizedColor[2] + normalizedColor[2], 16),
- blue: parseInt("" + normalizedColor[3] + normalizedColor[3], 16),
- alpha: _alpha
- };
- }
- var rgbMatched = rgbRegex.exec(normalizedColor);
- if (rgbMatched)
- return {
- red: parseInt("" + rgbMatched[1], 10),
- green: parseInt("" + rgbMatched[2], 10),
- blue: parseInt("" + rgbMatched[3], 10)
- };
- var rgbaMatched = rgbaRegex.exec(normalizedColor.substring(0, 50));
- if (rgbaMatched)
- return {
- red: parseInt("" + rgbaMatched[1], 10),
- green: parseInt("" + rgbaMatched[2], 10),
- blue: parseInt("" + rgbaMatched[3], 10),
- alpha: parseFloat("" + rgbaMatched[4]) > 1 ? parseFloat("" + rgbaMatched[4]) / 100 : parseFloat("" + rgbaMatched[4])
- };
- var hslMatched = hslRegex.exec(normalizedColor);
- if (hslMatched) {
- var hue = parseInt("" + hslMatched[1], 10), saturation = parseInt("" + hslMatched[2], 10) / 100, lightness = parseInt("" + hslMatched[3], 10) / 100, rgbColorString = "rgb(" + hslToRgb(hue, saturation, lightness) + ")", hslRgbMatched = rgbRegex.exec(rgbColorString);
- if (!hslRgbMatched)
- throw new PolishedError(4, normalizedColor, rgbColorString);
- return {
- red: parseInt("" + hslRgbMatched[1], 10),
- green: parseInt("" + hslRgbMatched[2], 10),
- blue: parseInt("" + hslRgbMatched[3], 10)
- };
- }
- var hslaMatched = hslaRegex.exec(normalizedColor.substring(0, 50));
- if (hslaMatched) {
- var _hue = parseInt("" + hslaMatched[1], 10), _saturation = parseInt("" + hslaMatched[2], 10) / 100, _lightness = parseInt("" + hslaMatched[3], 10) / 100, _rgbColorString = "rgb(" + hslToRgb(_hue, _saturation, _lightness) + ")", _hslRgbMatched = rgbRegex.exec(_rgbColorString);
- if (!_hslRgbMatched)
- throw new PolishedError(4, normalizedColor, _rgbColorString);
- return {
- red: parseInt("" + _hslRgbMatched[1], 10),
- green: parseInt("" + _hslRgbMatched[2], 10),
- blue: parseInt("" + _hslRgbMatched[3], 10),
- alpha: parseFloat("" + hslaMatched[4]) > 1 ? parseFloat("" + hslaMatched[4]) / 100 : parseFloat("" + hslaMatched[4])
- };
- }
- throw new PolishedError(5);
- }
- function rgbToHsl(color2) {
- var red = color2.red / 255, green = color2.green / 255, blue = color2.blue / 255, max2 = Math.max(red, green, blue), min2 = Math.min(red, green, blue), lightness = (max2 + min2) / 2;
- if (max2 === min2)
- return color2.alpha !== void 0 ? {
- hue: 0,
- saturation: 0,
- lightness,
- alpha: color2.alpha
- } : {
- hue: 0,
- saturation: 0,
- lightness
- };
- var hue, delta = max2 - min2, saturation = lightness > 0.5 ? delta / (2 - max2 - min2) : delta / (max2 + min2);
- switch (max2) {
- case red:
- hue = (green - blue) / delta + (green < blue ? 6 : 0);
- break;
- case green:
- hue = (blue - red) / delta + 2;
- break;
- default:
- hue = (red - green) / delta + 4;
- break;
- }
- return hue *= 60, color2.alpha !== void 0 ? {
- hue,
- saturation,
- lightness,
- alpha: color2.alpha
- } : {
- hue,
- saturation,
- lightness
- };
- }
- function parseToHsl(color2) {
- return rgbToHsl(parseToRgb(color2));
- }
- function numberToHex(value) {
- var hex3 = value.toString(16);
- return hex3.length === 1 ? "0" + hex3 : hex3;
- }
- function colorToHex(color2) {
- return numberToHex(Math.round(color2 * 255));
- }
- function convertToHex(red, green, blue) {
- return reduceHexValue$1("#" + colorToHex(red) + colorToHex(green) + colorToHex(blue));
- }
- function hslToHex(hue, saturation, lightness) {
- return hslToRgb(hue, saturation, lightness, convertToHex);
- }
- function hsl(value, saturation, lightness) {
- if (typeof value == "number" && typeof saturation == "number" && typeof lightness == "number")
- return hslToHex(value, saturation, lightness);
- if (typeof value == "object" && saturation === void 0 && lightness === void 0)
- return hslToHex(value.hue, value.saturation, value.lightness);
- throw new PolishedError(1);
- }
- function hsla(value, saturation, lightness, alpha) {
- if (typeof value == "number" && typeof saturation == "number" && typeof lightness == "number" && typeof alpha == "number")
- return alpha >= 1 ? hslToHex(value, saturation, lightness) : "rgba(" + hslToRgb(value, saturation, lightness) + "," + alpha + ")";
- if (typeof value == "object" && saturation === void 0 && lightness === void 0 && alpha === void 0)
- return value.alpha >= 1 ? hslToHex(value.hue, value.saturation, value.lightness) : "rgba(" + hslToRgb(value.hue, value.saturation, value.lightness) + "," + value.alpha + ")";
- throw new PolishedError(2);
- }
- function rgb(value, green, blue) {
- if (typeof value == "number" && typeof green == "number" && typeof blue == "number")
- return reduceHexValue$1("#" + numberToHex(value) + numberToHex(green) + numberToHex(blue));
- if (typeof value == "object" && green === void 0 && blue === void 0)
- return reduceHexValue$1("#" + numberToHex(value.red) + numberToHex(value.green) + numberToHex(value.blue));
- throw new PolishedError(6);
- }
- function rgba(firstValue, secondValue, thirdValue, fourthValue) {
- if (typeof firstValue == "string" && typeof secondValue == "number") {
- var rgbValue = parseToRgb(firstValue);
- return "rgba(" + rgbValue.red + "," + rgbValue.green + "," + rgbValue.blue + "," + secondValue + ")";
- } else {
- if (typeof firstValue == "number" && typeof secondValue == "number" && typeof thirdValue == "number" && typeof fourthValue == "number")
- return fourthValue >= 1 ? rgb(firstValue, secondValue, thirdValue) : "rgba(" + firstValue + "," + secondValue + "," + thirdValue + "," + fourthValue + ")";
- if (typeof firstValue == "object" && secondValue === void 0 && thirdValue === void 0 && fourthValue === void 0)
- return firstValue.alpha >= 1 ? rgb(firstValue.red, firstValue.green, firstValue.blue) : "rgba(" + firstValue.red + "," + firstValue.green + "," + firstValue.blue + "," + firstValue.alpha + ")";
- }
- throw new PolishedError(7);
- }
- function toColorString(color2) {
- if (typeof color2 != "object") throw new PolishedError(8);
- if (isRgba(color2)) return rgba(color2);
- if (isRgb(color2)) return rgb(color2);
- if (isHsla(color2)) return hsla(color2);
- if (isHsl(color2)) return hsl(color2);
- throw new PolishedError(8);
- }
- function curried(f4, length2, acc) {
- return function() {
- var combined = acc.concat(Array.prototype.slice.call(arguments));
- return combined.length >= length2 ? f4.apply(this, combined) : curried(f4, length2, combined);
- };
- }
- function curry(f4) {
- return curried(f4, f4.length, []);
- }
- function adjustHue(degree, color2) {
- if (color2 === "transparent") return color2;
- var hslColor = parseToHsl(color2);
- return toColorString(_extends({}, hslColor, {
- hue: hslColor.hue + parseFloat(degree)
- }));
- }
- function guard(lowerBoundary, upperBoundary, value) {
- return Math.max(lowerBoundary, Math.min(upperBoundary, value));
- }
- function darken(amount, color2) {
- if (color2 === "transparent") return color2;
- var hslColor = parseToHsl(color2);
- return toColorString(_extends({}, hslColor, {
- lightness: guard(0, 1, hslColor.lightness - parseFloat(amount))
- }));
- }
- function desaturate(amount, color2) {
- if (color2 === "transparent") return color2;
- var hslColor = parseToHsl(color2);
- return toColorString(_extends({}, hslColor, {
- saturation: guard(0, 1, hslColor.saturation - parseFloat(amount))
- }));
- }
- function lighten(amount, color2) {
- if (color2 === "transparent") return color2;
- var hslColor = parseToHsl(color2);
- return toColorString(_extends({}, hslColor, {
- lightness: guard(0, 1, hslColor.lightness + parseFloat(amount))
- }));
- }
- function mix(weight, color2, otherColor) {
- if (color2 === "transparent") return otherColor;
- if (otherColor === "transparent") return color2;
- if (weight === 0) return otherColor;
- var parsedColor1 = parseToRgb(color2), color1 = _extends({}, parsedColor1, {
- alpha: typeof parsedColor1.alpha == "number" ? parsedColor1.alpha : 1
- }), parsedColor2 = parseToRgb(otherColor), color22 = _extends({}, parsedColor2, {
- alpha: typeof parsedColor2.alpha == "number" ? parsedColor2.alpha : 1
- }), alphaDelta = color1.alpha - color22.alpha, x = parseFloat(weight) * 2 - 1, y = x * alphaDelta === -1 ? x : x + alphaDelta, z = 1 + x * alphaDelta, weight1 = (y / z + 1) / 2, weight2 = 1 - weight1, mixedColor = {
- red: Math.floor(color1.red * weight1 + color22.red * weight2),
- green: Math.floor(color1.green * weight1 + color22.green * weight2),
- blue: Math.floor(color1.blue * weight1 + color22.blue * weight2),
- alpha: color1.alpha * parseFloat(weight) + color22.alpha * (1 - parseFloat(weight))
- };
- return rgba(mixedColor);
- }
- function opacify(amount, color2) {
- if (color2 === "transparent") return color2;
- var parsedColor = parseToRgb(color2), alpha = typeof parsedColor.alpha == "number" ? parsedColor.alpha : 1, colorWithAlpha = _extends({}, parsedColor, {
- alpha: guard(0, 1, (alpha * 100 + parseFloat(amount) * 100) / 100)
- });
- return rgba(colorWithAlpha);
- }
- function saturate(amount, color2) {
- if (color2 === "transparent") return color2;
- var hslColor = parseToHsl(color2);
- return toColorString(_extends({}, hslColor, {
- saturation: guard(0, 1, hslColor.saturation + parseFloat(amount))
- }));
- }
- function setHue(hue, color2) {
- return color2 === "transparent" ? color2 : toColorString(_extends({}, parseToHsl(color2), {
- hue: parseFloat(hue)
- }));
- }
- function setLightness(lightness, color2) {
- return color2 === "transparent" ? color2 : toColorString(_extends({}, parseToHsl(color2), {
- lightness: parseFloat(lightness)
- }));
- }
- function setSaturation(saturation, color2) {
- return color2 === "transparent" ? color2 : toColorString(_extends({}, parseToHsl(color2), {
- saturation: parseFloat(saturation)
- }));
- }
- function shade(percentage, color2) {
- return color2 === "transparent" ? color2 : mix$1(parseFloat(percentage), "rgb(0, 0, 0)", color2);
- }
- function tint(percentage, color2) {
- return color2 === "transparent" ? color2 : mix$1(parseFloat(percentage), "rgb(255, 255, 255)", color2);
- }
- function transparentize(amount, color2) {
- if (color2 === "transparent") return color2;
- var parsedColor = parseToRgb(color2), alpha = typeof parsedColor.alpha == "number" ? parsedColor.alpha : 1, colorWithAlpha = _extends({}, parsedColor, {
- alpha: guard(0, 1, +(alpha * 100 - parseFloat(amount) * 100).toFixed(2) / 100)
- });
- return rgba(colorWithAlpha);
- }
- var PolishedError, cssRegex$1, pxtoFactory, pixelsto, em, rem, namedColorMap, hexRegex, hexRgbaRegex, reducedHexRegex, reducedRgbaHexRegex, rgbRegex, rgbaRegex, hslRegex, hslaRegex, reduceHexValue, reduceHexValue$1, isRgb, isRgba, isHsl, isHsla, curriedAdjustHue, curriedDarken, curriedDarken$1, curriedDesaturate, curriedLighten, curriedLighten$1, curriedMix, mix$1, curriedOpacify, curriedOpacify$1, curriedSaturate, curriedSetHue, curriedSetLightness, curriedSetSaturation, curriedShade, curriedTint, curriedTransparentize, curriedTransparentize$1, init_polished_esm = __esm({
- "../../node_modules/polished/dist/polished.esm.js"() {
- init_extends();
- init_assertThisInitialized();
- init_inheritsLoose();
- init_wrapNativeSuper();
- init_taggedTemplateLiteralLoose();
- PolishedError = (function(_Error) {
- _inheritsLoose(PolishedError2, _Error);
- function PolishedError2(code) {
- var _this;
- if (1)
- _this = _Error.call(this, "An error occurred. See https://github.com/styled-components/polished/blob/main/src/internalHelpers/errors.md#" + code + " for more information.") || this;
- else
- for (var _len2, args, _key2; _key2 < _len2; _key2++)
- ;
- return _assertThisInitialized(_this);
- }
- return PolishedError2;
- })(_wrapNativeSuper(Error));
- cssRegex$1 = /^([+-]?(?:\d+|\d*\.\d+))([a-z]*|%)$/;
- pxtoFactory = function(to) {
- return function(pxval, base) {
- base === void 0 && (base = "16px");
- var newPxval = pxval, newBase = base;
- if (typeof pxval == "string") {
- if (!endsWith(pxval, "px"))
- throw new PolishedError(69, to, pxval);
- newPxval = stripUnit(pxval);
- }
- if (typeof base == "string") {
- if (!endsWith(base, "px"))
- throw new PolishedError(70, to, base);
- newBase = stripUnit(base);
- }
- if (typeof newPxval == "string")
- throw new PolishedError(71, pxval, to);
- if (typeof newBase == "string")
- throw new PolishedError(72, base, to);
- return "" + newPxval / newBase + to;
- };
- }, pixelsto = pxtoFactory, em = pixelsto("em"), rem = pixelsto("rem");
- namedColorMap = {
- aliceblue: "f0f8ff",
- antiquewhite: "faebd7",
- aqua: "00ffff",
- aquamarine: "7fffd4",
- azure: "f0ffff",
- beige: "f5f5dc",
- bisque: "ffe4c4",
- black: "000",
- 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",
- gold: "ffd700",
- goldenrod: "daa520",
- gray: "808080",
- green: "008000",
- greenyellow: "adff2f",
- grey: "808080",
- honeydew: "f0fff0",
- hotpink: "ff69b4",
- indianred: "cd5c5c",
- indigo: "4b0082",
- ivory: "fffff0",
- khaki: "f0e68c",
- lavender: "e6e6fa",
- lavenderblush: "fff0f5",
- 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: "789",
- lightslategrey: "789",
- lightsteelblue: "b0c4de",
- lightyellow: "ffffe0",
- lime: "0f0",
- limegreen: "32cd32",
- linen: "faf0e6",
- magenta: "f0f",
- 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: "639",
- red: "f00",
- 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: "fff",
- whitesmoke: "f5f5f5",
- yellow: "ff0",
- yellowgreen: "9acd32"
- };
- hexRegex = /^#[a-fA-F0-9]{6}$/, hexRgbaRegex = /^#[a-fA-F0-9]{8}$/, reducedHexRegex = /^#[a-fA-F0-9]{3}$/, reducedRgbaHexRegex = /^#[a-fA-F0-9]{4}$/, rgbRegex = /^rgb\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*\)$/i, rgbaRegex = /^rgb(?:a)?\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i, hslRegex = /^hsl\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*\)$/i, hslaRegex = /^hsl(?:a)?\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i;
- reduceHexValue = function(value) {
- return value.length === 7 && value[1] === value[2] && value[3] === value[4] && value[5] === value[6] ? "#" + value[1] + value[3] + value[5] : value;
- }, reduceHexValue$1 = reduceHexValue;
- isRgb = function(color2) {
- return typeof color2.red == "number" && typeof color2.green == "number" && typeof color2.blue == "number" && (typeof color2.alpha != "number" || typeof color2.alpha > "u");
- }, isRgba = function(color2) {
- return typeof color2.red == "number" && typeof color2.green == "number" && typeof color2.blue == "number" && typeof color2.alpha == "number";
- }, isHsl = function(color2) {
- return typeof color2.hue == "number" && typeof color2.saturation == "number" && typeof color2.lightness == "number" && (typeof color2.alpha != "number" || typeof color2.alpha > "u");
- }, isHsla = function(color2) {
- return typeof color2.hue == "number" && typeof color2.saturation == "number" && typeof color2.lightness == "number" && typeof color2.alpha == "number";
- };
- curriedAdjustHue = curry(adjustHue);
- curriedDarken = curry(darken), curriedDarken$1 = curriedDarken;
- curriedDesaturate = curry(desaturate);
- curriedLighten = curry(lighten), curriedLighten$1 = curriedLighten;
- curriedMix = curry(mix), mix$1 = curriedMix;
- curriedOpacify = curry(opacify), curriedOpacify$1 = curriedOpacify;
- curriedSaturate = curry(saturate);
- curriedSetHue = curry(setHue);
- curriedSetLightness = curry(setLightness);
- curriedSetSaturation = curry(setSaturation);
- curriedShade = curry(shade);
- curriedTint = curry(tint);
- curriedTransparentize = curry(transparentize), curriedTransparentize$1 = curriedTransparentize;
- }
- });
-
- // src/theming/utils.ts
- var globalWindow, mkColor, isColorString, isValidColorForPolished, applyPolished, colorFactory, lightenColor, darkenColor, getPreferredColorScheme, init_utils = __esm({
- "src/theming/utils.ts"() {
- "use strict";
- init_client_logger();
- init_dist();
- init_polished_esm();
- ({ window: globalWindow } = scope), mkColor = (color2) => ({ color: color2 }), isColorString = (color2) => typeof color2 != "string" ? (logger.warn(
- `Color passed to theme object should be a string. Instead ${color2}(${typeof color2}) was passed.`
- ), !1) : !0, isValidColorForPolished = (color2) => !/(gradient|var|calc)/.test(color2), applyPolished = (type5, color2) => type5 === "darken" ? rgba(`${curriedDarken$1(1, color2)}`, 0.95) : type5 === "lighten" ? rgba(`${curriedLighten$1(1, color2)}`, 0.95) : color2, colorFactory = (type5) => (color2) => {
- if (!isColorString(color2) || !isValidColorForPolished(color2))
- return color2;
- try {
- return applyPolished(type5, color2);
- } catch {
- return color2;
- }
- }, lightenColor = colorFactory("lighten"), darkenColor = colorFactory("darken"), getPreferredColorScheme = () => !globalWindow || !globalWindow.matchMedia ? "light" : globalWindow.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
- }
- });
-
- // src/theming/create.ts
- var create_exports = {};
- __export(create_exports, {
- create: () => create,
- themes: () => themes
- });
- var themesBase, preferredColorScheme, themes, create, init_create = __esm({
- "src/theming/create.ts"() {
- "use strict";
- init_dark();
- init_light();
- init_utils();
- themesBase = {
- light: light_default,
- dark: dark_default
- }, preferredColorScheme = getPreferredColorScheme(), themes = {
- ...themesBase,
- normal: themesBase[preferredColorScheme]
- }, create = (vars = {
- base: preferredColorScheme
- }, rest) => {
- let inherit = {
- // We always inherit the preferred color scheme.
- ...themes[preferredColorScheme],
- // And then the declared theme base if it exists.
- ...themes[vars.base] || {},
- // And then the actual theme content.
- ...vars,
- // If no theme base was declared, we declare the preferred color scheme as the base.
- base: themes[vars.base] ? vars.base : preferredColorScheme
- };
- return {
- ...rest,
- ...inherit,
- barSelectedColor: vars.barSelectedColor || inherit.colorSecondary
- };
- };
- }
- });
-
- // src/theming/animation.ts
- var easing, rotate360, glow, float, jiggle, inlineGlow, hoverable, animation, init_animation = __esm({
- "src/theming/animation.ts"() {
- "use strict";
- init_emotion_react_browser_esm();
- easing = {
- rubber: "cubic-bezier(0.175, 0.885, 0.335, 1.05)"
- }, rotate360 = keyframes`
- from {
- transform: rotate(0deg);
- }
- to {
- transform: rotate(360deg);
- }
- `, glow = keyframes`
- 0%, 100% { opacity: 1; }
- 50% { opacity: .4; }
- `, float = keyframes`
- 0% { transform: translateY(1px); }
- 25% { transform: translateY(0px); }
- 50% { transform: translateY(-3px); }
- 100% { transform: translateY(1px); }
- `, jiggle = keyframes`
- 0%, 100% { transform:translate3d(0,0,0); }
- 12.5%, 62.5% { transform:translate3d(-4px,0,0); }
- 37.5%, 87.5% { transform: translate3d(4px,0,0); }
- `, inlineGlow = css`
- animation: ${glow} 1.5s ease-in-out infinite;
- color: transparent;
- cursor: progress;
- `, hoverable = css`
- transition: all 150ms ease-out;
- transform: translate3d(0, 0, 0);
-
- &:hover {
- transform: translate3d(0, -2px, 0);
- }
-
- &:active {
- transform: translate3d(0, 0, 0);
- }
- `, animation = {
- rotate360,
- glow,
- float,
- jiggle,
- inlineGlow,
- hoverable
- };
- }
- });
-
- // src/theming/modules/syntax.ts
- var chromeDark, chromeLight, convertColors, create2, init_syntax = __esm({
- "src/theming/modules/syntax.ts"() {
- "use strict";
- init_utils();
- chromeDark = {
- BASE_FONT_FAMILY: "Menlo, monospace",
- BASE_FONT_SIZE: "11px",
- BASE_LINE_HEIGHT: 1.2,
- BASE_BACKGROUND_COLOR: "rgb(36, 36, 36)",
- BASE_COLOR: "rgb(213, 213, 213)",
- OBJECT_PREVIEW_ARRAY_MAX_PROPERTIES: 10,
- OBJECT_PREVIEW_OBJECT_MAX_PROPERTIES: 5,
- OBJECT_NAME_COLOR: "rgb(227, 110, 236)",
- OBJECT_VALUE_NULL_COLOR: "rgb(127, 127, 127)",
- OBJECT_VALUE_UNDEFINED_COLOR: "rgb(127, 127, 127)",
- OBJECT_VALUE_REGEXP_COLOR: "rgb(233, 63, 59)",
- OBJECT_VALUE_STRING_COLOR: "rgb(233, 63, 59)",
- OBJECT_VALUE_SYMBOL_COLOR: "rgb(233, 63, 59)",
- OBJECT_VALUE_NUMBER_COLOR: "hsl(252, 100%, 75%)",
- OBJECT_VALUE_BOOLEAN_COLOR: "hsl(252, 100%, 75%)",
- OBJECT_VALUE_FUNCTION_PREFIX_COLOR: "rgb(85, 106, 242)",
- HTML_TAG_COLOR: "rgb(93, 176, 215)",
- HTML_TAGNAME_COLOR: "rgb(93, 176, 215)",
- HTML_TAGNAME_TEXT_TRANSFORM: "lowercase",
- HTML_ATTRIBUTE_NAME_COLOR: "rgb(155, 187, 220)",
- HTML_ATTRIBUTE_VALUE_COLOR: "rgb(242, 151, 102)",
- HTML_COMMENT_COLOR: "rgb(137, 137, 137)",
- HTML_DOCTYPE_COLOR: "rgb(192, 192, 192)",
- ARROW_COLOR: "rgb(145, 145, 145)",
- ARROW_MARGIN_RIGHT: 3,
- ARROW_FONT_SIZE: 12,
- ARROW_ANIMATION_DURATION: "0",
- TREENODE_FONT_FAMILY: "Menlo, monospace",
- TREENODE_FONT_SIZE: "11px",
- TREENODE_LINE_HEIGHT: 1.2,
- TREENODE_PADDING_LEFT: 12,
- TABLE_BORDER_COLOR: "rgb(85, 85, 85)",
- TABLE_TH_BACKGROUND_COLOR: "rgb(44, 44, 44)",
- TABLE_TH_HOVER_COLOR: "rgb(48, 48, 48)",
- TABLE_SORT_ICON_COLOR: "black",
- // 'rgb(48, 57, 66)',
- TABLE_DATA_BACKGROUND_IMAGE: "linear-gradient(rgba(255, 255, 255, 0), rgba(255, 255, 255, 0) 50%, rgba(51, 139, 255, 0.0980392) 50%, rgba(51, 139, 255, 0.0980392))",
- TABLE_DATA_BACKGROUND_SIZE: "128px 32px"
- }, chromeLight = {
- BASE_FONT_FAMILY: "Menlo, monospace",
- BASE_FONT_SIZE: "11px",
- BASE_LINE_HEIGHT: 1.2,
- BASE_BACKGROUND_COLOR: "white",
- BASE_COLOR: "black",
- OBJECT_PREVIEW_ARRAY_MAX_PROPERTIES: 10,
- OBJECT_PREVIEW_OBJECT_MAX_PROPERTIES: 5,
- OBJECT_NAME_COLOR: "rgb(136, 19, 145)",
- OBJECT_VALUE_NULL_COLOR: "rgb(128, 128, 128)",
- OBJECT_VALUE_UNDEFINED_COLOR: "rgb(128, 128, 128)",
- OBJECT_VALUE_REGEXP_COLOR: "rgb(196, 26, 22)",
- OBJECT_VALUE_STRING_COLOR: "rgb(196, 26, 22)",
- OBJECT_VALUE_SYMBOL_COLOR: "rgb(196, 26, 22)",
- OBJECT_VALUE_NUMBER_COLOR: "rgb(28, 0, 207)",
- OBJECT_VALUE_BOOLEAN_COLOR: "rgb(28, 0, 207)",
- OBJECT_VALUE_FUNCTION_PREFIX_COLOR: "rgb(13, 34, 170)",
- HTML_TAG_COLOR: "rgb(168, 148, 166)",
- HTML_TAGNAME_COLOR: "rgb(136, 18, 128)",
- HTML_TAGNAME_TEXT_TRANSFORM: "lowercase",
- HTML_ATTRIBUTE_NAME_COLOR: "rgb(153, 69, 0)",
- HTML_ATTRIBUTE_VALUE_COLOR: "rgb(26, 26, 166)",
- HTML_COMMENT_COLOR: "rgb(35, 110, 37)",
- HTML_DOCTYPE_COLOR: "rgb(192, 192, 192)",
- ARROW_COLOR: "#6e6e6e",
- ARROW_MARGIN_RIGHT: 3,
- ARROW_FONT_SIZE: 12,
- ARROW_ANIMATION_DURATION: "0",
- TREENODE_FONT_FAMILY: "Menlo, monospace",
- TREENODE_FONT_SIZE: "11px",
- TREENODE_LINE_HEIGHT: 1.2,
- TREENODE_PADDING_LEFT: 12,
- TABLE_BORDER_COLOR: "#aaa",
- TABLE_TH_BACKGROUND_COLOR: "#eee",
- TABLE_TH_HOVER_COLOR: "hsla(0, 0%, 90%, 1)",
- TABLE_SORT_ICON_COLOR: "#6e6e6e",
- TABLE_DATA_BACKGROUND_IMAGE: "linear-gradient(to bottom, white, white 50%, rgb(234, 243, 255) 50%, rgb(234, 243, 255))",
- TABLE_DATA_BACKGROUND_SIZE: "128px 32px"
- }, convertColors = (colors3) => Object.entries(colors3).reduce((acc, [k, v]) => ({ ...acc, [k]: mkColor(v) }), {}), create2 = ({ colors: colors3, mono }) => {
- let colorsObjs = convertColors(colors3);
- return {
- token: {
- fontFamily: mono,
- WebkitFontSmoothing: "antialiased",
- "&.tag": colorsObjs.red3,
- "&.comment": { ...colorsObjs.green1, fontStyle: "italic" },
- "&.prolog": { ...colorsObjs.green1, fontStyle: "italic" },
- "&.doctype": { ...colorsObjs.green1, fontStyle: "italic" },
- "&.cdata": { ...colorsObjs.green1, fontStyle: "italic" },
- "&.string": colorsObjs.red1,
- "&.url": colorsObjs.cyan1,
- "&.symbol": colorsObjs.cyan1,
- "&.number": colorsObjs.cyan1,
- "&.boolean": colorsObjs.cyan1,
- "&.variable": colorsObjs.cyan1,
- "&.constant": colorsObjs.cyan1,
- "&.inserted": colorsObjs.cyan1,
- "&.atrule": colorsObjs.blue1,
- "&.keyword": colorsObjs.blue1,
- "&.attr-value": colorsObjs.blue1,
- "&.punctuation": colorsObjs.gray1,
- "&.operator": colorsObjs.gray1,
- "&.function": colorsObjs.gray1,
- "&.deleted": colorsObjs.red2,
- "&.important": {
- fontWeight: "bold"
- },
- "&.bold": {
- fontWeight: "bold"
- },
- "&.italic": {
- fontStyle: "italic"
- },
- "&.class-name": colorsObjs.cyan2,
- "&.selector": colorsObjs.red3,
- "&.attr-name": colorsObjs.red4,
- "&.property": colorsObjs.red4,
- "&.regex": colorsObjs.red4,
- "&.entity": colorsObjs.red4,
- "&.directive.tag .tag": {
- background: "#ffff00",
- ...colorsObjs.gray1
- }
- },
- "language-json .token.boolean": colorsObjs.blue1,
- "language-json .token.number": colorsObjs.blue1,
- "language-json .token.property": colorsObjs.cyan2,
- namespace: {
- opacity: 0.7
- }
- };
- };
- }
- });
-
- // src/theming/convert.ts
- var lightSyntaxColors, darkSyntaxColors, createColors, convert, init_convert = __esm({
- "src/theming/convert.ts"() {
- "use strict";
- init_polished_esm();
- init_animation();
- init_base();
- init_create();
- init_syntax();
- init_utils();
- lightSyntaxColors = {
- green1: "#008000",
- red1: "#A31515",
- red2: "#9a050f",
- red3: "#800000",
- red4: "#eb0000",
- gray1: "#393A34",
- cyan1: "#008380",
- cyan2: "#007ca0",
- blue1: "#0000ff",
- blue2: "#00009f"
- }, darkSyntaxColors = {
- green1: "#95999D",
- red1: "#92C379",
- red2: "#9a050f",
- red3: "#A8FF60",
- red4: "#96CBFE",
- gray1: "#EDEDED",
- cyan1: "#C6C5FE",
- cyan2: "#FFFFB6",
- blue1: "#B474DD",
- blue2: "#00009f"
- }, createColors = (vars) => ({
- // Changeable colors
- primary: vars.colorPrimary,
- secondary: vars.colorSecondary,
- tertiary: color.tertiary,
- ancillary: color.ancillary,
- // Complimentary
- orange: color.orange,
- gold: color.gold,
- green: color.green,
- seafoam: color.seafoam,
- purple: color.purple,
- ultraviolet: color.ultraviolet,
- // Monochrome
- lightest: color.lightest,
- lighter: color.lighter,
- light: color.light,
- mediumlight: color.mediumlight,
- medium: color.medium,
- mediumdark: color.mediumdark,
- dark: color.dark,
- darker: color.darker,
- darkest: color.darkest,
- // For borders
- border: color.border,
- // Status
- positive: color.positive,
- negative: color.negative,
- warning: color.warning,
- critical: color.critical,
- defaultText: vars.textColor || color.darkest,
- inverseText: vars.textInverseColor || color.lightest,
- positiveText: color.positiveText,
- negativeText: color.negativeText,
- warningText: color.warningText
- }), convert = (inherit = themes[getPreferredColorScheme()]) => {
- let {
- base,
- colorPrimary,
- colorSecondary,
- appBg,
- appContentBg,
- appHoverBg,
- appPreviewBg,
- appBorderColor,
- appBorderRadius,
- fontBase,
- fontCode,
- textColor,
- textInverseColor,
- barTextColor,
- barHoverColor,
- barSelectedColor,
- barBg,
- buttonBg,
- buttonBorder,
- booleanBg,
- booleanSelectedBg,
- inputBg,
- inputBorder,
- inputTextColor,
- inputBorderRadius,
- brandTitle,
- brandUrl,
- brandImage,
- brandTarget,
- gridCellSize,
- ...rest
- } = inherit;
- return {
- ...rest,
- base,
- ...base === "dark" ? tokens.dark : tokens.light,
- color: createColors(inherit),
- background: {
- app: appBg,
- bar: barBg,
- content: appContentBg,
- preview: appPreviewBg,
- gridCellSize: gridCellSize || background.gridCellSize,
- hoverable: appHoverBg,
- positive: background.positive,
- negative: background.negative,
- warning: background.warning,
- critical: background.critical
- },
- typography: {
- fonts: {
- base: fontBase,
- mono: fontCode
- },
- weight: typography.weight,
- size: typography.size
- },
- animation,
- easing,
- input: {
- background: inputBg,
- border: inputBorder,
- borderRadius: inputBorderRadius,
- color: inputTextColor
- },
- button: {
- background: buttonBg || inputBg,
- border: buttonBorder || inputBorder
- },
- boolean: {
- background: booleanBg || inputBorder,
- selectedBackground: booleanSelectedBg || inputBg
- },
- // UI
- layoutMargin: 10,
- appBorderColor,
- appBorderRadius,
- // Toolbar default/active colors
- barTextColor,
- barHoverColor: barHoverColor || colorSecondary,
- barSelectedColor: barSelectedColor || colorSecondary,
- barBg,
- // Brand logo/text
- brand: {
- title: brandTitle,
- url: brandUrl,
- image: brandImage || (brandTitle ? null : void 0),
- target: brandTarget
- },
- code: create2({
- colors: base === "dark" ? darkSyntaxColors : lightSyntaxColors,
- mono: fontCode
- }),
- // Addon actions theme
- // API example https://github.com/storybookjs/react-inspector/blob/master/src/styles/themes/chromeLight.tsx
- addonActionsTheme: {
- ...base === "dark" ? chromeDark : chromeLight,
- BASE_FONT_FAMILY: fontCode,
- BASE_FONT_SIZE: typography.size.s2 - 1,
- BASE_LINE_HEIGHT: "18px",
- BASE_BACKGROUND_COLOR: "transparent",
- BASE_COLOR: textColor,
- ARROW_COLOR: curriedOpacify$1(0.2, appBorderColor),
- ARROW_MARGIN_RIGHT: 4,
- ARROW_FONT_SIZE: 8,
- TREENODE_FONT_FAMILY: fontCode,
- TREENODE_FONT_SIZE: typography.size.s2 - 1,
- TREENODE_LINE_HEIGHT: "18px",
- TREENODE_PADDING_LEFT: 12
- }
- };
- };
- }
- });
-
- // ../../node_modules/deep-object-diff/mjs/utils.js
- var isEmpty, isObject4, hasOwnProperty5, makeObjectWithoutPrototype, init_utils2 = __esm({
- "../../node_modules/deep-object-diff/mjs/utils.js"() {
- isEmpty = (o) => Object.keys(o).length === 0, isObject4 = (o) => o != null && typeof o == "object", hasOwnProperty5 = (o, ...args) => Object.prototype.hasOwnProperty.call(o, ...args), makeObjectWithoutPrototype = () => /* @__PURE__ */ Object.create(null);
- }
- });
-
- // ../../node_modules/deep-object-diff/mjs/diff.js
- var init_diff = __esm({
- "../../node_modules/deep-object-diff/mjs/diff.js"() {
- init_utils2();
- }
- });
-
- // ../../node_modules/deep-object-diff/mjs/added.js
- var init_added = __esm({
- "../../node_modules/deep-object-diff/mjs/added.js"() {
- init_utils2();
- }
- });
-
- // ../../node_modules/deep-object-diff/mjs/deleted.js
- var deletedDiff, deleted_default, init_deleted = __esm({
- "../../node_modules/deep-object-diff/mjs/deleted.js"() {
- init_utils2();
- deletedDiff = (lhs, rhs) => lhs === rhs || !isObject4(lhs) || !isObject4(rhs) ? {} : Object.keys(lhs).reduce((acc, key) => {
- if (hasOwnProperty5(rhs, key)) {
- let difference2 = deletedDiff(lhs[key], rhs[key]);
- return isObject4(difference2) && isEmpty(difference2) || (acc[key] = difference2), acc;
- }
- return acc[key] = void 0, acc;
- }, makeObjectWithoutPrototype()), deleted_default = deletedDiff;
- }
- });
-
- // ../../node_modules/deep-object-diff/mjs/updated.js
- var init_updated = __esm({
- "../../node_modules/deep-object-diff/mjs/updated.js"() {
- init_utils2();
- }
- });
-
- // ../../node_modules/deep-object-diff/mjs/detailed.js
- var init_detailed = __esm({
- "../../node_modules/deep-object-diff/mjs/detailed.js"() {
- init_added();
- init_deleted();
- init_updated();
- }
- });
-
- // ../../node_modules/deep-object-diff/mjs/index.js
- var init_mjs = __esm({
- "../../node_modules/deep-object-diff/mjs/index.js"() {
- init_diff();
- init_added();
- init_deleted();
- init_updated();
- init_detailed();
- }
- });
-
- // src/theming/ensure.ts
- var ensure, init_ensure = __esm({
- "src/theming/ensure.ts"() {
- "use strict";
- init_client_logger();
- init_mjs();
- init_esm();
- init_convert();
- init_light();
- ensure = (input2) => {
- if (!input2)
- return convert(light_default);
- let missing = deleted_default(light_default, input2);
- return Object.keys(missing).length && logger.warn(
- dedent`
- Your theme is missing properties, you should update your theme!
-
- theme-data missing:
- `,
- missing
- ), convert(input2);
- };
- }
- });
-
- // src/theming/index.ts
- var theming_exports = {};
- __export(theming_exports, {
- CacheProvider: () => CacheProvider,
- ClassNames: () => ClassNames,
- Global: () => Global,
- ThemeProvider: () => ThemeProvider,
- background: () => background,
- color: () => color,
- convert: () => convert,
- create: () => create,
- createCache: () => createCache,
- createGlobal: () => createGlobal,
- createReset: () => createReset,
- css: () => css,
- darken: () => darkenColor,
- ensure: () => ensure,
- getPreferredColorScheme: () => getPreferredColorScheme,
- ignoreSsrWarning: () => ignoreSsrWarning,
- isPropValid: () => isPropValid,
- jsx: () => jsx,
- keyframes: () => keyframes,
- lighten: () => lightenColor,
- srOnlyStyles: () => srOnlyStyles,
- styled: () => styled,
- themes: () => themes,
- tokens: () => tokens,
- typography: () => typography,
- useTheme: () => useTheme,
- withTheme: () => withTheme
- });
- var ignoreSsrWarning, init_theming = __esm({
- "src/theming/index.ts"() {
- "use strict";
- init_emotion_styled_browser_esm();
- init_emotion_react_browser_esm();
- init_base();
- init_types();
- init_emotion_cache_browser_esm();
- init_emotion_is_prop_valid_esm();
- init_global();
- init_create();
- init_convert();
- init_ensure();
- init_utils();
- ignoreSsrWarning = "/* emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason */";
- }
- });
-
- // ../../node_modules/@babel/runtime/helpers/esm/typeof.js
- function _typeof(o) {
- "@babel/helpers - typeof";
- return _typeof = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(o2) {
- return typeof o2;
- } : function(o2) {
- return o2 && typeof Symbol == "function" && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2;
- }, _typeof(o);
- }
- var init_typeof = __esm({
- "../../node_modules/@babel/runtime/helpers/esm/typeof.js"() {
- }
- });
-
- // ../../node_modules/@babel/runtime/helpers/esm/toPrimitive.js
- function toPrimitive(t, r2) {
- if (_typeof(t) != "object" || !t) return t;
- var e = t[Symbol.toPrimitive];
- if (e !== void 0) {
- var i = e.call(t, r2 || "default");
- if (_typeof(i) != "object") return i;
- throw new TypeError("@@toPrimitive must return a primitive value.");
- }
- return (r2 === "string" ? String : Number)(t);
- }
- var init_toPrimitive = __esm({
- "../../node_modules/@babel/runtime/helpers/esm/toPrimitive.js"() {
- init_typeof();
- }
- });
-
- // ../../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js
- function toPropertyKey(t) {
- var i = toPrimitive(t, "string");
- return _typeof(i) == "symbol" ? i : i + "";
- }
- var init_toPropertyKey = __esm({
- "../../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js"() {
- init_typeof();
- init_toPrimitive();
- }
- });
-
- // ../../node_modules/@babel/runtime/helpers/esm/defineProperty.js
- function _defineProperty(e, r2, t) {
- return (r2 = toPropertyKey(r2)) in e ? Object.defineProperty(e, r2, {
- value: t,
- enumerable: !0,
- configurable: !0,
- writable: !0
- }) : e[r2] = t, e;
- }
- var init_defineProperty = __esm({
- "../../node_modules/@babel/runtime/helpers/esm/defineProperty.js"() {
- init_toPropertyKey();
- }
- });
-
- // ../../node_modules/react-syntax-highlighter/dist/esm/create-element.js
- function ownKeys(e, r2) {
- var t = Object.keys(e);
- if (Object.getOwnPropertySymbols) {
- var o = Object.getOwnPropertySymbols(e);
- r2 && (o = o.filter(function(r3) {
- return Object.getOwnPropertyDescriptor(e, r3).enumerable;
- })), t.push.apply(t, o);
- }
- return t;
- }
- function _objectSpread(e) {
- for (var r2 = 1; r2 < arguments.length; r2++) {
- var t = arguments[r2] != null ? arguments[r2] : {};
- r2 % 2 ? ownKeys(Object(t), !0).forEach(function(r3) {
- _defineProperty(e, r3, t[r3]);
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function(r3) {
- Object.defineProperty(e, r3, Object.getOwnPropertyDescriptor(t, r3));
- });
- }
- return e;
- }
- function powerSetPermutations(arr) {
- var arrLength = arr.length;
- if (arrLength === 0 || arrLength === 1) return arr;
- if (arrLength === 2)
- return [arr[0], arr[1], "".concat(arr[0], ".").concat(arr[1]), "".concat(arr[1], ".").concat(arr[0])];
- if (arrLength === 3)
- return [arr[0], arr[1], arr[2], "".concat(arr[0], ".").concat(arr[1]), "".concat(arr[0], ".").concat(arr[2]), "".concat(arr[1], ".").concat(arr[0]), "".concat(arr[1], ".").concat(arr[2]), "".concat(arr[2], ".").concat(arr[0]), "".concat(arr[2], ".").concat(arr[1]), "".concat(arr[0], ".").concat(arr[1], ".").concat(arr[2]), "".concat(arr[0], ".").concat(arr[2], ".").concat(arr[1]), "".concat(arr[1], ".").concat(arr[0], ".").concat(arr[2]), "".concat(arr[1], ".").concat(arr[2], ".").concat(arr[0]), "".concat(arr[2], ".").concat(arr[0], ".").concat(arr[1]), "".concat(arr[2], ".").concat(arr[1], ".").concat(arr[0])];
- if (arrLength >= 4)
- return [arr[0], arr[1], arr[2], arr[3], "".concat(arr[0], ".").concat(arr[1]), "".concat(arr[0], ".").concat(arr[2]), "".concat(arr[0], ".").concat(arr[3]), "".concat(arr[1], ".").concat(arr[0]), "".concat(arr[1], ".").concat(arr[2]), "".concat(arr[1], ".").concat(arr[3]), "".concat(arr[2], ".").concat(arr[0]), "".concat(arr[2], ".").concat(arr[1]), "".concat(arr[2], ".").concat(arr[3]), "".concat(arr[3], ".").concat(arr[0]), "".concat(arr[3], ".").concat(arr[1]), "".concat(arr[3], ".").concat(arr[2]), "".concat(arr[0], ".").concat(arr[1], ".").concat(arr[2]), "".concat(arr[0], ".").concat(arr[1], ".").concat(arr[3]), "".concat(arr[0], ".").concat(arr[2], ".").concat(arr[1]), "".concat(arr[0], ".").concat(arr[2], ".").concat(arr[3]), "".concat(arr[0], ".").concat(arr[3], ".").concat(arr[1]), "".concat(arr[0], ".").concat(arr[3], ".").concat(arr[2]), "".concat(arr[1], ".").concat(arr[0], ".").concat(arr[2]), "".concat(arr[1], ".").concat(arr[0], ".").concat(arr[3]), "".concat(arr[1], ".").concat(arr[2], ".").concat(arr[0]), "".concat(arr[1], ".").concat(arr[2], ".").concat(arr[3]), "".concat(arr[1], ".").concat(arr[3], ".").concat(arr[0]), "".concat(arr[1], ".").concat(arr[3], ".").concat(arr[2]), "".concat(arr[2], ".").concat(arr[0], ".").concat(arr[1]), "".concat(arr[2], ".").concat(arr[0], ".").concat(arr[3]), "".concat(arr[2], ".").concat(arr[1], ".").concat(arr[0]), "".concat(arr[2], ".").concat(arr[1], ".").concat(arr[3]), "".concat(arr[2], ".").concat(arr[3], ".").concat(arr[0]), "".concat(arr[2], ".").concat(arr[3], ".").concat(arr[1]), "".concat(arr[3], ".").concat(arr[0], ".").concat(arr[1]), "".concat(arr[3], ".").concat(arr[0], ".").concat(arr[2]), "".concat(arr[3], ".").concat(arr[1], ".").concat(arr[0]), "".concat(arr[3], ".").concat(arr[1], ".").concat(arr[2]), "".concat(arr[3], ".").concat(arr[2], ".").concat(arr[0]), "".concat(arr[3], ".").concat(arr[2], ".").concat(arr[1]), "".concat(arr[0], ".").concat(arr[1], ".").concat(arr[2], ".").concat(arr[3]), "".concat(arr[0], ".").concat(arr[1], ".").concat(arr[3], ".").concat(arr[2]), "".concat(arr[0], ".").concat(arr[2], ".").concat(arr[1], ".").concat(arr[3]), "".concat(arr[0], ".").concat(arr[2], ".").concat(arr[3], ".").concat(arr[1]), "".concat(arr[0], ".").concat(arr[3], ".").concat(arr[1], ".").concat(arr[2]), "".concat(arr[0], ".").concat(arr[3], ".").concat(arr[2], ".").concat(arr[1]), "".concat(arr[1], ".").concat(arr[0], ".").concat(arr[2], ".").concat(arr[3]), "".concat(arr[1], ".").concat(arr[0], ".").concat(arr[3], ".").concat(arr[2]), "".concat(arr[1], ".").concat(arr[2], ".").concat(arr[0], ".").concat(arr[3]), "".concat(arr[1], ".").concat(arr[2], ".").concat(arr[3], ".").concat(arr[0]), "".concat(arr[1], ".").concat(arr[3], ".").concat(arr[0], ".").concat(arr[2]), "".concat(arr[1], ".").concat(arr[3], ".").concat(arr[2], ".").concat(arr[0]), "".concat(arr[2], ".").concat(arr[0], ".").concat(arr[1], ".").concat(arr[3]), "".concat(arr[2], ".").concat(arr[0], ".").concat(arr[3], ".").concat(arr[1]), "".concat(arr[2], ".").concat(arr[1], ".").concat(arr[0], ".").concat(arr[3]), "".concat(arr[2], ".").concat(arr[1], ".").concat(arr[3], ".").concat(arr[0]), "".concat(arr[2], ".").concat(arr[3], ".").concat(arr[0], ".").concat(arr[1]), "".concat(arr[2], ".").concat(arr[3], ".").concat(arr[1], ".").concat(arr[0]), "".concat(arr[3], ".").concat(arr[0], ".").concat(arr[1], ".").concat(arr[2]), "".concat(arr[3], ".").concat(arr[0], ".").concat(arr[2], ".").concat(arr[1]), "".concat(arr[3], ".").concat(arr[1], ".").concat(arr[0], ".").concat(arr[2]), "".concat(arr[3], ".").concat(arr[1], ".").concat(arr[2], ".").concat(arr[0]), "".concat(arr[3], ".").concat(arr[2], ".").concat(arr[0], ".").concat(arr[1]), "".concat(arr[3], ".").concat(arr[2], ".").concat(arr[1], ".").concat(arr[0])];
- }
- function getClassNameCombinations(classNames) {
- if (classNames.length === 0 || classNames.length === 1) return classNames;
- var key = classNames.join(".");
- return classNameCombinations[key] || (classNameCombinations[key] = powerSetPermutations(classNames)), classNameCombinations[key];
- }
- function createStyleObject(classNames) {
- var elementStyle = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, stylesheet = arguments.length > 2 ? arguments[2] : void 0, nonTokenClassNames = classNames.filter(function(className) {
- return className !== "token";
- }), classNamesCombinations = getClassNameCombinations(nonTokenClassNames);
- return classNamesCombinations.reduce(function(styleObject, className) {
- return _objectSpread(_objectSpread({}, styleObject), stylesheet[className]);
- }, elementStyle);
- }
- function createClassNameString(classNames) {
- return classNames.join(" ");
- }
- function createChildren(stylesheet, useInlineStyles) {
- var childrenCount = 0;
- return function(children) {
- return childrenCount += 1, children.map(function(child, i) {
- return createElement4({
- node: child,
- stylesheet,
- useInlineStyles,
- key: "code-segment-".concat(childrenCount, "-").concat(i)
- });
- });
- };
- }
- function createElement4(_ref) {
- var node2 = _ref.node, stylesheet = _ref.stylesheet, _ref$style = _ref.style, style = _ref$style === void 0 ? {} : _ref$style, useInlineStyles = _ref.useInlineStyles, key = _ref.key, properties = node2.properties, type5 = node2.type, TagName = node2.tagName, value = node2.value;
- if (type5 === "text")
- return value;
- if (TagName) {
- var childrenCreator = createChildren(stylesheet, useInlineStyles), props;
- if (!useInlineStyles)
- props = _objectSpread(_objectSpread({}, properties), {}, {
- className: createClassNameString(properties.className)
- });
- else {
- var allStylesheetSelectors = Object.keys(stylesheet).reduce(function(classes, selector) {
- return selector.split(".").forEach(function(className2) {
- classes.includes(className2) || classes.push(className2);
- }), classes;
- }, []), startingClassName = properties.className && properties.className.includes("token") ? ["token"] : [], className = properties.className && startingClassName.concat(properties.className.filter(function(className2) {
- return !allStylesheetSelectors.includes(className2);
- }));
- props = _objectSpread(_objectSpread({}, properties), {}, {
- className: createClassNameString(className) || void 0,
- style: createStyleObject(properties.className, Object.assign({}, properties.style, style), stylesheet)
- });
- }
- var children = childrenCreator(node2.children);
- return import_react8.default.createElement(TagName, _extends({
- key
- }, props), children);
- }
- }
- var import_react8, classNameCombinations, init_create_element = __esm({
- "../../node_modules/react-syntax-highlighter/dist/esm/create-element.js"() {
- init_extends();
- init_defineProperty();
- import_react8 = __toESM(require_react());
- classNameCombinations = {};
- }
- });
-
- // ../../node_modules/refractor/lang/bash.js
- var require_bash = __commonJS({
- "../../node_modules/refractor/lang/bash.js"(exports, module2) {
- "use strict";
- module2.exports = bash2;
- bash2.displayName = "bash";
- bash2.aliases = ["shell"];
- function bash2(Prism) {
- (function(Prism2) {
- var envVars = "\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b", commandAfterHeredoc = {
- pattern: /(^(["']?)\w+\2)[ \t]+\S.*/,
- lookbehind: !0,
- alias: "punctuation",
- // this looks reasonably well in all themes
- inside: null
- // see below
- }, insideString = {
- bash: commandAfterHeredoc,
- environment: {
- pattern: RegExp("\\$" + envVars),
- alias: "constant"
- },
- variable: [
- // [0]: Arithmetic Environment
- {
- pattern: /\$?\(\([\s\S]+?\)\)/,
- greedy: !0,
- inside: {
- // If there is a $ sign at the beginning highlight $(( and )) as variable
- variable: [
- {
- pattern: /(^\$\(\([\s\S]+)\)\)/,
- lookbehind: !0
- },
- /^\$\(\(/
- ],
- number: /\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,
- // Operators according to https://www.gnu.org/software/bash/manual/bashref.html#Shell-Arithmetic
- operator: /--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,
- // If there is no $ sign at the beginning highlight (( and )) as punctuation
- punctuation: /\(\(?|\)\)?|,|;/
- }
- },
- // [1]: Command Substitution
- {
- pattern: /\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,
- greedy: !0,
- inside: {
- variable: /^\$\(|^`|\)$|`$/
- }
- },
- // [2]: Brace expansion
- {
- pattern: /\$\{[^}]+\}/,
- greedy: !0,
- inside: {
- operator: /:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,
- punctuation: /[\[\]]/,
- environment: {
- pattern: RegExp("(\\{)" + envVars),
- lookbehind: !0,
- alias: "constant"
- }
- }
- },
- /\$(?:\w+|[#?*!@$])/
- ],
- // Escape sequences from echo and printf's manuals, and escaped quotes.
- entity: /\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/
- };
- Prism2.languages.bash = {
- shebang: {
- pattern: /^#!\s*\/.*/,
- alias: "important"
- },
- comment: {
- pattern: /(^|[^"{\\$])#.*/,
- lookbehind: !0
- },
- "function-name": [
- // a) function foo {
- // b) foo() {
- // c) function foo() {
- // but not “foo {”
- {
- // a) and c)
- pattern: /(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,
- lookbehind: !0,
- alias: "function"
- },
- {
- // b)
- pattern: /\b[\w-]+(?=\s*\(\s*\)\s*\{)/,
- alias: "function"
- }
- ],
- // Highlight variable names as variables in for and select beginnings.
- "for-or-select": {
- pattern: /(\b(?:for|select)\s+)\w+(?=\s+in\s)/,
- alias: "variable",
- lookbehind: !0
- },
- // Highlight variable names as variables in the left-hand part
- // of assignments (“=” and “+=”).
- "assign-left": {
- pattern: /(^|[\s;|&]|[<>]\()\w+(?=\+?=)/,
- inside: {
- environment: {
- pattern: RegExp("(^|[\\s;|&]|[<>]\\()" + envVars),
- lookbehind: !0,
- alias: "constant"
- }
- },
- alias: "variable",
- lookbehind: !0
- },
- string: [
- // Support for Here-documents https://en.wikipedia.org/wiki/Here_document
- {
- pattern: /((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,
- lookbehind: !0,
- greedy: !0,
- inside: insideString
- },
- // Here-document with quotes around the tag
- // → No expansion (so no “inside”).
- {
- pattern: /((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,
- lookbehind: !0,
- greedy: !0,
- inside: {
- bash: commandAfterHeredoc
- }
- },
- // “Normal” string
- {
- // https://www.gnu.org/software/bash/manual/html_node/Double-Quotes.html
- pattern: /(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,
- lookbehind: !0,
- greedy: !0,
- inside: insideString
- },
- {
- // https://www.gnu.org/software/bash/manual/html_node/Single-Quotes.html
- pattern: /(^|[^$\\])'[^']*'/,
- lookbehind: !0,
- greedy: !0
- },
- {
- // https://www.gnu.org/software/bash/manual/html_node/ANSI_002dC-Quoting.html
- pattern: /\$'(?:[^'\\]|\\[\s\S])*'/,
- greedy: !0,
- inside: {
- entity: insideString.entity
- }
- }
- ],
- environment: {
- pattern: RegExp("\\$?" + envVars),
- alias: "constant"
- },
- variable: insideString.variable,
- function: {
- pattern: /(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,
- lookbehind: !0
- },
- keyword: {
- pattern: /(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,
- lookbehind: !0
- },
- // https://www.gnu.org/software/bash/manual/html_node/Shell-Builtin-Commands.html
- builtin: {
- pattern: /(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,
- lookbehind: !0,
- // Alias added to make those easier to distinguish from strings.
- alias: "class-name"
- },
- boolean: {
- pattern: /(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,
- lookbehind: !0
- },
- "file-descriptor": {
- pattern: /\B&\d\b/,
- alias: "important"
- },
- operator: {
- // Lots of redirections here, but not just that.
- pattern: /\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,
- inside: {
- "file-descriptor": {
- pattern: /^\d/,
- alias: "important"
- }
- }
- },
- punctuation: /\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,
- number: {
- pattern: /(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,
- lookbehind: !0
- }
- }, commandAfterHeredoc.inside = Prism2.languages.bash;
- for (var toBeCopied = [
- "comment",
- "function-name",
- "for-or-select",
- "assign-left",
- "string",
- "environment",
- "function",
- "keyword",
- "builtin",
- "boolean",
- "file-descriptor",
- "operator",
- "punctuation",
- "number"
- ], inside = insideString.variable[1].inside, i = 0; i < toBeCopied.length; i++)
- inside[toBeCopied[i]] = Prism2.languages.bash[toBeCopied[i]];
- Prism2.languages.shell = Prism2.languages.bash;
- })(Prism);
- }
- }
- });
-
- // ../../node_modules/react-syntax-highlighter/dist/esm/languages/prism/bash.js
- var import_bash, bash_default, init_bash = __esm({
- "../../node_modules/react-syntax-highlighter/dist/esm/languages/prism/bash.js"() {
- import_bash = __toESM(require_bash()), bash_default = import_bash.default;
- }
- });
-
- // ../../node_modules/refractor/lang/css.js
- var require_css = __commonJS({
- "../../node_modules/refractor/lang/css.js"(exports, module2) {
- "use strict";
- module2.exports = css3;
- css3.displayName = "css";
- css3.aliases = [];
- function css3(Prism) {
- (function(Prism2) {
- var string = /(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;
- Prism2.languages.css = {
- comment: /\/\*[\s\S]*?\*\//,
- atrule: {
- pattern: /@[\w-](?:[^;{\s]|\s+(?![\s{]))*(?:;|(?=\s*\{))/,
- inside: {
- rule: /^@[\w-]+/,
- "selector-function-argument": {
- pattern: /(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,
- lookbehind: !0,
- alias: "selector"
- },
- keyword: {
- pattern: /(^|[^\w-])(?:and|not|only|or)(?![\w-])/,
- lookbehind: !0
- }
- // See rest below
- }
- },
- url: {
- // https://drafts.csswg.org/css-values-3/#urls
- pattern: RegExp(
- "\\burl\\((?:" + string.source + "|" + /(?:[^\\\r\n()"']|\\[\s\S])*/.source + ")\\)",
- "i"
- ),
- greedy: !0,
- inside: {
- function: /^url/i,
- punctuation: /^\(|\)$/,
- string: {
- pattern: RegExp("^" + string.source + "$"),
- alias: "url"
- }
- }
- },
- selector: {
- pattern: RegExp(
- `(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|` + string.source + ")*(?=\\s*\\{)"
- ),
- lookbehind: !0
- },
- string: {
- pattern: string,
- greedy: !0
- },
- property: {
- pattern: /(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,
- lookbehind: !0
- },
- important: /!important\b/i,
- function: {
- pattern: /(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,
- lookbehind: !0
- },
- punctuation: /[(){};:,]/
- }, Prism2.languages.css.atrule.inside.rest = Prism2.languages.css;
- var markup2 = Prism2.languages.markup;
- markup2 && (markup2.tag.addInlined("style", "css"), markup2.tag.addAttribute("style", "css"));
- })(Prism);
- }
- }
- });
-
- // ../../node_modules/react-syntax-highlighter/dist/esm/languages/prism/css.js
- var import_css, css_default, init_css = __esm({
- "../../node_modules/react-syntax-highlighter/dist/esm/languages/prism/css.js"() {
- import_css = __toESM(require_css()), css_default = import_css.default;
- }
- });
-
- // ../../node_modules/refractor/lang/graphql.js
- var require_graphql = __commonJS({
- "../../node_modules/refractor/lang/graphql.js"(exports, module2) {
- "use strict";
- module2.exports = graphql2;
- graphql2.displayName = "graphql";
- graphql2.aliases = [];
- function graphql2(Prism) {
- Prism.languages.graphql = {
- comment: /#.*/,
- description: {
- pattern: /(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,
- greedy: !0,
- alias: "string",
- inside: {
- "language-markdown": {
- pattern: /(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,
- lookbehind: !0,
- inside: Prism.languages.markdown
- }
- }
- },
- string: {
- pattern: /"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,
- greedy: !0
- },
- number: /(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,
- boolean: /\b(?:false|true)\b/,
- variable: /\$[a-z_]\w*/i,
- directive: {
- pattern: /@[a-z_]\w*/i,
- alias: "function"
- },
- "attr-name": {
- pattern: /\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,
- greedy: !0
- },
- "atom-input": {
- pattern: /\b[A-Z]\w*Input\b/,
- alias: "class-name"
- },
- scalar: /\b(?:Boolean|Float|ID|Int|String)\b/,
- constant: /\b[A-Z][A-Z_\d]*\b/,
- "class-name": {
- pattern: /(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,
- lookbehind: !0
- },
- fragment: {
- pattern: /(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,
- lookbehind: !0,
- alias: "function"
- },
- "definition-mutation": {
- pattern: /(\bmutation\s+)[a-zA-Z_]\w*/,
- lookbehind: !0,
- alias: "function"
- },
- "definition-query": {
- pattern: /(\bquery\s+)[a-zA-Z_]\w*/,
- lookbehind: !0,
- alias: "function"
- },
- keyword: /\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,
- operator: /[!=|&]|\.{3}/,
- "property-query": /\w+(?=\s*\()/,
- object: /\w+(?=\s*\{)/,
- punctuation: /[!(){}\[\]:=,]/,
- property: /\w+/
- }, Prism.hooks.add("after-tokenize", function(env) {
- if (env.language !== "graphql")
- return;
- var validTokens = env.tokens.filter(function(token2) {
- return typeof token2 != "string" && token2.type !== "comment" && token2.type !== "scalar";
- }), currentIndex = 0;
- function getToken(offset3) {
- return validTokens[currentIndex + offset3];
- }
- function isTokenType(types, offset3) {
- offset3 = offset3 || 0;
- for (var i2 = 0; i2 < types.length; i2++) {
- var token2 = getToken(i2 + offset3);
- if (!token2 || token2.type !== types[i2])
- return !1;
- }
- return !0;
- }
- function findClosingBracket(open, close) {
- for (var stackHeight = 1, i2 = currentIndex; i2 < validTokens.length; i2++) {
- var token2 = validTokens[i2], content = token2.content;
- if (token2.type === "punctuation" && typeof content == "string") {
- if (open.test(content))
- stackHeight++;
- else if (close.test(content) && (stackHeight--, stackHeight === 0))
- return i2;
- }
- }
- return -1;
- }
- function addAlias(token2, alias) {
- var aliases2 = token2.alias;
- aliases2 ? Array.isArray(aliases2) || (token2.alias = aliases2 = [aliases2]) : token2.alias = aliases2 = [], aliases2.push(alias);
- }
- for (; currentIndex < validTokens.length; ) {
- var startToken = validTokens[currentIndex++];
- if (startToken.type === "keyword" && startToken.content === "mutation") {
- var inputVariables = [];
- if (isTokenType(["definition-mutation", "punctuation"]) && getToken(1).content === "(") {
- currentIndex += 2;
- var definitionEnd = findClosingBracket(/^\($/, /^\)$/);
- if (definitionEnd === -1)
- continue;
- for (; currentIndex < definitionEnd; currentIndex++) {
- var t = getToken(0);
- t.type === "variable" && (addAlias(t, "variable-input"), inputVariables.push(t.content));
- }
- currentIndex = definitionEnd + 1;
- }
- if (isTokenType(["punctuation", "property-query"]) && getToken(0).content === "{" && (currentIndex++, addAlias(getToken(0), "property-mutation"), inputVariables.length > 0)) {
- var mutationEnd = findClosingBracket(/^\{$/, /^\}$/);
- if (mutationEnd === -1)
- continue;
- for (var i = currentIndex; i < mutationEnd; i++) {
- var varToken = validTokens[i];
- varToken.type === "variable" && inputVariables.indexOf(varToken.content) >= 0 && addAlias(varToken, "variable-input");
- }
- }
- }
- }
- });
- }
- }
- });
-
- // ../../node_modules/react-syntax-highlighter/dist/esm/languages/prism/graphql.js
- var import_graphql, graphql_default, init_graphql = __esm({
- "../../node_modules/react-syntax-highlighter/dist/esm/languages/prism/graphql.js"() {
- import_graphql = __toESM(require_graphql()), graphql_default = import_graphql.default;
- }
- });
-
- // ../../node_modules/refractor/lang/js-extras.js
- var require_js_extras = __commonJS({
- "../../node_modules/refractor/lang/js-extras.js"(exports, module2) {
- "use strict";
- module2.exports = jsExtras2;
- jsExtras2.displayName = "jsExtras";
- jsExtras2.aliases = [];
- function jsExtras2(Prism) {
- (function(Prism2) {
- Prism2.languages.insertBefore("javascript", "function-variable", {
- "method-variable": {
- pattern: RegExp(
- "(\\.\\s*)" + Prism2.languages.javascript["function-variable"].pattern.source
- ),
- lookbehind: !0,
- alias: ["function-variable", "method", "function", "property-access"]
- }
- }), Prism2.languages.insertBefore("javascript", "function", {
- method: {
- pattern: RegExp(
- "(\\.\\s*)" + Prism2.languages.javascript.function.source
- ),
- lookbehind: !0,
- alias: ["function", "property-access"]
- }
- }), Prism2.languages.insertBefore("javascript", "constant", {
- "known-class-name": [
- {
- // standard built-ins
- // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects
- pattern: /\b(?:(?:Float(?:32|64)|(?:Int|Uint)(?:8|16|32)|Uint8Clamped)?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|(?:Weak)?(?:Map|Set)|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|WebAssembly)\b/,
- alias: "class-name"
- },
- {
- // errors
- pattern: /\b(?:[A-Z]\w*)Error\b/,
- alias: "class-name"
- }
- ]
- });
- function withId(source, flags) {
- return RegExp(
- source.replace(/<ID>/g, function() {
- return /(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/.source;
- }),
- flags
- );
- }
- Prism2.languages.insertBefore("javascript", "keyword", {
- imports: {
- // https://tc39.es/ecma262/#sec-imports
- pattern: withId(
- /(\bimport\b\s*)(?:<ID>(?:\s*,\s*(?:\*\s*as\s+<ID>|\{[^{}]*\}))?|\*\s*as\s+<ID>|\{[^{}]*\})(?=\s*\bfrom\b)/.source
- ),
- lookbehind: !0,
- inside: Prism2.languages.javascript
- },
- exports: {
- // https://tc39.es/ecma262/#sec-exports
- pattern: withId(
- /(\bexport\b\s*)(?:\*(?:\s*as\s+<ID>)?(?=\s*\bfrom\b)|\{[^{}]*\})/.source
- ),
- lookbehind: !0,
- inside: Prism2.languages.javascript
- }
- }), Prism2.languages.javascript.keyword.unshift(
- {
- pattern: /\b(?:as|default|export|from|import)\b/,
- alias: "module"
- },
- {
- pattern: /\b(?:await|break|catch|continue|do|else|finally|for|if|return|switch|throw|try|while|yield)\b/,
- alias: "control-flow"
- },
- {
- pattern: /\bnull\b/,
- alias: ["null", "nil"]
- },
- {
- pattern: /\bundefined\b/,
- alias: "nil"
- }
- ), Prism2.languages.insertBefore("javascript", "operator", {
- spread: {
- pattern: /\.{3}/,
- alias: "operator"
- },
- arrow: {
- pattern: /=>/,
- alias: "operator"
- }
- }), Prism2.languages.insertBefore("javascript", "punctuation", {
- "property-access": {
- pattern: withId(/(\.\s*)#?<ID>/.source),
- lookbehind: !0
- },
- "maybe-class-name": {
- pattern: /(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/,
- lookbehind: !0
- },
- dom: {
- // this contains only a few commonly used DOM variables
- pattern: /\b(?:document|(?:local|session)Storage|location|navigator|performance|window)\b/,
- alias: "variable"
- },
- console: {
- pattern: /\bconsole(?=\s*\.)/,
- alias: "class-name"
- }
- });
- for (var maybeClassNameTokens = [
- "function",
- "function-variable",
- "method",
- "method-variable",
- "property-access"
- ], i = 0; i < maybeClassNameTokens.length; i++) {
- var token2 = maybeClassNameTokens[i], value = Prism2.languages.javascript[token2];
- Prism2.util.type(value) === "RegExp" && (value = Prism2.languages.javascript[token2] = {
- pattern: value
- });
- var inside = value.inside || {};
- value.inside = inside, inside["maybe-class-name"] = /^[A-Z][\s\S]*/;
- }
- })(Prism);
- }
- }
- });
-
- // ../../node_modules/react-syntax-highlighter/dist/esm/languages/prism/js-extras.js
- var import_js_extras, js_extras_default, init_js_extras = __esm({
- "../../node_modules/react-syntax-highlighter/dist/esm/languages/prism/js-extras.js"() {
- import_js_extras = __toESM(require_js_extras()), js_extras_default = import_js_extras.default;
- }
- });
-
- // ../../node_modules/refractor/lang/json.js
- var require_json = __commonJS({
- "../../node_modules/refractor/lang/json.js"(exports, module2) {
- "use strict";
- module2.exports = json3;
- json3.displayName = "json";
- json3.aliases = ["webmanifest"];
- function json3(Prism) {
- Prism.languages.json = {
- property: {
- pattern: /(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,
- lookbehind: !0,
- greedy: !0
- },
- string: {
- pattern: /(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,
- lookbehind: !0,
- greedy: !0
- },
- comment: {
- pattern: /\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,
- greedy: !0
- },
- number: /-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,
- punctuation: /[{}[\],]/,
- operator: /:/,
- boolean: /\b(?:false|true)\b/,
- null: {
- pattern: /\bnull\b/,
- alias: "keyword"
- }
- }, Prism.languages.webmanifest = Prism.languages.json;
- }
- }
- });
-
- // ../../node_modules/react-syntax-highlighter/dist/esm/languages/prism/json.js
- var import_json, json_default, init_json = __esm({
- "../../node_modules/react-syntax-highlighter/dist/esm/languages/prism/json.js"() {
- import_json = __toESM(require_json()), json_default = import_json.default;
- }
- });
-
- // ../../node_modules/refractor/lang/jsx.js
- var require_jsx = __commonJS({
- "../../node_modules/refractor/lang/jsx.js"(exports, module2) {
- "use strict";
- module2.exports = jsx10;
- jsx10.displayName = "jsx";
- jsx10.aliases = [];
- function jsx10(Prism) {
- (function(Prism2) {
- var javascript = Prism2.util.clone(Prism2.languages.javascript), space = /(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source, braces = /(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source, spread = /(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;
- function re(source, flags) {
- return source = source.replace(/<S>/g, function() {
- return space;
- }).replace(/<BRACES>/g, function() {
- return braces;
- }).replace(/<SPREAD>/g, function() {
- return spread;
- }), RegExp(source, flags);
- }
- spread = re(spread).source, Prism2.languages.jsx = Prism2.languages.extend("markup", javascript), Prism2.languages.jsx.tag.pattern = re(
- /<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source
- ), Prism2.languages.jsx.tag.inside.tag.pattern = /^<\/?[^\s>\/]*/, Prism2.languages.jsx.tag.inside["attr-value"].pattern = /=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/, Prism2.languages.jsx.tag.inside.tag.inside["class-name"] = /^[A-Z]\w*(?:\.[A-Z]\w*)*$/, Prism2.languages.jsx.tag.inside.comment = javascript.comment, Prism2.languages.insertBefore(
- "inside",
- "attr-name",
- {
- spread: {
- pattern: re(/<SPREAD>/.source),
- inside: Prism2.languages.jsx
- }
- },
- Prism2.languages.jsx.tag
- ), Prism2.languages.insertBefore(
- "inside",
- "special-attr",
- {
- script: {
- // Allow for two levels of nesting
- pattern: re(/=<BRACES>/.source),
- alias: "language-javascript",
- inside: {
- "script-punctuation": {
- pattern: /^=(?=\{)/,
- alias: "punctuation"
- },
- rest: Prism2.languages.jsx
- }
- }
- },
- Prism2.languages.jsx.tag
- );
- var stringifyToken = function(token2) {
- return token2 ? typeof token2 == "string" ? token2 : typeof token2.content == "string" ? token2.content : token2.content.map(stringifyToken).join("") : "";
- }, walkTokens = function(tokens2) {
- for (var openedTags = [], i = 0; i < tokens2.length; i++) {
- var token2 = tokens2[i], notTagNorBrace = !1;
- if (typeof token2 != "string" && (token2.type === "tag" && token2.content[0] && token2.content[0].type === "tag" ? token2.content[0].content[0].content === "</" ? openedTags.length > 0 && openedTags[openedTags.length - 1].tagName === stringifyToken(token2.content[0].content[1]) && openedTags.pop() : token2.content[token2.content.length - 1].content === "/>" || openedTags.push({
- tagName: stringifyToken(token2.content[0].content[1]),
- openedBraces: 0
- }) : openedTags.length > 0 && token2.type === "punctuation" && token2.content === "{" ? openedTags[openedTags.length - 1].openedBraces++ : openedTags.length > 0 && openedTags[openedTags.length - 1].openedBraces > 0 && token2.type === "punctuation" && token2.content === "}" ? openedTags[openedTags.length - 1].openedBraces-- : notTagNorBrace = !0), (notTagNorBrace || typeof token2 == "string") && openedTags.length > 0 && openedTags[openedTags.length - 1].openedBraces === 0) {
- var plainText = stringifyToken(token2);
- i < tokens2.length - 1 && (typeof tokens2[i + 1] == "string" || tokens2[i + 1].type === "plain-text") && (plainText += stringifyToken(tokens2[i + 1]), tokens2.splice(i + 1, 1)), i > 0 && (typeof tokens2[i - 1] == "string" || tokens2[i - 1].type === "plain-text") && (plainText = stringifyToken(tokens2[i - 1]) + plainText, tokens2.splice(i - 1, 1), i--), tokens2[i] = new Prism2.Token(
- "plain-text",
- plainText,
- null,
- plainText
- );
- }
- token2.content && typeof token2.content != "string" && walkTokens(token2.content);
- }
- };
- Prism2.hooks.add("after-tokenize", function(env) {
- env.language !== "jsx" && env.language !== "tsx" || walkTokens(env.tokens);
- });
- })(Prism);
- }
- }
- });
-
- // ../../node_modules/react-syntax-highlighter/dist/esm/languages/prism/jsx.js
- var import_jsx, jsx_default, init_jsx = __esm({
- "../../node_modules/react-syntax-highlighter/dist/esm/languages/prism/jsx.js"() {
- import_jsx = __toESM(require_jsx()), jsx_default = import_jsx.default;
- }
- });
-
- // ../../node_modules/refractor/lang/markdown.js
- var require_markdown = __commonJS({
- "../../node_modules/refractor/lang/markdown.js"(exports, module2) {
- "use strict";
- module2.exports = markdown2;
- markdown2.displayName = "markdown";
- markdown2.aliases = ["md"];
- function markdown2(Prism) {
- (function(Prism2) {
- var inner = /(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;
- function createInline(pattern) {
- return pattern = pattern.replace(/<inner>/g, function() {
- return inner;
- }), RegExp(/((?:^|[^\\])(?:\\{2})*)/.source + "(?:" + pattern + ")");
- }
- var tableCell = /(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source, tableRow = /\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(
- /__/g,
- function() {
- return tableCell;
- }
- ), tableLine = /\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;
- Prism2.languages.markdown = Prism2.languages.extend("markup", {}), Prism2.languages.insertBefore("markdown", "prolog", {
- "front-matter-block": {
- pattern: /(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,
- lookbehind: !0,
- greedy: !0,
- inside: {
- punctuation: /^---|---$/,
- "front-matter": {
- pattern: /\S+(?:\s+\S+)*/,
- alias: ["yaml", "language-yaml"],
- inside: Prism2.languages.yaml
- }
- }
- },
- blockquote: {
- // > ...
- pattern: /^>(?:[\t ]*>)*/m,
- alias: "punctuation"
- },
- table: {
- pattern: RegExp(
- "^" + tableRow + tableLine + "(?:" + tableRow + ")*",
- "m"
- ),
- inside: {
- "table-data-rows": {
- pattern: RegExp(
- "^(" + tableRow + tableLine + ")(?:" + tableRow + ")*$"
- ),
- lookbehind: !0,
- inside: {
- "table-data": {
- pattern: RegExp(tableCell),
- inside: Prism2.languages.markdown
- },
- punctuation: /\|/
- }
- },
- "table-line": {
- pattern: RegExp("^(" + tableRow + ")" + tableLine + "$"),
- lookbehind: !0,
- inside: {
- punctuation: /\||:?-{3,}:?/
- }
- },
- "table-header-row": {
- pattern: RegExp("^" + tableRow + "$"),
- inside: {
- "table-header": {
- pattern: RegExp(tableCell),
- alias: "important",
- inside: Prism2.languages.markdown
- },
- punctuation: /\|/
- }
- }
- }
- },
- code: [
- {
- // Prefixed by 4 spaces or 1 tab and preceded by an empty line
- pattern: /((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,
- lookbehind: !0,
- alias: "keyword"
- },
- {
- // ```optional language
- // code block
- // ```
- pattern: /^```[\s\S]*?^```$/m,
- greedy: !0,
- inside: {
- "code-block": {
- pattern: /^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,
- lookbehind: !0
- },
- "code-language": {
- pattern: /^(```).+/,
- lookbehind: !0
- },
- punctuation: /```/
- }
- }
- ],
- title: [
- {
- // title 1
- // =======
- // title 2
- // -------
- pattern: /\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,
- alias: "important",
- inside: {
- punctuation: /==+$|--+$/
- }
- },
- {
- // # title 1
- // ###### title 6
- pattern: /(^\s*)#.+/m,
- lookbehind: !0,
- alias: "important",
- inside: {
- punctuation: /^#+|#+$/
- }
- }
- ],
- hr: {
- // ***
- // ---
- // * * *
- // -----------
- pattern: /(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,
- lookbehind: !0,
- alias: "punctuation"
- },
- list: {
- // * item
- // + item
- // - item
- // 1. item
- pattern: /(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,
- lookbehind: !0,
- alias: "punctuation"
- },
- "url-reference": {
- // [id]: http://example.com "Optional title"
- // [id]: http://example.com 'Optional title'
- // [id]: http://example.com (Optional title)
- // [id]: <http://example.com> "Optional title"
- pattern: /!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,
- inside: {
- variable: {
- pattern: /^(!?\[)[^\]]+/,
- lookbehind: !0
- },
- string: /(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,
- punctuation: /^[\[\]!:]|[<>]/
- },
- alias: "url"
- },
- bold: {
- // **strong**
- // __strong__
- // allow one nested instance of italic text using the same delimiter
- pattern: createInline(
- /\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source
- ),
- lookbehind: !0,
- greedy: !0,
- inside: {
- content: {
- pattern: /(^..)[\s\S]+(?=..$)/,
- lookbehind: !0,
- inside: {}
- // see below
- },
- punctuation: /\*\*|__/
- }
- },
- italic: {
- // *em*
- // _em_
- // allow one nested instance of bold text using the same delimiter
- pattern: createInline(
- /\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source
- ),
- lookbehind: !0,
- greedy: !0,
- inside: {
- content: {
- pattern: /(^.)[\s\S]+(?=.$)/,
- lookbehind: !0,
- inside: {}
- // see below
- },
- punctuation: /[*_]/
- }
- },
- strike: {
- // ~~strike through~~
- // ~strike~
- // eslint-disable-next-line regexp/strict
- pattern: createInline(/(~~?)(?:(?!~)<inner>)+\2/.source),
- lookbehind: !0,
- greedy: !0,
- inside: {
- content: {
- pattern: /(^~~?)[\s\S]+(?=\1$)/,
- lookbehind: !0,
- inside: {}
- // see below
- },
- punctuation: /~~?/
- }
- },
- "code-snippet": {
- // `code`
- // ``code``
- pattern: /(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,
- lookbehind: !0,
- greedy: !0,
- alias: ["code", "keyword"]
- },
- url: {
- // [example](http://example.com "Optional title")
- // [example][id]
- // [example] [id]
- pattern: createInline(
- /!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source
- ),
- lookbehind: !0,
- greedy: !0,
- inside: {
- operator: /^!/,
- content: {
- pattern: /(^\[)[^\]]+(?=\])/,
- lookbehind: !0,
- inside: {}
- // see below
- },
- variable: {
- pattern: /(^\][ \t]?\[)[^\]]+(?=\]$)/,
- lookbehind: !0
- },
- url: {
- pattern: /(^\]\()[^\s)]+/,
- lookbehind: !0
- },
- string: {
- pattern: /(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,
- lookbehind: !0
- }
- }
- }
- }), ["url", "bold", "italic", "strike"].forEach(function(token2) {
- ["url", "bold", "italic", "strike", "code-snippet"].forEach(function(inside) {
- token2 !== inside && (Prism2.languages.markdown[token2].inside.content.inside[inside] = Prism2.languages.markdown[inside]);
- });
- }), Prism2.hooks.add("after-tokenize", function(env) {
- if (env.language !== "markdown" && env.language !== "md")
- return;
- function walkTokens(tokens2) {
- if (!(!tokens2 || typeof tokens2 == "string"))
- for (var i = 0, l = tokens2.length; i < l; i++) {
- var token2 = tokens2[i];
- if (token2.type !== "code") {
- walkTokens(token2.content);
- continue;
- }
- var codeLang = token2.content[1], codeBlock = token2.content[3];
- if (codeLang && codeBlock && codeLang.type === "code-language" && codeBlock.type === "code-block" && typeof codeLang.content == "string") {
- var lang = codeLang.content.replace(/\b#/g, "sharp").replace(/\b\+\+/g, "pp");
- lang = (/[a-z][\w-]*/i.exec(lang) || [""])[0].toLowerCase();
- var alias = "language-" + lang;
- codeBlock.alias ? typeof codeBlock.alias == "string" ? codeBlock.alias = [codeBlock.alias, alias] : codeBlock.alias.push(alias) : codeBlock.alias = [alias];
- }
- }
- }
- walkTokens(env.tokens);
- }), Prism2.hooks.add("wrap", function(env) {
- if (env.type === "code-block") {
- for (var codeLang = "", i = 0, l = env.classes.length; i < l; i++) {
- var cls = env.classes[i], match3 = /language-(.+)/.exec(cls);
- if (match3) {
- codeLang = match3[1];
- break;
- }
- }
- var grammar = Prism2.languages[codeLang];
- if (grammar)
- env.content = Prism2.highlight(
- textContent(env.content.value),
- grammar,
- codeLang
- );
- else if (codeLang && codeLang !== "none" && Prism2.plugins.autoloader) {
- var id = "md-" + (/* @__PURE__ */ new Date()).valueOf() + "-" + Math.floor(Math.random() * 1e16);
- env.attributes.id = id, Prism2.plugins.autoloader.loadLanguages(codeLang, function() {
- var ele = document.getElementById(id);
- ele && (ele.innerHTML = Prism2.highlight(
- ele.textContent,
- Prism2.languages[codeLang],
- codeLang
- ));
- });
- }
- }
- });
- var tagPattern = RegExp(Prism2.languages.markup.tag.pattern.source, "gi"), KNOWN_ENTITY_NAMES = {
- amp: "&",
- lt: "<",
- gt: ">",
- quot: '"'
- }, fromCodePoint3 = String.fromCodePoint || String.fromCharCode;
- function textContent(html) {
- var text = html.replace(tagPattern, "");
- return text = text.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi, function(m3, code) {
- if (code = code.toLowerCase(), code[0] === "#") {
- var value;
- return code[1] === "x" ? value = parseInt(code.slice(2), 16) : value = Number(code.slice(1)), fromCodePoint3(value);
- } else {
- var known = KNOWN_ENTITY_NAMES[code];
- return known || m3;
- }
- }), text;
- }
- Prism2.languages.md = Prism2.languages.markdown;
- })(Prism);
- }
- }
- });
-
- // ../../node_modules/react-syntax-highlighter/dist/esm/languages/prism/markdown.js
- var import_markdown, markdown_default, init_markdown = __esm({
- "../../node_modules/react-syntax-highlighter/dist/esm/languages/prism/markdown.js"() {
- import_markdown = __toESM(require_markdown()), markdown_default = import_markdown.default;
- }
- });
-
- // ../../node_modules/refractor/lang/markup.js
- var require_markup = __commonJS({
- "../../node_modules/refractor/lang/markup.js"(exports, module2) {
- "use strict";
- module2.exports = markup2;
- markup2.displayName = "markup";
- markup2.aliases = ["html", "mathml", "svg", "xml", "ssml", "atom", "rss"];
- function markup2(Prism) {
- Prism.languages.markup = {
- comment: {
- pattern: /<!--(?:(?!<!--)[\s\S])*?-->/,
- greedy: !0
- },
- prolog: {
- pattern: /<\?[\s\S]+?\?>/,
- greedy: !0
- },
- doctype: {
- // https://www.w3.org/TR/xml/#NT-doctypedecl
- pattern: /<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,
- greedy: !0,
- inside: {
- "internal-subset": {
- pattern: /(^[^\[]*\[)[\s\S]+(?=\]>$)/,
- lookbehind: !0,
- greedy: !0,
- inside: null
- // see below
- },
- string: {
- pattern: /"[^"]*"|'[^']*'/,
- greedy: !0
- },
- punctuation: /^<!|>$|[[\]]/,
- "doctype-tag": /^DOCTYPE/i,
- name: /[^\s<>'"]+/
- }
- },
- cdata: {
- pattern: /<!\[CDATA\[[\s\S]*?\]\]>/i,
- greedy: !0
- },
- tag: {
- pattern: /<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,
- greedy: !0,
- inside: {
- tag: {
- pattern: /^<\/?[^\s>\/]+/,
- inside: {
- punctuation: /^<\/?/,
- namespace: /^[^\s>\/:]+:/
- }
- },
- "special-attr": [],
- "attr-value": {
- pattern: /=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,
- inside: {
- punctuation: [
- {
- pattern: /^=/,
- alias: "attr-equals"
- },
- /"|'/
- ]
- }
- },
- punctuation: /\/?>/,
- "attr-name": {
- pattern: /[^\s>\/]+/,
- inside: {
- namespace: /^[^\s>\/:]+:/
- }
- }
- }
- },
- entity: [
- {
- pattern: /&[\da-z]{1,8};/i,
- alias: "named-entity"
- },
- /&#x?[\da-f]{1,8};/i
- ]
- }, Prism.languages.markup.tag.inside["attr-value"].inside.entity = Prism.languages.markup.entity, Prism.languages.markup.doctype.inside["internal-subset"].inside = Prism.languages.markup, Prism.hooks.add("wrap", function(env) {
- env.type === "entity" && (env.attributes.title = env.content.value.replace(/&/, "&"));
- }), Object.defineProperty(Prism.languages.markup.tag, "addInlined", {
- /**
- * Adds an inlined language to markup.
- *
- * An example of an inlined language is CSS with `<style>` tags.
- *
- * @param {string} tagName The name of the tag that contains the inlined language. This name will be treated as
- * case insensitive.
- * @param {string} lang The language key.
- * @example
- * addInlined('style', 'css');
- */
- value: function(tagName, lang) {
- var includedCdataInside = {};
- includedCdataInside["language-" + lang] = {
- pattern: /(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,
- lookbehind: !0,
- inside: Prism.languages[lang]
- }, includedCdataInside.cdata = /^<!\[CDATA\[|\]\]>$/i;
- var inside = {
- "included-cdata": {
- pattern: /<!\[CDATA\[[\s\S]*?\]\]>/i,
- inside: includedCdataInside
- }
- };
- inside["language-" + lang] = {
- pattern: /[\s\S]+/,
- inside: Prism.languages[lang]
- };
- var def = {};
- def[tagName] = {
- pattern: RegExp(
- /(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(
- /__/g,
- function() {
- return tagName;
- }
- ),
- "i"
- ),
- lookbehind: !0,
- greedy: !0,
- inside
- }, Prism.languages.insertBefore("markup", "cdata", def);
- }
- }), Object.defineProperty(Prism.languages.markup.tag, "addAttribute", {
- /**
- * Adds an pattern to highlight languages embedded in HTML attributes.
- *
- * An example of an inlined language is CSS with `style` attributes.
- *
- * @param {string} attrName The name of the tag that contains the inlined language. This name will be treated as
- * case insensitive.
- * @param {string} lang The language key.
- * @example
- * addAttribute('style', 'css');
- */
- value: function(attrName, lang) {
- Prism.languages.markup.tag.inside["special-attr"].push({
- pattern: RegExp(
- /(^|["'\s])/.source + "(?:" + attrName + ")" + /\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,
- "i"
- ),
- lookbehind: !0,
- inside: {
- "attr-name": /^[^\s=]+/,
- "attr-value": {
- pattern: /=[\s\S]+/,
- inside: {
- value: {
- pattern: /(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,
- lookbehind: !0,
- alias: [lang, "language-" + lang],
- inside: Prism.languages[lang]
- },
- punctuation: [
- {
- pattern: /^=/,
- alias: "attr-equals"
- },
- /"|'/
- ]
- }
- }
- }
- });
- }
- }), Prism.languages.html = Prism.languages.markup, Prism.languages.mathml = Prism.languages.markup, Prism.languages.svg = Prism.languages.markup, Prism.languages.xml = Prism.languages.extend("markup", {}), Prism.languages.ssml = Prism.languages.xml, Prism.languages.atom = Prism.languages.xml, Prism.languages.rss = Prism.languages.xml;
- }
- }
- });
-
- // ../../node_modules/react-syntax-highlighter/dist/esm/languages/prism/markup.js
- var import_markup, markup_default, init_markup = __esm({
- "../../node_modules/react-syntax-highlighter/dist/esm/languages/prism/markup.js"() {
- import_markup = __toESM(require_markup()), markup_default = import_markup.default;
- }
- });
-
- // ../../node_modules/refractor/lang/typescript.js
- var require_typescript = __commonJS({
- "../../node_modules/refractor/lang/typescript.js"(exports, module2) {
- "use strict";
- module2.exports = typescript2;
- typescript2.displayName = "typescript";
- typescript2.aliases = ["ts"];
- function typescript2(Prism) {
- (function(Prism2) {
- Prism2.languages.typescript = Prism2.languages.extend("javascript", {
- "class-name": {
- pattern: /(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,
- lookbehind: !0,
- greedy: !0,
- inside: null
- // see below
- },
- builtin: /\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/
- }), Prism2.languages.typescript.keyword.push(
- /\b(?:abstract|declare|is|keyof|readonly|require)\b/,
- // keywords that have to be followed by an identifier
- /\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,
- // This is for `import type *, {}`
- /\btype\b(?=\s*(?:[\{*]|$))/
- ), delete Prism2.languages.typescript.parameter, delete Prism2.languages.typescript["literal-property"];
- var typeInside = Prism2.languages.extend("typescript", {});
- delete typeInside["class-name"], Prism2.languages.typescript["class-name"].inside = typeInside, Prism2.languages.insertBefore("typescript", "function", {
- decorator: {
- pattern: /@[$\w\xA0-\uFFFF]+/,
- inside: {
- at: {
- pattern: /^@/,
- alias: "operator"
- },
- function: /^[\s\S]+/
- }
- },
- "generic-function": {
- // e.g. foo<T extends "bar" | "baz">( ...
- pattern: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,
- greedy: !0,
- inside: {
- function: /^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,
- generic: {
- pattern: /<[\s\S]+/,
- // everything after the first <
- alias: "class-name",
- inside: typeInside
- }
- }
- }
- }), Prism2.languages.ts = Prism2.languages.typescript;
- })(Prism);
- }
- }
- });
-
- // ../../node_modules/refractor/lang/tsx.js
- var require_tsx = __commonJS({
- "../../node_modules/refractor/lang/tsx.js"(exports, module2) {
- "use strict";
- var refractorJsx = require_jsx(), refractorTypescript = require_typescript();
- module2.exports = tsx2;
- tsx2.displayName = "tsx";
- tsx2.aliases = [];
- function tsx2(Prism) {
- Prism.register(refractorJsx), Prism.register(refractorTypescript), (function(Prism2) {
- var typescript2 = Prism2.util.clone(Prism2.languages.typescript);
- Prism2.languages.tsx = Prism2.languages.extend("jsx", typescript2), delete Prism2.languages.tsx.parameter, delete Prism2.languages.tsx["literal-property"];
- var tag = Prism2.languages.tsx.tag;
- tag.pattern = RegExp(
- /(^|[^\w$]|(?=<\/))/.source + "(?:" + tag.pattern.source + ")",
- tag.pattern.flags
- ), tag.lookbehind = !0;
- })(Prism);
- }
- }
- });
-
- // ../../node_modules/react-syntax-highlighter/dist/esm/languages/prism/tsx.js
- var import_tsx, tsx_default, init_tsx = __esm({
- "../../node_modules/react-syntax-highlighter/dist/esm/languages/prism/tsx.js"() {
- import_tsx = __toESM(require_tsx()), tsx_default = import_tsx.default;
- }
- });
-
- // ../../node_modules/react-syntax-highlighter/dist/esm/languages/prism/typescript.js
- var import_typescript, typescript_default, init_typescript = __esm({
- "../../node_modules/react-syntax-highlighter/dist/esm/languages/prism/typescript.js"() {
- import_typescript = __toESM(require_typescript()), typescript_default = import_typescript.default;
- }
- });
-
- // ../../node_modules/refractor/lang/yaml.js
- var require_yaml = __commonJS({
- "../../node_modules/refractor/lang/yaml.js"(exports, module2) {
- "use strict";
- module2.exports = yaml2;
- yaml2.displayName = "yaml";
- yaml2.aliases = ["yml"];
- function yaml2(Prism) {
- (function(Prism2) {
- var anchorOrAlias = /[*&][^\s[\]{},]+/, tag = /!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/, properties = "(?:" + tag.source + "(?:[ ]+" + anchorOrAlias.source + ")?|" + anchorOrAlias.source + "(?:[ ]+" + tag.source + ")?)", plainKey = /(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(
- /<PLAIN>/g,
- function() {
- return /[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source;
- }
- ), string = /"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;
- function createValuePattern(value, flags) {
- flags = (flags || "").replace(/m/g, "") + "m";
- var pattern = /([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g, function() {
- return properties;
- }).replace(/<<value>>/g, function() {
- return value;
- });
- return RegExp(pattern, flags);
- }
- Prism2.languages.yaml = {
- scalar: {
- pattern: RegExp(
- /([\-:]\s*(?:\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(
- /<<prop>>/g,
- function() {
- return properties;
- }
- )
- ),
- lookbehind: !0,
- alias: "string"
- },
- comment: /#.*/,
- key: {
- pattern: RegExp(
- /((?:^|[:\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\s*:\s)/.source.replace(/<<prop>>/g, function() {
- return properties;
- }).replace(/<<key>>/g, function() {
- return "(?:" + plainKey + "|" + string + ")";
- })
- ),
- lookbehind: !0,
- greedy: !0,
- alias: "atrule"
- },
- directive: {
- pattern: /(^[ \t]*)%.+/m,
- lookbehind: !0,
- alias: "important"
- },
- datetime: {
- pattern: createValuePattern(
- /\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source
- ),
- lookbehind: !0,
- alias: "number"
- },
- boolean: {
- pattern: createValuePattern(/false|true/.source, "i"),
- lookbehind: !0,
- alias: "important"
- },
- null: {
- pattern: createValuePattern(/null|~/.source, "i"),
- lookbehind: !0,
- alias: "important"
- },
- string: {
- pattern: createValuePattern(string),
- lookbehind: !0,
- greedy: !0
- },
- number: {
- pattern: createValuePattern(
- /[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,
- "i"
- ),
- lookbehind: !0
- },
- tag,
- important: anchorOrAlias,
- punctuation: /---|[:[\]{}\-,|>?]|\.\.\./
- }, Prism2.languages.yml = Prism2.languages.yaml;
- })(Prism);
- }
- }
- });
-
- // ../../node_modules/react-syntax-highlighter/dist/esm/languages/prism/yaml.js
- var import_yaml, yaml_default, init_yaml = __esm({
- "../../node_modules/react-syntax-highlighter/dist/esm/languages/prism/yaml.js"() {
- import_yaml = __toESM(require_yaml()), yaml_default = import_yaml.default;
- }
- });
-
- // ../../node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js
- function _objectWithoutPropertiesLoose(r2, e) {
- if (r2 == null) return {};
- var t = {};
- for (var n in r2) if ({}.hasOwnProperty.call(r2, n)) {
- if (e.indexOf(n) !== -1) continue;
- t[n] = r2[n];
- }
- return t;
- }
- var init_objectWithoutPropertiesLoose = __esm({
- "../../node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js"() {
- }
- });
-
- // ../../node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js
- function _objectWithoutProperties(e, t) {
- if (e == null) return {};
- var o, r2, i = _objectWithoutPropertiesLoose(e, t);
- if (Object.getOwnPropertySymbols) {
- var n = Object.getOwnPropertySymbols(e);
- for (r2 = 0; r2 < n.length; r2++) o = n[r2], t.indexOf(o) === -1 && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
- }
- return i;
- }
- var init_objectWithoutProperties = __esm({
- "../../node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"() {
- init_objectWithoutPropertiesLoose();
- }
- });
-
- // ../../node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
- function _arrayLikeToArray(r2, a3) {
- (a3 == null || a3 > r2.length) && (a3 = r2.length);
- for (var e = 0, n = Array(a3); e < a3; e++) n[e] = r2[e];
- return n;
- }
- var init_arrayLikeToArray = __esm({
- "../../node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js"() {
- }
- });
-
- // ../../node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js
- function _arrayWithoutHoles(r2) {
- if (Array.isArray(r2)) return _arrayLikeToArray(r2);
- }
- var init_arrayWithoutHoles = __esm({
- "../../node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js"() {
- init_arrayLikeToArray();
- }
- });
-
- // ../../node_modules/@babel/runtime/helpers/esm/iterableToArray.js
- function _iterableToArray(r2) {
- if (typeof Symbol < "u" && r2[Symbol.iterator] != null || r2["@@iterator"] != null) return Array.from(r2);
- }
- var init_iterableToArray = __esm({
- "../../node_modules/@babel/runtime/helpers/esm/iterableToArray.js"() {
- }
- });
-
- // ../../node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
- function _unsupportedIterableToArray(r2, a3) {
- if (r2) {
- if (typeof r2 == "string") return _arrayLikeToArray(r2, a3);
- var t = {}.toString.call(r2).slice(8, -1);
- return t === "Object" && r2.constructor && (t = r2.constructor.name), t === "Map" || t === "Set" ? Array.from(r2) : t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r2, a3) : void 0;
- }
- }
- var init_unsupportedIterableToArray = __esm({
- "../../node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js"() {
- init_arrayLikeToArray();
- }
- });
-
- // ../../node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
- function _nonIterableSpread() {
- throw new TypeError(`Invalid attempt to spread non-iterable instance.
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
- }
- var init_nonIterableSpread = __esm({
- "../../node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js"() {
- }
- });
-
- // ../../node_modules/@babel/runtime/helpers/esm/toConsumableArray.js
- function _toConsumableArray(r2) {
- return _arrayWithoutHoles(r2) || _iterableToArray(r2) || _unsupportedIterableToArray(r2) || _nonIterableSpread();
- }
- var init_toConsumableArray = __esm({
- "../../node_modules/@babel/runtime/helpers/esm/toConsumableArray.js"() {
- init_arrayWithoutHoles();
- init_iterableToArray();
- init_unsupportedIterableToArray();
- init_nonIterableSpread();
- }
- });
-
- // ../../node_modules/react-syntax-highlighter/dist/esm/checkForListedLanguage.js
- var checkForListedLanguage_default, init_checkForListedLanguage = __esm({
- "../../node_modules/react-syntax-highlighter/dist/esm/checkForListedLanguage.js"() {
- checkForListedLanguage_default = (function(astGenerator, language) {
- var langs = astGenerator.listLanguages();
- return langs.indexOf(language) !== -1;
- });
- }
- });
-
- // ../../node_modules/react-syntax-highlighter/dist/esm/highlight.js
- function ownKeys2(e, r2) {
- var t = Object.keys(e);
- if (Object.getOwnPropertySymbols) {
- var o = Object.getOwnPropertySymbols(e);
- r2 && (o = o.filter(function(r3) {
- return Object.getOwnPropertyDescriptor(e, r3).enumerable;
- })), t.push.apply(t, o);
- }
- return t;
- }
- function _objectSpread2(e) {
- for (var r2 = 1; r2 < arguments.length; r2++) {
- var t = arguments[r2] != null ? arguments[r2] : {};
- r2 % 2 ? ownKeys2(Object(t), !0).forEach(function(r3) {
- _defineProperty(e, r3, t[r3]);
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys2(Object(t)).forEach(function(r3) {
- Object.defineProperty(e, r3, Object.getOwnPropertyDescriptor(t, r3));
- });
- }
- return e;
- }
- function getNewLines(str2) {
- return str2.match(newLineRegex);
- }
- function getAllLineNumbers(_ref) {
- var lines = _ref.lines, startingLineNumber = _ref.startingLineNumber, style = _ref.style;
- return lines.map(function(_, i) {
- var number = i + startingLineNumber;
- return import_react9.default.createElement("span", {
- key: "line-".concat(i),
- className: "react-syntax-highlighter-line-number",
- style: typeof style == "function" ? style(number) : style
- }, "".concat(number, `
- `));
- });
- }
- function AllLineNumbers(_ref2) {
- var codeString = _ref2.codeString, codeStyle = _ref2.codeStyle, _ref2$containerStyle = _ref2.containerStyle, containerStyle = _ref2$containerStyle === void 0 ? {
- float: "left",
- paddingRight: "10px"
- } : _ref2$containerStyle, _ref2$numberStyle = _ref2.numberStyle, numberStyle = _ref2$numberStyle === void 0 ? {} : _ref2$numberStyle, startingLineNumber = _ref2.startingLineNumber;
- return import_react9.default.createElement("code", {
- style: Object.assign({}, codeStyle, containerStyle)
- }, getAllLineNumbers({
- lines: codeString.replace(/\n$/, "").split(`
- `),
- style: numberStyle,
- startingLineNumber
- }));
- }
- function getEmWidthOfNumber(num) {
- return "".concat(num.toString().length, ".25em");
- }
- function getInlineLineNumber(lineNumber, inlineLineNumberStyle) {
- return {
- type: "element",
- tagName: "span",
- properties: {
- key: "line-number--".concat(lineNumber),
- className: ["comment", "linenumber", "react-syntax-highlighter-line-number"],
- style: inlineLineNumberStyle
- },
- children: [{
- type: "text",
- value: lineNumber
- }]
- };
- }
- function assembleLineNumberStyles(lineNumberStyle, lineNumber, largestLineNumber) {
- var defaultLineNumberStyle = {
- display: "inline-block",
- minWidth: getEmWidthOfNumber(largestLineNumber),
- paddingRight: "1em",
- textAlign: "right",
- userSelect: "none"
- }, customLineNumberStyle = typeof lineNumberStyle == "function" ? lineNumberStyle(lineNumber) : lineNumberStyle, assembledStyle = _objectSpread2(_objectSpread2({}, defaultLineNumberStyle), customLineNumberStyle);
- return assembledStyle;
- }
- function createLineElement(_ref3) {
- var children = _ref3.children, lineNumber = _ref3.lineNumber, lineNumberStyle = _ref3.lineNumberStyle, largestLineNumber = _ref3.largestLineNumber, showInlineLineNumbers = _ref3.showInlineLineNumbers, _ref3$lineProps = _ref3.lineProps, lineProps = _ref3$lineProps === void 0 ? {} : _ref3$lineProps, _ref3$className = _ref3.className, className = _ref3$className === void 0 ? [] : _ref3$className, showLineNumbers = _ref3.showLineNumbers, wrapLongLines = _ref3.wrapLongLines, _ref3$wrapLines = _ref3.wrapLines, wrapLines = _ref3$wrapLines === void 0 ? !1 : _ref3$wrapLines, properties = wrapLines ? _objectSpread2({}, typeof lineProps == "function" ? lineProps(lineNumber) : lineProps) : {};
- if (properties.className = properties.className ? [].concat(_toConsumableArray(properties.className.trim().split(/\s+/)), _toConsumableArray(className)) : className, lineNumber && showInlineLineNumbers) {
- var inlineLineNumberStyle = assembleLineNumberStyles(lineNumberStyle, lineNumber, largestLineNumber);
- children.unshift(getInlineLineNumber(lineNumber, inlineLineNumberStyle));
- }
- return wrapLongLines & showLineNumbers && (properties.style = _objectSpread2({
- display: "flex"
- }, properties.style)), {
- type: "element",
- tagName: "span",
- properties,
- children
- };
- }
- function flattenCodeTree(tree) {
- for (var className = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [], newTree = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : [], i = 0; i < tree.length; i++) {
- var node2 = tree[i];
- if (node2.type === "text")
- newTree.push(createLineElement({
- children: [node2],
- className: _toConsumableArray(new Set(className))
- }));
- else if (node2.children) {
- var classNames = className.concat(node2.properties.className);
- flattenCodeTree(node2.children, classNames).forEach(function(i2) {
- return newTree.push(i2);
- });
- }
- }
- return newTree;
- }
- function processLines(codeTree, wrapLines, lineProps, showLineNumbers, showInlineLineNumbers, startingLineNumber, largestLineNumber, lineNumberStyle, wrapLongLines) {
- var _ref4, tree = flattenCodeTree(codeTree.value), newTree = [], lastLineBreakIndex = -1, index4 = 0;
- function createWrappedLine(children2, lineNumber2) {
- var className = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : [];
- return createLineElement({
- children: children2,
- lineNumber: lineNumber2,
- lineNumberStyle,
- largestLineNumber,
- showInlineLineNumbers,
- lineProps,
- className,
- showLineNumbers,
- wrapLongLines,
- wrapLines
- });
- }
- function createUnwrappedLine(children2, lineNumber2) {
- if (showLineNumbers && lineNumber2 && showInlineLineNumbers) {
- var inlineLineNumberStyle = assembleLineNumberStyles(lineNumberStyle, lineNumber2, largestLineNumber);
- children2.unshift(getInlineLineNumber(lineNumber2, inlineLineNumberStyle));
- }
- return children2;
- }
- function createLine(children2, lineNumber2) {
- var className = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : [];
- return wrapLines || className.length > 0 ? createWrappedLine(children2, lineNumber2, className) : createUnwrappedLine(children2, lineNumber2);
- }
- for (var _loop = function() {
- var node2 = tree[index4], value = node2.children[0].value, newLines = getNewLines(value);
- if (newLines) {
- var splitValue = value.split(`
- `);
- splitValue.forEach(function(text, i) {
- var lineNumber2 = showLineNumbers && newTree.length + startingLineNumber, newChild = {
- type: "text",
- value: "".concat(text, `
- `)
- };
- if (i === 0) {
- var _children = tree.slice(lastLineBreakIndex + 1, index4).concat(createLineElement({
- children: [newChild],
- className: node2.properties.className
- })), _line = createLine(_children, lineNumber2);
- newTree.push(_line);
- } else if (i === splitValue.length - 1) {
- var stringChild = tree[index4 + 1] && tree[index4 + 1].children && tree[index4 + 1].children[0], lastLineInPreviousSpan = {
- type: "text",
- value: "".concat(text)
- };
- if (stringChild) {
- var newElem = createLineElement({
- children: [lastLineInPreviousSpan],
- className: node2.properties.className
- });
- tree.splice(index4 + 1, 0, newElem);
- } else {
- var _children2 = [lastLineInPreviousSpan], _line2 = createLine(_children2, lineNumber2, node2.properties.className);
- newTree.push(_line2);
- }
- } else {
- var _children3 = [newChild], _line3 = createLine(_children3, lineNumber2, node2.properties.className);
- newTree.push(_line3);
- }
- }), lastLineBreakIndex = index4;
- }
- index4++;
- }; index4 < tree.length; )
- _loop();
- if (lastLineBreakIndex !== tree.length - 1) {
- var children = tree.slice(lastLineBreakIndex + 1, tree.length);
- if (children && children.length) {
- var lineNumber = showLineNumbers && newTree.length + startingLineNumber, line2 = createLine(children, lineNumber);
- newTree.push(line2);
- }
- }
- return wrapLines ? newTree : (_ref4 = []).concat.apply(_ref4, newTree);
- }
- function defaultRenderer(_ref5) {
- var rows = _ref5.rows, stylesheet = _ref5.stylesheet, useInlineStyles = _ref5.useInlineStyles;
- return rows.map(function(node2, i) {
- return createElement4({
- node: node2,
- stylesheet,
- useInlineStyles,
- key: "code-segment-".concat(i)
- });
- });
- }
- function isHighlightJs(astGenerator) {
- return astGenerator && typeof astGenerator.highlightAuto < "u";
- }
- function getCodeTree(_ref6) {
- var astGenerator = _ref6.astGenerator, language = _ref6.language, code = _ref6.code, defaultCodeValue = _ref6.defaultCodeValue;
- if (isHighlightJs(astGenerator)) {
- var hasLanguage = checkForListedLanguage_default(astGenerator, language);
- return language === "text" ? {
- value: defaultCodeValue,
- language: "text"
- } : hasLanguage ? astGenerator.highlight(language, code) : astGenerator.highlightAuto(code);
- }
- try {
- return language && language !== "text" ? {
- value: astGenerator.highlight(code, language)
- } : {
- value: defaultCodeValue
- };
- } catch {
- return {
- value: defaultCodeValue
- };
- }
- }
- function highlight_default(defaultAstGenerator, defaultStyle) {
- return function(_ref7) {
- var _code$match$length, _code$match, language = _ref7.language, children = _ref7.children, _ref7$style = _ref7.style, style = _ref7$style === void 0 ? defaultStyle : _ref7$style, _ref7$customStyle = _ref7.customStyle, customStyle = _ref7$customStyle === void 0 ? {} : _ref7$customStyle, _ref7$codeTagProps = _ref7.codeTagProps, codeTagProps = _ref7$codeTagProps === void 0 ? {
- className: language ? "language-".concat(language) : void 0,
- style: _objectSpread2(_objectSpread2({}, style['code[class*="language-"]']), style['code[class*="language-'.concat(language, '"]')])
- } : _ref7$codeTagProps, _ref7$useInlineStyles = _ref7.useInlineStyles, useInlineStyles = _ref7$useInlineStyles === void 0 ? !0 : _ref7$useInlineStyles, _ref7$showLineNumbers = _ref7.showLineNumbers, showLineNumbers = _ref7$showLineNumbers === void 0 ? !1 : _ref7$showLineNumbers, _ref7$showInlineLineN = _ref7.showInlineLineNumbers, showInlineLineNumbers = _ref7$showInlineLineN === void 0 ? !0 : _ref7$showInlineLineN, _ref7$startingLineNum = _ref7.startingLineNumber, startingLineNumber = _ref7$startingLineNum === void 0 ? 1 : _ref7$startingLineNum, lineNumberContainerStyle = _ref7.lineNumberContainerStyle, _ref7$lineNumberStyle = _ref7.lineNumberStyle, lineNumberStyle = _ref7$lineNumberStyle === void 0 ? {} : _ref7$lineNumberStyle, wrapLines = _ref7.wrapLines, _ref7$wrapLongLines = _ref7.wrapLongLines, wrapLongLines = _ref7$wrapLongLines === void 0 ? !1 : _ref7$wrapLongLines, _ref7$lineProps = _ref7.lineProps, lineProps = _ref7$lineProps === void 0 ? {} : _ref7$lineProps, renderer = _ref7.renderer, _ref7$PreTag = _ref7.PreTag, PreTag = _ref7$PreTag === void 0 ? "pre" : _ref7$PreTag, _ref7$CodeTag = _ref7.CodeTag, CodeTag = _ref7$CodeTag === void 0 ? "code" : _ref7$CodeTag, _ref7$code = _ref7.code, code = _ref7$code === void 0 ? (Array.isArray(children) ? children[0] : children) || "" : _ref7$code, astGenerator = _ref7.astGenerator, rest = _objectWithoutProperties(_ref7, _excluded);
- astGenerator = astGenerator || defaultAstGenerator;
- var allLineNumbers = showLineNumbers ? import_react9.default.createElement(AllLineNumbers, {
- containerStyle: lineNumberContainerStyle,
- codeStyle: codeTagProps.style || {},
- numberStyle: lineNumberStyle,
- startingLineNumber,
- codeString: code
- }) : null, defaultPreStyle = style.hljs || style['pre[class*="language-"]'] || {
- backgroundColor: "#fff"
- }, generatorClassName = isHighlightJs(astGenerator) ? "hljs" : "prismjs", preProps = useInlineStyles ? Object.assign({}, rest, {
- style: Object.assign({}, defaultPreStyle, customStyle)
- }) : Object.assign({}, rest, {
- className: rest.className ? "".concat(generatorClassName, " ").concat(rest.className) : generatorClassName,
- style: Object.assign({}, customStyle)
- });
- if (wrapLongLines ? codeTagProps.style = _objectSpread2({
- whiteSpace: "pre-wrap"
- }, codeTagProps.style) : codeTagProps.style = _objectSpread2({
- whiteSpace: "pre"
- }, codeTagProps.style), !astGenerator)
- return import_react9.default.createElement(PreTag, preProps, allLineNumbers, import_react9.default.createElement(CodeTag, codeTagProps, code));
- (wrapLines === void 0 && renderer || wrapLongLines) && (wrapLines = !0), renderer = renderer || defaultRenderer;
- var defaultCodeValue = [{
- type: "text",
- value: code
- }], codeTree = getCodeTree({
- astGenerator,
- language,
- code,
- defaultCodeValue
- });
- codeTree.language === null && (codeTree.value = defaultCodeValue);
- var lineBreakCount = (_code$match$length = (_code$match = code.match(/\n/g)) === null || _code$match === void 0 ? void 0 : _code$match.length) !== null && _code$match$length !== void 0 ? _code$match$length : 0, largestLineNumber = startingLineNumber + lineBreakCount, rows = processLines(codeTree, wrapLines, lineProps, showLineNumbers, showInlineLineNumbers, startingLineNumber, largestLineNumber, lineNumberStyle, wrapLongLines);
- return import_react9.default.createElement(PreTag, preProps, import_react9.default.createElement(CodeTag, codeTagProps, !showInlineLineNumbers && allLineNumbers, renderer({
- rows,
- stylesheet: style,
- useInlineStyles
- })));
- };
- }
- var import_react9, _excluded, newLineRegex, init_highlight = __esm({
- "../../node_modules/react-syntax-highlighter/dist/esm/highlight.js"() {
- init_objectWithoutProperties();
- init_toConsumableArray();
- init_defineProperty();
- import_react9 = __toESM(require_react());
- init_create_element();
- init_checkForListedLanguage();
- _excluded = ["language", "children", "style", "customStyle", "codeTagProps", "useInlineStyles", "showLineNumbers", "showInlineLineNumbers", "startingLineNumber", "lineNumberContainerStyle", "lineNumberStyle", "wrapLines", "wrapLongLines", "lineProps", "renderer", "PreTag", "CodeTag", "code", "astGenerator"];
- newLineRegex = /\n/g;
- }
- });
-
- // ../../node_modules/xtend/immutable.js
- var require_immutable = __commonJS({
- "../../node_modules/xtend/immutable.js"(exports, module2) {
- module2.exports = extend;
- var hasOwnProperty6 = Object.prototype.hasOwnProperty;
- function extend() {
- for (var target = {}, i = 0; i < arguments.length; i++) {
- var source = arguments[i];
- for (var key in source)
- hasOwnProperty6.call(source, key) && (target[key] = source[key]);
- }
- return target;
- }
- }
- });
-
- // ../../node_modules/hastscript/node_modules/property-information/lib/util/schema.js
- var require_schema = __commonJS({
- "../../node_modules/hastscript/node_modules/property-information/lib/util/schema.js"(exports, module2) {
- "use strict";
- module2.exports = Schema;
- var proto = Schema.prototype;
- proto.space = null;
- proto.normal = {};
- proto.property = {};
- function Schema(property, normal, space) {
- this.property = property, this.normal = normal, space && (this.space = space);
- }
- }
- });
-
- // ../../node_modules/hastscript/node_modules/property-information/lib/util/merge.js
- var require_merge = __commonJS({
- "../../node_modules/hastscript/node_modules/property-information/lib/util/merge.js"(exports, module2) {
- "use strict";
- var xtend = require_immutable(), Schema = require_schema();
- module2.exports = merge3;
- function merge3(definitions) {
- for (var length2 = definitions.length, property = [], normal = [], index4 = -1, info, space; ++index4 < length2; )
- info = definitions[index4], property.push(info.property), normal.push(info.normal), space = info.space;
- return new Schema(
- xtend.apply(null, property),
- xtend.apply(null, normal),
- space
- );
- }
- }
- });
-
- // ../../node_modules/hastscript/node_modules/property-information/normalize.js
- var require_normalize = __commonJS({
- "../../node_modules/hastscript/node_modules/property-information/normalize.js"(exports, module2) {
- "use strict";
- module2.exports = normalize4;
- function normalize4(value) {
- return value.toLowerCase();
- }
- }
- });
-
- // ../../node_modules/hastscript/node_modules/property-information/lib/util/info.js
- var require_info = __commonJS({
- "../../node_modules/hastscript/node_modules/property-information/lib/util/info.js"(exports, module2) {
- "use strict";
- module2.exports = Info;
- var proto = Info.prototype;
- proto.space = null;
- proto.attribute = null;
- proto.property = null;
- proto.boolean = !1;
- proto.booleanish = !1;
- proto.overloadedBoolean = !1;
- proto.number = !1;
- proto.commaSeparated = !1;
- proto.spaceSeparated = !1;
- proto.commaOrSpaceSeparated = !1;
- proto.mustUseProperty = !1;
- proto.defined = !1;
- function Info(property, attribute) {
- this.property = property, this.attribute = attribute;
- }
- }
- });
-
- // ../../node_modules/hastscript/node_modules/property-information/lib/util/types.js
- var require_types = __commonJS({
- "../../node_modules/hastscript/node_modules/property-information/lib/util/types.js"(exports) {
- "use strict";
- var powers = 0;
- exports.boolean = increment();
- exports.booleanish = increment();
- exports.overloadedBoolean = increment();
- exports.number = increment();
- exports.spaceSeparated = increment();
- exports.commaSeparated = increment();
- exports.commaOrSpaceSeparated = increment();
- function increment() {
- return Math.pow(2, ++powers);
- }
- }
- });
-
- // ../../node_modules/hastscript/node_modules/property-information/lib/util/defined-info.js
- var require_defined_info = __commonJS({
- "../../node_modules/hastscript/node_modules/property-information/lib/util/defined-info.js"(exports, module2) {
- "use strict";
- var Info = require_info(), types = require_types();
- module2.exports = DefinedInfo;
- DefinedInfo.prototype = new Info();
- DefinedInfo.prototype.defined = !0;
- var checks = [
- "boolean",
- "booleanish",
- "overloadedBoolean",
- "number",
- "commaSeparated",
- "spaceSeparated",
- "commaOrSpaceSeparated"
- ], checksLength = checks.length;
- function DefinedInfo(property, attribute, mask, space) {
- var index4 = -1, check;
- for (mark(this, "space", space), Info.call(this, property, attribute); ++index4 < checksLength; )
- check = checks[index4], mark(this, check, (mask & types[check]) === types[check]);
- }
- function mark(values, key, value) {
- value && (values[key] = value);
- }
- }
- });
-
- // ../../node_modules/hastscript/node_modules/property-information/lib/util/create.js
- var require_create = __commonJS({
- "../../node_modules/hastscript/node_modules/property-information/lib/util/create.js"(exports, module2) {
- "use strict";
- var normalize4 = require_normalize(), Schema = require_schema(), DefinedInfo = require_defined_info();
- module2.exports = create4;
- function create4(definition) {
- var space = definition.space, mustUseProperty = definition.mustUseProperty || [], attributes = definition.attributes || {}, props = definition.properties, transform = definition.transform, property = {}, normal = {}, prop, info;
- for (prop in props)
- info = new DefinedInfo(
- prop,
- transform(attributes, prop),
- props[prop],
- space
- ), mustUseProperty.indexOf(prop) !== -1 && (info.mustUseProperty = !0), property[prop] = info, normal[normalize4(prop)] = prop, normal[normalize4(info.attribute)] = prop;
- return new Schema(property, normal, space);
- }
- }
- });
-
- // ../../node_modules/hastscript/node_modules/property-information/lib/xlink.js
- var require_xlink = __commonJS({
- "../../node_modules/hastscript/node_modules/property-information/lib/xlink.js"(exports, module2) {
- "use strict";
- var create4 = require_create();
- module2.exports = create4({
- space: "xlink",
- transform: xlinkTransform,
- properties: {
- xLinkActuate: null,
- xLinkArcRole: null,
- xLinkHref: null,
- xLinkRole: null,
- xLinkShow: null,
- xLinkTitle: null,
- xLinkType: null
- }
- });
- function xlinkTransform(_, prop) {
- return "xlink:" + prop.slice(5).toLowerCase();
- }
- }
- });
-
- // ../../node_modules/hastscript/node_modules/property-information/lib/xml.js
- var require_xml = __commonJS({
- "../../node_modules/hastscript/node_modules/property-information/lib/xml.js"(exports, module2) {
- "use strict";
- var create4 = require_create();
- module2.exports = create4({
- space: "xml",
- transform: xmlTransform,
- properties: {
- xmlLang: null,
- xmlBase: null,
- xmlSpace: null
- }
- });
- function xmlTransform(_, prop) {
- return "xml:" + prop.slice(3).toLowerCase();
- }
- }
- });
-
- // ../../node_modules/hastscript/node_modules/property-information/lib/util/case-sensitive-transform.js
- var require_case_sensitive_transform = __commonJS({
- "../../node_modules/hastscript/node_modules/property-information/lib/util/case-sensitive-transform.js"(exports, module2) {
- "use strict";
- module2.exports = caseSensitiveTransform;
- function caseSensitiveTransform(attributes, attribute) {
- return attribute in attributes ? attributes[attribute] : attribute;
- }
- }
- });
-
- // ../../node_modules/hastscript/node_modules/property-information/lib/util/case-insensitive-transform.js
- var require_case_insensitive_transform = __commonJS({
- "../../node_modules/hastscript/node_modules/property-information/lib/util/case-insensitive-transform.js"(exports, module2) {
- "use strict";
- var caseSensitiveTransform = require_case_sensitive_transform();
- module2.exports = caseInsensitiveTransform;
- function caseInsensitiveTransform(attributes, property) {
- return caseSensitiveTransform(attributes, property.toLowerCase());
- }
- }
- });
-
- // ../../node_modules/hastscript/node_modules/property-information/lib/xmlns.js
- var require_xmlns = __commonJS({
- "../../node_modules/hastscript/node_modules/property-information/lib/xmlns.js"(exports, module2) {
- "use strict";
- var create4 = require_create(), caseInsensitiveTransform = require_case_insensitive_transform();
- module2.exports = create4({
- space: "xmlns",
- attributes: {
- xmlnsxlink: "xmlns:xlink"
- },
- transform: caseInsensitiveTransform,
- properties: {
- xmlns: null,
- xmlnsXLink: null
- }
- });
- }
- });
-
- // ../../node_modules/hastscript/node_modules/property-information/lib/aria.js
- var require_aria = __commonJS({
- "../../node_modules/hastscript/node_modules/property-information/lib/aria.js"(exports, module2) {
- "use strict";
- var types = require_types(), create4 = require_create(), booleanish = types.booleanish, number = types.number, spaceSeparated = types.spaceSeparated;
- module2.exports = create4({
- transform: ariaTransform,
- properties: {
- ariaActiveDescendant: null,
- ariaAtomic: booleanish,
- ariaAutoComplete: null,
- ariaBusy: booleanish,
- ariaChecked: booleanish,
- ariaColCount: number,
- ariaColIndex: number,
- ariaColSpan: number,
- ariaControls: spaceSeparated,
- ariaCurrent: null,
- ariaDescribedBy: spaceSeparated,
- ariaDetails: null,
- ariaDisabled: booleanish,
- ariaDropEffect: spaceSeparated,
- ariaErrorMessage: null,
- ariaExpanded: booleanish,
- ariaFlowTo: spaceSeparated,
- ariaGrabbed: booleanish,
- ariaHasPopup: null,
- ariaHidden: booleanish,
- ariaInvalid: null,
- ariaKeyShortcuts: null,
- ariaLabel: null,
- ariaLabelledBy: spaceSeparated,
- ariaLevel: number,
- ariaLive: null,
- ariaModal: booleanish,
- ariaMultiLine: booleanish,
- ariaMultiSelectable: booleanish,
- ariaOrientation: null,
- ariaOwns: spaceSeparated,
- ariaPlaceholder: null,
- ariaPosInSet: number,
- ariaPressed: booleanish,
- ariaReadOnly: booleanish,
- ariaRelevant: null,
- ariaRequired: booleanish,
- ariaRoleDescription: spaceSeparated,
- ariaRowCount: number,
- ariaRowIndex: number,
- ariaRowSpan: number,
- ariaSelected: booleanish,
- ariaSetSize: number,
- ariaSort: null,
- ariaValueMax: number,
- ariaValueMin: number,
- ariaValueNow: number,
- ariaValueText: null,
- role: null
- }
- });
- function ariaTransform(_, prop) {
- return prop === "role" ? prop : "aria-" + prop.slice(4).toLowerCase();
- }
- }
- });
-
- // ../../node_modules/hastscript/node_modules/property-information/lib/html.js
- var require_html = __commonJS({
- "../../node_modules/hastscript/node_modules/property-information/lib/html.js"(exports, module2) {
- "use strict";
- var types = require_types(), create4 = require_create(), caseInsensitiveTransform = require_case_insensitive_transform(), boolean = types.boolean, overloadedBoolean = types.overloadedBoolean, booleanish = types.booleanish, number = types.number, spaceSeparated = types.spaceSeparated, commaSeparated = types.commaSeparated;
- module2.exports = create4({
- space: "html",
- attributes: {
- acceptcharset: "accept-charset",
- classname: "class",
- htmlfor: "for",
- httpequiv: "http-equiv"
- },
- transform: caseInsensitiveTransform,
- mustUseProperty: ["checked", "multiple", "muted", "selected"],
- properties: {
- // Standard Properties.
- abbr: null,
- accept: commaSeparated,
- acceptCharset: spaceSeparated,
- accessKey: spaceSeparated,
- action: null,
- allow: null,
- allowFullScreen: boolean,
- allowPaymentRequest: boolean,
- allowUserMedia: boolean,
- alt: null,
- as: null,
- async: boolean,
- autoCapitalize: null,
- autoComplete: spaceSeparated,
- autoFocus: boolean,
- autoPlay: boolean,
- capture: boolean,
- charSet: null,
- checked: boolean,
- cite: null,
- className: spaceSeparated,
- cols: number,
- colSpan: null,
- content: null,
- contentEditable: booleanish,
- controls: boolean,
- controlsList: spaceSeparated,
- coords: number | commaSeparated,
- crossOrigin: null,
- data: null,
- dateTime: null,
- decoding: null,
- default: boolean,
- defer: boolean,
- dir: null,
- dirName: null,
- disabled: boolean,
- download: overloadedBoolean,
- draggable: booleanish,
- encType: null,
- enterKeyHint: null,
- form: null,
- formAction: null,
- formEncType: null,
- formMethod: null,
- formNoValidate: boolean,
- formTarget: null,
- headers: spaceSeparated,
- height: number,
- hidden: boolean,
- high: number,
- href: null,
- hrefLang: null,
- htmlFor: spaceSeparated,
- httpEquiv: spaceSeparated,
- id: null,
- imageSizes: null,
- imageSrcSet: commaSeparated,
- inputMode: null,
- integrity: null,
- is: null,
- isMap: boolean,
- itemId: null,
- itemProp: spaceSeparated,
- itemRef: spaceSeparated,
- itemScope: boolean,
- itemType: spaceSeparated,
- kind: null,
- label: null,
- lang: null,
- language: null,
- list: null,
- loading: null,
- loop: boolean,
- low: number,
- manifest: null,
- max: null,
- maxLength: number,
- media: null,
- method: null,
- min: null,
- minLength: number,
- multiple: boolean,
- muted: boolean,
- name: null,
- nonce: null,
- noModule: boolean,
- noValidate: boolean,
- onAbort: null,
- onAfterPrint: null,
- onAuxClick: null,
- onBeforePrint: null,
- onBeforeUnload: null,
- onBlur: null,
- onCancel: null,
- onCanPlay: null,
- onCanPlayThrough: null,
- onChange: null,
- onClick: null,
- onClose: null,
- onContextMenu: null,
- onCopy: null,
- onCueChange: null,
- onCut: null,
- onDblClick: null,
- onDrag: null,
- onDragEnd: null,
- onDragEnter: null,
- onDragExit: null,
- onDragLeave: null,
- onDragOver: null,
- onDragStart: null,
- onDrop: null,
- onDurationChange: null,
- onEmptied: null,
- onEnded: null,
- onError: null,
- onFocus: null,
- onFormData: null,
- onHashChange: null,
- onInput: null,
- onInvalid: null,
- onKeyDown: null,
- onKeyPress: null,
- onKeyUp: null,
- onLanguageChange: null,
- onLoad: null,
- onLoadedData: null,
- onLoadedMetadata: null,
- onLoadEnd: null,
- onLoadStart: null,
- onMessage: null,
- onMessageError: null,
- onMouseDown: null,
- onMouseEnter: null,
- onMouseLeave: null,
- onMouseMove: null,
- onMouseOut: null,
- onMouseOver: null,
- onMouseUp: null,
- onOffline: null,
- onOnline: null,
- onPageHide: null,
- onPageShow: null,
- onPaste: null,
- onPause: null,
- onPlay: null,
- onPlaying: null,
- onPopState: null,
- onProgress: null,
- onRateChange: null,
- onRejectionHandled: null,
- onReset: null,
- onResize: null,
- onScroll: null,
- onSecurityPolicyViolation: null,
- onSeeked: null,
- onSeeking: null,
- onSelect: null,
- onSlotChange: null,
- onStalled: null,
- onStorage: null,
- onSubmit: null,
- onSuspend: null,
- onTimeUpdate: null,
- onToggle: null,
- onUnhandledRejection: null,
- onUnload: null,
- onVolumeChange: null,
- onWaiting: null,
- onWheel: null,
- open: boolean,
- optimum: number,
- pattern: null,
- ping: spaceSeparated,
- placeholder: null,
- playsInline: boolean,
- poster: null,
- preload: null,
- readOnly: boolean,
- referrerPolicy: null,
- rel: spaceSeparated,
- required: boolean,
- reversed: boolean,
- rows: number,
- rowSpan: number,
- sandbox: spaceSeparated,
- scope: null,
- scoped: boolean,
- seamless: boolean,
- selected: boolean,
- shape: null,
- size: number,
- sizes: null,
- slot: null,
- span: number,
- spellCheck: booleanish,
- src: null,
- srcDoc: null,
- srcLang: null,
- srcSet: commaSeparated,
- start: number,
- step: null,
- style: null,
- tabIndex: number,
- target: null,
- title: null,
- translate: null,
- type: null,
- typeMustMatch: boolean,
- useMap: null,
- value: booleanish,
- width: number,
- wrap: null,
- // Legacy.
- // See: https://html.spec.whatwg.org/#other-elements,-attributes-and-apis
- align: null,
- // Several. Use CSS `text-align` instead,
- aLink: null,
- // `<body>`. Use CSS `a:active {color}` instead
- archive: spaceSeparated,
- // `<object>`. List of URIs to archives
- axis: null,
- // `<td>` and `<th>`. Use `scope` on `<th>`
- background: null,
- // `<body>`. Use CSS `background-image` instead
- bgColor: null,
- // `<body>` and table elements. Use CSS `background-color` instead
- border: number,
- // `<table>`. Use CSS `border-width` instead,
- borderColor: null,
- // `<table>`. Use CSS `border-color` instead,
- bottomMargin: number,
- // `<body>`
- cellPadding: null,
- // `<table>`
- cellSpacing: null,
- // `<table>`
- char: null,
- // Several table elements. When `align=char`, sets the character to align on
- charOff: null,
- // Several table elements. When `char`, offsets the alignment
- classId: null,
- // `<object>`
- clear: null,
- // `<br>`. Use CSS `clear` instead
- code: null,
- // `<object>`
- codeBase: null,
- // `<object>`
- codeType: null,
- // `<object>`
- color: null,
- // `<font>` and `<hr>`. Use CSS instead
- compact: boolean,
- // Lists. Use CSS to reduce space between items instead
- declare: boolean,
- // `<object>`
- event: null,
- // `<script>`
- face: null,
- // `<font>`. Use CSS instead
- frame: null,
- // `<table>`
- frameBorder: null,
- // `<iframe>`. Use CSS `border` instead
- hSpace: number,
- // `<img>` and `<object>`
- leftMargin: number,
- // `<body>`
- link: null,
- // `<body>`. Use CSS `a:link {color: *}` instead
- longDesc: null,
- // `<frame>`, `<iframe>`, and `<img>`. Use an `<a>`
- lowSrc: null,
- // `<img>`. Use a `<picture>`
- marginHeight: number,
- // `<body>`
- marginWidth: number,
- // `<body>`
- noResize: boolean,
- // `<frame>`
- noHref: boolean,
- // `<area>`. Use no href instead of an explicit `nohref`
- noShade: boolean,
- // `<hr>`. Use background-color and height instead of borders
- noWrap: boolean,
- // `<td>` and `<th>`
- object: null,
- // `<applet>`
- profile: null,
- // `<head>`
- prompt: null,
- // `<isindex>`
- rev: null,
- // `<link>`
- rightMargin: number,
- // `<body>`
- rules: null,
- // `<table>`
- scheme: null,
- // `<meta>`
- scrolling: booleanish,
- // `<frame>`. Use overflow in the child context
- standby: null,
- // `<object>`
- summary: null,
- // `<table>`
- text: null,
- // `<body>`. Use CSS `color` instead
- topMargin: number,
- // `<body>`
- valueType: null,
- // `<param>`
- version: null,
- // `<html>`. Use a doctype.
- vAlign: null,
- // Several. Use CSS `vertical-align` instead
- vLink: null,
- // `<body>`. Use CSS `a:visited {color}` instead
- vSpace: number,
- // `<img>` and `<object>`
- // Non-standard Properties.
- allowTransparency: null,
- autoCorrect: null,
- autoSave: null,
- disablePictureInPicture: boolean,
- disableRemotePlayback: boolean,
- prefix: null,
- property: null,
- results: number,
- security: null,
- unselectable: null
- }
- });
- }
- });
-
- // ../../node_modules/hastscript/node_modules/property-information/html.js
- var require_html2 = __commonJS({
- "../../node_modules/hastscript/node_modules/property-information/html.js"(exports, module2) {
- "use strict";
- var merge3 = require_merge(), xlink = require_xlink(), xml = require_xml(), xmlns = require_xmlns(), aria = require_aria(), html = require_html();
- module2.exports = merge3([xml, xlink, xmlns, aria, html]);
- }
- });
-
- // ../../node_modules/hastscript/node_modules/property-information/find.js
- var require_find = __commonJS({
- "../../node_modules/hastscript/node_modules/property-information/find.js"(exports, module2) {
- "use strict";
- var normalize4 = require_normalize(), DefinedInfo = require_defined_info(), Info = require_info(), data = "data";
- module2.exports = find2;
- var valid = /^data[-\w.:]+$/i, dash = /-[a-z]/g, cap = /[A-Z]/g;
- function find2(schema, value) {
- var normal = normalize4(value), prop = value, Type = Info;
- return normal in schema.normal ? schema.property[schema.normal[normal]] : (normal.length > 4 && normal.slice(0, 4) === data && valid.test(value) && (value.charAt(4) === "-" ? prop = datasetToProperty(value) : value = datasetToAttribute(value), Type = DefinedInfo), new Type(prop, value));
- }
- function datasetToProperty(attribute) {
- var value = attribute.slice(5).replace(dash, camelcase);
- return data + value.charAt(0).toUpperCase() + value.slice(1);
- }
- function datasetToAttribute(property) {
- var value = property.slice(4);
- return dash.test(value) ? property : (value = value.replace(cap, kebab), value.charAt(0) !== "-" && (value = "-" + value), data + value);
- }
- function kebab($0) {
- return "-" + $0.toLowerCase();
- }
- function camelcase($0) {
- return $0.charAt(1).toUpperCase();
- }
- }
- });
-
- // ../../node_modules/hast-util-parse-selector/index.js
- var require_hast_util_parse_selector = __commonJS({
- "../../node_modules/hast-util-parse-selector/index.js"(exports, module2) {
- "use strict";
- module2.exports = parse9;
- var search = /[#.]/g;
- function parse9(selector, defaultTagName) {
- for (var value = selector || "", name = defaultTagName || "div", props = {}, start2 = 0, subvalue, previous, match3; start2 < value.length; )
- search.lastIndex = start2, match3 = search.exec(value), subvalue = value.slice(start2, match3 ? match3.index : value.length), subvalue && (previous ? previous === "#" ? props.id = subvalue : props.className ? props.className.push(subvalue) : props.className = [subvalue] : name = subvalue, start2 += subvalue.length), match3 && (previous = match3[0], start2++);
- return { type: "element", tagName: name, properties: props, children: [] };
- }
- }
- });
-
- // ../../node_modules/hastscript/node_modules/space-separated-tokens/index.js
- var require_space_separated_tokens = __commonJS({
- "../../node_modules/hastscript/node_modules/space-separated-tokens/index.js"(exports) {
- "use strict";
- exports.parse = parse9;
- exports.stringify = stringify8;
- var empty = "", space = " ", whiteSpace = /[ \t\n\r\f]+/g;
- function parse9(value) {
- var input2 = String(value || empty).trim();
- return input2 === empty ? [] : input2.split(whiteSpace);
- }
- function stringify8(values) {
- return values.join(space).trim();
- }
- }
- });
-
- // ../../node_modules/hastscript/node_modules/comma-separated-tokens/index.js
- var require_comma_separated_tokens = __commonJS({
- "../../node_modules/hastscript/node_modules/comma-separated-tokens/index.js"(exports) {
- "use strict";
- exports.parse = parse9;
- exports.stringify = stringify8;
- var comma = ",", space = " ", empty = "";
- function parse9(value) {
- for (var values = [], input2 = String(value || empty), index4 = input2.indexOf(comma), lastIndex = 0, end2 = !1, val; !end2; )
- index4 === -1 && (index4 = input2.length, end2 = !0), val = input2.slice(lastIndex, index4).trim(), (val || !end2) && values.push(val), lastIndex = index4 + 1, index4 = input2.indexOf(comma, lastIndex);
- return values;
- }
- function stringify8(values, options) {
- var settings = options || {}, left2 = settings.padLeft === !1 ? empty : space, right2 = settings.padRight ? space : empty;
- return values[values.length - 1] === empty && (values = values.concat(empty)), values.join(right2 + comma + left2).trim();
- }
- }
- });
-
- // ../../node_modules/hastscript/factory.js
- var require_factory = __commonJS({
- "../../node_modules/hastscript/factory.js"(exports, module2) {
- "use strict";
- var find2 = require_find(), normalize4 = require_normalize(), parseSelector = require_hast_util_parse_selector(), spaces = require_space_separated_tokens().parse, commas = require_comma_separated_tokens().parse;
- module2.exports = factory;
- var own = {}.hasOwnProperty;
- function factory(schema, defaultTagName, caseSensitive) {
- var adjust = caseSensitive ? createAdjustMap(caseSensitive) : null;
- return h3;
- function h3(selector, properties) {
- var node2 = parseSelector(selector, defaultTagName), children = Array.prototype.slice.call(arguments, 2), name = node2.tagName.toLowerCase(), property;
- if (node2.tagName = adjust && own.call(adjust, name) ? adjust[name] : name, properties && isChildren(properties, node2) && (children.unshift(properties), properties = null), properties)
- for (property in properties)
- addProperty2(node2.properties, property, properties[property]);
- return addChild(node2.children, children), node2.tagName === "template" && (node2.content = { type: "root", children: node2.children }, node2.children = []), node2;
- }
- function addProperty2(properties, key, value) {
- var info, property, result;
- value == null || value !== value || (info = find2(schema, key), property = info.property, result = value, typeof result == "string" && (info.spaceSeparated ? result = spaces(result) : info.commaSeparated ? result = commas(result) : info.commaOrSpaceSeparated && (result = spaces(commas(result).join(" ")))), property === "style" && typeof value != "string" && (result = style(result)), property === "className" && properties.className && (result = properties.className.concat(result)), properties[property] = parsePrimitives(info, property, result));
- }
- }
- function isChildren(value, node2) {
- return typeof value == "string" || "length" in value || isNode2(node2.tagName, value);
- }
- function isNode2(tagName, value) {
- var type5 = value.type;
- return tagName === "input" || !type5 || typeof type5 != "string" ? !1 : typeof value.children == "object" && "length" in value.children ? !0 : (type5 = type5.toLowerCase(), tagName === "button" ? type5 !== "menu" && type5 !== "submit" && type5 !== "reset" && type5 !== "button" : "value" in value);
- }
- function addChild(nodes, value) {
- var index4, length2;
- if (typeof value == "string" || typeof value == "number") {
- nodes.push({ type: "text", value: String(value) });
- return;
- }
- if (typeof value == "object" && "length" in value) {
- for (index4 = -1, length2 = value.length; ++index4 < length2; )
- addChild(nodes, value[index4]);
- return;
- }
- if (typeof value != "object" || !("type" in value))
- throw new Error("Expected node, nodes, or string, got `" + value + "`");
- nodes.push(value);
- }
- function parsePrimitives(info, name, value) {
- var index4, length2, result;
- if (typeof value != "object" || !("length" in value))
- return parsePrimitive(info, name, value);
- for (length2 = value.length, index4 = -1, result = []; ++index4 < length2; )
- result[index4] = parsePrimitive(info, name, value[index4]);
- return result;
- }
- function parsePrimitive(info, name, value) {
- var result = value;
- return info.number || info.positiveNumber ? !isNaN(result) && result !== "" && (result = Number(result)) : (info.boolean || info.overloadedBoolean) && typeof result == "string" && (result === "" || normalize4(value) === normalize4(name)) && (result = !0), result;
- }
- function style(value) {
- var result = [], key;
- for (key in value)
- result.push([key, value[key]].join(": "));
- return result.join("; ");
- }
- function createAdjustMap(values) {
- for (var length2 = values.length, index4 = -1, result = {}, value; ++index4 < length2; )
- value = values[index4], result[value.toLowerCase()] = value;
- return result;
- }
- }
- });
-
- // ../../node_modules/hastscript/html.js
- var require_html3 = __commonJS({
- "../../node_modules/hastscript/html.js"(exports, module2) {
- "use strict";
- var schema = require_html2(), factory = require_factory(), html = factory(schema, "div");
- html.displayName = "html";
- module2.exports = html;
- }
- });
-
- // ../../node_modules/hastscript/index.js
- var require_hastscript = __commonJS({
- "../../node_modules/hastscript/index.js"(exports, module2) {
- "use strict";
- module2.exports = require_html3();
- }
- });
-
- // ../../node_modules/refractor/node_modules/character-entities-legacy/index.json
- var require_character_entities_legacy = __commonJS({
- "../../node_modules/refractor/node_modules/character-entities-legacy/index.json"(exports, module2) {
- module2.exports = {
- AElig: "\xC6",
- AMP: "&",
- Aacute: "\xC1",
- Acirc: "\xC2",
- Agrave: "\xC0",
- Aring: "\xC5",
- Atilde: "\xC3",
- Auml: "\xC4",
- COPY: "\xA9",
- Ccedil: "\xC7",
- ETH: "\xD0",
- Eacute: "\xC9",
- Ecirc: "\xCA",
- Egrave: "\xC8",
- Euml: "\xCB",
- GT: ">",
- Iacute: "\xCD",
- Icirc: "\xCE",
- Igrave: "\xCC",
- Iuml: "\xCF",
- LT: "<",
- Ntilde: "\xD1",
- Oacute: "\xD3",
- Ocirc: "\xD4",
- Ograve: "\xD2",
- Oslash: "\xD8",
- Otilde: "\xD5",
- Ouml: "\xD6",
- QUOT: '"',
- REG: "\xAE",
- THORN: "\xDE",
- Uacute: "\xDA",
- Ucirc: "\xDB",
- Ugrave: "\xD9",
- Uuml: "\xDC",
- Yacute: "\xDD",
- aacute: "\xE1",
- acirc: "\xE2",
- acute: "\xB4",
- aelig: "\xE6",
- agrave: "\xE0",
- amp: "&",
- aring: "\xE5",
- atilde: "\xE3",
- auml: "\xE4",
- brvbar: "\xA6",
- ccedil: "\xE7",
- cedil: "\xB8",
- cent: "\xA2",
- copy: "\xA9",
- curren: "\xA4",
- deg: "\xB0",
- divide: "\xF7",
- eacute: "\xE9",
- ecirc: "\xEA",
- egrave: "\xE8",
- eth: "\xF0",
- euml: "\xEB",
- frac12: "\xBD",
- frac14: "\xBC",
- frac34: "\xBE",
- gt: ">",
- iacute: "\xED",
- icirc: "\xEE",
- iexcl: "\xA1",
- igrave: "\xEC",
- iquest: "\xBF",
- iuml: "\xEF",
- laquo: "\xAB",
- lt: "<",
- macr: "\xAF",
- micro: "\xB5",
- middot: "\xB7",
- nbsp: "\xA0",
- not: "\xAC",
- ntilde: "\xF1",
- oacute: "\xF3",
- ocirc: "\xF4",
- ograve: "\xF2",
- ordf: "\xAA",
- ordm: "\xBA",
- oslash: "\xF8",
- otilde: "\xF5",
- ouml: "\xF6",
- para: "\xB6",
- plusmn: "\xB1",
- pound: "\xA3",
- quot: '"',
- raquo: "\xBB",
- reg: "\xAE",
- sect: "\xA7",
- shy: "\xAD",
- sup1: "\xB9",
- sup2: "\xB2",
- sup3: "\xB3",
- szlig: "\xDF",
- thorn: "\xFE",
- times: "\xD7",
- uacute: "\xFA",
- ucirc: "\xFB",
- ugrave: "\xF9",
- uml: "\xA8",
- uuml: "\xFC",
- yacute: "\xFD",
- yen: "\xA5",
- yuml: "\xFF"
- };
- }
- });
-
- // ../../node_modules/refractor/node_modules/character-reference-invalid/index.json
- var require_character_reference_invalid = __commonJS({
- "../../node_modules/refractor/node_modules/character-reference-invalid/index.json"(exports, module2) {
- module2.exports = {
- "0": "\uFFFD",
- "128": "\u20AC",
- "130": "\u201A",
- "131": "\u0192",
- "132": "\u201E",
- "133": "\u2026",
- "134": "\u2020",
- "135": "\u2021",
- "136": "\u02C6",
- "137": "\u2030",
- "138": "\u0160",
- "139": "\u2039",
- "140": "\u0152",
- "142": "\u017D",
- "145": "\u2018",
- "146": "\u2019",
- "147": "\u201C",
- "148": "\u201D",
- "149": "\u2022",
- "150": "\u2013",
- "151": "\u2014",
- "152": "\u02DC",
- "153": "\u2122",
- "154": "\u0161",
- "155": "\u203A",
- "156": "\u0153",
- "158": "\u017E",
- "159": "\u0178"
- };
- }
- });
-
- // ../../node_modules/refractor/node_modules/is-decimal/index.js
- var require_is_decimal = __commonJS({
- "../../node_modules/refractor/node_modules/is-decimal/index.js"(exports, module2) {
- "use strict";
- module2.exports = decimal;
- function decimal(character2) {
- var code = typeof character2 == "string" ? character2.charCodeAt(0) : character2;
- return code >= 48 && code <= 57;
- }
- }
- });
-
- // ../../node_modules/refractor/node_modules/is-hexadecimal/index.js
- var require_is_hexadecimal = __commonJS({
- "../../node_modules/refractor/node_modules/is-hexadecimal/index.js"(exports, module2) {
- "use strict";
- module2.exports = hexadecimal;
- function hexadecimal(character2) {
- var code = typeof character2 == "string" ? character2.charCodeAt(0) : character2;
- return code >= 97 && code <= 102 || code >= 65 && code <= 70 || code >= 48 && code <= 57;
- }
- }
- });
-
- // ../../node_modules/refractor/node_modules/is-alphabetical/index.js
- var require_is_alphabetical = __commonJS({
- "../../node_modules/refractor/node_modules/is-alphabetical/index.js"(exports, module2) {
- "use strict";
- module2.exports = alphabetical;
- function alphabetical(character2) {
- var code = typeof character2 == "string" ? character2.charCodeAt(0) : character2;
- return code >= 97 && code <= 122 || code >= 65 && code <= 90;
- }
- }
- });
-
- // ../../node_modules/refractor/node_modules/is-alphanumerical/index.js
- var require_is_alphanumerical = __commonJS({
- "../../node_modules/refractor/node_modules/is-alphanumerical/index.js"(exports, module2) {
- "use strict";
- var alphabetical = require_is_alphabetical(), decimal = require_is_decimal();
- module2.exports = alphanumerical;
- function alphanumerical(character2) {
- return alphabetical(character2) || decimal(character2);
- }
- }
- });
-
- // ../../node_modules/refractor/node_modules/parse-entities/decode-entity.browser.js
- var require_decode_entity_browser = __commonJS({
- "../../node_modules/refractor/node_modules/parse-entities/decode-entity.browser.js"(exports, module2) {
- "use strict";
- var el, semicolon = 59;
- module2.exports = decodeEntity;
- function decodeEntity(characters2) {
- var entity = "&" + characters2 + ";", char2;
- return el = el || document.createElement("i"), el.innerHTML = entity, char2 = el.textContent, char2.charCodeAt(char2.length - 1) === semicolon && characters2 !== "semi" || char2 === entity ? !1 : char2;
- }
- }
- });
-
- // ../../node_modules/refractor/node_modules/parse-entities/index.js
- var require_parse_entities = __commonJS({
- "../../node_modules/refractor/node_modules/parse-entities/index.js"(exports, module2) {
- "use strict";
- var legacy = require_character_entities_legacy(), invalid = require_character_reference_invalid(), decimal = require_is_decimal(), hexadecimal = require_is_hexadecimal(), alphanumerical = require_is_alphanumerical(), decodeEntity = require_decode_entity_browser();
- module2.exports = parseEntities;
- var own = {}.hasOwnProperty, fromCharCode = String.fromCharCode, noop7 = Function.prototype, defaults = {
- warning: null,
- reference: null,
- text: null,
- warningContext: null,
- referenceContext: null,
- textContext: null,
- position: {},
- additional: null,
- attribute: !1,
- nonTerminated: !0
- }, tab3 = 9, lineFeed = 10, formFeed = 12, space = 32, ampersand = 38, semicolon = 59, lessThan = 60, equalsTo = 61, numberSign = 35, uppercaseX = 88, lowercaseX = 120, replacementCharacter = 65533, name = "named", hexa = "hexadecimal", deci = "decimal", bases = {};
- bases[hexa] = 16;
- bases[deci] = 10;
- var tests = {};
- tests[name] = alphanumerical;
- tests[deci] = decimal;
- tests[hexa] = hexadecimal;
- var namedNotTerminated = 1, numericNotTerminated = 2, namedEmpty = 3, numericEmpty = 4, namedUnknown = 5, numericDisallowed = 6, numericProhibited = 7, messages = {};
- messages[namedNotTerminated] = "Named character references must be terminated by a semicolon";
- messages[numericNotTerminated] = "Numeric character references must be terminated by a semicolon";
- messages[namedEmpty] = "Named character references cannot be empty";
- messages[numericEmpty] = "Numeric character references cannot be empty";
- messages[namedUnknown] = "Named character references must be known";
- messages[numericDisallowed] = "Numeric character references cannot be disallowed";
- messages[numericProhibited] = "Numeric character references cannot be outside the permissible Unicode range";
- function parseEntities(value, options) {
- var settings = {}, option, key;
- options || (options = {});
- for (key in defaults)
- option = options[key], settings[key] = option ?? defaults[key];
- return (settings.position.indent || settings.position.start) && (settings.indent = settings.position.indent || [], settings.position = settings.position.start), parse9(value, settings);
- }
- function parse9(value, settings) {
- var additional = settings.additional, nonTerminated = settings.nonTerminated, handleText = settings.text, handleReference = settings.reference, handleWarning = settings.warning, textContext = settings.textContext, referenceContext = settings.referenceContext, warningContext = settings.warningContext, pos = settings.position, indent2 = settings.indent || [], length2 = value.length, index4 = 0, lines = -1, column2 = pos.column || 1, line2 = pos.line || 1, queue = "", result = [], entityCharacters, namedEntity, terminated, characters2, character2, reference2, following, warning3, reason, output, entity, begin, start2, type5, test3, prev2, next2, diff2, end2;
- for (typeof additional == "string" && (additional = additional.charCodeAt(0)), prev2 = now(), warning3 = handleWarning ? parseError : noop7, index4--, length2++; ++index4 < length2; )
- if (character2 === lineFeed && (column2 = indent2[lines] || 1), character2 = value.charCodeAt(index4), character2 === ampersand) {
- if (following = value.charCodeAt(index4 + 1), following === tab3 || following === lineFeed || following === formFeed || following === space || following === ampersand || following === lessThan || following !== following || additional && following === additional) {
- queue += fromCharCode(character2), column2++;
- continue;
- }
- for (start2 = index4 + 1, begin = start2, end2 = start2, following === numberSign ? (end2 = ++begin, following = value.charCodeAt(end2), following === uppercaseX || following === lowercaseX ? (type5 = hexa, end2 = ++begin) : type5 = deci) : type5 = name, entityCharacters = "", entity = "", characters2 = "", test3 = tests[type5], end2--; ++end2 < length2 && (following = value.charCodeAt(end2), !!test3(following)); )
- characters2 += fromCharCode(following), type5 === name && own.call(legacy, characters2) && (entityCharacters = characters2, entity = legacy[characters2]);
- terminated = value.charCodeAt(end2) === semicolon, terminated && (end2++, namedEntity = type5 === name ? decodeEntity(characters2) : !1, namedEntity && (entityCharacters = characters2, entity = namedEntity)), diff2 = 1 + end2 - start2, !terminated && !nonTerminated || (characters2 ? type5 === name ? (terminated && !entity ? warning3(namedUnknown, 1) : (entityCharacters !== characters2 && (end2 = begin + entityCharacters.length, diff2 = 1 + end2 - begin, terminated = !1), terminated || (reason = entityCharacters ? namedNotTerminated : namedEmpty, settings.attribute ? (following = value.charCodeAt(end2), following === equalsTo ? (warning3(reason, diff2), entity = null) : alphanumerical(following) ? entity = null : warning3(reason, diff2)) : warning3(reason, diff2))), reference2 = entity) : (terminated || warning3(numericNotTerminated, diff2), reference2 = parseInt(characters2, bases[type5]), prohibited(reference2) ? (warning3(numericProhibited, diff2), reference2 = fromCharCode(replacementCharacter)) : reference2 in invalid ? (warning3(numericDisallowed, diff2), reference2 = invalid[reference2]) : (output = "", disallowed(reference2) && warning3(numericDisallowed, diff2), reference2 > 65535 && (reference2 -= 65536, output += fromCharCode(reference2 >>> 10 | 55296), reference2 = 56320 | reference2 & 1023), reference2 = output + fromCharCode(reference2))) : type5 !== name && warning3(numericEmpty, diff2)), reference2 ? (flush(), prev2 = now(), index4 = end2 - 1, column2 += end2 - start2 + 1, result.push(reference2), next2 = now(), next2.offset++, handleReference && handleReference.call(
- referenceContext,
- reference2,
- { start: prev2, end: next2 },
- value.slice(start2 - 1, end2)
- ), prev2 = next2) : (characters2 = value.slice(start2 - 1, end2), queue += characters2, column2 += characters2.length, index4 = end2 - 1);
- } else
- character2 === 10 && (line2++, lines++, column2 = 0), character2 === character2 ? (queue += fromCharCode(character2), column2++) : flush();
- return result.join("");
- function now() {
- return {
- line: line2,
- column: column2,
- offset: index4 + (pos.offset || 0)
- };
- }
- function parseError(code, offset3) {
- var position2 = now();
- position2.column += offset3, position2.offset += offset3, handleWarning.call(warningContext, messages[code], position2, code);
- }
- function flush() {
- queue && (result.push(queue), handleText && handleText.call(textContext, queue, { start: prev2, end: now() }), queue = "");
- }
- }
- function prohibited(code) {
- return code >= 55296 && code <= 57343 || code > 1114111;
- }
- function disallowed(code) {
- return code >= 1 && code <= 8 || code === 11 || code >= 13 && code <= 31 || code >= 127 && code <= 159 || code >= 64976 && code <= 65007 || (code & 65535) === 65535 || (code & 65535) === 65534;
- }
- }
- });
-
- // ../../node_modules/refractor/node_modules/prismjs/components/prism-core.js
- var require_prism_core = __commonJS({
- "../../node_modules/refractor/node_modules/prismjs/components/prism-core.js"(exports, module2) {
- var _self = typeof window < "u" ? window : typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope ? self : {};
- var Prism = (function(_self2) {
- var lang = /(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i, uniqueId = 0, plainTextGrammar = {}, _ = {
- /**
- * By default, Prism will attempt to highlight all code elements (by calling {@link Prism.highlightAll}) on the
- * current page after the page finished loading. This might be a problem if e.g. you wanted to asynchronously load
- * additional languages or plugins yourself.
- *
- * By setting this value to `true`, Prism will not automatically highlight all code elements on the page.
- *
- * You obviously have to change this value before the automatic highlighting started. To do this, you can add an
- * empty Prism object into the global scope before loading the Prism script like this:
- *
- * ```js
- * window.Prism = window.Prism || {};
- * Prism.manual = true;
- * // add a new <script> to load Prism's script
- * ```
- *
- * @default false
- * @type {boolean}
- * @memberof Prism
- * @public
- */
- manual: _self2.Prism && _self2.Prism.manual,
- /**
- * By default, if Prism is in a web worker, it assumes that it is in a worker it created itself, so it uses
- * `addEventListener` to communicate with its parent instance. However, if you're using Prism manually in your
- * own worker, you don't want it to do this.
- *
- * By setting this value to `true`, Prism will not add its own listeners to the worker.
- *
- * You obviously have to change this value before Prism executes. To do this, you can add an
- * empty Prism object into the global scope before loading the Prism script like this:
- *
- * ```js
- * window.Prism = window.Prism || {};
- * Prism.disableWorkerMessageHandler = true;
- * // Load Prism's script
- * ```
- *
- * @default false
- * @type {boolean}
- * @memberof Prism
- * @public
- */
- disableWorkerMessageHandler: _self2.Prism && _self2.Prism.disableWorkerMessageHandler,
- /**
- * A namespace for utility methods.
- *
- * All function in this namespace that are not explicitly marked as _public_ are for __internal use only__ and may
- * change or disappear at any time.
- *
- * @namespace
- * @memberof Prism
- */
- util: {
- encode: function encode2(tokens2) {
- return tokens2 instanceof Token ? new Token(tokens2.type, encode2(tokens2.content), tokens2.alias) : Array.isArray(tokens2) ? tokens2.map(encode2) : tokens2.replace(/&/g, "&").replace(/</g, "<").replace(/\u00a0/g, " ");
- },
- /**
- * Returns the name of the type of the given value.
- *
- * @param {any} o
- * @returns {string}
- * @example
- * type(null) === 'Null'
- * type(undefined) === 'Undefined'
- * type(123) === 'Number'
- * type('foo') === 'String'
- * type(true) === 'Boolean'
- * type([1, 2]) === 'Array'
- * type({}) === 'Object'
- * type(String) === 'Function'
- * type(/abc+/) === 'RegExp'
- */
- type: function(o) {
- return Object.prototype.toString.call(o).slice(8, -1);
- },
- /**
- * Returns a unique number for the given object. Later calls will still return the same number.
- *
- * @param {Object} obj
- * @returns {number}
- */
- objId: function(obj) {
- return obj.__id || Object.defineProperty(obj, "__id", { value: ++uniqueId }), obj.__id;
- },
- /**
- * Creates a deep clone of the given object.
- *
- * The main intended use of this function is to clone language definitions.
- *
- * @param {T} o
- * @param {Record<number, any>} [visited]
- * @returns {T}
- * @template T
- */
- clone: function deepClone2(o, visited) {
- visited = visited || {};
- var clone3, id;
- switch (_.util.type(o)) {
- case "Object":
- if (id = _.util.objId(o), visited[id])
- return visited[id];
- clone3 = /** @type {Record<string, any>} */
- {}, visited[id] = clone3;
- for (var key in o)
- o.hasOwnProperty(key) && (clone3[key] = deepClone2(o[key], visited));
- return (
- /** @type {any} */
- clone3
- );
- case "Array":
- return id = _.util.objId(o), visited[id] ? visited[id] : (clone3 = [], visited[id] = clone3, /** @type {Array} */
- /** @type {any} */
- o.forEach(function(v, i) {
- clone3[i] = deepClone2(v, visited);
- }), /** @type {any} */
- clone3);
- default:
- return o;
- }
- },
- /**
- * Returns the Prism language of the given element set by a `language-xxxx` or `lang-xxxx` class.
- *
- * If no language is set for the element or the element is `null` or `undefined`, `none` will be returned.
- *
- * @param {Element} element
- * @returns {string}
- */
- getLanguage: function(element) {
- for (; element; ) {
- var m3 = lang.exec(element.className);
- if (m3)
- return m3[1].toLowerCase();
- element = element.parentElement;
- }
- return "none";
- },
- /**
- * Sets the Prism `language-xxxx` class of the given element.
- *
- * @param {Element} element
- * @param {string} language
- * @returns {void}
- */
- setLanguage: function(element, language) {
- element.className = element.className.replace(RegExp(lang, "gi"), ""), element.classList.add("language-" + language);
- },
- /**
- * Returns the script element that is currently executing.
- *
- * This does __not__ work for line script element.
- *
- * @returns {HTMLScriptElement | null}
- */
- currentScript: function() {
- if (typeof document > "u")
- return null;
- if ("currentScript" in document)
- return (
- /** @type {any} */
- document.currentScript
- );
- try {
- throw new Error();
- } catch (err) {
- var src = (/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(err.stack) || [])[1];
- if (src) {
- var scripts = document.getElementsByTagName("script");
- for (var i in scripts)
- if (scripts[i].src == src)
- return scripts[i];
- }
- return null;
- }
- },
- /**
- * Returns whether a given class is active for `element`.
- *
- * The class can be activated if `element` or one of its ancestors has the given class and it can be deactivated
- * if `element` or one of its ancestors has the negated version of the given class. The _negated version_ of the
- * given class is just the given class with a `no-` prefix.
- *
- * Whether the class is active is determined by the closest ancestor of `element` (where `element` itself is
- * closest ancestor) that has the given class or the negated version of it. If neither `element` nor any of its
- * ancestors have the given class or the negated version of it, then the default activation will be returned.
- *
- * In the paradoxical situation where the closest ancestor contains __both__ the given class and the negated
- * version of it, the class is considered active.
- *
- * @param {Element} element
- * @param {string} className
- * @param {boolean} [defaultActivation=false]
- * @returns {boolean}
- */
- isActive: function(element, className, defaultActivation) {
- for (var no = "no-" + className; element; ) {
- var classList = element.classList;
- if (classList.contains(className))
- return !0;
- if (classList.contains(no))
- return !1;
- element = element.parentElement;
- }
- return !!defaultActivation;
- }
- },
- /**
- * This namespace contains all currently loaded languages and the some helper functions to create and modify languages.
- *
- * @namespace
- * @memberof Prism
- * @public
- */
- languages: {
- /**
- * The grammar for plain, unformatted text.
- */
- plain: plainTextGrammar,
- plaintext: plainTextGrammar,
- text: plainTextGrammar,
- txt: plainTextGrammar,
- /**
- * Creates a deep copy of the language with the given id and appends the given tokens.
- *
- * If a token in `redef` also appears in the copied language, then the existing token in the copied language
- * will be overwritten at its original position.
- *
- * ## Best practices
- *
- * Since the position of overwriting tokens (token in `redef` that overwrite tokens in the copied language)
- * doesn't matter, they can technically be in any order. However, this can be confusing to others that trying to
- * understand the language definition because, normally, the order of tokens matters in Prism grammars.
- *
- * Therefore, it is encouraged to order overwriting tokens according to the positions of the overwritten tokens.
- * Furthermore, all non-overwriting tokens should be placed after the overwriting ones.
- *
- * @param {string} id The id of the language to extend. This has to be a key in `Prism.languages`.
- * @param {Grammar} redef The new tokens to append.
- * @returns {Grammar} The new language created.
- * @public
- * @example
- * Prism.languages['css-with-colors'] = Prism.languages.extend('css', {
- * // Prism.languages.css already has a 'comment' token, so this token will overwrite CSS' 'comment' token
- * // at its original position
- * 'comment': { ... },
- * // CSS doesn't have a 'color' token, so this token will be appended
- * 'color': /\b(?:red|green|blue)\b/
- * });
- */
- extend: function(id, redef) {
- var lang2 = _.util.clone(_.languages[id]);
- for (var key in redef)
- lang2[key] = redef[key];
- return lang2;
- },
- /**
- * Inserts tokens _before_ another token in a language definition or any other grammar.
- *
- * ## Usage
- *
- * This helper method makes it easy to modify existing languages. For example, the CSS language definition
- * not only defines CSS highlighting for CSS documents, but also needs to define highlighting for CSS embedded
- * in HTML through `<style>` elements. To do this, it needs to modify `Prism.languages.markup` and add the
- * appropriate tokens. However, `Prism.languages.markup` is a regular JavaScript object literal, so if you do
- * this:
- *
- * ```js
- * Prism.languages.markup.style = {
- * // token
- * };
- * ```
- *
- * then the `style` token will be added (and processed) at the end. `insertBefore` allows you to insert tokens
- * before existing tokens. For the CSS example above, you would use it like this:
- *
- * ```js
- * Prism.languages.insertBefore('markup', 'cdata', {
- * 'style': {
- * // token
- * }
- * });
- * ```
- *
- * ## Special cases
- *
- * If the grammars of `inside` and `insert` have tokens with the same name, the tokens in `inside`'s grammar
- * will be ignored.
- *
- * This behavior can be used to insert tokens after `before`:
- *
- * ```js
- * Prism.languages.insertBefore('markup', 'comment', {
- * 'comment': Prism.languages.markup.comment,
- * // tokens after 'comment'
- * });
- * ```
- *
- * ## Limitations
- *
- * The main problem `insertBefore` has to solve is iteration order. Since ES2015, the iteration order for object
- * properties is guaranteed to be the insertion order (except for integer keys) but some browsers behave
- * differently when keys are deleted and re-inserted. So `insertBefore` can't be implemented by temporarily
- * deleting properties which is necessary to insert at arbitrary positions.
- *
- * To solve this problem, `insertBefore` doesn't actually insert the given tokens into the target object.
- * Instead, it will create a new object and replace all references to the target object with the new one. This
- * can be done without temporarily deleting properties, so the iteration order is well-defined.
- *
- * However, only references that can be reached from `Prism.languages` or `insert` will be replaced. I.e. if
- * you hold the target object in a variable, then the value of the variable will not change.
- *
- * ```js
- * var oldMarkup = Prism.languages.markup;
- * var newMarkup = Prism.languages.insertBefore('markup', 'comment', { ... });
- *
- * assert(oldMarkup !== Prism.languages.markup);
- * assert(newMarkup === Prism.languages.markup);
- * ```
- *
- * @param {string} inside The property of `root` (e.g. a language id in `Prism.languages`) that contains the
- * object to be modified.
- * @param {string} before The key to insert before.
- * @param {Grammar} insert An object containing the key-value pairs to be inserted.
- * @param {Object<string, any>} [root] The object containing `inside`, i.e. the object that contains the
- * object to be modified.
- *
- * Defaults to `Prism.languages`.
- * @returns {Grammar} The new grammar object.
- * @public
- */
- insertBefore: function(inside, before, insert, root2) {
- root2 = root2 || /** @type {any} */
- _.languages;
- var grammar = root2[inside], ret = {};
- for (var token2 in grammar)
- if (grammar.hasOwnProperty(token2)) {
- if (token2 == before)
- for (var newToken in insert)
- insert.hasOwnProperty(newToken) && (ret[newToken] = insert[newToken]);
- insert.hasOwnProperty(token2) || (ret[token2] = grammar[token2]);
- }
- var old = root2[inside];
- return root2[inside] = ret, _.languages.DFS(_.languages, function(key, value) {
- value === old && key != inside && (this[key] = ret);
- }), ret;
- },
- // Traverse a language definition with Depth First Search
- DFS: function DFS(o, callback, type5, visited) {
- visited = visited || {};
- var objId = _.util.objId;
- for (var i in o)
- if (o.hasOwnProperty(i)) {
- callback.call(o, i, o[i], type5 || i);
- var property = o[i], propertyType = _.util.type(property);
- propertyType === "Object" && !visited[objId(property)] ? (visited[objId(property)] = !0, DFS(property, callback, null, visited)) : propertyType === "Array" && !visited[objId(property)] && (visited[objId(property)] = !0, DFS(property, callback, i, visited));
- }
- }
- },
- plugins: {},
- /**
- * This is the most high-level function in Prism’s API.
- * It fetches all the elements that have a `.language-xxxx` class and then calls {@link Prism.highlightElement} on
- * each one of them.
- *
- * This is equivalent to `Prism.highlightAllUnder(document, async, callback)`.
- *
- * @param {boolean} [async=false] Same as in {@link Prism.highlightAllUnder}.
- * @param {HighlightCallback} [callback] Same as in {@link Prism.highlightAllUnder}.
- * @memberof Prism
- * @public
- */
- highlightAll: function(async, callback) {
- _.highlightAllUnder(document, async, callback);
- },
- /**
- * Fetches all the descendants of `container` that have a `.language-xxxx` class and then calls
- * {@link Prism.highlightElement} on each one of them.
- *
- * The following hooks will be run:
- * 1. `before-highlightall`
- * 2. `before-all-elements-highlight`
- * 3. All hooks of {@link Prism.highlightElement} for each element.
- *
- * @param {ParentNode} container The root element, whose descendants that have a `.language-xxxx` class will be highlighted.
- * @param {boolean} [async=false] Whether each element is to be highlighted asynchronously using Web Workers.
- * @param {HighlightCallback} [callback] An optional callback to be invoked on each element after its highlighting is done.
- * @memberof Prism
- * @public
- */
- highlightAllUnder: function(container, async, callback) {
- var env = {
- callback,
- container,
- selector: 'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'
- };
- _.hooks.run("before-highlightall", env), env.elements = Array.prototype.slice.apply(env.container.querySelectorAll(env.selector)), _.hooks.run("before-all-elements-highlight", env);
- for (var i = 0, element; element = env.elements[i++]; )
- _.highlightElement(element, async === !0, env.callback);
- },
- /**
- * Highlights the code inside a single element.
- *
- * The following hooks will be run:
- * 1. `before-sanity-check`
- * 2. `before-highlight`
- * 3. All hooks of {@link Prism.highlight}. These hooks will be run by an asynchronous worker if `async` is `true`.
- * 4. `before-insert`
- * 5. `after-highlight`
- * 6. `complete`
- *
- * Some the above hooks will be skipped if the element doesn't contain any text or there is no grammar loaded for
- * the element's language.
- *
- * @param {Element} element The element containing the code.
- * It must have a class of `language-xxxx` to be processed, where `xxxx` is a valid language identifier.
- * @param {boolean} [async=false] Whether the element is to be highlighted asynchronously using Web Workers
- * to improve performance and avoid blocking the UI when highlighting very large chunks of code. This option is
- * [disabled by default](https://prismjs.com/faq.html#why-is-asynchronous-highlighting-disabled-by-default).
- *
- * Note: All language definitions required to highlight the code must be included in the main `prism.js` file for
- * asynchronous highlighting to work. You can build your own bundle on the
- * [Download page](https://prismjs.com/download.html).
- * @param {HighlightCallback} [callback] An optional callback to be invoked after the highlighting is done.
- * Mostly useful when `async` is `true`, since in that case, the highlighting is done asynchronously.
- * @memberof Prism
- * @public
- */
- highlightElement: function(element, async, callback) {
- var language = _.util.getLanguage(element), grammar = _.languages[language];
- _.util.setLanguage(element, language);
- var parent = element.parentElement;
- parent && parent.nodeName.toLowerCase() === "pre" && _.util.setLanguage(parent, language);
- var code = element.textContent, env = {
- element,
- language,
- grammar,
- code
- };
- function insertHighlightedCode(highlightedCode) {
- env.highlightedCode = highlightedCode, _.hooks.run("before-insert", env), env.element.innerHTML = env.highlightedCode, _.hooks.run("after-highlight", env), _.hooks.run("complete", env), callback && callback.call(env.element);
- }
- if (_.hooks.run("before-sanity-check", env), parent = env.element.parentElement, parent && parent.nodeName.toLowerCase() === "pre" && !parent.hasAttribute("tabindex") && parent.setAttribute("tabindex", "0"), !env.code) {
- _.hooks.run("complete", env), callback && callback.call(env.element);
- return;
- }
- if (_.hooks.run("before-highlight", env), !env.grammar) {
- insertHighlightedCode(_.util.encode(env.code));
- return;
- }
- if (async && _self2.Worker) {
- var worker = new Worker(_.filename);
- worker.onmessage = function(evt) {
- insertHighlightedCode(evt.data);
- }, worker.postMessage(JSON.stringify({
- language: env.language,
- code: env.code,
- immediateClose: !0
- }));
- } else
- insertHighlightedCode(_.highlight(env.code, env.grammar, env.language));
- },
- /**
- * Low-level function, only use if you know what you’re doing. It accepts a string of text as input
- * and the language definitions to use, and returns a string with the HTML produced.
- *
- * The following hooks will be run:
- * 1. `before-tokenize`
- * 2. `after-tokenize`
- * 3. `wrap`: On each {@link Token}.
- *
- * @param {string} text A string with the code to be highlighted.
- * @param {Grammar} grammar An object containing the tokens to use.
- *
- * Usually a language definition like `Prism.languages.markup`.
- * @param {string} language The name of the language definition passed to `grammar`.
- * @returns {string} The highlighted HTML.
- * @memberof Prism
- * @public
- * @example
- * Prism.highlight('var foo = true;', Prism.languages.javascript, 'javascript');
- */
- highlight: function(text, grammar, language) {
- var env = {
- code: text,
- grammar,
- language
- };
- if (_.hooks.run("before-tokenize", env), !env.grammar)
- throw new Error('The language "' + env.language + '" has no grammar.');
- return env.tokens = _.tokenize(env.code, env.grammar), _.hooks.run("after-tokenize", env), Token.stringify(_.util.encode(env.tokens), env.language);
- },
- /**
- * This is the heart of Prism, and the most low-level function you can use. It accepts a string of text as input
- * and the language definitions to use, and returns an array with the tokenized code.
- *
- * When the language definition includes nested tokens, the function is called recursively on each of these tokens.
- *
- * This method could be useful in other contexts as well, as a very crude parser.
- *
- * @param {string} text A string with the code to be highlighted.
- * @param {Grammar} grammar An object containing the tokens to use.
- *
- * Usually a language definition like `Prism.languages.markup`.
- * @returns {TokenStream} An array of strings and tokens, a token stream.
- * @memberof Prism
- * @public
- * @example
- * let code = `var foo = 0;`;
- * let tokens = Prism.tokenize(code, Prism.languages.javascript);
- * tokens.forEach(token => {
- * if (token instanceof Prism.Token && token.type === 'number') {
- * console.log(`Found numeric literal: ${token.content}`);
- * }
- * });
- */
- tokenize: function(text, grammar) {
- var rest = grammar.rest;
- if (rest) {
- for (var token2 in rest)
- grammar[token2] = rest[token2];
- delete grammar.rest;
- }
- var tokenList = new LinkedList();
- return addAfter(tokenList, tokenList.head, text), matchGrammar(text, tokenList, grammar, tokenList.head, 0), toArray2(tokenList);
- },
- /**
- * @namespace
- * @memberof Prism
- * @public
- */
- hooks: {
- all: {},
- /**
- * Adds the given callback to the list of callbacks for the given hook.
- *
- * The callback will be invoked when the hook it is registered for is run.
- * Hooks are usually directly run by a highlight function but you can also run hooks yourself.
- *
- * One callback function can be registered to multiple hooks and the same hook multiple times.
- *
- * @param {string} name The name of the hook.
- * @param {HookCallback} callback The callback function which is given environment variables.
- * @public
- */
- add: function(name, callback) {
- var hooks = _.hooks.all;
- hooks[name] = hooks[name] || [], hooks[name].push(callback);
- },
- /**
- * Runs a hook invoking all registered callbacks with the given environment variables.
- *
- * Callbacks will be invoked synchronously and in the order in which they were registered.
- *
- * @param {string} name The name of the hook.
- * @param {Object<string, any>} env The environment variables of the hook passed to all callbacks registered.
- * @public
- */
- run: function(name, env) {
- var callbacks = _.hooks.all[name];
- if (!(!callbacks || !callbacks.length))
- for (var i = 0, callback; callback = callbacks[i++]; )
- callback(env);
- }
- },
- Token
- };
- _self2.Prism = _;
- function Token(type5, content, alias, matchedStr) {
- this.type = type5, this.content = content, this.alias = alias, this.length = (matchedStr || "").length | 0;
- }
- Token.stringify = function stringify8(o, language) {
- if (typeof o == "string")
- return o;
- if (Array.isArray(o)) {
- var s3 = "";
- return o.forEach(function(e) {
- s3 += stringify8(e, language);
- }), s3;
- }
- var env = {
- type: o.type,
- content: stringify8(o.content, language),
- tag: "span",
- classes: ["token", o.type],
- attributes: {},
- language
- }, aliases2 = o.alias;
- aliases2 && (Array.isArray(aliases2) ? Array.prototype.push.apply(env.classes, aliases2) : env.classes.push(aliases2)), _.hooks.run("wrap", env);
- var attributes = "";
- for (var name in env.attributes)
- attributes += " " + name + '="' + (env.attributes[name] || "").replace(/"/g, """) + '"';
- return "<" + env.tag + ' class="' + env.classes.join(" ") + '"' + attributes + ">" + env.content + "</" + env.tag + ">";
- };
- function matchPattern(pattern, pos, text, lookbehind) {
- pattern.lastIndex = pos;
- var match3 = pattern.exec(text);
- if (match3 && lookbehind && match3[1]) {
- var lookbehindLength = match3[1].length;
- match3.index += lookbehindLength, match3[0] = match3[0].slice(lookbehindLength);
- }
- return match3;
- }
- function matchGrammar(text, tokenList, grammar, startNode, startPos, rematch) {
- for (var token2 in grammar)
- if (!(!grammar.hasOwnProperty(token2) || !grammar[token2])) {
- var patterns = grammar[token2];
- patterns = Array.isArray(patterns) ? patterns : [patterns];
- for (var j = 0; j < patterns.length; ++j) {
- if (rematch && rematch.cause == token2 + "," + j)
- return;
- var patternObj = patterns[j], inside = patternObj.inside, lookbehind = !!patternObj.lookbehind, greedy = !!patternObj.greedy, alias = patternObj.alias;
- if (greedy && !patternObj.pattern.global) {
- var flags = patternObj.pattern.toString().match(/[imsuy]*$/)[0];
- patternObj.pattern = RegExp(patternObj.pattern.source, flags + "g");
- }
- for (var pattern = patternObj.pattern || patternObj, currentNode = startNode.next, pos = startPos; currentNode !== tokenList.tail && !(rematch && pos >= rematch.reach); pos += currentNode.value.length, currentNode = currentNode.next) {
- var str2 = currentNode.value;
- if (tokenList.length > text.length)
- return;
- if (!(str2 instanceof Token)) {
- var removeCount = 1, match3;
- if (greedy) {
- if (match3 = matchPattern(pattern, pos, text, lookbehind), !match3 || match3.index >= text.length)
- break;
- var from2 = match3.index, to = match3.index + match3[0].length, p3 = pos;
- for (p3 += currentNode.value.length; from2 >= p3; )
- currentNode = currentNode.next, p3 += currentNode.value.length;
- if (p3 -= currentNode.value.length, pos = p3, currentNode.value instanceof Token)
- continue;
- for (var k = currentNode; k !== tokenList.tail && (p3 < to || typeof k.value == "string"); k = k.next)
- removeCount++, p3 += k.value.length;
- removeCount--, str2 = text.slice(pos, p3), match3.index -= pos;
- } else if (match3 = matchPattern(pattern, 0, str2, lookbehind), !match3)
- continue;
- var from2 = match3.index, matchStr = match3[0], before = str2.slice(0, from2), after = str2.slice(from2 + matchStr.length), reach = pos + str2.length;
- rematch && reach > rematch.reach && (rematch.reach = reach);
- var removeFrom = currentNode.prev;
- before && (removeFrom = addAfter(tokenList, removeFrom, before), pos += before.length), removeRange(tokenList, removeFrom, removeCount);
- var wrapped = new Token(token2, inside ? _.tokenize(matchStr, inside) : matchStr, alias, matchStr);
- if (currentNode = addAfter(tokenList, removeFrom, wrapped), after && addAfter(tokenList, currentNode, after), removeCount > 1) {
- var nestedRematch = {
- cause: token2 + "," + j,
- reach
- };
- matchGrammar(text, tokenList, grammar, currentNode.prev, pos, nestedRematch), rematch && nestedRematch.reach > rematch.reach && (rematch.reach = nestedRematch.reach);
- }
- }
- }
- }
- }
- }
- function LinkedList() {
- var head2 = { value: null, prev: null, next: null }, tail2 = { value: null, prev: head2, next: null };
- head2.next = tail2, this.head = head2, this.tail = tail2, this.length = 0;
- }
- function addAfter(list, node2, value) {
- var next2 = node2.next, newNode = { value, prev: node2, next: next2 };
- return node2.next = newNode, next2.prev = newNode, list.length++, newNode;
- }
- function removeRange(list, node2, count) {
- for (var next2 = node2.next, i = 0; i < count && next2 !== list.tail; i++)
- next2 = next2.next;
- node2.next = next2, next2.prev = node2, list.length -= i;
- }
- function toArray2(list) {
- for (var array = [], node2 = list.head.next; node2 !== list.tail; )
- array.push(node2.value), node2 = node2.next;
- return array;
- }
- if (!_self2.document)
- return _self2.addEventListener && (_.disableWorkerMessageHandler || _self2.addEventListener("message", function(evt) {
- var message = JSON.parse(evt.data), lang2 = message.language, code = message.code, immediateClose = message.immediateClose;
- _self2.postMessage(_.highlight(code, _.languages[lang2], lang2)), immediateClose && _self2.close();
- }, !1)), _;
- var script = _.util.currentScript();
- script && (_.filename = script.src, script.hasAttribute("data-manual") && (_.manual = !0));
- function highlightAutomaticallyCallback() {
- _.manual || _.highlightAll();
- }
- if (!_.manual) {
- var readyState = document.readyState;
- readyState === "loading" || readyState === "interactive" && script && script.defer ? document.addEventListener("DOMContentLoaded", highlightAutomaticallyCallback) : window.requestAnimationFrame ? window.requestAnimationFrame(highlightAutomaticallyCallback) : window.setTimeout(highlightAutomaticallyCallback, 16);
- }
- return _;
- })(_self);
- typeof module2 < "u" && module2.exports && (module2.exports = Prism);
- typeof global < "u" && (global.Prism = Prism);
- }
- });
-
- // ../../node_modules/refractor/lang/clike.js
- var require_clike = __commonJS({
- "../../node_modules/refractor/lang/clike.js"(exports, module2) {
- "use strict";
- module2.exports = clike;
- clike.displayName = "clike";
- clike.aliases = [];
- function clike(Prism) {
- Prism.languages.clike = {
- comment: [
- {
- pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,
- lookbehind: !0,
- greedy: !0
- },
- {
- pattern: /(^|[^\\:])\/\/.*/,
- lookbehind: !0,
- greedy: !0
- }
- ],
- string: {
- pattern: /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,
- greedy: !0
- },
- "class-name": {
- pattern: /(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,
- lookbehind: !0,
- inside: {
- punctuation: /[.\\]/
- }
- },
- keyword: /\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,
- boolean: /\b(?:false|true)\b/,
- function: /\b\w+(?=\()/,
- number: /\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,
- operator: /[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,
- punctuation: /[{}[\];(),.:]/
- };
- }
- }
- });
-
- // ../../node_modules/refractor/lang/javascript.js
- var require_javascript = __commonJS({
- "../../node_modules/refractor/lang/javascript.js"(exports, module2) {
- "use strict";
- module2.exports = javascript;
- javascript.displayName = "javascript";
- javascript.aliases = ["js"];
- function javascript(Prism) {
- Prism.languages.javascript = Prism.languages.extend("clike", {
- "class-name": [
- Prism.languages.clike["class-name"],
- {
- pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,
- lookbehind: !0
- }
- ],
- keyword: [
- {
- pattern: /((?:^|\})\s*)catch\b/,
- lookbehind: !0
- },
- {
- pattern: /(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,
- lookbehind: !0
- }
- ],
- // Allow for all non-ASCII characters (See http://stackoverflow.com/a/2008444)
- function: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,
- number: {
- pattern: RegExp(
- /(^|[^\w$])/.source + "(?:" + // constant
- (/NaN|Infinity/.source + "|" + // binary integer
- /0[bB][01]+(?:_[01]+)*n?/.source + "|" + // octal integer
- /0[oO][0-7]+(?:_[0-7]+)*n?/.source + "|" + // hexadecimal integer
- /0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source + "|" + // decimal bigint
- /\d+(?:_\d+)*n/.source + "|" + // decimal number (integer or float) but no bigint
- /(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source) + ")" + /(?![\w$])/.source
- ),
- lookbehind: !0
- },
- operator: /--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/
- }), Prism.languages.javascript["class-name"][0].pattern = /(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/, Prism.languages.insertBefore("javascript", "keyword", {
- regex: {
- // eslint-disable-next-line regexp/no-dupe-characters-character-class
- pattern: /((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,
- lookbehind: !0,
- greedy: !0,
- inside: {
- "regex-source": {
- pattern: /^(\/)[\s\S]+(?=\/[a-z]*$)/,
- lookbehind: !0,
- alias: "language-regex",
- inside: Prism.languages.regex
- },
- "regex-delimiter": /^\/|\/$/,
- "regex-flags": /^[a-z]+$/
- }
- },
- // This must be declared before keyword because we use "function" inside the look-forward
- "function-variable": {
- pattern: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,
- alias: "function"
- },
- parameter: [
- {
- pattern: /(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,
- lookbehind: !0,
- inside: Prism.languages.javascript
- },
- {
- pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,
- lookbehind: !0,
- inside: Prism.languages.javascript
- },
- {
- pattern: /(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,
- lookbehind: !0,
- inside: Prism.languages.javascript
- },
- {
- pattern: /((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,
- lookbehind: !0,
- inside: Prism.languages.javascript
- }
- ],
- constant: /\b[A-Z](?:[A-Z_]|\dx?)*\b/
- }), Prism.languages.insertBefore("javascript", "string", {
- hashbang: {
- pattern: /^#!.*/,
- greedy: !0,
- alias: "comment"
- },
- "template-string": {
- pattern: /`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,
- greedy: !0,
- inside: {
- "template-punctuation": {
- pattern: /^`|`$/,
- alias: "string"
- },
- interpolation: {
- pattern: /((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,
- lookbehind: !0,
- inside: {
- "interpolation-punctuation": {
- pattern: /^\$\{|\}$/,
- alias: "punctuation"
- },
- rest: Prism.languages.javascript
- }
- },
- string: /[\s\S]+/
- }
- },
- "string-property": {
- pattern: /((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,
- lookbehind: !0,
- greedy: !0,
- alias: "property"
- }
- }), Prism.languages.insertBefore("javascript", "operator", {
- "literal-property": {
- pattern: /((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,
- lookbehind: !0,
- alias: "property"
- }
- }), Prism.languages.markup && (Prism.languages.markup.tag.addInlined("script", "javascript"), Prism.languages.markup.tag.addAttribute(
- /on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,
- "javascript"
- )), Prism.languages.js = Prism.languages.javascript;
- }
- }
- });
-
- // ../../node_modules/refractor/core.js
- var require_core = __commonJS({
- "../../node_modules/refractor/core.js"(exports, module2) {
- "use strict";
- var ctx = typeof globalThis == "object" ? globalThis : typeof self == "object" ? self : typeof window == "object" ? window : typeof global == "object" ? global : {}, restore = capture();
- ctx.Prism = { manual: !0, disableWorkerMessageHandler: !0 };
- var h3 = require_hastscript(), decode = require_parse_entities(), Prism = require_prism_core(), markup2 = require_markup(), css3 = require_css(), clike = require_clike(), js = require_javascript();
- restore();
- var own = {}.hasOwnProperty;
- function Refractor() {
- }
- Refractor.prototype = Prism;
- var refract = new Refractor();
- module2.exports = refract;
- refract.highlight = highlight;
- refract.register = register;
- refract.alias = alias;
- refract.registered = registered;
- refract.listLanguages = listLanguages;
- register(markup2);
- register(css3);
- register(clike);
- register(js);
- refract.util.encode = encode2;
- refract.Token.stringify = stringify8;
- function register(grammar) {
- if (typeof grammar != "function" || !grammar.displayName)
- throw new Error("Expected `function` for `grammar`, got `" + grammar + "`");
- refract.languages[grammar.displayName] === void 0 && grammar(refract);
- }
- function alias(name, alias2) {
- var languages2 = refract.languages, map2 = name, key, list, length2, index4;
- alias2 && (map2 = {}, map2[name] = alias2);
- for (key in map2)
- for (list = map2[key], list = typeof list == "string" ? [list] : list, length2 = list.length, index4 = -1; ++index4 < length2; )
- languages2[list[index4]] = languages2[key];
- }
- function highlight(value, name) {
- var sup = Prism.highlight, grammar;
- if (typeof value != "string")
- throw new Error("Expected `string` for `value`, got `" + value + "`");
- if (refract.util.type(name) === "Object")
- grammar = name, name = null;
- else {
- if (typeof name != "string")
- throw new Error("Expected `string` for `name`, got `" + name + "`");
- if (own.call(refract.languages, name))
- grammar = refract.languages[name];
- else
- throw new Error("Unknown language: `" + name + "` is not registered");
- }
- return sup.call(this, value, grammar, name);
- }
- function registered(language) {
- if (typeof language != "string")
- throw new Error("Expected `string` for `language`, got `" + language + "`");
- return own.call(refract.languages, language);
- }
- function listLanguages() {
- var languages2 = refract.languages, list = [], language;
- for (language in languages2)
- own.call(languages2, language) && typeof languages2[language] == "object" && list.push(language);
- return list;
- }
- function stringify8(value, language, parent) {
- var env;
- return typeof value == "string" ? { type: "text", value } : refract.util.type(value) === "Array" ? stringifyAll(value, language) : (env = {
- type: value.type,
- content: refract.Token.stringify(value.content, language, parent),
- tag: "span",
- classes: ["token", value.type],
- attributes: {},
- language,
- parent
- }, value.alias && (env.classes = env.classes.concat(value.alias)), refract.hooks.run("wrap", env), h3(
- env.tag + "." + env.classes.join("."),
- attributes(env.attributes),
- env.content
- ));
- }
- function stringifyAll(values, language) {
- for (var result = [], length2 = values.length, index4 = -1, value; ++index4 < length2; )
- value = values[index4], value !== "" && value !== null && value !== void 0 && result.push(value);
- for (index4 = -1, length2 = result.length; ++index4 < length2; )
- value = result[index4], result[index4] = refract.Token.stringify(value, language, result);
- return result;
- }
- function encode2(tokens2) {
- return tokens2;
- }
- function attributes(attrs) {
- var key;
- for (key in attrs)
- attrs[key] = decode(attrs[key]);
- return attrs;
- }
- function capture() {
- var defined = "Prism" in ctx, current = defined ? ctx.Prism : void 0;
- return restore2;
- function restore2() {
- defined ? ctx.Prism = current : delete ctx.Prism, defined = void 0, current = void 0;
- }
- }
- }
- });
-
- // ../../node_modules/react-syntax-highlighter/dist/esm/prism-light.js
- var import_core, SyntaxHighlighter, prism_light_default, init_prism_light = __esm({
- "../../node_modules/react-syntax-highlighter/dist/esm/prism-light.js"() {
- init_highlight();
- import_core = __toESM(require_core()), SyntaxHighlighter = highlight_default(import_core.default, {});
- SyntaxHighlighter.registerLanguage = function(_, language) {
- return import_core.default.register(language);
- };
- SyntaxHighlighter.alias = function(name, aliases2) {
- return import_core.default.alias(name, aliases2);
- };
- prism_light_default = SyntaxHighlighter;
- }
- });
-
- // src/components/components/ActionBar/ActionBar.tsx
- var import_react10, Container, ActionButton, ActionBar, init_ActionBar = __esm({
- "src/components/components/ActionBar/ActionBar.tsx"() {
- "use strict";
- import_react10 = __toESM(require_react(), 1);
- init_theming();
- Container = styled.div(({ theme: theme3, $flexLayout = !1 }) => [
- {
- background: theme3.background.content
- },
- $flexLayout ? {
- display: "inline-flex",
- marginInlineStart: "auto",
- alignSelf: "flex-end"
- } : {
- position: "absolute",
- bottom: 0,
- right: 0,
- maxWidth: "100%",
- display: "flex",
- zIndex: 1
- }
- ]), ActionButton = styled.button(
- ({ theme: theme3 }) => ({
- margin: 0,
- border: "0 none",
- padding: "4px 10px",
- cursor: "pointer",
- display: "flex",
- alignItems: "center",
- color: theme3.color.defaultText,
- background: theme3.background.content,
- fontSize: 12,
- lineHeight: "16px",
- fontFamily: theme3.typography.fonts.base,
- fontWeight: theme3.typography.weight.bold,
- borderTop: `1px solid ${theme3.appBorderColor}`,
- borderLeft: `1px solid ${theme3.appBorderColor}`,
- marginLeft: -1,
- borderRadius: "4px 0 0 0",
- "&:not(:last-child)": { borderRight: `1px solid ${theme3.appBorderColor}` },
- "& + *": {
- borderLeft: `1px solid ${theme3.appBorderColor}`,
- borderRadius: 0
- },
- "&:focus": {
- boxShadow: `${theme3.color.secondary} 0 -3px 0 0 inset`,
- outline: "0 none",
- "@media (forced-colors: active)": {
- outline: "1px solid highlight"
- }
- }
- }),
- ({ disabled }) => disabled && {
- cursor: "not-allowed",
- opacity: 0.5
- }
- );
- ActionButton.displayName = "ActionButton";
- ActionBar = ({ actionItems, flexLayout = !1, ...props }) => import_react10.default.createElement(Container, { ...props, $flexLayout: flexLayout }, actionItems.map(({ title, className, onClick, disabled }, index4) => import_react10.default.createElement(ActionButton, { key: index4, className, onClick, disabled: !!disabled }, title)));
- }
- });
-
- // ../../node_modules/@radix-ui/react-scroll-area/node_modules/@radix-ui/react-compose-refs/dist/index.mjs
- function setRef(ref, value) {
- typeof ref == "function" ? ref(value) : ref != null && (ref.current = value);
- }
- function composeRefs(...refs) {
- return (node2) => refs.forEach((ref) => setRef(ref, node2));
- }
- function useComposedRefs(...refs) {
- return React9.useCallback(composeRefs(...refs), refs);
- }
- var React9, init_dist2 = __esm({
- "../../node_modules/@radix-ui/react-scroll-area/node_modules/@radix-ui/react-compose-refs/dist/index.mjs"() {
- React9 = __toESM(require_react(), 1);
- }
- });
-
- // ../../node_modules/react/cjs/react-jsx-runtime.production.min.js
- var require_react_jsx_runtime_production_min = __commonJS({
- "../../node_modules/react/cjs/react-jsx-runtime.production.min.js"(exports) {
- "use strict";
- var f4 = require_react(), k = Symbol.for("react.element"), l = Symbol.for("react.fragment"), m3 = Object.prototype.hasOwnProperty, n = f4.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, p3 = { key: !0, ref: !0, __self: !0, __source: !0 };
- function q(c, a3, g2) {
- var b, d = {}, e = null, h3 = null;
- g2 !== void 0 && (e = "" + g2), a3.key !== void 0 && (e = "" + a3.key), a3.ref !== void 0 && (h3 = a3.ref);
- for (b in a3) m3.call(a3, b) && !p3.hasOwnProperty(b) && (d[b] = a3[b]);
- if (c && c.defaultProps) for (b in a3 = c.defaultProps, a3) d[b] === void 0 && (d[b] = a3[b]);
- return { $$typeof: k, type: c, key: e, ref: h3, props: d, _owner: n.current };
- }
- exports.Fragment = l;
- exports.jsx = q;
- exports.jsxs = q;
- }
- });
-
- // ../../node_modules/react/jsx-runtime.js
- var require_jsx_runtime = __commonJS({
- "../../node_modules/react/jsx-runtime.js"(exports, module2) {
- "use strict";
- module2.exports = require_react_jsx_runtime_production_min();
- }
- });
-
- // ../../node_modules/@radix-ui/react-scroll-area/node_modules/@radix-ui/react-slot/dist/index.mjs
- function isSlottable(child) {
- return React10.isValidElement(child) && child.type === Slottable;
- }
- function mergeProps(slotProps, childProps) {
- let overrideProps = { ...childProps };
- for (let propName in childProps) {
- let slotPropValue = slotProps[propName], childPropValue = childProps[propName];
- /^on[A-Z]/.test(propName) ? slotPropValue && childPropValue ? overrideProps[propName] = (...args) => {
- childPropValue(...args), slotPropValue(...args);
- } : slotPropValue && (overrideProps[propName] = slotPropValue) : propName === "style" ? overrideProps[propName] = { ...slotPropValue, ...childPropValue } : propName === "className" && (overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" "));
- }
- return { ...slotProps, ...overrideProps };
- }
- function getElementRef(element) {
- let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get, mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
- return mayWarn ? element.ref : (getter = Object.getOwnPropertyDescriptor(element, "ref")?.get, mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning, mayWarn ? element.props.ref : element.props.ref || element.ref);
- }
- var React10, import_jsx_runtime, Slot, SlotClone, Slottable, init_dist3 = __esm({
- "../../node_modules/@radix-ui/react-scroll-area/node_modules/@radix-ui/react-slot/dist/index.mjs"() {
- React10 = __toESM(require_react(), 1);
- init_dist2();
- import_jsx_runtime = __toESM(require_jsx_runtime(), 1), Slot = React10.forwardRef((props, forwardedRef) => {
- let { children, ...slotProps } = props, childrenArray = React10.Children.toArray(children), slottable = childrenArray.find(isSlottable);
- if (slottable) {
- let newElement = slottable.props.children, newChildren = childrenArray.map((child) => child === slottable ? React10.Children.count(newElement) > 1 ? React10.Children.only(null) : React10.isValidElement(newElement) ? newElement.props.children : null : child);
- return (0, import_jsx_runtime.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children: React10.isValidElement(newElement) ? React10.cloneElement(newElement, void 0, newChildren) : null });
- }
- return (0, import_jsx_runtime.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children });
- });
- Slot.displayName = "Slot";
- SlotClone = React10.forwardRef((props, forwardedRef) => {
- let { children, ...slotProps } = props;
- if (React10.isValidElement(children)) {
- let childrenRef = getElementRef(children);
- return React10.cloneElement(children, {
- ...mergeProps(slotProps, children.props),
- // @ts-ignore
- ref: forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef
- });
- }
- return React10.Children.count(children) > 1 ? React10.Children.only(null) : null;
- });
- SlotClone.displayName = "SlotClone";
- Slottable = ({ children }) => (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children });
- }
- });
-
- // ../../node_modules/@radix-ui/react-scroll-area/node_modules/@radix-ui/react-primitive/dist/index.mjs
- var React11, ReactDOM, import_jsx_runtime2, NODES, Primitive, init_dist4 = __esm({
- "../../node_modules/@radix-ui/react-scroll-area/node_modules/@radix-ui/react-primitive/dist/index.mjs"() {
- React11 = __toESM(require_react(), 1), ReactDOM = __toESM(require_react_dom(), 1);
- init_dist3();
- import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1), NODES = [
- "a",
- "button",
- "div",
- "form",
- "h2",
- "h3",
- "img",
- "input",
- "label",
- "li",
- "nav",
- "ol",
- "p",
- "span",
- "svg",
- "ul"
- ], Primitive = NODES.reduce((primitive, node2) => {
- let Node2 = React11.forwardRef((props, forwardedRef) => {
- let { asChild, ...primitiveProps } = props, Comp2 = asChild ? Slot : node2;
- return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), (0, import_jsx_runtime2.jsx)(Comp2, { ...primitiveProps, ref: forwardedRef });
- });
- return Node2.displayName = `Primitive.${node2}`, { ...primitive, [node2]: Node2 };
- }, {});
- }
- });
-
- // ../../node_modules/@radix-ui/react-scroll-area/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs
- var React12, useLayoutEffect22, init_dist5 = __esm({
- "../../node_modules/@radix-ui/react-scroll-area/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs"() {
- React12 = __toESM(require_react(), 1), useLayoutEffect22 = globalThis?.document ? React12.useLayoutEffect : () => {
- };
- }
- });
-
- // ../../node_modules/@radix-ui/react-scroll-area/node_modules/@radix-ui/react-presence/dist/index.mjs
- function useStateMachine(initialState2, machine) {
- return React13.useReducer((state3, event) => machine[state3][event] ?? state3, initialState2);
- }
- function usePresence(present) {
- let [node2, setNode] = React22.useState(), stylesRef = React22.useRef({}), prevPresentRef = React22.useRef(present), prevAnimationNameRef = React22.useRef("none"), initialState2 = present ? "mounted" : "unmounted", [state3, send] = useStateMachine(initialState2, {
- mounted: {
- UNMOUNT: "unmounted",
- ANIMATION_OUT: "unmountSuspended"
- },
- unmountSuspended: {
- MOUNT: "mounted",
- ANIMATION_END: "unmounted"
- },
- unmounted: {
- MOUNT: "mounted"
- }
- });
- return React22.useEffect(() => {
- let currentAnimationName = getAnimationName(stylesRef.current);
- prevAnimationNameRef.current = state3 === "mounted" ? currentAnimationName : "none";
- }, [state3]), useLayoutEffect22(() => {
- let styles4 = stylesRef.current, wasPresent = prevPresentRef.current;
- if (wasPresent !== present) {
- let prevAnimationName = prevAnimationNameRef.current, currentAnimationName = getAnimationName(styles4);
- present ? send("MOUNT") : currentAnimationName === "none" || styles4?.display === "none" ? send("UNMOUNT") : send(wasPresent && prevAnimationName !== currentAnimationName ? "ANIMATION_OUT" : "UNMOUNT"), prevPresentRef.current = present;
- }
- }, [present, send]), useLayoutEffect22(() => {
- if (node2) {
- let handleAnimationEnd = (event) => {
- let isCurrentAnimation = getAnimationName(stylesRef.current).includes(event.animationName);
- event.target === node2 && isCurrentAnimation && ReactDOM2.flushSync(() => send("ANIMATION_END"));
- }, handleAnimationStart = (event) => {
- event.target === node2 && (prevAnimationNameRef.current = getAnimationName(stylesRef.current));
- };
- return node2.addEventListener("animationstart", handleAnimationStart), node2.addEventListener("animationcancel", handleAnimationEnd), node2.addEventListener("animationend", handleAnimationEnd), () => {
- node2.removeEventListener("animationstart", handleAnimationStart), node2.removeEventListener("animationcancel", handleAnimationEnd), node2.removeEventListener("animationend", handleAnimationEnd);
- };
- } else
- send("ANIMATION_END");
- }, [node2, send]), {
- isPresent: ["mounted", "unmountSuspended"].includes(state3),
- ref: React22.useCallback((node22) => {
- node22 && (stylesRef.current = getComputedStyle(node22)), setNode(node22);
- }, [])
- };
- }
- function getAnimationName(styles4) {
- return styles4?.animationName || "none";
- }
- function getElementRef2(element) {
- let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get, mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
- return mayWarn ? element.ref : (getter = Object.getOwnPropertyDescriptor(element, "ref")?.get, mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning, mayWarn ? element.props.ref : element.props.ref || element.ref);
- }
- var React22, ReactDOM2, React13, Presence, init_dist6 = __esm({
- "../../node_modules/@radix-ui/react-scroll-area/node_modules/@radix-ui/react-presence/dist/index.mjs"() {
- "use client";
- React22 = __toESM(require_react(), 1), ReactDOM2 = __toESM(require_react_dom(), 1);
- init_dist2();
- init_dist5();
- React13 = __toESM(require_react(), 1);
- Presence = (props) => {
- let { present, children } = props, presence = usePresence(present), child = typeof children == "function" ? children({ present: presence.isPresent }) : React22.Children.only(children), ref = useComposedRefs(presence.ref, getElementRef2(child));
- return typeof children == "function" || presence.isPresent ? React22.cloneElement(child, { ref }) : null;
- };
- Presence.displayName = "Presence";
- }
- });
-
- // ../../node_modules/@radix-ui/react-scroll-area/node_modules/@radix-ui/react-context/dist/index.mjs
- function createContextScope(scopeName, createContextScopeDeps = []) {
- let defaultContexts = [];
- function createContext32(rootComponentName, defaultContext) {
- let BaseContext = React14.createContext(defaultContext), index4 = defaultContexts.length;
- defaultContexts = [...defaultContexts, defaultContext];
- function Provider(props) {
- let { scope: scope2, children, ...context } = props, Context = scope2?.[scopeName][index4] || BaseContext, value = React14.useMemo(() => context, Object.values(context));
- return (0, import_jsx_runtime3.jsx)(Context.Provider, { value, children });
- }
- function useContext22(consumerName, scope2) {
- let Context = scope2?.[scopeName][index4] || BaseContext, context = React14.useContext(Context);
- if (context) return context;
- if (defaultContext !== void 0) return defaultContext;
- throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
- }
- return Provider.displayName = rootComponentName + "Provider", [Provider, useContext22];
- }
- let createScope = () => {
- let scopeContexts = defaultContexts.map((defaultContext) => React14.createContext(defaultContext));
- return function(scope2) {
- let contexts = scope2?.[scopeName] || scopeContexts;
- return React14.useMemo(
- () => ({ [`__scope${scopeName}`]: { ...scope2, [scopeName]: contexts } }),
- [scope2, contexts]
- );
- };
- };
- return createScope.scopeName = scopeName, [createContext32, composeContextScopes(createScope, ...createContextScopeDeps)];
- }
- function composeContextScopes(...scopes) {
- let baseScope = scopes[0];
- if (scopes.length === 1) return baseScope;
- let createScope = () => {
- let scopeHooks = scopes.map((createScope2) => ({
- useScope: createScope2(),
- scopeName: createScope2.scopeName
- }));
- return function(overrideScopes) {
- let nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {
- let currentScope = useScope(overrideScopes)[`__scope${scopeName}`];
- return { ...nextScopes2, ...currentScope };
- }, {});
- return React14.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
- };
- };
- return createScope.scopeName = baseScope.scopeName, createScope;
- }
- var React14, import_jsx_runtime3, init_dist7 = __esm({
- "../../node_modules/@radix-ui/react-scroll-area/node_modules/@radix-ui/react-context/dist/index.mjs"() {
- React14 = __toESM(require_react(), 1), import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
- }
- });
-
- // ../../node_modules/@radix-ui/react-scroll-area/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs
- function useCallbackRef(callback) {
- let callbackRef = React15.useRef(callback);
- return React15.useEffect(() => {
- callbackRef.current = callback;
- }), React15.useMemo(() => (...args) => callbackRef.current?.(...args), []);
- }
- var React15, init_dist8 = __esm({
- "../../node_modules/@radix-ui/react-scroll-area/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs"() {
- React15 = __toESM(require_react(), 1);
- }
- });
-
- // ../../node_modules/@radix-ui/react-scroll-area/node_modules/@radix-ui/react-direction/dist/index.mjs
- function useDirection(localDir) {
- let globalDir = React16.useContext(DirectionContext);
- return localDir || globalDir || "ltr";
- }
- var React16, import_jsx_runtime4, DirectionContext, init_dist9 = __esm({
- "../../node_modules/@radix-ui/react-scroll-area/node_modules/@radix-ui/react-direction/dist/index.mjs"() {
- React16 = __toESM(require_react(), 1), import_jsx_runtime4 = __toESM(require_jsx_runtime(), 1), DirectionContext = React16.createContext(void 0);
- }
- });
-
- // ../../node_modules/@radix-ui/number/dist/index.mjs
- function clamp(value, [min2, max2]) {
- return Math.min(max2, Math.max(min2, value));
- }
- var init_dist10 = __esm({
- "../../node_modules/@radix-ui/number/dist/index.mjs"() {
- }
- });
-
- // ../../node_modules/@radix-ui/react-scroll-area/node_modules/@radix-ui/primitive/dist/index.mjs
- function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = !0 } = {}) {
- return function(event) {
- if (originalEventHandler?.(event), checkForDefaultPrevented === !1 || !event.defaultPrevented)
- return ourEventHandler?.(event);
- };
- }
- var init_dist11 = __esm({
- "../../node_modules/@radix-ui/react-scroll-area/node_modules/@radix-ui/primitive/dist/index.mjs"() {
- }
- });
-
- // ../../node_modules/@radix-ui/react-scroll-area/dist/index.mjs
- function useStateMachine2(initialState2, machine) {
- return React17.useReducer((state3, event) => machine[state3][event] ?? state3, initialState2);
- }
- function toInt(value) {
- return value ? parseInt(value, 10) : 0;
- }
- function getThumbRatio(viewportSize, contentSize) {
- let ratio = viewportSize / contentSize;
- return isNaN(ratio) ? 0 : ratio;
- }
- function getThumbSize(sizes2) {
- let ratio = getThumbRatio(sizes2.viewport, sizes2.content), scrollbarPadding = sizes2.scrollbar.paddingStart + sizes2.scrollbar.paddingEnd, thumbSize = (sizes2.scrollbar.size - scrollbarPadding) * ratio;
- return Math.max(thumbSize, 18);
- }
- function getScrollPositionFromPointer(pointerPos, pointerOffset, sizes2, dir = "ltr") {
- let thumbSizePx = getThumbSize(sizes2), thumbCenter = thumbSizePx / 2, offset3 = pointerOffset || thumbCenter, thumbOffsetFromEnd = thumbSizePx - offset3, minPointerPos = sizes2.scrollbar.paddingStart + offset3, maxPointerPos = sizes2.scrollbar.size - sizes2.scrollbar.paddingEnd - thumbOffsetFromEnd, maxScrollPos = sizes2.content - sizes2.viewport, scrollRange = dir === "ltr" ? [0, maxScrollPos] : [maxScrollPos * -1, 0];
- return linearScale([minPointerPos, maxPointerPos], scrollRange)(pointerPos);
- }
- function getThumbOffsetFromScroll(scrollPos, sizes2, dir = "ltr") {
- let thumbSizePx = getThumbSize(sizes2), scrollbarPadding = sizes2.scrollbar.paddingStart + sizes2.scrollbar.paddingEnd, scrollbar = sizes2.scrollbar.size - scrollbarPadding, maxScrollPos = sizes2.content - sizes2.viewport, maxThumbPos = scrollbar - thumbSizePx, scrollClampRange = dir === "ltr" ? [0, maxScrollPos] : [maxScrollPos * -1, 0], scrollWithoutMomentum = clamp(scrollPos, scrollClampRange);
- return linearScale([0, maxScrollPos], [0, maxThumbPos])(scrollWithoutMomentum);
- }
- function linearScale(input2, output) {
- return (value) => {
- if (input2[0] === input2[1] || output[0] === output[1]) return output[0];
- let ratio = (output[1] - output[0]) / (input2[1] - input2[0]);
- return output[0] + ratio * (value - input2[0]);
- };
- }
- function isScrollingWithinScrollbarBounds(scrollPos, maxScrollPos) {
- return scrollPos > 0 && scrollPos < maxScrollPos;
- }
- function useDebounceCallback(callback, delay) {
- let handleCallback = useCallbackRef(callback), debounceTimerRef = React23.useRef(0);
- return React23.useEffect(() => () => window.clearTimeout(debounceTimerRef.current), []), React23.useCallback(() => {
- window.clearTimeout(debounceTimerRef.current), debounceTimerRef.current = window.setTimeout(handleCallback, delay);
- }, [handleCallback, delay]);
- }
- function useResizeObserver(element, onResize) {
- let handleResize = useCallbackRef(onResize);
- useLayoutEffect22(() => {
- let rAF = 0;
- if (element) {
- let resizeObserver = new ResizeObserver(() => {
- cancelAnimationFrame(rAF), rAF = window.requestAnimationFrame(handleResize);
- });
- return resizeObserver.observe(element), () => {
- window.cancelAnimationFrame(rAF), resizeObserver.unobserve(element);
- };
- }
- }, [element, handleResize]);
- }
- function getSubtree(options, content) {
- let { asChild, children } = options;
- if (!asChild) return typeof content == "function" ? content(children) : content;
- let firstChild = React23.Children.only(children);
- return React23.cloneElement(firstChild, {
- children: typeof content == "function" ? content(firstChild.props.children) : content
- });
- }
- var React23, React17, import_jsx_runtime5, SCROLL_AREA_NAME, createScrollAreaContext, createScrollAreaScope, ScrollAreaProvider, useScrollAreaContext, ScrollArea, VIEWPORT_NAME, ScrollAreaViewport, SCROLLBAR_NAME, ScrollAreaScrollbar, ScrollAreaScrollbarHover, ScrollAreaScrollbarScroll, ScrollAreaScrollbarAuto, ScrollAreaScrollbarVisible, ScrollAreaScrollbarX, ScrollAreaScrollbarY, ScrollbarProvider, useScrollbarContext, ScrollAreaScrollbarImpl, THUMB_NAME, ScrollAreaThumb, ScrollAreaThumbImpl, CORNER_NAME, ScrollAreaCorner, ScrollAreaCornerImpl, addUnlinkedScrollListener, Root, Viewport, Scrollbar, Thumb, Corner, init_dist12 = __esm({
- "../../node_modules/@radix-ui/react-scroll-area/dist/index.mjs"() {
- "use client";
- React23 = __toESM(require_react(), 1);
- init_dist4();
- init_dist6();
- init_dist7();
- init_dist2();
- init_dist8();
- init_dist9();
- init_dist5();
- init_dist10();
- init_dist11();
- React17 = __toESM(require_react(), 1), import_jsx_runtime5 = __toESM(require_jsx_runtime(), 1);
- SCROLL_AREA_NAME = "ScrollArea", [createScrollAreaContext, createScrollAreaScope] = createContextScope(SCROLL_AREA_NAME), [ScrollAreaProvider, useScrollAreaContext] = createScrollAreaContext(SCROLL_AREA_NAME), ScrollArea = React23.forwardRef(
- (props, forwardedRef) => {
- let {
- __scopeScrollArea,
- type: type5 = "hover",
- dir,
- scrollHideDelay = 600,
- ...scrollAreaProps
- } = props, [scrollArea, setScrollArea] = React23.useState(null), [viewport2, setViewport] = React23.useState(null), [content, setContent] = React23.useState(null), [scrollbarX, setScrollbarX] = React23.useState(null), [scrollbarY, setScrollbarY] = React23.useState(null), [cornerWidth, setCornerWidth] = React23.useState(0), [cornerHeight, setCornerHeight] = React23.useState(0), [scrollbarXEnabled, setScrollbarXEnabled] = React23.useState(!1), [scrollbarYEnabled, setScrollbarYEnabled] = React23.useState(!1), composedRefs = useComposedRefs(forwardedRef, (node2) => setScrollArea(node2)), direction = useDirection(dir);
- return (0, import_jsx_runtime5.jsx)(
- ScrollAreaProvider,
- {
- scope: __scopeScrollArea,
- type: type5,
- dir: direction,
- scrollHideDelay,
- scrollArea,
- viewport: viewport2,
- onViewportChange: setViewport,
- content,
- onContentChange: setContent,
- scrollbarX,
- onScrollbarXChange: setScrollbarX,
- scrollbarXEnabled,
- onScrollbarXEnabledChange: setScrollbarXEnabled,
- scrollbarY,
- onScrollbarYChange: setScrollbarY,
- scrollbarYEnabled,
- onScrollbarYEnabledChange: setScrollbarYEnabled,
- onCornerWidthChange: setCornerWidth,
- onCornerHeightChange: setCornerHeight,
- children: (0, import_jsx_runtime5.jsx)(
- Primitive.div,
- {
- dir: direction,
- ...scrollAreaProps,
- ref: composedRefs,
- style: {
- position: "relative",
- // Pass corner sizes as CSS vars to reduce re-renders of context consumers
- "--radix-scroll-area-corner-width": cornerWidth + "px",
- "--radix-scroll-area-corner-height": cornerHeight + "px",
- ...props.style
- }
- }
- )
- }
- );
- }
- );
- ScrollArea.displayName = SCROLL_AREA_NAME;
- VIEWPORT_NAME = "ScrollAreaViewport", ScrollAreaViewport = React23.forwardRef(
- (props, forwardedRef) => {
- let { __scopeScrollArea, children, asChild, nonce, ...viewportProps } = props, context = useScrollAreaContext(VIEWPORT_NAME, __scopeScrollArea), ref = React23.useRef(null), composedRefs = useComposedRefs(forwardedRef, ref, context.onViewportChange);
- return (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
- (0, import_jsx_runtime5.jsx)(
- "style",
- {
- dangerouslySetInnerHTML: {
- __html: `
- [data-radix-scroll-area-viewport] {
- scrollbar-width: none;
- -ms-overflow-style: none;
- -webkit-overflow-scrolling: touch;
- }
- [data-radix-scroll-area-viewport]::-webkit-scrollbar {
- display: none;
- }
- :where([data-radix-scroll-area-viewport]) {
- display: flex;
- flex-direction: column;
- align-items: stretch;
- }
- :where([data-radix-scroll-area-content]) {
- flex-grow: 1;
- }
- `
- },
- nonce
- }
- ),
- (0, import_jsx_runtime5.jsx)(
- Primitive.div,
- {
- "data-radix-scroll-area-viewport": "",
- ...viewportProps,
- asChild,
- ref: composedRefs,
- style: {
- /**
- * We don't support `visible` because the intention is to have at least one scrollbar
- * if this component is used and `visible` will behave like `auto` in that case
- * https://developer.mozilla.org/en-US/docs/Web/CSS/overflow#description
- *
- * We don't handle `auto` because the intention is for the native implementation
- * to be hidden if using this component. We just want to ensure the node is scrollable
- * so could have used either `scroll` or `auto` here. We picked `scroll` to prevent
- * the browser from having to work out whether to render native scrollbars or not,
- * we tell it to with the intention of hiding them in CSS.
- */
- overflowX: context.scrollbarXEnabled ? "scroll" : "hidden",
- overflowY: context.scrollbarYEnabled ? "scroll" : "hidden",
- ...props.style
- },
- children: getSubtree({ asChild, children }, (children2) => (0, import_jsx_runtime5.jsx)(
- "div",
- {
- "data-radix-scroll-area-content": "",
- ref: context.onContentChange,
- style: { minWidth: context.scrollbarXEnabled ? "fit-content" : void 0 },
- children: children2
- }
- ))
- }
- )
- ] });
- }
- );
- ScrollAreaViewport.displayName = VIEWPORT_NAME;
- SCROLLBAR_NAME = "ScrollAreaScrollbar", ScrollAreaScrollbar = React23.forwardRef(
- (props, forwardedRef) => {
- let { forceMount, ...scrollbarProps } = props, context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea), { onScrollbarXEnabledChange, onScrollbarYEnabledChange } = context, isHorizontal = props.orientation === "horizontal";
- return React23.useEffect(() => (isHorizontal ? onScrollbarXEnabledChange(!0) : onScrollbarYEnabledChange(!0), () => {
- isHorizontal ? onScrollbarXEnabledChange(!1) : onScrollbarYEnabledChange(!1);
- }), [isHorizontal, onScrollbarXEnabledChange, onScrollbarYEnabledChange]), context.type === "hover" ? (0, import_jsx_runtime5.jsx)(ScrollAreaScrollbarHover, { ...scrollbarProps, ref: forwardedRef, forceMount }) : context.type === "scroll" ? (0, import_jsx_runtime5.jsx)(ScrollAreaScrollbarScroll, { ...scrollbarProps, ref: forwardedRef, forceMount }) : context.type === "auto" ? (0, import_jsx_runtime5.jsx)(ScrollAreaScrollbarAuto, { ...scrollbarProps, ref: forwardedRef, forceMount }) : context.type === "always" ? (0, import_jsx_runtime5.jsx)(ScrollAreaScrollbarVisible, { ...scrollbarProps, ref: forwardedRef }) : null;
- }
- );
- ScrollAreaScrollbar.displayName = SCROLLBAR_NAME;
- ScrollAreaScrollbarHover = React23.forwardRef((props, forwardedRef) => {
- let { forceMount, ...scrollbarProps } = props, context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea), [visible, setVisible] = React23.useState(!1);
- return React23.useEffect(() => {
- let scrollArea = context.scrollArea, hideTimer = 0;
- if (scrollArea) {
- let handlePointerEnter = () => {
- window.clearTimeout(hideTimer), setVisible(!0);
- }, handlePointerLeave = () => {
- hideTimer = window.setTimeout(() => setVisible(!1), context.scrollHideDelay);
- };
- return scrollArea.addEventListener("pointerenter", handlePointerEnter), scrollArea.addEventListener("pointerleave", handlePointerLeave), () => {
- window.clearTimeout(hideTimer), scrollArea.removeEventListener("pointerenter", handlePointerEnter), scrollArea.removeEventListener("pointerleave", handlePointerLeave);
- };
- }
- }, [context.scrollArea, context.scrollHideDelay]), (0, import_jsx_runtime5.jsx)(Presence, { present: forceMount || visible, children: (0, import_jsx_runtime5.jsx)(
- ScrollAreaScrollbarAuto,
- {
- "data-state": visible ? "visible" : "hidden",
- ...scrollbarProps,
- ref: forwardedRef
- }
- ) });
- }), ScrollAreaScrollbarScroll = React23.forwardRef((props, forwardedRef) => {
- let { forceMount, ...scrollbarProps } = props, context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea), isHorizontal = props.orientation === "horizontal", debounceScrollEnd = useDebounceCallback(() => send("SCROLL_END"), 100), [state3, send] = useStateMachine2("hidden", {
- hidden: {
- SCROLL: "scrolling"
- },
- scrolling: {
- SCROLL_END: "idle",
- POINTER_ENTER: "interacting"
- },
- interacting: {
- SCROLL: "interacting",
- POINTER_LEAVE: "idle"
- },
- idle: {
- HIDE: "hidden",
- SCROLL: "scrolling",
- POINTER_ENTER: "interacting"
- }
- });
- return React23.useEffect(() => {
- if (state3 === "idle") {
- let hideTimer = window.setTimeout(() => send("HIDE"), context.scrollHideDelay);
- return () => window.clearTimeout(hideTimer);
- }
- }, [state3, context.scrollHideDelay, send]), React23.useEffect(() => {
- let viewport2 = context.viewport, scrollDirection = isHorizontal ? "scrollLeft" : "scrollTop";
- if (viewport2) {
- let prevScrollPos = viewport2[scrollDirection], handleScroll = () => {
- let scrollPos = viewport2[scrollDirection];
- prevScrollPos !== scrollPos && (send("SCROLL"), debounceScrollEnd()), prevScrollPos = scrollPos;
- };
- return viewport2.addEventListener("scroll", handleScroll), () => viewport2.removeEventListener("scroll", handleScroll);
- }
- }, [context.viewport, isHorizontal, send, debounceScrollEnd]), (0, import_jsx_runtime5.jsx)(Presence, { present: forceMount || state3 !== "hidden", children: (0, import_jsx_runtime5.jsx)(
- ScrollAreaScrollbarVisible,
- {
- "data-state": state3 === "hidden" ? "hidden" : "visible",
- ...scrollbarProps,
- ref: forwardedRef,
- onPointerEnter: composeEventHandlers(props.onPointerEnter, () => send("POINTER_ENTER")),
- onPointerLeave: composeEventHandlers(props.onPointerLeave, () => send("POINTER_LEAVE"))
- }
- ) });
- }), ScrollAreaScrollbarAuto = React23.forwardRef((props, forwardedRef) => {
- let context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea), { forceMount, ...scrollbarProps } = props, [visible, setVisible] = React23.useState(!1), isHorizontal = props.orientation === "horizontal", handleResize = useDebounceCallback(() => {
- if (context.viewport) {
- let isOverflowX = context.viewport.offsetWidth < context.viewport.scrollWidth, isOverflowY = context.viewport.offsetHeight < context.viewport.scrollHeight;
- setVisible(isHorizontal ? isOverflowX : isOverflowY);
- }
- }, 10);
- return useResizeObserver(context.viewport, handleResize), useResizeObserver(context.content, handleResize), (0, import_jsx_runtime5.jsx)(Presence, { present: forceMount || visible, children: (0, import_jsx_runtime5.jsx)(
- ScrollAreaScrollbarVisible,
- {
- "data-state": visible ? "visible" : "hidden",
- ...scrollbarProps,
- ref: forwardedRef
- }
- ) });
- }), ScrollAreaScrollbarVisible = React23.forwardRef((props, forwardedRef) => {
- let { orientation = "vertical", ...scrollbarProps } = props, context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea), thumbRef = React23.useRef(null), pointerOffsetRef = React23.useRef(0), [sizes2, setSizes] = React23.useState({
- content: 0,
- viewport: 0,
- scrollbar: { size: 0, paddingStart: 0, paddingEnd: 0 }
- }), thumbRatio = getThumbRatio(sizes2.viewport, sizes2.content), commonProps = {
- ...scrollbarProps,
- sizes: sizes2,
- onSizesChange: setSizes,
- hasThumb: thumbRatio > 0 && thumbRatio < 1,
- onThumbChange: (thumb) => thumbRef.current = thumb,
- onThumbPointerUp: () => pointerOffsetRef.current = 0,
- onThumbPointerDown: (pointerPos) => pointerOffsetRef.current = pointerPos
- };
- function getScrollPosition(pointerPos, dir) {
- return getScrollPositionFromPointer(pointerPos, pointerOffsetRef.current, sizes2, dir);
- }
- return orientation === "horizontal" ? (0, import_jsx_runtime5.jsx)(
- ScrollAreaScrollbarX,
- {
- ...commonProps,
- ref: forwardedRef,
- onThumbPositionChange: () => {
- if (context.viewport && thumbRef.current) {
- let scrollPos = context.viewport.scrollLeft, offset3 = getThumbOffsetFromScroll(scrollPos, sizes2, context.dir);
- thumbRef.current.style.transform = `translate3d(${offset3}px, 0, 0)`;
- }
- },
- onWheelScroll: (scrollPos) => {
- context.viewport && (context.viewport.scrollLeft = scrollPos);
- },
- onDragScroll: (pointerPos) => {
- context.viewport && (context.viewport.scrollLeft = getScrollPosition(pointerPos, context.dir));
- }
- }
- ) : orientation === "vertical" ? (0, import_jsx_runtime5.jsx)(
- ScrollAreaScrollbarY,
- {
- ...commonProps,
- ref: forwardedRef,
- onThumbPositionChange: () => {
- if (context.viewport && thumbRef.current) {
- let scrollPos = context.viewport.scrollTop, offset3 = getThumbOffsetFromScroll(scrollPos, sizes2);
- thumbRef.current.style.transform = `translate3d(0, ${offset3}px, 0)`;
- }
- },
- onWheelScroll: (scrollPos) => {
- context.viewport && (context.viewport.scrollTop = scrollPos);
- },
- onDragScroll: (pointerPos) => {
- context.viewport && (context.viewport.scrollTop = getScrollPosition(pointerPos));
- }
- }
- ) : null;
- }), ScrollAreaScrollbarX = React23.forwardRef((props, forwardedRef) => {
- let { sizes: sizes2, onSizesChange, ...scrollbarProps } = props, context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea), [computedStyle, setComputedStyle] = React23.useState(), ref = React23.useRef(null), composeRefs3 = useComposedRefs(forwardedRef, ref, context.onScrollbarXChange);
- return React23.useEffect(() => {
- ref.current && setComputedStyle(getComputedStyle(ref.current));
- }, [ref]), (0, import_jsx_runtime5.jsx)(
- ScrollAreaScrollbarImpl,
- {
- "data-orientation": "horizontal",
- ...scrollbarProps,
- ref: composeRefs3,
- sizes: sizes2,
- style: {
- bottom: 0,
- left: context.dir === "rtl" ? "var(--radix-scroll-area-corner-width)" : 0,
- right: context.dir === "ltr" ? "var(--radix-scroll-area-corner-width)" : 0,
- "--radix-scroll-area-thumb-width": getThumbSize(sizes2) + "px",
- ...props.style
- },
- onThumbPointerDown: (pointerPos) => props.onThumbPointerDown(pointerPos.x),
- onDragScroll: (pointerPos) => props.onDragScroll(pointerPos.x),
- onWheelScroll: (event, maxScrollPos) => {
- if (context.viewport) {
- let scrollPos = context.viewport.scrollLeft + event.deltaX;
- props.onWheelScroll(scrollPos), isScrollingWithinScrollbarBounds(scrollPos, maxScrollPos) && event.preventDefault();
- }
- },
- onResize: () => {
- ref.current && context.viewport && computedStyle && onSizesChange({
- content: context.viewport.scrollWidth,
- viewport: context.viewport.offsetWidth,
- scrollbar: {
- size: ref.current.clientWidth,
- paddingStart: toInt(computedStyle.paddingLeft),
- paddingEnd: toInt(computedStyle.paddingRight)
- }
- });
- }
- }
- );
- }), ScrollAreaScrollbarY = React23.forwardRef((props, forwardedRef) => {
- let { sizes: sizes2, onSizesChange, ...scrollbarProps } = props, context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea), [computedStyle, setComputedStyle] = React23.useState(), ref = React23.useRef(null), composeRefs3 = useComposedRefs(forwardedRef, ref, context.onScrollbarYChange);
- return React23.useEffect(() => {
- ref.current && setComputedStyle(getComputedStyle(ref.current));
- }, [ref]), (0, import_jsx_runtime5.jsx)(
- ScrollAreaScrollbarImpl,
- {
- "data-orientation": "vertical",
- ...scrollbarProps,
- ref: composeRefs3,
- sizes: sizes2,
- style: {
- top: 0,
- right: context.dir === "ltr" ? 0 : void 0,
- left: context.dir === "rtl" ? 0 : void 0,
- bottom: "var(--radix-scroll-area-corner-height)",
- "--radix-scroll-area-thumb-height": getThumbSize(sizes2) + "px",
- ...props.style
- },
- onThumbPointerDown: (pointerPos) => props.onThumbPointerDown(pointerPos.y),
- onDragScroll: (pointerPos) => props.onDragScroll(pointerPos.y),
- onWheelScroll: (event, maxScrollPos) => {
- if (context.viewport) {
- let scrollPos = context.viewport.scrollTop + event.deltaY;
- props.onWheelScroll(scrollPos), isScrollingWithinScrollbarBounds(scrollPos, maxScrollPos) && event.preventDefault();
- }
- },
- onResize: () => {
- ref.current && context.viewport && computedStyle && onSizesChange({
- content: context.viewport.scrollHeight,
- viewport: context.viewport.offsetHeight,
- scrollbar: {
- size: ref.current.clientHeight,
- paddingStart: toInt(computedStyle.paddingTop),
- paddingEnd: toInt(computedStyle.paddingBottom)
- }
- });
- }
- }
- );
- }), [ScrollbarProvider, useScrollbarContext] = createScrollAreaContext(SCROLLBAR_NAME), ScrollAreaScrollbarImpl = React23.forwardRef((props, forwardedRef) => {
- let {
- __scopeScrollArea,
- sizes: sizes2,
- hasThumb,
- onThumbChange,
- onThumbPointerUp,
- onThumbPointerDown,
- onThumbPositionChange,
- onDragScroll,
- onWheelScroll,
- onResize,
- ...scrollbarProps
- } = props, context = useScrollAreaContext(SCROLLBAR_NAME, __scopeScrollArea), [scrollbar, setScrollbar] = React23.useState(null), composeRefs3 = useComposedRefs(forwardedRef, (node2) => setScrollbar(node2)), rectRef = React23.useRef(null), prevWebkitUserSelectRef = React23.useRef(""), viewport2 = context.viewport, maxScrollPos = sizes2.content - sizes2.viewport, handleWheelScroll = useCallbackRef(onWheelScroll), handleThumbPositionChange = useCallbackRef(onThumbPositionChange), handleResize = useDebounceCallback(onResize, 10);
- function handleDragScroll(event) {
- if (rectRef.current) {
- let x = event.clientX - rectRef.current.left, y = event.clientY - rectRef.current.top;
- onDragScroll({ x, y });
- }
- }
- return React23.useEffect(() => {
- let handleWheel = (event) => {
- let element = event.target;
- scrollbar?.contains(element) && handleWheelScroll(event, maxScrollPos);
- };
- return document.addEventListener("wheel", handleWheel, { passive: !1 }), () => document.removeEventListener("wheel", handleWheel, { passive: !1 });
- }, [viewport2, scrollbar, maxScrollPos, handleWheelScroll]), React23.useEffect(handleThumbPositionChange, [sizes2, handleThumbPositionChange]), useResizeObserver(scrollbar, handleResize), useResizeObserver(context.content, handleResize), (0, import_jsx_runtime5.jsx)(
- ScrollbarProvider,
- {
- scope: __scopeScrollArea,
- scrollbar,
- hasThumb,
- onThumbChange: useCallbackRef(onThumbChange),
- onThumbPointerUp: useCallbackRef(onThumbPointerUp),
- onThumbPositionChange: handleThumbPositionChange,
- onThumbPointerDown: useCallbackRef(onThumbPointerDown),
- children: (0, import_jsx_runtime5.jsx)(
- Primitive.div,
- {
- ...scrollbarProps,
- ref: composeRefs3,
- style: { position: "absolute", ...scrollbarProps.style },
- onPointerDown: composeEventHandlers(props.onPointerDown, (event) => {
- event.button === 0 && (event.target.setPointerCapture(event.pointerId), rectRef.current = scrollbar.getBoundingClientRect(), prevWebkitUserSelectRef.current = document.body.style.webkitUserSelect, document.body.style.webkitUserSelect = "none", context.viewport && (context.viewport.style.scrollBehavior = "auto"), handleDragScroll(event));
- }),
- onPointerMove: composeEventHandlers(props.onPointerMove, handleDragScroll),
- onPointerUp: composeEventHandlers(props.onPointerUp, (event) => {
- let element = event.target;
- element.hasPointerCapture(event.pointerId) && element.releasePointerCapture(event.pointerId), document.body.style.webkitUserSelect = prevWebkitUserSelectRef.current, context.viewport && (context.viewport.style.scrollBehavior = ""), rectRef.current = null;
- })
- }
- )
- }
- );
- }), THUMB_NAME = "ScrollAreaThumb", ScrollAreaThumb = React23.forwardRef(
- (props, forwardedRef) => {
- let { forceMount, ...thumbProps } = props, scrollbarContext = useScrollbarContext(THUMB_NAME, props.__scopeScrollArea);
- return (0, import_jsx_runtime5.jsx)(Presence, { present: forceMount || scrollbarContext.hasThumb, children: (0, import_jsx_runtime5.jsx)(ScrollAreaThumbImpl, { ref: forwardedRef, ...thumbProps }) });
- }
- ), ScrollAreaThumbImpl = React23.forwardRef(
- (props, forwardedRef) => {
- let { __scopeScrollArea, style, ...thumbProps } = props, scrollAreaContext = useScrollAreaContext(THUMB_NAME, __scopeScrollArea), scrollbarContext = useScrollbarContext(THUMB_NAME, __scopeScrollArea), { onThumbPositionChange } = scrollbarContext, composedRef = useComposedRefs(
- forwardedRef,
- (node2) => scrollbarContext.onThumbChange(node2)
- ), removeUnlinkedScrollListenerRef = React23.useRef(), debounceScrollEnd = useDebounceCallback(() => {
- removeUnlinkedScrollListenerRef.current && (removeUnlinkedScrollListenerRef.current(), removeUnlinkedScrollListenerRef.current = void 0);
- }, 100);
- return React23.useEffect(() => {
- let viewport2 = scrollAreaContext.viewport;
- if (viewport2) {
- let handleScroll = () => {
- if (debounceScrollEnd(), !removeUnlinkedScrollListenerRef.current) {
- let listener = addUnlinkedScrollListener(viewport2, onThumbPositionChange);
- removeUnlinkedScrollListenerRef.current = listener, onThumbPositionChange();
- }
- };
- return onThumbPositionChange(), viewport2.addEventListener("scroll", handleScroll), () => viewport2.removeEventListener("scroll", handleScroll);
- }
- }, [scrollAreaContext.viewport, debounceScrollEnd, onThumbPositionChange]), (0, import_jsx_runtime5.jsx)(
- Primitive.div,
- {
- "data-state": scrollbarContext.hasThumb ? "visible" : "hidden",
- ...thumbProps,
- ref: composedRef,
- style: {
- width: "var(--radix-scroll-area-thumb-width)",
- height: "var(--radix-scroll-area-thumb-height)",
- ...style
- },
- onPointerDownCapture: composeEventHandlers(props.onPointerDownCapture, (event) => {
- let thumbRect = event.target.getBoundingClientRect(), x = event.clientX - thumbRect.left, y = event.clientY - thumbRect.top;
- scrollbarContext.onThumbPointerDown({ x, y });
- }),
- onPointerUp: composeEventHandlers(props.onPointerUp, scrollbarContext.onThumbPointerUp)
- }
- );
- }
- );
- ScrollAreaThumb.displayName = THUMB_NAME;
- CORNER_NAME = "ScrollAreaCorner", ScrollAreaCorner = React23.forwardRef(
- (props, forwardedRef) => {
- let context = useScrollAreaContext(CORNER_NAME, props.__scopeScrollArea), hasBothScrollbarsVisible = !!(context.scrollbarX && context.scrollbarY);
- return context.type !== "scroll" && hasBothScrollbarsVisible ? (0, import_jsx_runtime5.jsx)(ScrollAreaCornerImpl, { ...props, ref: forwardedRef }) : null;
- }
- );
- ScrollAreaCorner.displayName = CORNER_NAME;
- ScrollAreaCornerImpl = React23.forwardRef((props, forwardedRef) => {
- let { __scopeScrollArea, ...cornerProps } = props, context = useScrollAreaContext(CORNER_NAME, __scopeScrollArea), [width, setWidth] = React23.useState(0), [height, setHeight] = React23.useState(0), hasSize = !!(width && height);
- return useResizeObserver(context.scrollbarX, () => {
- let height2 = context.scrollbarX?.offsetHeight || 0;
- context.onCornerHeightChange(height2), setHeight(height2);
- }), useResizeObserver(context.scrollbarY, () => {
- let width2 = context.scrollbarY?.offsetWidth || 0;
- context.onCornerWidthChange(width2), setWidth(width2);
- }), hasSize ? (0, import_jsx_runtime5.jsx)(
- Primitive.div,
- {
- ...cornerProps,
- ref: forwardedRef,
- style: {
- width,
- height,
- position: "absolute",
- right: context.dir === "ltr" ? 0 : void 0,
- left: context.dir === "rtl" ? 0 : void 0,
- bottom: 0,
- ...props.style
- }
- }
- ) : null;
- });
- addUnlinkedScrollListener = (node2, handler = () => {
- }) => {
- let prevPosition = { left: node2.scrollLeft, top: node2.scrollTop }, rAF = 0;
- return (function loop() {
- let position2 = { left: node2.scrollLeft, top: node2.scrollTop }, isHorizontalScroll = prevPosition.left !== position2.left, isVerticalScroll = prevPosition.top !== position2.top;
- (isHorizontalScroll || isVerticalScroll) && handler(), prevPosition = position2, rAF = window.requestAnimationFrame(loop);
- })(), () => window.cancelAnimationFrame(rAF);
- };
- Root = ScrollArea, Viewport = ScrollAreaViewport, Scrollbar = ScrollAreaScrollbar, Thumb = ScrollAreaThumb, Corner = ScrollAreaCorner;
- }
- });
-
- // src/components/components/ScrollArea/ScrollArea.tsx
- var import_react11, ScrollAreaRoot, ScrollAreaViewport2, ScrollAreaScrollbar2, ScrollAreaThumb2, ScrollArea2, init_ScrollArea = __esm({
- "src/components/components/ScrollArea/ScrollArea.tsx"() {
- "use strict";
- import_react11 = __toESM(require_react(), 1);
- init_dist12();
- init_theming();
- ScrollAreaRoot = styled(Root)(
- ({ scrollbarsize, offset: offset3 }) => ({
- width: "100%",
- height: "100%",
- overflow: "hidden",
- "--scrollbar-size": `${scrollbarsize + offset3}px`,
- "--radix-scroll-area-thumb-width": `${scrollbarsize}px`
- })
- ), ScrollAreaViewport2 = styled(Viewport)(
- ({ focusable, theme: theme3 }) => ({
- width: "100%",
- height: "100%",
- "&:focus": focusable ? {
- outline: `2px solid ${theme3.color.secondary}`,
- outlineOffset: -2
- } : {}
- })
- ), ScrollAreaScrollbar2 = styled(Scrollbar)(({ offset: offset3, horizontal, vertical }) => ({
- display: "flex",
- userSelect: "none",
- // ensures no selection
- touchAction: "none",
- // disable browser handling of all panning and zooming gestures on touch devices
- background: "transparent",
- transition: "all 0.2s ease-out",
- borderRadius: "var(--scrollbar-size)",
- zIndex: 1,
- '&[data-orientation="vertical"]': {
- width: "var(--scrollbar-size)",
- paddingRight: offset3,
- marginTop: offset3,
- marginBottom: horizontal === "true" && vertical === "true" ? 0 : offset3
- },
- '&[data-orientation="horizontal"]': {
- flexDirection: "column",
- height: "var(--scrollbar-size)",
- paddingBottom: offset3,
- marginLeft: offset3,
- marginRight: horizontal === "true" && vertical === "true" ? 0 : offset3
- }
- })), ScrollAreaThumb2 = styled(Thumb)(({ theme: theme3 }) => ({
- flex: 1,
- background: theme3.textMutedColor,
- opacity: 0.5,
- borderRadius: "var(--scrollbar-size)",
- position: "relative",
- transition: "opacity 0.2s ease-out",
- zIndex: 1,
- "&:hover": { opacity: 0.8 },
- /* increase target size for touch devices https://www.w3.org/WAI/WCAG21/Understanding/target-size.html */
- "::before": {
- content: '""',
- position: "absolute",
- top: "50%",
- left: "50%",
- transform: "translate(-50%,-50%)",
- width: "100%",
- height: "100%"
- }
- })), ScrollArea2 = (0, import_react11.forwardRef)(
- ({
- children,
- horizontal = !1,
- vertical = !1,
- offset: offset3 = 2,
- scrollbarSize = 6,
- scrollPadding = 0,
- className,
- focusable = !1
- }, ref) => import_react11.default.createElement(ScrollAreaRoot, { scrollbarsize: scrollbarSize, offset: offset3, className }, import_react11.default.createElement(
- ScrollAreaViewport2,
- {
- ref,
- style: { scrollPadding },
- tabIndex: focusable ? 0 : void 0,
- focusable
- },
- children
- ), horizontal && import_react11.default.createElement(
- ScrollAreaScrollbar2,
- {
- orientation: "horizontal",
- offset: offset3,
- horizontal: horizontal.toString(),
- vertical: vertical.toString()
- },
- import_react11.default.createElement(ScrollAreaThumb2, null)
- ), vertical && import_react11.default.createElement(
- ScrollAreaScrollbar2,
- {
- orientation: "vertical",
- offset: offset3,
- horizontal: horizontal.toString(),
- vertical: vertical.toString()
- },
- import_react11.default.createElement(ScrollAreaThumb2, null)
- ), horizontal && vertical && import_react11.default.createElement(Corner, null))
- );
- ScrollArea2.displayName = "ScrollArea";
- }
- });
-
- // ../../node_modules/@react-aria/live-announcer/dist/LiveAnnouncer.mjs
- function $319e236875307eab$export$a9b970dcc4ae71a9(message, assertiveness = "assertive", timeout = 7e3) {
- $319e236875307eab$var$liveAnnouncer ? $319e236875307eab$var$liveAnnouncer.announce(message, assertiveness, timeout) : ($319e236875307eab$var$liveAnnouncer = new $319e236875307eab$var$LiveAnnouncer(), (typeof IS_REACT_ACT_ENVIRONMENT == "boolean" ? IS_REACT_ACT_ENVIRONMENT : typeof jest < "u") ? $319e236875307eab$var$liveAnnouncer.announce(message, assertiveness, timeout) : setTimeout(() => {
- $319e236875307eab$var$liveAnnouncer?.isAttached() && $319e236875307eab$var$liveAnnouncer?.announce(message, assertiveness, timeout);
- }, 100));
- }
- function $319e236875307eab$export$d10ae4f68404609a(assertiveness) {
- $319e236875307eab$var$liveAnnouncer && $319e236875307eab$var$liveAnnouncer.clear(assertiveness);
- }
- var $319e236875307eab$var$liveAnnouncer, $319e236875307eab$var$LiveAnnouncer, init_LiveAnnouncer = __esm({
- "../../node_modules/@react-aria/live-announcer/dist/LiveAnnouncer.mjs"() {
- $319e236875307eab$var$liveAnnouncer = null;
- $319e236875307eab$var$LiveAnnouncer = class {
- isAttached() {
- var _this_node;
- return (_this_node = this.node) === null || _this_node === void 0 ? void 0 : _this_node.isConnected;
- }
- createLog(ariaLive) {
- let node2 = document.createElement("div");
- return node2.setAttribute("role", "log"), node2.setAttribute("aria-live", ariaLive), node2.setAttribute("aria-relevant", "additions"), node2;
- }
- destroy() {
- this.node && (document.body.removeChild(this.node), this.node = null);
- }
- announce(message, assertiveness = "assertive", timeout = 7e3) {
- var _this_assertiveLog, _this_politeLog;
- if (!this.node) return;
- let node2 = document.createElement("div");
- typeof message == "object" ? (node2.setAttribute("role", "img"), node2.setAttribute("aria-labelledby", message["aria-labelledby"])) : node2.textContent = message, assertiveness === "assertive" ? (_this_assertiveLog = this.assertiveLog) === null || _this_assertiveLog === void 0 || _this_assertiveLog.appendChild(node2) : (_this_politeLog = this.politeLog) === null || _this_politeLog === void 0 || _this_politeLog.appendChild(node2), message !== "" && setTimeout(() => {
- node2.remove();
- }, timeout);
- }
- clear(assertiveness) {
- this.node && ((!assertiveness || assertiveness === "assertive") && this.assertiveLog && (this.assertiveLog.innerHTML = ""), (!assertiveness || assertiveness === "polite") && this.politeLog && (this.politeLog.innerHTML = ""));
- }
- constructor() {
- this.node = null, this.assertiveLog = null, this.politeLog = null, typeof document < "u" && (this.node = document.createElement("div"), this.node.dataset.liveAnnouncer = "true", Object.assign(this.node.style, {
- border: 0,
- clip: "rect(0 0 0 0)",
- clipPath: "inset(50%)",
- height: "1px",
- margin: "-1px",
- overflow: "hidden",
- padding: 0,
- position: "absolute",
- width: "1px",
- whiteSpace: "nowrap"
- }), this.assertiveLog = this.createLog("assertive"), this.node.appendChild(this.assertiveLog), this.politeLog = this.createLog("polite"), this.node.appendChild(this.politeLog), document.body.prepend(this.node));
- }
- };
- }
- });
-
- // ../../node_modules/@react-aria/live-announcer/dist/import.mjs
- var init_import = __esm({
- "../../node_modules/@react-aria/live-announcer/dist/import.mjs"() {
- init_LiveAnnouncer();
- }
- });
-
- // src/shared/useCopyButton.ts
- function useCopyButton({
- children = "Copy",
- childrenOnCopy = "Copied!",
- content,
- onCopy,
- ariaLabel = !1,
- ariaLabelOnCopy = !1,
- duration = 3e3
- }) {
- let [copied, setCopied] = (0, import_react12.useState)(!1), timerRef = (0, import_react12.useRef)(null);
- (0, import_react12.useEffect)(
- () => () => {
- timerRef.current && clearTimeout(timerRef.current);
- },
- []
- );
- let handleClick = (0, import_react12.useCallback)(
- (e) => {
- timerRef.current && clearTimeout(timerRef.current);
- let announcement = typeof ariaLabelOnCopy == "string" ? ariaLabelOnCopy : "Copied to clipboard";
- navigator.clipboard?.writeText(content).then(() => {
- onCopy?.(e), setCopied(!0), $319e236875307eab$export$a9b970dcc4ae71a9(announcement, "polite"), timerRef.current = setTimeout(() => {
- setCopied(!1), $319e236875307eab$export$d10ae4f68404609a("polite"), timerRef.current = null;
- }, duration);
- });
- },
- [content, onCopy, ariaLabelOnCopy, duration]
- );
- return {
- // @ts-expect-error - TypeScript is not realising T is constrained identically in both interfaces.
- children: copied ? childrenOnCopy : children,
- buttonProps: (0, import_react12.useMemo)(
- () => ({
- onClick: handleClick,
- ariaLabel: copied ? ariaLabelOnCopy : ariaLabel
- }),
- [handleClick, copied, ariaLabelOnCopy, ariaLabel]
- )
- };
- }
- var import_react12, init_useCopyButton = __esm({
- "src/shared/useCopyButton.ts"() {
- "use strict";
- import_react12 = __toESM(require_react(), 1);
- init_import();
- }
- });
-
- // src/components/components/syntaxhighlighter/syntaxhighlighter.tsx
- var syntaxhighlighter_exports = {};
- __export(syntaxhighlighter_exports, {
- SyntaxHighlighter: () => SyntaxHighlighter2,
- default: () => syntaxhighlighter_default,
- supportedLanguages: () => supportedLanguages
- });
- var import_react13, import_memoizerific2, supportedLanguages, themedSyntax, Wrapper, UnstyledScroller, Scroller, Pre, Code, processLineNumber, defaultRenderer2, wrapRenderer, SyntaxHighlighter2, syntaxhighlighter_default, init_syntaxhighlighter = __esm({
- "src/components/components/syntaxhighlighter/syntaxhighlighter.tsx"() {
- "use strict";
- import_react13 = __toESM(require_react(), 1), import_memoizerific2 = __toESM(require_memoizerific(), 1);
- init_create_element();
- init_bash();
- init_css();
- init_graphql();
- init_js_extras();
- init_json();
- init_jsx();
- init_markdown();
- init_markup();
- init_tsx();
- init_typescript();
- init_yaml();
- init_prism_light();
- init_theming();
- init_ActionBar();
- init_ScrollArea();
- init_useCopyButton();
- supportedLanguages = {
- jsextra: js_extras_default,
- jsx: jsx_default,
- json: json_default,
- yml: yaml_default,
- md: markdown_default,
- bash: bash_default,
- css: css_default,
- html: markup_default,
- tsx: tsx_default,
- typescript: typescript_default,
- graphql: graphql_default
- };
- Object.entries(supportedLanguages).forEach(([key, val]) => {
- prism_light_default.registerLanguage(key, val);
- });
- themedSyntax = (0, import_memoizerific2.default)(2)(
- (theme3) => Object.entries(theme3.code || {}).reduce((acc, [key, val]) => ({ ...acc, [`* .${key}`]: val }), {})
- ), Wrapper = styled.div(
- ({ theme: theme3 }) => ({
- position: "relative",
- display: "flex",
- flexWrap: "wrap",
- overflow: "hidden",
- color: theme3.color.defaultText
- }),
- ({ theme: theme3, bordered }) => bordered ? {
- border: `1px solid ${theme3.appBorderColor}`,
- borderRadius: theme3.borderRadius,
- background: theme3.background.content
- } : {},
- ({ showLineNumbers }) => showLineNumbers ? {
- // use the before pseudo element to display line numbers
- ".react-syntax-highlighter-line-number::before": {
- content: "attr(data-line-number)"
- }
- } : {}
- ), UnstyledScroller = ({ children, className }) => import_react13.default.createElement(ScrollArea2, { horizontal: !0, vertical: !0, focusable: !0, className }, children), Scroller = styled(UnstyledScroller)(
- {
- flex: 1,
- flexShrink: 0,
- flexBasis: "fit-content",
- maxWidth: "100%"
- },
- ({ theme: theme3 }) => themedSyntax(theme3)
- ), Pre = styled.pre(({ theme: theme3, padded }) => ({
- display: "flex",
- justifyContent: "flex-start",
- margin: 0,
- padding: padded ? theme3.layoutMargin : 0
- })), Code = styled.div(({ theme: theme3 }) => ({
- flex: 1,
- paddingLeft: 2,
- // TODO: To match theming/global.ts for now
- paddingRight: theme3.layoutMargin,
- opacity: 1,
- fontFamily: theme3.typography.fonts.mono
- })), processLineNumber = (row) => {
- let children = [...row.children], lineNumberNode = children[0], lineNumber = lineNumberNode.children[0].value, processedLineNumberNode = {
- ...lineNumberNode,
- // empty the line-number element
- children: [],
- properties: {
- ...lineNumberNode.properties,
- // add a data-line-number attribute to line-number element, so we can access the line number with `content: attr(data-line-number)`
- "data-line-number": lineNumber,
- // remove the 'userSelect: none' style, which will produce extra empty lines when copy-pasting in firefox
- style: { ...lineNumberNode.properties.style, userSelect: "auto" }
- }
- };
- return children[0] = processedLineNumberNode, { ...row, children };
- }, defaultRenderer2 = ({ rows, stylesheet, useInlineStyles }) => rows.map((node2, i) => createElement4({
- node: processLineNumber(node2),
- stylesheet,
- useInlineStyles,
- key: `code-segement${i}`
- })), wrapRenderer = (renderer, showLineNumbers) => showLineNumbers ? renderer ? ({ rows, ...rest }) => renderer({ rows: rows.map((row) => processLineNumber(row)), ...rest }) : defaultRenderer2 : renderer, SyntaxHighlighter2 = ({
- children,
- language = "jsx",
- copyable = !1,
- bordered = !1,
- padded = !1,
- format: format4 = !0,
- formatter: formatter2 = void 0,
- className = void 0,
- showLineNumbers = !1,
- ...rest
- }) => {
- if (typeof children != "string" || !children.trim())
- return null;
- let [highlightableCode, setHighlightableCode] = (0, import_react13.useState)("");
- (0, import_react13.useEffect)(() => {
- formatter2 ? formatter2(format4, children).then(setHighlightableCode) : setHighlightableCode(children.trim());
- }, [children, format4, formatter2]);
- let { children: copyChildren, buttonProps: copyButtonProps } = useCopyButton({
- content: highlightableCode
- }), renderer = wrapRenderer(rest.renderer, showLineNumbers);
- return import_react13.default.createElement(
- Wrapper,
- {
- bordered,
- padded,
- showLineNumbers,
- className
- },
- import_react13.default.createElement(Scroller, null, import_react13.default.createElement(
- prism_light_default,
- {
- padded: padded || bordered,
- language,
- showLineNumbers,
- showInlineLineNumbers: showLineNumbers,
- useInlineStyles: !1,
- PreTag: Pre,
- CodeTag: Code,
- lineNumberContainerStyle: {},
- ...rest,
- renderer
- },
- highlightableCode
- )),
- copyable ? import_react13.default.createElement(
- ActionBar,
- {
- actionItems: [
- {
- title: copyChildren,
- onClick: copyButtonProps.onClick
- }
- ],
- flexLayout: !0
- }
- ) : null
- );
- };
- SyntaxHighlighter2.registerLanguage = (...args) => prism_light_default.registerLanguage(...args);
- syntaxhighlighter_default = SyntaxHighlighter2;
- }
- });
-
- // src/components/components/syntaxhighlighter/formatter.ts
- var formatter_exports = {};
- __export(formatter_exports, {
- formatter: () => formatter
- });
- var import_memoizerific3, formatter, init_formatter = __esm({
- "src/components/components/syntaxhighlighter/formatter.ts"() {
- "use strict";
- import_memoizerific3 = __toESM(require_memoizerific(), 1);
- init_esm();
- formatter = (0, import_memoizerific3.default)(2)(async (type5, source) => type5 === !1 ? source : dedent(source));
- }
- });
-
- // ../../node_modules/picocolors/picocolors.browser.js
- var require_picocolors_browser = __commonJS({
- "../../node_modules/picocolors/picocolors.browser.js"(exports, module2) {
- var x = String, create4 = function() {
- return { isColorSupported: !1, reset: x, bold: x, dim: x, italic: x, underline: x, inverse: x, hidden: x, strikethrough: x, black: x, red: x, green: x, yellow: x, blue: x, magenta: x, cyan: x, white: x, gray: x, bgBlack: x, bgRed: x, bgGreen: x, bgYellow: x, bgBlue: x, bgMagenta: x, bgCyan: x, bgWhite: x, blackBright: x, redBright: x, greenBright: x, yellowBright: x, blueBright: x, magentaBright: x, cyanBright: x, whiteBright: x, bgBlackBright: x, bgRedBright: x, bgGreenBright: x, bgYellowBright: x, bgBlueBright: x, bgMagentaBright: x, bgCyanBright: x, bgWhiteBright: x };
- };
- module2.exports = create4();
- module2.exports.createColors = create4;
- }
- });
-
- // ../../node_modules/@ngard/tiny-isequal/index.js
- var require_tiny_isequal = __commonJS({
- "../../node_modules/@ngard/tiny-isequal/index.js"(exports) {
- Object.defineProperty(exports, "__esModule", { value: !0 }), exports.isEqual = /* @__PURE__ */ (function() {
- var e = Object.prototype.toString, r2 = Object.getPrototypeOf, t = Object.getOwnPropertySymbols ? function(e2) {
- return Object.keys(e2).concat(Object.getOwnPropertySymbols(e2));
- } : Object.keys;
- return function(n, a3) {
- return (function n2(a4, c, u2) {
- var i, s3, l, o = e.call(a4), f4 = e.call(c);
- if (a4 === c) return !0;
- if (a4 == null || c == null) return !1;
- if (u2.indexOf(a4) > -1 && u2.indexOf(c) > -1) return !0;
- if (u2.push(a4, c), o != f4 || (i = t(a4), s3 = t(c), i.length != s3.length || i.some(function(e2) {
- return !n2(a4[e2], c[e2], u2);
- }))) return !1;
- switch (o.slice(8, -1)) {
- case "Symbol":
- return a4.valueOf() == c.valueOf();
- case "Date":
- case "Number":
- return +a4 == +c || +a4 != +a4 && +c != +c;
- case "RegExp":
- case "Function":
- case "String":
- case "Boolean":
- return "" + a4 == "" + c;
- case "Set":
- case "Map":
- i = a4.entries(), s3 = c.entries();
- do
- if (!n2((l = i.next()).value, s3.next().value, u2)) return !1;
- while (!l.done);
- return !0;
- case "ArrayBuffer":
- a4 = new Uint8Array(a4), c = new Uint8Array(c);
- case "DataView":
- a4 = new Uint8Array(a4.buffer), c = new Uint8Array(c.buffer);
- case "Float32Array":
- case "Float64Array":
- case "Int8Array":
- case "Int16Array":
- case "Int32Array":
- case "Uint8Array":
- case "Uint16Array":
- case "Uint32Array":
- case "Uint8ClampedArray":
- case "Arguments":
- case "Array":
- if (a4.length != c.length) return !1;
- for (l = 0; l < a4.length; l++) if ((l in a4 || l in c) && (l in a4 != l in c || !n2(a4[l], c[l], u2))) return !1;
- return !0;
- case "Object":
- return n2(r2(a4), r2(c), u2);
- default:
- return !1;
- }
- })(n, a3, []);
- };
- })();
- }
- });
-
- // ../../node_modules/picoquery/lib/string-util.js
- var require_string_util = __commonJS({
- "../../node_modules/picoquery/lib/string-util.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", { value: !0 });
- exports.encodeString = encodeString;
- var hexTable = Array.from({ length: 256 }, (_, i) => "%" + ((i < 16 ? "0" : "") + i.toString(16)).toUpperCase()), noEscape = new Int8Array([
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 1,
- 0,
- 0,
- 0,
- 0,
- 0,
- 1,
- 1,
- 1,
- 1,
- 0,
- 0,
- 1,
- 1,
- 0,
- 1,
- 1,
- 1,
- 1,
- 1,
- 1,
- 1,
- 1,
- 1,
- 1,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 1,
- 1,
- 1,
- 1,
- 1,
- 1,
- 1,
- 1,
- 1,
- 1,
- 1,
- 1,
- 1,
- 1,
- 1,
- 1,
- 1,
- 1,
- 1,
- 1,
- 1,
- 1,
- 1,
- 1,
- 1,
- 1,
- 0,
- 0,
- 0,
- 0,
- 1,
- 0,
- 1,
- 1,
- 1,
- 1,
- 1,
- 1,
- 1,
- 1,
- 1,
- 1,
- 1,
- 1,
- 1,
- 1,
- 1,
- 1,
- 1,
- 1,
- 1,
- 1,
- 1,
- 1,
- 1,
- 1,
- 1,
- 1,
- 0,
- 0,
- 0,
- 1,
- 0
- ]);
- function encodeString(str2) {
- let len = str2.length;
- if (len === 0)
- return "";
- let out = "", lastPos = 0, i = 0;
- outer: for (; i < len; i++) {
- let c = str2.charCodeAt(i);
- for (; c < 128; ) {
- if (noEscape[c] !== 1 && (lastPos < i && (out += str2.slice(lastPos, i)), lastPos = i + 1, out += hexTable[c]), ++i === len)
- break outer;
- c = str2.charCodeAt(i);
- }
- if (lastPos < i && (out += str2.slice(lastPos, i)), c < 2048) {
- lastPos = i + 1, out += hexTable[192 | c >> 6] + hexTable[128 | c & 63];
- continue;
- }
- if (c < 55296 || c >= 57344) {
- lastPos = i + 1, out += hexTable[224 | c >> 12] + hexTable[128 | c >> 6 & 63] + hexTable[128 | c & 63];
- continue;
- }
- if (++i, i >= len)
- throw new Error("URI malformed");
- let c2 = str2.charCodeAt(i) & 1023;
- lastPos = i + 1, c = 65536 + ((c & 1023) << 10 | c2), out += hexTable[240 | c >> 18] + hexTable[128 | c >> 12 & 63] + hexTable[128 | c >> 6 & 63] + hexTable[128 | c & 63];
- }
- return lastPos === 0 ? str2 : lastPos < len ? out + str2.slice(lastPos) : out;
- }
- }
- });
-
- // ../../node_modules/picoquery/lib/shared.js
- var require_shared = __commonJS({
- "../../node_modules/picoquery/lib/shared.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", { value: !0 });
- exports.defaultOptions = exports.defaultShouldSerializeObject = exports.defaultValueSerializer = void 0;
- var string_util_js_1 = require_string_util(), defaultValueSerializer = (value) => {
- switch (typeof value) {
- case "string":
- return (0, string_util_js_1.encodeString)(value);
- case "bigint":
- case "boolean":
- return "" + value;
- case "number":
- if (Number.isFinite(value))
- return value < 1e21 ? "" + value : (0, string_util_js_1.encodeString)("" + value);
- break;
- }
- return value instanceof Date ? (0, string_util_js_1.encodeString)(value.toISOString()) : "";
- };
- exports.defaultValueSerializer = defaultValueSerializer;
- var defaultShouldSerializeObject = (val) => val instanceof Date;
- exports.defaultShouldSerializeObject = defaultShouldSerializeObject;
- var identityFunc = (v) => v;
- exports.defaultOptions = {
- nesting: !0,
- nestingSyntax: "dot",
- arrayRepeat: !1,
- arrayRepeatSyntax: "repeat",
- delimiter: 38,
- valueDeserializer: identityFunc,
- valueSerializer: exports.defaultValueSerializer,
- keyDeserializer: identityFunc,
- shouldSerializeObject: exports.defaultShouldSerializeObject
- };
- }
- });
-
- // ../../node_modules/picoquery/lib/object-util.js
- var require_object_util = __commonJS({
- "../../node_modules/picoquery/lib/object-util.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", { value: !0 });
- exports.getDeepObject = getDeepObject;
- exports.stringifyObject = stringifyObject;
- var shared_js_1 = require_shared(), string_util_js_1 = require_string_util();
- function isPrototypeKey(value) {
- return value === "__proto__" || value === "constructor" || value === "prototype";
- }
- function getDeepObject(obj, key, nextKey, forceObject, forceArray) {
- if (isPrototypeKey(key))
- return obj;
- let currObj = obj[key];
- return typeof currObj == "object" && currObj !== null ? currObj : !forceObject && (forceArray || typeof nextKey == "number" || typeof nextKey == "string" && nextKey * 0 === 0 && nextKey.indexOf(".") === -1) ? obj[key] = [] : obj[key] = {};
- }
- var MAX_DEPTH = 20, strBracketPair = "[]", strBracketLeft = "[", strBracketRight = "]", strDot = ".";
- function stringifyObject(obj, options, depth = 0, parentKey, isProbableArray) {
- let { nestingSyntax = shared_js_1.defaultOptions.nestingSyntax, arrayRepeat = shared_js_1.defaultOptions.arrayRepeat, arrayRepeatSyntax = shared_js_1.defaultOptions.arrayRepeatSyntax, nesting = shared_js_1.defaultOptions.nesting, delimiter: delimiter2 = shared_js_1.defaultOptions.delimiter, valueSerializer = shared_js_1.defaultOptions.valueSerializer, shouldSerializeObject = shared_js_1.defaultOptions.shouldSerializeObject } = options, strDelimiter = typeof delimiter2 == "number" ? String.fromCharCode(delimiter2) : delimiter2, useArrayRepeatKey = isProbableArray === !0 && arrayRepeat, shouldUseDot = nestingSyntax === "dot" || nestingSyntax === "js" && !isProbableArray;
- if (depth > MAX_DEPTH)
- return "";
- let result = "", firstKey = !0, valueIsProbableArray = !1;
- for (let key in obj) {
- let value = obj[key];
- if (value === void 0)
- continue;
- let path;
- parentKey ? (path = parentKey, useArrayRepeatKey ? arrayRepeatSyntax === "bracket" && (path += strBracketPair) : shouldUseDot ? (path += strDot, path += key) : (path += strBracketLeft, path += key, path += strBracketRight)) : path = key, firstKey || (result += strDelimiter), typeof value == "object" && value !== null && !shouldSerializeObject(value) ? (valueIsProbableArray = value.pop !== void 0, (nesting || arrayRepeat && valueIsProbableArray) && (result += stringifyObject(value, options, depth + 1, path, valueIsProbableArray))) : (result += (0, string_util_js_1.encodeString)(path), result += "=", result += valueSerializer(value, key)), firstKey && (firstKey = !1);
- }
- return result;
- }
- }
- });
-
- // ../../node_modules/picoquery/lib/decode-uri-component.js
- var require_decode_uri_component = __commonJS({
- "../../node_modules/picoquery/lib/decode-uri-component.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", { value: !0 });
- exports.decodeURIComponent = decodeURIComponent2;
- var UTF8_ACCEPT = 12, UTF8_REJECT = 0, UTF8_DATA = [
- // The first part of the table maps bytes to character to a transition.
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 1,
- 1,
- 1,
- 1,
- 1,
- 1,
- 1,
- 1,
- 1,
- 1,
- 1,
- 1,
- 1,
- 1,
- 1,
- 1,
- 2,
- 2,
- 2,
- 2,
- 2,
- 2,
- 2,
- 2,
- 2,
- 2,
- 2,
- 2,
- 2,
- 2,
- 2,
- 2,
- 3,
- 3,
- 3,
- 3,
- 3,
- 3,
- 3,
- 3,
- 3,
- 3,
- 3,
- 3,
- 3,
- 3,
- 3,
- 3,
- 3,
- 3,
- 3,
- 3,
- 3,
- 3,
- 3,
- 3,
- 3,
- 3,
- 3,
- 3,
- 3,
- 3,
- 3,
- 3,
- 4,
- 4,
- 5,
- 5,
- 5,
- 5,
- 5,
- 5,
- 5,
- 5,
- 5,
- 5,
- 5,
- 5,
- 5,
- 5,
- 5,
- 5,
- 5,
- 5,
- 5,
- 5,
- 5,
- 5,
- 5,
- 5,
- 5,
- 5,
- 5,
- 5,
- 5,
- 5,
- 6,
- 7,
- 7,
- 7,
- 7,
- 7,
- 7,
- 7,
- 7,
- 7,
- 7,
- 7,
- 7,
- 8,
- 7,
- 7,
- 10,
- 9,
- 9,
- 9,
- 11,
- 4,
- 4,
- 4,
- 4,
- 4,
- 4,
- 4,
- 4,
- 4,
- 4,
- 4,
- // The second part of the table maps a state to a new state when adding a
- // transition.
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 12,
- 0,
- 0,
- 0,
- 0,
- 24,
- 36,
- 48,
- 60,
- 72,
- 84,
- 96,
- 0,
- 12,
- 12,
- 12,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 24,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 24,
- 24,
- 24,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 24,
- 24,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 48,
- 48,
- 48,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 48,
- 48,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 48,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- // The third part maps the current transition to a mask that needs to apply
- // to the byte.
- 127,
- 63,
- 63,
- 63,
- 0,
- 31,
- 15,
- 15,
- 15,
- 7,
- 7,
- 7
- ];
- function decodeURIComponent2(uri) {
- let percentPosition = uri.indexOf("%");
- if (percentPosition === -1)
- return uri;
- let length2 = uri.length, decoded = "", last2 = 0, codepoint = 0, startOfOctets = percentPosition, state3 = UTF8_ACCEPT;
- for (; percentPosition > -1 && percentPosition < length2; ) {
- let high = hexCodeToInt(uri[percentPosition + 1], 4), low = hexCodeToInt(uri[percentPosition + 2], 0), byte = high | low, type5 = UTF8_DATA[byte];
- if (state3 = UTF8_DATA[256 + state3 + type5], codepoint = codepoint << 6 | byte & UTF8_DATA[364 + type5], state3 === UTF8_ACCEPT)
- decoded += uri.slice(last2, startOfOctets), decoded += codepoint <= 65535 ? String.fromCharCode(codepoint) : String.fromCharCode(55232 + (codepoint >> 10), 56320 + (codepoint & 1023)), codepoint = 0, last2 = percentPosition + 3, percentPosition = startOfOctets = uri.indexOf("%", last2);
- else {
- if (state3 === UTF8_REJECT)
- return null;
- if (percentPosition += 3, percentPosition < length2 && uri.charCodeAt(percentPosition) === 37)
- continue;
- return null;
- }
- }
- return decoded + uri.slice(last2);
- }
- var HEX = {
- 0: 0,
- 1: 1,
- 2: 2,
- 3: 3,
- 4: 4,
- 5: 5,
- 6: 6,
- 7: 7,
- 8: 8,
- 9: 9,
- a: 10,
- A: 10,
- b: 11,
- B: 11,
- c: 12,
- C: 12,
- d: 13,
- D: 13,
- e: 14,
- E: 14,
- f: 15,
- F: 15
- };
- function hexCodeToInt(c, shift) {
- let i = HEX[c];
- return i === void 0 ? 255 : i << shift;
- }
- }
- });
-
- // ../../node_modules/picoquery/lib/parse.js
- var require_parse = __commonJS({
- "../../node_modules/picoquery/lib/parse.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", { value: !0 });
- exports.numberValueDeserializer = exports.numberKeyDeserializer = void 0;
- exports.parse = parse9;
- var object_util_js_1 = require_object_util(), shared_js_1 = require_shared(), decode_uri_component_js_1 = require_decode_uri_component(), numberKeyDeserializer = (key) => {
- let asNumber = Number(key);
- return Number.isNaN(asNumber) ? key : asNumber;
- };
- exports.numberKeyDeserializer = numberKeyDeserializer;
- var numberValueDeserializer = (value) => {
- let asNumber = Number(value);
- return Number.isNaN(asNumber) ? value : asNumber;
- };
- exports.numberValueDeserializer = numberValueDeserializer;
- var regexPlus = /\+/g, Empty = function() {
- };
- Empty.prototype = /* @__PURE__ */ Object.create(null);
- function computeKeySlice(input2, startIndex, endIndex, keyHasPlus, shouldDecodeKey) {
- let chunk2 = input2.substring(startIndex, endIndex);
- return keyHasPlus && (chunk2 = chunk2.replace(regexPlus, " ")), shouldDecodeKey && (chunk2 = (0, decode_uri_component_js_1.decodeURIComponent)(chunk2) || chunk2), chunk2;
- }
- function parse9(input2, options) {
- let { valueDeserializer = shared_js_1.defaultOptions.valueDeserializer, keyDeserializer = shared_js_1.defaultOptions.keyDeserializer, arrayRepeatSyntax = shared_js_1.defaultOptions.arrayRepeatSyntax, nesting = shared_js_1.defaultOptions.nesting, arrayRepeat = shared_js_1.defaultOptions.arrayRepeat, nestingSyntax = shared_js_1.defaultOptions.nestingSyntax, delimiter: delimiter2 = shared_js_1.defaultOptions.delimiter } = options ?? {}, charDelimiter = typeof delimiter2 == "string" ? delimiter2.charCodeAt(0) : delimiter2, isJsNestingSyntax = nestingSyntax === "js", result = new Empty();
- if (typeof input2 != "string")
- return result;
- let inputLength = input2.length, value = "", startingIndex = -1, equalityIndex = -1, keySeparatorIndex = -1, currentObj = result, lastKey, currentKey = "", keyChunk = "", shouldDecodeKey = !1, shouldDecodeValue = !1, keyHasPlus = !1, valueHasPlus = !1, keyIsDot = !1, hasBothKeyValuePair = !1, c = 0, arrayRepeatBracketIndex = -1, prevIndex = -1, prevChar = -1;
- for (let i = 0; i < inputLength + 1; i++) {
- if (c = i !== inputLength ? input2.charCodeAt(i) : charDelimiter, c === charDelimiter) {
- if (hasBothKeyValuePair = equalityIndex > startingIndex, hasBothKeyValuePair || (equalityIndex = i), keySeparatorIndex !== equalityIndex - 1 && (keyChunk = computeKeySlice(input2, keySeparatorIndex + 1, arrayRepeatBracketIndex > -1 ? arrayRepeatBracketIndex : equalityIndex, keyHasPlus, shouldDecodeKey), currentKey = keyDeserializer(keyChunk), lastKey !== void 0 && (currentObj = (0, object_util_js_1.getDeepObject)(currentObj, lastKey, currentKey, isJsNestingSyntax && keyIsDot, void 0))), hasBothKeyValuePair || currentKey !== "") {
- hasBothKeyValuePair && (value = input2.slice(equalityIndex + 1, i), valueHasPlus && (value = value.replace(regexPlus, " ")), shouldDecodeValue && (value = (0, decode_uri_component_js_1.decodeURIComponent)(value) || value));
- let newValue = valueDeserializer(value, currentKey);
- if (arrayRepeat) {
- let currentValue = currentObj[currentKey];
- currentValue === void 0 ? arrayRepeatBracketIndex > -1 ? currentObj[currentKey] = [newValue] : currentObj[currentKey] = newValue : currentValue.pop ? currentValue.push(newValue) : currentObj[currentKey] = [currentValue, newValue];
- } else
- currentObj[currentKey] = newValue;
- }
- value = "", startingIndex = i, equalityIndex = i, shouldDecodeKey = !1, shouldDecodeValue = !1, keyHasPlus = !1, valueHasPlus = !1, keyIsDot = !1, arrayRepeatBracketIndex = -1, keySeparatorIndex = i, currentObj = result, lastKey = void 0, currentKey = "";
- } else c === 93 ? (arrayRepeat && arrayRepeatSyntax === "bracket" && prevChar === 91 && (arrayRepeatBracketIndex = prevIndex), nesting && (nestingSyntax === "index" || isJsNestingSyntax) && equalityIndex <= startingIndex && (keySeparatorIndex !== prevIndex && (keyChunk = computeKeySlice(input2, keySeparatorIndex + 1, i, keyHasPlus, shouldDecodeKey), currentKey = keyDeserializer(keyChunk), lastKey !== void 0 && (currentObj = (0, object_util_js_1.getDeepObject)(currentObj, lastKey, currentKey, void 0, void 0)), lastKey = currentKey, keyHasPlus = !1, shouldDecodeKey = !1), keySeparatorIndex = i, keyIsDot = !1)) : c === 46 ? nesting && (nestingSyntax === "dot" || isJsNestingSyntax) && equalityIndex <= startingIndex && (keySeparatorIndex !== prevIndex && (keyChunk = computeKeySlice(input2, keySeparatorIndex + 1, i, keyHasPlus, shouldDecodeKey), currentKey = keyDeserializer(keyChunk), lastKey !== void 0 && (currentObj = (0, object_util_js_1.getDeepObject)(currentObj, lastKey, currentKey, isJsNestingSyntax)), lastKey = currentKey, keyHasPlus = !1, shouldDecodeKey = !1), keyIsDot = !0, keySeparatorIndex = i) : c === 91 ? nesting && (nestingSyntax === "index" || isJsNestingSyntax) && equalityIndex <= startingIndex && (keySeparatorIndex !== prevIndex && (keyChunk = computeKeySlice(input2, keySeparatorIndex + 1, i, keyHasPlus, shouldDecodeKey), currentKey = keyDeserializer(keyChunk), isJsNestingSyntax && lastKey !== void 0 && (currentObj = (0, object_util_js_1.getDeepObject)(currentObj, lastKey, currentKey, isJsNestingSyntax)), lastKey = currentKey, keyHasPlus = !1, shouldDecodeKey = !1, keyIsDot = !1), keySeparatorIndex = i) : c === 61 ? equalityIndex <= startingIndex ? equalityIndex = i : shouldDecodeValue = !0 : c === 43 ? equalityIndex > startingIndex ? valueHasPlus = !0 : keyHasPlus = !0 : c === 37 && (equalityIndex > startingIndex ? shouldDecodeValue = !0 : shouldDecodeKey = !0);
- prevIndex = i, prevChar = c;
- }
- return result;
- }
- }
- });
-
- // ../../node_modules/picoquery/lib/stringify.js
- var require_stringify = __commonJS({
- "../../node_modules/picoquery/lib/stringify.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", { value: !0 });
- exports.stringify = stringify8;
- var object_util_js_1 = require_object_util();
- function stringify8(input2, options) {
- if (input2 === null || typeof input2 != "object")
- return "";
- let optionsObj = options ?? {};
- return (0, object_util_js_1.stringifyObject)(input2, optionsObj);
- }
- }
- });
-
- // ../../node_modules/picoquery/lib/main.js
- var require_main = __commonJS({
- "../../node_modules/picoquery/lib/main.js"(exports) {
- "use strict";
- var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m3, k, k2) {
- k2 === void 0 && (k2 = k);
- var desc = Object.getOwnPropertyDescriptor(m3, k);
- (!desc || ("get" in desc ? !m3.__esModule : desc.writable || desc.configurable)) && (desc = { enumerable: !0, get: function() {
- return m3[k];
- } }), Object.defineProperty(o, k2, desc);
- }) : (function(o, m3, k, k2) {
- k2 === void 0 && (k2 = k), o[k2] = m3[k];
- })), __exportStar = exports && exports.__exportStar || function(m3, exports2) {
- for (var p3 in m3) p3 !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p3) && __createBinding(exports2, m3, p3);
- };
- Object.defineProperty(exports, "__esModule", { value: !0 });
- exports.stringify = exports.parse = void 0;
- var parse_js_1 = require_parse();
- Object.defineProperty(exports, "parse", { enumerable: !0, get: function() {
- return parse_js_1.parse;
- } });
- var stringify_js_1 = require_stringify();
- Object.defineProperty(exports, "stringify", { enumerable: !0, get: function() {
- return stringify_js_1.stringify;
- } });
- __exportStar(require_shared(), exports);
- }
- });
-
- // ../../node_modules/entities/lib/maps/entities.json
- var require_entities = __commonJS({
- "../../node_modules/entities/lib/maps/entities.json"(exports, module2) {
- module2.exports = { Aacute: "\xC1", aacute: "\xE1", Abreve: "\u0102", abreve: "\u0103", ac: "\u223E", acd: "\u223F", acE: "\u223E\u0333", Acirc: "\xC2", acirc: "\xE2", acute: "\xB4", Acy: "\u0410", acy: "\u0430", AElig: "\xC6", aelig: "\xE6", af: "\u2061", Afr: "\u{1D504}", afr: "\u{1D51E}", Agrave: "\xC0", agrave: "\xE0", alefsym: "\u2135", aleph: "\u2135", Alpha: "\u0391", alpha: "\u03B1", Amacr: "\u0100", amacr: "\u0101", amalg: "\u2A3F", amp: "&", AMP: "&", andand: "\u2A55", And: "\u2A53", and: "\u2227", andd: "\u2A5C", andslope: "\u2A58", andv: "\u2A5A", ang: "\u2220", ange: "\u29A4", angle: "\u2220", angmsdaa: "\u29A8", angmsdab: "\u29A9", angmsdac: "\u29AA", angmsdad: "\u29AB", angmsdae: "\u29AC", angmsdaf: "\u29AD", angmsdag: "\u29AE", angmsdah: "\u29AF", angmsd: "\u2221", angrt: "\u221F", angrtvb: "\u22BE", angrtvbd: "\u299D", angsph: "\u2222", angst: "\xC5", angzarr: "\u237C", Aogon: "\u0104", aogon: "\u0105", Aopf: "\u{1D538}", aopf: "\u{1D552}", apacir: "\u2A6F", ap: "\u2248", apE: "\u2A70", ape: "\u224A", apid: "\u224B", apos: "'", ApplyFunction: "\u2061", approx: "\u2248", approxeq: "\u224A", Aring: "\xC5", aring: "\xE5", Ascr: "\u{1D49C}", ascr: "\u{1D4B6}", Assign: "\u2254", ast: "*", asymp: "\u2248", asympeq: "\u224D", Atilde: "\xC3", atilde: "\xE3", Auml: "\xC4", auml: "\xE4", awconint: "\u2233", awint: "\u2A11", backcong: "\u224C", backepsilon: "\u03F6", backprime: "\u2035", backsim: "\u223D", backsimeq: "\u22CD", Backslash: "\u2216", Barv: "\u2AE7", barvee: "\u22BD", barwed: "\u2305", Barwed: "\u2306", barwedge: "\u2305", bbrk: "\u23B5", bbrktbrk: "\u23B6", bcong: "\u224C", Bcy: "\u0411", bcy: "\u0431", bdquo: "\u201E", becaus: "\u2235", because: "\u2235", Because: "\u2235", bemptyv: "\u29B0", bepsi: "\u03F6", bernou: "\u212C", Bernoullis: "\u212C", Beta: "\u0392", beta: "\u03B2", beth: "\u2136", between: "\u226C", Bfr: "\u{1D505}", bfr: "\u{1D51F}", bigcap: "\u22C2", bigcirc: "\u25EF", bigcup: "\u22C3", bigodot: "\u2A00", bigoplus: "\u2A01", bigotimes: "\u2A02", bigsqcup: "\u2A06", bigstar: "\u2605", bigtriangledown: "\u25BD", bigtriangleup: "\u25B3", biguplus: "\u2A04", bigvee: "\u22C1", bigwedge: "\u22C0", bkarow: "\u290D", blacklozenge: "\u29EB", blacksquare: "\u25AA", blacktriangle: "\u25B4", blacktriangledown: "\u25BE", blacktriangleleft: "\u25C2", blacktriangleright: "\u25B8", blank: "\u2423", blk12: "\u2592", blk14: "\u2591", blk34: "\u2593", block: "\u2588", bne: "=\u20E5", bnequiv: "\u2261\u20E5", bNot: "\u2AED", bnot: "\u2310", Bopf: "\u{1D539}", bopf: "\u{1D553}", bot: "\u22A5", bottom: "\u22A5", bowtie: "\u22C8", boxbox: "\u29C9", boxdl: "\u2510", boxdL: "\u2555", boxDl: "\u2556", boxDL: "\u2557", boxdr: "\u250C", boxdR: "\u2552", boxDr: "\u2553", boxDR: "\u2554", boxh: "\u2500", boxH: "\u2550", boxhd: "\u252C", boxHd: "\u2564", boxhD: "\u2565", boxHD: "\u2566", boxhu: "\u2534", boxHu: "\u2567", boxhU: "\u2568", boxHU: "\u2569", boxminus: "\u229F", boxplus: "\u229E", boxtimes: "\u22A0", boxul: "\u2518", boxuL: "\u255B", boxUl: "\u255C", boxUL: "\u255D", boxur: "\u2514", boxuR: "\u2558", boxUr: "\u2559", boxUR: "\u255A", boxv: "\u2502", boxV: "\u2551", boxvh: "\u253C", boxvH: "\u256A", boxVh: "\u256B", boxVH: "\u256C", boxvl: "\u2524", boxvL: "\u2561", boxVl: "\u2562", boxVL: "\u2563", boxvr: "\u251C", boxvR: "\u255E", boxVr: "\u255F", boxVR: "\u2560", bprime: "\u2035", breve: "\u02D8", Breve: "\u02D8", brvbar: "\xA6", bscr: "\u{1D4B7}", Bscr: "\u212C", bsemi: "\u204F", bsim: "\u223D", bsime: "\u22CD", bsolb: "\u29C5", bsol: "\\", bsolhsub: "\u27C8", bull: "\u2022", bullet: "\u2022", bump: "\u224E", bumpE: "\u2AAE", bumpe: "\u224F", Bumpeq: "\u224E", bumpeq: "\u224F", Cacute: "\u0106", cacute: "\u0107", capand: "\u2A44", capbrcup: "\u2A49", capcap: "\u2A4B", cap: "\u2229", Cap: "\u22D2", capcup: "\u2A47", capdot: "\u2A40", CapitalDifferentialD: "\u2145", caps: "\u2229\uFE00", caret: "\u2041", caron: "\u02C7", Cayleys: "\u212D", ccaps: "\u2A4D", Ccaron: "\u010C", ccaron: "\u010D", Ccedil: "\xC7", ccedil: "\xE7", Ccirc: "\u0108", ccirc: "\u0109", Cconint: "\u2230", ccups: "\u2A4C", ccupssm: "\u2A50", Cdot: "\u010A", cdot: "\u010B", cedil: "\xB8", Cedilla: "\xB8", cemptyv: "\u29B2", cent: "\xA2", centerdot: "\xB7", CenterDot: "\xB7", cfr: "\u{1D520}", Cfr: "\u212D", CHcy: "\u0427", chcy: "\u0447", check: "\u2713", checkmark: "\u2713", Chi: "\u03A7", chi: "\u03C7", circ: "\u02C6", circeq: "\u2257", circlearrowleft: "\u21BA", circlearrowright: "\u21BB", circledast: "\u229B", circledcirc: "\u229A", circleddash: "\u229D", CircleDot: "\u2299", circledR: "\xAE", circledS: "\u24C8", CircleMinus: "\u2296", CirclePlus: "\u2295", CircleTimes: "\u2297", cir: "\u25CB", cirE: "\u29C3", cire: "\u2257", cirfnint: "\u2A10", cirmid: "\u2AEF", cirscir: "\u29C2", ClockwiseContourIntegral: "\u2232", CloseCurlyDoubleQuote: "\u201D", CloseCurlyQuote: "\u2019", clubs: "\u2663", clubsuit: "\u2663", colon: ":", Colon: "\u2237", Colone: "\u2A74", colone: "\u2254", coloneq: "\u2254", comma: ",", commat: "@", comp: "\u2201", compfn: "\u2218", complement: "\u2201", complexes: "\u2102", cong: "\u2245", congdot: "\u2A6D", Congruent: "\u2261", conint: "\u222E", Conint: "\u222F", ContourIntegral: "\u222E", copf: "\u{1D554}", Copf: "\u2102", coprod: "\u2210", Coproduct: "\u2210", copy: "\xA9", COPY: "\xA9", copysr: "\u2117", CounterClockwiseContourIntegral: "\u2233", crarr: "\u21B5", cross: "\u2717", Cross: "\u2A2F", Cscr: "\u{1D49E}", cscr: "\u{1D4B8}", csub: "\u2ACF", csube: "\u2AD1", csup: "\u2AD0", csupe: "\u2AD2", ctdot: "\u22EF", cudarrl: "\u2938", cudarrr: "\u2935", cuepr: "\u22DE", cuesc: "\u22DF", cularr: "\u21B6", cularrp: "\u293D", cupbrcap: "\u2A48", cupcap: "\u2A46", CupCap: "\u224D", cup: "\u222A", Cup: "\u22D3", cupcup: "\u2A4A", cupdot: "\u228D", cupor: "\u2A45", cups: "\u222A\uFE00", curarr: "\u21B7", curarrm: "\u293C", curlyeqprec: "\u22DE", curlyeqsucc: "\u22DF", curlyvee: "\u22CE", curlywedge: "\u22CF", curren: "\xA4", curvearrowleft: "\u21B6", curvearrowright: "\u21B7", cuvee: "\u22CE", cuwed: "\u22CF", cwconint: "\u2232", cwint: "\u2231", cylcty: "\u232D", dagger: "\u2020", Dagger: "\u2021", daleth: "\u2138", darr: "\u2193", Darr: "\u21A1", dArr: "\u21D3", dash: "\u2010", Dashv: "\u2AE4", dashv: "\u22A3", dbkarow: "\u290F", dblac: "\u02DD", Dcaron: "\u010E", dcaron: "\u010F", Dcy: "\u0414", dcy: "\u0434", ddagger: "\u2021", ddarr: "\u21CA", DD: "\u2145", dd: "\u2146", DDotrahd: "\u2911", ddotseq: "\u2A77", deg: "\xB0", Del: "\u2207", Delta: "\u0394", delta: "\u03B4", demptyv: "\u29B1", dfisht: "\u297F", Dfr: "\u{1D507}", dfr: "\u{1D521}", dHar: "\u2965", dharl: "\u21C3", dharr: "\u21C2", DiacriticalAcute: "\xB4", DiacriticalDot: "\u02D9", DiacriticalDoubleAcute: "\u02DD", DiacriticalGrave: "`", DiacriticalTilde: "\u02DC", diam: "\u22C4", diamond: "\u22C4", Diamond: "\u22C4", diamondsuit: "\u2666", diams: "\u2666", die: "\xA8", DifferentialD: "\u2146", digamma: "\u03DD", disin: "\u22F2", div: "\xF7", divide: "\xF7", divideontimes: "\u22C7", divonx: "\u22C7", DJcy: "\u0402", djcy: "\u0452", dlcorn: "\u231E", dlcrop: "\u230D", dollar: "$", Dopf: "\u{1D53B}", dopf: "\u{1D555}", Dot: "\xA8", dot: "\u02D9", DotDot: "\u20DC", doteq: "\u2250", doteqdot: "\u2251", DotEqual: "\u2250", dotminus: "\u2238", dotplus: "\u2214", dotsquare: "\u22A1", doublebarwedge: "\u2306", DoubleContourIntegral: "\u222F", DoubleDot: "\xA8", DoubleDownArrow: "\u21D3", DoubleLeftArrow: "\u21D0", DoubleLeftRightArrow: "\u21D4", DoubleLeftTee: "\u2AE4", DoubleLongLeftArrow: "\u27F8", DoubleLongLeftRightArrow: "\u27FA", DoubleLongRightArrow: "\u27F9", DoubleRightArrow: "\u21D2", DoubleRightTee: "\u22A8", DoubleUpArrow: "\u21D1", DoubleUpDownArrow: "\u21D5", DoubleVerticalBar: "\u2225", DownArrowBar: "\u2913", downarrow: "\u2193", DownArrow: "\u2193", Downarrow: "\u21D3", DownArrowUpArrow: "\u21F5", DownBreve: "\u0311", downdownarrows: "\u21CA", downharpoonleft: "\u21C3", downharpoonright: "\u21C2", DownLeftRightVector: "\u2950", DownLeftTeeVector: "\u295E", DownLeftVectorBar: "\u2956", DownLeftVector: "\u21BD", DownRightTeeVector: "\u295F", DownRightVectorBar: "\u2957", DownRightVector: "\u21C1", DownTeeArrow: "\u21A7", DownTee: "\u22A4", drbkarow: "\u2910", drcorn: "\u231F", drcrop: "\u230C", Dscr: "\u{1D49F}", dscr: "\u{1D4B9}", DScy: "\u0405", dscy: "\u0455", dsol: "\u29F6", Dstrok: "\u0110", dstrok: "\u0111", dtdot: "\u22F1", dtri: "\u25BF", dtrif: "\u25BE", duarr: "\u21F5", duhar: "\u296F", dwangle: "\u29A6", DZcy: "\u040F", dzcy: "\u045F", dzigrarr: "\u27FF", Eacute: "\xC9", eacute: "\xE9", easter: "\u2A6E", Ecaron: "\u011A", ecaron: "\u011B", Ecirc: "\xCA", ecirc: "\xEA", ecir: "\u2256", ecolon: "\u2255", Ecy: "\u042D", ecy: "\u044D", eDDot: "\u2A77", Edot: "\u0116", edot: "\u0117", eDot: "\u2251", ee: "\u2147", efDot: "\u2252", Efr: "\u{1D508}", efr: "\u{1D522}", eg: "\u2A9A", Egrave: "\xC8", egrave: "\xE8", egs: "\u2A96", egsdot: "\u2A98", el: "\u2A99", Element: "\u2208", elinters: "\u23E7", ell: "\u2113", els: "\u2A95", elsdot: "\u2A97", Emacr: "\u0112", emacr: "\u0113", empty: "\u2205", emptyset: "\u2205", EmptySmallSquare: "\u25FB", emptyv: "\u2205", EmptyVerySmallSquare: "\u25AB", emsp13: "\u2004", emsp14: "\u2005", emsp: "\u2003", ENG: "\u014A", eng: "\u014B", ensp: "\u2002", Eogon: "\u0118", eogon: "\u0119", Eopf: "\u{1D53C}", eopf: "\u{1D556}", epar: "\u22D5", eparsl: "\u29E3", eplus: "\u2A71", epsi: "\u03B5", Epsilon: "\u0395", epsilon: "\u03B5", epsiv: "\u03F5", eqcirc: "\u2256", eqcolon: "\u2255", eqsim: "\u2242", eqslantgtr: "\u2A96", eqslantless: "\u2A95", Equal: "\u2A75", equals: "=", EqualTilde: "\u2242", equest: "\u225F", Equilibrium: "\u21CC", equiv: "\u2261", equivDD: "\u2A78", eqvparsl: "\u29E5", erarr: "\u2971", erDot: "\u2253", escr: "\u212F", Escr: "\u2130", esdot: "\u2250", Esim: "\u2A73", esim: "\u2242", Eta: "\u0397", eta: "\u03B7", ETH: "\xD0", eth: "\xF0", Euml: "\xCB", euml: "\xEB", euro: "\u20AC", excl: "!", exist: "\u2203", Exists: "\u2203", expectation: "\u2130", exponentiale: "\u2147", ExponentialE: "\u2147", fallingdotseq: "\u2252", Fcy: "\u0424", fcy: "\u0444", female: "\u2640", ffilig: "\uFB03", fflig: "\uFB00", ffllig: "\uFB04", Ffr: "\u{1D509}", ffr: "\u{1D523}", filig: "\uFB01", FilledSmallSquare: "\u25FC", FilledVerySmallSquare: "\u25AA", fjlig: "fj", flat: "\u266D", fllig: "\uFB02", fltns: "\u25B1", fnof: "\u0192", Fopf: "\u{1D53D}", fopf: "\u{1D557}", forall: "\u2200", ForAll: "\u2200", fork: "\u22D4", forkv: "\u2AD9", Fouriertrf: "\u2131", fpartint: "\u2A0D", frac12: "\xBD", frac13: "\u2153", frac14: "\xBC", frac15: "\u2155", frac16: "\u2159", frac18: "\u215B", frac23: "\u2154", frac25: "\u2156", frac34: "\xBE", frac35: "\u2157", frac38: "\u215C", frac45: "\u2158", frac56: "\u215A", frac58: "\u215D", frac78: "\u215E", frasl: "\u2044", frown: "\u2322", fscr: "\u{1D4BB}", Fscr: "\u2131", gacute: "\u01F5", Gamma: "\u0393", gamma: "\u03B3", Gammad: "\u03DC", gammad: "\u03DD", gap: "\u2A86", Gbreve: "\u011E", gbreve: "\u011F", Gcedil: "\u0122", Gcirc: "\u011C", gcirc: "\u011D", Gcy: "\u0413", gcy: "\u0433", Gdot: "\u0120", gdot: "\u0121", ge: "\u2265", gE: "\u2267", gEl: "\u2A8C", gel: "\u22DB", geq: "\u2265", geqq: "\u2267", geqslant: "\u2A7E", gescc: "\u2AA9", ges: "\u2A7E", gesdot: "\u2A80", gesdoto: "\u2A82", gesdotol: "\u2A84", gesl: "\u22DB\uFE00", gesles: "\u2A94", Gfr: "\u{1D50A}", gfr: "\u{1D524}", gg: "\u226B", Gg: "\u22D9", ggg: "\u22D9", gimel: "\u2137", GJcy: "\u0403", gjcy: "\u0453", gla: "\u2AA5", gl: "\u2277", glE: "\u2A92", glj: "\u2AA4", gnap: "\u2A8A", gnapprox: "\u2A8A", gne: "\u2A88", gnE: "\u2269", gneq: "\u2A88", gneqq: "\u2269", gnsim: "\u22E7", Gopf: "\u{1D53E}", gopf: "\u{1D558}", grave: "`", GreaterEqual: "\u2265", GreaterEqualLess: "\u22DB", GreaterFullEqual: "\u2267", GreaterGreater: "\u2AA2", GreaterLess: "\u2277", GreaterSlantEqual: "\u2A7E", GreaterTilde: "\u2273", Gscr: "\u{1D4A2}", gscr: "\u210A", gsim: "\u2273", gsime: "\u2A8E", gsiml: "\u2A90", gtcc: "\u2AA7", gtcir: "\u2A7A", gt: ">", GT: ">", Gt: "\u226B", gtdot: "\u22D7", gtlPar: "\u2995", gtquest: "\u2A7C", gtrapprox: "\u2A86", gtrarr: "\u2978", gtrdot: "\u22D7", gtreqless: "\u22DB", gtreqqless: "\u2A8C", gtrless: "\u2277", gtrsim: "\u2273", gvertneqq: "\u2269\uFE00", gvnE: "\u2269\uFE00", Hacek: "\u02C7", hairsp: "\u200A", half: "\xBD", hamilt: "\u210B", HARDcy: "\u042A", hardcy: "\u044A", harrcir: "\u2948", harr: "\u2194", hArr: "\u21D4", harrw: "\u21AD", Hat: "^", hbar: "\u210F", Hcirc: "\u0124", hcirc: "\u0125", hearts: "\u2665", heartsuit: "\u2665", hellip: "\u2026", hercon: "\u22B9", hfr: "\u{1D525}", Hfr: "\u210C", HilbertSpace: "\u210B", hksearow: "\u2925", hkswarow: "\u2926", hoarr: "\u21FF", homtht: "\u223B", hookleftarrow: "\u21A9", hookrightarrow: "\u21AA", hopf: "\u{1D559}", Hopf: "\u210D", horbar: "\u2015", HorizontalLine: "\u2500", hscr: "\u{1D4BD}", Hscr: "\u210B", hslash: "\u210F", Hstrok: "\u0126", hstrok: "\u0127", HumpDownHump: "\u224E", HumpEqual: "\u224F", hybull: "\u2043", hyphen: "\u2010", Iacute: "\xCD", iacute: "\xED", ic: "\u2063", Icirc: "\xCE", icirc: "\xEE", Icy: "\u0418", icy: "\u0438", Idot: "\u0130", IEcy: "\u0415", iecy: "\u0435", iexcl: "\xA1", iff: "\u21D4", ifr: "\u{1D526}", Ifr: "\u2111", Igrave: "\xCC", igrave: "\xEC", ii: "\u2148", iiiint: "\u2A0C", iiint: "\u222D", iinfin: "\u29DC", iiota: "\u2129", IJlig: "\u0132", ijlig: "\u0133", Imacr: "\u012A", imacr: "\u012B", image: "\u2111", ImaginaryI: "\u2148", imagline: "\u2110", imagpart: "\u2111", imath: "\u0131", Im: "\u2111", imof: "\u22B7", imped: "\u01B5", Implies: "\u21D2", incare: "\u2105", in: "\u2208", infin: "\u221E", infintie: "\u29DD", inodot: "\u0131", intcal: "\u22BA", int: "\u222B", Int: "\u222C", integers: "\u2124", Integral: "\u222B", intercal: "\u22BA", Intersection: "\u22C2", intlarhk: "\u2A17", intprod: "\u2A3C", InvisibleComma: "\u2063", InvisibleTimes: "\u2062", IOcy: "\u0401", iocy: "\u0451", Iogon: "\u012E", iogon: "\u012F", Iopf: "\u{1D540}", iopf: "\u{1D55A}", Iota: "\u0399", iota: "\u03B9", iprod: "\u2A3C", iquest: "\xBF", iscr: "\u{1D4BE}", Iscr: "\u2110", isin: "\u2208", isindot: "\u22F5", isinE: "\u22F9", isins: "\u22F4", isinsv: "\u22F3", isinv: "\u2208", it: "\u2062", Itilde: "\u0128", itilde: "\u0129", Iukcy: "\u0406", iukcy: "\u0456", Iuml: "\xCF", iuml: "\xEF", Jcirc: "\u0134", jcirc: "\u0135", Jcy: "\u0419", jcy: "\u0439", Jfr: "\u{1D50D}", jfr: "\u{1D527}", jmath: "\u0237", Jopf: "\u{1D541}", jopf: "\u{1D55B}", Jscr: "\u{1D4A5}", jscr: "\u{1D4BF}", Jsercy: "\u0408", jsercy: "\u0458", Jukcy: "\u0404", jukcy: "\u0454", Kappa: "\u039A", kappa: "\u03BA", kappav: "\u03F0", Kcedil: "\u0136", kcedil: "\u0137", Kcy: "\u041A", kcy: "\u043A", Kfr: "\u{1D50E}", kfr: "\u{1D528}", kgreen: "\u0138", KHcy: "\u0425", khcy: "\u0445", KJcy: "\u040C", kjcy: "\u045C", Kopf: "\u{1D542}", kopf: "\u{1D55C}", Kscr: "\u{1D4A6}", kscr: "\u{1D4C0}", lAarr: "\u21DA", Lacute: "\u0139", lacute: "\u013A", laemptyv: "\u29B4", lagran: "\u2112", Lambda: "\u039B", lambda: "\u03BB", lang: "\u27E8", Lang: "\u27EA", langd: "\u2991", langle: "\u27E8", lap: "\u2A85", Laplacetrf: "\u2112", laquo: "\xAB", larrb: "\u21E4", larrbfs: "\u291F", larr: "\u2190", Larr: "\u219E", lArr: "\u21D0", larrfs: "\u291D", larrhk: "\u21A9", larrlp: "\u21AB", larrpl: "\u2939", larrsim: "\u2973", larrtl: "\u21A2", latail: "\u2919", lAtail: "\u291B", lat: "\u2AAB", late: "\u2AAD", lates: "\u2AAD\uFE00", lbarr: "\u290C", lBarr: "\u290E", lbbrk: "\u2772", lbrace: "{", lbrack: "[", lbrke: "\u298B", lbrksld: "\u298F", lbrkslu: "\u298D", Lcaron: "\u013D", lcaron: "\u013E", Lcedil: "\u013B", lcedil: "\u013C", lceil: "\u2308", lcub: "{", Lcy: "\u041B", lcy: "\u043B", ldca: "\u2936", ldquo: "\u201C", ldquor: "\u201E", ldrdhar: "\u2967", ldrushar: "\u294B", ldsh: "\u21B2", le: "\u2264", lE: "\u2266", LeftAngleBracket: "\u27E8", LeftArrowBar: "\u21E4", leftarrow: "\u2190", LeftArrow: "\u2190", Leftarrow: "\u21D0", LeftArrowRightArrow: "\u21C6", leftarrowtail: "\u21A2", LeftCeiling: "\u2308", LeftDoubleBracket: "\u27E6", LeftDownTeeVector: "\u2961", LeftDownVectorBar: "\u2959", LeftDownVector: "\u21C3", LeftFloor: "\u230A", leftharpoondown: "\u21BD", leftharpoonup: "\u21BC", leftleftarrows: "\u21C7", leftrightarrow: "\u2194", LeftRightArrow: "\u2194", Leftrightarrow: "\u21D4", leftrightarrows: "\u21C6", leftrightharpoons: "\u21CB", leftrightsquigarrow: "\u21AD", LeftRightVector: "\u294E", LeftTeeArrow: "\u21A4", LeftTee: "\u22A3", LeftTeeVector: "\u295A", leftthreetimes: "\u22CB", LeftTriangleBar: "\u29CF", LeftTriangle: "\u22B2", LeftTriangleEqual: "\u22B4", LeftUpDownVector: "\u2951", LeftUpTeeVector: "\u2960", LeftUpVectorBar: "\u2958", LeftUpVector: "\u21BF", LeftVectorBar: "\u2952", LeftVector: "\u21BC", lEg: "\u2A8B", leg: "\u22DA", leq: "\u2264", leqq: "\u2266", leqslant: "\u2A7D", lescc: "\u2AA8", les: "\u2A7D", lesdot: "\u2A7F", lesdoto: "\u2A81", lesdotor: "\u2A83", lesg: "\u22DA\uFE00", lesges: "\u2A93", lessapprox: "\u2A85", lessdot: "\u22D6", lesseqgtr: "\u22DA", lesseqqgtr: "\u2A8B", LessEqualGreater: "\u22DA", LessFullEqual: "\u2266", LessGreater: "\u2276", lessgtr: "\u2276", LessLess: "\u2AA1", lesssim: "\u2272", LessSlantEqual: "\u2A7D", LessTilde: "\u2272", lfisht: "\u297C", lfloor: "\u230A", Lfr: "\u{1D50F}", lfr: "\u{1D529}", lg: "\u2276", lgE: "\u2A91", lHar: "\u2962", lhard: "\u21BD", lharu: "\u21BC", lharul: "\u296A", lhblk: "\u2584", LJcy: "\u0409", ljcy: "\u0459", llarr: "\u21C7", ll: "\u226A", Ll: "\u22D8", llcorner: "\u231E", Lleftarrow: "\u21DA", llhard: "\u296B", lltri: "\u25FA", Lmidot: "\u013F", lmidot: "\u0140", lmoustache: "\u23B0", lmoust: "\u23B0", lnap: "\u2A89", lnapprox: "\u2A89", lne: "\u2A87", lnE: "\u2268", lneq: "\u2A87", lneqq: "\u2268", lnsim: "\u22E6", loang: "\u27EC", loarr: "\u21FD", lobrk: "\u27E6", longleftarrow: "\u27F5", LongLeftArrow: "\u27F5", Longleftarrow: "\u27F8", longleftrightarrow: "\u27F7", LongLeftRightArrow: "\u27F7", Longleftrightarrow: "\u27FA", longmapsto: "\u27FC", longrightarrow: "\u27F6", LongRightArrow: "\u27F6", Longrightarrow: "\u27F9", looparrowleft: "\u21AB", looparrowright: "\u21AC", lopar: "\u2985", Lopf: "\u{1D543}", lopf: "\u{1D55D}", loplus: "\u2A2D", lotimes: "\u2A34", lowast: "\u2217", lowbar: "_", LowerLeftArrow: "\u2199", LowerRightArrow: "\u2198", loz: "\u25CA", lozenge: "\u25CA", lozf: "\u29EB", lpar: "(", lparlt: "\u2993", lrarr: "\u21C6", lrcorner: "\u231F", lrhar: "\u21CB", lrhard: "\u296D", lrm: "\u200E", lrtri: "\u22BF", lsaquo: "\u2039", lscr: "\u{1D4C1}", Lscr: "\u2112", lsh: "\u21B0", Lsh: "\u21B0", lsim: "\u2272", lsime: "\u2A8D", lsimg: "\u2A8F", lsqb: "[", lsquo: "\u2018", lsquor: "\u201A", Lstrok: "\u0141", lstrok: "\u0142", ltcc: "\u2AA6", ltcir: "\u2A79", lt: "<", LT: "<", Lt: "\u226A", ltdot: "\u22D6", lthree: "\u22CB", ltimes: "\u22C9", ltlarr: "\u2976", ltquest: "\u2A7B", ltri: "\u25C3", ltrie: "\u22B4", ltrif: "\u25C2", ltrPar: "\u2996", lurdshar: "\u294A", luruhar: "\u2966", lvertneqq: "\u2268\uFE00", lvnE: "\u2268\uFE00", macr: "\xAF", male: "\u2642", malt: "\u2720", maltese: "\u2720", Map: "\u2905", map: "\u21A6", mapsto: "\u21A6", mapstodown: "\u21A7", mapstoleft: "\u21A4", mapstoup: "\u21A5", marker: "\u25AE", mcomma: "\u2A29", Mcy: "\u041C", mcy: "\u043C", mdash: "\u2014", mDDot: "\u223A", measuredangle: "\u2221", MediumSpace: "\u205F", Mellintrf: "\u2133", Mfr: "\u{1D510}", mfr: "\u{1D52A}", mho: "\u2127", micro: "\xB5", midast: "*", midcir: "\u2AF0", mid: "\u2223", middot: "\xB7", minusb: "\u229F", minus: "\u2212", minusd: "\u2238", minusdu: "\u2A2A", MinusPlus: "\u2213", mlcp: "\u2ADB", mldr: "\u2026", mnplus: "\u2213", models: "\u22A7", Mopf: "\u{1D544}", mopf: "\u{1D55E}", mp: "\u2213", mscr: "\u{1D4C2}", Mscr: "\u2133", mstpos: "\u223E", Mu: "\u039C", mu: "\u03BC", multimap: "\u22B8", mumap: "\u22B8", nabla: "\u2207", Nacute: "\u0143", nacute: "\u0144", nang: "\u2220\u20D2", nap: "\u2249", napE: "\u2A70\u0338", napid: "\u224B\u0338", napos: "\u0149", napprox: "\u2249", natural: "\u266E", naturals: "\u2115", natur: "\u266E", nbsp: "\xA0", nbump: "\u224E\u0338", nbumpe: "\u224F\u0338", ncap: "\u2A43", Ncaron: "\u0147", ncaron: "\u0148", Ncedil: "\u0145", ncedil: "\u0146", ncong: "\u2247", ncongdot: "\u2A6D\u0338", ncup: "\u2A42", Ncy: "\u041D", ncy: "\u043D", ndash: "\u2013", nearhk: "\u2924", nearr: "\u2197", neArr: "\u21D7", nearrow: "\u2197", ne: "\u2260", nedot: "\u2250\u0338", NegativeMediumSpace: "\u200B", NegativeThickSpace: "\u200B", NegativeThinSpace: "\u200B", NegativeVeryThinSpace: "\u200B", nequiv: "\u2262", nesear: "\u2928", nesim: "\u2242\u0338", NestedGreaterGreater: "\u226B", NestedLessLess: "\u226A", NewLine: `
- `, nexist: "\u2204", nexists: "\u2204", Nfr: "\u{1D511}", nfr: "\u{1D52B}", ngE: "\u2267\u0338", nge: "\u2271", ngeq: "\u2271", ngeqq: "\u2267\u0338", ngeqslant: "\u2A7E\u0338", nges: "\u2A7E\u0338", nGg: "\u22D9\u0338", ngsim: "\u2275", nGt: "\u226B\u20D2", ngt: "\u226F", ngtr: "\u226F", nGtv: "\u226B\u0338", nharr: "\u21AE", nhArr: "\u21CE", nhpar: "\u2AF2", ni: "\u220B", nis: "\u22FC", nisd: "\u22FA", niv: "\u220B", NJcy: "\u040A", njcy: "\u045A", nlarr: "\u219A", nlArr: "\u21CD", nldr: "\u2025", nlE: "\u2266\u0338", nle: "\u2270", nleftarrow: "\u219A", nLeftarrow: "\u21CD", nleftrightarrow: "\u21AE", nLeftrightarrow: "\u21CE", nleq: "\u2270", nleqq: "\u2266\u0338", nleqslant: "\u2A7D\u0338", nles: "\u2A7D\u0338", nless: "\u226E", nLl: "\u22D8\u0338", nlsim: "\u2274", nLt: "\u226A\u20D2", nlt: "\u226E", nltri: "\u22EA", nltrie: "\u22EC", nLtv: "\u226A\u0338", nmid: "\u2224", NoBreak: "\u2060", NonBreakingSpace: "\xA0", nopf: "\u{1D55F}", Nopf: "\u2115", Not: "\u2AEC", not: "\xAC", NotCongruent: "\u2262", NotCupCap: "\u226D", NotDoubleVerticalBar: "\u2226", NotElement: "\u2209", NotEqual: "\u2260", NotEqualTilde: "\u2242\u0338", NotExists: "\u2204", NotGreater: "\u226F", NotGreaterEqual: "\u2271", NotGreaterFullEqual: "\u2267\u0338", NotGreaterGreater: "\u226B\u0338", NotGreaterLess: "\u2279", NotGreaterSlantEqual: "\u2A7E\u0338", NotGreaterTilde: "\u2275", NotHumpDownHump: "\u224E\u0338", NotHumpEqual: "\u224F\u0338", notin: "\u2209", notindot: "\u22F5\u0338", notinE: "\u22F9\u0338", notinva: "\u2209", notinvb: "\u22F7", notinvc: "\u22F6", NotLeftTriangleBar: "\u29CF\u0338", NotLeftTriangle: "\u22EA", NotLeftTriangleEqual: "\u22EC", NotLess: "\u226E", NotLessEqual: "\u2270", NotLessGreater: "\u2278", NotLessLess: "\u226A\u0338", NotLessSlantEqual: "\u2A7D\u0338", NotLessTilde: "\u2274", NotNestedGreaterGreater: "\u2AA2\u0338", NotNestedLessLess: "\u2AA1\u0338", notni: "\u220C", notniva: "\u220C", notnivb: "\u22FE", notnivc: "\u22FD", NotPrecedes: "\u2280", NotPrecedesEqual: "\u2AAF\u0338", NotPrecedesSlantEqual: "\u22E0", NotReverseElement: "\u220C", NotRightTriangleBar: "\u29D0\u0338", NotRightTriangle: "\u22EB", NotRightTriangleEqual: "\u22ED", NotSquareSubset: "\u228F\u0338", NotSquareSubsetEqual: "\u22E2", NotSquareSuperset: "\u2290\u0338", NotSquareSupersetEqual: "\u22E3", NotSubset: "\u2282\u20D2", NotSubsetEqual: "\u2288", NotSucceeds: "\u2281", NotSucceedsEqual: "\u2AB0\u0338", NotSucceedsSlantEqual: "\u22E1", NotSucceedsTilde: "\u227F\u0338", NotSuperset: "\u2283\u20D2", NotSupersetEqual: "\u2289", NotTilde: "\u2241", NotTildeEqual: "\u2244", NotTildeFullEqual: "\u2247", NotTildeTilde: "\u2249", NotVerticalBar: "\u2224", nparallel: "\u2226", npar: "\u2226", nparsl: "\u2AFD\u20E5", npart: "\u2202\u0338", npolint: "\u2A14", npr: "\u2280", nprcue: "\u22E0", nprec: "\u2280", npreceq: "\u2AAF\u0338", npre: "\u2AAF\u0338", nrarrc: "\u2933\u0338", nrarr: "\u219B", nrArr: "\u21CF", nrarrw: "\u219D\u0338", nrightarrow: "\u219B", nRightarrow: "\u21CF", nrtri: "\u22EB", nrtrie: "\u22ED", nsc: "\u2281", nsccue: "\u22E1", nsce: "\u2AB0\u0338", Nscr: "\u{1D4A9}", nscr: "\u{1D4C3}", nshortmid: "\u2224", nshortparallel: "\u2226", nsim: "\u2241", nsime: "\u2244", nsimeq: "\u2244", nsmid: "\u2224", nspar: "\u2226", nsqsube: "\u22E2", nsqsupe: "\u22E3", nsub: "\u2284", nsubE: "\u2AC5\u0338", nsube: "\u2288", nsubset: "\u2282\u20D2", nsubseteq: "\u2288", nsubseteqq: "\u2AC5\u0338", nsucc: "\u2281", nsucceq: "\u2AB0\u0338", nsup: "\u2285", nsupE: "\u2AC6\u0338", nsupe: "\u2289", nsupset: "\u2283\u20D2", nsupseteq: "\u2289", nsupseteqq: "\u2AC6\u0338", ntgl: "\u2279", Ntilde: "\xD1", ntilde: "\xF1", ntlg: "\u2278", ntriangleleft: "\u22EA", ntrianglelefteq: "\u22EC", ntriangleright: "\u22EB", ntrianglerighteq: "\u22ED", Nu: "\u039D", nu: "\u03BD", num: "#", numero: "\u2116", numsp: "\u2007", nvap: "\u224D\u20D2", nvdash: "\u22AC", nvDash: "\u22AD", nVdash: "\u22AE", nVDash: "\u22AF", nvge: "\u2265\u20D2", nvgt: ">\u20D2", nvHarr: "\u2904", nvinfin: "\u29DE", nvlArr: "\u2902", nvle: "\u2264\u20D2", nvlt: "<\u20D2", nvltrie: "\u22B4\u20D2", nvrArr: "\u2903", nvrtrie: "\u22B5\u20D2", nvsim: "\u223C\u20D2", nwarhk: "\u2923", nwarr: "\u2196", nwArr: "\u21D6", nwarrow: "\u2196", nwnear: "\u2927", Oacute: "\xD3", oacute: "\xF3", oast: "\u229B", Ocirc: "\xD4", ocirc: "\xF4", ocir: "\u229A", Ocy: "\u041E", ocy: "\u043E", odash: "\u229D", Odblac: "\u0150", odblac: "\u0151", odiv: "\u2A38", odot: "\u2299", odsold: "\u29BC", OElig: "\u0152", oelig: "\u0153", ofcir: "\u29BF", Ofr: "\u{1D512}", ofr: "\u{1D52C}", ogon: "\u02DB", Ograve: "\xD2", ograve: "\xF2", ogt: "\u29C1", ohbar: "\u29B5", ohm: "\u03A9", oint: "\u222E", olarr: "\u21BA", olcir: "\u29BE", olcross: "\u29BB", oline: "\u203E", olt: "\u29C0", Omacr: "\u014C", omacr: "\u014D", Omega: "\u03A9", omega: "\u03C9", Omicron: "\u039F", omicron: "\u03BF", omid: "\u29B6", ominus: "\u2296", Oopf: "\u{1D546}", oopf: "\u{1D560}", opar: "\u29B7", OpenCurlyDoubleQuote: "\u201C", OpenCurlyQuote: "\u2018", operp: "\u29B9", oplus: "\u2295", orarr: "\u21BB", Or: "\u2A54", or: "\u2228", ord: "\u2A5D", order: "\u2134", orderof: "\u2134", ordf: "\xAA", ordm: "\xBA", origof: "\u22B6", oror: "\u2A56", orslope: "\u2A57", orv: "\u2A5B", oS: "\u24C8", Oscr: "\u{1D4AA}", oscr: "\u2134", Oslash: "\xD8", oslash: "\xF8", osol: "\u2298", Otilde: "\xD5", otilde: "\xF5", otimesas: "\u2A36", Otimes: "\u2A37", otimes: "\u2297", Ouml: "\xD6", ouml: "\xF6", ovbar: "\u233D", OverBar: "\u203E", OverBrace: "\u23DE", OverBracket: "\u23B4", OverParenthesis: "\u23DC", para: "\xB6", parallel: "\u2225", par: "\u2225", parsim: "\u2AF3", parsl: "\u2AFD", part: "\u2202", PartialD: "\u2202", Pcy: "\u041F", pcy: "\u043F", percnt: "%", period: ".", permil: "\u2030", perp: "\u22A5", pertenk: "\u2031", Pfr: "\u{1D513}", pfr: "\u{1D52D}", Phi: "\u03A6", phi: "\u03C6", phiv: "\u03D5", phmmat: "\u2133", phone: "\u260E", Pi: "\u03A0", pi: "\u03C0", pitchfork: "\u22D4", piv: "\u03D6", planck: "\u210F", planckh: "\u210E", plankv: "\u210F", plusacir: "\u2A23", plusb: "\u229E", pluscir: "\u2A22", plus: "+", plusdo: "\u2214", plusdu: "\u2A25", pluse: "\u2A72", PlusMinus: "\xB1", plusmn: "\xB1", plussim: "\u2A26", plustwo: "\u2A27", pm: "\xB1", Poincareplane: "\u210C", pointint: "\u2A15", popf: "\u{1D561}", Popf: "\u2119", pound: "\xA3", prap: "\u2AB7", Pr: "\u2ABB", pr: "\u227A", prcue: "\u227C", precapprox: "\u2AB7", prec: "\u227A", preccurlyeq: "\u227C", Precedes: "\u227A", PrecedesEqual: "\u2AAF", PrecedesSlantEqual: "\u227C", PrecedesTilde: "\u227E", preceq: "\u2AAF", precnapprox: "\u2AB9", precneqq: "\u2AB5", precnsim: "\u22E8", pre: "\u2AAF", prE: "\u2AB3", precsim: "\u227E", prime: "\u2032", Prime: "\u2033", primes: "\u2119", prnap: "\u2AB9", prnE: "\u2AB5", prnsim: "\u22E8", prod: "\u220F", Product: "\u220F", profalar: "\u232E", profline: "\u2312", profsurf: "\u2313", prop: "\u221D", Proportional: "\u221D", Proportion: "\u2237", propto: "\u221D", prsim: "\u227E", prurel: "\u22B0", Pscr: "\u{1D4AB}", pscr: "\u{1D4C5}", Psi: "\u03A8", psi: "\u03C8", puncsp: "\u2008", Qfr: "\u{1D514}", qfr: "\u{1D52E}", qint: "\u2A0C", qopf: "\u{1D562}", Qopf: "\u211A", qprime: "\u2057", Qscr: "\u{1D4AC}", qscr: "\u{1D4C6}", quaternions: "\u210D", quatint: "\u2A16", quest: "?", questeq: "\u225F", quot: '"', QUOT: '"', rAarr: "\u21DB", race: "\u223D\u0331", Racute: "\u0154", racute: "\u0155", radic: "\u221A", raemptyv: "\u29B3", rang: "\u27E9", Rang: "\u27EB", rangd: "\u2992", range: "\u29A5", rangle: "\u27E9", raquo: "\xBB", rarrap: "\u2975", rarrb: "\u21E5", rarrbfs: "\u2920", rarrc: "\u2933", rarr: "\u2192", Rarr: "\u21A0", rArr: "\u21D2", rarrfs: "\u291E", rarrhk: "\u21AA", rarrlp: "\u21AC", rarrpl: "\u2945", rarrsim: "\u2974", Rarrtl: "\u2916", rarrtl: "\u21A3", rarrw: "\u219D", ratail: "\u291A", rAtail: "\u291C", ratio: "\u2236", rationals: "\u211A", rbarr: "\u290D", rBarr: "\u290F", RBarr: "\u2910", rbbrk: "\u2773", rbrace: "}", rbrack: "]", rbrke: "\u298C", rbrksld: "\u298E", rbrkslu: "\u2990", Rcaron: "\u0158", rcaron: "\u0159", Rcedil: "\u0156", rcedil: "\u0157", rceil: "\u2309", rcub: "}", Rcy: "\u0420", rcy: "\u0440", rdca: "\u2937", rdldhar: "\u2969", rdquo: "\u201D", rdquor: "\u201D", rdsh: "\u21B3", real: "\u211C", realine: "\u211B", realpart: "\u211C", reals: "\u211D", Re: "\u211C", rect: "\u25AD", reg: "\xAE", REG: "\xAE", ReverseElement: "\u220B", ReverseEquilibrium: "\u21CB", ReverseUpEquilibrium: "\u296F", rfisht: "\u297D", rfloor: "\u230B", rfr: "\u{1D52F}", Rfr: "\u211C", rHar: "\u2964", rhard: "\u21C1", rharu: "\u21C0", rharul: "\u296C", Rho: "\u03A1", rho: "\u03C1", rhov: "\u03F1", RightAngleBracket: "\u27E9", RightArrowBar: "\u21E5", rightarrow: "\u2192", RightArrow: "\u2192", Rightarrow: "\u21D2", RightArrowLeftArrow: "\u21C4", rightarrowtail: "\u21A3", RightCeiling: "\u2309", RightDoubleBracket: "\u27E7", RightDownTeeVector: "\u295D", RightDownVectorBar: "\u2955", RightDownVector: "\u21C2", RightFloor: "\u230B", rightharpoondown: "\u21C1", rightharpoonup: "\u21C0", rightleftarrows: "\u21C4", rightleftharpoons: "\u21CC", rightrightarrows: "\u21C9", rightsquigarrow: "\u219D", RightTeeArrow: "\u21A6", RightTee: "\u22A2", RightTeeVector: "\u295B", rightthreetimes: "\u22CC", RightTriangleBar: "\u29D0", RightTriangle: "\u22B3", RightTriangleEqual: "\u22B5", RightUpDownVector: "\u294F", RightUpTeeVector: "\u295C", RightUpVectorBar: "\u2954", RightUpVector: "\u21BE", RightVectorBar: "\u2953", RightVector: "\u21C0", ring: "\u02DA", risingdotseq: "\u2253", rlarr: "\u21C4", rlhar: "\u21CC", rlm: "\u200F", rmoustache: "\u23B1", rmoust: "\u23B1", rnmid: "\u2AEE", roang: "\u27ED", roarr: "\u21FE", robrk: "\u27E7", ropar: "\u2986", ropf: "\u{1D563}", Ropf: "\u211D", roplus: "\u2A2E", rotimes: "\u2A35", RoundImplies: "\u2970", rpar: ")", rpargt: "\u2994", rppolint: "\u2A12", rrarr: "\u21C9", Rrightarrow: "\u21DB", rsaquo: "\u203A", rscr: "\u{1D4C7}", Rscr: "\u211B", rsh: "\u21B1", Rsh: "\u21B1", rsqb: "]", rsquo: "\u2019", rsquor: "\u2019", rthree: "\u22CC", rtimes: "\u22CA", rtri: "\u25B9", rtrie: "\u22B5", rtrif: "\u25B8", rtriltri: "\u29CE", RuleDelayed: "\u29F4", ruluhar: "\u2968", rx: "\u211E", Sacute: "\u015A", sacute: "\u015B", sbquo: "\u201A", scap: "\u2AB8", Scaron: "\u0160", scaron: "\u0161", Sc: "\u2ABC", sc: "\u227B", sccue: "\u227D", sce: "\u2AB0", scE: "\u2AB4", Scedil: "\u015E", scedil: "\u015F", Scirc: "\u015C", scirc: "\u015D", scnap: "\u2ABA", scnE: "\u2AB6", scnsim: "\u22E9", scpolint: "\u2A13", scsim: "\u227F", Scy: "\u0421", scy: "\u0441", sdotb: "\u22A1", sdot: "\u22C5", sdote: "\u2A66", searhk: "\u2925", searr: "\u2198", seArr: "\u21D8", searrow: "\u2198", sect: "\xA7", semi: ";", seswar: "\u2929", setminus: "\u2216", setmn: "\u2216", sext: "\u2736", Sfr: "\u{1D516}", sfr: "\u{1D530}", sfrown: "\u2322", sharp: "\u266F", SHCHcy: "\u0429", shchcy: "\u0449", SHcy: "\u0428", shcy: "\u0448", ShortDownArrow: "\u2193", ShortLeftArrow: "\u2190", shortmid: "\u2223", shortparallel: "\u2225", ShortRightArrow: "\u2192", ShortUpArrow: "\u2191", shy: "\xAD", Sigma: "\u03A3", sigma: "\u03C3", sigmaf: "\u03C2", sigmav: "\u03C2", sim: "\u223C", simdot: "\u2A6A", sime: "\u2243", simeq: "\u2243", simg: "\u2A9E", simgE: "\u2AA0", siml: "\u2A9D", simlE: "\u2A9F", simne: "\u2246", simplus: "\u2A24", simrarr: "\u2972", slarr: "\u2190", SmallCircle: "\u2218", smallsetminus: "\u2216", smashp: "\u2A33", smeparsl: "\u29E4", smid: "\u2223", smile: "\u2323", smt: "\u2AAA", smte: "\u2AAC", smtes: "\u2AAC\uFE00", SOFTcy: "\u042C", softcy: "\u044C", solbar: "\u233F", solb: "\u29C4", sol: "/", Sopf: "\u{1D54A}", sopf: "\u{1D564}", spades: "\u2660", spadesuit: "\u2660", spar: "\u2225", sqcap: "\u2293", sqcaps: "\u2293\uFE00", sqcup: "\u2294", sqcups: "\u2294\uFE00", Sqrt: "\u221A", sqsub: "\u228F", sqsube: "\u2291", sqsubset: "\u228F", sqsubseteq: "\u2291", sqsup: "\u2290", sqsupe: "\u2292", sqsupset: "\u2290", sqsupseteq: "\u2292", square: "\u25A1", Square: "\u25A1", SquareIntersection: "\u2293", SquareSubset: "\u228F", SquareSubsetEqual: "\u2291", SquareSuperset: "\u2290", SquareSupersetEqual: "\u2292", SquareUnion: "\u2294", squarf: "\u25AA", squ: "\u25A1", squf: "\u25AA", srarr: "\u2192", Sscr: "\u{1D4AE}", sscr: "\u{1D4C8}", ssetmn: "\u2216", ssmile: "\u2323", sstarf: "\u22C6", Star: "\u22C6", star: "\u2606", starf: "\u2605", straightepsilon: "\u03F5", straightphi: "\u03D5", strns: "\xAF", sub: "\u2282", Sub: "\u22D0", subdot: "\u2ABD", subE: "\u2AC5", sube: "\u2286", subedot: "\u2AC3", submult: "\u2AC1", subnE: "\u2ACB", subne: "\u228A", subplus: "\u2ABF", subrarr: "\u2979", subset: "\u2282", Subset: "\u22D0", subseteq: "\u2286", subseteqq: "\u2AC5", SubsetEqual: "\u2286", subsetneq: "\u228A", subsetneqq: "\u2ACB", subsim: "\u2AC7", subsub: "\u2AD5", subsup: "\u2AD3", succapprox: "\u2AB8", succ: "\u227B", succcurlyeq: "\u227D", Succeeds: "\u227B", SucceedsEqual: "\u2AB0", SucceedsSlantEqual: "\u227D", SucceedsTilde: "\u227F", succeq: "\u2AB0", succnapprox: "\u2ABA", succneqq: "\u2AB6", succnsim: "\u22E9", succsim: "\u227F", SuchThat: "\u220B", sum: "\u2211", Sum: "\u2211", sung: "\u266A", sup1: "\xB9", sup2: "\xB2", sup3: "\xB3", sup: "\u2283", Sup: "\u22D1", supdot: "\u2ABE", supdsub: "\u2AD8", supE: "\u2AC6", supe: "\u2287", supedot: "\u2AC4", Superset: "\u2283", SupersetEqual: "\u2287", suphsol: "\u27C9", suphsub: "\u2AD7", suplarr: "\u297B", supmult: "\u2AC2", supnE: "\u2ACC", supne: "\u228B", supplus: "\u2AC0", supset: "\u2283", Supset: "\u22D1", supseteq: "\u2287", supseteqq: "\u2AC6", supsetneq: "\u228B", supsetneqq: "\u2ACC", supsim: "\u2AC8", supsub: "\u2AD4", supsup: "\u2AD6", swarhk: "\u2926", swarr: "\u2199", swArr: "\u21D9", swarrow: "\u2199", swnwar: "\u292A", szlig: "\xDF", Tab: " ", target: "\u2316", Tau: "\u03A4", tau: "\u03C4", tbrk: "\u23B4", Tcaron: "\u0164", tcaron: "\u0165", Tcedil: "\u0162", tcedil: "\u0163", Tcy: "\u0422", tcy: "\u0442", tdot: "\u20DB", telrec: "\u2315", Tfr: "\u{1D517}", tfr: "\u{1D531}", there4: "\u2234", therefore: "\u2234", Therefore: "\u2234", Theta: "\u0398", theta: "\u03B8", thetasym: "\u03D1", thetav: "\u03D1", thickapprox: "\u2248", thicksim: "\u223C", ThickSpace: "\u205F\u200A", ThinSpace: "\u2009", thinsp: "\u2009", thkap: "\u2248", thksim: "\u223C", THORN: "\xDE", thorn: "\xFE", tilde: "\u02DC", Tilde: "\u223C", TildeEqual: "\u2243", TildeFullEqual: "\u2245", TildeTilde: "\u2248", timesbar: "\u2A31", timesb: "\u22A0", times: "\xD7", timesd: "\u2A30", tint: "\u222D", toea: "\u2928", topbot: "\u2336", topcir: "\u2AF1", top: "\u22A4", Topf: "\u{1D54B}", topf: "\u{1D565}", topfork: "\u2ADA", tosa: "\u2929", tprime: "\u2034", trade: "\u2122", TRADE: "\u2122", triangle: "\u25B5", triangledown: "\u25BF", triangleleft: "\u25C3", trianglelefteq: "\u22B4", triangleq: "\u225C", triangleright: "\u25B9", trianglerighteq: "\u22B5", tridot: "\u25EC", trie: "\u225C", triminus: "\u2A3A", TripleDot: "\u20DB", triplus: "\u2A39", trisb: "\u29CD", tritime: "\u2A3B", trpezium: "\u23E2", Tscr: "\u{1D4AF}", tscr: "\u{1D4C9}", TScy: "\u0426", tscy: "\u0446", TSHcy: "\u040B", tshcy: "\u045B", Tstrok: "\u0166", tstrok: "\u0167", twixt: "\u226C", twoheadleftarrow: "\u219E", twoheadrightarrow: "\u21A0", Uacute: "\xDA", uacute: "\xFA", uarr: "\u2191", Uarr: "\u219F", uArr: "\u21D1", Uarrocir: "\u2949", Ubrcy: "\u040E", ubrcy: "\u045E", Ubreve: "\u016C", ubreve: "\u016D", Ucirc: "\xDB", ucirc: "\xFB", Ucy: "\u0423", ucy: "\u0443", udarr: "\u21C5", Udblac: "\u0170", udblac: "\u0171", udhar: "\u296E", ufisht: "\u297E", Ufr: "\u{1D518}", ufr: "\u{1D532}", Ugrave: "\xD9", ugrave: "\xF9", uHar: "\u2963", uharl: "\u21BF", uharr: "\u21BE", uhblk: "\u2580", ulcorn: "\u231C", ulcorner: "\u231C", ulcrop: "\u230F", ultri: "\u25F8", Umacr: "\u016A", umacr: "\u016B", uml: "\xA8", UnderBar: "_", UnderBrace: "\u23DF", UnderBracket: "\u23B5", UnderParenthesis: "\u23DD", Union: "\u22C3", UnionPlus: "\u228E", Uogon: "\u0172", uogon: "\u0173", Uopf: "\u{1D54C}", uopf: "\u{1D566}", UpArrowBar: "\u2912", uparrow: "\u2191", UpArrow: "\u2191", Uparrow: "\u21D1", UpArrowDownArrow: "\u21C5", updownarrow: "\u2195", UpDownArrow: "\u2195", Updownarrow: "\u21D5", UpEquilibrium: "\u296E", upharpoonleft: "\u21BF", upharpoonright: "\u21BE", uplus: "\u228E", UpperLeftArrow: "\u2196", UpperRightArrow: "\u2197", upsi: "\u03C5", Upsi: "\u03D2", upsih: "\u03D2", Upsilon: "\u03A5", upsilon: "\u03C5", UpTeeArrow: "\u21A5", UpTee: "\u22A5", upuparrows: "\u21C8", urcorn: "\u231D", urcorner: "\u231D", urcrop: "\u230E", Uring: "\u016E", uring: "\u016F", urtri: "\u25F9", Uscr: "\u{1D4B0}", uscr: "\u{1D4CA}", utdot: "\u22F0", Utilde: "\u0168", utilde: "\u0169", utri: "\u25B5", utrif: "\u25B4", uuarr: "\u21C8", Uuml: "\xDC", uuml: "\xFC", uwangle: "\u29A7", vangrt: "\u299C", varepsilon: "\u03F5", varkappa: "\u03F0", varnothing: "\u2205", varphi: "\u03D5", varpi: "\u03D6", varpropto: "\u221D", varr: "\u2195", vArr: "\u21D5", varrho: "\u03F1", varsigma: "\u03C2", varsubsetneq: "\u228A\uFE00", varsubsetneqq: "\u2ACB\uFE00", varsupsetneq: "\u228B\uFE00", varsupsetneqq: "\u2ACC\uFE00", vartheta: "\u03D1", vartriangleleft: "\u22B2", vartriangleright: "\u22B3", vBar: "\u2AE8", Vbar: "\u2AEB", vBarv: "\u2AE9", Vcy: "\u0412", vcy: "\u0432", vdash: "\u22A2", vDash: "\u22A8", Vdash: "\u22A9", VDash: "\u22AB", Vdashl: "\u2AE6", veebar: "\u22BB", vee: "\u2228", Vee: "\u22C1", veeeq: "\u225A", vellip: "\u22EE", verbar: "|", Verbar: "\u2016", vert: "|", Vert: "\u2016", VerticalBar: "\u2223", VerticalLine: "|", VerticalSeparator: "\u2758", VerticalTilde: "\u2240", VeryThinSpace: "\u200A", Vfr: "\u{1D519}", vfr: "\u{1D533}", vltri: "\u22B2", vnsub: "\u2282\u20D2", vnsup: "\u2283\u20D2", Vopf: "\u{1D54D}", vopf: "\u{1D567}", vprop: "\u221D", vrtri: "\u22B3", Vscr: "\u{1D4B1}", vscr: "\u{1D4CB}", vsubnE: "\u2ACB\uFE00", vsubne: "\u228A\uFE00", vsupnE: "\u2ACC\uFE00", vsupne: "\u228B\uFE00", Vvdash: "\u22AA", vzigzag: "\u299A", Wcirc: "\u0174", wcirc: "\u0175", wedbar: "\u2A5F", wedge: "\u2227", Wedge: "\u22C0", wedgeq: "\u2259", weierp: "\u2118", Wfr: "\u{1D51A}", wfr: "\u{1D534}", Wopf: "\u{1D54E}", wopf: "\u{1D568}", wp: "\u2118", wr: "\u2240", wreath: "\u2240", Wscr: "\u{1D4B2}", wscr: "\u{1D4CC}", xcap: "\u22C2", xcirc: "\u25EF", xcup: "\u22C3", xdtri: "\u25BD", Xfr: "\u{1D51B}", xfr: "\u{1D535}", xharr: "\u27F7", xhArr: "\u27FA", Xi: "\u039E", xi: "\u03BE", xlarr: "\u27F5", xlArr: "\u27F8", xmap: "\u27FC", xnis: "\u22FB", xodot: "\u2A00", Xopf: "\u{1D54F}", xopf: "\u{1D569}", xoplus: "\u2A01", xotime: "\u2A02", xrarr: "\u27F6", xrArr: "\u27F9", Xscr: "\u{1D4B3}", xscr: "\u{1D4CD}", xsqcup: "\u2A06", xuplus: "\u2A04", xutri: "\u25B3", xvee: "\u22C1", xwedge: "\u22C0", Yacute: "\xDD", yacute: "\xFD", YAcy: "\u042F", yacy: "\u044F", Ycirc: "\u0176", ycirc: "\u0177", Ycy: "\u042B", ycy: "\u044B", yen: "\xA5", Yfr: "\u{1D51C}", yfr: "\u{1D536}", YIcy: "\u0407", yicy: "\u0457", Yopf: "\u{1D550}", yopf: "\u{1D56A}", Yscr: "\u{1D4B4}", yscr: "\u{1D4CE}", YUcy: "\u042E", yucy: "\u044E", yuml: "\xFF", Yuml: "\u0178", Zacute: "\u0179", zacute: "\u017A", Zcaron: "\u017D", zcaron: "\u017E", Zcy: "\u0417", zcy: "\u0437", Zdot: "\u017B", zdot: "\u017C", zeetrf: "\u2128", ZeroWidthSpace: "\u200B", Zeta: "\u0396", zeta: "\u03B6", zfr: "\u{1D537}", Zfr: "\u2128", ZHcy: "\u0416", zhcy: "\u0436", zigrarr: "\u21DD", zopf: "\u{1D56B}", Zopf: "\u2124", Zscr: "\u{1D4B5}", zscr: "\u{1D4CF}", zwj: "\u200D", zwnj: "\u200C" };
- }
- });
-
- // ../../node_modules/entities/lib/maps/legacy.json
- var require_legacy = __commonJS({
- "../../node_modules/entities/lib/maps/legacy.json"(exports, module2) {
- module2.exports = { Aacute: "\xC1", aacute: "\xE1", Acirc: "\xC2", acirc: "\xE2", acute: "\xB4", AElig: "\xC6", aelig: "\xE6", Agrave: "\xC0", agrave: "\xE0", amp: "&", AMP: "&", Aring: "\xC5", aring: "\xE5", Atilde: "\xC3", atilde: "\xE3", Auml: "\xC4", auml: "\xE4", brvbar: "\xA6", Ccedil: "\xC7", ccedil: "\xE7", cedil: "\xB8", cent: "\xA2", copy: "\xA9", COPY: "\xA9", curren: "\xA4", deg: "\xB0", divide: "\xF7", Eacute: "\xC9", eacute: "\xE9", Ecirc: "\xCA", ecirc: "\xEA", Egrave: "\xC8", egrave: "\xE8", ETH: "\xD0", eth: "\xF0", Euml: "\xCB", euml: "\xEB", frac12: "\xBD", frac14: "\xBC", frac34: "\xBE", gt: ">", GT: ">", Iacute: "\xCD", iacute: "\xED", Icirc: "\xCE", icirc: "\xEE", iexcl: "\xA1", Igrave: "\xCC", igrave: "\xEC", iquest: "\xBF", Iuml: "\xCF", iuml: "\xEF", laquo: "\xAB", lt: "<", LT: "<", macr: "\xAF", micro: "\xB5", middot: "\xB7", nbsp: "\xA0", not: "\xAC", Ntilde: "\xD1", ntilde: "\xF1", Oacute: "\xD3", oacute: "\xF3", Ocirc: "\xD4", ocirc: "\xF4", Ograve: "\xD2", ograve: "\xF2", ordf: "\xAA", ordm: "\xBA", Oslash: "\xD8", oslash: "\xF8", Otilde: "\xD5", otilde: "\xF5", Ouml: "\xD6", ouml: "\xF6", para: "\xB6", plusmn: "\xB1", pound: "\xA3", quot: '"', QUOT: '"', raquo: "\xBB", reg: "\xAE", REG: "\xAE", sect: "\xA7", shy: "\xAD", sup1: "\xB9", sup2: "\xB2", sup3: "\xB3", szlig: "\xDF", THORN: "\xDE", thorn: "\xFE", times: "\xD7", Uacute: "\xDA", uacute: "\xFA", Ucirc: "\xDB", ucirc: "\xFB", Ugrave: "\xD9", ugrave: "\xF9", uml: "\xA8", Uuml: "\xDC", uuml: "\xFC", Yacute: "\xDD", yacute: "\xFD", yen: "\xA5", yuml: "\xFF" };
- }
- });
-
- // ../../node_modules/entities/lib/maps/xml.json
- var require_xml2 = __commonJS({
- "../../node_modules/entities/lib/maps/xml.json"(exports, module2) {
- module2.exports = { amp: "&", apos: "'", gt: ">", lt: "<", quot: '"' };
- }
- });
-
- // ../../node_modules/entities/lib/maps/decode.json
- var require_decode = __commonJS({
- "../../node_modules/entities/lib/maps/decode.json"(exports, module2) {
- module2.exports = { "0": 65533, "128": 8364, "130": 8218, "131": 402, "132": 8222, "133": 8230, "134": 8224, "135": 8225, "136": 710, "137": 8240, "138": 352, "139": 8249, "140": 338, "142": 381, "145": 8216, "146": 8217, "147": 8220, "148": 8221, "149": 8226, "150": 8211, "151": 8212, "152": 732, "153": 8482, "154": 353, "155": 8250, "156": 339, "158": 382, "159": 376 };
- }
- });
-
- // ../../node_modules/entities/lib/decode_codepoint.js
- var require_decode_codepoint = __commonJS({
- "../../node_modules/entities/lib/decode_codepoint.js"(exports) {
- "use strict";
- var __importDefault = exports && exports.__importDefault || function(mod) {
- return mod && mod.__esModule ? mod : { default: mod };
- };
- Object.defineProperty(exports, "__esModule", { value: !0 });
- var decode_json_1 = __importDefault(require_decode()), fromCodePoint3 = (
- // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
- String.fromCodePoint || function(codePoint) {
- var output = "";
- return codePoint > 65535 && (codePoint -= 65536, output += String.fromCharCode(codePoint >>> 10 & 1023 | 55296), codePoint = 56320 | codePoint & 1023), output += String.fromCharCode(codePoint), output;
- }
- );
- function decodeCodePoint(codePoint) {
- return codePoint >= 55296 && codePoint <= 57343 || codePoint > 1114111 ? "\uFFFD" : (codePoint in decode_json_1.default && (codePoint = decode_json_1.default[codePoint]), fromCodePoint3(codePoint));
- }
- exports.default = decodeCodePoint;
- }
- });
-
- // ../../node_modules/entities/lib/decode.js
- var require_decode2 = __commonJS({
- "../../node_modules/entities/lib/decode.js"(exports) {
- "use strict";
- var __importDefault = exports && exports.__importDefault || function(mod) {
- return mod && mod.__esModule ? mod : { default: mod };
- };
- Object.defineProperty(exports, "__esModule", { value: !0 });
- exports.decodeHTML = exports.decodeHTMLStrict = exports.decodeXML = void 0;
- var entities_json_1 = __importDefault(require_entities()), legacy_json_1 = __importDefault(require_legacy()), xml_json_1 = __importDefault(require_xml2()), decode_codepoint_1 = __importDefault(require_decode_codepoint()), strictEntityRe = /&(?:[a-zA-Z0-9]+|#[xX][\da-fA-F]+|#\d+);/g;
- exports.decodeXML = getStrictDecoder(xml_json_1.default);
- exports.decodeHTMLStrict = getStrictDecoder(entities_json_1.default);
- function getStrictDecoder(map2) {
- var replace2 = getReplacer(map2);
- return function(str2) {
- return String(str2).replace(strictEntityRe, replace2);
- };
- }
- var sorter = function(a3, b) {
- return a3 < b ? 1 : -1;
- };
- exports.decodeHTML = (function() {
- for (var legacy = Object.keys(legacy_json_1.default).sort(sorter), keys3 = Object.keys(entities_json_1.default).sort(sorter), i = 0, j = 0; i < keys3.length; i++)
- legacy[j] === keys3[i] ? (keys3[i] += ";?", j++) : keys3[i] += ";";
- var re = new RegExp("&(?:" + keys3.join("|") + "|#[xX][\\da-fA-F]+;?|#\\d+;?)", "g"), replace2 = getReplacer(entities_json_1.default);
- function replacer3(str2) {
- return str2.substr(-1) !== ";" && (str2 += ";"), replace2(str2);
- }
- return function(str2) {
- return String(str2).replace(re, replacer3);
- };
- })();
- function getReplacer(map2) {
- return function(str2) {
- if (str2.charAt(1) === "#") {
- var secondChar = str2.charAt(2);
- return secondChar === "X" || secondChar === "x" ? decode_codepoint_1.default(parseInt(str2.substr(3), 16)) : decode_codepoint_1.default(parseInt(str2.substr(2), 10));
- }
- return map2[str2.slice(1, -1)] || str2;
- };
- }
- }
- });
-
- // ../../node_modules/entities/lib/encode.js
- var require_encode = __commonJS({
- "../../node_modules/entities/lib/encode.js"(exports) {
- "use strict";
- var __importDefault = exports && exports.__importDefault || function(mod) {
- return mod && mod.__esModule ? mod : { default: mod };
- };
- Object.defineProperty(exports, "__esModule", { value: !0 });
- exports.escapeUTF8 = exports.escape = exports.encodeNonAsciiHTML = exports.encodeHTML = exports.encodeXML = void 0;
- var xml_json_1 = __importDefault(require_xml2()), inverseXML = getInverseObj(xml_json_1.default), xmlReplacer = getInverseReplacer(inverseXML);
- exports.encodeXML = getASCIIEncoder(inverseXML);
- var entities_json_1 = __importDefault(require_entities()), inverseHTML = getInverseObj(entities_json_1.default), htmlReplacer = getInverseReplacer(inverseHTML);
- exports.encodeHTML = getInverse(inverseHTML, htmlReplacer);
- exports.encodeNonAsciiHTML = getASCIIEncoder(inverseHTML);
- function getInverseObj(obj) {
- return Object.keys(obj).sort().reduce(function(inverse, name) {
- return inverse[obj[name]] = "&" + name + ";", inverse;
- }, {});
- }
- function getInverseReplacer(inverse) {
- for (var single = [], multiple = [], _i = 0, _a4 = Object.keys(inverse); _i < _a4.length; _i++) {
- var k = _a4[_i];
- k.length === 1 ? single.push("\\" + k) : multiple.push(k);
- }
- single.sort();
- for (var start2 = 0; start2 < single.length - 1; start2++) {
- for (var end2 = start2; end2 < single.length - 1 && single[end2].charCodeAt(1) + 1 === single[end2 + 1].charCodeAt(1); )
- end2 += 1;
- var count = 1 + end2 - start2;
- count < 3 || single.splice(start2, count, single[start2] + "-" + single[end2]);
- }
- return multiple.unshift("[" + single.join("") + "]"), new RegExp(multiple.join("|"), "g");
- }
- var reNonASCII = /(?:[\x80-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/g, getCodePoint = (
- // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
- String.prototype.codePointAt != null ? (
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- function(str2) {
- return str2.codePointAt(0);
- }
- ) : (
- // http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae
- function(c) {
- return (c.charCodeAt(0) - 55296) * 1024 + c.charCodeAt(1) - 56320 + 65536;
- }
- )
- );
- function singleCharReplacer(c) {
- return "&#x" + (c.length > 1 ? getCodePoint(c) : c.charCodeAt(0)).toString(16).toUpperCase() + ";";
- }
- function getInverse(inverse, re) {
- return function(data) {
- return data.replace(re, function(name) {
- return inverse[name];
- }).replace(reNonASCII, singleCharReplacer);
- };
- }
- var reEscapeChars = new RegExp(xmlReplacer.source + "|" + reNonASCII.source, "g");
- function escape4(data) {
- return data.replace(reEscapeChars, singleCharReplacer);
- }
- exports.escape = escape4;
- function escapeUTF8(data) {
- return data.replace(xmlReplacer, singleCharReplacer);
- }
- exports.escapeUTF8 = escapeUTF8;
- function getASCIIEncoder(obj) {
- return function(data) {
- return data.replace(reEscapeChars, function(c) {
- return obj[c] || singleCharReplacer(c);
- });
- };
- }
- }
- });
-
- // ../../node_modules/entities/lib/index.js
- var require_lib = __commonJS({
- "../../node_modules/entities/lib/index.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", { value: !0 });
- exports.decodeXMLStrict = exports.decodeHTML5Strict = exports.decodeHTML4Strict = exports.decodeHTML5 = exports.decodeHTML4 = exports.decodeHTMLStrict = exports.decodeHTML = exports.decodeXML = exports.encodeHTML5 = exports.encodeHTML4 = exports.escapeUTF8 = exports.escape = exports.encodeNonAsciiHTML = exports.encodeHTML = exports.encodeXML = exports.encode = exports.decodeStrict = exports.decode = void 0;
- var decode_1 = require_decode2(), encode_1 = require_encode();
- function decode(data, level) {
- return (!level || level <= 0 ? decode_1.decodeXML : decode_1.decodeHTML)(data);
- }
- exports.decode = decode;
- function decodeStrict(data, level) {
- return (!level || level <= 0 ? decode_1.decodeXML : decode_1.decodeHTMLStrict)(data);
- }
- exports.decodeStrict = decodeStrict;
- function encode2(data, level) {
- return (!level || level <= 0 ? encode_1.encodeXML : encode_1.encodeHTML)(data);
- }
- exports.encode = encode2;
- var encode_2 = require_encode();
- Object.defineProperty(exports, "encodeXML", { enumerable: !0, get: function() {
- return encode_2.encodeXML;
- } });
- Object.defineProperty(exports, "encodeHTML", { enumerable: !0, get: function() {
- return encode_2.encodeHTML;
- } });
- Object.defineProperty(exports, "encodeNonAsciiHTML", { enumerable: !0, get: function() {
- return encode_2.encodeNonAsciiHTML;
- } });
- Object.defineProperty(exports, "escape", { enumerable: !0, get: function() {
- return encode_2.escape;
- } });
- Object.defineProperty(exports, "escapeUTF8", { enumerable: !0, get: function() {
- return encode_2.escapeUTF8;
- } });
- Object.defineProperty(exports, "encodeHTML4", { enumerable: !0, get: function() {
- return encode_2.encodeHTML;
- } });
- Object.defineProperty(exports, "encodeHTML5", { enumerable: !0, get: function() {
- return encode_2.encodeHTML;
- } });
- var decode_2 = require_decode2();
- Object.defineProperty(exports, "decodeXML", { enumerable: !0, get: function() {
- return decode_2.decodeXML;
- } });
- Object.defineProperty(exports, "decodeHTML", { enumerable: !0, get: function() {
- return decode_2.decodeHTML;
- } });
- Object.defineProperty(exports, "decodeHTMLStrict", { enumerable: !0, get: function() {
- return decode_2.decodeHTMLStrict;
- } });
- Object.defineProperty(exports, "decodeHTML4", { enumerable: !0, get: function() {
- return decode_2.decodeHTML;
- } });
- Object.defineProperty(exports, "decodeHTML5", { enumerable: !0, get: function() {
- return decode_2.decodeHTML;
- } });
- Object.defineProperty(exports, "decodeHTML4Strict", { enumerable: !0, get: function() {
- return decode_2.decodeHTMLStrict;
- } });
- Object.defineProperty(exports, "decodeHTML5Strict", { enumerable: !0, get: function() {
- return decode_2.decodeHTMLStrict;
- } });
- Object.defineProperty(exports, "decodeXMLStrict", { enumerable: !0, get: function() {
- return decode_2.decodeXML;
- } });
- }
- });
-
- // ../../node_modules/ansi-to-html/lib/ansi_to_html.js
- var require_ansi_to_html = __commonJS({
- "../../node_modules/ansi-to-html/lib/ansi_to_html.js"(exports, module2) {
- "use strict";
- function _classCallCheck3(instance, Constructor) {
- if (!(instance instanceof Constructor))
- throw new TypeError("Cannot call a class as a function");
- }
- function _defineProperties3(target, props) {
- for (var i = 0; i < props.length; i++) {
- var descriptor = props[i];
- descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0, "value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor);
- }
- }
- function _createClass3(Constructor, protoProps, staticProps) {
- return protoProps && _defineProperties3(Constructor.prototype, protoProps), staticProps && _defineProperties3(Constructor, staticProps), Constructor;
- }
- function _createForOfIteratorHelper(o, allowArrayLike) {
- var it = typeof Symbol < "u" && o[Symbol.iterator] || o["@@iterator"];
- if (!it) {
- if (Array.isArray(o) || (it = _unsupportedIterableToArray2(o)) || allowArrayLike && o && typeof o.length == "number") {
- it && (o = it);
- var i = 0, F = function() {
- };
- return { s: F, n: function() {
- return i >= o.length ? { done: !0 } : { done: !1, value: o[i++] };
- }, e: function(_e) {
- throw _e;
- }, f: F };
- }
- throw new TypeError(`Invalid attempt to iterate non-iterable instance.
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
- }
- var normalCompletion = !0, didErr = !1, err;
- return { s: function() {
- it = it.call(o);
- }, n: function() {
- var step2 = it.next();
- return normalCompletion = step2.done, step2;
- }, e: function(_e2) {
- didErr = !0, err = _e2;
- }, f: function() {
- try {
- !normalCompletion && it.return != null && it.return();
- } finally {
- if (didErr) throw err;
- }
- } };
- }
- function _unsupportedIterableToArray2(o, minLen) {
- if (o) {
- if (typeof o == "string") return _arrayLikeToArray2(o, minLen);
- var n = Object.prototype.toString.call(o).slice(8, -1);
- if (n === "Object" && o.constructor && (n = o.constructor.name), n === "Map" || n === "Set") return Array.from(o);
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray2(o, minLen);
- }
- }
- function _arrayLikeToArray2(arr, len) {
- (len == null || len > arr.length) && (len = arr.length);
- for (var i = 0, arr2 = new Array(len); i < len; i++)
- arr2[i] = arr[i];
- return arr2;
- }
- var entities = require_lib(), defaults = {
- fg: "#FFF",
- bg: "#000",
- newline: !1,
- escapeXML: !1,
- stream: !1,
- colors: getDefaultColors()
- };
- function getDefaultColors() {
- var colors3 = {
- 0: "#000",
- 1: "#A00",
- 2: "#0A0",
- 3: "#A50",
- 4: "#00A",
- 5: "#A0A",
- 6: "#0AA",
- 7: "#AAA",
- 8: "#555",
- 9: "#F55",
- 10: "#5F5",
- 11: "#FF5",
- 12: "#55F",
- 13: "#F5F",
- 14: "#5FF",
- 15: "#FFF"
- };
- return range(0, 5).forEach(function(red) {
- range(0, 5).forEach(function(green) {
- range(0, 5).forEach(function(blue) {
- return setStyleColor(red, green, blue, colors3);
- });
- });
- }), range(0, 23).forEach(function(gray) {
- var c = gray + 232, l = toHexString(gray * 10 + 8);
- colors3[c] = "#" + l + l + l;
- }), colors3;
- }
- function setStyleColor(red, green, blue, colors3) {
- var c = 16 + red * 36 + green * 6 + blue, r2 = red > 0 ? red * 40 + 55 : 0, g2 = green > 0 ? green * 40 + 55 : 0, b = blue > 0 ? blue * 40 + 55 : 0;
- colors3[c] = toColorHexString([r2, g2, b]);
- }
- function toHexString(num) {
- for (var str2 = num.toString(16); str2.length < 2; )
- str2 = "0" + str2;
- return str2;
- }
- function toColorHexString(ref) {
- var results = [], _iterator = _createForOfIteratorHelper(ref), _step;
- try {
- for (_iterator.s(); !(_step = _iterator.n()).done; ) {
- var r2 = _step.value;
- results.push(toHexString(r2));
- }
- } catch (err) {
- _iterator.e(err);
- } finally {
- _iterator.f();
- }
- return "#" + results.join("");
- }
- function generateOutput(stack, token2, data, options) {
- var result;
- return token2 === "text" ? result = pushText(data, options) : token2 === "display" ? result = handleDisplay(stack, data, options) : token2 === "xterm256Foreground" ? result = pushForegroundColor(stack, options.colors[data]) : token2 === "xterm256Background" ? result = pushBackgroundColor(stack, options.colors[data]) : token2 === "rgb" && (result = handleRgb(stack, data)), result;
- }
- function handleRgb(stack, data) {
- data = data.substring(2).slice(0, -1);
- var operation = +data.substr(0, 2), color2 = data.substring(5).split(";"), rgb2 = color2.map(function(value) {
- return ("0" + Number(value).toString(16)).substr(-2);
- }).join("");
- return pushStyle(stack, (operation === 38 ? "color:#" : "background-color:#") + rgb2);
- }
- function handleDisplay(stack, code, options) {
- code = parseInt(code, 10);
- var codeMap = {
- "-1": function() {
- return "<br/>";
- },
- 0: function() {
- return stack.length && resetStyles(stack);
- },
- 1: function() {
- return pushTag(stack, "b");
- },
- 3: function() {
- return pushTag(stack, "i");
- },
- 4: function() {
- return pushTag(stack, "u");
- },
- 8: function() {
- return pushStyle(stack, "display:none");
- },
- 9: function() {
- return pushTag(stack, "strike");
- },
- 22: function() {
- return pushStyle(stack, "font-weight:normal;text-decoration:none;font-style:normal");
- },
- 23: function() {
- return closeTag(stack, "i");
- },
- 24: function() {
- return closeTag(stack, "u");
- },
- 39: function() {
- return pushForegroundColor(stack, options.fg);
- },
- 49: function() {
- return pushBackgroundColor(stack, options.bg);
- },
- 53: function() {
- return pushStyle(stack, "text-decoration:overline");
- }
- }, result;
- return codeMap[code] ? result = codeMap[code]() : 4 < code && code < 7 ? result = pushTag(stack, "blink") : 29 < code && code < 38 ? result = pushForegroundColor(stack, options.colors[code - 30]) : 39 < code && code < 48 ? result = pushBackgroundColor(stack, options.colors[code - 40]) : 89 < code && code < 98 ? result = pushForegroundColor(stack, options.colors[8 + (code - 90)]) : 99 < code && code < 108 && (result = pushBackgroundColor(stack, options.colors[8 + (code - 100)])), result;
- }
- function resetStyles(stack) {
- var stackClone = stack.slice(0);
- return stack.length = 0, stackClone.reverse().map(function(tag) {
- return "</" + tag + ">";
- }).join("");
- }
- function range(low, high) {
- for (var results = [], j = low; j <= high; j++)
- results.push(j);
- return results;
- }
- function notCategory(category) {
- return function(e) {
- return (category === null || e.category !== category) && category !== "all";
- };
- }
- function categoryForCode(code) {
- code = parseInt(code, 10);
- var result = null;
- return code === 0 ? result = "all" : code === 1 ? result = "bold" : 2 < code && code < 5 ? result = "underline" : 4 < code && code < 7 ? result = "blink" : code === 8 ? result = "hide" : code === 9 ? result = "strike" : 29 < code && code < 38 || code === 39 || 89 < code && code < 98 ? result = "foreground-color" : (39 < code && code < 48 || code === 49 || 99 < code && code < 108) && (result = "background-color"), result;
- }
- function pushText(text, options) {
- return options.escapeXML ? entities.encodeXML(text) : text;
- }
- function pushTag(stack, tag, style) {
- return style || (style = ""), stack.push(tag), "<".concat(tag).concat(style ? ' style="'.concat(style, '"') : "", ">");
- }
- function pushStyle(stack, style) {
- return pushTag(stack, "span", style);
- }
- function pushForegroundColor(stack, color2) {
- return pushTag(stack, "span", "color:" + color2);
- }
- function pushBackgroundColor(stack, color2) {
- return pushTag(stack, "span", "background-color:" + color2);
- }
- function closeTag(stack, style) {
- var last2;
- if (stack.slice(-1)[0] === style && (last2 = stack.pop()), last2)
- return "</" + style + ">";
- }
- function tokenize2(text, options, callback) {
- var ansiMatch = !1, ansiHandler = 3;
- function remove2() {
- return "";
- }
- function removeXterm256Foreground(m3, g1) {
- return callback("xterm256Foreground", g1), "";
- }
- function removeXterm256Background(m3, g1) {
- return callback("xterm256Background", g1), "";
- }
- function newline(m3) {
- return options.newline ? callback("display", -1) : callback("text", m3), "";
- }
- function ansiMess(m3, g1) {
- ansiMatch = !0, g1.trim().length === 0 && (g1 = "0"), g1 = g1.trimRight(";").split(";");
- var _iterator2 = _createForOfIteratorHelper(g1), _step2;
- try {
- for (_iterator2.s(); !(_step2 = _iterator2.n()).done; ) {
- var g2 = _step2.value;
- callback("display", g2);
- }
- } catch (err) {
- _iterator2.e(err);
- } finally {
- _iterator2.f();
- }
- return "";
- }
- function realText(m3) {
- return callback("text", m3), "";
- }
- function rgb2(m3) {
- return callback("rgb", m3), "";
- }
- var tokens2 = [{
- pattern: /^\x08+/,
- sub: remove2
- }, {
- pattern: /^\x1b\[[012]?K/,
- sub: remove2
- }, {
- pattern: /^\x1b\[\(B/,
- sub: remove2
- }, {
- pattern: /^\x1b\[[34]8;2;\d+;\d+;\d+m/,
- sub: rgb2
- }, {
- pattern: /^\x1b\[38;5;(\d+)m/,
- sub: removeXterm256Foreground
- }, {
- pattern: /^\x1b\[48;5;(\d+)m/,
- sub: removeXterm256Background
- }, {
- pattern: /^\n/,
- sub: newline
- }, {
- pattern: /^\r+\n/,
- sub: newline
- }, {
- pattern: /^\r/,
- sub: newline
- }, {
- pattern: /^\x1b\[((?:\d{1,3};?)+|)m/,
- sub: ansiMess
- }, {
- // CSI n J
- // ED - Erase in Display Clears part of the screen.
- // If n is 0 (or missing), clear from cursor to end of screen.
- // If n is 1, clear from cursor to beginning of the screen.
- // If n is 2, clear entire screen (and moves cursor to upper left on DOS ANSI.SYS).
- // If n is 3, clear entire screen and delete all lines saved in the scrollback buffer
- // (this feature was added for xterm and is supported by other terminal applications).
- pattern: /^\x1b\[\d?J/,
- sub: remove2
- }, {
- // CSI n ; m f
- // HVP - Horizontal Vertical Position Same as CUP
- pattern: /^\x1b\[\d{0,3};\d{0,3}f/,
- sub: remove2
- }, {
- // catch-all for CSI sequences?
- pattern: /^\x1b\[?[\d;]{0,3}/,
- sub: remove2
- }, {
- /**
- * extracts real text - not containing:
- * - `\x1b' - ESC - escape (Ascii 27)
- * - '\x08' - BS - backspace (Ascii 8)
- * - `\n` - Newline - linefeed (LF) (ascii 10)
- * - `\r` - Windows Carriage Return (CR)
- */
- pattern: /^(([^\x1b\x08\r\n])+)/,
- sub: realText
- }];
- function process2(handler2, i2) {
- i2 > ansiHandler && ansiMatch || (ansiMatch = !1, text = text.replace(handler2.pattern, handler2.sub));
- }
- var results1 = [], _text = text, length2 = _text.length;
- outer: for (; length2 > 0; ) {
- for (var i = 0, o = 0, len = tokens2.length; o < len; i = ++o) {
- var handler = tokens2[i];
- if (process2(handler, i), text.length !== length2) {
- length2 = text.length;
- continue outer;
- }
- }
- if (text.length === length2)
- break;
- results1.push(0), length2 = text.length;
- }
- return results1;
- }
- function updateStickyStack(stickyStack, token2, data) {
- return token2 !== "text" && (stickyStack = stickyStack.filter(notCategory(categoryForCode(data))), stickyStack.push({
- token: token2,
- data,
- category: categoryForCode(data)
- })), stickyStack;
- }
- var Filter = (function() {
- function Filter2(options) {
- _classCallCheck3(this, Filter2), options = options || {}, options.colors && (options.colors = Object.assign({}, defaults.colors, options.colors)), this.options = Object.assign({}, defaults, options), this.stack = [], this.stickyStack = [];
- }
- return _createClass3(Filter2, [{
- key: "toHtml",
- value: function(input2) {
- var _this = this;
- input2 = typeof input2 == "string" ? [input2] : input2;
- var stack = this.stack, options = this.options, buf = [];
- return this.stickyStack.forEach(function(element) {
- var output = generateOutput(stack, element.token, element.data, options);
- output && buf.push(output);
- }), tokenize2(input2.join(""), options, function(token2, data) {
- var output = generateOutput(stack, token2, data, options);
- output && buf.push(output), options.stream && (_this.stickyStack = updateStickyStack(_this.stickyStack, token2, data));
- }), stack.length && buf.push(resetStyles(stack)), buf.join("");
- }
- }]), Filter2;
- })();
- module2.exports = Filter;
- }
- });
-
- // ../../node_modules/jsdoc-type-pratt-parser/dist/index.js
- var require_dist = __commonJS({
- "../../node_modules/jsdoc-type-pratt-parser/dist/index.js"(exports, module2) {
- (function(global2, factory) {
- typeof exports == "object" && typeof module2 < "u" ? factory(exports) : typeof define == "function" && define.amd ? define(["exports"], factory) : (global2 = typeof globalThis < "u" ? globalThis : global2 || self, factory(global2.jtpp = {}));
- })(exports, (function(exports2) {
- "use strict";
- function tokenToString(token2) {
- return token2.text !== void 0 && token2.text !== "" ? `'${token2.type}' with value '${token2.text}'` : `'${token2.type}'`;
- }
- class NoParsletFoundError extends Error {
- constructor(token2) {
- super(`No parslet found for token: ${tokenToString(token2)}`), this.token = token2, Object.setPrototypeOf(this, NoParsletFoundError.prototype);
- }
- getToken() {
- return this.token;
- }
- }
- class EarlyEndOfParseError extends Error {
- constructor(token2) {
- super(`The parsing ended early. The next token was: ${tokenToString(token2)}`), this.token = token2, Object.setPrototypeOf(this, EarlyEndOfParseError.prototype);
- }
- getToken() {
- return this.token;
- }
- }
- class UnexpectedTypeError extends Error {
- constructor(result, message) {
- let error = `Unexpected type: '${result.type}'.`;
- message !== void 0 && (error += ` Message: ${message}`), super(error), Object.setPrototypeOf(this, UnexpectedTypeError.prototype);
- }
- }
- function makePunctuationRule(type5) {
- return (text) => text.startsWith(type5) ? { type: type5, text: type5 } : null;
- }
- function getQuoted(text) {
- let position2 = 0, char2, mark = text[0], escaped = !1;
- if (mark !== "'" && mark !== '"')
- return null;
- for (; position2 < text.length; ) {
- if (position2++, char2 = text[position2], !escaped && char2 === mark) {
- position2++;
- break;
- }
- escaped = !escaped && char2 === "\\";
- }
- if (char2 !== mark)
- throw new Error("Unterminated String");
- return text.slice(0, position2);
- }
- let identifierStartRegex = new RegExp("[$_\\p{ID_Start}]|\\\\u\\p{Hex_Digit}{4}|\\\\u\\{0*(?:\\p{Hex_Digit}{1,5}|10\\p{Hex_Digit}{4})\\}", "u"), identifierContinueRegex = new RegExp("[$\\-\\p{ID_Continue}\\u200C\\u200D]|\\\\u\\p{Hex_Digit}{4}|\\\\u\\{0*(?:\\p{Hex_Digit}{1,5}|10\\p{Hex_Digit}{4})\\}", "u");
- function getIdentifier(text) {
- let char2 = text[0];
- if (!identifierStartRegex.test(char2))
- return null;
- let position2 = 1;
- do {
- if (char2 = text[position2], !identifierContinueRegex.test(char2))
- break;
- position2++;
- } while (position2 < text.length);
- return text.slice(0, position2);
- }
- let numberRegex = /^(NaN|-?((\d*\.\d+|\d+)([Ee][+-]?\d+)?|Infinity))/;
- function getNumber(text) {
- var _a4, _b;
- return (_b = (_a4 = numberRegex.exec(text)) === null || _a4 === void 0 ? void 0 : _a4[0]) !== null && _b !== void 0 ? _b : null;
- }
- let identifierRule = (text) => {
- let value = getIdentifier(text);
- return value == null ? null : {
- type: "Identifier",
- text: value
- };
- };
- function makeKeyWordRule(type5) {
- return (text) => {
- if (!text.startsWith(type5))
- return null;
- let prepends = text[type5.length];
- return prepends !== void 0 && identifierContinueRegex.test(prepends) ? null : {
- type: type5,
- text: type5
- };
- };
- }
- let stringValueRule = (text) => {
- let value = getQuoted(text);
- return value == null ? null : {
- type: "StringValue",
- text: value
- };
- }, eofRule = (text) => text.length > 0 ? null : {
- type: "EOF",
- text: ""
- }, numberRule = (text) => {
- let value = getNumber(text);
- return value === null ? null : {
- type: "Number",
- text: value
- };
- }, rules = [
- eofRule,
- makePunctuationRule("=>"),
- makePunctuationRule("("),
- makePunctuationRule(")"),
- makePunctuationRule("{"),
- makePunctuationRule("}"),
- makePunctuationRule("["),
- makePunctuationRule("]"),
- makePunctuationRule("|"),
- makePunctuationRule("&"),
- makePunctuationRule("<"),
- makePunctuationRule(">"),
- makePunctuationRule(","),
- makePunctuationRule(";"),
- makePunctuationRule("*"),
- makePunctuationRule("?"),
- makePunctuationRule("!"),
- makePunctuationRule("="),
- makePunctuationRule(":"),
- makePunctuationRule("..."),
- makePunctuationRule("."),
- makePunctuationRule("#"),
- makePunctuationRule("~"),
- makePunctuationRule("/"),
- makePunctuationRule("@"),
- makeKeyWordRule("undefined"),
- makeKeyWordRule("null"),
- makeKeyWordRule("function"),
- makeKeyWordRule("this"),
- makeKeyWordRule("new"),
- makeKeyWordRule("module"),
- makeKeyWordRule("event"),
- makeKeyWordRule("extends"),
- makeKeyWordRule("external"),
- makeKeyWordRule("infer"),
- makeKeyWordRule("typeof"),
- makeKeyWordRule("keyof"),
- makeKeyWordRule("readonly"),
- makeKeyWordRule("import"),
- makeKeyWordRule("is"),
- makeKeyWordRule("in"),
- makeKeyWordRule("asserts"),
- numberRule,
- identifierRule,
- stringValueRule
- ], breakingWhitespaceRegex = /^\s*\n\s*/;
- class Lexer {
- static create(text) {
- let current = this.read(text);
- text = current.text;
- let next2 = this.read(text);
- return text = next2.text, new Lexer(text, void 0, current.token, next2.token);
- }
- constructor(text, previous, current, next2) {
- this.text = "", this.text = text, this.previous = previous, this.current = current, this.next = next2;
- }
- static read(text, startOfLine = !1) {
- startOfLine = startOfLine || breakingWhitespaceRegex.test(text), text = text.trim();
- for (let rule of rules) {
- let partial = rule(text);
- if (partial !== null) {
- let token2 = Object.assign(Object.assign({}, partial), { startOfLine });
- return text = text.slice(token2.text.length), { text, token: token2 };
- }
- }
- throw new Error("Unexpected Token " + text);
- }
- advance() {
- let next2 = Lexer.read(this.text);
- return new Lexer(next2.text, this.current, this.next, next2.token);
- }
- }
- function assertRootResult(result) {
- if (result === void 0)
- throw new Error("Unexpected undefined");
- if (result.type === "JsdocTypeKeyValue" || result.type === "JsdocTypeParameterList" || result.type === "JsdocTypeProperty" || result.type === "JsdocTypeReadonlyProperty" || result.type === "JsdocTypeObjectField" || result.type === "JsdocTypeJsdocObjectField" || result.type === "JsdocTypeIndexSignature" || result.type === "JsdocTypeMappedType" || result.type === "JsdocTypeTypeParameter")
- throw new UnexpectedTypeError(result);
- return result;
- }
- function assertPlainKeyValueOrRootResult(result) {
- return result.type === "JsdocTypeKeyValue" ? assertPlainKeyValueResult(result) : assertRootResult(result);
- }
- function assertPlainKeyValueOrNameResult(result) {
- return result.type === "JsdocTypeName" ? result : assertPlainKeyValueResult(result);
- }
- function assertPlainKeyValueResult(result) {
- if (result.type !== "JsdocTypeKeyValue")
- throw new UnexpectedTypeError(result);
- return result;
- }
- function assertNumberOrVariadicNameResult(result) {
- var _a4;
- if (result.type === "JsdocTypeVariadic") {
- if (((_a4 = result.element) === null || _a4 === void 0 ? void 0 : _a4.type) === "JsdocTypeName")
- return result;
- throw new UnexpectedTypeError(result);
- }
- if (result.type !== "JsdocTypeNumber" && result.type !== "JsdocTypeName")
- throw new UnexpectedTypeError(result);
- return result;
- }
- function assertArrayOrTupleResult(result) {
- if (result.type === "JsdocTypeTuple" || result.type === "JsdocTypeGeneric" && result.meta.brackets === "square")
- return result;
- throw new UnexpectedTypeError(result);
- }
- function isSquaredProperty(result) {
- return result.type === "JsdocTypeIndexSignature" || result.type === "JsdocTypeMappedType";
- }
- var Precedence;
- (function(Precedence2) {
- Precedence2[Precedence2.ALL = 0] = "ALL", Precedence2[Precedence2.PARAMETER_LIST = 1] = "PARAMETER_LIST", Precedence2[Precedence2.OBJECT = 2] = "OBJECT", Precedence2[Precedence2.KEY_VALUE = 3] = "KEY_VALUE", Precedence2[Precedence2.INDEX_BRACKETS = 4] = "INDEX_BRACKETS", Precedence2[Precedence2.UNION = 5] = "UNION", Precedence2[Precedence2.INTERSECTION = 6] = "INTERSECTION", Precedence2[Precedence2.PREFIX = 7] = "PREFIX", Precedence2[Precedence2.INFIX = 8] = "INFIX", Precedence2[Precedence2.TUPLE = 9] = "TUPLE", Precedence2[Precedence2.SYMBOL = 10] = "SYMBOL", Precedence2[Precedence2.OPTIONAL = 11] = "OPTIONAL", Precedence2[Precedence2.NULLABLE = 12] = "NULLABLE", Precedence2[Precedence2.KEY_OF_TYPE_OF = 13] = "KEY_OF_TYPE_OF", Precedence2[Precedence2.FUNCTION = 14] = "FUNCTION", Precedence2[Precedence2.ARROW = 15] = "ARROW", Precedence2[Precedence2.ARRAY_BRACKETS = 16] = "ARRAY_BRACKETS", Precedence2[Precedence2.GENERIC = 17] = "GENERIC", Precedence2[Precedence2.NAME_PATH = 18] = "NAME_PATH", Precedence2[Precedence2.PARENTHESIS = 19] = "PARENTHESIS", Precedence2[Precedence2.SPECIAL_TYPES = 20] = "SPECIAL_TYPES";
- })(Precedence || (Precedence = {}));
- class Parser2 {
- constructor(grammar, textOrLexer, baseParser) {
- this.grammar = grammar, typeof textOrLexer == "string" ? this._lexer = Lexer.create(textOrLexer) : this._lexer = textOrLexer, this.baseParser = baseParser;
- }
- get lexer() {
- return this._lexer;
- }
- /**
- * Parses a given string and throws an error if the parse ended before the end of the string.
- */
- parse() {
- let result = this.parseType(Precedence.ALL);
- if (this.lexer.current.type !== "EOF")
- throw new EarlyEndOfParseError(this.lexer.current);
- return result;
- }
- /**
- * Parses with the current lexer and asserts that the result is a {@link RootResult}.
- */
- parseType(precedence) {
- return assertRootResult(this.parseIntermediateType(precedence));
- }
- /**
- * The main parsing function. First it tries to parse the current state in the prefix step, and then it continues
- * to parse the state in the infix step.
- */
- parseIntermediateType(precedence) {
- let result = this.tryParslets(null, precedence);
- if (result === null)
- throw new NoParsletFoundError(this.lexer.current);
- return this.parseInfixIntermediateType(result, precedence);
- }
- /**
- * In the infix parsing step the parser continues to parse the current state with all parslets until none returns
- * a result.
- */
- parseInfixIntermediateType(left2, precedence) {
- let result = this.tryParslets(left2, precedence);
- for (; result !== null; )
- left2 = result, result = this.tryParslets(left2, precedence);
- return left2;
- }
- /**
- * Tries to parse the current state with all parslets in the grammar and returns the first non null result.
- */
- tryParslets(left2, precedence) {
- for (let parslet of this.grammar) {
- let result = parslet(this, precedence, left2);
- if (result !== null)
- return result;
- }
- return null;
- }
- /**
- * If the given type equals the current type of the {@link Lexer} advance the lexer. Return true if the lexer was
- * advanced.
- */
- consume(types) {
- return Array.isArray(types) || (types = [types]), types.includes(this.lexer.current.type) ? (this._lexer = this.lexer.advance(), !0) : !1;
- }
- acceptLexerState(parser) {
- this._lexer = parser.lexer;
- }
- }
- function isQuestionMarkUnknownType(next2) {
- return next2 === "}" || next2 === "EOF" || next2 === "|" || next2 === "," || next2 === ")" || next2 === ">";
- }
- let nullableParslet = (parser, precedence, left2) => {
- let type5 = parser.lexer.current.type, next2 = parser.lexer.next.type;
- return left2 == null && type5 === "?" && !isQuestionMarkUnknownType(next2) || left2 != null && type5 === "?" ? (parser.consume("?"), left2 == null ? {
- type: "JsdocTypeNullable",
- element: parser.parseType(Precedence.NULLABLE),
- meta: {
- position: "prefix"
- }
- } : {
- type: "JsdocTypeNullable",
- element: assertRootResult(left2),
- meta: {
- position: "suffix"
- }
- }) : null;
- };
- function composeParslet(options) {
- let parslet = (parser, curPrecedence, left2) => {
- let type5 = parser.lexer.current.type, next2 = parser.lexer.next.type;
- if (left2 === null) {
- if ("parsePrefix" in options && options.accept(type5, next2))
- return options.parsePrefix(parser);
- } else if ("parseInfix" in options && options.precedence > curPrecedence && options.accept(type5, next2))
- return options.parseInfix(parser, left2);
- return null;
- };
- return Object.defineProperty(parslet, "name", {
- value: options.name
- }), parslet;
- }
- let optionalParslet = composeParslet({
- name: "optionalParslet",
- accept: (type5) => type5 === "=",
- precedence: Precedence.OPTIONAL,
- parsePrefix: (parser) => (parser.consume("="), {
- type: "JsdocTypeOptional",
- element: parser.parseType(Precedence.OPTIONAL),
- meta: {
- position: "prefix"
- }
- }),
- parseInfix: (parser, left2) => (parser.consume("="), {
- type: "JsdocTypeOptional",
- element: assertRootResult(left2),
- meta: {
- position: "suffix"
- }
- })
- }), numberParslet = composeParslet({
- name: "numberParslet",
- accept: (type5) => type5 === "Number",
- parsePrefix: (parser) => {
- let value = parseFloat(parser.lexer.current.text);
- return parser.consume("Number"), {
- type: "JsdocTypeNumber",
- value
- };
- }
- }), parenthesisParslet = composeParslet({
- name: "parenthesisParslet",
- accept: (type5) => type5 === "(",
- parsePrefix: (parser) => {
- if (parser.consume("("), parser.consume(")"))
- return {
- type: "JsdocTypeParameterList",
- elements: []
- };
- let result = parser.parseIntermediateType(Precedence.ALL);
- if (!parser.consume(")"))
- throw new Error("Unterminated parenthesis");
- return result.type === "JsdocTypeParameterList" ? result : result.type === "JsdocTypeKeyValue" ? {
- type: "JsdocTypeParameterList",
- elements: [result]
- } : {
- type: "JsdocTypeParenthesis",
- element: assertRootResult(result)
- };
- }
- }), specialTypesParslet = composeParslet({
- name: "specialTypesParslet",
- accept: (type5, next2) => type5 === "?" && isQuestionMarkUnknownType(next2) || type5 === "null" || type5 === "undefined" || type5 === "*",
- parsePrefix: (parser) => {
- if (parser.consume("null"))
- return {
- type: "JsdocTypeNull"
- };
- if (parser.consume("undefined"))
- return {
- type: "JsdocTypeUndefined"
- };
- if (parser.consume("*"))
- return {
- type: "JsdocTypeAny"
- };
- if (parser.consume("?"))
- return {
- type: "JsdocTypeUnknown"
- };
- throw new Error("Unacceptable token: " + parser.lexer.current.text);
- }
- }), notNullableParslet = composeParslet({
- name: "notNullableParslet",
- accept: (type5) => type5 === "!",
- precedence: Precedence.NULLABLE,
- parsePrefix: (parser) => (parser.consume("!"), {
- type: "JsdocTypeNotNullable",
- element: parser.parseType(Precedence.NULLABLE),
- meta: {
- position: "prefix"
- }
- }),
- parseInfix: (parser, left2) => (parser.consume("!"), {
- type: "JsdocTypeNotNullable",
- element: assertRootResult(left2),
- meta: {
- position: "suffix"
- }
- })
- });
- function createParameterListParslet({ allowTrailingComma }) {
- return composeParslet({
- name: "parameterListParslet",
- accept: (type5) => type5 === ",",
- precedence: Precedence.PARAMETER_LIST,
- parseInfix: (parser, left2) => {
- let elements = [
- assertPlainKeyValueOrRootResult(left2)
- ];
- parser.consume(",");
- do
- try {
- let next2 = parser.parseIntermediateType(Precedence.PARAMETER_LIST);
- elements.push(assertPlainKeyValueOrRootResult(next2));
- } catch (e) {
- if (e instanceof NoParsletFoundError)
- break;
- throw e;
- }
- while (parser.consume(","));
- if (elements.length > 0 && elements.slice(0, -1).some((e) => e.type === "JsdocTypeVariadic"))
- throw new Error("Only the last parameter may be a rest parameter");
- return {
- type: "JsdocTypeParameterList",
- elements
- };
- }
- });
- }
- let genericParslet = composeParslet({
- name: "genericParslet",
- accept: (type5, next2) => type5 === "<" || type5 === "." && next2 === "<",
- precedence: Precedence.GENERIC,
- parseInfix: (parser, left2) => {
- let dot = parser.consume(".");
- parser.consume("<");
- let objects = [], infer = !1;
- if (parser.consume("infer")) {
- infer = !0;
- let left3 = parser.parseIntermediateType(Precedence.SYMBOL);
- if (left3.type !== "JsdocTypeName")
- throw new UnexpectedTypeError(left3, "A typescript asserts always has to have a name on the left side.");
- objects.push(left3);
- } else
- do
- objects.push(parser.parseType(Precedence.PARAMETER_LIST));
- while (parser.consume(","));
- if (!parser.consume(">"))
- throw new Error("Unterminated generic parameter list");
- return Object.assign(Object.assign({ type: "JsdocTypeGeneric", left: assertRootResult(left2), elements: objects }, infer ? { infer: !0 } : {}), { meta: {
- brackets: "angle",
- dot
- } });
- }
- }), unionParslet = composeParslet({
- name: "unionParslet",
- accept: (type5) => type5 === "|",
- precedence: Precedence.UNION,
- parseInfix: (parser, left2) => {
- parser.consume("|");
- let elements = [];
- do
- elements.push(parser.parseType(Precedence.UNION));
- while (parser.consume("|"));
- return {
- type: "JsdocTypeUnion",
- elements: [assertRootResult(left2), ...elements]
- };
- }
- }), baseGrammar = [
- nullableParslet,
- optionalParslet,
- numberParslet,
- parenthesisParslet,
- specialTypesParslet,
- notNullableParslet,
- createParameterListParslet({
- allowTrailingComma: !0
- }),
- genericParslet,
- unionParslet,
- optionalParslet
- ];
- function createNamePathParslet({ allowSquareBracketsOnAnyType, allowJsdocNamePaths, pathGrammar: pathGrammar2 }) {
- return function(parser, precedence, left2) {
- if (left2 == null || precedence >= Precedence.NAME_PATH)
- return null;
- let type5 = parser.lexer.current.type, next2 = parser.lexer.next.type;
- if (!(type5 === "." && next2 !== "<" || type5 === "[" && (allowSquareBracketsOnAnyType || left2.type === "JsdocTypeName") || allowJsdocNamePaths && (type5 === "~" || type5 === "#")))
- return null;
- let pathType, brackets = !1;
- parser.consume(".") ? pathType = "property" : parser.consume("[") ? (pathType = "property-brackets", brackets = !0) : parser.consume("~") ? pathType = "inner" : (parser.consume("#"), pathType = "instance");
- let pathParser = pathGrammar2 !== null ? new Parser2(pathGrammar2, parser.lexer, parser) : parser, parsed = pathParser.parseIntermediateType(Precedence.NAME_PATH);
- parser.acceptLexerState(pathParser);
- let right2;
- switch (parsed.type) {
- case "JsdocTypeName":
- right2 = {
- type: "JsdocTypeProperty",
- value: parsed.value,
- meta: {
- quote: void 0
- }
- };
- break;
- case "JsdocTypeNumber":
- right2 = {
- type: "JsdocTypeProperty",
- value: parsed.value.toString(10),
- meta: {
- quote: void 0
- }
- };
- break;
- case "JsdocTypeStringValue":
- right2 = {
- type: "JsdocTypeProperty",
- value: parsed.value,
- meta: {
- quote: parsed.meta.quote
- }
- };
- break;
- case "JsdocTypeSpecialNamePath":
- if (parsed.specialType === "event")
- right2 = parsed;
- else
- throw new UnexpectedTypeError(parsed, "Type 'JsdocTypeSpecialNamePath' is only allowed with specialType 'event'");
- break;
- default:
- throw new UnexpectedTypeError(parsed, "Expecting 'JsdocTypeName', 'JsdocTypeNumber', 'JsdocStringValue' or 'JsdocTypeSpecialNamePath'");
- }
- if (brackets && !parser.consume("]")) {
- let token2 = parser.lexer.current;
- throw new Error(`Unterminated square brackets. Next token is '${token2.type}' with text '${token2.text}'`);
- }
- return {
- type: "JsdocTypeNamePath",
- left: assertRootResult(left2),
- right: right2,
- pathType
- };
- };
- }
- function createNameParslet({ allowedAdditionalTokens }) {
- return composeParslet({
- name: "nameParslet",
- accept: (type5) => type5 === "Identifier" || type5 === "this" || type5 === "new" || allowedAdditionalTokens.includes(type5),
- parsePrefix: (parser) => {
- let { type: type5, text } = parser.lexer.current;
- return parser.consume(type5), {
- type: "JsdocTypeName",
- value: text
- };
- }
- });
- }
- let stringValueParslet = composeParslet({
- name: "stringValueParslet",
- accept: (type5) => type5 === "StringValue",
- parsePrefix: (parser) => {
- let text = parser.lexer.current.text;
- return parser.consume("StringValue"), {
- type: "JsdocTypeStringValue",
- value: text.slice(1, -1),
- meta: {
- quote: text[0] === "'" ? "single" : "double"
- }
- };
- }
- });
- function createSpecialNamePathParslet({ pathGrammar: pathGrammar2, allowedTypes }) {
- return composeParslet({
- name: "specialNamePathParslet",
- accept: (type5) => allowedTypes.includes(type5),
- parsePrefix: (parser) => {
- let type5 = parser.lexer.current.type;
- if (parser.consume(type5), !parser.consume(":"))
- return {
- type: "JsdocTypeName",
- value: type5
- };
- let result, token2 = parser.lexer.current;
- if (parser.consume("StringValue"))
- result = {
- type: "JsdocTypeSpecialNamePath",
- value: token2.text.slice(1, -1),
- specialType: type5,
- meta: {
- quote: token2.text[0] === "'" ? "single" : "double"
- }
- };
- else {
- let value = "", allowed = ["Identifier", "@", "/"];
- for (; allowed.some((type6) => parser.consume(type6)); )
- value += token2.text, token2 = parser.lexer.current;
- result = {
- type: "JsdocTypeSpecialNamePath",
- value,
- specialType: type5,
- meta: {
- quote: void 0
- }
- };
- }
- let moduleParser = new Parser2(pathGrammar2, parser.lexer, parser), moduleResult = moduleParser.parseInfixIntermediateType(result, Precedence.ALL);
- return parser.acceptLexerState(moduleParser), assertRootResult(moduleResult);
- }
- });
- }
- let basePathGrammar = [
- createNameParslet({
- allowedAdditionalTokens: ["external", "module"]
- }),
- stringValueParslet,
- numberParslet,
- createNamePathParslet({
- allowSquareBracketsOnAnyType: !1,
- allowJsdocNamePaths: !0,
- pathGrammar: null
- })
- ], pathGrammar = [
- ...basePathGrammar,
- createSpecialNamePathParslet({
- allowedTypes: ["event"],
- pathGrammar: basePathGrammar
- })
- ];
- function getParameters(value) {
- let parameters2;
- if (value.type === "JsdocTypeParameterList")
- parameters2 = value.elements;
- else if (value.type === "JsdocTypeParenthesis")
- parameters2 = [value.element];
- else
- throw new UnexpectedTypeError(value);
- return parameters2.map((p3) => assertPlainKeyValueOrRootResult(p3));
- }
- function getUnnamedParameters(value) {
- let parameters2 = getParameters(value);
- if (parameters2.some((p3) => p3.type === "JsdocTypeKeyValue"))
- throw new Error("No parameter should be named");
- return parameters2;
- }
- function createFunctionParslet({ allowNamedParameters, allowNoReturnType, allowWithoutParenthesis, allowNewAsFunctionKeyword }) {
- return composeParslet({
- name: "functionParslet",
- accept: (type5, next2) => type5 === "function" || allowNewAsFunctionKeyword && type5 === "new" && next2 === "(",
- parsePrefix: (parser) => {
- let newKeyword = parser.consume("new");
- parser.consume("function");
- let hasParenthesis = parser.lexer.current.type === "(";
- if (!hasParenthesis) {
- if (!allowWithoutParenthesis)
- throw new Error("function is missing parameter list");
- return {
- type: "JsdocTypeName",
- value: "function"
- };
- }
- let result = {
- type: "JsdocTypeFunction",
- parameters: [],
- arrow: !1,
- constructor: newKeyword,
- parenthesis: hasParenthesis
- }, value = parser.parseIntermediateType(Precedence.FUNCTION);
- if (allowNamedParameters === void 0)
- result.parameters = getUnnamedParameters(value);
- else {
- if (newKeyword && value.type === "JsdocTypeFunction" && value.arrow)
- return result = value, result.constructor = !0, result;
- result.parameters = getParameters(value);
- for (let p3 of result.parameters)
- if (p3.type === "JsdocTypeKeyValue" && !allowNamedParameters.includes(p3.key))
- throw new Error(`only allowed named parameters are ${allowNamedParameters.join(", ")} but got ${p3.type}`);
- }
- if (parser.consume(":"))
- result.returnType = parser.parseType(Precedence.PREFIX);
- else if (!allowNoReturnType)
- throw new Error("function is missing return type");
- return result;
- }
- });
- }
- function createVariadicParslet({ allowPostfix, allowEnclosingBrackets }) {
- return composeParslet({
- name: "variadicParslet",
- accept: (type5) => type5 === "...",
- precedence: Precedence.PREFIX,
- parsePrefix: (parser) => {
- parser.consume("...");
- let brackets = allowEnclosingBrackets && parser.consume("[");
- try {
- let element = parser.parseType(Precedence.PREFIX);
- if (brackets && !parser.consume("]"))
- throw new Error("Unterminated variadic type. Missing ']'");
- return {
- type: "JsdocTypeVariadic",
- element: assertRootResult(element),
- meta: {
- position: "prefix",
- squareBrackets: brackets
- }
- };
- } catch (e) {
- if (e instanceof NoParsletFoundError) {
- if (brackets)
- throw new Error("Empty square brackets for variadic are not allowed.");
- return {
- type: "JsdocTypeVariadic",
- meta: {
- position: void 0,
- squareBrackets: !1
- }
- };
- } else
- throw e;
- }
- },
- parseInfix: allowPostfix ? (parser, left2) => (parser.consume("..."), {
- type: "JsdocTypeVariadic",
- element: assertRootResult(left2),
- meta: {
- position: "suffix",
- squareBrackets: !1
- }
- }) : void 0
- });
- }
- let symbolParslet = composeParslet({
- name: "symbolParslet",
- accept: (type5) => type5 === "(",
- precedence: Precedence.SYMBOL,
- parseInfix: (parser, left2) => {
- if (left2.type !== "JsdocTypeName")
- throw new Error("Symbol expects a name on the left side. (Reacting on '(')");
- parser.consume("(");
- let result = {
- type: "JsdocTypeSymbol",
- value: left2.value
- };
- if (!parser.consume(")")) {
- let next2 = parser.parseIntermediateType(Precedence.SYMBOL);
- if (result.element = assertNumberOrVariadicNameResult(next2), !parser.consume(")"))
- throw new Error("Symbol does not end after value");
- }
- return result;
- }
- }), arrayBracketsParslet = composeParslet({
- name: "arrayBracketsParslet",
- precedence: Precedence.ARRAY_BRACKETS,
- accept: (type5, next2) => type5 === "[" && next2 === "]",
- parseInfix: (parser, left2) => (parser.consume("["), parser.consume("]"), {
- type: "JsdocTypeGeneric",
- left: {
- type: "JsdocTypeName",
- value: "Array"
- },
- elements: [
- assertRootResult(left2)
- ],
- meta: {
- brackets: "square",
- dot: !1
- }
- })
- });
- function createObjectParslet({ objectFieldGrammar: objectFieldGrammar2, allowKeyTypes }) {
- return composeParslet({
- name: "objectParslet",
- accept: (type5) => type5 === "{",
- parsePrefix: (parser) => {
- parser.consume("{");
- let result = {
- type: "JsdocTypeObject",
- meta: {
- separator: "comma"
- },
- elements: []
- };
- if (!parser.consume("}")) {
- let separator, fieldParser = new Parser2(objectFieldGrammar2, parser.lexer, parser);
- for (; ; ) {
- fieldParser.acceptLexerState(parser);
- let field = fieldParser.parseIntermediateType(Precedence.OBJECT);
- parser.acceptLexerState(fieldParser), field === void 0 && allowKeyTypes && (field = parser.parseIntermediateType(Precedence.OBJECT));
- let optional = !1;
- if (field.type === "JsdocTypeNullable" && (optional = !0, field = field.element), field.type === "JsdocTypeNumber" || field.type === "JsdocTypeName" || field.type === "JsdocTypeStringValue") {
- let quote2;
- field.type === "JsdocTypeStringValue" && (quote2 = field.meta.quote), result.elements.push({
- type: "JsdocTypeObjectField",
- key: field.value.toString(),
- right: void 0,
- optional,
- readonly: !1,
- meta: {
- quote: quote2
- }
- });
- } else if (field.type === "JsdocTypeObjectField" || field.type === "JsdocTypeJsdocObjectField")
- result.elements.push(field);
- else
- throw new UnexpectedTypeError(field);
- if (parser.lexer.current.startOfLine)
- separator = "linebreak", parser.consume(",") || parser.consume(";");
- else if (parser.consume(","))
- separator = "comma";
- else if (parser.consume(";"))
- separator = "semicolon";
- else
- break;
- if (parser.lexer.current.type === "}")
- break;
- }
- if (result.meta.separator = separator ?? "comma", separator === "linebreak" && (result.meta.propertyIndent = " "), !parser.consume("}"))
- throw new Error("Unterminated record type. Missing '}'");
- }
- return result;
- }
- });
- }
- function createObjectFieldParslet({ allowSquaredProperties, allowKeyTypes, allowReadonly, allowOptional }) {
- return composeParslet({
- name: "objectFieldParslet",
- precedence: Precedence.KEY_VALUE,
- accept: (type5) => type5 === ":",
- parseInfix: (parser, left2) => {
- var _a4;
- let optional = !1, readonlyProperty = !1;
- allowOptional && left2.type === "JsdocTypeNullable" && (optional = !0, left2 = left2.element), allowReadonly && left2.type === "JsdocTypeReadonlyProperty" && (readonlyProperty = !0, left2 = left2.element);
- let parentParser = (_a4 = parser.baseParser) !== null && _a4 !== void 0 ? _a4 : parser;
- if (parentParser.acceptLexerState(parser), left2.type === "JsdocTypeNumber" || left2.type === "JsdocTypeName" || left2.type === "JsdocTypeStringValue" || isSquaredProperty(left2)) {
- if (isSquaredProperty(left2) && !allowSquaredProperties)
- throw new UnexpectedTypeError(left2);
- parentParser.consume(":");
- let quote2;
- left2.type === "JsdocTypeStringValue" && (quote2 = left2.meta.quote);
- let right2 = parentParser.parseType(Precedence.KEY_VALUE);
- return parser.acceptLexerState(parentParser), {
- type: "JsdocTypeObjectField",
- key: isSquaredProperty(left2) ? left2 : left2.value.toString(),
- right: right2,
- optional,
- readonly: readonlyProperty,
- meta: {
- quote: quote2
- }
- };
- } else {
- if (!allowKeyTypes)
- throw new UnexpectedTypeError(left2);
- parentParser.consume(":");
- let right2 = parentParser.parseType(Precedence.KEY_VALUE);
- return parser.acceptLexerState(parentParser), {
- type: "JsdocTypeJsdocObjectField",
- left: assertRootResult(left2),
- right: right2
- };
- }
- }
- });
- }
- function createKeyValueParslet({ allowOptional, allowVariadic }) {
- return composeParslet({
- name: "keyValueParslet",
- precedence: Precedence.KEY_VALUE,
- accept: (type5) => type5 === ":",
- parseInfix: (parser, left2) => {
- let optional = !1, variadic2 = !1;
- if (allowOptional && left2.type === "JsdocTypeNullable" && (optional = !0, left2 = left2.element), allowVariadic && left2.type === "JsdocTypeVariadic" && left2.element !== void 0 && (variadic2 = !0, left2 = left2.element), left2.type !== "JsdocTypeName")
- throw new UnexpectedTypeError(left2);
- parser.consume(":");
- let right2 = parser.parseType(Precedence.KEY_VALUE);
- return {
- type: "JsdocTypeKeyValue",
- key: left2.value,
- right: right2,
- optional,
- variadic: variadic2
- };
- }
- });
- }
- let jsdocBaseGrammar = [
- ...baseGrammar,
- createFunctionParslet({
- allowWithoutParenthesis: !0,
- allowNamedParameters: ["this", "new"],
- allowNoReturnType: !0,
- allowNewAsFunctionKeyword: !1
- }),
- stringValueParslet,
- createSpecialNamePathParslet({
- allowedTypes: ["module", "external", "event"],
- pathGrammar
- }),
- createVariadicParslet({
- allowEnclosingBrackets: !0,
- allowPostfix: !0
- }),
- createNameParslet({
- allowedAdditionalTokens: ["keyof"]
- }),
- symbolParslet,
- arrayBracketsParslet,
- createNamePathParslet({
- allowSquareBracketsOnAnyType: !1,
- allowJsdocNamePaths: !0,
- pathGrammar
- })
- ], jsdocGrammar = [
- ...jsdocBaseGrammar,
- createObjectParslet({
- // jsdoc syntax allows full types as keys, so we need to pull in the full grammar here
- // we leave out the object type deliberately
- objectFieldGrammar: [
- createNameParslet({
- allowedAdditionalTokens: ["typeof", "module", "in"]
- }),
- createObjectFieldParslet({
- allowSquaredProperties: !1,
- allowKeyTypes: !0,
- allowOptional: !1,
- allowReadonly: !1
- }),
- ...jsdocBaseGrammar
- ],
- allowKeyTypes: !0
- }),
- createKeyValueParslet({
- allowOptional: !0,
- allowVariadic: !0
- })
- ], typeOfParslet = composeParslet({
- name: "typeOfParslet",
- accept: (type5) => type5 === "typeof",
- parsePrefix: (parser) => (parser.consume("typeof"), {
- type: "JsdocTypeTypeof",
- element: parser.parseType(Precedence.KEY_OF_TYPE_OF)
- })
- }), objectFieldGrammar$1 = [
- createNameParslet({
- allowedAdditionalTokens: ["typeof", "module", "keyof", "event", "external", "in"]
- }),
- nullableParslet,
- optionalParslet,
- stringValueParslet,
- numberParslet,
- createObjectFieldParslet({
- allowSquaredProperties: !1,
- allowKeyTypes: !1,
- allowOptional: !1,
- allowReadonly: !1
- })
- ], closureGrammar = [
- ...baseGrammar,
- createObjectParslet({
- allowKeyTypes: !1,
- objectFieldGrammar: objectFieldGrammar$1
- }),
- createNameParslet({
- allowedAdditionalTokens: ["event", "external", "in"]
- }),
- typeOfParslet,
- createFunctionParslet({
- allowWithoutParenthesis: !1,
- allowNamedParameters: ["this", "new"],
- allowNoReturnType: !0,
- allowNewAsFunctionKeyword: !1
- }),
- createVariadicParslet({
- allowEnclosingBrackets: !1,
- allowPostfix: !1
- }),
- // additional name parslet is needed for some special cases
- createNameParslet({
- allowedAdditionalTokens: ["keyof"]
- }),
- createSpecialNamePathParslet({
- allowedTypes: ["module"],
- pathGrammar
- }),
- createNamePathParslet({
- allowSquareBracketsOnAnyType: !1,
- allowJsdocNamePaths: !0,
- pathGrammar
- }),
- createKeyValueParslet({
- allowOptional: !1,
- allowVariadic: !1
- }),
- symbolParslet
- ], assertsParslet = composeParslet({
- name: "assertsParslet",
- accept: (type5) => type5 === "asserts",
- parsePrefix: (parser) => {
- parser.consume("asserts");
- let left2 = parser.parseIntermediateType(Precedence.SYMBOL);
- if (left2.type !== "JsdocTypeName")
- throw new UnexpectedTypeError(left2, "A typescript asserts always has to have a name on the left side.");
- return parser.consume("is") ? {
- type: "JsdocTypeAsserts",
- left: left2,
- right: assertRootResult(parser.parseIntermediateType(Precedence.INFIX))
- } : {
- type: "JsdocTypeAssertsPlain",
- element: left2
- };
- }
- });
- function createTupleParslet({ allowQuestionMark }) {
- return composeParslet({
- name: "tupleParslet",
- accept: (type5) => type5 === "[",
- parsePrefix: (parser) => {
- parser.consume("[");
- let result = {
- type: "JsdocTypeTuple",
- elements: []
- };
- if (parser.consume("]"))
- return result;
- let typeList = parser.parseIntermediateType(Precedence.ALL);
- if (typeList.type === "JsdocTypeParameterList" ? typeList.elements[0].type === "JsdocTypeKeyValue" ? result.elements = typeList.elements.map(assertPlainKeyValueResult) : result.elements = typeList.elements.map(assertRootResult) : typeList.type === "JsdocTypeKeyValue" ? result.elements = [assertPlainKeyValueResult(typeList)] : result.elements = [assertRootResult(typeList)], !parser.consume("]"))
- throw new Error("Unterminated '['");
- if (result.elements.some((e) => e.type === "JsdocTypeUnknown"))
- throw new Error("Question mark in tuple not allowed");
- return result;
- }
- });
- }
- let keyOfParslet = composeParslet({
- name: "keyOfParslet",
- accept: (type5) => type5 === "keyof",
- parsePrefix: (parser) => (parser.consume("keyof"), {
- type: "JsdocTypeKeyof",
- element: assertRootResult(parser.parseType(Precedence.KEY_OF_TYPE_OF))
- })
- }), importParslet = composeParslet({
- name: "importParslet",
- accept: (type5) => type5 === "import",
- parsePrefix: (parser) => {
- if (parser.consume("import"), !parser.consume("("))
- throw new Error("Missing parenthesis after import keyword");
- let path = parser.parseType(Precedence.PREFIX);
- if (path.type !== "JsdocTypeStringValue")
- throw new Error("Only string values are allowed as paths for imports");
- if (!parser.consume(")"))
- throw new Error("Missing closing parenthesis after import keyword");
- return {
- type: "JsdocTypeImport",
- element: path
- };
- }
- }), readonlyPropertyParslet = composeParslet({
- name: "readonlyPropertyParslet",
- accept: (type5) => type5 === "readonly",
- parsePrefix: (parser) => (parser.consume("readonly"), {
- type: "JsdocTypeReadonlyProperty",
- element: parser.parseIntermediateType(Precedence.KEY_VALUE)
- })
- }), arrowFunctionParslet = composeParslet({
- name: "arrowFunctionParslet",
- precedence: Precedence.ARROW,
- accept: (type5) => type5 === "=>",
- parseInfix: (parser, left2) => (parser.consume("=>"), {
- type: "JsdocTypeFunction",
- parameters: getParameters(left2).map(assertPlainKeyValueOrNameResult),
- arrow: !0,
- constructor: !1,
- parenthesis: !0,
- returnType: parser.parseType(Precedence.OBJECT)
- })
- }), genericArrowFunctionParslet = composeParslet({
- name: "genericArrowFunctionParslet",
- accept: (type5) => type5 === "<",
- parsePrefix: (parser) => {
- let typeParameters = [];
- parser.consume("<");
- do {
- let defaultValue, name = parser.parseIntermediateType(Precedence.SYMBOL);
- if (name.type === "JsdocTypeOptional" && (name = name.element, defaultValue = parser.parseType(Precedence.SYMBOL)), name.type !== "JsdocTypeName")
- throw new UnexpectedTypeError(name);
- let constraint;
- parser.consume("extends") && (constraint = parser.parseType(Precedence.SYMBOL), constraint.type === "JsdocTypeOptional" && (constraint = constraint.element, defaultValue = parser.parseType(Precedence.SYMBOL)));
- let typeParameter = {
- type: "JsdocTypeTypeParameter",
- name
- };
- if (constraint !== void 0 && (typeParameter.constraint = constraint), defaultValue !== void 0 && (typeParameter.defaultValue = defaultValue), typeParameters.push(typeParameter), parser.consume(">"))
- break;
- } while (parser.consume(","));
- let functionBase = parser.parseIntermediateType(Precedence.SYMBOL);
- return functionBase.typeParameters = typeParameters, functionBase;
- }
- }), intersectionParslet = composeParslet({
- name: "intersectionParslet",
- accept: (type5) => type5 === "&",
- precedence: Precedence.INTERSECTION,
- parseInfix: (parser, left2) => {
- parser.consume("&");
- let elements = [];
- do
- elements.push(parser.parseType(Precedence.INTERSECTION));
- while (parser.consume("&"));
- return {
- type: "JsdocTypeIntersection",
- elements: [assertRootResult(left2), ...elements]
- };
- }
- }), predicateParslet = composeParslet({
- name: "predicateParslet",
- precedence: Precedence.INFIX,
- accept: (type5) => type5 === "is",
- parseInfix: (parser, left2) => {
- if (left2.type !== "JsdocTypeName")
- throw new UnexpectedTypeError(left2, "A typescript predicate always has to have a name on the left side.");
- return parser.consume("is"), {
- type: "JsdocTypePredicate",
- left: left2,
- right: assertRootResult(parser.parseIntermediateType(Precedence.INFIX))
- };
- }
- }), objectSquaredPropertyParslet = composeParslet({
- name: "objectSquareBracketPropertyParslet",
- accept: (type5) => type5 === "[",
- parsePrefix: (parser) => {
- if (parser.baseParser === void 0)
- throw new Error("Only allowed inside object grammar");
- parser.consume("[");
- let key = parser.lexer.current.text;
- parser.consume("Identifier");
- let result;
- if (parser.consume(":")) {
- let parentParser = parser.baseParser;
- parentParser.acceptLexerState(parser), result = {
- type: "JsdocTypeIndexSignature",
- key,
- right: parentParser.parseType(Precedence.INDEX_BRACKETS)
- }, parser.acceptLexerState(parentParser);
- } else if (parser.consume("in")) {
- let parentParser = parser.baseParser;
- parentParser.acceptLexerState(parser), result = {
- type: "JsdocTypeMappedType",
- key,
- right: parentParser.parseType(Precedence.ARRAY_BRACKETS)
- }, parser.acceptLexerState(parentParser);
- } else
- throw new Error("Missing ':' or 'in' inside square bracketed property.");
- if (!parser.consume("]"))
- throw new Error("Unterminated square brackets");
- return result;
- }
- }), readonlyArrayParslet = composeParslet({
- name: "readonlyArrayParslet",
- accept: (type5) => type5 === "readonly",
- parsePrefix: (parser) => (parser.consume("readonly"), {
- type: "JsdocTypeReadonlyArray",
- element: assertArrayOrTupleResult(parser.parseIntermediateType(Precedence.ALL))
- })
- }), conditionalParslet = composeParslet({
- name: "conditionalParslet",
- precedence: Precedence.INFIX,
- accept: (type5) => type5 === "extends",
- parseInfix: (parser, left2) => {
- parser.consume("extends");
- let extendsType = parser.parseType(Precedence.KEY_OF_TYPE_OF).element, trueType = parser.parseType(Precedence.INFIX);
- return parser.consume(":"), {
- type: "JsdocTypeConditional",
- checksType: assertRootResult(left2),
- extendsType,
- trueType,
- falseType: parser.parseType(Precedence.INFIX)
- };
- }
- }), objectFieldGrammar = [
- readonlyPropertyParslet,
- createNameParslet({
- allowedAdditionalTokens: ["typeof", "module", "keyof", "event", "external", "in"]
- }),
- nullableParslet,
- optionalParslet,
- stringValueParslet,
- numberParslet,
- createObjectFieldParslet({
- allowSquaredProperties: !0,
- allowKeyTypes: !1,
- allowOptional: !0,
- allowReadonly: !0
- }),
- objectSquaredPropertyParslet
- ], typescriptGrammar = [
- ...baseGrammar,
- createObjectParslet({
- allowKeyTypes: !1,
- objectFieldGrammar
- }),
- readonlyArrayParslet,
- typeOfParslet,
- keyOfParslet,
- importParslet,
- stringValueParslet,
- createFunctionParslet({
- allowWithoutParenthesis: !0,
- allowNoReturnType: !1,
- allowNamedParameters: ["this", "new", "args"],
- allowNewAsFunctionKeyword: !0
- }),
- createTupleParslet({
- allowQuestionMark: !1
- }),
- createVariadicParslet({
- allowEnclosingBrackets: !1,
- allowPostfix: !1
- }),
- assertsParslet,
- conditionalParslet,
- createNameParslet({
- allowedAdditionalTokens: ["event", "external", "in"]
- }),
- createSpecialNamePathParslet({
- allowedTypes: ["module"],
- pathGrammar
- }),
- arrayBracketsParslet,
- arrowFunctionParslet,
- genericArrowFunctionParslet,
- createNamePathParslet({
- allowSquareBracketsOnAnyType: !0,
- allowJsdocNamePaths: !1,
- pathGrammar
- }),
- intersectionParslet,
- predicateParslet,
- createKeyValueParslet({
- allowVariadic: !0,
- allowOptional: !0
- })
- ];
- function parse9(expression, mode) {
- switch (mode) {
- case "closure":
- return new Parser2(closureGrammar, expression).parse();
- case "jsdoc":
- return new Parser2(jsdocGrammar, expression).parse();
- case "typescript":
- return new Parser2(typescriptGrammar, expression).parse();
- }
- }
- function tryParse(expression, modes = ["typescript", "closure", "jsdoc"]) {
- let error;
- for (let mode of modes)
- try {
- return parse9(expression, mode);
- } catch (e) {
- error = e;
- }
- throw error;
- }
- function transform(rules2, parseResult) {
- let rule = rules2[parseResult.type];
- if (rule === void 0)
- throw new Error(`In this set of transform rules exists no rule for type ${parseResult.type}.`);
- return rule(parseResult, (aParseResult) => transform(rules2, aParseResult));
- }
- function notAvailableTransform(parseResult) {
- throw new Error("This transform is not available. Are you trying the correct parsing mode?");
- }
- function extractSpecialParams(source) {
- let result = {
- params: []
- };
- for (let param of source.parameters)
- param.type === "JsdocTypeKeyValue" ? param.key === "this" ? result.this = param.right : param.key === "new" ? result.new = param.right : result.params.push(param) : result.params.push(param);
- return result;
- }
- function applyPosition(position2, target, value) {
- return position2 === "prefix" ? value + target : target + value;
- }
- function quote(value, quote2) {
- switch (quote2) {
- case "double":
- return `"${value}"`;
- case "single":
- return `'${value}'`;
- case void 0:
- return value;
- }
- }
- function stringifyRules2() {
- return {
- JsdocTypeParenthesis: (result, transform2) => `(${result.element !== void 0 ? transform2(result.element) : ""})`,
- JsdocTypeKeyof: (result, transform2) => `keyof ${transform2(result.element)}`,
- JsdocTypeFunction: (result, transform2) => {
- var _a4;
- if (result.arrow) {
- if (result.returnType === void 0)
- throw new Error("Arrow function needs a return type.");
- let stringified = `${result.typeParameters !== void 0 ? `<${(_a4 = result.typeParameters.map(transform2).join(", ")) !== null && _a4 !== void 0 ? _a4 : ""}>` : ""}(${result.parameters.map(transform2).join(", ")}) => ${transform2(result.returnType)}`;
- return result.constructor && (stringified = "new " + stringified), stringified;
- } else {
- let stringified = result.constructor ? "new" : "function";
- return result.parenthesis && (stringified += `(${result.parameters.map(transform2).join(", ")})`, result.returnType !== void 0 && (stringified += `: ${transform2(result.returnType)}`)), stringified;
- }
- },
- JsdocTypeName: (result) => result.value,
- JsdocTypeTuple: (result, transform2) => `[${result.elements.map(transform2).join(", ")}]`,
- JsdocTypeVariadic: (result, transform2) => result.meta.position === void 0 ? "..." : applyPosition(result.meta.position, transform2(result.element), "..."),
- JsdocTypeNamePath: (result, transform2) => {
- let left2 = transform2(result.left), right2 = transform2(result.right);
- switch (result.pathType) {
- case "inner":
- return `${left2}~${right2}`;
- case "instance":
- return `${left2}#${right2}`;
- case "property":
- return `${left2}.${right2}`;
- case "property-brackets":
- return `${left2}[${right2}]`;
- }
- },
- JsdocTypeStringValue: (result) => quote(result.value, result.meta.quote),
- JsdocTypeAny: () => "*",
- JsdocTypeGeneric: (result, transform2) => {
- if (result.meta.brackets === "square") {
- let element = result.elements[0], transformed = transform2(element);
- return element.type === "JsdocTypeUnion" || element.type === "JsdocTypeIntersection" ? `(${transformed})[]` : `${transformed}[]`;
- } else
- return `${transform2(result.left)}${result.meta.dot ? "." : ""}<${result.infer === !0 ? "infer " : ""}${result.elements.map(transform2).join(", ")}>`;
- },
- JsdocTypeImport: (result, transform2) => `import(${transform2(result.element)})`,
- JsdocTypeObjectField: (result, transform2) => {
- let text = "";
- return result.readonly && (text += "readonly "), typeof result.key == "string" ? text += quote(result.key, result.meta.quote) : text += transform2(result.key), result.optional && (text += "?"), result.right === void 0 ? text : text + `: ${transform2(result.right)}`;
- },
- JsdocTypeJsdocObjectField: (result, transform2) => `${transform2(result.left)}: ${transform2(result.right)}`,
- JsdocTypeKeyValue: (result, transform2) => {
- let text = result.key;
- return result.optional && (text += "?"), result.variadic && (text = "..." + text), result.right === void 0 ? text : text + `: ${transform2(result.right)}`;
- },
- JsdocTypeSpecialNamePath: (result) => `${result.specialType}:${quote(result.value, result.meta.quote)}`,
- JsdocTypeNotNullable: (result, transform2) => applyPosition(result.meta.position, transform2(result.element), "!"),
- JsdocTypeNull: () => "null",
- JsdocTypeNullable: (result, transform2) => applyPosition(result.meta.position, transform2(result.element), "?"),
- JsdocTypeNumber: (result) => result.value.toString(),
- JsdocTypeObject: (result, transform2) => {
- var _a4, _b;
- return `{${(result.meta.separator === "linebreak" && result.elements.length > 1 ? `
- ` + ((_a4 = result.meta.propertyIndent) !== null && _a4 !== void 0 ? _a4 : "") : "") + result.elements.map(transform2).join(result.meta.separator === "comma" ? ", " : result.meta.separator === "linebreak" ? `
- ` + ((_b = result.meta.propertyIndent) !== null && _b !== void 0 ? _b : "") : "; ") + (result.meta.separator === "linebreak" && result.elements.length > 1 ? `
- ` : "")}}`;
- },
- JsdocTypeOptional: (result, transform2) => applyPosition(result.meta.position, transform2(result.element), "="),
- JsdocTypeSymbol: (result, transform2) => `${result.value}(${result.element !== void 0 ? transform2(result.element) : ""})`,
- JsdocTypeTypeof: (result, transform2) => `typeof ${transform2(result.element)}`,
- JsdocTypeUndefined: () => "undefined",
- JsdocTypeUnion: (result, transform2) => result.elements.map(transform2).join(" | "),
- JsdocTypeUnknown: () => "?",
- JsdocTypeIntersection: (result, transform2) => result.elements.map(transform2).join(" & "),
- JsdocTypeProperty: (result) => quote(result.value, result.meta.quote),
- JsdocTypePredicate: (result, transform2) => `${transform2(result.left)} is ${transform2(result.right)}`,
- JsdocTypeIndexSignature: (result, transform2) => `[${result.key}: ${transform2(result.right)}]`,
- JsdocTypeMappedType: (result, transform2) => `[${result.key} in ${transform2(result.right)}]`,
- JsdocTypeAsserts: (result, transform2) => `asserts ${transform2(result.left)} is ${transform2(result.right)}`,
- JsdocTypeReadonlyArray: (result, transform2) => `readonly ${transform2(result.element)}`,
- JsdocTypeAssertsPlain: (result, transform2) => `asserts ${transform2(result.element)}`,
- JsdocTypeConditional: (result, transform2) => `${transform2(result.checksType)} extends ${transform2(result.extendsType)} ? ${transform2(result.trueType)} : ${transform2(result.falseType)}`,
- JsdocTypeTypeParameter: (result, transform2) => `${transform2(result.name)}${result.constraint !== void 0 ? ` extends ${transform2(result.constraint)}` : ""}${result.defaultValue !== void 0 ? ` = ${transform2(result.defaultValue)}` : ""}`
- };
- }
- let storedStringifyRules = stringifyRules2();
- function stringify8(result) {
- return transform(storedStringifyRules, result);
- }
- let reservedWords2 = [
- "null",
- "true",
- "false",
- "break",
- "case",
- "catch",
- "class",
- "const",
- "continue",
- "debugger",
- "default",
- "delete",
- "do",
- "else",
- "export",
- "extends",
- "finally",
- "for",
- "function",
- "if",
- "import",
- "in",
- "instanceof",
- "new",
- "return",
- "super",
- "switch",
- "this",
- "throw",
- "try",
- "typeof",
- "var",
- "void",
- "while",
- "with",
- "yield"
- ];
- function makeName(value) {
- let result = {
- type: "NameExpression",
- name: value
- };
- return reservedWords2.includes(value) && (result.reservedWord = !0), result;
- }
- let catharsisTransformRules = {
- JsdocTypeOptional: (result, transform2) => {
- let transformed = transform2(result.element);
- return transformed.optional = !0, transformed;
- },
- JsdocTypeNullable: (result, transform2) => {
- let transformed = transform2(result.element);
- return transformed.nullable = !0, transformed;
- },
- JsdocTypeNotNullable: (result, transform2) => {
- let transformed = transform2(result.element);
- return transformed.nullable = !1, transformed;
- },
- JsdocTypeVariadic: (result, transform2) => {
- if (result.element === void 0)
- throw new Error("dots without value are not allowed in catharsis mode");
- let transformed = transform2(result.element);
- return transformed.repeatable = !0, transformed;
- },
- JsdocTypeAny: () => ({
- type: "AllLiteral"
- }),
- JsdocTypeNull: () => ({
- type: "NullLiteral"
- }),
- JsdocTypeStringValue: (result) => makeName(quote(result.value, result.meta.quote)),
- JsdocTypeUndefined: () => ({
- type: "UndefinedLiteral"
- }),
- JsdocTypeUnknown: () => ({
- type: "UnknownLiteral"
- }),
- JsdocTypeFunction: (result, transform2) => {
- let params = extractSpecialParams(result), transformed = {
- type: "FunctionType",
- params: params.params.map(transform2)
- };
- return params.this !== void 0 && (transformed.this = transform2(params.this)), params.new !== void 0 && (transformed.new = transform2(params.new)), result.returnType !== void 0 && (transformed.result = transform2(result.returnType)), transformed;
- },
- JsdocTypeGeneric: (result, transform2) => ({
- type: "TypeApplication",
- applications: result.elements.map((o) => transform2(o)),
- expression: transform2(result.left)
- }),
- JsdocTypeSpecialNamePath: (result) => makeName(result.specialType + ":" + quote(result.value, result.meta.quote)),
- JsdocTypeName: (result) => result.value !== "function" ? makeName(result.value) : {
- type: "FunctionType",
- params: []
- },
- JsdocTypeNumber: (result) => makeName(result.value.toString()),
- JsdocTypeObject: (result, transform2) => {
- let transformed = {
- type: "RecordType",
- fields: []
- };
- for (let field of result.elements)
- field.type !== "JsdocTypeObjectField" && field.type !== "JsdocTypeJsdocObjectField" ? transformed.fields.push({
- type: "FieldType",
- key: transform2(field),
- value: void 0
- }) : transformed.fields.push(transform2(field));
- return transformed;
- },
- JsdocTypeObjectField: (result, transform2) => {
- if (typeof result.key != "string")
- throw new Error("Index signatures and mapped types are not supported");
- return {
- type: "FieldType",
- key: makeName(quote(result.key, result.meta.quote)),
- value: result.right === void 0 ? void 0 : transform2(result.right)
- };
- },
- JsdocTypeJsdocObjectField: (result, transform2) => ({
- type: "FieldType",
- key: transform2(result.left),
- value: transform2(result.right)
- }),
- JsdocTypeUnion: (result, transform2) => ({
- type: "TypeUnion",
- elements: result.elements.map((e) => transform2(e))
- }),
- JsdocTypeKeyValue: (result, transform2) => ({
- type: "FieldType",
- key: makeName(result.key),
- value: result.right === void 0 ? void 0 : transform2(result.right)
- }),
- JsdocTypeNamePath: (result, transform2) => {
- let leftResult = transform2(result.left), rightValue;
- result.right.type === "JsdocTypeSpecialNamePath" ? rightValue = transform2(result.right).name : rightValue = quote(result.right.value, result.right.meta.quote);
- let joiner = result.pathType === "inner" ? "~" : result.pathType === "instance" ? "#" : ".";
- return makeName(`${leftResult.name}${joiner}${rightValue}`);
- },
- JsdocTypeSymbol: (result) => {
- let value = "", element = result.element, trailingDots = !1;
- return element?.type === "JsdocTypeVariadic" && (element.meta.position === "prefix" ? value = "..." : trailingDots = !0, element = element.element), element?.type === "JsdocTypeName" ? value += element.value : element?.type === "JsdocTypeNumber" && (value += element.value.toString()), trailingDots && (value += "..."), makeName(`${result.value}(${value})`);
- },
- JsdocTypeParenthesis: (result, transform2) => transform2(assertRootResult(result.element)),
- JsdocTypeMappedType: notAvailableTransform,
- JsdocTypeIndexSignature: notAvailableTransform,
- JsdocTypeImport: notAvailableTransform,
- JsdocTypeKeyof: notAvailableTransform,
- JsdocTypeTuple: notAvailableTransform,
- JsdocTypeTypeof: notAvailableTransform,
- JsdocTypeIntersection: notAvailableTransform,
- JsdocTypeProperty: notAvailableTransform,
- JsdocTypePredicate: notAvailableTransform,
- JsdocTypeAsserts: notAvailableTransform,
- JsdocTypeReadonlyArray: notAvailableTransform,
- JsdocTypeAssertsPlain: notAvailableTransform,
- JsdocTypeConditional: notAvailableTransform,
- JsdocTypeTypeParameter: notAvailableTransform
- };
- function catharsisTransform(result) {
- return transform(catharsisTransformRules, result);
- }
- function getQuoteStyle(quote2) {
- switch (quote2) {
- case void 0:
- return "none";
- case "single":
- return "single";
- case "double":
- return "double";
- }
- }
- function getMemberType(type5) {
- switch (type5) {
- case "inner":
- return "INNER_MEMBER";
- case "instance":
- return "INSTANCE_MEMBER";
- case "property":
- return "MEMBER";
- case "property-brackets":
- return "MEMBER";
- }
- }
- function nestResults(type5, results) {
- return results.length === 2 ? {
- type: type5,
- left: results[0],
- right: results[1]
- } : {
- type: type5,
- left: results[0],
- right: nestResults(type5, results.slice(1))
- };
- }
- let jtpRules = {
- JsdocTypeOptional: (result, transform2) => ({
- type: "OPTIONAL",
- value: transform2(result.element),
- meta: {
- syntax: result.meta.position === "prefix" ? "PREFIX_EQUAL_SIGN" : "SUFFIX_EQUALS_SIGN"
- }
- }),
- JsdocTypeNullable: (result, transform2) => ({
- type: "NULLABLE",
- value: transform2(result.element),
- meta: {
- syntax: result.meta.position === "prefix" ? "PREFIX_QUESTION_MARK" : "SUFFIX_QUESTION_MARK"
- }
- }),
- JsdocTypeNotNullable: (result, transform2) => ({
- type: "NOT_NULLABLE",
- value: transform2(result.element),
- meta: {
- syntax: result.meta.position === "prefix" ? "PREFIX_BANG" : "SUFFIX_BANG"
- }
- }),
- JsdocTypeVariadic: (result, transform2) => {
- let transformed = {
- type: "VARIADIC",
- meta: {
- syntax: result.meta.position === "prefix" ? "PREFIX_DOTS" : result.meta.position === "suffix" ? "SUFFIX_DOTS" : "ONLY_DOTS"
- }
- };
- return result.element !== void 0 && (transformed.value = transform2(result.element)), transformed;
- },
- JsdocTypeName: (result) => ({
- type: "NAME",
- name: result.value
- }),
- JsdocTypeTypeof: (result, transform2) => ({
- type: "TYPE_QUERY",
- name: transform2(result.element)
- }),
- JsdocTypeTuple: (result, transform2) => ({
- type: "TUPLE",
- entries: result.elements.map(transform2)
- }),
- JsdocTypeKeyof: (result, transform2) => ({
- type: "KEY_QUERY",
- value: transform2(result.element)
- }),
- JsdocTypeImport: (result) => ({
- type: "IMPORT",
- path: {
- type: "STRING_VALUE",
- quoteStyle: getQuoteStyle(result.element.meta.quote),
- string: result.element.value
- }
- }),
- JsdocTypeUndefined: () => ({
- type: "NAME",
- name: "undefined"
- }),
- JsdocTypeAny: () => ({
- type: "ANY"
- }),
- JsdocTypeFunction: (result, transform2) => {
- let specialParams = extractSpecialParams(result), transformed = {
- type: result.arrow ? "ARROW" : "FUNCTION",
- params: specialParams.params.map((param) => {
- if (param.type === "JsdocTypeKeyValue") {
- if (param.right === void 0)
- throw new Error("Function parameter without ':' is not expected to be 'KEY_VALUE'");
- return {
- type: "NAMED_PARAMETER",
- name: param.key,
- typeName: transform2(param.right)
- };
- } else
- return transform2(param);
- }),
- new: null,
- returns: null
- };
- return specialParams.this !== void 0 ? transformed.this = transform2(specialParams.this) : result.arrow || (transformed.this = null), specialParams.new !== void 0 && (transformed.new = transform2(specialParams.new)), result.returnType !== void 0 && (transformed.returns = transform2(result.returnType)), transformed;
- },
- JsdocTypeGeneric: (result, transform2) => {
- let transformed = {
- type: "GENERIC",
- subject: transform2(result.left),
- objects: result.elements.map(transform2),
- meta: {
- syntax: result.meta.brackets === "square" ? "SQUARE_BRACKET" : result.meta.dot ? "ANGLE_BRACKET_WITH_DOT" : "ANGLE_BRACKET"
- }
- };
- return result.meta.brackets === "square" && result.elements[0].type === "JsdocTypeFunction" && !result.elements[0].parenthesis && (transformed.objects[0] = {
- type: "NAME",
- name: "function"
- }), transformed;
- },
- JsdocTypeObjectField: (result, transform2) => {
- if (typeof result.key != "string")
- throw new Error("Index signatures and mapped types are not supported");
- if (result.right === void 0)
- return {
- type: "RECORD_ENTRY",
- key: result.key,
- quoteStyle: getQuoteStyle(result.meta.quote),
- value: null,
- readonly: !1
- };
- let right2 = transform2(result.right);
- return result.optional && (right2 = {
- type: "OPTIONAL",
- value: right2,
- meta: {
- syntax: "SUFFIX_KEY_QUESTION_MARK"
- }
- }), {
- type: "RECORD_ENTRY",
- key: result.key.toString(),
- quoteStyle: getQuoteStyle(result.meta.quote),
- value: right2,
- readonly: !1
- };
- },
- JsdocTypeJsdocObjectField: () => {
- throw new Error("Keys may not be typed in jsdoctypeparser.");
- },
- JsdocTypeKeyValue: (result, transform2) => {
- if (result.right === void 0)
- return {
- type: "RECORD_ENTRY",
- key: result.key,
- quoteStyle: "none",
- value: null,
- readonly: !1
- };
- let right2 = transform2(result.right);
- return result.optional && (right2 = {
- type: "OPTIONAL",
- value: right2,
- meta: {
- syntax: "SUFFIX_KEY_QUESTION_MARK"
- }
- }), {
- type: "RECORD_ENTRY",
- key: result.key,
- quoteStyle: "none",
- value: right2,
- readonly: !1
- };
- },
- JsdocTypeObject: (result, transform2) => {
- let entries = [];
- for (let field of result.elements)
- (field.type === "JsdocTypeObjectField" || field.type === "JsdocTypeJsdocObjectField") && entries.push(transform2(field));
- return {
- type: "RECORD",
- entries
- };
- },
- JsdocTypeSpecialNamePath: (result) => {
- if (result.specialType !== "module")
- throw new Error(`jsdoctypeparser does not support type ${result.specialType} at this point.`);
- return {
- type: "MODULE",
- value: {
- type: "FILE_PATH",
- quoteStyle: getQuoteStyle(result.meta.quote),
- path: result.value
- }
- };
- },
- JsdocTypeNamePath: (result, transform2) => {
- let hasEventPrefix = !1, name, quoteStyle;
- result.right.type === "JsdocTypeSpecialNamePath" && result.right.specialType === "event" ? (hasEventPrefix = !0, name = result.right.value, quoteStyle = getQuoteStyle(result.right.meta.quote)) : (name = result.right.value, quoteStyle = getQuoteStyle(result.right.meta.quote));
- let transformed = {
- type: getMemberType(result.pathType),
- owner: transform2(result.left),
- name,
- quoteStyle,
- hasEventPrefix
- };
- if (transformed.owner.type === "MODULE") {
- let tModule = transformed.owner;
- return transformed.owner = transformed.owner.value, tModule.value = transformed, tModule;
- } else
- return transformed;
- },
- JsdocTypeUnion: (result, transform2) => nestResults("UNION", result.elements.map(transform2)),
- JsdocTypeParenthesis: (result, transform2) => ({
- type: "PARENTHESIS",
- value: transform2(assertRootResult(result.element))
- }),
- JsdocTypeNull: () => ({
- type: "NAME",
- name: "null"
- }),
- JsdocTypeUnknown: () => ({
- type: "UNKNOWN"
- }),
- JsdocTypeStringValue: (result) => ({
- type: "STRING_VALUE",
- quoteStyle: getQuoteStyle(result.meta.quote),
- string: result.value
- }),
- JsdocTypeIntersection: (result, transform2) => nestResults("INTERSECTION", result.elements.map(transform2)),
- JsdocTypeNumber: (result) => ({
- type: "NUMBER_VALUE",
- number: result.value.toString()
- }),
- JsdocTypeSymbol: notAvailableTransform,
- JsdocTypeProperty: notAvailableTransform,
- JsdocTypePredicate: notAvailableTransform,
- JsdocTypeMappedType: notAvailableTransform,
- JsdocTypeIndexSignature: notAvailableTransform,
- JsdocTypeAsserts: notAvailableTransform,
- JsdocTypeReadonlyArray: notAvailableTransform,
- JsdocTypeAssertsPlain: notAvailableTransform,
- JsdocTypeConditional: notAvailableTransform,
- JsdocTypeTypeParameter: notAvailableTransform
- };
- function jtpTransform(result) {
- return transform(jtpRules, result);
- }
- function identityTransformRules() {
- return {
- JsdocTypeIntersection: (result, transform2) => ({
- type: "JsdocTypeIntersection",
- elements: result.elements.map(transform2)
- }),
- JsdocTypeGeneric: (result, transform2) => ({
- type: "JsdocTypeGeneric",
- left: transform2(result.left),
- elements: result.elements.map(transform2),
- meta: {
- dot: result.meta.dot,
- brackets: result.meta.brackets
- }
- }),
- JsdocTypeNullable: (result) => result,
- JsdocTypeUnion: (result, transform2) => ({
- type: "JsdocTypeUnion",
- elements: result.elements.map(transform2)
- }),
- JsdocTypeUnknown: (result) => result,
- JsdocTypeUndefined: (result) => result,
- JsdocTypeTypeof: (result, transform2) => ({
- type: "JsdocTypeTypeof",
- element: transform2(result.element)
- }),
- JsdocTypeSymbol: (result, transform2) => {
- let transformed = {
- type: "JsdocTypeSymbol",
- value: result.value
- };
- return result.element !== void 0 && (transformed.element = transform2(result.element)), transformed;
- },
- JsdocTypeOptional: (result, transform2) => ({
- type: "JsdocTypeOptional",
- element: transform2(result.element),
- meta: {
- position: result.meta.position
- }
- }),
- JsdocTypeObject: (result, transform2) => ({
- type: "JsdocTypeObject",
- meta: {
- separator: "comma"
- },
- elements: result.elements.map(transform2)
- }),
- JsdocTypeNumber: (result) => result,
- JsdocTypeNull: (result) => result,
- JsdocTypeNotNullable: (result, transform2) => ({
- type: "JsdocTypeNotNullable",
- element: transform2(result.element),
- meta: {
- position: result.meta.position
- }
- }),
- JsdocTypeSpecialNamePath: (result) => result,
- JsdocTypeObjectField: (result, transform2) => ({
- type: "JsdocTypeObjectField",
- key: result.key,
- right: result.right === void 0 ? void 0 : transform2(result.right),
- optional: result.optional,
- readonly: result.readonly,
- meta: result.meta
- }),
- JsdocTypeJsdocObjectField: (result, transform2) => ({
- type: "JsdocTypeJsdocObjectField",
- left: transform2(result.left),
- right: transform2(result.right)
- }),
- JsdocTypeKeyValue: (result, transform2) => ({
- type: "JsdocTypeKeyValue",
- key: result.key,
- right: result.right === void 0 ? void 0 : transform2(result.right),
- optional: result.optional,
- variadic: result.variadic
- }),
- JsdocTypeImport: (result, transform2) => ({
- type: "JsdocTypeImport",
- element: transform2(result.element)
- }),
- JsdocTypeAny: (result) => result,
- JsdocTypeStringValue: (result) => result,
- JsdocTypeNamePath: (result) => result,
- JsdocTypeVariadic: (result, transform2) => {
- let transformed = {
- type: "JsdocTypeVariadic",
- meta: {
- position: result.meta.position,
- squareBrackets: result.meta.squareBrackets
- }
- };
- return result.element !== void 0 && (transformed.element = transform2(result.element)), transformed;
- },
- JsdocTypeTuple: (result, transform2) => ({
- type: "JsdocTypeTuple",
- elements: result.elements.map(transform2)
- }),
- JsdocTypeName: (result) => result,
- JsdocTypeFunction: (result, transform2) => {
- let transformed = {
- type: "JsdocTypeFunction",
- arrow: result.arrow,
- parameters: result.parameters.map(transform2),
- constructor: result.constructor,
- parenthesis: result.parenthesis
- };
- return result.returnType !== void 0 && (transformed.returnType = transform2(result.returnType)), transformed;
- },
- JsdocTypeKeyof: (result, transform2) => ({
- type: "JsdocTypeKeyof",
- element: transform2(result.element)
- }),
- JsdocTypeParenthesis: (result, transform2) => ({
- type: "JsdocTypeParenthesis",
- element: transform2(result.element)
- }),
- JsdocTypeProperty: (result) => result,
- JsdocTypePredicate: (result, transform2) => ({
- type: "JsdocTypePredicate",
- left: transform2(result.left),
- right: transform2(result.right)
- }),
- JsdocTypeIndexSignature: (result, transform2) => ({
- type: "JsdocTypeIndexSignature",
- key: result.key,
- right: transform2(result.right)
- }),
- JsdocTypeMappedType: (result, transform2) => ({
- type: "JsdocTypeMappedType",
- key: result.key,
- right: transform2(result.right)
- }),
- JsdocTypeAsserts: (result, transform2) => ({
- type: "JsdocTypeAsserts",
- left: transform2(result.left),
- right: transform2(result.right)
- }),
- JsdocTypeReadonlyArray: (result, transform2) => ({
- type: "JsdocTypeReadonlyArray",
- element: transform2(result.element)
- }),
- JsdocTypeAssertsPlain: (result, transform2) => ({
- type: "JsdocTypeAssertsPlain",
- element: transform2(result.element)
- }),
- JsdocTypeConditional: (result, transform2) => ({
- type: "JsdocTypeConditional",
- checksType: transform2(result.checksType),
- extendsType: transform2(result.extendsType),
- trueType: transform2(result.trueType),
- falseType: transform2(result.falseType)
- }),
- JsdocTypeTypeParameter: (result, transform2) => ({
- type: "JsdocTypeTypeParameter",
- name: transform2(result.name),
- constraint: result.constraint !== void 0 ? transform2(result.constraint) : void 0,
- defaultValue: result.defaultValue !== void 0 ? transform2(result.defaultValue) : void 0
- })
- };
- }
- let visitorKeys = {
- JsdocTypeAny: [],
- JsdocTypeFunction: ["parameters", "returnType"],
- JsdocTypeGeneric: ["left", "elements"],
- JsdocTypeImport: [],
- JsdocTypeIndexSignature: ["right"],
- JsdocTypeIntersection: ["elements"],
- JsdocTypeKeyof: ["element"],
- JsdocTypeKeyValue: ["right"],
- JsdocTypeMappedType: ["right"],
- JsdocTypeName: [],
- JsdocTypeNamePath: ["left", "right"],
- JsdocTypeNotNullable: ["element"],
- JsdocTypeNull: [],
- JsdocTypeNullable: ["element"],
- JsdocTypeNumber: [],
- JsdocTypeObject: ["elements"],
- JsdocTypeObjectField: ["right"],
- JsdocTypeJsdocObjectField: ["left", "right"],
- JsdocTypeOptional: ["element"],
- JsdocTypeParenthesis: ["element"],
- JsdocTypeSpecialNamePath: [],
- JsdocTypeStringValue: [],
- JsdocTypeSymbol: ["element"],
- JsdocTypeTuple: ["elements"],
- JsdocTypeTypeof: ["element"],
- JsdocTypeUndefined: [],
- JsdocTypeUnion: ["elements"],
- JsdocTypeUnknown: [],
- JsdocTypeVariadic: ["element"],
- JsdocTypeProperty: [],
- JsdocTypePredicate: ["left", "right"],
- JsdocTypeAsserts: ["left", "right"],
- JsdocTypeReadonlyArray: ["element"],
- JsdocTypeAssertsPlain: ["element"],
- JsdocTypeConditional: ["checksType", "extendsType", "trueType", "falseType"],
- JsdocTypeTypeParameter: ["name", "constraint", "defaultValue"]
- };
- function _traverse(node2, parentNode, property, onEnter, onLeave) {
- onEnter?.(node2, parentNode, property);
- let keysToVisit = visitorKeys[node2.type];
- for (let key of keysToVisit) {
- let value = node2[key];
- if (value !== void 0)
- if (Array.isArray(value))
- for (let element of value)
- _traverse(element, node2, key, onEnter, onLeave);
- else
- _traverse(value, node2, key, onEnter, onLeave);
- }
- onLeave?.(node2, parentNode, property);
- }
- function traverse(node2, onEnter, onLeave) {
- _traverse(node2, void 0, void 0, onEnter, onLeave);
- }
- exports2.catharsisTransform = catharsisTransform, exports2.identityTransformRules = identityTransformRules, exports2.jtpTransform = jtpTransform, exports2.parse = parse9, exports2.stringify = stringify8, exports2.stringifyRules = stringifyRules2, exports2.transform = transform, exports2.traverse = traverse, exports2.tryParse = tryParse, exports2.visitorKeys = visitorKeys;
- }));
- }
- });
-
- // ../../node_modules/min-indent/index.js
- var require_min_indent = __commonJS({
- "../../node_modules/min-indent/index.js"(exports, module2) {
- "use strict";
- module2.exports = (string) => {
- let match3 = string.match(/^[ \t]*(?=\S)/gm);
- return match3 ? match3.reduce((r2, a3) => Math.min(r2, a3.length), 1 / 0) : 0;
- };
- }
- });
-
- // ../../node_modules/strip-indent/index.js
- var require_strip_indent = __commonJS({
- "../../node_modules/strip-indent/index.js"(exports, module2) {
- "use strict";
- var minIndent = require_min_indent();
- module2.exports = (string) => {
- let indent2 = minIndent(string);
- if (indent2 === 0)
- return string;
- let regex = new RegExp(`^[ \\t]{${indent2}}`, "gm");
- return string.replace(regex, "");
- };
- }
- });
-
- // ../../node_modules/indent-string/index.js
- var require_indent_string = __commonJS({
- "../../node_modules/indent-string/index.js"(exports, module2) {
- "use strict";
- module2.exports = (string, count = 1, options) => {
- if (options = {
- indent: " ",
- includeEmptyLines: !1,
- ...options
- }, typeof string != "string")
- throw new TypeError(
- `Expected \`input\` to be a \`string\`, got \`${typeof string}\``
- );
- if (typeof count != "number")
- throw new TypeError(
- `Expected \`count\` to be a \`number\`, got \`${typeof count}\``
- );
- if (typeof options.indent != "string")
- throw new TypeError(
- `Expected \`options.indent\` to be a \`string\`, got \`${typeof options.indent}\``
- );
- if (count === 0)
- return string;
- let regex = options.includeEmptyLines ? /^/gm : /^(?!\s*$)/gm;
- return string.replace(regex, options.indent.repeat(count));
- };
- }
- });
-
- // ../../node_modules/redent/index.js
- var require_redent = __commonJS({
- "../../node_modules/redent/index.js"(exports, module2) {
- "use strict";
- var stripIndent = require_strip_indent(), indentString = require_indent_string();
- module2.exports = (string, count = 0, options) => indentString(stripIndent(string), count, options);
- }
- });
-
- // ../../node_modules/aria-query/lib/util/iteratorProxy.js
- var require_iteratorProxy = __commonJS({
- "../../node_modules/aria-query/lib/util/iteratorProxy.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- function iteratorProxy() {
- var values = this, index4 = 0, iter = {
- "@@iterator": function() {
- return iter;
- },
- next: function() {
- if (index4 < values.length) {
- var value = values[index4];
- return index4 = index4 + 1, {
- done: !1,
- value
- };
- } else
- return {
- done: !0
- };
- }
- };
- return iter;
- }
- var _default = exports.default = iteratorProxy;
- }
- });
-
- // ../../node_modules/aria-query/lib/util/iterationDecorator.js
- var require_iterationDecorator = __commonJS({
- "../../node_modules/aria-query/lib/util/iterationDecorator.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = iterationDecorator;
- var _iteratorProxy = _interopRequireDefault(require_iteratorProxy());
- function _interopRequireDefault(e) {
- return e && e.__esModule ? e : { default: e };
- }
- function _typeof6(o) {
- "@babel/helpers - typeof";
- return _typeof6 = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(o2) {
- return typeof o2;
- } : function(o2) {
- return o2 && typeof Symbol == "function" && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2;
- }, _typeof6(o);
- }
- function iterationDecorator(collection, entries) {
- return typeof Symbol == "function" && _typeof6(Symbol.iterator) === "symbol" && Object.defineProperty(collection, Symbol.iterator, {
- value: _iteratorProxy.default.bind(entries)
- }), collection;
- }
- }
- });
-
- // ../../node_modules/aria-query/lib/ariaPropsMap.js
- var require_ariaPropsMap = __commonJS({
- "../../node_modules/aria-query/lib/ariaPropsMap.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var _iterationDecorator = _interopRequireDefault(require_iterationDecorator());
- function _interopRequireDefault(e) {
- return e && e.__esModule ? e : { default: e };
- }
- function _slicedToArray(r2, e) {
- return _arrayWithHoles(r2) || _iterableToArrayLimit(r2, e) || _unsupportedIterableToArray2(r2, e) || _nonIterableRest();
- }
- function _nonIterableRest() {
- throw new TypeError(`Invalid attempt to destructure non-iterable instance.
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
- }
- function _unsupportedIterableToArray2(r2, a3) {
- if (r2) {
- if (typeof r2 == "string") return _arrayLikeToArray2(r2, a3);
- var t = {}.toString.call(r2).slice(8, -1);
- return t === "Object" && r2.constructor && (t = r2.constructor.name), t === "Map" || t === "Set" ? Array.from(r2) : t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray2(r2, a3) : void 0;
- }
- }
- function _arrayLikeToArray2(r2, a3) {
- (a3 == null || a3 > r2.length) && (a3 = r2.length);
- for (var e = 0, n = Array(a3); e < a3; e++) n[e] = r2[e];
- return n;
- }
- function _iterableToArrayLimit(r2, l) {
- var t = r2 == null ? null : typeof Symbol < "u" && r2[Symbol.iterator] || r2["@@iterator"];
- if (t != null) {
- var e, n, i, u2, a3 = [], f4 = !0, o = !1;
- try {
- if (i = (t = t.call(r2)).next, l === 0) {
- if (Object(t) !== t) return;
- f4 = !1;
- } else for (; !(f4 = (e = i.call(t)).done) && (a3.push(e.value), a3.length !== l); f4 = !0) ;
- } catch (r3) {
- o = !0, n = r3;
- } finally {
- try {
- if (!f4 && t.return != null && (u2 = t.return(), Object(u2) !== u2)) return;
- } finally {
- if (o) throw n;
- }
- }
- return a3;
- }
- }
- function _arrayWithHoles(r2) {
- if (Array.isArray(r2)) return r2;
- }
- var properties = [["aria-activedescendant", {
- type: "id"
- }], ["aria-atomic", {
- type: "boolean"
- }], ["aria-autocomplete", {
- type: "token",
- values: ["inline", "list", "both", "none"]
- }], ["aria-braillelabel", {
- type: "string"
- }], ["aria-brailleroledescription", {
- type: "string"
- }], ["aria-busy", {
- type: "boolean"
- }], ["aria-checked", {
- type: "tristate"
- }], ["aria-colcount", {
- type: "integer"
- }], ["aria-colindex", {
- type: "integer"
- }], ["aria-colspan", {
- type: "integer"
- }], ["aria-controls", {
- type: "idlist"
- }], ["aria-current", {
- type: "token",
- values: ["page", "step", "location", "date", "time", !0, !1]
- }], ["aria-describedby", {
- type: "idlist"
- }], ["aria-description", {
- type: "string"
- }], ["aria-details", {
- type: "id"
- }], ["aria-disabled", {
- type: "boolean"
- }], ["aria-dropeffect", {
- type: "tokenlist",
- values: ["copy", "execute", "link", "move", "none", "popup"]
- }], ["aria-errormessage", {
- type: "id"
- }], ["aria-expanded", {
- type: "boolean",
- allowundefined: !0
- }], ["aria-flowto", {
- type: "idlist"
- }], ["aria-grabbed", {
- type: "boolean",
- allowundefined: !0
- }], ["aria-haspopup", {
- type: "token",
- values: [!1, !0, "menu", "listbox", "tree", "grid", "dialog"]
- }], ["aria-hidden", {
- type: "boolean",
- allowundefined: !0
- }], ["aria-invalid", {
- type: "token",
- values: ["grammar", !1, "spelling", !0]
- }], ["aria-keyshortcuts", {
- type: "string"
- }], ["aria-label", {
- type: "string"
- }], ["aria-labelledby", {
- type: "idlist"
- }], ["aria-level", {
- type: "integer"
- }], ["aria-live", {
- type: "token",
- values: ["assertive", "off", "polite"]
- }], ["aria-modal", {
- type: "boolean"
- }], ["aria-multiline", {
- type: "boolean"
- }], ["aria-multiselectable", {
- type: "boolean"
- }], ["aria-orientation", {
- type: "token",
- values: ["vertical", "undefined", "horizontal"]
- }], ["aria-owns", {
- type: "idlist"
- }], ["aria-placeholder", {
- type: "string"
- }], ["aria-posinset", {
- type: "integer"
- }], ["aria-pressed", {
- type: "tristate"
- }], ["aria-readonly", {
- type: "boolean"
- }], ["aria-relevant", {
- type: "tokenlist",
- values: ["additions", "all", "removals", "text"]
- }], ["aria-required", {
- type: "boolean"
- }], ["aria-roledescription", {
- type: "string"
- }], ["aria-rowcount", {
- type: "integer"
- }], ["aria-rowindex", {
- type: "integer"
- }], ["aria-rowspan", {
- type: "integer"
- }], ["aria-selected", {
- type: "boolean",
- allowundefined: !0
- }], ["aria-setsize", {
- type: "integer"
- }], ["aria-sort", {
- type: "token",
- values: ["ascending", "descending", "none", "other"]
- }], ["aria-valuemax", {
- type: "number"
- }], ["aria-valuemin", {
- type: "number"
- }], ["aria-valuenow", {
- type: "number"
- }], ["aria-valuetext", {
- type: "string"
- }]], ariaPropsMap = {
- entries: function() {
- return properties;
- },
- forEach: function(fn4) {
- for (var thisArg = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null, _i = 0, _properties = properties; _i < _properties.length; _i++) {
- var _properties$_i = _slicedToArray(_properties[_i], 2), key = _properties$_i[0], values = _properties$_i[1];
- fn4.call(thisArg, values, key, properties);
- }
- },
- get: function(key) {
- var item = properties.filter(function(tuple) {
- return tuple[0] === key;
- })[0];
- return item && item[1];
- },
- has: function(key) {
- return !!ariaPropsMap.get(key);
- },
- keys: function() {
- return properties.map(function(_ref) {
- var _ref2 = _slicedToArray(_ref, 1), key = _ref2[0];
- return key;
- });
- },
- values: function() {
- return properties.map(function(_ref3) {
- var _ref4 = _slicedToArray(_ref3, 2), values2 = _ref4[1];
- return values2;
- });
- }
- }, _default = exports.default = (0, _iterationDecorator.default)(ariaPropsMap, ariaPropsMap.entries());
- }
- });
-
- // ../../node_modules/aria-query/lib/domMap.js
- var require_domMap = __commonJS({
- "../../node_modules/aria-query/lib/domMap.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var _iterationDecorator = _interopRequireDefault(require_iterationDecorator());
- function _interopRequireDefault(e) {
- return e && e.__esModule ? e : { default: e };
- }
- function _slicedToArray(r2, e) {
- return _arrayWithHoles(r2) || _iterableToArrayLimit(r2, e) || _unsupportedIterableToArray2(r2, e) || _nonIterableRest();
- }
- function _nonIterableRest() {
- throw new TypeError(`Invalid attempt to destructure non-iterable instance.
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
- }
- function _unsupportedIterableToArray2(r2, a3) {
- if (r2) {
- if (typeof r2 == "string") return _arrayLikeToArray2(r2, a3);
- var t = {}.toString.call(r2).slice(8, -1);
- return t === "Object" && r2.constructor && (t = r2.constructor.name), t === "Map" || t === "Set" ? Array.from(r2) : t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray2(r2, a3) : void 0;
- }
- }
- function _arrayLikeToArray2(r2, a3) {
- (a3 == null || a3 > r2.length) && (a3 = r2.length);
- for (var e = 0, n = Array(a3); e < a3; e++) n[e] = r2[e];
- return n;
- }
- function _iterableToArrayLimit(r2, l) {
- var t = r2 == null ? null : typeof Symbol < "u" && r2[Symbol.iterator] || r2["@@iterator"];
- if (t != null) {
- var e, n, i, u2, a3 = [], f4 = !0, o = !1;
- try {
- if (i = (t = t.call(r2)).next, l === 0) {
- if (Object(t) !== t) return;
- f4 = !1;
- } else for (; !(f4 = (e = i.call(t)).done) && (a3.push(e.value), a3.length !== l); f4 = !0) ;
- } catch (r3) {
- o = !0, n = r3;
- } finally {
- try {
- if (!f4 && t.return != null && (u2 = t.return(), Object(u2) !== u2)) return;
- } finally {
- if (o) throw n;
- }
- }
- return a3;
- }
- }
- function _arrayWithHoles(r2) {
- if (Array.isArray(r2)) return r2;
- }
- var dom = [["a", {
- reserved: !1
- }], ["abbr", {
- reserved: !1
- }], ["acronym", {
- reserved: !1
- }], ["address", {
- reserved: !1
- }], ["applet", {
- reserved: !1
- }], ["area", {
- reserved: !1
- }], ["article", {
- reserved: !1
- }], ["aside", {
- reserved: !1
- }], ["audio", {
- reserved: !1
- }], ["b", {
- reserved: !1
- }], ["base", {
- reserved: !0
- }], ["bdi", {
- reserved: !1
- }], ["bdo", {
- reserved: !1
- }], ["big", {
- reserved: !1
- }], ["blink", {
- reserved: !1
- }], ["blockquote", {
- reserved: !1
- }], ["body", {
- reserved: !1
- }], ["br", {
- reserved: !1
- }], ["button", {
- reserved: !1
- }], ["canvas", {
- reserved: !1
- }], ["caption", {
- reserved: !1
- }], ["center", {
- reserved: !1
- }], ["cite", {
- reserved: !1
- }], ["code", {
- reserved: !1
- }], ["col", {
- reserved: !0
- }], ["colgroup", {
- reserved: !0
- }], ["content", {
- reserved: !1
- }], ["data", {
- reserved: !1
- }], ["datalist", {
- reserved: !1
- }], ["dd", {
- reserved: !1
- }], ["del", {
- reserved: !1
- }], ["details", {
- reserved: !1
- }], ["dfn", {
- reserved: !1
- }], ["dialog", {
- reserved: !1
- }], ["dir", {
- reserved: !1
- }], ["div", {
- reserved: !1
- }], ["dl", {
- reserved: !1
- }], ["dt", {
- reserved: !1
- }], ["em", {
- reserved: !1
- }], ["embed", {
- reserved: !1
- }], ["fieldset", {
- reserved: !1
- }], ["figcaption", {
- reserved: !1
- }], ["figure", {
- reserved: !1
- }], ["font", {
- reserved: !1
- }], ["footer", {
- reserved: !1
- }], ["form", {
- reserved: !1
- }], ["frame", {
- reserved: !1
- }], ["frameset", {
- reserved: !1
- }], ["h1", {
- reserved: !1
- }], ["h2", {
- reserved: !1
- }], ["h3", {
- reserved: !1
- }], ["h4", {
- reserved: !1
- }], ["h5", {
- reserved: !1
- }], ["h6", {
- reserved: !1
- }], ["head", {
- reserved: !0
- }], ["header", {
- reserved: !1
- }], ["hgroup", {
- reserved: !1
- }], ["hr", {
- reserved: !1
- }], ["html", {
- reserved: !0
- }], ["i", {
- reserved: !1
- }], ["iframe", {
- reserved: !1
- }], ["img", {
- reserved: !1
- }], ["input", {
- reserved: !1
- }], ["ins", {
- reserved: !1
- }], ["kbd", {
- reserved: !1
- }], ["keygen", {
- reserved: !1
- }], ["label", {
- reserved: !1
- }], ["legend", {
- reserved: !1
- }], ["li", {
- reserved: !1
- }], ["link", {
- reserved: !0
- }], ["main", {
- reserved: !1
- }], ["map", {
- reserved: !1
- }], ["mark", {
- reserved: !1
- }], ["marquee", {
- reserved: !1
- }], ["menu", {
- reserved: !1
- }], ["menuitem", {
- reserved: !1
- }], ["meta", {
- reserved: !0
- }], ["meter", {
- reserved: !1
- }], ["nav", {
- reserved: !1
- }], ["noembed", {
- reserved: !0
- }], ["noscript", {
- reserved: !0
- }], ["object", {
- reserved: !1
- }], ["ol", {
- reserved: !1
- }], ["optgroup", {
- reserved: !1
- }], ["option", {
- reserved: !1
- }], ["output", {
- reserved: !1
- }], ["p", {
- reserved: !1
- }], ["param", {
- reserved: !0
- }], ["picture", {
- reserved: !0
- }], ["pre", {
- reserved: !1
- }], ["progress", {
- reserved: !1
- }], ["q", {
- reserved: !1
- }], ["rp", {
- reserved: !1
- }], ["rt", {
- reserved: !1
- }], ["rtc", {
- reserved: !1
- }], ["ruby", {
- reserved: !1
- }], ["s", {
- reserved: !1
- }], ["samp", {
- reserved: !1
- }], ["script", {
- reserved: !0
- }], ["section", {
- reserved: !1
- }], ["select", {
- reserved: !1
- }], ["small", {
- reserved: !1
- }], ["source", {
- reserved: !0
- }], ["spacer", {
- reserved: !1
- }], ["span", {
- reserved: !1
- }], ["strike", {
- reserved: !1
- }], ["strong", {
- reserved: !1
- }], ["style", {
- reserved: !0
- }], ["sub", {
- reserved: !1
- }], ["summary", {
- reserved: !1
- }], ["sup", {
- reserved: !1
- }], ["table", {
- reserved: !1
- }], ["tbody", {
- reserved: !1
- }], ["td", {
- reserved: !1
- }], ["textarea", {
- reserved: !1
- }], ["tfoot", {
- reserved: !1
- }], ["th", {
- reserved: !1
- }], ["thead", {
- reserved: !1
- }], ["time", {
- reserved: !1
- }], ["title", {
- reserved: !0
- }], ["tr", {
- reserved: !1
- }], ["track", {
- reserved: !0
- }], ["tt", {
- reserved: !1
- }], ["u", {
- reserved: !1
- }], ["ul", {
- reserved: !1
- }], ["var", {
- reserved: !1
- }], ["video", {
- reserved: !1
- }], ["wbr", {
- reserved: !1
- }], ["xmp", {
- reserved: !1
- }]], domMap = {
- entries: function() {
- return dom;
- },
- forEach: function(fn4) {
- for (var thisArg = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null, _i = 0, _dom = dom; _i < _dom.length; _i++) {
- var _dom$_i = _slicedToArray(_dom[_i], 2), key = _dom$_i[0], values = _dom$_i[1];
- fn4.call(thisArg, values, key, dom);
- }
- },
- get: function(key) {
- var item = dom.filter(function(tuple) {
- return tuple[0] === key;
- })[0];
- return item && item[1];
- },
- has: function(key) {
- return !!domMap.get(key);
- },
- keys: function() {
- return dom.map(function(_ref) {
- var _ref2 = _slicedToArray(_ref, 1), key = _ref2[0];
- return key;
- });
- },
- values: function() {
- return dom.map(function(_ref3) {
- var _ref4 = _slicedToArray(_ref3, 2), values2 = _ref4[1];
- return values2;
- });
- }
- }, _default = exports.default = (0, _iterationDecorator.default)(domMap, domMap.entries());
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/abstract/commandRole.js
- var require_commandRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/abstract/commandRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var commandRole = {
- abstract: !0,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {},
- relatedConcepts: [],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "widget"]]
- }, _default = exports.default = commandRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/abstract/compositeRole.js
- var require_compositeRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/abstract/compositeRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var compositeRole = {
- abstract: !0,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {
- "aria-activedescendant": null,
- "aria-disabled": null
- },
- relatedConcepts: [],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "widget"]]
- }, _default = exports.default = compositeRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/abstract/inputRole.js
- var require_inputRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/abstract/inputRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var inputRole = {
- abstract: !0,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {
- "aria-disabled": null
- },
- relatedConcepts: [{
- concept: {
- name: "input"
- },
- module: "XForms"
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "widget"]]
- }, _default = exports.default = inputRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/abstract/landmarkRole.js
- var require_landmarkRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/abstract/landmarkRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var landmarkRole = {
- abstract: !0,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {},
- relatedConcepts: [],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "structure", "section"]]
- }, _default = exports.default = landmarkRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/abstract/rangeRole.js
- var require_rangeRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/abstract/rangeRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var rangeRole = {
- abstract: !0,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {
- "aria-valuemax": null,
- "aria-valuemin": null,
- "aria-valuenow": null
- },
- relatedConcepts: [],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "structure"]]
- }, _default = exports.default = rangeRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/abstract/roletypeRole.js
- var require_roletypeRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/abstract/roletypeRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var roletypeRole = {
- abstract: !0,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: [],
- prohibitedProps: [],
- props: {
- "aria-atomic": null,
- "aria-busy": null,
- "aria-controls": null,
- "aria-current": null,
- "aria-describedby": null,
- "aria-details": null,
- "aria-dropeffect": null,
- "aria-flowto": null,
- "aria-grabbed": null,
- "aria-hidden": null,
- "aria-keyshortcuts": null,
- "aria-label": null,
- "aria-labelledby": null,
- "aria-live": null,
- "aria-owns": null,
- "aria-relevant": null,
- "aria-roledescription": null
- },
- relatedConcepts: [{
- concept: {
- name: "role"
- },
- module: "XHTML"
- }, {
- concept: {
- name: "type"
- },
- module: "Dublin Core"
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: []
- }, _default = exports.default = roletypeRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/abstract/sectionRole.js
- var require_sectionRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/abstract/sectionRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var sectionRole = {
- abstract: !0,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: [],
- prohibitedProps: [],
- props: {},
- relatedConcepts: [{
- concept: {
- name: "frontmatter"
- },
- module: "DTB"
- }, {
- concept: {
- name: "level"
- },
- module: "DTB"
- }, {
- concept: {
- name: "level"
- },
- module: "SMIL"
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "structure"]]
- }, _default = exports.default = sectionRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/abstract/sectionheadRole.js
- var require_sectionheadRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/abstract/sectionheadRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var sectionheadRole = {
- abstract: !0,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author", "contents"],
- prohibitedProps: [],
- props: {},
- relatedConcepts: [],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "structure"]]
- }, _default = exports.default = sectionheadRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/abstract/selectRole.js
- var require_selectRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/abstract/selectRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var selectRole = {
- abstract: !0,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {
- "aria-orientation": null
- },
- relatedConcepts: [],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "widget", "composite"], ["roletype", "structure", "section", "group"]]
- }, _default = exports.default = selectRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/abstract/structureRole.js
- var require_structureRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/abstract/structureRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var structureRole = {
- abstract: !0,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: [],
- prohibitedProps: [],
- props: {},
- relatedConcepts: [],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype"]]
- }, _default = exports.default = structureRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/abstract/widgetRole.js
- var require_widgetRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/abstract/widgetRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var widgetRole = {
- abstract: !0,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: [],
- prohibitedProps: [],
- props: {},
- relatedConcepts: [],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype"]]
- }, _default = exports.default = widgetRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/abstract/windowRole.js
- var require_windowRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/abstract/windowRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var windowRole = {
- abstract: !0,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {
- "aria-modal": null
- },
- relatedConcepts: [],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype"]]
- }, _default = exports.default = windowRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/ariaAbstractRoles.js
- var require_ariaAbstractRoles = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/ariaAbstractRoles.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var _commandRole = _interopRequireDefault(require_commandRole()), _compositeRole = _interopRequireDefault(require_compositeRole()), _inputRole = _interopRequireDefault(require_inputRole()), _landmarkRole = _interopRequireDefault(require_landmarkRole()), _rangeRole = _interopRequireDefault(require_rangeRole()), _roletypeRole = _interopRequireDefault(require_roletypeRole()), _sectionRole = _interopRequireDefault(require_sectionRole()), _sectionheadRole = _interopRequireDefault(require_sectionheadRole()), _selectRole = _interopRequireDefault(require_selectRole()), _structureRole = _interopRequireDefault(require_structureRole()), _widgetRole = _interopRequireDefault(require_widgetRole()), _windowRole = _interopRequireDefault(require_windowRole());
- function _interopRequireDefault(e) {
- return e && e.__esModule ? e : { default: e };
- }
- var ariaAbstractRoles = [["command", _commandRole.default], ["composite", _compositeRole.default], ["input", _inputRole.default], ["landmark", _landmarkRole.default], ["range", _rangeRole.default], ["roletype", _roletypeRole.default], ["section", _sectionRole.default], ["sectionhead", _sectionheadRole.default], ["select", _selectRole.default], ["structure", _structureRole.default], ["widget", _widgetRole.default], ["window", _windowRole.default]], _default = exports.default = ariaAbstractRoles;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/literal/alertRole.js
- var require_alertRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/literal/alertRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var alertRole = {
- abstract: !1,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {
- "aria-atomic": "true",
- "aria-live": "assertive"
- },
- relatedConcepts: [{
- concept: {
- name: "alert"
- },
- module: "XForms"
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "structure", "section"]]
- }, _default = exports.default = alertRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/literal/alertdialogRole.js
- var require_alertdialogRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/literal/alertdialogRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var alertdialogRole = {
- abstract: !1,
- accessibleNameRequired: !0,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {},
- relatedConcepts: [{
- concept: {
- name: "alert"
- },
- module: "XForms"
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "structure", "section", "alert"], ["roletype", "window", "dialog"]]
- }, _default = exports.default = alertdialogRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/literal/applicationRole.js
- var require_applicationRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/literal/applicationRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var applicationRole = {
- abstract: !1,
- accessibleNameRequired: !0,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {
- "aria-activedescendant": null,
- "aria-disabled": null,
- "aria-errormessage": null,
- "aria-expanded": null,
- "aria-haspopup": null,
- "aria-invalid": null
- },
- relatedConcepts: [{
- concept: {
- name: "Device Independence Delivery Unit"
- }
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "structure"]]
- }, _default = exports.default = applicationRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/literal/articleRole.js
- var require_articleRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/literal/articleRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var articleRole = {
- abstract: !1,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {
- "aria-posinset": null,
- "aria-setsize": null
- },
- relatedConcepts: [{
- concept: {
- name: "article"
- },
- module: "HTML"
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "structure", "document"]]
- }, _default = exports.default = articleRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/literal/bannerRole.js
- var require_bannerRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/literal/bannerRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var bannerRole = {
- abstract: !1,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {},
- relatedConcepts: [{
- concept: {
- constraints: ["scoped to the body element"],
- name: "header"
- },
- module: "HTML"
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "structure", "section", "landmark"]]
- }, _default = exports.default = bannerRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/literal/blockquoteRole.js
- var require_blockquoteRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/literal/blockquoteRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var blockquoteRole = {
- abstract: !1,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {},
- relatedConcepts: [{
- concept: {
- name: "blockquote"
- },
- module: "HTML"
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "structure", "section"]]
- }, _default = exports.default = blockquoteRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/literal/buttonRole.js
- var require_buttonRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/literal/buttonRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var buttonRole = {
- abstract: !1,
- accessibleNameRequired: !0,
- baseConcepts: [],
- childrenPresentational: !0,
- nameFrom: ["author", "contents"],
- prohibitedProps: [],
- props: {
- "aria-disabled": null,
- "aria-expanded": null,
- "aria-haspopup": null,
- "aria-pressed": null
- },
- relatedConcepts: [{
- concept: {
- attributes: [{
- name: "type",
- value: "button"
- }],
- name: "input"
- },
- module: "HTML"
- }, {
- concept: {
- attributes: [{
- name: "type",
- value: "image"
- }],
- name: "input"
- },
- module: "HTML"
- }, {
- concept: {
- attributes: [{
- name: "type",
- value: "reset"
- }],
- name: "input"
- },
- module: "HTML"
- }, {
- concept: {
- attributes: [{
- name: "type",
- value: "submit"
- }],
- name: "input"
- },
- module: "HTML"
- }, {
- concept: {
- name: "button"
- },
- module: "HTML"
- }, {
- concept: {
- name: "trigger"
- },
- module: "XForms"
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "widget", "command"]]
- }, _default = exports.default = buttonRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/literal/captionRole.js
- var require_captionRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/literal/captionRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var captionRole = {
- abstract: !1,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["prohibited"],
- prohibitedProps: ["aria-label", "aria-labelledby"],
- props: {},
- relatedConcepts: [{
- concept: {
- name: "caption"
- },
- module: "HTML"
- }],
- requireContextRole: ["figure", "grid", "table"],
- requiredContextRole: ["figure", "grid", "table"],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "structure", "section"]]
- }, _default = exports.default = captionRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/literal/cellRole.js
- var require_cellRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/literal/cellRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var cellRole = {
- abstract: !1,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author", "contents"],
- prohibitedProps: [],
- props: {
- "aria-colindex": null,
- "aria-colspan": null,
- "aria-rowindex": null,
- "aria-rowspan": null
- },
- relatedConcepts: [{
- concept: {
- constraints: ["ancestor table element has table role"],
- name: "td"
- },
- module: "HTML"
- }],
- requireContextRole: ["row"],
- requiredContextRole: ["row"],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "structure", "section"]]
- }, _default = exports.default = cellRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/literal/checkboxRole.js
- var require_checkboxRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/literal/checkboxRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var checkboxRole = {
- abstract: !1,
- accessibleNameRequired: !0,
- baseConcepts: [],
- childrenPresentational: !0,
- nameFrom: ["author", "contents"],
- prohibitedProps: [],
- props: {
- "aria-checked": null,
- "aria-errormessage": null,
- "aria-expanded": null,
- "aria-invalid": null,
- "aria-readonly": null,
- "aria-required": null
- },
- relatedConcepts: [{
- concept: {
- attributes: [{
- name: "type",
- value: "checkbox"
- }],
- name: "input"
- },
- module: "HTML"
- }, {
- concept: {
- name: "option"
- },
- module: "ARIA"
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {
- "aria-checked": null
- },
- superClass: [["roletype", "widget", "input"]]
- }, _default = exports.default = checkboxRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/literal/codeRole.js
- var require_codeRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/literal/codeRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var codeRole = {
- abstract: !1,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["prohibited"],
- prohibitedProps: ["aria-label", "aria-labelledby"],
- props: {},
- relatedConcepts: [{
- concept: {
- name: "code"
- },
- module: "HTML"
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "structure", "section"]]
- }, _default = exports.default = codeRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/literal/columnheaderRole.js
- var require_columnheaderRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/literal/columnheaderRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var columnheaderRole = {
- abstract: !1,
- accessibleNameRequired: !0,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author", "contents"],
- prohibitedProps: [],
- props: {
- "aria-sort": null
- },
- relatedConcepts: [{
- concept: {
- name: "th"
- },
- module: "HTML"
- }, {
- concept: {
- attributes: [{
- name: "scope",
- value: "col"
- }],
- name: "th"
- },
- module: "HTML"
- }, {
- concept: {
- attributes: [{
- name: "scope",
- value: "colgroup"
- }],
- name: "th"
- },
- module: "HTML"
- }],
- requireContextRole: ["row"],
- requiredContextRole: ["row"],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "structure", "section", "cell"], ["roletype", "structure", "section", "cell", "gridcell"], ["roletype", "widget", "gridcell"], ["roletype", "structure", "sectionhead"]]
- }, _default = exports.default = columnheaderRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/literal/comboboxRole.js
- var require_comboboxRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/literal/comboboxRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var comboboxRole = {
- abstract: !1,
- accessibleNameRequired: !0,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {
- "aria-activedescendant": null,
- "aria-autocomplete": null,
- "aria-errormessage": null,
- "aria-invalid": null,
- "aria-readonly": null,
- "aria-required": null,
- "aria-expanded": "false",
- "aria-haspopup": "listbox"
- },
- relatedConcepts: [{
- concept: {
- attributes: [{
- constraints: ["set"],
- name: "list"
- }, {
- name: "type",
- value: "email"
- }],
- name: "input"
- },
- module: "HTML"
- }, {
- concept: {
- attributes: [{
- constraints: ["set"],
- name: "list"
- }, {
- name: "type",
- value: "search"
- }],
- name: "input"
- },
- module: "HTML"
- }, {
- concept: {
- attributes: [{
- constraints: ["set"],
- name: "list"
- }, {
- name: "type",
- value: "tel"
- }],
- name: "input"
- },
- module: "HTML"
- }, {
- concept: {
- attributes: [{
- constraints: ["set"],
- name: "list"
- }, {
- name: "type",
- value: "text"
- }],
- name: "input"
- },
- module: "HTML"
- }, {
- concept: {
- attributes: [{
- constraints: ["set"],
- name: "list"
- }, {
- name: "type",
- value: "url"
- }],
- name: "input"
- },
- module: "HTML"
- }, {
- concept: {
- attributes: [{
- constraints: ["set"],
- name: "list"
- }, {
- name: "type",
- value: "url"
- }],
- name: "input"
- },
- module: "HTML"
- }, {
- concept: {
- attributes: [{
- constraints: ["undefined"],
- name: "multiple"
- }, {
- constraints: ["undefined"],
- name: "size"
- }],
- constraints: ["the multiple attribute is not set and the size attribute does not have a value greater than 1"],
- name: "select"
- },
- module: "HTML"
- }, {
- concept: {
- name: "select"
- },
- module: "XForms"
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {
- "aria-controls": null,
- "aria-expanded": "false"
- },
- superClass: [["roletype", "widget", "input"]]
- }, _default = exports.default = comboboxRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/literal/complementaryRole.js
- var require_complementaryRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/literal/complementaryRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var complementaryRole = {
- abstract: !1,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {},
- relatedConcepts: [{
- concept: {
- constraints: ["scoped to the body element", "scoped to the main element"],
- name: "aside"
- },
- module: "HTML"
- }, {
- concept: {
- attributes: [{
- constraints: ["set"],
- name: "aria-label"
- }],
- constraints: ["scoped to a sectioning content element", "scoped to a sectioning root element other than body"],
- name: "aside"
- },
- module: "HTML"
- }, {
- concept: {
- attributes: [{
- constraints: ["set"],
- name: "aria-labelledby"
- }],
- constraints: ["scoped to a sectioning content element", "scoped to a sectioning root element other than body"],
- name: "aside"
- },
- module: "HTML"
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "structure", "section", "landmark"]]
- }, _default = exports.default = complementaryRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/literal/contentinfoRole.js
- var require_contentinfoRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/literal/contentinfoRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var contentinfoRole = {
- abstract: !1,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {},
- relatedConcepts: [{
- concept: {
- constraints: ["scoped to the body element"],
- name: "footer"
- },
- module: "HTML"
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "structure", "section", "landmark"]]
- }, _default = exports.default = contentinfoRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/literal/definitionRole.js
- var require_definitionRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/literal/definitionRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var definitionRole = {
- abstract: !1,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {},
- relatedConcepts: [{
- concept: {
- name: "dd"
- },
- module: "HTML"
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "structure", "section"]]
- }, _default = exports.default = definitionRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/literal/deletionRole.js
- var require_deletionRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/literal/deletionRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var deletionRole = {
- abstract: !1,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["prohibited"],
- prohibitedProps: ["aria-label", "aria-labelledby"],
- props: {},
- relatedConcepts: [{
- concept: {
- name: "del"
- },
- module: "HTML"
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "structure", "section"]]
- }, _default = exports.default = deletionRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/literal/dialogRole.js
- var require_dialogRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/literal/dialogRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var dialogRole = {
- abstract: !1,
- accessibleNameRequired: !0,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {},
- relatedConcepts: [{
- concept: {
- name: "dialog"
- },
- module: "HTML"
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "window"]]
- }, _default = exports.default = dialogRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/literal/directoryRole.js
- var require_directoryRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/literal/directoryRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var directoryRole = {
- abstract: !1,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {},
- relatedConcepts: [{
- module: "DAISY Guide"
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "structure", "section", "list"]]
- }, _default = exports.default = directoryRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/literal/documentRole.js
- var require_documentRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/literal/documentRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var documentRole = {
- abstract: !1,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {},
- relatedConcepts: [{
- concept: {
- name: "Device Independence Delivery Unit"
- }
- }, {
- concept: {
- name: "html"
- },
- module: "HTML"
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "structure"]]
- }, _default = exports.default = documentRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/literal/emphasisRole.js
- var require_emphasisRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/literal/emphasisRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var emphasisRole = {
- abstract: !1,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["prohibited"],
- prohibitedProps: ["aria-label", "aria-labelledby"],
- props: {},
- relatedConcepts: [{
- concept: {
- name: "em"
- },
- module: "HTML"
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "structure", "section"]]
- }, _default = exports.default = emphasisRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/literal/feedRole.js
- var require_feedRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/literal/feedRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var feedRole = {
- abstract: !1,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {},
- relatedConcepts: [],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [["article"]],
- requiredProps: {},
- superClass: [["roletype", "structure", "section", "list"]]
- }, _default = exports.default = feedRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/literal/figureRole.js
- var require_figureRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/literal/figureRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var figureRole = {
- abstract: !1,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {},
- relatedConcepts: [{
- concept: {
- name: "figure"
- },
- module: "HTML"
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "structure", "section"]]
- }, _default = exports.default = figureRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/literal/formRole.js
- var require_formRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/literal/formRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var formRole = {
- abstract: !1,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {},
- relatedConcepts: [{
- concept: {
- attributes: [{
- constraints: ["set"],
- name: "aria-label"
- }],
- name: "form"
- },
- module: "HTML"
- }, {
- concept: {
- attributes: [{
- constraints: ["set"],
- name: "aria-labelledby"
- }],
- name: "form"
- },
- module: "HTML"
- }, {
- concept: {
- attributes: [{
- constraints: ["set"],
- name: "name"
- }],
- name: "form"
- },
- module: "HTML"
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "structure", "section", "landmark"]]
- }, _default = exports.default = formRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/literal/genericRole.js
- var require_genericRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/literal/genericRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var genericRole = {
- abstract: !1,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["prohibited"],
- prohibitedProps: ["aria-label", "aria-labelledby"],
- props: {},
- relatedConcepts: [{
- concept: {
- name: "a"
- },
- module: "HTML"
- }, {
- concept: {
- name: "area"
- },
- module: "HTML"
- }, {
- concept: {
- name: "aside"
- },
- module: "HTML"
- }, {
- concept: {
- name: "b"
- },
- module: "HTML"
- }, {
- concept: {
- name: "bdo"
- },
- module: "HTML"
- }, {
- concept: {
- name: "body"
- },
- module: "HTML"
- }, {
- concept: {
- name: "data"
- },
- module: "HTML"
- }, {
- concept: {
- name: "div"
- },
- module: "HTML"
- }, {
- concept: {
- constraints: ["scoped to the main element", "scoped to a sectioning content element", "scoped to a sectioning root element other than body"],
- name: "footer"
- },
- module: "HTML"
- }, {
- concept: {
- constraints: ["scoped to the main element", "scoped to a sectioning content element", "scoped to a sectioning root element other than body"],
- name: "header"
- },
- module: "HTML"
- }, {
- concept: {
- name: "hgroup"
- },
- module: "HTML"
- }, {
- concept: {
- name: "i"
- },
- module: "HTML"
- }, {
- concept: {
- name: "pre"
- },
- module: "HTML"
- }, {
- concept: {
- name: "q"
- },
- module: "HTML"
- }, {
- concept: {
- name: "samp"
- },
- module: "HTML"
- }, {
- concept: {
- name: "section"
- },
- module: "HTML"
- }, {
- concept: {
- name: "small"
- },
- module: "HTML"
- }, {
- concept: {
- name: "span"
- },
- module: "HTML"
- }, {
- concept: {
- name: "u"
- },
- module: "HTML"
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "structure"]]
- }, _default = exports.default = genericRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/literal/gridRole.js
- var require_gridRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/literal/gridRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var gridRole = {
- abstract: !1,
- accessibleNameRequired: !0,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {
- "aria-multiselectable": null,
- "aria-readonly": null
- },
- relatedConcepts: [],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [["row"], ["row", "rowgroup"]],
- requiredProps: {},
- superClass: [["roletype", "widget", "composite"], ["roletype", "structure", "section", "table"]]
- }, _default = exports.default = gridRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/literal/gridcellRole.js
- var require_gridcellRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/literal/gridcellRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var gridcellRole = {
- abstract: !1,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author", "contents"],
- prohibitedProps: [],
- props: {
- "aria-disabled": null,
- "aria-errormessage": null,
- "aria-expanded": null,
- "aria-haspopup": null,
- "aria-invalid": null,
- "aria-readonly": null,
- "aria-required": null,
- "aria-selected": null
- },
- relatedConcepts: [{
- concept: {
- constraints: ["ancestor table element has grid role", "ancestor table element has treegrid role"],
- name: "td"
- },
- module: "HTML"
- }],
- requireContextRole: ["row"],
- requiredContextRole: ["row"],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "structure", "section", "cell"], ["roletype", "widget"]]
- }, _default = exports.default = gridcellRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/literal/groupRole.js
- var require_groupRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/literal/groupRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var groupRole = {
- abstract: !1,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {
- "aria-activedescendant": null,
- "aria-disabled": null
- },
- relatedConcepts: [{
- concept: {
- name: "details"
- },
- module: "HTML"
- }, {
- concept: {
- name: "fieldset"
- },
- module: "HTML"
- }, {
- concept: {
- name: "optgroup"
- },
- module: "HTML"
- }, {
- concept: {
- name: "address"
- },
- module: "HTML"
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "structure", "section"]]
- }, _default = exports.default = groupRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/literal/headingRole.js
- var require_headingRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/literal/headingRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var headingRole = {
- abstract: !1,
- accessibleNameRequired: !0,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author", "contents"],
- prohibitedProps: [],
- props: {
- "aria-level": "2"
- },
- relatedConcepts: [{
- concept: {
- name: "h1"
- },
- module: "HTML"
- }, {
- concept: {
- name: "h2"
- },
- module: "HTML"
- }, {
- concept: {
- name: "h3"
- },
- module: "HTML"
- }, {
- concept: {
- name: "h4"
- },
- module: "HTML"
- }, {
- concept: {
- name: "h5"
- },
- module: "HTML"
- }, {
- concept: {
- name: "h6"
- },
- module: "HTML"
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {
- "aria-level": "2"
- },
- superClass: [["roletype", "structure", "sectionhead"]]
- }, _default = exports.default = headingRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/literal/imgRole.js
- var require_imgRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/literal/imgRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var imgRole = {
- abstract: !1,
- accessibleNameRequired: !0,
- baseConcepts: [],
- childrenPresentational: !0,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {},
- relatedConcepts: [{
- concept: {
- attributes: [{
- constraints: ["set"],
- name: "alt"
- }],
- name: "img"
- },
- module: "HTML"
- }, {
- concept: {
- attributes: [{
- constraints: ["undefined"],
- name: "alt"
- }],
- name: "img"
- },
- module: "HTML"
- }, {
- concept: {
- name: "imggroup"
- },
- module: "DTB"
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "structure", "section"]]
- }, _default = exports.default = imgRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/literal/insertionRole.js
- var require_insertionRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/literal/insertionRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var insertionRole = {
- abstract: !1,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["prohibited"],
- prohibitedProps: ["aria-label", "aria-labelledby"],
- props: {},
- relatedConcepts: [{
- concept: {
- name: "ins"
- },
- module: "HTML"
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "structure", "section"]]
- }, _default = exports.default = insertionRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/literal/linkRole.js
- var require_linkRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/literal/linkRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var linkRole = {
- abstract: !1,
- accessibleNameRequired: !0,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author", "contents"],
- prohibitedProps: [],
- props: {
- "aria-disabled": null,
- "aria-expanded": null,
- "aria-haspopup": null
- },
- relatedConcepts: [{
- concept: {
- attributes: [{
- constraints: ["set"],
- name: "href"
- }],
- name: "a"
- },
- module: "HTML"
- }, {
- concept: {
- attributes: [{
- constraints: ["set"],
- name: "href"
- }],
- name: "area"
- },
- module: "HTML"
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "widget", "command"]]
- }, _default = exports.default = linkRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/literal/listRole.js
- var require_listRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/literal/listRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var listRole = {
- abstract: !1,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {},
- relatedConcepts: [{
- concept: {
- name: "menu"
- },
- module: "HTML"
- }, {
- concept: {
- name: "ol"
- },
- module: "HTML"
- }, {
- concept: {
- name: "ul"
- },
- module: "HTML"
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [["listitem"]],
- requiredProps: {},
- superClass: [["roletype", "structure", "section"]]
- }, _default = exports.default = listRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/literal/listboxRole.js
- var require_listboxRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/literal/listboxRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var listboxRole = {
- abstract: !1,
- accessibleNameRequired: !0,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {
- "aria-errormessage": null,
- "aria-expanded": null,
- "aria-invalid": null,
- "aria-multiselectable": null,
- "aria-readonly": null,
- "aria-required": null,
- "aria-orientation": "vertical"
- },
- relatedConcepts: [{
- concept: {
- attributes: [{
- constraints: [">1"],
- name: "size"
- }],
- constraints: ["the size attribute value is greater than 1"],
- name: "select"
- },
- module: "HTML"
- }, {
- concept: {
- attributes: [{
- name: "multiple"
- }],
- name: "select"
- },
- module: "HTML"
- }, {
- concept: {
- name: "datalist"
- },
- module: "HTML"
- }, {
- concept: {
- name: "list"
- },
- module: "ARIA"
- }, {
- concept: {
- name: "select"
- },
- module: "XForms"
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [["option", "group"], ["option"]],
- requiredProps: {},
- superClass: [["roletype", "widget", "composite", "select"], ["roletype", "structure", "section", "group", "select"]]
- }, _default = exports.default = listboxRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/literal/listitemRole.js
- var require_listitemRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/literal/listitemRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var listitemRole = {
- abstract: !1,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {
- "aria-level": null,
- "aria-posinset": null,
- "aria-setsize": null
- },
- relatedConcepts: [{
- concept: {
- constraints: ["direct descendant of ol", "direct descendant of ul", "direct descendant of menu"],
- name: "li"
- },
- module: "HTML"
- }, {
- concept: {
- name: "item"
- },
- module: "XForms"
- }],
- requireContextRole: ["directory", "list"],
- requiredContextRole: ["directory", "list"],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "structure", "section"]]
- }, _default = exports.default = listitemRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/literal/logRole.js
- var require_logRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/literal/logRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var logRole = {
- abstract: !1,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {
- "aria-live": "polite"
- },
- relatedConcepts: [],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "structure", "section"]]
- }, _default = exports.default = logRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/literal/mainRole.js
- var require_mainRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/literal/mainRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var mainRole = {
- abstract: !1,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {},
- relatedConcepts: [{
- concept: {
- name: "main"
- },
- module: "HTML"
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "structure", "section", "landmark"]]
- }, _default = exports.default = mainRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/literal/markRole.js
- var require_markRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/literal/markRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var markRole = {
- abstract: !1,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["prohibited"],
- prohibitedProps: [],
- props: {
- "aria-braillelabel": null,
- "aria-brailleroledescription": null,
- "aria-description": null
- },
- relatedConcepts: [{
- concept: {
- name: "mark"
- },
- module: "HTML"
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "structure", "section"]]
- }, _default = exports.default = markRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/literal/marqueeRole.js
- var require_marqueeRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/literal/marqueeRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var marqueeRole = {
- abstract: !1,
- accessibleNameRequired: !0,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {},
- relatedConcepts: [],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "structure", "section"]]
- }, _default = exports.default = marqueeRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/literal/mathRole.js
- var require_mathRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/literal/mathRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var mathRole = {
- abstract: !1,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {},
- relatedConcepts: [{
- concept: {
- name: "math"
- },
- module: "HTML"
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "structure", "section"]]
- }, _default = exports.default = mathRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/literal/menuRole.js
- var require_menuRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/literal/menuRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var menuRole = {
- abstract: !1,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {
- "aria-orientation": "vertical"
- },
- relatedConcepts: [{
- concept: {
- name: "MENU"
- },
- module: "JAPI"
- }, {
- concept: {
- name: "list"
- },
- module: "ARIA"
- }, {
- concept: {
- name: "select"
- },
- module: "XForms"
- }, {
- concept: {
- name: "sidebar"
- },
- module: "DTB"
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [["menuitem", "group"], ["menuitemradio", "group"], ["menuitemcheckbox", "group"], ["menuitem"], ["menuitemcheckbox"], ["menuitemradio"]],
- requiredProps: {},
- superClass: [["roletype", "widget", "composite", "select"], ["roletype", "structure", "section", "group", "select"]]
- }, _default = exports.default = menuRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/literal/menubarRole.js
- var require_menubarRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/literal/menubarRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var menubarRole = {
- abstract: !1,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {
- "aria-orientation": "horizontal"
- },
- relatedConcepts: [{
- concept: {
- name: "toolbar"
- },
- module: "ARIA"
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [["menuitem", "group"], ["menuitemradio", "group"], ["menuitemcheckbox", "group"], ["menuitem"], ["menuitemcheckbox"], ["menuitemradio"]],
- requiredProps: {},
- superClass: [["roletype", "widget", "composite", "select", "menu"], ["roletype", "structure", "section", "group", "select", "menu"]]
- }, _default = exports.default = menubarRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/literal/menuitemRole.js
- var require_menuitemRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/literal/menuitemRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var menuitemRole = {
- abstract: !1,
- accessibleNameRequired: !0,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author", "contents"],
- prohibitedProps: [],
- props: {
- "aria-disabled": null,
- "aria-expanded": null,
- "aria-haspopup": null,
- "aria-posinset": null,
- "aria-setsize": null
- },
- relatedConcepts: [{
- concept: {
- name: "MENU_ITEM"
- },
- module: "JAPI"
- }, {
- concept: {
- name: "listitem"
- },
- module: "ARIA"
- }, {
- concept: {
- name: "option"
- },
- module: "ARIA"
- }],
- requireContextRole: ["group", "menu", "menubar"],
- requiredContextRole: ["group", "menu", "menubar"],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "widget", "command"]]
- }, _default = exports.default = menuitemRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/literal/menuitemcheckboxRole.js
- var require_menuitemcheckboxRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/literal/menuitemcheckboxRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var menuitemcheckboxRole = {
- abstract: !1,
- accessibleNameRequired: !0,
- baseConcepts: [],
- childrenPresentational: !0,
- nameFrom: ["author", "contents"],
- prohibitedProps: [],
- props: {},
- relatedConcepts: [{
- concept: {
- name: "menuitem"
- },
- module: "ARIA"
- }],
- requireContextRole: ["group", "menu", "menubar"],
- requiredContextRole: ["group", "menu", "menubar"],
- requiredOwnedElements: [],
- requiredProps: {
- "aria-checked": null
- },
- superClass: [["roletype", "widget", "input", "checkbox"], ["roletype", "widget", "command", "menuitem"]]
- }, _default = exports.default = menuitemcheckboxRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/literal/menuitemradioRole.js
- var require_menuitemradioRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/literal/menuitemradioRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var menuitemradioRole = {
- abstract: !1,
- accessibleNameRequired: !0,
- baseConcepts: [],
- childrenPresentational: !0,
- nameFrom: ["author", "contents"],
- prohibitedProps: [],
- props: {},
- relatedConcepts: [{
- concept: {
- name: "menuitem"
- },
- module: "ARIA"
- }],
- requireContextRole: ["group", "menu", "menubar"],
- requiredContextRole: ["group", "menu", "menubar"],
- requiredOwnedElements: [],
- requiredProps: {
- "aria-checked": null
- },
- superClass: [["roletype", "widget", "input", "checkbox", "menuitemcheckbox"], ["roletype", "widget", "command", "menuitem", "menuitemcheckbox"], ["roletype", "widget", "input", "radio"]]
- }, _default = exports.default = menuitemradioRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/literal/meterRole.js
- var require_meterRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/literal/meterRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var meterRole = {
- abstract: !1,
- accessibleNameRequired: !0,
- baseConcepts: [],
- childrenPresentational: !0,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {
- "aria-valuetext": null,
- "aria-valuemax": "100",
- "aria-valuemin": "0"
- },
- relatedConcepts: [{
- concept: {
- name: "meter"
- },
- module: "HTML"
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {
- "aria-valuenow": null
- },
- superClass: [["roletype", "structure", "range"]]
- }, _default = exports.default = meterRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/literal/navigationRole.js
- var require_navigationRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/literal/navigationRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var navigationRole = {
- abstract: !1,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {},
- relatedConcepts: [{
- concept: {
- name: "nav"
- },
- module: "HTML"
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "structure", "section", "landmark"]]
- }, _default = exports.default = navigationRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/literal/noneRole.js
- var require_noneRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/literal/noneRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var noneRole = {
- abstract: !1,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: [],
- prohibitedProps: [],
- props: {},
- relatedConcepts: [],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: []
- }, _default = exports.default = noneRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/literal/noteRole.js
- var require_noteRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/literal/noteRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var noteRole = {
- abstract: !1,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {},
- relatedConcepts: [],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "structure", "section"]]
- }, _default = exports.default = noteRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/literal/optionRole.js
- var require_optionRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/literal/optionRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var optionRole = {
- abstract: !1,
- accessibleNameRequired: !0,
- baseConcepts: [],
- childrenPresentational: !0,
- nameFrom: ["author", "contents"],
- prohibitedProps: [],
- props: {
- "aria-checked": null,
- "aria-posinset": null,
- "aria-setsize": null,
- "aria-selected": "false"
- },
- relatedConcepts: [{
- concept: {
- name: "item"
- },
- module: "XForms"
- }, {
- concept: {
- name: "listitem"
- },
- module: "ARIA"
- }, {
- concept: {
- name: "option"
- },
- module: "HTML"
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {
- "aria-selected": "false"
- },
- superClass: [["roletype", "widget", "input"]]
- }, _default = exports.default = optionRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/literal/paragraphRole.js
- var require_paragraphRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/literal/paragraphRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var paragraphRole = {
- abstract: !1,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["prohibited"],
- prohibitedProps: ["aria-label", "aria-labelledby"],
- props: {},
- relatedConcepts: [{
- concept: {
- name: "p"
- },
- module: "HTML"
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "structure", "section"]]
- }, _default = exports.default = paragraphRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/literal/presentationRole.js
- var require_presentationRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/literal/presentationRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var presentationRole = {
- abstract: !1,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["prohibited"],
- prohibitedProps: ["aria-label", "aria-labelledby"],
- props: {},
- relatedConcepts: [{
- concept: {
- attributes: [{
- name: "alt",
- value: ""
- }],
- name: "img"
- },
- module: "HTML"
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "structure"]]
- }, _default = exports.default = presentationRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/literal/progressbarRole.js
- var require_progressbarRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/literal/progressbarRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var progressbarRole = {
- abstract: !1,
- accessibleNameRequired: !0,
- baseConcepts: [],
- childrenPresentational: !0,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {
- "aria-valuetext": null
- },
- relatedConcepts: [{
- concept: {
- name: "progress"
- },
- module: "HTML"
- }, {
- concept: {
- name: "status"
- },
- module: "ARIA"
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "structure", "range"], ["roletype", "widget"]]
- }, _default = exports.default = progressbarRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/literal/radioRole.js
- var require_radioRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/literal/radioRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var radioRole = {
- abstract: !1,
- accessibleNameRequired: !0,
- baseConcepts: [],
- childrenPresentational: !0,
- nameFrom: ["author", "contents"],
- prohibitedProps: [],
- props: {
- "aria-checked": null,
- "aria-posinset": null,
- "aria-setsize": null
- },
- relatedConcepts: [{
- concept: {
- attributes: [{
- name: "type",
- value: "radio"
- }],
- name: "input"
- },
- module: "HTML"
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {
- "aria-checked": null
- },
- superClass: [["roletype", "widget", "input"]]
- }, _default = exports.default = radioRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/literal/radiogroupRole.js
- var require_radiogroupRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/literal/radiogroupRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var radiogroupRole = {
- abstract: !1,
- accessibleNameRequired: !0,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {
- "aria-errormessage": null,
- "aria-invalid": null,
- "aria-readonly": null,
- "aria-required": null
- },
- relatedConcepts: [{
- concept: {
- name: "list"
- },
- module: "ARIA"
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [["radio"]],
- requiredProps: {},
- superClass: [["roletype", "widget", "composite", "select"], ["roletype", "structure", "section", "group", "select"]]
- }, _default = exports.default = radiogroupRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/literal/regionRole.js
- var require_regionRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/literal/regionRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var regionRole = {
- abstract: !1,
- accessibleNameRequired: !0,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {},
- relatedConcepts: [{
- concept: {
- attributes: [{
- constraints: ["set"],
- name: "aria-label"
- }],
- name: "section"
- },
- module: "HTML"
- }, {
- concept: {
- attributes: [{
- constraints: ["set"],
- name: "aria-labelledby"
- }],
- name: "section"
- },
- module: "HTML"
- }, {
- concept: {
- name: "Device Independence Glossart perceivable unit"
- }
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "structure", "section", "landmark"]]
- }, _default = exports.default = regionRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/literal/rowRole.js
- var require_rowRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/literal/rowRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var rowRole = {
- abstract: !1,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author", "contents"],
- prohibitedProps: [],
- props: {
- "aria-colindex": null,
- "aria-expanded": null,
- "aria-level": null,
- "aria-posinset": null,
- "aria-rowindex": null,
- "aria-selected": null,
- "aria-setsize": null
- },
- relatedConcepts: [{
- concept: {
- name: "tr"
- },
- module: "HTML"
- }],
- requireContextRole: ["grid", "rowgroup", "table", "treegrid"],
- requiredContextRole: ["grid", "rowgroup", "table", "treegrid"],
- requiredOwnedElements: [["cell"], ["columnheader"], ["gridcell"], ["rowheader"]],
- requiredProps: {},
- superClass: [["roletype", "structure", "section", "group"], ["roletype", "widget"]]
- }, _default = exports.default = rowRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/literal/rowgroupRole.js
- var require_rowgroupRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/literal/rowgroupRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var rowgroupRole = {
- abstract: !1,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author", "contents"],
- prohibitedProps: [],
- props: {},
- relatedConcepts: [{
- concept: {
- name: "tbody"
- },
- module: "HTML"
- }, {
- concept: {
- name: "tfoot"
- },
- module: "HTML"
- }, {
- concept: {
- name: "thead"
- },
- module: "HTML"
- }],
- requireContextRole: ["grid", "table", "treegrid"],
- requiredContextRole: ["grid", "table", "treegrid"],
- requiredOwnedElements: [["row"]],
- requiredProps: {},
- superClass: [["roletype", "structure"]]
- }, _default = exports.default = rowgroupRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/literal/rowheaderRole.js
- var require_rowheaderRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/literal/rowheaderRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var rowheaderRole = {
- abstract: !1,
- accessibleNameRequired: !0,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author", "contents"],
- prohibitedProps: [],
- props: {
- "aria-sort": null
- },
- relatedConcepts: [{
- concept: {
- attributes: [{
- name: "scope",
- value: "row"
- }],
- name: "th"
- },
- module: "HTML"
- }, {
- concept: {
- attributes: [{
- name: "scope",
- value: "rowgroup"
- }],
- name: "th"
- },
- module: "HTML"
- }],
- requireContextRole: ["row", "rowgroup"],
- requiredContextRole: ["row", "rowgroup"],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "structure", "section", "cell"], ["roletype", "structure", "section", "cell", "gridcell"], ["roletype", "widget", "gridcell"], ["roletype", "structure", "sectionhead"]]
- }, _default = exports.default = rowheaderRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/literal/scrollbarRole.js
- var require_scrollbarRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/literal/scrollbarRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var scrollbarRole = {
- abstract: !1,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !0,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {
- "aria-disabled": null,
- "aria-valuetext": null,
- "aria-orientation": "vertical",
- "aria-valuemax": "100",
- "aria-valuemin": "0"
- },
- relatedConcepts: [],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {
- "aria-controls": null,
- "aria-valuenow": null
- },
- superClass: [["roletype", "structure", "range"], ["roletype", "widget"]]
- }, _default = exports.default = scrollbarRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/literal/searchRole.js
- var require_searchRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/literal/searchRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var searchRole = {
- abstract: !1,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {},
- relatedConcepts: [],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "structure", "section", "landmark"]]
- }, _default = exports.default = searchRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/literal/searchboxRole.js
- var require_searchboxRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/literal/searchboxRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var searchboxRole = {
- abstract: !1,
- accessibleNameRequired: !0,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {},
- relatedConcepts: [{
- concept: {
- attributes: [{
- constraints: ["undefined"],
- name: "list"
- }, {
- name: "type",
- value: "search"
- }],
- constraints: ["the list attribute is not set"],
- name: "input"
- },
- module: "HTML"
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "widget", "input", "textbox"]]
- }, _default = exports.default = searchboxRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/literal/separatorRole.js
- var require_separatorRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/literal/separatorRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var separatorRole = {
- abstract: !1,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !0,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {
- "aria-disabled": null,
- "aria-orientation": "horizontal",
- "aria-valuemax": "100",
- "aria-valuemin": "0",
- "aria-valuenow": null,
- "aria-valuetext": null
- },
- relatedConcepts: [{
- concept: {
- name: "hr"
- },
- module: "HTML"
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "structure"]]
- }, _default = exports.default = separatorRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/literal/sliderRole.js
- var require_sliderRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/literal/sliderRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var sliderRole = {
- abstract: !1,
- accessibleNameRequired: !0,
- baseConcepts: [],
- childrenPresentational: !0,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {
- "aria-errormessage": null,
- "aria-haspopup": null,
- "aria-invalid": null,
- "aria-readonly": null,
- "aria-valuetext": null,
- "aria-orientation": "horizontal",
- "aria-valuemax": "100",
- "aria-valuemin": "0"
- },
- relatedConcepts: [{
- concept: {
- attributes: [{
- name: "type",
- value: "range"
- }],
- name: "input"
- },
- module: "HTML"
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {
- "aria-valuenow": null
- },
- superClass: [["roletype", "widget", "input"], ["roletype", "structure", "range"]]
- }, _default = exports.default = sliderRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/literal/spinbuttonRole.js
- var require_spinbuttonRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/literal/spinbuttonRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var spinbuttonRole = {
- abstract: !1,
- accessibleNameRequired: !0,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {
- "aria-errormessage": null,
- "aria-invalid": null,
- "aria-readonly": null,
- "aria-required": null,
- "aria-valuetext": null,
- "aria-valuenow": "0"
- },
- relatedConcepts: [{
- concept: {
- attributes: [{
- name: "type",
- value: "number"
- }],
- name: "input"
- },
- module: "HTML"
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "widget", "composite"], ["roletype", "widget", "input"], ["roletype", "structure", "range"]]
- }, _default = exports.default = spinbuttonRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/literal/statusRole.js
- var require_statusRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/literal/statusRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var statusRole = {
- abstract: !1,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {
- "aria-atomic": "true",
- "aria-live": "polite"
- },
- relatedConcepts: [{
- concept: {
- name: "output"
- },
- module: "HTML"
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "structure", "section"]]
- }, _default = exports.default = statusRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/literal/strongRole.js
- var require_strongRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/literal/strongRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var strongRole = {
- abstract: !1,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["prohibited"],
- prohibitedProps: ["aria-label", "aria-labelledby"],
- props: {},
- relatedConcepts: [{
- concept: {
- name: "strong"
- },
- module: "HTML"
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "structure", "section"]]
- }, _default = exports.default = strongRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/literal/subscriptRole.js
- var require_subscriptRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/literal/subscriptRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var subscriptRole = {
- abstract: !1,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["prohibited"],
- prohibitedProps: ["aria-label", "aria-labelledby"],
- props: {},
- relatedConcepts: [{
- concept: {
- name: "sub"
- },
- module: "HTML"
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "structure", "section"]]
- }, _default = exports.default = subscriptRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/literal/superscriptRole.js
- var require_superscriptRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/literal/superscriptRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var superscriptRole = {
- abstract: !1,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["prohibited"],
- prohibitedProps: ["aria-label", "aria-labelledby"],
- props: {},
- relatedConcepts: [{
- concept: {
- name: "sup"
- },
- module: "HTML"
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "structure", "section"]]
- }, _default = exports.default = superscriptRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/literal/switchRole.js
- var require_switchRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/literal/switchRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var switchRole = {
- abstract: !1,
- accessibleNameRequired: !0,
- baseConcepts: [],
- childrenPresentational: !0,
- nameFrom: ["author", "contents"],
- prohibitedProps: [],
- props: {},
- relatedConcepts: [{
- concept: {
- name: "button"
- },
- module: "ARIA"
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {
- "aria-checked": null
- },
- superClass: [["roletype", "widget", "input", "checkbox"]]
- }, _default = exports.default = switchRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/literal/tabRole.js
- var require_tabRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/literal/tabRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var tabRole = {
- abstract: !1,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !0,
- nameFrom: ["author", "contents"],
- prohibitedProps: [],
- props: {
- "aria-disabled": null,
- "aria-expanded": null,
- "aria-haspopup": null,
- "aria-posinset": null,
- "aria-setsize": null,
- "aria-selected": "false"
- },
- relatedConcepts: [],
- requireContextRole: ["tablist"],
- requiredContextRole: ["tablist"],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "structure", "sectionhead"], ["roletype", "widget"]]
- }, _default = exports.default = tabRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/literal/tableRole.js
- var require_tableRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/literal/tableRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var tableRole = {
- abstract: !1,
- accessibleNameRequired: !0,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {
- "aria-colcount": null,
- "aria-rowcount": null
- },
- relatedConcepts: [{
- concept: {
- name: "table"
- },
- module: "HTML"
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [["row"], ["row", "rowgroup"]],
- requiredProps: {},
- superClass: [["roletype", "structure", "section"]]
- }, _default = exports.default = tableRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/literal/tablistRole.js
- var require_tablistRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/literal/tablistRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var tablistRole = {
- abstract: !1,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {
- "aria-level": null,
- "aria-multiselectable": null,
- "aria-orientation": "horizontal"
- },
- relatedConcepts: [{
- module: "DAISY",
- concept: {
- name: "guide"
- }
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [["tab"]],
- requiredProps: {},
- superClass: [["roletype", "widget", "composite"]]
- }, _default = exports.default = tablistRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/literal/tabpanelRole.js
- var require_tabpanelRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/literal/tabpanelRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var tabpanelRole = {
- abstract: !1,
- accessibleNameRequired: !0,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {},
- relatedConcepts: [],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "structure", "section"]]
- }, _default = exports.default = tabpanelRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/literal/termRole.js
- var require_termRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/literal/termRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var termRole = {
- abstract: !1,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {},
- relatedConcepts: [{
- concept: {
- name: "dfn"
- },
- module: "HTML"
- }, {
- concept: {
- name: "dt"
- },
- module: "HTML"
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "structure", "section"]]
- }, _default = exports.default = termRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/literal/textboxRole.js
- var require_textboxRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/literal/textboxRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var textboxRole = {
- abstract: !1,
- accessibleNameRequired: !0,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {
- "aria-activedescendant": null,
- "aria-autocomplete": null,
- "aria-errormessage": null,
- "aria-haspopup": null,
- "aria-invalid": null,
- "aria-multiline": null,
- "aria-placeholder": null,
- "aria-readonly": null,
- "aria-required": null
- },
- relatedConcepts: [{
- concept: {
- attributes: [{
- constraints: ["undefined"],
- name: "type"
- }, {
- constraints: ["undefined"],
- name: "list"
- }],
- constraints: ["the list attribute is not set"],
- name: "input"
- },
- module: "HTML"
- }, {
- concept: {
- attributes: [{
- constraints: ["undefined"],
- name: "list"
- }, {
- name: "type",
- value: "email"
- }],
- constraints: ["the list attribute is not set"],
- name: "input"
- },
- module: "HTML"
- }, {
- concept: {
- attributes: [{
- constraints: ["undefined"],
- name: "list"
- }, {
- name: "type",
- value: "tel"
- }],
- constraints: ["the list attribute is not set"],
- name: "input"
- },
- module: "HTML"
- }, {
- concept: {
- attributes: [{
- constraints: ["undefined"],
- name: "list"
- }, {
- name: "type",
- value: "text"
- }],
- constraints: ["the list attribute is not set"],
- name: "input"
- },
- module: "HTML"
- }, {
- concept: {
- attributes: [{
- constraints: ["undefined"],
- name: "list"
- }, {
- name: "type",
- value: "url"
- }],
- constraints: ["the list attribute is not set"],
- name: "input"
- },
- module: "HTML"
- }, {
- concept: {
- name: "input"
- },
- module: "XForms"
- }, {
- concept: {
- name: "textarea"
- },
- module: "HTML"
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "widget", "input"]]
- }, _default = exports.default = textboxRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/literal/timeRole.js
- var require_timeRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/literal/timeRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var timeRole = {
- abstract: !1,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {},
- relatedConcepts: [{
- concept: {
- name: "time"
- },
- module: "HTML"
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "structure", "section"]]
- }, _default = exports.default = timeRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/literal/timerRole.js
- var require_timerRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/literal/timerRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var timerRole = {
- abstract: !1,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {},
- relatedConcepts: [],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "structure", "section", "status"]]
- }, _default = exports.default = timerRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/literal/toolbarRole.js
- var require_toolbarRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/literal/toolbarRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var toolbarRole = {
- abstract: !1,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {
- "aria-orientation": "horizontal"
- },
- relatedConcepts: [{
- concept: {
- name: "menubar"
- },
- module: "ARIA"
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "structure", "section", "group"]]
- }, _default = exports.default = toolbarRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/literal/tooltipRole.js
- var require_tooltipRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/literal/tooltipRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var tooltipRole = {
- abstract: !1,
- accessibleNameRequired: !0,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author", "contents"],
- prohibitedProps: [],
- props: {},
- relatedConcepts: [],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "structure", "section"]]
- }, _default = exports.default = tooltipRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/literal/treeRole.js
- var require_treeRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/literal/treeRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var treeRole = {
- abstract: !1,
- accessibleNameRequired: !0,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {
- "aria-errormessage": null,
- "aria-invalid": null,
- "aria-multiselectable": null,
- "aria-required": null,
- "aria-orientation": "vertical"
- },
- relatedConcepts: [],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [["treeitem", "group"], ["treeitem"]],
- requiredProps: {},
- superClass: [["roletype", "widget", "composite", "select"], ["roletype", "structure", "section", "group", "select"]]
- }, _default = exports.default = treeRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/literal/treegridRole.js
- var require_treegridRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/literal/treegridRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var treegridRole = {
- abstract: !1,
- accessibleNameRequired: !0,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {},
- relatedConcepts: [],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [["row"], ["row", "rowgroup"]],
- requiredProps: {},
- superClass: [["roletype", "widget", "composite", "grid"], ["roletype", "structure", "section", "table", "grid"], ["roletype", "widget", "composite", "select", "tree"], ["roletype", "structure", "section", "group", "select", "tree"]]
- }, _default = exports.default = treegridRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/literal/treeitemRole.js
- var require_treeitemRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/literal/treeitemRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var treeitemRole = {
- abstract: !1,
- accessibleNameRequired: !0,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author", "contents"],
- prohibitedProps: [],
- props: {
- "aria-expanded": null,
- "aria-haspopup": null
- },
- relatedConcepts: [],
- requireContextRole: ["group", "tree"],
- requiredContextRole: ["group", "tree"],
- requiredOwnedElements: [],
- requiredProps: {
- "aria-selected": null
- },
- superClass: [["roletype", "structure", "section", "listitem"], ["roletype", "widget", "input", "option"]]
- }, _default = exports.default = treeitemRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/ariaLiteralRoles.js
- var require_ariaLiteralRoles = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/ariaLiteralRoles.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var _alertRole = _interopRequireDefault(require_alertRole()), _alertdialogRole = _interopRequireDefault(require_alertdialogRole()), _applicationRole = _interopRequireDefault(require_applicationRole()), _articleRole = _interopRequireDefault(require_articleRole()), _bannerRole = _interopRequireDefault(require_bannerRole()), _blockquoteRole = _interopRequireDefault(require_blockquoteRole()), _buttonRole = _interopRequireDefault(require_buttonRole()), _captionRole = _interopRequireDefault(require_captionRole()), _cellRole = _interopRequireDefault(require_cellRole()), _checkboxRole = _interopRequireDefault(require_checkboxRole()), _codeRole = _interopRequireDefault(require_codeRole()), _columnheaderRole = _interopRequireDefault(require_columnheaderRole()), _comboboxRole = _interopRequireDefault(require_comboboxRole()), _complementaryRole = _interopRequireDefault(require_complementaryRole()), _contentinfoRole = _interopRequireDefault(require_contentinfoRole()), _definitionRole = _interopRequireDefault(require_definitionRole()), _deletionRole = _interopRequireDefault(require_deletionRole()), _dialogRole = _interopRequireDefault(require_dialogRole()), _directoryRole = _interopRequireDefault(require_directoryRole()), _documentRole = _interopRequireDefault(require_documentRole()), _emphasisRole = _interopRequireDefault(require_emphasisRole()), _feedRole = _interopRequireDefault(require_feedRole()), _figureRole = _interopRequireDefault(require_figureRole()), _formRole = _interopRequireDefault(require_formRole()), _genericRole = _interopRequireDefault(require_genericRole()), _gridRole = _interopRequireDefault(require_gridRole()), _gridcellRole = _interopRequireDefault(require_gridcellRole()), _groupRole = _interopRequireDefault(require_groupRole()), _headingRole = _interopRequireDefault(require_headingRole()), _imgRole = _interopRequireDefault(require_imgRole()), _insertionRole = _interopRequireDefault(require_insertionRole()), _linkRole = _interopRequireDefault(require_linkRole()), _listRole = _interopRequireDefault(require_listRole()), _listboxRole = _interopRequireDefault(require_listboxRole()), _listitemRole = _interopRequireDefault(require_listitemRole()), _logRole = _interopRequireDefault(require_logRole()), _mainRole = _interopRequireDefault(require_mainRole()), _markRole = _interopRequireDefault(require_markRole()), _marqueeRole = _interopRequireDefault(require_marqueeRole()), _mathRole = _interopRequireDefault(require_mathRole()), _menuRole = _interopRequireDefault(require_menuRole()), _menubarRole = _interopRequireDefault(require_menubarRole()), _menuitemRole = _interopRequireDefault(require_menuitemRole()), _menuitemcheckboxRole = _interopRequireDefault(require_menuitemcheckboxRole()), _menuitemradioRole = _interopRequireDefault(require_menuitemradioRole()), _meterRole = _interopRequireDefault(require_meterRole()), _navigationRole = _interopRequireDefault(require_navigationRole()), _noneRole = _interopRequireDefault(require_noneRole()), _noteRole = _interopRequireDefault(require_noteRole()), _optionRole = _interopRequireDefault(require_optionRole()), _paragraphRole = _interopRequireDefault(require_paragraphRole()), _presentationRole = _interopRequireDefault(require_presentationRole()), _progressbarRole = _interopRequireDefault(require_progressbarRole()), _radioRole = _interopRequireDefault(require_radioRole()), _radiogroupRole = _interopRequireDefault(require_radiogroupRole()), _regionRole = _interopRequireDefault(require_regionRole()), _rowRole = _interopRequireDefault(require_rowRole()), _rowgroupRole = _interopRequireDefault(require_rowgroupRole()), _rowheaderRole = _interopRequireDefault(require_rowheaderRole()), _scrollbarRole = _interopRequireDefault(require_scrollbarRole()), _searchRole = _interopRequireDefault(require_searchRole()), _searchboxRole = _interopRequireDefault(require_searchboxRole()), _separatorRole = _interopRequireDefault(require_separatorRole()), _sliderRole = _interopRequireDefault(require_sliderRole()), _spinbuttonRole = _interopRequireDefault(require_spinbuttonRole()), _statusRole = _interopRequireDefault(require_statusRole()), _strongRole = _interopRequireDefault(require_strongRole()), _subscriptRole = _interopRequireDefault(require_subscriptRole()), _superscriptRole = _interopRequireDefault(require_superscriptRole()), _switchRole = _interopRequireDefault(require_switchRole()), _tabRole = _interopRequireDefault(require_tabRole()), _tableRole = _interopRequireDefault(require_tableRole()), _tablistRole = _interopRequireDefault(require_tablistRole()), _tabpanelRole = _interopRequireDefault(require_tabpanelRole()), _termRole = _interopRequireDefault(require_termRole()), _textboxRole = _interopRequireDefault(require_textboxRole()), _timeRole = _interopRequireDefault(require_timeRole()), _timerRole = _interopRequireDefault(require_timerRole()), _toolbarRole = _interopRequireDefault(require_toolbarRole()), _tooltipRole = _interopRequireDefault(require_tooltipRole()), _treeRole = _interopRequireDefault(require_treeRole()), _treegridRole = _interopRequireDefault(require_treegridRole()), _treeitemRole = _interopRequireDefault(require_treeitemRole());
- function _interopRequireDefault(e) {
- return e && e.__esModule ? e : { default: e };
- }
- var ariaLiteralRoles = [["alert", _alertRole.default], ["alertdialog", _alertdialogRole.default], ["application", _applicationRole.default], ["article", _articleRole.default], ["banner", _bannerRole.default], ["blockquote", _blockquoteRole.default], ["button", _buttonRole.default], ["caption", _captionRole.default], ["cell", _cellRole.default], ["checkbox", _checkboxRole.default], ["code", _codeRole.default], ["columnheader", _columnheaderRole.default], ["combobox", _comboboxRole.default], ["complementary", _complementaryRole.default], ["contentinfo", _contentinfoRole.default], ["definition", _definitionRole.default], ["deletion", _deletionRole.default], ["dialog", _dialogRole.default], ["directory", _directoryRole.default], ["document", _documentRole.default], ["emphasis", _emphasisRole.default], ["feed", _feedRole.default], ["figure", _figureRole.default], ["form", _formRole.default], ["generic", _genericRole.default], ["grid", _gridRole.default], ["gridcell", _gridcellRole.default], ["group", _groupRole.default], ["heading", _headingRole.default], ["img", _imgRole.default], ["insertion", _insertionRole.default], ["link", _linkRole.default], ["list", _listRole.default], ["listbox", _listboxRole.default], ["listitem", _listitemRole.default], ["log", _logRole.default], ["main", _mainRole.default], ["mark", _markRole.default], ["marquee", _marqueeRole.default], ["math", _mathRole.default], ["menu", _menuRole.default], ["menubar", _menubarRole.default], ["menuitem", _menuitemRole.default], ["menuitemcheckbox", _menuitemcheckboxRole.default], ["menuitemradio", _menuitemradioRole.default], ["meter", _meterRole.default], ["navigation", _navigationRole.default], ["none", _noneRole.default], ["note", _noteRole.default], ["option", _optionRole.default], ["paragraph", _paragraphRole.default], ["presentation", _presentationRole.default], ["progressbar", _progressbarRole.default], ["radio", _radioRole.default], ["radiogroup", _radiogroupRole.default], ["region", _regionRole.default], ["row", _rowRole.default], ["rowgroup", _rowgroupRole.default], ["rowheader", _rowheaderRole.default], ["scrollbar", _scrollbarRole.default], ["search", _searchRole.default], ["searchbox", _searchboxRole.default], ["separator", _separatorRole.default], ["slider", _sliderRole.default], ["spinbutton", _spinbuttonRole.default], ["status", _statusRole.default], ["strong", _strongRole.default], ["subscript", _subscriptRole.default], ["superscript", _superscriptRole.default], ["switch", _switchRole.default], ["tab", _tabRole.default], ["table", _tableRole.default], ["tablist", _tablistRole.default], ["tabpanel", _tabpanelRole.default], ["term", _termRole.default], ["textbox", _textboxRole.default], ["time", _timeRole.default], ["timer", _timerRole.default], ["toolbar", _toolbarRole.default], ["tooltip", _tooltipRole.default], ["tree", _treeRole.default], ["treegrid", _treegridRole.default], ["treeitem", _treeitemRole.default]], _default = exports.default = ariaLiteralRoles;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/dpub/docAbstractRole.js
- var require_docAbstractRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/dpub/docAbstractRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var docAbstractRole = {
- abstract: !1,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {
- "aria-disabled": null,
- "aria-errormessage": null,
- "aria-expanded": null,
- "aria-haspopup": null,
- "aria-invalid": null
- },
- relatedConcepts: [{
- concept: {
- name: "abstract [EPUB-SSV]"
- },
- module: "EPUB"
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "structure", "section"]]
- }, _default = exports.default = docAbstractRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/dpub/docAcknowledgmentsRole.js
- var require_docAcknowledgmentsRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/dpub/docAcknowledgmentsRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var docAcknowledgmentsRole = {
- abstract: !1,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {
- "aria-disabled": null,
- "aria-errormessage": null,
- "aria-expanded": null,
- "aria-haspopup": null,
- "aria-invalid": null
- },
- relatedConcepts: [{
- concept: {
- name: "acknowledgments [EPUB-SSV]"
- },
- module: "EPUB"
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "structure", "section", "landmark"]]
- }, _default = exports.default = docAcknowledgmentsRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/dpub/docAfterwordRole.js
- var require_docAfterwordRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/dpub/docAfterwordRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var docAfterwordRole = {
- abstract: !1,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {
- "aria-disabled": null,
- "aria-errormessage": null,
- "aria-expanded": null,
- "aria-haspopup": null,
- "aria-invalid": null
- },
- relatedConcepts: [{
- concept: {
- name: "afterword [EPUB-SSV]"
- },
- module: "EPUB"
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "structure", "section", "landmark"]]
- }, _default = exports.default = docAfterwordRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/dpub/docAppendixRole.js
- var require_docAppendixRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/dpub/docAppendixRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var docAppendixRole = {
- abstract: !1,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {
- "aria-disabled": null,
- "aria-errormessage": null,
- "aria-expanded": null,
- "aria-haspopup": null,
- "aria-invalid": null
- },
- relatedConcepts: [{
- concept: {
- name: "appendix [EPUB-SSV]"
- },
- module: "EPUB"
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "structure", "section", "landmark"]]
- }, _default = exports.default = docAppendixRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/dpub/docBacklinkRole.js
- var require_docBacklinkRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/dpub/docBacklinkRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var docBacklinkRole = {
- abstract: !1,
- accessibleNameRequired: !0,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author", "contents"],
- prohibitedProps: [],
- props: {
- "aria-errormessage": null,
- "aria-invalid": null
- },
- relatedConcepts: [{
- concept: {
- name: "referrer [EPUB-SSV]"
- },
- module: "EPUB"
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "widget", "command", "link"]]
- }, _default = exports.default = docBacklinkRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/dpub/docBiblioentryRole.js
- var require_docBiblioentryRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/dpub/docBiblioentryRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var docBiblioentryRole = {
- abstract: !1,
- accessibleNameRequired: !0,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {
- "aria-disabled": null,
- "aria-errormessage": null,
- "aria-expanded": null,
- "aria-haspopup": null,
- "aria-invalid": null
- },
- relatedConcepts: [{
- concept: {
- name: "EPUB biblioentry [EPUB-SSV]"
- },
- module: "EPUB"
- }],
- requireContextRole: ["doc-bibliography"],
- requiredContextRole: ["doc-bibliography"],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "structure", "section", "listitem"]]
- }, _default = exports.default = docBiblioentryRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/dpub/docBibliographyRole.js
- var require_docBibliographyRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/dpub/docBibliographyRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var docBibliographyRole = {
- abstract: !1,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {
- "aria-disabled": null,
- "aria-errormessage": null,
- "aria-expanded": null,
- "aria-haspopup": null,
- "aria-invalid": null
- },
- relatedConcepts: [{
- concept: {
- name: "bibliography [EPUB-SSV]"
- },
- module: "EPUB"
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [["doc-biblioentry"]],
- requiredProps: {},
- superClass: [["roletype", "structure", "section", "landmark"]]
- }, _default = exports.default = docBibliographyRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/dpub/docBibliorefRole.js
- var require_docBibliorefRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/dpub/docBibliorefRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var docBibliorefRole = {
- abstract: !1,
- accessibleNameRequired: !0,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author", "contents"],
- prohibitedProps: [],
- props: {
- "aria-errormessage": null,
- "aria-invalid": null
- },
- relatedConcepts: [{
- concept: {
- name: "biblioref [EPUB-SSV]"
- },
- module: "EPUB"
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "widget", "command", "link"]]
- }, _default = exports.default = docBibliorefRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/dpub/docChapterRole.js
- var require_docChapterRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/dpub/docChapterRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var docChapterRole = {
- abstract: !1,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {
- "aria-disabled": null,
- "aria-errormessage": null,
- "aria-expanded": null,
- "aria-haspopup": null,
- "aria-invalid": null
- },
- relatedConcepts: [{
- concept: {
- name: "chapter [EPUB-SSV]"
- },
- module: "EPUB"
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "structure", "section", "landmark"]]
- }, _default = exports.default = docChapterRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/dpub/docColophonRole.js
- var require_docColophonRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/dpub/docColophonRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var docColophonRole = {
- abstract: !1,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {
- "aria-disabled": null,
- "aria-errormessage": null,
- "aria-expanded": null,
- "aria-haspopup": null,
- "aria-invalid": null
- },
- relatedConcepts: [{
- concept: {
- name: "colophon [EPUB-SSV]"
- },
- module: "EPUB"
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "structure", "section"]]
- }, _default = exports.default = docColophonRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/dpub/docConclusionRole.js
- var require_docConclusionRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/dpub/docConclusionRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var docConclusionRole = {
- abstract: !1,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {
- "aria-disabled": null,
- "aria-errormessage": null,
- "aria-expanded": null,
- "aria-haspopup": null,
- "aria-invalid": null
- },
- relatedConcepts: [{
- concept: {
- name: "conclusion [EPUB-SSV]"
- },
- module: "EPUB"
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "structure", "section", "landmark"]]
- }, _default = exports.default = docConclusionRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/dpub/docCoverRole.js
- var require_docCoverRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/dpub/docCoverRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var docCoverRole = {
- abstract: !1,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {
- "aria-disabled": null,
- "aria-errormessage": null,
- "aria-expanded": null,
- "aria-haspopup": null,
- "aria-invalid": null
- },
- relatedConcepts: [{
- concept: {
- name: "cover [EPUB-SSV]"
- },
- module: "EPUB"
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "structure", "section", "img"]]
- }, _default = exports.default = docCoverRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/dpub/docCreditRole.js
- var require_docCreditRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/dpub/docCreditRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var docCreditRole = {
- abstract: !1,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {
- "aria-disabled": null,
- "aria-errormessage": null,
- "aria-expanded": null,
- "aria-haspopup": null,
- "aria-invalid": null
- },
- relatedConcepts: [{
- concept: {
- name: "credit [EPUB-SSV]"
- },
- module: "EPUB"
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "structure", "section"]]
- }, _default = exports.default = docCreditRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/dpub/docCreditsRole.js
- var require_docCreditsRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/dpub/docCreditsRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var docCreditsRole = {
- abstract: !1,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {
- "aria-disabled": null,
- "aria-errormessage": null,
- "aria-expanded": null,
- "aria-haspopup": null,
- "aria-invalid": null
- },
- relatedConcepts: [{
- concept: {
- name: "credits [EPUB-SSV]"
- },
- module: "EPUB"
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "structure", "section", "landmark"]]
- }, _default = exports.default = docCreditsRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/dpub/docDedicationRole.js
- var require_docDedicationRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/dpub/docDedicationRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var docDedicationRole = {
- abstract: !1,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {
- "aria-disabled": null,
- "aria-errormessage": null,
- "aria-expanded": null,
- "aria-haspopup": null,
- "aria-invalid": null
- },
- relatedConcepts: [{
- concept: {
- name: "dedication [EPUB-SSV]"
- },
- module: "EPUB"
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "structure", "section"]]
- }, _default = exports.default = docDedicationRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/dpub/docEndnoteRole.js
- var require_docEndnoteRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/dpub/docEndnoteRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var docEndnoteRole = {
- abstract: !1,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {
- "aria-disabled": null,
- "aria-errormessage": null,
- "aria-expanded": null,
- "aria-haspopup": null,
- "aria-invalid": null
- },
- relatedConcepts: [{
- concept: {
- name: "rearnote [EPUB-SSV]"
- },
- module: "EPUB"
- }],
- requireContextRole: ["doc-endnotes"],
- requiredContextRole: ["doc-endnotes"],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "structure", "section", "listitem"]]
- }, _default = exports.default = docEndnoteRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/dpub/docEndnotesRole.js
- var require_docEndnotesRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/dpub/docEndnotesRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var docEndnotesRole = {
- abstract: !1,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {
- "aria-disabled": null,
- "aria-errormessage": null,
- "aria-expanded": null,
- "aria-haspopup": null,
- "aria-invalid": null
- },
- relatedConcepts: [{
- concept: {
- name: "rearnotes [EPUB-SSV]"
- },
- module: "EPUB"
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [["doc-endnote"]],
- requiredProps: {},
- superClass: [["roletype", "structure", "section", "landmark"]]
- }, _default = exports.default = docEndnotesRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/dpub/docEpigraphRole.js
- var require_docEpigraphRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/dpub/docEpigraphRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var docEpigraphRole = {
- abstract: !1,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {
- "aria-disabled": null,
- "aria-errormessage": null,
- "aria-expanded": null,
- "aria-haspopup": null,
- "aria-invalid": null
- },
- relatedConcepts: [{
- concept: {
- name: "epigraph [EPUB-SSV]"
- },
- module: "EPUB"
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "structure", "section"]]
- }, _default = exports.default = docEpigraphRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/dpub/docEpilogueRole.js
- var require_docEpilogueRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/dpub/docEpilogueRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var docEpilogueRole = {
- abstract: !1,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {
- "aria-disabled": null,
- "aria-errormessage": null,
- "aria-expanded": null,
- "aria-haspopup": null,
- "aria-invalid": null
- },
- relatedConcepts: [{
- concept: {
- name: "epilogue [EPUB-SSV]"
- },
- module: "EPUB"
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "structure", "section", "landmark"]]
- }, _default = exports.default = docEpilogueRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/dpub/docErrataRole.js
- var require_docErrataRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/dpub/docErrataRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var docErrataRole = {
- abstract: !1,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {
- "aria-disabled": null,
- "aria-errormessage": null,
- "aria-expanded": null,
- "aria-haspopup": null,
- "aria-invalid": null
- },
- relatedConcepts: [{
- concept: {
- name: "errata [EPUB-SSV]"
- },
- module: "EPUB"
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "structure", "section", "landmark"]]
- }, _default = exports.default = docErrataRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/dpub/docExampleRole.js
- var require_docExampleRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/dpub/docExampleRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var docExampleRole = {
- abstract: !1,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {
- "aria-disabled": null,
- "aria-errormessage": null,
- "aria-expanded": null,
- "aria-haspopup": null,
- "aria-invalid": null
- },
- relatedConcepts: [],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "structure", "section"]]
- }, _default = exports.default = docExampleRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/dpub/docFootnoteRole.js
- var require_docFootnoteRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/dpub/docFootnoteRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var docFootnoteRole = {
- abstract: !1,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {
- "aria-disabled": null,
- "aria-errormessage": null,
- "aria-expanded": null,
- "aria-haspopup": null,
- "aria-invalid": null
- },
- relatedConcepts: [{
- concept: {
- name: "footnote [EPUB-SSV]"
- },
- module: "EPUB"
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "structure", "section"]]
- }, _default = exports.default = docFootnoteRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/dpub/docForewordRole.js
- var require_docForewordRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/dpub/docForewordRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var docForewordRole = {
- abstract: !1,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {
- "aria-disabled": null,
- "aria-errormessage": null,
- "aria-expanded": null,
- "aria-haspopup": null,
- "aria-invalid": null
- },
- relatedConcepts: [{
- concept: {
- name: "foreword [EPUB-SSV]"
- },
- module: "EPUB"
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "structure", "section", "landmark"]]
- }, _default = exports.default = docForewordRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/dpub/docGlossaryRole.js
- var require_docGlossaryRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/dpub/docGlossaryRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var docGlossaryRole = {
- abstract: !1,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {
- "aria-disabled": null,
- "aria-errormessage": null,
- "aria-expanded": null,
- "aria-haspopup": null,
- "aria-invalid": null
- },
- relatedConcepts: [{
- concept: {
- name: "glossary [EPUB-SSV]"
- },
- module: "EPUB"
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [["definition"], ["term"]],
- requiredProps: {},
- superClass: [["roletype", "structure", "section", "landmark"]]
- }, _default = exports.default = docGlossaryRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/dpub/docGlossrefRole.js
- var require_docGlossrefRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/dpub/docGlossrefRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var docGlossrefRole = {
- abstract: !1,
- accessibleNameRequired: !0,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author", "contents"],
- prohibitedProps: [],
- props: {
- "aria-errormessage": null,
- "aria-invalid": null
- },
- relatedConcepts: [{
- concept: {
- name: "glossref [EPUB-SSV]"
- },
- module: "EPUB"
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "widget", "command", "link"]]
- }, _default = exports.default = docGlossrefRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/dpub/docIndexRole.js
- var require_docIndexRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/dpub/docIndexRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var docIndexRole = {
- abstract: !1,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {
- "aria-disabled": null,
- "aria-errormessage": null,
- "aria-expanded": null,
- "aria-haspopup": null,
- "aria-invalid": null
- },
- relatedConcepts: [{
- concept: {
- name: "index [EPUB-SSV]"
- },
- module: "EPUB"
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "structure", "section", "landmark", "navigation"]]
- }, _default = exports.default = docIndexRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/dpub/docIntroductionRole.js
- var require_docIntroductionRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/dpub/docIntroductionRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var docIntroductionRole = {
- abstract: !1,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {
- "aria-disabled": null,
- "aria-errormessage": null,
- "aria-expanded": null,
- "aria-haspopup": null,
- "aria-invalid": null
- },
- relatedConcepts: [{
- concept: {
- name: "introduction [EPUB-SSV]"
- },
- module: "EPUB"
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "structure", "section", "landmark"]]
- }, _default = exports.default = docIntroductionRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/dpub/docNoterefRole.js
- var require_docNoterefRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/dpub/docNoterefRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var docNoterefRole = {
- abstract: !1,
- accessibleNameRequired: !0,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author", "contents"],
- prohibitedProps: [],
- props: {
- "aria-errormessage": null,
- "aria-invalid": null
- },
- relatedConcepts: [{
- concept: {
- name: "noteref [EPUB-SSV]"
- },
- module: "EPUB"
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "widget", "command", "link"]]
- }, _default = exports.default = docNoterefRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/dpub/docNoticeRole.js
- var require_docNoticeRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/dpub/docNoticeRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var docNoticeRole = {
- abstract: !1,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {
- "aria-disabled": null,
- "aria-errormessage": null,
- "aria-expanded": null,
- "aria-haspopup": null,
- "aria-invalid": null
- },
- relatedConcepts: [{
- concept: {
- name: "notice [EPUB-SSV]"
- },
- module: "EPUB"
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "structure", "section", "note"]]
- }, _default = exports.default = docNoticeRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/dpub/docPagebreakRole.js
- var require_docPagebreakRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/dpub/docPagebreakRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var docPagebreakRole = {
- abstract: !1,
- accessibleNameRequired: !0,
- baseConcepts: [],
- childrenPresentational: !0,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {
- "aria-errormessage": null,
- "aria-expanded": null,
- "aria-haspopup": null,
- "aria-invalid": null
- },
- relatedConcepts: [{
- concept: {
- name: "pagebreak [EPUB-SSV]"
- },
- module: "EPUB"
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "structure", "separator"]]
- }, _default = exports.default = docPagebreakRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/dpub/docPagefooterRole.js
- var require_docPagefooterRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/dpub/docPagefooterRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var docPagefooterRole = {
- abstract: !1,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["prohibited"],
- prohibitedProps: [],
- props: {
- "aria-braillelabel": null,
- "aria-brailleroledescription": null,
- "aria-description": null,
- "aria-disabled": null,
- "aria-errormessage": null,
- "aria-haspopup": null,
- "aria-invalid": null
- },
- relatedConcepts: [],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "structure", "section"]]
- }, _default = exports.default = docPagefooterRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/dpub/docPageheaderRole.js
- var require_docPageheaderRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/dpub/docPageheaderRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var docPageheaderRole = {
- abstract: !1,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["prohibited"],
- prohibitedProps: [],
- props: {
- "aria-braillelabel": null,
- "aria-brailleroledescription": null,
- "aria-description": null,
- "aria-disabled": null,
- "aria-errormessage": null,
- "aria-haspopup": null,
- "aria-invalid": null
- },
- relatedConcepts: [],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "structure", "section"]]
- }, _default = exports.default = docPageheaderRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/dpub/docPagelistRole.js
- var require_docPagelistRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/dpub/docPagelistRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var docPagelistRole = {
- abstract: !1,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {
- "aria-disabled": null,
- "aria-errormessage": null,
- "aria-expanded": null,
- "aria-haspopup": null,
- "aria-invalid": null
- },
- relatedConcepts: [{
- concept: {
- name: "page-list [EPUB-SSV]"
- },
- module: "EPUB"
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "structure", "section", "landmark", "navigation"]]
- }, _default = exports.default = docPagelistRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/dpub/docPartRole.js
- var require_docPartRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/dpub/docPartRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var docPartRole = {
- abstract: !1,
- accessibleNameRequired: !0,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {
- "aria-disabled": null,
- "aria-errormessage": null,
- "aria-expanded": null,
- "aria-haspopup": null,
- "aria-invalid": null
- },
- relatedConcepts: [{
- concept: {
- name: "part [EPUB-SSV]"
- },
- module: "EPUB"
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "structure", "section", "landmark"]]
- }, _default = exports.default = docPartRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/dpub/docPrefaceRole.js
- var require_docPrefaceRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/dpub/docPrefaceRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var docPrefaceRole = {
- abstract: !1,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {
- "aria-disabled": null,
- "aria-errormessage": null,
- "aria-expanded": null,
- "aria-haspopup": null,
- "aria-invalid": null
- },
- relatedConcepts: [{
- concept: {
- name: "preface [EPUB-SSV]"
- },
- module: "EPUB"
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "structure", "section", "landmark"]]
- }, _default = exports.default = docPrefaceRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/dpub/docPrologueRole.js
- var require_docPrologueRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/dpub/docPrologueRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var docPrologueRole = {
- abstract: !1,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {
- "aria-disabled": null,
- "aria-errormessage": null,
- "aria-expanded": null,
- "aria-haspopup": null,
- "aria-invalid": null
- },
- relatedConcepts: [{
- concept: {
- name: "prologue [EPUB-SSV]"
- },
- module: "EPUB"
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "structure", "section", "landmark"]]
- }, _default = exports.default = docPrologueRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/dpub/docPullquoteRole.js
- var require_docPullquoteRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/dpub/docPullquoteRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var docPullquoteRole = {
- abstract: !1,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {},
- relatedConcepts: [{
- concept: {
- name: "pullquote [EPUB-SSV]"
- },
- module: "EPUB"
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["none"]]
- }, _default = exports.default = docPullquoteRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/dpub/docQnaRole.js
- var require_docQnaRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/dpub/docQnaRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var docQnaRole = {
- abstract: !1,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {
- "aria-disabled": null,
- "aria-errormessage": null,
- "aria-expanded": null,
- "aria-haspopup": null,
- "aria-invalid": null
- },
- relatedConcepts: [{
- concept: {
- name: "qna [EPUB-SSV]"
- },
- module: "EPUB"
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "structure", "section"]]
- }, _default = exports.default = docQnaRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/dpub/docSubtitleRole.js
- var require_docSubtitleRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/dpub/docSubtitleRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var docSubtitleRole = {
- abstract: !1,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {
- "aria-disabled": null,
- "aria-errormessage": null,
- "aria-expanded": null,
- "aria-haspopup": null,
- "aria-invalid": null
- },
- relatedConcepts: [{
- concept: {
- name: "subtitle [EPUB-SSV]"
- },
- module: "EPUB"
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "structure", "sectionhead"]]
- }, _default = exports.default = docSubtitleRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/dpub/docTipRole.js
- var require_docTipRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/dpub/docTipRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var docTipRole = {
- abstract: !1,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {
- "aria-disabled": null,
- "aria-errormessage": null,
- "aria-expanded": null,
- "aria-haspopup": null,
- "aria-invalid": null
- },
- relatedConcepts: [{
- concept: {
- name: "help [EPUB-SSV]"
- },
- module: "EPUB"
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "structure", "section", "note"]]
- }, _default = exports.default = docTipRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/dpub/docTocRole.js
- var require_docTocRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/dpub/docTocRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var docTocRole = {
- abstract: !1,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {
- "aria-disabled": null,
- "aria-errormessage": null,
- "aria-expanded": null,
- "aria-haspopup": null,
- "aria-invalid": null
- },
- relatedConcepts: [{
- concept: {
- name: "toc [EPUB-SSV]"
- },
- module: "EPUB"
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "structure", "section", "landmark", "navigation"]]
- }, _default = exports.default = docTocRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/ariaDpubRoles.js
- var require_ariaDpubRoles = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/ariaDpubRoles.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var _docAbstractRole = _interopRequireDefault(require_docAbstractRole()), _docAcknowledgmentsRole = _interopRequireDefault(require_docAcknowledgmentsRole()), _docAfterwordRole = _interopRequireDefault(require_docAfterwordRole()), _docAppendixRole = _interopRequireDefault(require_docAppendixRole()), _docBacklinkRole = _interopRequireDefault(require_docBacklinkRole()), _docBiblioentryRole = _interopRequireDefault(require_docBiblioentryRole()), _docBibliographyRole = _interopRequireDefault(require_docBibliographyRole()), _docBibliorefRole = _interopRequireDefault(require_docBibliorefRole()), _docChapterRole = _interopRequireDefault(require_docChapterRole()), _docColophonRole = _interopRequireDefault(require_docColophonRole()), _docConclusionRole = _interopRequireDefault(require_docConclusionRole()), _docCoverRole = _interopRequireDefault(require_docCoverRole()), _docCreditRole = _interopRequireDefault(require_docCreditRole()), _docCreditsRole = _interopRequireDefault(require_docCreditsRole()), _docDedicationRole = _interopRequireDefault(require_docDedicationRole()), _docEndnoteRole = _interopRequireDefault(require_docEndnoteRole()), _docEndnotesRole = _interopRequireDefault(require_docEndnotesRole()), _docEpigraphRole = _interopRequireDefault(require_docEpigraphRole()), _docEpilogueRole = _interopRequireDefault(require_docEpilogueRole()), _docErrataRole = _interopRequireDefault(require_docErrataRole()), _docExampleRole = _interopRequireDefault(require_docExampleRole()), _docFootnoteRole = _interopRequireDefault(require_docFootnoteRole()), _docForewordRole = _interopRequireDefault(require_docForewordRole()), _docGlossaryRole = _interopRequireDefault(require_docGlossaryRole()), _docGlossrefRole = _interopRequireDefault(require_docGlossrefRole()), _docIndexRole = _interopRequireDefault(require_docIndexRole()), _docIntroductionRole = _interopRequireDefault(require_docIntroductionRole()), _docNoterefRole = _interopRequireDefault(require_docNoterefRole()), _docNoticeRole = _interopRequireDefault(require_docNoticeRole()), _docPagebreakRole = _interopRequireDefault(require_docPagebreakRole()), _docPagefooterRole = _interopRequireDefault(require_docPagefooterRole()), _docPageheaderRole = _interopRequireDefault(require_docPageheaderRole()), _docPagelistRole = _interopRequireDefault(require_docPagelistRole()), _docPartRole = _interopRequireDefault(require_docPartRole()), _docPrefaceRole = _interopRequireDefault(require_docPrefaceRole()), _docPrologueRole = _interopRequireDefault(require_docPrologueRole()), _docPullquoteRole = _interopRequireDefault(require_docPullquoteRole()), _docQnaRole = _interopRequireDefault(require_docQnaRole()), _docSubtitleRole = _interopRequireDefault(require_docSubtitleRole()), _docTipRole = _interopRequireDefault(require_docTipRole()), _docTocRole = _interopRequireDefault(require_docTocRole());
- function _interopRequireDefault(e) {
- return e && e.__esModule ? e : { default: e };
- }
- var ariaDpubRoles = [["doc-abstract", _docAbstractRole.default], ["doc-acknowledgments", _docAcknowledgmentsRole.default], ["doc-afterword", _docAfterwordRole.default], ["doc-appendix", _docAppendixRole.default], ["doc-backlink", _docBacklinkRole.default], ["doc-biblioentry", _docBiblioentryRole.default], ["doc-bibliography", _docBibliographyRole.default], ["doc-biblioref", _docBibliorefRole.default], ["doc-chapter", _docChapterRole.default], ["doc-colophon", _docColophonRole.default], ["doc-conclusion", _docConclusionRole.default], ["doc-cover", _docCoverRole.default], ["doc-credit", _docCreditRole.default], ["doc-credits", _docCreditsRole.default], ["doc-dedication", _docDedicationRole.default], ["doc-endnote", _docEndnoteRole.default], ["doc-endnotes", _docEndnotesRole.default], ["doc-epigraph", _docEpigraphRole.default], ["doc-epilogue", _docEpilogueRole.default], ["doc-errata", _docErrataRole.default], ["doc-example", _docExampleRole.default], ["doc-footnote", _docFootnoteRole.default], ["doc-foreword", _docForewordRole.default], ["doc-glossary", _docGlossaryRole.default], ["doc-glossref", _docGlossrefRole.default], ["doc-index", _docIndexRole.default], ["doc-introduction", _docIntroductionRole.default], ["doc-noteref", _docNoterefRole.default], ["doc-notice", _docNoticeRole.default], ["doc-pagebreak", _docPagebreakRole.default], ["doc-pagefooter", _docPagefooterRole.default], ["doc-pageheader", _docPageheaderRole.default], ["doc-pagelist", _docPagelistRole.default], ["doc-part", _docPartRole.default], ["doc-preface", _docPrefaceRole.default], ["doc-prologue", _docPrologueRole.default], ["doc-pullquote", _docPullquoteRole.default], ["doc-qna", _docQnaRole.default], ["doc-subtitle", _docSubtitleRole.default], ["doc-tip", _docTipRole.default], ["doc-toc", _docTocRole.default]], _default = exports.default = ariaDpubRoles;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/graphics/graphicsDocumentRole.js
- var require_graphicsDocumentRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/graphics/graphicsDocumentRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var graphicsDocumentRole = {
- abstract: !1,
- accessibleNameRequired: !0,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {
- "aria-disabled": null,
- "aria-errormessage": null,
- "aria-expanded": null,
- "aria-haspopup": null,
- "aria-invalid": null
- },
- relatedConcepts: [{
- module: "GRAPHICS",
- concept: {
- name: "graphics-object"
- }
- }, {
- module: "ARIA",
- concept: {
- name: "img"
- }
- }, {
- module: "ARIA",
- concept: {
- name: "article"
- }
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "structure", "document"]]
- }, _default = exports.default = graphicsDocumentRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/graphics/graphicsObjectRole.js
- var require_graphicsObjectRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/graphics/graphicsObjectRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var graphicsObjectRole = {
- abstract: !1,
- accessibleNameRequired: !1,
- baseConcepts: [],
- childrenPresentational: !1,
- nameFrom: ["author", "contents"],
- prohibitedProps: [],
- props: {
- "aria-errormessage": null,
- "aria-expanded": null,
- "aria-haspopup": null,
- "aria-invalid": null
- },
- relatedConcepts: [{
- module: "GRAPHICS",
- concept: {
- name: "graphics-document"
- }
- }, {
- module: "ARIA",
- concept: {
- name: "group"
- }
- }, {
- module: "ARIA",
- concept: {
- name: "img"
- }
- }, {
- module: "GRAPHICS",
- concept: {
- name: "graphics-symbol"
- }
- }],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "structure", "section", "group"]]
- }, _default = exports.default = graphicsObjectRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/graphics/graphicsSymbolRole.js
- var require_graphicsSymbolRole = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/graphics/graphicsSymbolRole.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var graphicsSymbolRole = {
- abstract: !1,
- accessibleNameRequired: !0,
- baseConcepts: [],
- childrenPresentational: !0,
- nameFrom: ["author"],
- prohibitedProps: [],
- props: {
- "aria-disabled": null,
- "aria-errormessage": null,
- "aria-expanded": null,
- "aria-haspopup": null,
- "aria-invalid": null
- },
- relatedConcepts: [],
- requireContextRole: [],
- requiredContextRole: [],
- requiredOwnedElements: [],
- requiredProps: {},
- superClass: [["roletype", "structure", "section", "img"]]
- }, _default = exports.default = graphicsSymbolRole;
- }
- });
-
- // ../../node_modules/aria-query/lib/etc/roles/ariaGraphicsRoles.js
- var require_ariaGraphicsRoles = __commonJS({
- "../../node_modules/aria-query/lib/etc/roles/ariaGraphicsRoles.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var _graphicsDocumentRole = _interopRequireDefault(require_graphicsDocumentRole()), _graphicsObjectRole = _interopRequireDefault(require_graphicsObjectRole()), _graphicsSymbolRole = _interopRequireDefault(require_graphicsSymbolRole());
- function _interopRequireDefault(e) {
- return e && e.__esModule ? e : { default: e };
- }
- var ariaGraphicsRoles = [["graphics-document", _graphicsDocumentRole.default], ["graphics-object", _graphicsObjectRole.default], ["graphics-symbol", _graphicsSymbolRole.default]], _default = exports.default = ariaGraphicsRoles;
- }
- });
-
- // ../../node_modules/aria-query/lib/rolesMap.js
- var require_rolesMap = __commonJS({
- "../../node_modules/aria-query/lib/rolesMap.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var _ariaAbstractRoles = _interopRequireDefault(require_ariaAbstractRoles()), _ariaLiteralRoles = _interopRequireDefault(require_ariaLiteralRoles()), _ariaDpubRoles = _interopRequireDefault(require_ariaDpubRoles()), _ariaGraphicsRoles = _interopRequireDefault(require_ariaGraphicsRoles()), _iterationDecorator = _interopRequireDefault(require_iterationDecorator());
- function _interopRequireDefault(e) {
- return e && e.__esModule ? e : { default: e };
- }
- function _createForOfIteratorHelper(r2, e) {
- var t = typeof Symbol < "u" && r2[Symbol.iterator] || r2["@@iterator"];
- if (!t) {
- if (Array.isArray(r2) || (t = _unsupportedIterableToArray2(r2)) || e && r2 && typeof r2.length == "number") {
- t && (r2 = t);
- var _n = 0, F = function() {
- };
- return { s: F, n: function() {
- return _n >= r2.length ? { done: !0 } : { done: !1, value: r2[_n++] };
- }, e: function(r3) {
- throw r3;
- }, f: F };
- }
- throw new TypeError(`Invalid attempt to iterate non-iterable instance.
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
- }
- var o, a3 = !0, u2 = !1;
- return { s: function() {
- t = t.call(r2);
- }, n: function() {
- var r3 = t.next();
- return a3 = r3.done, r3;
- }, e: function(r3) {
- u2 = !0, o = r3;
- }, f: function() {
- try {
- a3 || t.return == null || t.return();
- } finally {
- if (u2) throw o;
- }
- } };
- }
- function _slicedToArray(r2, e) {
- return _arrayWithHoles(r2) || _iterableToArrayLimit(r2, e) || _unsupportedIterableToArray2(r2, e) || _nonIterableRest();
- }
- function _nonIterableRest() {
- throw new TypeError(`Invalid attempt to destructure non-iterable instance.
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
- }
- function _unsupportedIterableToArray2(r2, a3) {
- if (r2) {
- if (typeof r2 == "string") return _arrayLikeToArray2(r2, a3);
- var t = {}.toString.call(r2).slice(8, -1);
- return t === "Object" && r2.constructor && (t = r2.constructor.name), t === "Map" || t === "Set" ? Array.from(r2) : t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray2(r2, a3) : void 0;
- }
- }
- function _arrayLikeToArray2(r2, a3) {
- (a3 == null || a3 > r2.length) && (a3 = r2.length);
- for (var e = 0, n = Array(a3); e < a3; e++) n[e] = r2[e];
- return n;
- }
- function _iterableToArrayLimit(r2, l) {
- var t = r2 == null ? null : typeof Symbol < "u" && r2[Symbol.iterator] || r2["@@iterator"];
- if (t != null) {
- var e, n, i, u2, a3 = [], f4 = !0, o = !1;
- try {
- if (i = (t = t.call(r2)).next, l === 0) {
- if (Object(t) !== t) return;
- f4 = !1;
- } else for (; !(f4 = (e = i.call(t)).done) && (a3.push(e.value), a3.length !== l); f4 = !0) ;
- } catch (r3) {
- o = !0, n = r3;
- } finally {
- try {
- if (!f4 && t.return != null && (u2 = t.return(), Object(u2) !== u2)) return;
- } finally {
- if (o) throw n;
- }
- }
- return a3;
- }
- }
- function _arrayWithHoles(r2) {
- if (Array.isArray(r2)) return r2;
- }
- var roles3 = [].concat(_ariaAbstractRoles.default, _ariaLiteralRoles.default, _ariaDpubRoles.default, _ariaGraphicsRoles.default);
- roles3.forEach(function(_ref) {
- var _ref2 = _slicedToArray(_ref, 2), roleDefinition = _ref2[1], _iterator = _createForOfIteratorHelper(roleDefinition.superClass), _step;
- try {
- for (_iterator.s(); !(_step = _iterator.n()).done; ) {
- var superClassIter = _step.value, _iterator2 = _createForOfIteratorHelper(superClassIter), _step2;
- try {
- var _loop = function() {
- var superClassName = _step2.value, superClassRoleTuple = roles3.filter(function(_ref3) {
- var _ref4 = _slicedToArray(_ref3, 1), name = _ref4[0];
- return name === superClassName;
- })[0];
- if (superClassRoleTuple)
- for (var superClassDefinition = superClassRoleTuple[1], _i = 0, _Object$keys = Object.keys(superClassDefinition.props); _i < _Object$keys.length; _i++) {
- var prop = _Object$keys[_i];
- Object.prototype.hasOwnProperty.call(roleDefinition.props, prop) || (roleDefinition.props[prop] = superClassDefinition.props[prop]);
- }
- };
- for (_iterator2.s(); !(_step2 = _iterator2.n()).done; )
- _loop();
- } catch (err) {
- _iterator2.e(err);
- } finally {
- _iterator2.f();
- }
- }
- } catch (err) {
- _iterator.e(err);
- } finally {
- _iterator.f();
- }
- });
- var rolesMap = {
- entries: function() {
- return roles3;
- },
- forEach: function(fn4) {
- var thisArg = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null, _iterator3 = _createForOfIteratorHelper(roles3), _step3;
- try {
- for (_iterator3.s(); !(_step3 = _iterator3.n()).done; ) {
- var _step3$value = _slicedToArray(_step3.value, 2), key = _step3$value[0], values = _step3$value[1];
- fn4.call(thisArg, values, key, roles3);
- }
- } catch (err) {
- _iterator3.e(err);
- } finally {
- _iterator3.f();
- }
- },
- get: function(key) {
- var item = roles3.filter(function(tuple) {
- return tuple[0] === key;
- })[0];
- return item && item[1];
- },
- has: function(key) {
- return !!rolesMap.get(key);
- },
- keys: function() {
- return roles3.map(function(_ref5) {
- var _ref6 = _slicedToArray(_ref5, 1), key = _ref6[0];
- return key;
- });
- },
- values: function() {
- return roles3.map(function(_ref7) {
- var _ref8 = _slicedToArray(_ref7, 2), values2 = _ref8[1];
- return values2;
- });
- }
- }, _default = exports.default = (0, _iterationDecorator.default)(rolesMap, rolesMap.entries());
- }
- });
-
- // ../../node_modules/aria-query/lib/elementRoleMap.js
- var require_elementRoleMap = __commonJS({
- "../../node_modules/aria-query/lib/elementRoleMap.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var _iterationDecorator = _interopRequireDefault(require_iterationDecorator()), _rolesMap = _interopRequireDefault(require_rolesMap());
- function _interopRequireDefault(e) {
- return e && e.__esModule ? e : { default: e };
- }
- function _slicedToArray(r2, e) {
- return _arrayWithHoles(r2) || _iterableToArrayLimit(r2, e) || _unsupportedIterableToArray2(r2, e) || _nonIterableRest();
- }
- function _nonIterableRest() {
- throw new TypeError(`Invalid attempt to destructure non-iterable instance.
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
- }
- function _unsupportedIterableToArray2(r2, a3) {
- if (r2) {
- if (typeof r2 == "string") return _arrayLikeToArray2(r2, a3);
- var t = {}.toString.call(r2).slice(8, -1);
- return t === "Object" && r2.constructor && (t = r2.constructor.name), t === "Map" || t === "Set" ? Array.from(r2) : t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray2(r2, a3) : void 0;
- }
- }
- function _arrayLikeToArray2(r2, a3) {
- (a3 == null || a3 > r2.length) && (a3 = r2.length);
- for (var e = 0, n = Array(a3); e < a3; e++) n[e] = r2[e];
- return n;
- }
- function _iterableToArrayLimit(r2, l) {
- var t = r2 == null ? null : typeof Symbol < "u" && r2[Symbol.iterator] || r2["@@iterator"];
- if (t != null) {
- var e, n, i2, u2, a3 = [], f4 = !0, o = !1;
- try {
- if (i2 = (t = t.call(r2)).next, l === 0) {
- if (Object(t) !== t) return;
- f4 = !1;
- } else for (; !(f4 = (e = i2.call(t)).done) && (a3.push(e.value), a3.length !== l); f4 = !0) ;
- } catch (r3) {
- o = !0, n = r3;
- } finally {
- try {
- if (!f4 && t.return != null && (u2 = t.return(), Object(u2) !== u2)) return;
- } finally {
- if (o) throw n;
- }
- }
- return a3;
- }
- }
- function _arrayWithHoles(r2) {
- if (Array.isArray(r2)) return r2;
- }
- var elementRoles3 = [], keys3 = _rolesMap.default.keys();
- for (i = 0; i < keys3.length; i++)
- if (key = keys3[i], role = _rolesMap.default.get(key), role)
- for (concepts = [].concat(role.baseConcepts, role.relatedConcepts), _loop = function() {
- var relation = concepts[k];
- if (relation.module === "HTML") {
- var concept = relation.concept;
- if (concept) {
- var elementRoleRelation = elementRoles3.filter(function(relation2) {
- return ariaRoleRelationConceptEquals(relation2[0], concept);
- })[0], roles3;
- elementRoleRelation ? roles3 = elementRoleRelation[1] : roles3 = [];
- for (var isUnique = !0, _i = 0; _i < roles3.length; _i++)
- if (roles3[_i] === key) {
- isUnique = !1;
- break;
- }
- isUnique && roles3.push(key), elementRoleRelation || elementRoles3.push([concept, roles3]);
- }
- }
- }, k = 0; k < concepts.length; k++)
- _loop();
- var key, role, concepts, _loop, k, i, elementRoleMap = {
- entries: function() {
- return elementRoles3;
- },
- forEach: function(fn4) {
- for (var thisArg = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null, _i2 = 0, _elementRoles = elementRoles3; _i2 < _elementRoles.length; _i2++) {
- var _elementRoles$_i = _slicedToArray(_elementRoles[_i2], 2), _key = _elementRoles$_i[0], values = _elementRoles$_i[1];
- fn4.call(thisArg, values, _key, elementRoles3);
- }
- },
- get: function(key2) {
- var item = elementRoles3.filter(function(tuple) {
- return key2.name === tuple[0].name && ariaRoleRelationConceptAttributeEquals(key2.attributes, tuple[0].attributes);
- })[0];
- return item && item[1];
- },
- has: function(key2) {
- return !!elementRoleMap.get(key2);
- },
- keys: function() {
- return elementRoles3.map(function(_ref) {
- var _ref2 = _slicedToArray(_ref, 1), key2 = _ref2[0];
- return key2;
- });
- },
- values: function() {
- return elementRoles3.map(function(_ref3) {
- var _ref4 = _slicedToArray(_ref3, 2), values2 = _ref4[1];
- return values2;
- });
- }
- };
- function ariaRoleRelationConceptEquals(a3, b) {
- return a3.name === b.name && ariaRoleRelationConstraintsEquals(a3.constraints, b.constraints) && ariaRoleRelationConceptAttributeEquals(a3.attributes, b.attributes);
- }
- function ariaRoleRelationConstraintsEquals(a3, b) {
- if (a3 === void 0 && b !== void 0 || a3 !== void 0 && b === void 0)
- return !1;
- if (a3 !== void 0 && b !== void 0) {
- if (a3.length !== b.length)
- return !1;
- for (var _i3 = 0; _i3 < a3.length; _i3++)
- if (a3[_i3] !== b[_i3])
- return !1;
- }
- return !0;
- }
- function ariaRoleRelationConceptAttributeEquals(a3, b) {
- if (a3 === void 0 && b !== void 0 || a3 !== void 0 && b === void 0)
- return !1;
- if (a3 !== void 0 && b !== void 0) {
- if (a3.length !== b.length)
- return !1;
- for (var _i4 = 0; _i4 < a3.length; _i4++) {
- if (a3[_i4].name !== b[_i4].name || a3[_i4].value !== b[_i4].value || a3[_i4].constraints === void 0 && b[_i4].constraints !== void 0 || a3[_i4].constraints !== void 0 && b[_i4].constraints === void 0)
- return !1;
- if (a3[_i4].constraints !== void 0 && b[_i4].constraints !== void 0) {
- if (a3[_i4].constraints.length !== b[_i4].constraints.length)
- return !1;
- for (var j = 0; j < a3[_i4].constraints.length; j++)
- if (a3[_i4].constraints[j] !== b[_i4].constraints[j])
- return !1;
- }
- }
- }
- return !0;
- }
- var _default = exports.default = (0, _iterationDecorator.default)(elementRoleMap, elementRoleMap.entries());
- }
- });
-
- // ../../node_modules/aria-query/lib/roleElementMap.js
- var require_roleElementMap = __commonJS({
- "../../node_modules/aria-query/lib/roleElementMap.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = void 0;
- var _iterationDecorator = _interopRequireDefault(require_iterationDecorator()), _rolesMap = _interopRequireDefault(require_rolesMap());
- function _interopRequireDefault(e) {
- return e && e.__esModule ? e : { default: e };
- }
- function _slicedToArray(r2, e) {
- return _arrayWithHoles(r2) || _iterableToArrayLimit(r2, e) || _unsupportedIterableToArray2(r2, e) || _nonIterableRest();
- }
- function _nonIterableRest() {
- throw new TypeError(`Invalid attempt to destructure non-iterable instance.
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
- }
- function _unsupportedIterableToArray2(r2, a3) {
- if (r2) {
- if (typeof r2 == "string") return _arrayLikeToArray2(r2, a3);
- var t = {}.toString.call(r2).slice(8, -1);
- return t === "Object" && r2.constructor && (t = r2.constructor.name), t === "Map" || t === "Set" ? Array.from(r2) : t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray2(r2, a3) : void 0;
- }
- }
- function _arrayLikeToArray2(r2, a3) {
- (a3 == null || a3 > r2.length) && (a3 = r2.length);
- for (var e = 0, n = Array(a3); e < a3; e++) n[e] = r2[e];
- return n;
- }
- function _iterableToArrayLimit(r2, l) {
- var t = r2 == null ? null : typeof Symbol < "u" && r2[Symbol.iterator] || r2["@@iterator"];
- if (t != null) {
- var e, n, i2, u2, a3 = [], f4 = !0, o = !1;
- try {
- if (i2 = (t = t.call(r2)).next, l === 0) {
- if (Object(t) !== t) return;
- f4 = !1;
- } else for (; !(f4 = (e = i2.call(t)).done) && (a3.push(e.value), a3.length !== l); f4 = !0) ;
- } catch (r3) {
- o = !0, n = r3;
- } finally {
- try {
- if (!f4 && t.return != null && (u2 = t.return(), Object(u2) !== u2)) return;
- } finally {
- if (o) throw n;
- }
- }
- return a3;
- }
- }
- function _arrayWithHoles(r2) {
- if (Array.isArray(r2)) return r2;
- }
- var roleElement = [], keys3 = _rolesMap.default.keys();
- for (i = 0; i < keys3.length; i++)
- if (key = keys3[i], role = _rolesMap.default.get(key), relationConcepts = [], role) {
- for (concepts = [].concat(role.baseConcepts, role.relatedConcepts), k = 0; k < concepts.length; k++)
- relation = concepts[k], relation.module === "HTML" && (concept = relation.concept, concept != null && relationConcepts.push(concept));
- relationConcepts.length > 0 && roleElement.push([key, relationConcepts]);
- }
- var key, role, relationConcepts, concepts, relation, concept, k, i, roleElementMap = {
- entries: function() {
- return roleElement;
- },
- forEach: function(fn4) {
- for (var thisArg = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null, _i = 0, _roleElement = roleElement; _i < _roleElement.length; _i++) {
- var _roleElement$_i = _slicedToArray(_roleElement[_i], 2), _key = _roleElement$_i[0], values = _roleElement$_i[1];
- fn4.call(thisArg, values, _key, roleElement);
- }
- },
- get: function(key2) {
- var item = roleElement.filter(function(tuple) {
- return tuple[0] === key2;
- })[0];
- return item && item[1];
- },
- has: function(key2) {
- return !!roleElementMap.get(key2);
- },
- keys: function() {
- return roleElement.map(function(_ref) {
- var _ref2 = _slicedToArray(_ref, 1), key2 = _ref2[0];
- return key2;
- });
- },
- values: function() {
- return roleElement.map(function(_ref3) {
- var _ref4 = _slicedToArray(_ref3, 2), values2 = _ref4[1];
- return values2;
- });
- }
- }, _default = exports.default = (0, _iterationDecorator.default)(roleElementMap, roleElementMap.entries());
- }
- });
-
- // ../../node_modules/aria-query/lib/index.js
- var require_lib2 = __commonJS({
- "../../node_modules/aria-query/lib/index.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.roles = exports.roleElements = exports.elementRoles = exports.dom = exports.aria = void 0;
- var _ariaPropsMap = _interopRequireDefault(require_ariaPropsMap()), _domMap = _interopRequireDefault(require_domMap()), _rolesMap = _interopRequireDefault(require_rolesMap()), _elementRoleMap = _interopRequireDefault(require_elementRoleMap()), _roleElementMap = _interopRequireDefault(require_roleElementMap());
- function _interopRequireDefault(e) {
- return e && e.__esModule ? e : { default: e };
- }
- var aria = exports.aria = _ariaPropsMap.default, dom = exports.dom = _domMap.default, roles3 = exports.roles = _rolesMap.default, elementRoles3 = exports.elementRoles = _elementRoleMap.default, roleElements2 = exports.roleElements = _roleElementMap.default;
- }
- });
-
- // ../../node_modules/css.escape/css.escape.js
- var require_css_escape = __commonJS({
- "../../node_modules/css.escape/css.escape.js"(exports, module2) {
- (function(root2, factory) {
- typeof exports == "object" ? module2.exports = factory(root2) : typeof define == "function" && define.amd ? define([], factory.bind(root2, root2)) : factory(root2);
- })(typeof global < "u" ? global : exports, function(root2) {
- if (root2.CSS && root2.CSS.escape)
- return root2.CSS.escape;
- var cssEscape = function(value) {
- if (arguments.length == 0)
- throw new TypeError("`CSS.escape` requires an argument.");
- for (var string = String(value), length2 = string.length, index4 = -1, codeUnit, result = "", firstCodeUnit = string.charCodeAt(0); ++index4 < length2; ) {
- if (codeUnit = string.charCodeAt(index4), codeUnit == 0) {
- result += "\uFFFD";
- continue;
- }
- if (
- // If the character is in the range [\1-\1F] (U+0001 to U+001F) or is
- // U+007F, […]
- codeUnit >= 1 && codeUnit <= 31 || codeUnit == 127 || // If the character is the first character and is in the range [0-9]
- // (U+0030 to U+0039), […]
- index4 == 0 && codeUnit >= 48 && codeUnit <= 57 || // If the character is the second character and is in the range [0-9]
- // (U+0030 to U+0039) and the first character is a `-` (U+002D), […]
- index4 == 1 && codeUnit >= 48 && codeUnit <= 57 && firstCodeUnit == 45
- ) {
- result += "\\" + codeUnit.toString(16) + " ";
- continue;
- }
- if (
- // If the character is the first character and is a `-` (U+002D), and
- // there is no second character, […]
- index4 == 0 && length2 == 1 && codeUnit == 45
- ) {
- result += "\\" + string.charAt(index4);
- continue;
- }
- if (codeUnit >= 128 || codeUnit == 45 || codeUnit == 95 || codeUnit >= 48 && codeUnit <= 57 || codeUnit >= 65 && codeUnit <= 90 || codeUnit >= 97 && codeUnit <= 122) {
- result += string.charAt(index4);
- continue;
- }
- result += "\\" + string.charAt(index4);
- }
- return result;
- };
- return root2.CSS || (root2.CSS = {}), root2.CSS.escape = cssEscape, cssEscape;
- });
- }
- });
-
- // ../../node_modules/@testing-library/dom/node_modules/ansi-styles/index.js
- var require_ansi_styles = __commonJS({
- "../../node_modules/@testing-library/dom/node_modules/ansi-styles/index.js"(exports, module2) {
- "use strict";
- var wrapAnsi256 = (offset3 = 0) => (code) => `\x1B[${38 + offset3};5;${code}m`, wrapAnsi16m = (offset3 = 0) => (red, green, blue) => `\x1B[${38 + offset3};2;${red};${green};${blue}m`;
- function assembleStyles() {
- let codes = /* @__PURE__ */ new Map(), styles4 = {
- modifier: {
- reset: [0, 0],
- // 21 isn't widely supported and 22 does the same thing
- bold: [1, 22],
- dim: [2, 22],
- italic: [3, 23],
- underline: [4, 24],
- overline: [53, 55],
- inverse: [7, 27],
- hidden: [8, 28],
- strikethrough: [9, 29]
- },
- color: {
- black: [30, 39],
- red: [31, 39],
- green: [32, 39],
- yellow: [33, 39],
- blue: [34, 39],
- magenta: [35, 39],
- cyan: [36, 39],
- white: [37, 39],
- // Bright color
- blackBright: [90, 39],
- redBright: [91, 39],
- greenBright: [92, 39],
- yellowBright: [93, 39],
- blueBright: [94, 39],
- magentaBright: [95, 39],
- cyanBright: [96, 39],
- whiteBright: [97, 39]
- },
- bgColor: {
- bgBlack: [40, 49],
- bgRed: [41, 49],
- bgGreen: [42, 49],
- bgYellow: [43, 49],
- bgBlue: [44, 49],
- bgMagenta: [45, 49],
- bgCyan: [46, 49],
- bgWhite: [47, 49],
- // Bright color
- bgBlackBright: [100, 49],
- bgRedBright: [101, 49],
- bgGreenBright: [102, 49],
- bgYellowBright: [103, 49],
- bgBlueBright: [104, 49],
- bgMagentaBright: [105, 49],
- bgCyanBright: [106, 49],
- bgWhiteBright: [107, 49]
- }
- };
- styles4.color.gray = styles4.color.blackBright, styles4.bgColor.bgGray = styles4.bgColor.bgBlackBright, styles4.color.grey = styles4.color.blackBright, styles4.bgColor.bgGrey = styles4.bgColor.bgBlackBright;
- for (let [groupName, group] of Object.entries(styles4)) {
- for (let [styleName, style] of Object.entries(group))
- styles4[styleName] = {
- open: `\x1B[${style[0]}m`,
- close: `\x1B[${style[1]}m`
- }, group[styleName] = styles4[styleName], codes.set(style[0], style[1]);
- Object.defineProperty(styles4, groupName, {
- value: group,
- enumerable: !1
- });
- }
- return Object.defineProperty(styles4, "codes", {
- value: codes,
- enumerable: !1
- }), styles4.color.close = "\x1B[39m", styles4.bgColor.close = "\x1B[49m", styles4.color.ansi256 = wrapAnsi256(), styles4.color.ansi16m = wrapAnsi16m(), styles4.bgColor.ansi256 = wrapAnsi256(10), styles4.bgColor.ansi16m = wrapAnsi16m(10), Object.defineProperties(styles4, {
- rgbToAnsi256: {
- value: (red, green, blue) => red === green && green === blue ? red < 8 ? 16 : red > 248 ? 231 : Math.round((red - 8) / 247 * 24) + 232 : 16 + 36 * Math.round(red / 255 * 5) + 6 * Math.round(green / 255 * 5) + Math.round(blue / 255 * 5),
- enumerable: !1
- },
- hexToRgb: {
- value: (hex3) => {
- let matches4 = /(?<colorString>[a-f\d]{6}|[a-f\d]{3})/i.exec(hex3.toString(16));
- if (!matches4)
- return [0, 0, 0];
- let { colorString } = matches4.groups;
- colorString.length === 3 && (colorString = colorString.split("").map((character2) => character2 + character2).join(""));
- let integer = Number.parseInt(colorString, 16);
- return [
- integer >> 16 & 255,
- integer >> 8 & 255,
- integer & 255
- ];
- },
- enumerable: !1
- },
- hexToAnsi256: {
- value: (hex3) => styles4.rgbToAnsi256(...styles4.hexToRgb(hex3)),
- enumerable: !1
- }
- }), styles4;
- }
- Object.defineProperty(module2, "exports", {
- enumerable: !0,
- get: assembleStyles
- });
- }
- });
-
- // ../../node_modules/@testing-library/dom/node_modules/pretty-format/build/collections.js
- var require_collections = __commonJS({
- "../../node_modules/@testing-library/dom/node_modules/pretty-format/build/collections.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.printIteratorEntries = printIteratorEntries2;
- exports.printIteratorValues = printIteratorValues2;
- exports.printListItems = printListItems2;
- exports.printObjectProperties = printObjectProperties2;
- var getKeysOfEnumerableProperties2 = (object, compareKeys) => {
- let keys3 = Object.keys(object).sort(compareKeys);
- return Object.getOwnPropertySymbols && Object.getOwnPropertySymbols(object).forEach((symbol) => {
- Object.getOwnPropertyDescriptor(object, symbol).enumerable && keys3.push(symbol);
- }), keys3;
- };
- function printIteratorEntries2(iterator, config4, indentation, depth, refs, printer2, separator = ": ") {
- let result = "", current = iterator.next();
- if (!current.done) {
- result += config4.spacingOuter;
- let indentationNext = indentation + config4.indent;
- for (; !current.done; ) {
- let name = printer2(
- current.value[0],
- config4,
- indentationNext,
- depth,
- refs
- ), value = printer2(
- current.value[1],
- config4,
- indentationNext,
- depth,
- refs
- );
- result += indentationNext + name + separator + value, current = iterator.next(), current.done ? config4.min || (result += ",") : result += "," + config4.spacingInner;
- }
- result += config4.spacingOuter + indentation;
- }
- return result;
- }
- function printIteratorValues2(iterator, config4, indentation, depth, refs, printer2) {
- let result = "", current = iterator.next();
- if (!current.done) {
- result += config4.spacingOuter;
- let indentationNext = indentation + config4.indent;
- for (; !current.done; )
- result += indentationNext + printer2(current.value, config4, indentationNext, depth, refs), current = iterator.next(), current.done ? config4.min || (result += ",") : result += "," + config4.spacingInner;
- result += config4.spacingOuter + indentation;
- }
- return result;
- }
- function printListItems2(list, config4, indentation, depth, refs, printer2) {
- let result = "";
- if (list.length) {
- result += config4.spacingOuter;
- let indentationNext = indentation + config4.indent;
- for (let i = 0; i < list.length; i++)
- result += indentationNext, i in list && (result += printer2(list[i], config4, indentationNext, depth, refs)), i < list.length - 1 ? result += "," + config4.spacingInner : config4.min || (result += ",");
- result += config4.spacingOuter + indentation;
- }
- return result;
- }
- function printObjectProperties2(val, config4, indentation, depth, refs, printer2) {
- let result = "", keys3 = getKeysOfEnumerableProperties2(val, config4.compareKeys);
- if (keys3.length) {
- result += config4.spacingOuter;
- let indentationNext = indentation + config4.indent;
- for (let i = 0; i < keys3.length; i++) {
- let key = keys3[i], name = printer2(key, config4, indentationNext, depth, refs), value = printer2(val[key], config4, indentationNext, depth, refs);
- result += indentationNext + name + ": " + value, i < keys3.length - 1 ? result += "," + config4.spacingInner : config4.min || (result += ",");
- }
- result += config4.spacingOuter + indentation;
- }
- return result;
- }
- }
- });
-
- // ../../node_modules/@testing-library/dom/node_modules/pretty-format/build/plugins/AsymmetricMatcher.js
- var require_AsymmetricMatcher = __commonJS({
- "../../node_modules/@testing-library/dom/node_modules/pretty-format/build/plugins/AsymmetricMatcher.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.test = exports.serialize = exports.default = void 0;
- var _collections = require_collections(), global2 = (function() {
- return typeof globalThis < "u" ? globalThis : typeof global2 < "u" ? global2 : typeof self < "u" ? self : typeof window < "u" ? window : Function("return this")();
- })(), Symbol3 = global2["jest-symbol-do-not-touch"] || global2.Symbol, asymmetricMatcher2 = typeof Symbol3 == "function" && Symbol3.for ? Symbol3.for("jest.asymmetricMatcher") : 1267621, SPACE2 = " ", serialize3 = (val, config4, indentation, depth, refs, printer2) => {
- let stringedValue = val.toString();
- return stringedValue === "ArrayContaining" || stringedValue === "ArrayNotContaining" ? ++depth > config4.maxDepth ? "[" + stringedValue + "]" : stringedValue + SPACE2 + "[" + (0, _collections.printListItems)(
- val.sample,
- config4,
- indentation,
- depth,
- refs,
- printer2
- ) + "]" : stringedValue === "ObjectContaining" || stringedValue === "ObjectNotContaining" ? ++depth > config4.maxDepth ? "[" + stringedValue + "]" : stringedValue + SPACE2 + "{" + (0, _collections.printObjectProperties)(
- val.sample,
- config4,
- indentation,
- depth,
- refs,
- printer2
- ) + "}" : stringedValue === "StringMatching" || stringedValue === "StringNotMatching" || stringedValue === "StringContaining" || stringedValue === "StringNotContaining" ? stringedValue + SPACE2 + printer2(val.sample, config4, indentation, depth, refs) : val.toAsymmetricMatcher();
- };
- exports.serialize = serialize3;
- var test3 = (val) => val && val.$$typeof === asymmetricMatcher2;
- exports.test = test3;
- var plugin2 = {
- serialize: serialize3,
- test: test3
- }, _default = plugin2;
- exports.default = _default;
- }
- });
-
- // ../../node_modules/@testing-library/dom/node_modules/ansi-regex/index.js
- var require_ansi_regex = __commonJS({
- "../../node_modules/@testing-library/dom/node_modules/ansi-regex/index.js"(exports, module2) {
- "use strict";
- module2.exports = ({ onlyFirst = !1 } = {}) => {
- let pattern = [
- "[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)",
- "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"
- ].join("|");
- return new RegExp(pattern, onlyFirst ? void 0 : "g");
- };
- }
- });
-
- // ../../node_modules/@testing-library/dom/node_modules/pretty-format/build/plugins/ConvertAnsi.js
- var require_ConvertAnsi = __commonJS({
- "../../node_modules/@testing-library/dom/node_modules/pretty-format/build/plugins/ConvertAnsi.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.test = exports.serialize = exports.default = void 0;
- var _ansiRegex = _interopRequireDefault(require_ansi_regex()), _ansiStyles = _interopRequireDefault(require_ansi_styles());
- function _interopRequireDefault(obj) {
- return obj && obj.__esModule ? obj : { default: obj };
- }
- var toHumanReadableAnsi = (text) => text.replace((0, _ansiRegex.default)(), (match3) => {
- switch (match3) {
- case _ansiStyles.default.red.close:
- case _ansiStyles.default.green.close:
- case _ansiStyles.default.cyan.close:
- case _ansiStyles.default.gray.close:
- case _ansiStyles.default.white.close:
- case _ansiStyles.default.yellow.close:
- case _ansiStyles.default.bgRed.close:
- case _ansiStyles.default.bgGreen.close:
- case _ansiStyles.default.bgYellow.close:
- case _ansiStyles.default.inverse.close:
- case _ansiStyles.default.dim.close:
- case _ansiStyles.default.bold.close:
- case _ansiStyles.default.reset.open:
- case _ansiStyles.default.reset.close:
- return "</>";
- case _ansiStyles.default.red.open:
- return "<red>";
- case _ansiStyles.default.green.open:
- return "<green>";
- case _ansiStyles.default.cyan.open:
- return "<cyan>";
- case _ansiStyles.default.gray.open:
- return "<gray>";
- case _ansiStyles.default.white.open:
- return "<white>";
- case _ansiStyles.default.yellow.open:
- return "<yellow>";
- case _ansiStyles.default.bgRed.open:
- return "<bgRed>";
- case _ansiStyles.default.bgGreen.open:
- return "<bgGreen>";
- case _ansiStyles.default.bgYellow.open:
- return "<bgYellow>";
- case _ansiStyles.default.inverse.open:
- return "<inverse>";
- case _ansiStyles.default.dim.open:
- return "<dim>";
- case _ansiStyles.default.bold.open:
- return "<bold>";
- default:
- return "";
- }
- }), test3 = (val) => typeof val == "string" && !!val.match((0, _ansiRegex.default)());
- exports.test = test3;
- var serialize3 = (val, config4, indentation, depth, refs, printer2) => printer2(toHumanReadableAnsi(val), config4, indentation, depth, refs);
- exports.serialize = serialize3;
- var plugin2 = {
- serialize: serialize3,
- test: test3
- }, _default = plugin2;
- exports.default = _default;
- }
- });
-
- // ../../node_modules/@testing-library/dom/node_modules/pretty-format/build/plugins/DOMCollection.js
- var require_DOMCollection = __commonJS({
- "../../node_modules/@testing-library/dom/node_modules/pretty-format/build/plugins/DOMCollection.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.test = exports.serialize = exports.default = void 0;
- var _collections = require_collections(), SPACE2 = " ", OBJECT_NAMES2 = ["DOMStringMap", "NamedNodeMap"], ARRAY_REGEXP2 = /^(HTML\w*Collection|NodeList)$/, testName2 = (name) => OBJECT_NAMES2.indexOf(name) !== -1 || ARRAY_REGEXP2.test(name), test3 = (val) => val && val.constructor && !!val.constructor.name && testName2(val.constructor.name);
- exports.test = test3;
- var isNamedNodeMap2 = (collection) => collection.constructor.name === "NamedNodeMap", serialize3 = (collection, config4, indentation, depth, refs, printer2) => {
- let name = collection.constructor.name;
- return ++depth > config4.maxDepth ? "[" + name + "]" : (config4.min ? "" : name + SPACE2) + (OBJECT_NAMES2.indexOf(name) !== -1 ? "{" + (0, _collections.printObjectProperties)(
- isNamedNodeMap2(collection) ? Array.from(collection).reduce((props, attribute) => (props[attribute.name] = attribute.value, props), {}) : { ...collection },
- config4,
- indentation,
- depth,
- refs,
- printer2
- ) + "}" : "[" + (0, _collections.printListItems)(
- Array.from(collection),
- config4,
- indentation,
- depth,
- refs,
- printer2
- ) + "]");
- };
- exports.serialize = serialize3;
- var plugin2 = {
- serialize: serialize3,
- test: test3
- }, _default = plugin2;
- exports.default = _default;
- }
- });
-
- // ../../node_modules/@testing-library/dom/node_modules/pretty-format/build/plugins/lib/escapeHTML.js
- var require_escapeHTML = __commonJS({
- "../../node_modules/@testing-library/dom/node_modules/pretty-format/build/plugins/lib/escapeHTML.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = escapeHTML3;
- function escapeHTML3(str2) {
- return str2.replace(/</g, "<").replace(/>/g, ">");
- }
- }
- });
-
- // ../../node_modules/@testing-library/dom/node_modules/pretty-format/build/plugins/lib/markup.js
- var require_markup2 = __commonJS({
- "../../node_modules/@testing-library/dom/node_modules/pretty-format/build/plugins/lib/markup.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.printText = exports.printProps = exports.printElementAsLeaf = exports.printElement = exports.printComment = exports.printChildren = void 0;
- var _escapeHTML = _interopRequireDefault(require_escapeHTML());
- function _interopRequireDefault(obj) {
- return obj && obj.__esModule ? obj : { default: obj };
- }
- var printProps3 = (keys3, props, config4, indentation, depth, refs, printer2) => {
- let indentationNext = indentation + config4.indent, colors3 = config4.colors;
- return keys3.map((key) => {
- let value = props[key], printed = printer2(value, config4, indentationNext, depth, refs);
- return typeof value != "string" && (printed.indexOf(`
- `) !== -1 && (printed = config4.spacingOuter + indentationNext + printed + config4.spacingOuter + indentation), printed = "{" + printed + "}"), config4.spacingInner + indentation + colors3.prop.open + key + colors3.prop.close + "=" + colors3.value.open + printed + colors3.value.close;
- }).join("");
- };
- exports.printProps = printProps3;
- var printChildren3 = (children, config4, indentation, depth, refs, printer2) => children.map(
- (child) => config4.spacingOuter + indentation + (typeof child == "string" ? printText3(child, config4) : printer2(child, config4, indentation, depth, refs))
- ).join("");
- exports.printChildren = printChildren3;
- var printText3 = (text, config4) => {
- let contentColor = config4.colors.content;
- return contentColor.open + (0, _escapeHTML.default)(text) + contentColor.close;
- };
- exports.printText = printText3;
- var printComment3 = (comment2, config4) => {
- let commentColor = config4.colors.comment;
- return commentColor.open + "<!--" + (0, _escapeHTML.default)(comment2) + "-->" + commentColor.close;
- };
- exports.printComment = printComment3;
- var printElement3 = (type5, printedProps, printedChildren, config4, indentation) => {
- let tagColor = config4.colors.tag;
- return tagColor.open + "<" + type5 + (printedProps && tagColor.close + printedProps + config4.spacingOuter + indentation + tagColor.open) + (printedChildren ? ">" + tagColor.close + printedChildren + config4.spacingOuter + indentation + tagColor.open + "</" + type5 : (printedProps && !config4.min ? "" : " ") + "/") + ">" + tagColor.close;
- };
- exports.printElement = printElement3;
- var printElementAsLeaf3 = (type5, config4) => {
- let tagColor = config4.colors.tag;
- return tagColor.open + "<" + type5 + tagColor.close + " \u2026" + tagColor.open + " />" + tagColor.close;
- };
- exports.printElementAsLeaf = printElementAsLeaf3;
- }
- });
-
- // ../../node_modules/@testing-library/dom/node_modules/pretty-format/build/plugins/DOMElement.js
- var require_DOMElement = __commonJS({
- "../../node_modules/@testing-library/dom/node_modules/pretty-format/build/plugins/DOMElement.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.test = exports.serialize = exports.default = void 0;
- var _markup = require_markup2(), ELEMENT_NODE3 = 1, TEXT_NODE3 = 3, COMMENT_NODE3 = 8, FRAGMENT_NODE3 = 11, ELEMENT_REGEXP3 = /^((HTML|SVG)\w*)?Element$/, testHasAttribute2 = (val) => {
- try {
- return typeof val.hasAttribute == "function" && val.hasAttribute("is");
- } catch {
- return !1;
- }
- }, testNode3 = (val) => {
- let constructorName = val.constructor.name, { nodeType, tagName } = val, isCustomElement3 = typeof tagName == "string" && tagName.includes("-") || testHasAttribute2(val);
- return nodeType === ELEMENT_NODE3 && (ELEMENT_REGEXP3.test(constructorName) || isCustomElement3) || nodeType === TEXT_NODE3 && constructorName === "Text" || nodeType === COMMENT_NODE3 && constructorName === "Comment" || nodeType === FRAGMENT_NODE3 && constructorName === "DocumentFragment";
- }, test3 = (val) => {
- var _val$constructor;
- return (val == null || (_val$constructor = val.constructor) === null || _val$constructor === void 0 ? void 0 : _val$constructor.name) && testNode3(val);
- };
- exports.test = test3;
- function nodeIsText3(node2) {
- return node2.nodeType === TEXT_NODE3;
- }
- function nodeIsComment3(node2) {
- return node2.nodeType === COMMENT_NODE3;
- }
- function nodeIsFragment3(node2) {
- return node2.nodeType === FRAGMENT_NODE3;
- }
- var serialize3 = (node2, config4, indentation, depth, refs, printer2) => {
- if (nodeIsText3(node2))
- return (0, _markup.printText)(node2.data, config4);
- if (nodeIsComment3(node2))
- return (0, _markup.printComment)(node2.data, config4);
- let type5 = nodeIsFragment3(node2) ? "DocumentFragment" : node2.tagName.toLowerCase();
- return ++depth > config4.maxDepth ? (0, _markup.printElementAsLeaf)(type5, config4) : (0, _markup.printElement)(
- type5,
- (0, _markup.printProps)(
- nodeIsFragment3(node2) ? [] : Array.from(node2.attributes).map((attr) => attr.name).sort(),
- nodeIsFragment3(node2) ? {} : Array.from(node2.attributes).reduce((props, attribute) => (props[attribute.name] = attribute.value, props), {}),
- config4,
- indentation + config4.indent,
- depth,
- refs,
- printer2
- ),
- (0, _markup.printChildren)(
- Array.prototype.slice.call(node2.childNodes || node2.children),
- config4,
- indentation + config4.indent,
- depth,
- refs,
- printer2
- ),
- config4,
- indentation
- );
- };
- exports.serialize = serialize3;
- var plugin2 = {
- serialize: serialize3,
- test: test3
- }, _default = plugin2;
- exports.default = _default;
- }
- });
-
- // ../../node_modules/@testing-library/dom/node_modules/pretty-format/build/plugins/Immutable.js
- var require_Immutable = __commonJS({
- "../../node_modules/@testing-library/dom/node_modules/pretty-format/build/plugins/Immutable.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.test = exports.serialize = exports.default = void 0;
- var _collections = require_collections(), IS_ITERABLE_SENTINEL2 = "@@__IMMUTABLE_ITERABLE__@@", IS_LIST_SENTINEL3 = "@@__IMMUTABLE_LIST__@@", IS_KEYED_SENTINEL3 = "@@__IMMUTABLE_KEYED__@@", IS_MAP_SENTINEL2 = "@@__IMMUTABLE_MAP__@@", IS_ORDERED_SENTINEL3 = "@@__IMMUTABLE_ORDERED__@@", IS_RECORD_SENTINEL2 = "@@__IMMUTABLE_RECORD__@@", IS_SEQ_SENTINEL2 = "@@__IMMUTABLE_SEQ__@@", IS_SET_SENTINEL3 = "@@__IMMUTABLE_SET__@@", IS_STACK_SENTINEL2 = "@@__IMMUTABLE_STACK__@@", getImmutableName2 = (name) => "Immutable." + name, printAsLeaf2 = (name) => "[" + name + "]", SPACE2 = " ", LAZY2 = "\u2026", printImmutableEntries2 = (val, config4, indentation, depth, refs, printer2, type5) => ++depth > config4.maxDepth ? printAsLeaf2(getImmutableName2(type5)) : getImmutableName2(type5) + SPACE2 + "{" + (0, _collections.printIteratorEntries)(
- val.entries(),
- config4,
- indentation,
- depth,
- refs,
- printer2
- ) + "}";
- function getRecordEntries2(val) {
- let i = 0;
- return {
- next() {
- if (i < val._keys.length) {
- let key = val._keys[i++];
- return {
- done: !1,
- value: [key, val.get(key)]
- };
- }
- return {
- done: !0,
- value: void 0
- };
- }
- };
- }
- var printImmutableRecord2 = (val, config4, indentation, depth, refs, printer2) => {
- let name = getImmutableName2(val._name || "Record");
- return ++depth > config4.maxDepth ? printAsLeaf2(name) : name + SPACE2 + "{" + (0, _collections.printIteratorEntries)(
- getRecordEntries2(val),
- config4,
- indentation,
- depth,
- refs,
- printer2
- ) + "}";
- }, printImmutableSeq2 = (val, config4, indentation, depth, refs, printer2) => {
- let name = getImmutableName2("Seq");
- return ++depth > config4.maxDepth ? printAsLeaf2(name) : val[IS_KEYED_SENTINEL3] ? name + SPACE2 + "{" + // from Immutable collection of entries or from ECMAScript object
- (val._iter || val._object ? (0, _collections.printIteratorEntries)(
- val.entries(),
- config4,
- indentation,
- depth,
- refs,
- printer2
- ) : LAZY2) + "}" : name + SPACE2 + "[" + (val._iter || // from Immutable collection of values
- val._array || // from ECMAScript array
- val._collection || // from ECMAScript collection in immutable v4
- val._iterable ? (0, _collections.printIteratorValues)(
- val.values(),
- config4,
- indentation,
- depth,
- refs,
- printer2
- ) : LAZY2) + "]";
- }, printImmutableValues2 = (val, config4, indentation, depth, refs, printer2, type5) => ++depth > config4.maxDepth ? printAsLeaf2(getImmutableName2(type5)) : getImmutableName2(type5) + SPACE2 + "[" + (0, _collections.printIteratorValues)(
- val.values(),
- config4,
- indentation,
- depth,
- refs,
- printer2
- ) + "]", serialize3 = (val, config4, indentation, depth, refs, printer2) => val[IS_MAP_SENTINEL2] ? printImmutableEntries2(
- val,
- config4,
- indentation,
- depth,
- refs,
- printer2,
- val[IS_ORDERED_SENTINEL3] ? "OrderedMap" : "Map"
- ) : val[IS_LIST_SENTINEL3] ? printImmutableValues2(
- val,
- config4,
- indentation,
- depth,
- refs,
- printer2,
- "List"
- ) : val[IS_SET_SENTINEL3] ? printImmutableValues2(
- val,
- config4,
- indentation,
- depth,
- refs,
- printer2,
- val[IS_ORDERED_SENTINEL3] ? "OrderedSet" : "Set"
- ) : val[IS_STACK_SENTINEL2] ? printImmutableValues2(
- val,
- config4,
- indentation,
- depth,
- refs,
- printer2,
- "Stack"
- ) : val[IS_SEQ_SENTINEL2] ? printImmutableSeq2(val, config4, indentation, depth, refs, printer2) : printImmutableRecord2(val, config4, indentation, depth, refs, printer2);
- exports.serialize = serialize3;
- var test3 = (val) => val && (val[IS_ITERABLE_SENTINEL2] === !0 || val[IS_RECORD_SENTINEL2] === !0);
- exports.test = test3;
- var plugin2 = {
- serialize: serialize3,
- test: test3
- }, _default = plugin2;
- exports.default = _default;
- }
- });
-
- // ../../node_modules/@testing-library/dom/node_modules/react-is/cjs/react-is.production.min.js
- var require_react_is_production_min2 = __commonJS({
- "../../node_modules/@testing-library/dom/node_modules/react-is/cjs/react-is.production.min.js"(exports) {
- "use strict";
- var b = 60103, c = 60106, d = 60107, e = 60108, f4 = 60114, g2 = 60109, h3 = 60110, k = 60112, l = 60113, m3 = 60120, n = 60115, p3 = 60116, q = 60121, r2 = 60122, u2 = 60117, v = 60129, w = 60131;
- typeof Symbol == "function" && Symbol.for && (x = Symbol.for, b = x("react.element"), c = x("react.portal"), d = x("react.fragment"), e = x("react.strict_mode"), f4 = x("react.profiler"), g2 = x("react.provider"), h3 = x("react.context"), k = x("react.forward_ref"), l = x("react.suspense"), m3 = x("react.suspense_list"), n = x("react.memo"), p3 = x("react.lazy"), q = x("react.block"), r2 = x("react.server.block"), u2 = x("react.fundamental"), v = x("react.debug_trace_mode"), w = x("react.legacy_hidden"));
- var x;
- function y(a3) {
- if (typeof a3 == "object" && a3 !== null) {
- var t = a3.$$typeof;
- switch (t) {
- case b:
- switch (a3 = a3.type, a3) {
- case d:
- case f4:
- case e:
- case l:
- case m3:
- return a3;
- default:
- switch (a3 = a3 && a3.$$typeof, a3) {
- case h3:
- case k:
- case p3:
- case n:
- case g2:
- return a3;
- default:
- return t;
- }
- }
- case c:
- return t;
- }
- }
- }
- var z = g2, A3 = b, B3 = k, C3 = d, D = p3, E = n, F = c, G = f4, H = e, I = l;
- exports.ContextConsumer = h3;
- exports.ContextProvider = z;
- exports.Element = A3;
- exports.ForwardRef = B3;
- exports.Fragment = C3;
- exports.Lazy = D;
- exports.Memo = E;
- exports.Portal = F;
- exports.Profiler = G;
- exports.StrictMode = H;
- exports.Suspense = I;
- exports.isAsyncMode = function() {
- return !1;
- };
- exports.isConcurrentMode = function() {
- return !1;
- };
- exports.isContextConsumer = function(a3) {
- return y(a3) === h3;
- };
- exports.isContextProvider = function(a3) {
- return y(a3) === g2;
- };
- exports.isElement = function(a3) {
- return typeof a3 == "object" && a3 !== null && a3.$$typeof === b;
- };
- exports.isForwardRef = function(a3) {
- return y(a3) === k;
- };
- exports.isFragment = function(a3) {
- return y(a3) === d;
- };
- exports.isLazy = function(a3) {
- return y(a3) === p3;
- };
- exports.isMemo = function(a3) {
- return y(a3) === n;
- };
- exports.isPortal = function(a3) {
- return y(a3) === c;
- };
- exports.isProfiler = function(a3) {
- return y(a3) === f4;
- };
- exports.isStrictMode = function(a3) {
- return y(a3) === e;
- };
- exports.isSuspense = function(a3) {
- return y(a3) === l;
- };
- exports.isValidElementType = function(a3) {
- return typeof a3 == "string" || typeof a3 == "function" || a3 === d || a3 === f4 || a3 === v || a3 === e || a3 === l || a3 === m3 || a3 === w || typeof a3 == "object" && a3 !== null && (a3.$$typeof === p3 || a3.$$typeof === n || a3.$$typeof === g2 || a3.$$typeof === h3 || a3.$$typeof === k || a3.$$typeof === u2 || a3.$$typeof === q || a3[0] === r2);
- };
- exports.typeOf = y;
- }
- });
-
- // ../../node_modules/@testing-library/dom/node_modules/react-is/index.js
- var require_react_is2 = __commonJS({
- "../../node_modules/@testing-library/dom/node_modules/react-is/index.js"(exports, module2) {
- "use strict";
- module2.exports = require_react_is_production_min2();
- }
- });
-
- // ../../node_modules/@testing-library/dom/node_modules/pretty-format/build/plugins/ReactElement.js
- var require_ReactElement = __commonJS({
- "../../node_modules/@testing-library/dom/node_modules/pretty-format/build/plugins/ReactElement.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.test = exports.serialize = exports.default = void 0;
- var ReactIs2 = _interopRequireWildcard(require_react_is2()), _markup = require_markup2();
- function _getRequireWildcardCache(nodeInterop) {
- if (typeof WeakMap != "function") return null;
- var cacheBabelInterop = /* @__PURE__ */ new WeakMap(), cacheNodeInterop = /* @__PURE__ */ new WeakMap();
- return (_getRequireWildcardCache = function(nodeInterop2) {
- return nodeInterop2 ? cacheNodeInterop : cacheBabelInterop;
- })(nodeInterop);
- }
- function _interopRequireWildcard(obj, nodeInterop) {
- if (!nodeInterop && obj && obj.__esModule)
- return obj;
- if (obj === null || typeof obj != "object" && typeof obj != "function")
- return { default: obj };
- var cache = _getRequireWildcardCache(nodeInterop);
- if (cache && cache.has(obj))
- return cache.get(obj);
- var newObj = {}, hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
- for (var key in obj)
- if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
- var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
- desc && (desc.get || desc.set) ? Object.defineProperty(newObj, key, desc) : newObj[key] = obj[key];
- }
- return newObj.default = obj, cache && cache.set(obj, newObj), newObj;
- }
- var getChildren2 = (arg, children = []) => (Array.isArray(arg) ? arg.forEach((item) => {
- getChildren2(item, children);
- }) : arg != null && arg !== !1 && children.push(arg), children), getType4 = (element) => {
- let type5 = element.type;
- if (typeof type5 == "string")
- return type5;
- if (typeof type5 == "function")
- return type5.displayName || type5.name || "Unknown";
- if (ReactIs2.isFragment(element))
- return "React.Fragment";
- if (ReactIs2.isSuspense(element))
- return "React.Suspense";
- if (typeof type5 == "object" && type5 !== null) {
- if (ReactIs2.isContextProvider(element))
- return "Context.Provider";
- if (ReactIs2.isContextConsumer(element))
- return "Context.Consumer";
- if (ReactIs2.isForwardRef(element)) {
- if (type5.displayName)
- return type5.displayName;
- let functionName = type5.render.displayName || type5.render.name || "";
- return functionName !== "" ? "ForwardRef(" + functionName + ")" : "ForwardRef";
- }
- if (ReactIs2.isMemo(element)) {
- let functionName = type5.displayName || type5.type.displayName || type5.type.name || "";
- return functionName !== "" ? "Memo(" + functionName + ")" : "Memo";
- }
- }
- return "UNDEFINED";
- }, getPropKeys2 = (element) => {
- let { props } = element;
- return Object.keys(props).filter((key) => key !== "children" && props[key] !== void 0).sort();
- }, serialize3 = (element, config4, indentation, depth, refs, printer2) => ++depth > config4.maxDepth ? (0, _markup.printElementAsLeaf)(getType4(element), config4) : (0, _markup.printElement)(
- getType4(element),
- (0, _markup.printProps)(
- getPropKeys2(element),
- element.props,
- config4,
- indentation + config4.indent,
- depth,
- refs,
- printer2
- ),
- (0, _markup.printChildren)(
- getChildren2(element.props.children),
- config4,
- indentation + config4.indent,
- depth,
- refs,
- printer2
- ),
- config4,
- indentation
- );
- exports.serialize = serialize3;
- var test3 = (val) => val != null && ReactIs2.isElement(val);
- exports.test = test3;
- var plugin2 = {
- serialize: serialize3,
- test: test3
- }, _default = plugin2;
- exports.default = _default;
- }
- });
-
- // ../../node_modules/@testing-library/dom/node_modules/pretty-format/build/plugins/ReactTestComponent.js
- var require_ReactTestComponent = __commonJS({
- "../../node_modules/@testing-library/dom/node_modules/pretty-format/build/plugins/ReactTestComponent.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.test = exports.serialize = exports.default = void 0;
- var _markup = require_markup2(), global2 = (function() {
- return typeof globalThis < "u" ? globalThis : typeof global2 < "u" ? global2 : typeof self < "u" ? self : typeof window < "u" ? window : Function("return this")();
- })(), Symbol3 = global2["jest-symbol-do-not-touch"] || global2.Symbol, testSymbol2 = typeof Symbol3 == "function" && Symbol3.for ? Symbol3.for("react.test.json") : 245830487, getPropKeys2 = (object) => {
- let { props } = object;
- return props ? Object.keys(props).filter((key) => props[key] !== void 0).sort() : [];
- }, serialize3 = (object, config4, indentation, depth, refs, printer2) => ++depth > config4.maxDepth ? (0, _markup.printElementAsLeaf)(object.type, config4) : (0, _markup.printElement)(
- object.type,
- object.props ? (0, _markup.printProps)(
- getPropKeys2(object),
- object.props,
- config4,
- indentation + config4.indent,
- depth,
- refs,
- printer2
- ) : "",
- object.children ? (0, _markup.printChildren)(
- object.children,
- config4,
- indentation + config4.indent,
- depth,
- refs,
- printer2
- ) : "",
- config4,
- indentation
- );
- exports.serialize = serialize3;
- var test3 = (val) => val && val.$$typeof === testSymbol2;
- exports.test = test3;
- var plugin2 = {
- serialize: serialize3,
- test: test3
- }, _default = plugin2;
- exports.default = _default;
- }
- });
-
- // ../../node_modules/@testing-library/dom/node_modules/pretty-format/build/index.js
- var require_build = __commonJS({
- "../../node_modules/@testing-library/dom/node_modules/pretty-format/build/index.js"(exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- exports.default = exports.DEFAULT_OPTIONS = void 0;
- exports.format = format4;
- exports.plugins = void 0;
- var _ansiStyles = _interopRequireDefault(require_ansi_styles()), _collections = require_collections(), _AsymmetricMatcher = _interopRequireDefault(
- require_AsymmetricMatcher()
- ), _ConvertAnsi = _interopRequireDefault(require_ConvertAnsi()), _DOMCollection = _interopRequireDefault(require_DOMCollection()), _DOMElement = _interopRequireDefault(require_DOMElement()), _Immutable = _interopRequireDefault(require_Immutable()), _ReactElement = _interopRequireDefault(require_ReactElement()), _ReactTestComponent = _interopRequireDefault(
- require_ReactTestComponent()
- );
- function _interopRequireDefault(obj) {
- return obj && obj.__esModule ? obj : { default: obj };
- }
- var toString5 = Object.prototype.toString, toISOString2 = Date.prototype.toISOString, errorToString2 = Error.prototype.toString, regExpToString2 = RegExp.prototype.toString, getConstructorName3 = (val) => typeof val.constructor == "function" && val.constructor.name || "Object", isWindow2 = (val) => typeof window < "u" && val === window, SYMBOL_REGEXP2 = /^Symbol\((.*)\)(.*)$/, NEWLINE_REGEXP2 = /\n/gi, PrettyFormatPluginError2 = class extends Error {
- constructor(message, stack) {
- super(message), this.stack = stack, this.name = this.constructor.name;
- }
- };
- function isToStringedArrayType2(toStringed) {
- return toStringed === "[object Array]" || toStringed === "[object ArrayBuffer]" || toStringed === "[object DataView]" || toStringed === "[object Float32Array]" || toStringed === "[object Float64Array]" || toStringed === "[object Int8Array]" || toStringed === "[object Int16Array]" || toStringed === "[object Int32Array]" || toStringed === "[object Uint8Array]" || toStringed === "[object Uint8ClampedArray]" || toStringed === "[object Uint16Array]" || toStringed === "[object Uint32Array]";
- }
- function printNumber2(val) {
- return Object.is(val, -0) ? "-0" : String(val);
- }
- function printBigInt2(val) {
- return `${val}n`;
- }
- function printFunction2(val, printFunctionName) {
- return printFunctionName ? "[Function " + (val.name || "anonymous") + "]" : "[Function]";
- }
- function printSymbol2(val) {
- return String(val).replace(SYMBOL_REGEXP2, "Symbol($1)");
- }
- function printError2(val) {
- return "[" + errorToString2.call(val) + "]";
- }
- function printBasicValue2(val, printFunctionName, escapeRegex, escapeString) {
- if (val === !0 || val === !1)
- return "" + val;
- if (val === void 0)
- return "undefined";
- if (val === null)
- return "null";
- let typeOf = typeof val;
- if (typeOf === "number")
- return printNumber2(val);
- if (typeOf === "bigint")
- return printBigInt2(val);
- if (typeOf === "string")
- return escapeString ? '"' + val.replace(/"|\\/g, "\\$&") + '"' : '"' + val + '"';
- if (typeOf === "function")
- return printFunction2(val, printFunctionName);
- if (typeOf === "symbol")
- return printSymbol2(val);
- let toStringed = toString5.call(val);
- return toStringed === "[object WeakMap]" ? "WeakMap {}" : toStringed === "[object WeakSet]" ? "WeakSet {}" : toStringed === "[object Function]" || toStringed === "[object GeneratorFunction]" ? printFunction2(val, printFunctionName) : toStringed === "[object Symbol]" ? printSymbol2(val) : toStringed === "[object Date]" ? isNaN(+val) ? "Date { NaN }" : toISOString2.call(val) : toStringed === "[object Error]" ? printError2(val) : toStringed === "[object RegExp]" ? escapeRegex ? regExpToString2.call(val).replace(/[\\^$*+?.()|[\]{}]/g, "\\$&") : regExpToString2.call(val) : val instanceof Error ? printError2(val) : null;
- }
- function printComplexValue2(val, config4, indentation, depth, refs, hasCalledToJSON) {
- if (refs.indexOf(val) !== -1)
- return "[Circular]";
- refs = refs.slice(), refs.push(val);
- let hitMaxDepth = ++depth > config4.maxDepth, min2 = config4.min;
- if (config4.callToJSON && !hitMaxDepth && val.toJSON && typeof val.toJSON == "function" && !hasCalledToJSON)
- return printer2(val.toJSON(), config4, indentation, depth, refs, !0);
- let toStringed = toString5.call(val);
- return toStringed === "[object Arguments]" ? hitMaxDepth ? "[Arguments]" : (min2 ? "" : "Arguments ") + "[" + (0, _collections.printListItems)(
- val,
- config4,
- indentation,
- depth,
- refs,
- printer2
- ) + "]" : isToStringedArrayType2(toStringed) ? hitMaxDepth ? "[" + val.constructor.name + "]" : (min2 || !config4.printBasicPrototype && val.constructor.name === "Array" ? "" : val.constructor.name + " ") + "[" + (0, _collections.printListItems)(
- val,
- config4,
- indentation,
- depth,
- refs,
- printer2
- ) + "]" : toStringed === "[object Map]" ? hitMaxDepth ? "[Map]" : "Map {" + (0, _collections.printIteratorEntries)(
- val.entries(),
- config4,
- indentation,
- depth,
- refs,
- printer2,
- " => "
- ) + "}" : toStringed === "[object Set]" ? hitMaxDepth ? "[Set]" : "Set {" + (0, _collections.printIteratorValues)(
- val.values(),
- config4,
- indentation,
- depth,
- refs,
- printer2
- ) + "}" : hitMaxDepth || isWindow2(val) ? "[" + getConstructorName3(val) + "]" : (min2 || !config4.printBasicPrototype && getConstructorName3(val) === "Object" ? "" : getConstructorName3(val) + " ") + "{" + (0, _collections.printObjectProperties)(
- val,
- config4,
- indentation,
- depth,
- refs,
- printer2
- ) + "}";
- }
- function isNewPlugin2(plugin2) {
- return plugin2.serialize != null;
- }
- function printPlugin2(plugin2, val, config4, indentation, depth, refs) {
- let printed;
- try {
- printed = isNewPlugin2(plugin2) ? plugin2.serialize(val, config4, indentation, depth, refs, printer2) : plugin2.print(
- val,
- (valChild) => printer2(valChild, config4, indentation, depth, refs),
- (str2) => {
- let indentationNext = indentation + config4.indent;
- return indentationNext + str2.replace(NEWLINE_REGEXP2, `
- ` + indentationNext);
- },
- {
- edgeSpacing: config4.spacingOuter,
- min: config4.min,
- spacing: config4.spacingInner
- },
- config4.colors
- );
- } catch (error) {
- throw new PrettyFormatPluginError2(error.message, error.stack);
- }
- if (typeof printed != "string")
- throw new Error(
- `pretty-format: Plugin must return type "string" but instead returned "${typeof printed}".`
- );
- return printed;
- }
- function findPlugin2(plugins4, val) {
- for (let p3 = 0; p3 < plugins4.length; p3++)
- try {
- if (plugins4[p3].test(val))
- return plugins4[p3];
- } catch (error) {
- throw new PrettyFormatPluginError2(error.message, error.stack);
- }
- return null;
- }
- function printer2(val, config4, indentation, depth, refs, hasCalledToJSON) {
- let plugin2 = findPlugin2(config4.plugins, val);
- if (plugin2 !== null)
- return printPlugin2(plugin2, val, config4, indentation, depth, refs);
- let basicResult = printBasicValue2(
- val,
- config4.printFunctionName,
- config4.escapeRegex,
- config4.escapeString
- );
- return basicResult !== null ? basicResult : printComplexValue2(
- val,
- config4,
- indentation,
- depth,
- refs,
- hasCalledToJSON
- );
- }
- var DEFAULT_THEME2 = {
- comment: "gray",
- content: "reset",
- prop: "yellow",
- tag: "cyan",
- value: "green"
- }, DEFAULT_THEME_KEYS2 = Object.keys(DEFAULT_THEME2), DEFAULT_OPTIONS3 = {
- callToJSON: !0,
- compareKeys: void 0,
- escapeRegex: !1,
- escapeString: !0,
- highlight: !1,
- indent: 2,
- maxDepth: 1 / 0,
- min: !1,
- plugins: [],
- printBasicPrototype: !0,
- printFunctionName: !0,
- theme: DEFAULT_THEME2
- };
- exports.DEFAULT_OPTIONS = DEFAULT_OPTIONS3;
- function validateOptions3(options) {
- if (Object.keys(options).forEach((key) => {
- if (!DEFAULT_OPTIONS3.hasOwnProperty(key))
- throw new Error(`pretty-format: Unknown option "${key}".`);
- }), options.min && options.indent !== void 0 && options.indent !== 0)
- throw new Error(
- 'pretty-format: Options "min" and "indent" cannot be used together.'
- );
- if (options.theme !== void 0) {
- if (options.theme === null)
- throw new Error('pretty-format: Option "theme" must not be null.');
- if (typeof options.theme != "object")
- throw new Error(
- `pretty-format: Option "theme" must be of type "object" but instead received "${typeof options.theme}".`
- );
- }
- }
- var getColorsHighlight2 = (options) => DEFAULT_THEME_KEYS2.reduce((colors3, key) => {
- let value = options.theme && options.theme[key] !== void 0 ? options.theme[key] : DEFAULT_THEME2[key], color2 = value && _ansiStyles.default[value];
- if (color2 && typeof color2.close == "string" && typeof color2.open == "string")
- colors3[key] = color2;
- else
- throw new Error(
- `pretty-format: Option "theme" has a key "${key}" whose value "${value}" is undefined in ansi-styles.`
- );
- return colors3;
- }, /* @__PURE__ */ Object.create(null)), getColorsEmpty2 = () => DEFAULT_THEME_KEYS2.reduce((colors3, key) => (colors3[key] = {
- close: "",
- open: ""
- }, colors3), /* @__PURE__ */ Object.create(null)), getPrintFunctionName2 = (options) => options && options.printFunctionName !== void 0 ? options.printFunctionName : DEFAULT_OPTIONS3.printFunctionName, getEscapeRegex2 = (options) => options && options.escapeRegex !== void 0 ? options.escapeRegex : DEFAULT_OPTIONS3.escapeRegex, getEscapeString2 = (options) => options && options.escapeString !== void 0 ? options.escapeString : DEFAULT_OPTIONS3.escapeString, getConfig4 = (options) => {
- var _options$printBasicPr;
- return {
- callToJSON: options && options.callToJSON !== void 0 ? options.callToJSON : DEFAULT_OPTIONS3.callToJSON,
- colors: options && options.highlight ? getColorsHighlight2(options) : getColorsEmpty2(),
- compareKeys: options && typeof options.compareKeys == "function" ? options.compareKeys : DEFAULT_OPTIONS3.compareKeys,
- escapeRegex: getEscapeRegex2(options),
- escapeString: getEscapeString2(options),
- indent: options && options.min ? "" : createIndent2(
- options && options.indent !== void 0 ? options.indent : DEFAULT_OPTIONS3.indent
- ),
- maxDepth: options && options.maxDepth !== void 0 ? options.maxDepth : DEFAULT_OPTIONS3.maxDepth,
- min: options && options.min !== void 0 ? options.min : DEFAULT_OPTIONS3.min,
- plugins: options && options.plugins !== void 0 ? options.plugins : DEFAULT_OPTIONS3.plugins,
- printBasicPrototype: (_options$printBasicPr = options?.printBasicPrototype) !== null && _options$printBasicPr !== void 0 ? _options$printBasicPr : !0,
- printFunctionName: getPrintFunctionName2(options),
- spacingInner: options && options.min ? " " : `
- `,
- spacingOuter: options && options.min ? "" : `
- `
- };
- };
- function createIndent2(indent2) {
- return new Array(indent2 + 1).join(" ");
- }
- function format4(val, options) {
- if (options && (validateOptions3(options), options.plugins)) {
- let plugin2 = findPlugin2(options.plugins, val);
- if (plugin2 !== null)
- return printPlugin2(plugin2, val, getConfig4(options), "", 0, []);
- }
- let basicResult = printBasicValue2(
- val,
- getPrintFunctionName2(options),
- getEscapeRegex2(options),
- getEscapeString2(options)
- );
- return basicResult !== null ? basicResult : printComplexValue2(val, getConfig4(options), "", 0, []);
- }
- var plugins3 = {
- AsymmetricMatcher: _AsymmetricMatcher.default,
- ConvertAnsi: _ConvertAnsi.default,
- DOMCollection: _DOMCollection.default,
- DOMElement: _DOMElement.default,
- Immutable: _Immutable.default,
- ReactElement: _ReactElement.default,
- ReactTestComponent: _ReactTestComponent.default
- };
- exports.plugins = plugins3;
- var _default = format4;
- exports.default = _default;
- }
- });
-
- // ../../node_modules/lz-string/libs/lz-string.js
- var require_lz_string = __commonJS({
- "../../node_modules/lz-string/libs/lz-string.js"(exports, module2) {
- var LZString = (function() {
- var f4 = String.fromCharCode, keyStrBase64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", keyStrUriSafe = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$", baseReverseDic = {};
- function getBaseValue(alphabet, character2) {
- if (!baseReverseDic[alphabet]) {
- baseReverseDic[alphabet] = {};
- for (var i = 0; i < alphabet.length; i++)
- baseReverseDic[alphabet][alphabet.charAt(i)] = i;
- }
- return baseReverseDic[alphabet][character2];
- }
- var LZString2 = {
- compressToBase64: function(input2) {
- if (input2 == null) return "";
- var res = LZString2._compress(input2, 6, function(a3) {
- return keyStrBase64.charAt(a3);
- });
- switch (res.length % 4) {
- // To produce valid Base64
- default:
- // When could this happen ?
- case 0:
- return res;
- case 1:
- return res + "===";
- case 2:
- return res + "==";
- case 3:
- return res + "=";
- }
- },
- decompressFromBase64: function(input2) {
- return input2 == null ? "" : input2 == "" ? null : LZString2._decompress(input2.length, 32, function(index4) {
- return getBaseValue(keyStrBase64, input2.charAt(index4));
- });
- },
- compressToUTF16: function(input2) {
- return input2 == null ? "" : LZString2._compress(input2, 15, function(a3) {
- return f4(a3 + 32);
- }) + " ";
- },
- decompressFromUTF16: function(compressed) {
- return compressed == null ? "" : compressed == "" ? null : LZString2._decompress(compressed.length, 16384, function(index4) {
- return compressed.charCodeAt(index4) - 32;
- });
- },
- //compress into uint8array (UCS-2 big endian format)
- compressToUint8Array: function(uncompressed) {
- for (var compressed = LZString2.compress(uncompressed), buf = new Uint8Array(compressed.length * 2), i = 0, TotalLen = compressed.length; i < TotalLen; i++) {
- var current_value = compressed.charCodeAt(i);
- buf[i * 2] = current_value >>> 8, buf[i * 2 + 1] = current_value % 256;
- }
- return buf;
- },
- //decompress from uint8array (UCS-2 big endian format)
- decompressFromUint8Array: function(compressed) {
- if (compressed == null)
- return LZString2.decompress(compressed);
- for (var buf = new Array(compressed.length / 2), i = 0, TotalLen = buf.length; i < TotalLen; i++)
- buf[i] = compressed[i * 2] * 256 + compressed[i * 2 + 1];
- var result = [];
- return buf.forEach(function(c) {
- result.push(f4(c));
- }), LZString2.decompress(result.join(""));
- },
- //compress into a string that is already URI encoded
- compressToEncodedURIComponent: function(input2) {
- return input2 == null ? "" : LZString2._compress(input2, 6, function(a3) {
- return keyStrUriSafe.charAt(a3);
- });
- },
- //decompress from an output of compressToEncodedURIComponent
- decompressFromEncodedURIComponent: function(input2) {
- return input2 == null ? "" : input2 == "" ? null : (input2 = input2.replace(/ /g, "+"), LZString2._decompress(input2.length, 32, function(index4) {
- return getBaseValue(keyStrUriSafe, input2.charAt(index4));
- }));
- },
- compress: function(uncompressed) {
- return LZString2._compress(uncompressed, 16, function(a3) {
- return f4(a3);
- });
- },
- _compress: function(uncompressed, bitsPerChar, getCharFromInt) {
- if (uncompressed == null) return "";
- var i, value, context_dictionary = {}, context_dictionaryToCreate = {}, context_c = "", context_wc = "", context_w = "", context_enlargeIn = 2, context_dictSize = 3, context_numBits = 2, context_data = [], context_data_val = 0, context_data_position = 0, ii;
- for (ii = 0; ii < uncompressed.length; ii += 1)
- if (context_c = uncompressed.charAt(ii), Object.prototype.hasOwnProperty.call(context_dictionary, context_c) || (context_dictionary[context_c] = context_dictSize++, context_dictionaryToCreate[context_c] = !0), context_wc = context_w + context_c, Object.prototype.hasOwnProperty.call(context_dictionary, context_wc))
- context_w = context_wc;
- else {
- if (Object.prototype.hasOwnProperty.call(context_dictionaryToCreate, context_w)) {
- if (context_w.charCodeAt(0) < 256) {
- for (i = 0; i < context_numBits; i++)
- context_data_val = context_data_val << 1, context_data_position == bitsPerChar - 1 ? (context_data_position = 0, context_data.push(getCharFromInt(context_data_val)), context_data_val = 0) : context_data_position++;
- for (value = context_w.charCodeAt(0), i = 0; i < 8; i++)
- context_data_val = context_data_val << 1 | value & 1, context_data_position == bitsPerChar - 1 ? (context_data_position = 0, context_data.push(getCharFromInt(context_data_val)), context_data_val = 0) : context_data_position++, value = value >> 1;
- } else {
- for (value = 1, i = 0; i < context_numBits; i++)
- context_data_val = context_data_val << 1 | value, context_data_position == bitsPerChar - 1 ? (context_data_position = 0, context_data.push(getCharFromInt(context_data_val)), context_data_val = 0) : context_data_position++, value = 0;
- for (value = context_w.charCodeAt(0), i = 0; i < 16; i++)
- context_data_val = context_data_val << 1 | value & 1, context_data_position == bitsPerChar - 1 ? (context_data_position = 0, context_data.push(getCharFromInt(context_data_val)), context_data_val = 0) : context_data_position++, value = value >> 1;
- }
- context_enlargeIn--, context_enlargeIn == 0 && (context_enlargeIn = Math.pow(2, context_numBits), context_numBits++), delete context_dictionaryToCreate[context_w];
- } else
- for (value = context_dictionary[context_w], i = 0; i < context_numBits; i++)
- context_data_val = context_data_val << 1 | value & 1, context_data_position == bitsPerChar - 1 ? (context_data_position = 0, context_data.push(getCharFromInt(context_data_val)), context_data_val = 0) : context_data_position++, value = value >> 1;
- context_enlargeIn--, context_enlargeIn == 0 && (context_enlargeIn = Math.pow(2, context_numBits), context_numBits++), context_dictionary[context_wc] = context_dictSize++, context_w = String(context_c);
- }
- if (context_w !== "") {
- if (Object.prototype.hasOwnProperty.call(context_dictionaryToCreate, context_w)) {
- if (context_w.charCodeAt(0) < 256) {
- for (i = 0; i < context_numBits; i++)
- context_data_val = context_data_val << 1, context_data_position == bitsPerChar - 1 ? (context_data_position = 0, context_data.push(getCharFromInt(context_data_val)), context_data_val = 0) : context_data_position++;
- for (value = context_w.charCodeAt(0), i = 0; i < 8; i++)
- context_data_val = context_data_val << 1 | value & 1, context_data_position == bitsPerChar - 1 ? (context_data_position = 0, context_data.push(getCharFromInt(context_data_val)), context_data_val = 0) : context_data_position++, value = value >> 1;
- } else {
- for (value = 1, i = 0; i < context_numBits; i++)
- context_data_val = context_data_val << 1 | value, context_data_position == bitsPerChar - 1 ? (context_data_position = 0, context_data.push(getCharFromInt(context_data_val)), context_data_val = 0) : context_data_position++, value = 0;
- for (value = context_w.charCodeAt(0), i = 0; i < 16; i++)
- context_data_val = context_data_val << 1 | value & 1, context_data_position == bitsPerChar - 1 ? (context_data_position = 0, context_data.push(getCharFromInt(context_data_val)), context_data_val = 0) : context_data_position++, value = value >> 1;
- }
- context_enlargeIn--, context_enlargeIn == 0 && (context_enlargeIn = Math.pow(2, context_numBits), context_numBits++), delete context_dictionaryToCreate[context_w];
- } else
- for (value = context_dictionary[context_w], i = 0; i < context_numBits; i++)
- context_data_val = context_data_val << 1 | value & 1, context_data_position == bitsPerChar - 1 ? (context_data_position = 0, context_data.push(getCharFromInt(context_data_val)), context_data_val = 0) : context_data_position++, value = value >> 1;
- context_enlargeIn--, context_enlargeIn == 0 && (context_enlargeIn = Math.pow(2, context_numBits), context_numBits++);
- }
- for (value = 2, i = 0; i < context_numBits; i++)
- context_data_val = context_data_val << 1 | value & 1, context_data_position == bitsPerChar - 1 ? (context_data_position = 0, context_data.push(getCharFromInt(context_data_val)), context_data_val = 0) : context_data_position++, value = value >> 1;
- for (; ; )
- if (context_data_val = context_data_val << 1, context_data_position == bitsPerChar - 1) {
- context_data.push(getCharFromInt(context_data_val));
- break;
- } else context_data_position++;
- return context_data.join("");
- },
- decompress: function(compressed) {
- return compressed == null ? "" : compressed == "" ? null : LZString2._decompress(compressed.length, 32768, function(index4) {
- return compressed.charCodeAt(index4);
- });
- },
- _decompress: function(length2, resetValue, getNextValue) {
- var dictionary = [], next2, enlargeIn = 4, dictSize = 4, numBits = 3, entry = "", result = [], i, w, bits, resb, maxpower, power, c, data = { val: getNextValue(0), position: resetValue, index: 1 };
- for (i = 0; i < 3; i += 1)
- dictionary[i] = i;
- for (bits = 0, maxpower = Math.pow(2, 2), power = 1; power != maxpower; )
- resb = data.val & data.position, data.position >>= 1, data.position == 0 && (data.position = resetValue, data.val = getNextValue(data.index++)), bits |= (resb > 0 ? 1 : 0) * power, power <<= 1;
- switch (next2 = bits) {
- case 0:
- for (bits = 0, maxpower = Math.pow(2, 8), power = 1; power != maxpower; )
- resb = data.val & data.position, data.position >>= 1, data.position == 0 && (data.position = resetValue, data.val = getNextValue(data.index++)), bits |= (resb > 0 ? 1 : 0) * power, power <<= 1;
- c = f4(bits);
- break;
- case 1:
- for (bits = 0, maxpower = Math.pow(2, 16), power = 1; power != maxpower; )
- resb = data.val & data.position, data.position >>= 1, data.position == 0 && (data.position = resetValue, data.val = getNextValue(data.index++)), bits |= (resb > 0 ? 1 : 0) * power, power <<= 1;
- c = f4(bits);
- break;
- case 2:
- return "";
- }
- for (dictionary[3] = c, w = c, result.push(c); ; ) {
- if (data.index > length2)
- return "";
- for (bits = 0, maxpower = Math.pow(2, numBits), power = 1; power != maxpower; )
- resb = data.val & data.position, data.position >>= 1, data.position == 0 && (data.position = resetValue, data.val = getNextValue(data.index++)), bits |= (resb > 0 ? 1 : 0) * power, power <<= 1;
- switch (c = bits) {
- case 0:
- for (bits = 0, maxpower = Math.pow(2, 8), power = 1; power != maxpower; )
- resb = data.val & data.position, data.position >>= 1, data.position == 0 && (data.position = resetValue, data.val = getNextValue(data.index++)), bits |= (resb > 0 ? 1 : 0) * power, power <<= 1;
- dictionary[dictSize++] = f4(bits), c = dictSize - 1, enlargeIn--;
- break;
- case 1:
- for (bits = 0, maxpower = Math.pow(2, 16), power = 1; power != maxpower; )
- resb = data.val & data.position, data.position >>= 1, data.position == 0 && (data.position = resetValue, data.val = getNextValue(data.index++)), bits |= (resb > 0 ? 1 : 0) * power, power <<= 1;
- dictionary[dictSize++] = f4(bits), c = dictSize - 1, enlargeIn--;
- break;
- case 2:
- return result.join("");
- }
- if (enlargeIn == 0 && (enlargeIn = Math.pow(2, numBits), numBits++), dictionary[c])
- entry = dictionary[c];
- else if (c === dictSize)
- entry = w + w.charAt(0);
- else
- return null;
- result.push(entry), dictionary[dictSize++] = w + entry.charAt(0), enlargeIn--, w = entry, enlargeIn == 0 && (enlargeIn = Math.pow(2, numBits), numBits++);
- }
- }
- };
- return LZString2;
- })();
- typeof define == "function" && define.amd ? define(function() {
- return LZString;
- }) : typeof module2 < "u" && module2 != null ? module2.exports = LZString : typeof angular < "u" && angular != null && angular.module("LZString", []).factory("LZString", function() {
- return LZString;
- });
- }
- });
-
- // ../../node_modules/toggle-selection/index.js
- var require_toggle_selection = __commonJS({
- "../../node_modules/toggle-selection/index.js"(exports, module2) {
- module2.exports = function() {
- var selection = document.getSelection();
- if (!selection.rangeCount)
- return function() {
- };
- for (var active = document.activeElement, ranges = [], i = 0; i < selection.rangeCount; i++)
- ranges.push(selection.getRangeAt(i));
- switch (active.tagName.toUpperCase()) {
- // .toUpperCase handles XHTML
- case "INPUT":
- case "TEXTAREA":
- active.blur();
- break;
- default:
- active = null;
- break;
- }
- return selection.removeAllRanges(), function() {
- selection.type === "Caret" && selection.removeAllRanges(), selection.rangeCount || ranges.forEach(function(range) {
- selection.addRange(range);
- }), active && active.focus();
- };
- };
- }
- });
-
- // ../../node_modules/copy-to-clipboard/index.js
- var require_copy_to_clipboard = __commonJS({
- "../../node_modules/copy-to-clipboard/index.js"(exports, module2) {
- "use strict";
- var deselectCurrent = require_toggle_selection(), clipboardToIE11Formatting = {
- "text/plain": "Text",
- "text/html": "Url",
- default: "Text"
- }, defaultMessage = "Copy to clipboard: #{key}, Enter";
- function format4(message) {
- var copyKey = (/mac os x/i.test(navigator.userAgent) ? "\u2318" : "Ctrl") + "+C";
- return message.replace(/#{\s*key\s*}/g, copyKey);
- }
- function copy5(text, options) {
- var debug2, message, reselectPrevious, range, selection, mark, success = !1;
- options || (options = {}), debug2 = options.debug || !1;
- try {
- reselectPrevious = deselectCurrent(), range = document.createRange(), selection = document.getSelection(), mark = document.createElement("span"), mark.textContent = text, mark.ariaHidden = "true", mark.style.all = "unset", mark.style.position = "fixed", mark.style.top = 0, mark.style.clip = "rect(0, 0, 0, 0)", mark.style.whiteSpace = "pre", mark.style.webkitUserSelect = "text", mark.style.MozUserSelect = "text", mark.style.msUserSelect = "text", mark.style.userSelect = "text", mark.addEventListener("copy", function(e) {
- if (e.stopPropagation(), options.format)
- if (e.preventDefault(), typeof e.clipboardData > "u") {
- debug2 && console.warn("unable to use e.clipboardData"), debug2 && console.warn("trying IE specific stuff"), window.clipboardData.clearData();
- var format5 = clipboardToIE11Formatting[options.format] || clipboardToIE11Formatting.default;
- window.clipboardData.setData(format5, text);
- } else
- e.clipboardData.clearData(), e.clipboardData.setData(options.format, text);
- options.onCopy && (e.preventDefault(), options.onCopy(e.clipboardData));
- }), document.body.appendChild(mark), range.selectNodeContents(mark), selection.addRange(range);
- var successful = document.execCommand("copy");
- if (!successful)
- throw new Error("copy command was unsuccessful");
- success = !0;
- } catch (err) {
- debug2 && console.error("unable to copy using execCommand: ", err), debug2 && console.warn("trying IE specific stuff");
- try {
- window.clipboardData.setData(options.format || "text", text), options.onCopy && options.onCopy(window.clipboardData), success = !0;
- } catch (err2) {
- debug2 && console.error("unable to copy using clipboardData: ", err2), debug2 && console.error("falling back to prompt"), message = format4("message" in options ? options.message : defaultMessage), window.prompt(message, text);
- }
- } finally {
- selection && (typeof selection.removeRange == "function" ? selection.removeRange(range) : selection.removeAllRanges()), mark && document.body.removeChild(mark), reselectPrevious();
- }
- return success;
- }
- module2.exports = copy5;
- }
- });
-
- // ../../node_modules/semver/internal/constants.js
- var require_constants = __commonJS({
- "../../node_modules/semver/internal/constants.js"(exports, module2) {
- "use strict";
- var SEMVER_SPEC_VERSION = "2.0.0", MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */
- 9007199254740991, MAX_SAFE_COMPONENT_LENGTH = 16, MAX_SAFE_BUILD_LENGTH = 250, RELEASE_TYPES = [
- "major",
- "premajor",
- "minor",
- "preminor",
- "patch",
- "prepatch",
- "prerelease"
- ];
- module2.exports = {
- MAX_LENGTH: 256,
- MAX_SAFE_COMPONENT_LENGTH,
- MAX_SAFE_BUILD_LENGTH,
- MAX_SAFE_INTEGER,
- RELEASE_TYPES,
- SEMVER_SPEC_VERSION,
- FLAG_INCLUDE_PRERELEASE: 1,
- FLAG_LOOSE: 2
- };
- }
- });
-
- // ../../node_modules/semver/internal/debug.js
- var require_debug = __commonJS({
- "../../node_modules/semver/internal/debug.js"(exports, module2) {
- "use strict";
- var debug2 = typeof process == "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => {
- };
- module2.exports = debug2;
- }
- });
-
- // ../../node_modules/semver/internal/re.js
- var require_re = __commonJS({
- "../../node_modules/semver/internal/re.js"(exports, module2) {
- "use strict";
- var {
- MAX_SAFE_COMPONENT_LENGTH,
- MAX_SAFE_BUILD_LENGTH,
- MAX_LENGTH
- } = require_constants(), debug2 = require_debug();
- exports = module2.exports = {};
- var re = exports.re = [], safeRe = exports.safeRe = [], src = exports.src = [], safeSrc = exports.safeSrc = [], t = exports.t = {}, R = 0, LETTERDASHNUMBER = "[a-zA-Z0-9-]", safeRegexReplacements = [
- ["\\s", 1],
- ["\\d", MAX_LENGTH],
- [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH]
- ], makeSafeRegex = (value) => {
- for (let [token2, max2] of safeRegexReplacements)
- value = value.split(`${token2}*`).join(`${token2}{0,${max2}}`).split(`${token2}+`).join(`${token2}{1,${max2}}`);
- return value;
- }, createToken = (name, value, isGlobal) => {
- let safe2 = makeSafeRegex(value), index4 = R++;
- debug2(name, index4, value), t[name] = index4, src[index4] = value, safeSrc[index4] = safe2, re[index4] = new RegExp(value, isGlobal ? "g" : void 0), safeRe[index4] = new RegExp(safe2, isGlobal ? "g" : void 0);
- };
- createToken("NUMERICIDENTIFIER", "0|[1-9]\\d*");
- createToken("NUMERICIDENTIFIERLOOSE", "\\d+");
- createToken("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`);
- createToken("MAINVERSION", `(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})`);
- createToken("MAINVERSIONLOOSE", `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})`);
- createToken("PRERELEASEIDENTIFIER", `(?:${src[t.NONNUMERICIDENTIFIER]}|${src[t.NUMERICIDENTIFIER]})`);
- createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t.NONNUMERICIDENTIFIER]}|${src[t.NUMERICIDENTIFIERLOOSE]})`);
- createToken("PRERELEASE", `(?:-(${src[t.PRERELEASEIDENTIFIER]}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`);
- createToken("PRERELEASELOOSE", `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`);
- createToken("BUILDIDENTIFIER", `${LETTERDASHNUMBER}+`);
- createToken("BUILD", `(?:\\+(${src[t.BUILDIDENTIFIER]}(?:\\.${src[t.BUILDIDENTIFIER]})*))`);
- createToken("FULLPLAIN", `v?${src[t.MAINVERSION]}${src[t.PRERELEASE]}?${src[t.BUILD]}?`);
- createToken("FULL", `^${src[t.FULLPLAIN]}$`);
- createToken("LOOSEPLAIN", `[v=\\s]*${src[t.MAINVERSIONLOOSE]}${src[t.PRERELEASELOOSE]}?${src[t.BUILD]}?`);
- createToken("LOOSE", `^${src[t.LOOSEPLAIN]}$`);
- createToken("GTLT", "((?:<|>)?=?)");
- createToken("XRANGEIDENTIFIERLOOSE", `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);
- createToken("XRANGEIDENTIFIER", `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`);
- createToken("XRANGEPLAIN", `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:${src[t.PRERELEASE]})?${src[t.BUILD]}?)?)?`);
- createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:${src[t.PRERELEASELOOSE]})?${src[t.BUILD]}?)?)?`);
- createToken("XRANGE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`);
- createToken("XRANGELOOSE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`);
- createToken("COERCEPLAIN", `(^|[^\\d])(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}})(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`);
- createToken("COERCE", `${src[t.COERCEPLAIN]}(?:$|[^\\d])`);
- createToken("COERCEFULL", src[t.COERCEPLAIN] + `(?:${src[t.PRERELEASE]})?(?:${src[t.BUILD]})?(?:$|[^\\d])`);
- createToken("COERCERTL", src[t.COERCE], !0);
- createToken("COERCERTLFULL", src[t.COERCEFULL], !0);
- createToken("LONETILDE", "(?:~>?)");
- createToken("TILDETRIM", `(\\s*)${src[t.LONETILDE]}\\s+`, !0);
- exports.tildeTrimReplace = "$1~";
- createToken("TILDE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`);
- createToken("TILDELOOSE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`);
- createToken("LONECARET", "(?:\\^)");
- createToken("CARETTRIM", `(\\s*)${src[t.LONECARET]}\\s+`, !0);
- exports.caretTrimReplace = "$1^";
- createToken("CARET", `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`);
- createToken("CARETLOOSE", `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`);
- createToken("COMPARATORLOOSE", `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`);
- createToken("COMPARATOR", `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`);
- createToken("COMPARATORTRIM", `(\\s*)${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, !0);
- exports.comparatorTrimReplace = "$1$2$3";
- createToken("HYPHENRANGE", `^\\s*(${src[t.XRANGEPLAIN]})\\s+-\\s+(${src[t.XRANGEPLAIN]})\\s*$`);
- createToken("HYPHENRANGELOOSE", `^\\s*(${src[t.XRANGEPLAINLOOSE]})\\s+-\\s+(${src[t.XRANGEPLAINLOOSE]})\\s*$`);
- createToken("STAR", "(<|>)?=?\\s*\\*");
- createToken("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$");
- createToken("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
- }
- });
-
- // ../../node_modules/semver/internal/parse-options.js
- var require_parse_options = __commonJS({
- "../../node_modules/semver/internal/parse-options.js"(exports, module2) {
- "use strict";
- var looseOption = Object.freeze({ loose: !0 }), emptyOpts = Object.freeze({}), parseOptions = (options) => options ? typeof options != "object" ? looseOption : options : emptyOpts;
- module2.exports = parseOptions;
- }
- });
-
- // ../../node_modules/semver/internal/identifiers.js
- var require_identifiers = __commonJS({
- "../../node_modules/semver/internal/identifiers.js"(exports, module2) {
- "use strict";
- var numeric = /^[0-9]+$/, compareIdentifiers = (a3, b) => {
- if (typeof a3 == "number" && typeof b == "number")
- return a3 === b ? 0 : a3 < b ? -1 : 1;
- let anum = numeric.test(a3), bnum = numeric.test(b);
- return anum && bnum && (a3 = +a3, b = +b), a3 === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a3 < b ? -1 : 1;
- }, rcompareIdentifiers = (a3, b) => compareIdentifiers(b, a3);
- module2.exports = {
- compareIdentifiers,
- rcompareIdentifiers
- };
- }
- });
-
- // ../../node_modules/semver/classes/semver.js
- var require_semver = __commonJS({
- "../../node_modules/semver/classes/semver.js"(exports, module2) {
- "use strict";
- var debug2 = require_debug(), { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants(), { safeRe: re, t } = require_re(), parseOptions = require_parse_options(), { compareIdentifiers } = require_identifiers(), SemVer = class _SemVer {
- constructor(version2, options) {
- if (options = parseOptions(options), version2 instanceof _SemVer) {
- if (version2.loose === !!options.loose && version2.includePrerelease === !!options.includePrerelease)
- return version2;
- version2 = version2.version;
- } else if (typeof version2 != "string")
- throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version2}".`);
- if (version2.length > MAX_LENGTH)
- throw new TypeError(
- `version is longer than ${MAX_LENGTH} characters`
- );
- debug2("SemVer", version2, options), this.options = options, this.loose = !!options.loose, this.includePrerelease = !!options.includePrerelease;
- let m3 = version2.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]);
- if (!m3)
- throw new TypeError(`Invalid Version: ${version2}`);
- if (this.raw = version2, this.major = +m3[1], this.minor = +m3[2], this.patch = +m3[3], this.major > MAX_SAFE_INTEGER || this.major < 0)
- throw new TypeError("Invalid major version");
- if (this.minor > MAX_SAFE_INTEGER || this.minor < 0)
- throw new TypeError("Invalid minor version");
- if (this.patch > MAX_SAFE_INTEGER || this.patch < 0)
- throw new TypeError("Invalid patch version");
- m3[4] ? this.prerelease = m3[4].split(".").map((id) => {
- if (/^[0-9]+$/.test(id)) {
- let num = +id;
- if (num >= 0 && num < MAX_SAFE_INTEGER)
- return num;
- }
- return id;
- }) : this.prerelease = [], this.build = m3[5] ? m3[5].split(".") : [], this.format();
- }
- format() {
- return this.version = `${this.major}.${this.minor}.${this.patch}`, this.prerelease.length && (this.version += `-${this.prerelease.join(".")}`), this.version;
- }
- toString() {
- return this.version;
- }
- compare(other) {
- if (debug2("SemVer.compare", this.version, this.options, other), !(other instanceof _SemVer)) {
- if (typeof other == "string" && other === this.version)
- return 0;
- other = new _SemVer(other, this.options);
- }
- return other.version === this.version ? 0 : this.compareMain(other) || this.comparePre(other);
- }
- compareMain(other) {
- return other instanceof _SemVer || (other = new _SemVer(other, this.options)), this.major < other.major ? -1 : this.major > other.major ? 1 : this.minor < other.minor ? -1 : this.minor > other.minor ? 1 : this.patch < other.patch ? -1 : this.patch > other.patch ? 1 : 0;
- }
- comparePre(other) {
- if (other instanceof _SemVer || (other = new _SemVer(other, this.options)), this.prerelease.length && !other.prerelease.length)
- return -1;
- if (!this.prerelease.length && other.prerelease.length)
- return 1;
- if (!this.prerelease.length && !other.prerelease.length)
- return 0;
- let i = 0;
- do {
- let a3 = this.prerelease[i], b = other.prerelease[i];
- if (debug2("prerelease compare", i, a3, b), a3 === void 0 && b === void 0)
- return 0;
- if (b === void 0)
- return 1;
- if (a3 === void 0)
- return -1;
- if (a3 === b)
- continue;
- return compareIdentifiers(a3, b);
- } while (++i);
- }
- compareBuild(other) {
- other instanceof _SemVer || (other = new _SemVer(other, this.options));
- let i = 0;
- do {
- let a3 = this.build[i], b = other.build[i];
- if (debug2("build compare", i, a3, b), a3 === void 0 && b === void 0)
- return 0;
- if (b === void 0)
- return 1;
- if (a3 === void 0)
- return -1;
- if (a3 === b)
- continue;
- return compareIdentifiers(a3, b);
- } while (++i);
- }
- // preminor will bump the version up to the next minor release, and immediately
- // down to pre-release. premajor and prepatch work the same way.
- inc(release, identifier2, identifierBase) {
- if (release.startsWith("pre")) {
- if (!identifier2 && identifierBase === !1)
- throw new Error("invalid increment argument: identifier is empty");
- if (identifier2) {
- let match3 = `-${identifier2}`.match(this.options.loose ? re[t.PRERELEASELOOSE] : re[t.PRERELEASE]);
- if (!match3 || match3[1] !== identifier2)
- throw new Error(`invalid identifier: ${identifier2}`);
- }
- }
- switch (release) {
- case "premajor":
- this.prerelease.length = 0, this.patch = 0, this.minor = 0, this.major++, this.inc("pre", identifier2, identifierBase);
- break;
- case "preminor":
- this.prerelease.length = 0, this.patch = 0, this.minor++, this.inc("pre", identifier2, identifierBase);
- break;
- case "prepatch":
- this.prerelease.length = 0, this.inc("patch", identifier2, identifierBase), this.inc("pre", identifier2, identifierBase);
- break;
- // If the input is a non-prerelease version, this acts the same as
- // prepatch.
- case "prerelease":
- this.prerelease.length === 0 && this.inc("patch", identifier2, identifierBase), this.inc("pre", identifier2, identifierBase);
- break;
- case "release":
- if (this.prerelease.length === 0)
- throw new Error(`version ${this.raw} is not a prerelease`);
- this.prerelease.length = 0;
- break;
- case "major":
- (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) && this.major++, this.minor = 0, this.patch = 0, this.prerelease = [];
- break;
- case "minor":
- (this.patch !== 0 || this.prerelease.length === 0) && this.minor++, this.patch = 0, this.prerelease = [];
- break;
- case "patch":
- this.prerelease.length === 0 && this.patch++, this.prerelease = [];
- break;
- // This probably shouldn't be used publicly.
- // 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction.
- case "pre": {
- let base = Number(identifierBase) ? 1 : 0;
- if (this.prerelease.length === 0)
- this.prerelease = [base];
- else {
- let i = this.prerelease.length;
- for (; --i >= 0; )
- typeof this.prerelease[i] == "number" && (this.prerelease[i]++, i = -2);
- if (i === -1) {
- if (identifier2 === this.prerelease.join(".") && identifierBase === !1)
- throw new Error("invalid increment argument: identifier already exists");
- this.prerelease.push(base);
- }
- }
- if (identifier2) {
- let prerelease = [identifier2, base];
- identifierBase === !1 && (prerelease = [identifier2]), compareIdentifiers(this.prerelease[0], identifier2) === 0 ? isNaN(this.prerelease[1]) && (this.prerelease = prerelease) : this.prerelease = prerelease;
- }
- break;
- }
- default:
- throw new Error(`invalid increment argument: ${release}`);
- }
- return this.raw = this.format(), this.build.length && (this.raw += `+${this.build.join(".")}`), this;
- }
- };
- module2.exports = SemVer;
- }
- });
-
- // ../../node_modules/semver/functions/parse.js
- var require_parse2 = __commonJS({
- "../../node_modules/semver/functions/parse.js"(exports, module2) {
- "use strict";
- var SemVer = require_semver(), parse9 = (version2, options, throwErrors = !1) => {
- if (version2 instanceof SemVer)
- return version2;
- try {
- return new SemVer(version2, options);
- } catch (er) {
- if (!throwErrors)
- return null;
- throw er;
- }
- };
- module2.exports = parse9;
- }
- });
-
- // ../../node_modules/semver/functions/valid.js
- var require_valid = __commonJS({
- "../../node_modules/semver/functions/valid.js"(exports, module2) {
- "use strict";
- var parse9 = require_parse2(), valid = (version2, options) => {
- let v = parse9(version2, options);
- return v ? v.version : null;
- };
- module2.exports = valid;
- }
- });
-
- // ../../node_modules/semver/functions/clean.js
- var require_clean = __commonJS({
- "../../node_modules/semver/functions/clean.js"(exports, module2) {
- "use strict";
- var parse9 = require_parse2(), clean = (version2, options) => {
- let s3 = parse9(version2.trim().replace(/^[=v]+/, ""), options);
- return s3 ? s3.version : null;
- };
- module2.exports = clean;
- }
- });
-
- // ../../node_modules/semver/functions/inc.js
- var require_inc = __commonJS({
- "../../node_modules/semver/functions/inc.js"(exports, module2) {
- "use strict";
- var SemVer = require_semver(), inc = (version2, release, options, identifier2, identifierBase) => {
- typeof options == "string" && (identifierBase = identifier2, identifier2 = options, options = void 0);
- try {
- return new SemVer(
- version2 instanceof SemVer ? version2.version : version2,
- options
- ).inc(release, identifier2, identifierBase).version;
- } catch {
- return null;
- }
- };
- module2.exports = inc;
- }
- });
-
- // ../../node_modules/semver/functions/diff.js
- var require_diff = __commonJS({
- "../../node_modules/semver/functions/diff.js"(exports, module2) {
- "use strict";
- var parse9 = require_parse2(), diff2 = (version1, version2) => {
- let v1 = parse9(version1, null, !0), v2 = parse9(version2, null, !0), comparison = v1.compare(v2);
- if (comparison === 0)
- return null;
- let v1Higher = comparison > 0, highVersion = v1Higher ? v1 : v2, lowVersion = v1Higher ? v2 : v1, highHasPre = !!highVersion.prerelease.length;
- if (!!lowVersion.prerelease.length && !highHasPre) {
- if (!lowVersion.patch && !lowVersion.minor)
- return "major";
- if (lowVersion.compareMain(highVersion) === 0)
- return lowVersion.minor && !lowVersion.patch ? "minor" : "patch";
- }
- let prefix4 = highHasPre ? "pre" : "";
- return v1.major !== v2.major ? prefix4 + "major" : v1.minor !== v2.minor ? prefix4 + "minor" : v1.patch !== v2.patch ? prefix4 + "patch" : "prerelease";
- };
- module2.exports = diff2;
- }
- });
-
- // ../../node_modules/semver/functions/major.js
- var require_major = __commonJS({
- "../../node_modules/semver/functions/major.js"(exports, module2) {
- "use strict";
- var SemVer = require_semver(), major = (a3, loose) => new SemVer(a3, loose).major;
- module2.exports = major;
- }
- });
-
- // ../../node_modules/semver/functions/minor.js
- var require_minor = __commonJS({
- "../../node_modules/semver/functions/minor.js"(exports, module2) {
- "use strict";
- var SemVer = require_semver(), minor = (a3, loose) => new SemVer(a3, loose).minor;
- module2.exports = minor;
- }
- });
-
- // ../../node_modules/semver/functions/patch.js
- var require_patch = __commonJS({
- "../../node_modules/semver/functions/patch.js"(exports, module2) {
- "use strict";
- var SemVer = require_semver(), patch = (a3, loose) => new SemVer(a3, loose).patch;
- module2.exports = patch;
- }
- });
-
- // ../../node_modules/semver/functions/prerelease.js
- var require_prerelease = __commonJS({
- "../../node_modules/semver/functions/prerelease.js"(exports, module2) {
- "use strict";
- var parse9 = require_parse2(), prerelease = (version2, options) => {
- let parsed = parse9(version2, options);
- return parsed && parsed.prerelease.length ? parsed.prerelease : null;
- };
- module2.exports = prerelease;
- }
- });
-
- // ../../node_modules/semver/functions/compare.js
- var require_compare = __commonJS({
- "../../node_modules/semver/functions/compare.js"(exports, module2) {
- "use strict";
- var SemVer = require_semver(), compare = (a3, b, loose) => new SemVer(a3, loose).compare(new SemVer(b, loose));
- module2.exports = compare;
- }
- });
-
- // ../../node_modules/semver/functions/rcompare.js
- var require_rcompare = __commonJS({
- "../../node_modules/semver/functions/rcompare.js"(exports, module2) {
- "use strict";
- var compare = require_compare(), rcompare = (a3, b, loose) => compare(b, a3, loose);
- module2.exports = rcompare;
- }
- });
-
- // ../../node_modules/semver/functions/compare-loose.js
- var require_compare_loose = __commonJS({
- "../../node_modules/semver/functions/compare-loose.js"(exports, module2) {
- "use strict";
- var compare = require_compare(), compareLoose = (a3, b) => compare(a3, b, !0);
- module2.exports = compareLoose;
- }
- });
-
- // ../../node_modules/semver/functions/compare-build.js
- var require_compare_build = __commonJS({
- "../../node_modules/semver/functions/compare-build.js"(exports, module2) {
- "use strict";
- var SemVer = require_semver(), compareBuild = (a3, b, loose) => {
- let versionA = new SemVer(a3, loose), versionB = new SemVer(b, loose);
- return versionA.compare(versionB) || versionA.compareBuild(versionB);
- };
- module2.exports = compareBuild;
- }
- });
-
- // ../../node_modules/semver/functions/sort.js
- var require_sort = __commonJS({
- "../../node_modules/semver/functions/sort.js"(exports, module2) {
- "use strict";
- var compareBuild = require_compare_build(), sort = (list, loose) => list.sort((a3, b) => compareBuild(a3, b, loose));
- module2.exports = sort;
- }
- });
-
- // ../../node_modules/semver/functions/rsort.js
- var require_rsort = __commonJS({
- "../../node_modules/semver/functions/rsort.js"(exports, module2) {
- "use strict";
- var compareBuild = require_compare_build(), rsort = (list, loose) => list.sort((a3, b) => compareBuild(b, a3, loose));
- module2.exports = rsort;
- }
- });
-
- // ../../node_modules/semver/functions/gt.js
- var require_gt = __commonJS({
- "../../node_modules/semver/functions/gt.js"(exports, module2) {
- "use strict";
- var compare = require_compare(), gt = (a3, b, loose) => compare(a3, b, loose) > 0;
- module2.exports = gt;
- }
- });
-
- // ../../node_modules/semver/functions/lt.js
- var require_lt = __commonJS({
- "../../node_modules/semver/functions/lt.js"(exports, module2) {
- "use strict";
- var compare = require_compare(), lt = (a3, b, loose) => compare(a3, b, loose) < 0;
- module2.exports = lt;
- }
- });
-
- // ../../node_modules/semver/functions/eq.js
- var require_eq = __commonJS({
- "../../node_modules/semver/functions/eq.js"(exports, module2) {
- "use strict";
- var compare = require_compare(), eq4 = (a3, b, loose) => compare(a3, b, loose) === 0;
- module2.exports = eq4;
- }
- });
-
- // ../../node_modules/semver/functions/neq.js
- var require_neq = __commonJS({
- "../../node_modules/semver/functions/neq.js"(exports, module2) {
- "use strict";
- var compare = require_compare(), neq = (a3, b, loose) => compare(a3, b, loose) !== 0;
- module2.exports = neq;
- }
- });
-
- // ../../node_modules/semver/functions/gte.js
- var require_gte = __commonJS({
- "../../node_modules/semver/functions/gte.js"(exports, module2) {
- "use strict";
- var compare = require_compare(), gte = (a3, b, loose) => compare(a3, b, loose) >= 0;
- module2.exports = gte;
- }
- });
-
- // ../../node_modules/semver/functions/lte.js
- var require_lte = __commonJS({
- "../../node_modules/semver/functions/lte.js"(exports, module2) {
- "use strict";
- var compare = require_compare(), lte = (a3, b, loose) => compare(a3, b, loose) <= 0;
- module2.exports = lte;
- }
- });
-
- // ../../node_modules/semver/functions/cmp.js
- var require_cmp = __commonJS({
- "../../node_modules/semver/functions/cmp.js"(exports, module2) {
- "use strict";
- var eq4 = require_eq(), neq = require_neq(), gt = require_gt(), gte = require_gte(), lt = require_lt(), lte = require_lte(), cmp = (a3, op, b, loose) => {
- switch (op) {
- case "===":
- return typeof a3 == "object" && (a3 = a3.version), typeof b == "object" && (b = b.version), a3 === b;
- case "!==":
- return typeof a3 == "object" && (a3 = a3.version), typeof b == "object" && (b = b.version), a3 !== b;
- case "":
- case "=":
- case "==":
- return eq4(a3, b, loose);
- case "!=":
- return neq(a3, b, loose);
- case ">":
- return gt(a3, b, loose);
- case ">=":
- return gte(a3, b, loose);
- case "<":
- return lt(a3, b, loose);
- case "<=":
- return lte(a3, b, loose);
- default:
- throw new TypeError(`Invalid operator: ${op}`);
- }
- };
- module2.exports = cmp;
- }
- });
-
- // ../../node_modules/semver/functions/coerce.js
- var require_coerce = __commonJS({
- "../../node_modules/semver/functions/coerce.js"(exports, module2) {
- "use strict";
- var SemVer = require_semver(), parse9 = require_parse2(), { safeRe: re, t } = require_re(), coerce = (version2, options) => {
- if (version2 instanceof SemVer)
- return version2;
- if (typeof version2 == "number" && (version2 = String(version2)), typeof version2 != "string")
- return null;
- options = options || {};
- let match3 = null;
- if (!options.rtl)
- match3 = version2.match(options.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE]);
- else {
- let coerceRtlRegex = options.includePrerelease ? re[t.COERCERTLFULL] : re[t.COERCERTL], next2;
- for (; (next2 = coerceRtlRegex.exec(version2)) && (!match3 || match3.index + match3[0].length !== version2.length); )
- (!match3 || next2.index + next2[0].length !== match3.index + match3[0].length) && (match3 = next2), coerceRtlRegex.lastIndex = next2.index + next2[1].length + next2[2].length;
- coerceRtlRegex.lastIndex = -1;
- }
- if (match3 === null)
- return null;
- let major = match3[2], minor = match3[3] || "0", patch = match3[4] || "0", prerelease = options.includePrerelease && match3[5] ? `-${match3[5]}` : "", build3 = options.includePrerelease && match3[6] ? `+${match3[6]}` : "";
- return parse9(`${major}.${minor}.${patch}${prerelease}${build3}`, options);
- };
- module2.exports = coerce;
- }
- });
-
- // ../../node_modules/semver/internal/lrucache.js
- var require_lrucache = __commonJS({
- "../../node_modules/semver/internal/lrucache.js"(exports, module2) {
- "use strict";
- var LRUCache = class {
- constructor() {
- this.max = 1e3, this.map = /* @__PURE__ */ new Map();
- }
- get(key) {
- let value = this.map.get(key);
- if (value !== void 0)
- return this.map.delete(key), this.map.set(key, value), value;
- }
- delete(key) {
- return this.map.delete(key);
- }
- set(key, value) {
- if (!this.delete(key) && value !== void 0) {
- if (this.map.size >= this.max) {
- let firstKey = this.map.keys().next().value;
- this.delete(firstKey);
- }
- this.map.set(key, value);
- }
- return this;
- }
- };
- module2.exports = LRUCache;
- }
- });
-
- // ../../node_modules/semver/classes/range.js
- var require_range2 = __commonJS({
- "../../node_modules/semver/classes/range.js"(exports, module2) {
- "use strict";
- var SPACE_CHARACTERS = /\s+/g, Range = class _Range {
- constructor(range, options) {
- if (options = parseOptions(options), range instanceof _Range)
- return range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease ? range : new _Range(range.raw, options);
- if (range instanceof Comparator)
- return this.raw = range.value, this.set = [[range]], this.formatted = void 0, this;
- if (this.options = options, this.loose = !!options.loose, this.includePrerelease = !!options.includePrerelease, this.raw = range.trim().replace(SPACE_CHARACTERS, " "), this.set = this.raw.split("||").map((r2) => this.parseRange(r2.trim())).filter((c) => c.length), !this.set.length)
- throw new TypeError(`Invalid SemVer Range: ${this.raw}`);
- if (this.set.length > 1) {
- let first = this.set[0];
- if (this.set = this.set.filter((c) => !isNullSet(c[0])), this.set.length === 0)
- this.set = [first];
- else if (this.set.length > 1) {
- for (let c of this.set)
- if (c.length === 1 && isAny(c[0])) {
- this.set = [c];
- break;
- }
- }
- }
- this.formatted = void 0;
- }
- get range() {
- if (this.formatted === void 0) {
- this.formatted = "";
- for (let i = 0; i < this.set.length; i++) {
- i > 0 && (this.formatted += "||");
- let comps = this.set[i];
- for (let k = 0; k < comps.length; k++)
- k > 0 && (this.formatted += " "), this.formatted += comps[k].toString().trim();
- }
- }
- return this.formatted;
- }
- format() {
- return this.range;
- }
- toString() {
- return this.range;
- }
- parseRange(range) {
- let memoKey = ((this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | (this.options.loose && FLAG_LOOSE)) + ":" + range, cached = cache.get(memoKey);
- if (cached)
- return cached;
- let loose = this.options.loose, hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE];
- range = range.replace(hr, hyphenReplace(this.options.includePrerelease)), debug2("hyphen replace", range), range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace), debug2("comparator trim", range), range = range.replace(re[t.TILDETRIM], tildeTrimReplace), debug2("tilde trim", range), range = range.replace(re[t.CARETTRIM], caretTrimReplace), debug2("caret trim", range);
- let rangeList = range.split(" ").map((comp) => parseComparator(comp, this.options)).join(" ").split(/\s+/).map((comp) => replaceGTE0(comp, this.options));
- loose && (rangeList = rangeList.filter((comp) => (debug2("loose invalid filter", comp, this.options), !!comp.match(re[t.COMPARATORLOOSE])))), debug2("range list", rangeList);
- let rangeMap = /* @__PURE__ */ new Map(), comparators = rangeList.map((comp) => new Comparator(comp, this.options));
- for (let comp of comparators) {
- if (isNullSet(comp))
- return [comp];
- rangeMap.set(comp.value, comp);
- }
- rangeMap.size > 1 && rangeMap.has("") && rangeMap.delete("");
- let result = [...rangeMap.values()];
- return cache.set(memoKey, result), result;
- }
- intersects(range, options) {
- if (!(range instanceof _Range))
- throw new TypeError("a Range is required");
- return this.set.some((thisComparators) => isSatisfiable(thisComparators, options) && range.set.some((rangeComparators) => isSatisfiable(rangeComparators, options) && thisComparators.every((thisComparator) => rangeComparators.every((rangeComparator) => thisComparator.intersects(rangeComparator, options)))));
- }
- // if ANY of the sets match ALL of its comparators, then pass
- test(version2) {
- if (!version2)
- return !1;
- if (typeof version2 == "string")
- try {
- version2 = new SemVer(version2, this.options);
- } catch {
- return !1;
- }
- for (let i = 0; i < this.set.length; i++)
- if (testSet(this.set[i], version2, this.options))
- return !0;
- return !1;
- }
- };
- module2.exports = Range;
- var LRU = require_lrucache(), cache = new LRU(), parseOptions = require_parse_options(), Comparator = require_comparator(), debug2 = require_debug(), SemVer = require_semver(), {
- safeRe: re,
- t,
- comparatorTrimReplace,
- tildeTrimReplace,
- caretTrimReplace
- } = require_re(), { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require_constants(), isNullSet = (c) => c.value === "<0.0.0-0", isAny = (c) => c.value === "", isSatisfiable = (comparators, options) => {
- let result = !0, remainingComparators = comparators.slice(), testComparator = remainingComparators.pop();
- for (; result && remainingComparators.length; )
- result = remainingComparators.every((otherComparator) => testComparator.intersects(otherComparator, options)), testComparator = remainingComparators.pop();
- return result;
- }, parseComparator = (comp, options) => (comp = comp.replace(re[t.BUILD], ""), debug2("comp", comp, options), comp = replaceCarets(comp, options), debug2("caret", comp), comp = replaceTildes(comp, options), debug2("tildes", comp), comp = replaceXRanges(comp, options), debug2("xrange", comp), comp = replaceStars(comp, options), debug2("stars", comp), comp), isX = (id) => !id || id.toLowerCase() === "x" || id === "*", replaceTildes = (comp, options) => comp.trim().split(/\s+/).map((c) => replaceTilde(c, options)).join(" "), replaceTilde = (comp, options) => {
- let r2 = options.loose ? re[t.TILDELOOSE] : re[t.TILDE];
- return comp.replace(r2, (_, M, m3, p3, pr) => {
- debug2("tilde", comp, _, M, m3, p3, pr);
- let ret;
- return isX(M) ? ret = "" : isX(m3) ? ret = `>=${M}.0.0 <${+M + 1}.0.0-0` : isX(p3) ? ret = `>=${M}.${m3}.0 <${M}.${+m3 + 1}.0-0` : pr ? (debug2("replaceTilde pr", pr), ret = `>=${M}.${m3}.${p3}-${pr} <${M}.${+m3 + 1}.0-0`) : ret = `>=${M}.${m3}.${p3} <${M}.${+m3 + 1}.0-0`, debug2("tilde return", ret), ret;
- });
- }, replaceCarets = (comp, options) => comp.trim().split(/\s+/).map((c) => replaceCaret(c, options)).join(" "), replaceCaret = (comp, options) => {
- debug2("caret", comp, options);
- let r2 = options.loose ? re[t.CARETLOOSE] : re[t.CARET], z = options.includePrerelease ? "-0" : "";
- return comp.replace(r2, (_, M, m3, p3, pr) => {
- debug2("caret", comp, _, M, m3, p3, pr);
- let ret;
- return isX(M) ? ret = "" : isX(m3) ? ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0` : isX(p3) ? M === "0" ? ret = `>=${M}.${m3}.0${z} <${M}.${+m3 + 1}.0-0` : ret = `>=${M}.${m3}.0${z} <${+M + 1}.0.0-0` : pr ? (debug2("replaceCaret pr", pr), M === "0" ? m3 === "0" ? ret = `>=${M}.${m3}.${p3}-${pr} <${M}.${m3}.${+p3 + 1}-0` : ret = `>=${M}.${m3}.${p3}-${pr} <${M}.${+m3 + 1}.0-0` : ret = `>=${M}.${m3}.${p3}-${pr} <${+M + 1}.0.0-0`) : (debug2("no pr"), M === "0" ? m3 === "0" ? ret = `>=${M}.${m3}.${p3}${z} <${M}.${m3}.${+p3 + 1}-0` : ret = `>=${M}.${m3}.${p3}${z} <${M}.${+m3 + 1}.0-0` : ret = `>=${M}.${m3}.${p3} <${+M + 1}.0.0-0`), debug2("caret return", ret), ret;
- });
- }, replaceXRanges = (comp, options) => (debug2("replaceXRanges", comp, options), comp.split(/\s+/).map((c) => replaceXRange(c, options)).join(" ")), replaceXRange = (comp, options) => {
- comp = comp.trim();
- let r2 = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE];
- return comp.replace(r2, (ret, gtlt, M, m3, p3, pr) => {
- debug2("xRange", comp, ret, gtlt, M, m3, p3, pr);
- let xM = isX(M), xm = xM || isX(m3), xp = xm || isX(p3), anyX = xp;
- return gtlt === "=" && anyX && (gtlt = ""), pr = options.includePrerelease ? "-0" : "", xM ? gtlt === ">" || gtlt === "<" ? ret = "<0.0.0-0" : ret = "*" : gtlt && anyX ? (xm && (m3 = 0), p3 = 0, gtlt === ">" ? (gtlt = ">=", xm ? (M = +M + 1, m3 = 0, p3 = 0) : (m3 = +m3 + 1, p3 = 0)) : gtlt === "<=" && (gtlt = "<", xm ? M = +M + 1 : m3 = +m3 + 1), gtlt === "<" && (pr = "-0"), ret = `${gtlt + M}.${m3}.${p3}${pr}`) : xm ? ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0` : xp && (ret = `>=${M}.${m3}.0${pr} <${M}.${+m3 + 1}.0-0`), debug2("xRange return", ret), ret;
- });
- }, replaceStars = (comp, options) => (debug2("replaceStars", comp, options), comp.trim().replace(re[t.STAR], "")), replaceGTE0 = (comp, options) => (debug2("replaceGTE0", comp, options), comp.trim().replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], "")), hyphenReplace = (incPr) => ($0, from2, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr) => (isX(fM) ? from2 = "" : isX(fm) ? from2 = `>=${fM}.0.0${incPr ? "-0" : ""}` : isX(fp) ? from2 = `>=${fM}.${fm}.0${incPr ? "-0" : ""}` : fpr ? from2 = `>=${from2}` : from2 = `>=${from2}${incPr ? "-0" : ""}`, isX(tM) ? to = "" : isX(tm) ? to = `<${+tM + 1}.0.0-0` : isX(tp) ? to = `<${tM}.${+tm + 1}.0-0` : tpr ? to = `<=${tM}.${tm}.${tp}-${tpr}` : incPr ? to = `<${tM}.${tm}.${+tp + 1}-0` : to = `<=${to}`, `${from2} ${to}`.trim()), testSet = (set3, version2, options) => {
- for (let i = 0; i < set3.length; i++)
- if (!set3[i].test(version2))
- return !1;
- if (version2.prerelease.length && !options.includePrerelease) {
- for (let i = 0; i < set3.length; i++)
- if (debug2(set3[i].semver), set3[i].semver !== Comparator.ANY && set3[i].semver.prerelease.length > 0) {
- let allowed = set3[i].semver;
- if (allowed.major === version2.major && allowed.minor === version2.minor && allowed.patch === version2.patch)
- return !0;
- }
- return !1;
- }
- return !0;
- };
- }
- });
-
- // ../../node_modules/semver/classes/comparator.js
- var require_comparator = __commonJS({
- "../../node_modules/semver/classes/comparator.js"(exports, module2) {
- "use strict";
- var ANY = Symbol("SemVer ANY"), Comparator = class _Comparator {
- static get ANY() {
- return ANY;
- }
- constructor(comp, options) {
- if (options = parseOptions(options), comp instanceof _Comparator) {
- if (comp.loose === !!options.loose)
- return comp;
- comp = comp.value;
- }
- comp = comp.trim().split(/\s+/).join(" "), debug2("comparator", comp, options), this.options = options, this.loose = !!options.loose, this.parse(comp), this.semver === ANY ? this.value = "" : this.value = this.operator + this.semver.version, debug2("comp", this);
- }
- parse(comp) {
- let r2 = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR], m3 = comp.match(r2);
- if (!m3)
- throw new TypeError(`Invalid comparator: ${comp}`);
- this.operator = m3[1] !== void 0 ? m3[1] : "", this.operator === "=" && (this.operator = ""), m3[2] ? this.semver = new SemVer(m3[2], this.options.loose) : this.semver = ANY;
- }
- toString() {
- return this.value;
- }
- test(version2) {
- if (debug2("Comparator.test", version2, this.options.loose), this.semver === ANY || version2 === ANY)
- return !0;
- if (typeof version2 == "string")
- try {
- version2 = new SemVer(version2, this.options);
- } catch {
- return !1;
- }
- return cmp(version2, this.operator, this.semver, this.options);
- }
- intersects(comp, options) {
- if (!(comp instanceof _Comparator))
- throw new TypeError("a Comparator is required");
- return this.operator === "" ? this.value === "" ? !0 : new Range(comp.value, options).test(this.value) : comp.operator === "" ? comp.value === "" ? !0 : new Range(this.value, options).test(comp.semver) : (options = parseOptions(options), options.includePrerelease && (this.value === "<0.0.0-0" || comp.value === "<0.0.0-0") || !options.includePrerelease && (this.value.startsWith("<0.0.0") || comp.value.startsWith("<0.0.0")) ? !1 : !!(this.operator.startsWith(">") && comp.operator.startsWith(">") || this.operator.startsWith("<") && comp.operator.startsWith("<") || this.semver.version === comp.semver.version && this.operator.includes("=") && comp.operator.includes("=") || cmp(this.semver, "<", comp.semver, options) && this.operator.startsWith(">") && comp.operator.startsWith("<") || cmp(this.semver, ">", comp.semver, options) && this.operator.startsWith("<") && comp.operator.startsWith(">")));
- }
- };
- module2.exports = Comparator;
- var parseOptions = require_parse_options(), { safeRe: re, t } = require_re(), cmp = require_cmp(), debug2 = require_debug(), SemVer = require_semver(), Range = require_range2();
- }
- });
-
- // ../../node_modules/semver/functions/satisfies.js
- var require_satisfies = __commonJS({
- "../../node_modules/semver/functions/satisfies.js"(exports, module2) {
- "use strict";
- var Range = require_range2(), satisfies = (version2, range, options) => {
- try {
- range = new Range(range, options);
- } catch {
- return !1;
- }
- return range.test(version2);
- };
- module2.exports = satisfies;
- }
- });
-
- // ../../node_modules/semver/ranges/to-comparators.js
- var require_to_comparators = __commonJS({
- "../../node_modules/semver/ranges/to-comparators.js"(exports, module2) {
- "use strict";
- var Range = require_range2(), toComparators = (range, options) => new Range(range, options).set.map((comp) => comp.map((c) => c.value).join(" ").trim().split(" "));
- module2.exports = toComparators;
- }
- });
-
- // ../../node_modules/semver/ranges/max-satisfying.js
- var require_max_satisfying = __commonJS({
- "../../node_modules/semver/ranges/max-satisfying.js"(exports, module2) {
- "use strict";
- var SemVer = require_semver(), Range = require_range2(), maxSatisfying = (versions, range, options) => {
- let max2 = null, maxSV = null, rangeObj = null;
- try {
- rangeObj = new Range(range, options);
- } catch {
- return null;
- }
- return versions.forEach((v) => {
- rangeObj.test(v) && (!max2 || maxSV.compare(v) === -1) && (max2 = v, maxSV = new SemVer(max2, options));
- }), max2;
- };
- module2.exports = maxSatisfying;
- }
- });
-
- // ../../node_modules/semver/ranges/min-satisfying.js
- var require_min_satisfying = __commonJS({
- "../../node_modules/semver/ranges/min-satisfying.js"(exports, module2) {
- "use strict";
- var SemVer = require_semver(), Range = require_range2(), minSatisfying = (versions, range, options) => {
- let min2 = null, minSV = null, rangeObj = null;
- try {
- rangeObj = new Range(range, options);
- } catch {
- return null;
- }
- return versions.forEach((v) => {
- rangeObj.test(v) && (!min2 || minSV.compare(v) === 1) && (min2 = v, minSV = new SemVer(min2, options));
- }), min2;
- };
- module2.exports = minSatisfying;
- }
- });
-
- // ../../node_modules/semver/ranges/min-version.js
- var require_min_version = __commonJS({
- "../../node_modules/semver/ranges/min-version.js"(exports, module2) {
- "use strict";
- var SemVer = require_semver(), Range = require_range2(), gt = require_gt(), minVersion = (range, loose) => {
- range = new Range(range, loose);
- let minver = new SemVer("0.0.0");
- if (range.test(minver) || (minver = new SemVer("0.0.0-0"), range.test(minver)))
- return minver;
- minver = null;
- for (let i = 0; i < range.set.length; ++i) {
- let comparators = range.set[i], setMin = null;
- comparators.forEach((comparator) => {
- let compver = new SemVer(comparator.semver.version);
- switch (comparator.operator) {
- case ">":
- compver.prerelease.length === 0 ? compver.patch++ : compver.prerelease.push(0), compver.raw = compver.format();
- /* fallthrough */
- case "":
- case ">=":
- (!setMin || gt(compver, setMin)) && (setMin = compver);
- break;
- case "<":
- case "<=":
- break;
- /* istanbul ignore next */
- default:
- throw new Error(`Unexpected operation: ${comparator.operator}`);
- }
- }), setMin && (!minver || gt(minver, setMin)) && (minver = setMin);
- }
- return minver && range.test(minver) ? minver : null;
- };
- module2.exports = minVersion;
- }
- });
-
- // ../../node_modules/semver/ranges/valid.js
- var require_valid2 = __commonJS({
- "../../node_modules/semver/ranges/valid.js"(exports, module2) {
- "use strict";
- var Range = require_range2(), validRange = (range, options) => {
- try {
- return new Range(range, options).range || "*";
- } catch {
- return null;
- }
- };
- module2.exports = validRange;
- }
- });
-
- // ../../node_modules/semver/ranges/outside.js
- var require_outside = __commonJS({
- "../../node_modules/semver/ranges/outside.js"(exports, module2) {
- "use strict";
- var SemVer = require_semver(), Comparator = require_comparator(), { ANY } = Comparator, Range = require_range2(), satisfies = require_satisfies(), gt = require_gt(), lt = require_lt(), lte = require_lte(), gte = require_gte(), outside = (version2, range, hilo, options) => {
- version2 = new SemVer(version2, options), range = new Range(range, options);
- let gtfn, ltefn, ltfn, comp, ecomp;
- switch (hilo) {
- case ">":
- gtfn = gt, ltefn = lte, ltfn = lt, comp = ">", ecomp = ">=";
- break;
- case "<":
- gtfn = lt, ltefn = gte, ltfn = gt, comp = "<", ecomp = "<=";
- break;
- default:
- throw new TypeError('Must provide a hilo val of "<" or ">"');
- }
- if (satisfies(version2, range, options))
- return !1;
- for (let i = 0; i < range.set.length; ++i) {
- let comparators = range.set[i], high = null, low = null;
- if (comparators.forEach((comparator) => {
- comparator.semver === ANY && (comparator = new Comparator(">=0.0.0")), high = high || comparator, low = low || comparator, gtfn(comparator.semver, high.semver, options) ? high = comparator : ltfn(comparator.semver, low.semver, options) && (low = comparator);
- }), high.operator === comp || high.operator === ecomp || (!low.operator || low.operator === comp) && ltefn(version2, low.semver))
- return !1;
- if (low.operator === ecomp && ltfn(version2, low.semver))
- return !1;
- }
- return !0;
- };
- module2.exports = outside;
- }
- });
-
- // ../../node_modules/semver/ranges/gtr.js
- var require_gtr = __commonJS({
- "../../node_modules/semver/ranges/gtr.js"(exports, module2) {
- "use strict";
- var outside = require_outside(), gtr = (version2, range, options) => outside(version2, range, ">", options);
- module2.exports = gtr;
- }
- });
-
- // ../../node_modules/semver/ranges/ltr.js
- var require_ltr = __commonJS({
- "../../node_modules/semver/ranges/ltr.js"(exports, module2) {
- "use strict";
- var outside = require_outside(), ltr = (version2, range, options) => outside(version2, range, "<", options);
- module2.exports = ltr;
- }
- });
-
- // ../../node_modules/semver/ranges/intersects.js
- var require_intersects = __commonJS({
- "../../node_modules/semver/ranges/intersects.js"(exports, module2) {
- "use strict";
- var Range = require_range2(), intersects = (r1, r2, options) => (r1 = new Range(r1, options), r2 = new Range(r2, options), r1.intersects(r2, options));
- module2.exports = intersects;
- }
- });
-
- // ../../node_modules/semver/ranges/simplify.js
- var require_simplify = __commonJS({
- "../../node_modules/semver/ranges/simplify.js"(exports, module2) {
- "use strict";
- var satisfies = require_satisfies(), compare = require_compare();
- module2.exports = (versions, range, options) => {
- let set3 = [], first = null, prev2 = null, v = versions.sort((a3, b) => compare(a3, b, options));
- for (let version2 of v)
- satisfies(version2, range, options) ? (prev2 = version2, first || (first = version2)) : (prev2 && set3.push([first, prev2]), prev2 = null, first = null);
- first && set3.push([first, null]);
- let ranges = [];
- for (let [min2, max2] of set3)
- min2 === max2 ? ranges.push(min2) : !max2 && min2 === v[0] ? ranges.push("*") : max2 ? min2 === v[0] ? ranges.push(`<=${max2}`) : ranges.push(`${min2} - ${max2}`) : ranges.push(`>=${min2}`);
- let simplified = ranges.join(" || "), original = typeof range.raw == "string" ? range.raw : String(range);
- return simplified.length < original.length ? simplified : range;
- };
- }
- });
-
- // ../../node_modules/semver/ranges/subset.js
- var require_subset = __commonJS({
- "../../node_modules/semver/ranges/subset.js"(exports, module2) {
- "use strict";
- var Range = require_range2(), Comparator = require_comparator(), { ANY } = Comparator, satisfies = require_satisfies(), compare = require_compare(), subset = (sub, dom, options = {}) => {
- if (sub === dom)
- return !0;
- sub = new Range(sub, options), dom = new Range(dom, options);
- let sawNonNull = !1;
- OUTER: for (let simpleSub of sub.set) {
- for (let simpleDom of dom.set) {
- let isSub = simpleSubset(simpleSub, simpleDom, options);
- if (sawNonNull = sawNonNull || isSub !== null, isSub)
- continue OUTER;
- }
- if (sawNonNull)
- return !1;
- }
- return !0;
- }, minimumVersionWithPreRelease = [new Comparator(">=0.0.0-0")], minimumVersion = [new Comparator(">=0.0.0")], simpleSubset = (sub, dom, options) => {
- if (sub === dom)
- return !0;
- if (sub.length === 1 && sub[0].semver === ANY) {
- if (dom.length === 1 && dom[0].semver === ANY)
- return !0;
- options.includePrerelease ? sub = minimumVersionWithPreRelease : sub = minimumVersion;
- }
- if (dom.length === 1 && dom[0].semver === ANY) {
- if (options.includePrerelease)
- return !0;
- dom = minimumVersion;
- }
- let eqSet = /* @__PURE__ */ new Set(), gt, lt;
- for (let c of sub)
- c.operator === ">" || c.operator === ">=" ? gt = higherGT(gt, c, options) : c.operator === "<" || c.operator === "<=" ? lt = lowerLT(lt, c, options) : eqSet.add(c.semver);
- if (eqSet.size > 1)
- return null;
- let gtltComp;
- if (gt && lt) {
- if (gtltComp = compare(gt.semver, lt.semver, options), gtltComp > 0)
- return null;
- if (gtltComp === 0 && (gt.operator !== ">=" || lt.operator !== "<="))
- return null;
- }
- for (let eq4 of eqSet) {
- if (gt && !satisfies(eq4, String(gt), options) || lt && !satisfies(eq4, String(lt), options))
- return null;
- for (let c of dom)
- if (!satisfies(eq4, String(c), options))
- return !1;
- return !0;
- }
- let higher, lower, hasDomLT, hasDomGT, needDomLTPre = lt && !options.includePrerelease && lt.semver.prerelease.length ? lt.semver : !1, needDomGTPre = gt && !options.includePrerelease && gt.semver.prerelease.length ? gt.semver : !1;
- needDomLTPre && needDomLTPre.prerelease.length === 1 && lt.operator === "<" && needDomLTPre.prerelease[0] === 0 && (needDomLTPre = !1);
- for (let c of dom) {
- if (hasDomGT = hasDomGT || c.operator === ">" || c.operator === ">=", hasDomLT = hasDomLT || c.operator === "<" || c.operator === "<=", gt) {
- if (needDomGTPre && c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomGTPre.major && c.semver.minor === needDomGTPre.minor && c.semver.patch === needDomGTPre.patch && (needDomGTPre = !1), c.operator === ">" || c.operator === ">=") {
- if (higher = higherGT(gt, c, options), higher === c && higher !== gt)
- return !1;
- } else if (gt.operator === ">=" && !satisfies(gt.semver, String(c), options))
- return !1;
- }
- if (lt) {
- if (needDomLTPre && c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomLTPre.major && c.semver.minor === needDomLTPre.minor && c.semver.patch === needDomLTPre.patch && (needDomLTPre = !1), c.operator === "<" || c.operator === "<=") {
- if (lower = lowerLT(lt, c, options), lower === c && lower !== lt)
- return !1;
- } else if (lt.operator === "<=" && !satisfies(lt.semver, String(c), options))
- return !1;
- }
- if (!c.operator && (lt || gt) && gtltComp !== 0)
- return !1;
- }
- return !(gt && hasDomLT && !lt && gtltComp !== 0 || lt && hasDomGT && !gt && gtltComp !== 0 || needDomGTPre || needDomLTPre);
- }, higherGT = (a3, b, options) => {
- if (!a3)
- return b;
- let comp = compare(a3.semver, b.semver, options);
- return comp > 0 ? a3 : comp < 0 || b.operator === ">" && a3.operator === ">=" ? b : a3;
- }, lowerLT = (a3, b, options) => {
- if (!a3)
- return b;
- let comp = compare(a3.semver, b.semver, options);
- return comp < 0 ? a3 : comp > 0 || b.operator === "<" && a3.operator === "<=" ? b : a3;
- };
- module2.exports = subset;
- }
- });
-
- // ../../node_modules/semver/index.js
- var require_semver2 = __commonJS({
- "../../node_modules/semver/index.js"(exports, module2) {
- "use strict";
- var internalRe = require_re(), constants = require_constants(), SemVer = require_semver(), identifiers = require_identifiers(), parse9 = require_parse2(), valid = require_valid(), clean = require_clean(), inc = require_inc(), diff2 = require_diff(), major = require_major(), minor = require_minor(), patch = require_patch(), prerelease = require_prerelease(), compare = require_compare(), rcompare = require_rcompare(), compareLoose = require_compare_loose(), compareBuild = require_compare_build(), sort = require_sort(), rsort = require_rsort(), gt = require_gt(), lt = require_lt(), eq4 = require_eq(), neq = require_neq(), gte = require_gte(), lte = require_lte(), cmp = require_cmp(), coerce = require_coerce(), Comparator = require_comparator(), Range = require_range2(), satisfies = require_satisfies(), toComparators = require_to_comparators(), maxSatisfying = require_max_satisfying(), minSatisfying = require_min_satisfying(), minVersion = require_min_version(), validRange = require_valid2(), outside = require_outside(), gtr = require_gtr(), ltr = require_ltr(), intersects = require_intersects(), simplifyRange = require_simplify(), subset = require_subset();
- module2.exports = {
- parse: parse9,
- valid,
- clean,
- inc,
- diff: diff2,
- major,
- minor,
- patch,
- prerelease,
- compare,
- rcompare,
- compareLoose,
- compareBuild,
- sort,
- rsort,
- gt,
- lt,
- eq: eq4,
- neq,
- gte,
- lte,
- cmp,
- coerce,
- Comparator,
- Range,
- satisfies,
- toComparators,
- maxSatisfying,
- minSatisfying,
- minVersion,
- validRange,
- outside,
- gtr,
- ltr,
- intersects,
- simplifyRange,
- subset,
- SemVer,
- re: internalRe.re,
- src: internalRe.src,
- tokens: internalRe.t,
- SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION,
- RELEASE_TYPES: constants.RELEASE_TYPES,
- compareIdentifiers: identifiers.compareIdentifiers,
- rcompareIdentifiers: identifiers.rcompareIdentifiers
- };
- }
- });
-
- // ../../node_modules/store2/dist/store2.js
- var require_store2 = __commonJS({
- "../../node_modules/store2/dist/store2.js"(exports, module2) {
- (function(window2, define3) {
- var _ = {
- version: "2.14.4",
- areas: {},
- apis: {},
- nsdelim: ".",
- // utilities
- inherit: function(api, o) {
- for (var p3 in api)
- o.hasOwnProperty(p3) || Object.defineProperty(o, p3, Object.getOwnPropertyDescriptor(api, p3));
- return o;
- },
- stringify: function(d, fn4) {
- return d === void 0 || typeof d == "function" ? d + "" : JSON.stringify(d, fn4 || _.replace);
- },
- parse: function(s3, fn4) {
- try {
- return JSON.parse(s3, fn4 || _.revive);
- } catch {
- return s3;
- }
- },
- // extension hooks
- fn: function(name, fn4) {
- _.storeAPI[name] = fn4;
- for (var api in _.apis)
- _.apis[api][name] = fn4;
- },
- get: function(area, key) {
- return area.getItem(key);
- },
- set: function(area, key, string) {
- area.setItem(key, string);
- },
- remove: function(area, key) {
- area.removeItem(key);
- },
- key: function(area, i) {
- return area.key(i);
- },
- length: function(area) {
- return area.length;
- },
- clear: function(area) {
- area.clear();
- },
- // core functions
- Store: function(id, area, namespace) {
- var store3 = _.inherit(_.storeAPI, function(key, data, overwrite) {
- return arguments.length === 0 ? store3.getAll() : typeof data == "function" ? store3.transact(key, data, overwrite) : data !== void 0 ? store3.set(key, data, overwrite) : typeof key == "string" || typeof key == "number" ? store3.get(key) : typeof key == "function" ? store3.each(key) : key ? store3.setAll(key, data) : store3.clear();
- });
- store3._id = id;
- try {
- var testKey = "__store2_test";
- area.setItem(testKey, "ok"), store3._area = area, area.removeItem(testKey);
- } catch {
- store3._area = _.storage("fake");
- }
- return store3._ns = namespace || "", _.areas[id] || (_.areas[id] = store3._area), _.apis[store3._ns + store3._id] || (_.apis[store3._ns + store3._id] = store3), store3;
- },
- storeAPI: {
- // admin functions
- area: function(id, area) {
- var store3 = this[id];
- return (!store3 || !store3.area) && (store3 = _.Store(id, area, this._ns), this[id] || (this[id] = store3)), store3;
- },
- namespace: function(namespace, singleArea, delim) {
- if (delim = delim || this._delim || _.nsdelim, !namespace)
- return this._ns ? this._ns.substring(0, this._ns.length - delim.length) : "";
- var ns = namespace, store3 = this[ns];
- if ((!store3 || !store3.namespace) && (store3 = _.Store(this._id, this._area, this._ns + ns + delim), store3._delim = delim, this[ns] || (this[ns] = store3), !singleArea))
- for (var name in _.areas)
- store3.area(name, _.areas[name]);
- return store3;
- },
- isFake: function(force) {
- return force ? (this._real = this._area, this._area = _.storage("fake")) : force === !1 && (this._area = this._real || this._area), this._area.name === "fake";
- },
- toString: function() {
- return "store" + (this._ns ? "." + this.namespace() : "") + "[" + this._id + "]";
- },
- // storage functions
- has: function(key) {
- return this._area.has ? this._area.has(this._in(key)) : this._in(key) in this._area;
- },
- size: function() {
- return this.keys().length;
- },
- each: function(fn4, fill2) {
- for (var i = 0, m3 = _.length(this._area); i < m3; i++) {
- var key = this._out(_.key(this._area, i));
- if (key !== void 0 && fn4.call(this, key, this.get(key), fill2) === !1)
- break;
- m3 > _.length(this._area) && (m3--, i--);
- }
- return fill2 || this;
- },
- keys: function(fillList) {
- return this.each(function(k, v, list) {
- list.push(k);
- }, fillList || []);
- },
- get: function(key, alt) {
- var s3 = _.get(this._area, this._in(key)), fn4;
- return typeof alt == "function" && (fn4 = alt, alt = null), s3 !== null ? _.parse(s3, fn4) : alt ?? s3;
- },
- getAll: function(fillObj) {
- return this.each(function(k, v, all) {
- all[k] = v;
- }, fillObj || {});
- },
- transact: function(key, fn4, alt) {
- var val = this.get(key, alt), ret = fn4(val);
- return this.set(key, ret === void 0 ? val : ret), this;
- },
- set: function(key, data, overwrite) {
- var d = this.get(key), replacer3;
- return d != null && overwrite === !1 ? data : (typeof overwrite == "function" && (replacer3 = overwrite, overwrite = void 0), _.set(this._area, this._in(key), _.stringify(data, replacer3), overwrite) || d);
- },
- setAll: function(data, overwrite) {
- var changed, val;
- for (var key in data)
- val = data[key], this.set(key, val, overwrite) !== val && (changed = !0);
- return changed;
- },
- add: function(key, data, replacer3) {
- var d = this.get(key);
- if (d instanceof Array)
- data = d.concat(data);
- else if (d !== null) {
- var type5 = typeof d;
- if (type5 === typeof data && type5 === "object") {
- for (var k in data)
- d[k] = data[k];
- data = d;
- } else
- data = d + data;
- }
- return _.set(this._area, this._in(key), _.stringify(data, replacer3)), data;
- },
- remove: function(key, alt) {
- var d = this.get(key, alt);
- return _.remove(this._area, this._in(key)), d;
- },
- clear: function() {
- return this._ns ? this.each(function(k) {
- _.remove(this._area, this._in(k));
- }, 1) : _.clear(this._area), this;
- },
- clearAll: function() {
- var area = this._area;
- for (var id in _.areas)
- _.areas.hasOwnProperty(id) && (this._area = _.areas[id], this.clear());
- return this._area = area, this;
- },
- // internal use functions
- _in: function(k) {
- return typeof k != "string" && (k = _.stringify(k)), this._ns ? this._ns + k : k;
- },
- _out: function(k) {
- return this._ns ? k && k.indexOf(this._ns) === 0 ? k.substring(this._ns.length) : void 0 : (
- // so each() knows to skip it
- k
- );
- }
- },
- // end _.storeAPI
- storage: function(name) {
- return _.inherit(_.storageAPI, { items: {}, name });
- },
- storageAPI: {
- length: 0,
- has: function(k) {
- return this.items.hasOwnProperty(k);
- },
- key: function(i) {
- var c = 0;
- for (var k in this.items)
- if (this.has(k) && i === c++)
- return k;
- },
- setItem: function(k, v) {
- this.has(k) || this.length++, this.items[k] = v;
- },
- removeItem: function(k) {
- this.has(k) && (delete this.items[k], this.length--);
- },
- getItem: function(k) {
- return this.has(k) ? this.items[k] : null;
- },
- clear: function() {
- for (var k in this.items)
- this.removeItem(k);
- }
- }
- // end _.storageAPI
- }, store2 = (
- // safely set this up (throws error in IE10/32bit mode for local files)
- _.Store("local", (function() {
- try {
- return localStorage;
- } catch {
- }
- })())
- );
- store2.local = store2, store2._ = _, store2.area("session", (function() {
- try {
- return sessionStorage;
- } catch {
- }
- })()), store2.area("page", _.storage("page")), typeof define3 == "function" && define3.amd !== void 0 ? define3("store2", [], function() {
- return store2;
- }) : typeof module2 < "u" && module2.exports ? module2.exports = store2 : (window2.store && (_.conflict = window2.store), window2.store = store2);
- })(exports, exports && exports.define);
- }
- });
-
- // ../../node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js
- var require_use_sync_external_store_shim_production = __commonJS({
- "../../node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js"(exports) {
- "use strict";
- var React99 = require_react();
- function is(x, y) {
- return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y;
- }
- var objectIs = typeof Object.is == "function" ? Object.is : is, useState29 = React99.useState, useEffect26 = React99.useEffect, useLayoutEffect9 = React99.useLayoutEffect, useDebugValue = React99.useDebugValue;
- function useSyncExternalStore$2(subscribe, getSnapshot) {
- var value = getSnapshot(), _useState = useState29({ inst: { value, getSnapshot } }), inst = _useState[0].inst, forceUpdate = _useState[1];
- return useLayoutEffect9(
- function() {
- inst.value = value, inst.getSnapshot = getSnapshot, checkIfSnapshotChanged(inst) && forceUpdate({ inst });
- },
- [subscribe, value, getSnapshot]
- ), useEffect26(
- function() {
- return checkIfSnapshotChanged(inst) && forceUpdate({ inst }), subscribe(function() {
- checkIfSnapshotChanged(inst) && forceUpdate({ inst });
- });
- },
- [subscribe]
- ), useDebugValue(value), value;
- }
- function checkIfSnapshotChanged(inst) {
- var latestGetSnapshot = inst.getSnapshot;
- inst = inst.value;
- try {
- var nextValue = latestGetSnapshot();
- return !objectIs(inst, nextValue);
- } catch {
- return !0;
- }
- }
- function useSyncExternalStore$1(subscribe, getSnapshot) {
- return getSnapshot();
- }
- var shim = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? useSyncExternalStore$1 : useSyncExternalStore$2;
- exports.useSyncExternalStore = React99.useSyncExternalStore !== void 0 ? React99.useSyncExternalStore : shim;
- }
- });
-
- // ../../node_modules/use-sync-external-store/shim/index.js
- var require_shim = __commonJS({
- "../../node_modules/use-sync-external-store/shim/index.js"(exports, module2) {
- "use strict";
- module2.exports = require_use_sync_external_store_shim_production();
- }
- });
-
- // ../../node_modules/react-popper/lib/esm/Manager.js
- var React67, ManagerReferenceNodeContext, ManagerReferenceNodeSetterContext, init_Manager = __esm({
- "../../node_modules/react-popper/lib/esm/Manager.js"() {
- React67 = __toESM(require_react()), ManagerReferenceNodeContext = React67.createContext(), ManagerReferenceNodeSetterContext = React67.createContext();
- }
- });
-
- // ../../node_modules/react-popper/lib/esm/utils.js
- var React68, fromEntries3, useIsomorphicLayoutEffect2, init_utils3 = __esm({
- "../../node_modules/react-popper/lib/esm/utils.js"() {
- React68 = __toESM(require_react()), fromEntries3 = function(entries) {
- return entries.reduce(function(acc, _ref) {
- var key = _ref[0], value = _ref[1];
- return acc[key] = value, acc;
- }, {});
- }, useIsomorphicLayoutEffect2 = typeof window < "u" && window.document && window.document.createElement ? React68.useLayoutEffect : React68.useEffect;
- }
- });
-
- // ../../node_modules/@popperjs/core/lib/enums.js
- var top, bottom, right, left, auto, basePlacements, start, end, clippingParents, viewport, popper, reference, variationPlacements, placements, beforeRead, read, afterRead, beforeMain, main2, afterMain, beforeWrite, write, afterWrite, modifierPhases, init_enums = __esm({
- "../../node_modules/@popperjs/core/lib/enums.js"() {
- top = "top", bottom = "bottom", right = "right", left = "left", auto = "auto", basePlacements = [top, bottom, right, left], start = "start", end = "end", clippingParents = "clippingParents", viewport = "viewport", popper = "popper", reference = "reference", variationPlacements = basePlacements.reduce(function(acc, placement) {
- return acc.concat([placement + "-" + start, placement + "-" + end]);
- }, []), placements = [].concat(basePlacements, [auto]).reduce(function(acc, placement) {
- return acc.concat([placement, placement + "-" + start, placement + "-" + end]);
- }, []), beforeRead = "beforeRead", read = "read", afterRead = "afterRead", beforeMain = "beforeMain", main2 = "main", afterMain = "afterMain", beforeWrite = "beforeWrite", write = "write", afterWrite = "afterWrite", modifierPhases = [beforeRead, read, afterRead, beforeMain, main2, afterMain, beforeWrite, write, afterWrite];
- }
- });
-
- // ../../node_modules/@popperjs/core/lib/dom-utils/getNodeName.js
- function getNodeName(element) {
- return element ? (element.nodeName || "").toLowerCase() : null;
- }
- var init_getNodeName = __esm({
- "../../node_modules/@popperjs/core/lib/dom-utils/getNodeName.js"() {
- }
- });
-
- // ../../node_modules/@popperjs/core/lib/dom-utils/getWindow.js
- function getWindow2(node2) {
- if (node2 == null)
- return window;
- if (node2.toString() !== "[object Window]") {
- var ownerDocument = node2.ownerDocument;
- return ownerDocument && ownerDocument.defaultView || window;
- }
- return node2;
- }
- var init_getWindow = __esm({
- "../../node_modules/@popperjs/core/lib/dom-utils/getWindow.js"() {
- }
- });
-
- // ../../node_modules/@popperjs/core/lib/dom-utils/instanceOf.js
- function isElement5(node2) {
- var OwnElement = getWindow2(node2).Element;
- return node2 instanceof OwnElement || node2 instanceof Element;
- }
- function isHTMLElement(node2) {
- var OwnElement = getWindow2(node2).HTMLElement;
- return node2 instanceof OwnElement || node2 instanceof HTMLElement;
- }
- function isShadowRoot(node2) {
- if (typeof ShadowRoot > "u")
- return !1;
- var OwnElement = getWindow2(node2).ShadowRoot;
- return node2 instanceof OwnElement || node2 instanceof ShadowRoot;
- }
- var init_instanceOf = __esm({
- "../../node_modules/@popperjs/core/lib/dom-utils/instanceOf.js"() {
- init_getWindow();
- }
- });
-
- // ../../node_modules/@popperjs/core/lib/modifiers/applyStyles.js
- function applyStyles(_ref) {
- var state3 = _ref.state;
- Object.keys(state3.elements).forEach(function(name) {
- var style = state3.styles[name] || {}, attributes = state3.attributes[name] || {}, element = state3.elements[name];
- !isHTMLElement(element) || !getNodeName(element) || (Object.assign(element.style, style), Object.keys(attributes).forEach(function(name2) {
- var value = attributes[name2];
- value === !1 ? element.removeAttribute(name2) : element.setAttribute(name2, value === !0 ? "" : value);
- }));
- });
- }
- function effect(_ref2) {
- var state3 = _ref2.state, initialStyles = {
- popper: {
- position: state3.options.strategy,
- left: "0",
- top: "0",
- margin: "0"
- },
- arrow: {
- position: "absolute"
- },
- reference: {}
- };
- return Object.assign(state3.elements.popper.style, initialStyles.popper), state3.styles = initialStyles, state3.elements.arrow && Object.assign(state3.elements.arrow.style, initialStyles.arrow), function() {
- Object.keys(state3.elements).forEach(function(name) {
- var element = state3.elements[name], attributes = state3.attributes[name] || {}, styleProperties = Object.keys(state3.styles.hasOwnProperty(name) ? state3.styles[name] : initialStyles[name]), style = styleProperties.reduce(function(style2, property) {
- return style2[property] = "", style2;
- }, {});
- !isHTMLElement(element) || !getNodeName(element) || (Object.assign(element.style, style), Object.keys(attributes).forEach(function(attribute) {
- element.removeAttribute(attribute);
- }));
- });
- };
- }
- var applyStyles_default, init_applyStyles = __esm({
- "../../node_modules/@popperjs/core/lib/modifiers/applyStyles.js"() {
- init_getNodeName();
- init_instanceOf();
- applyStyles_default = {
- name: "applyStyles",
- enabled: !0,
- phase: "write",
- fn: applyStyles,
- effect,
- requires: ["computeStyles"]
- };
- }
- });
-
- // ../../node_modules/@popperjs/core/lib/utils/getBasePlacement.js
- function getBasePlacement(placement) {
- return placement.split("-")[0];
- }
- var init_getBasePlacement = __esm({
- "../../node_modules/@popperjs/core/lib/utils/getBasePlacement.js"() {
- init_enums();
- }
- });
-
- // ../../node_modules/@popperjs/core/lib/utils/math.js
- var max, min, round2, init_math = __esm({
- "../../node_modules/@popperjs/core/lib/utils/math.js"() {
- max = Math.max, min = Math.min, round2 = Math.round;
- }
- });
-
- // ../../node_modules/@popperjs/core/lib/utils/userAgent.js
- function getUAString() {
- var uaData = navigator.userAgentData;
- return uaData != null && uaData.brands && Array.isArray(uaData.brands) ? uaData.brands.map(function(item) {
- return item.brand + "/" + item.version;
- }).join(" ") : navigator.userAgent;
- }
- var init_userAgent = __esm({
- "../../node_modules/@popperjs/core/lib/utils/userAgent.js"() {
- }
- });
-
- // ../../node_modules/@popperjs/core/lib/dom-utils/isLayoutViewport.js
- function isLayoutViewport() {
- return !/^((?!chrome|android).)*safari/i.test(getUAString());
- }
- var init_isLayoutViewport = __esm({
- "../../node_modules/@popperjs/core/lib/dom-utils/isLayoutViewport.js"() {
- init_userAgent();
- }
- });
-
- // ../../node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.js
- function getBoundingClientRect(element, includeScale, isFixedStrategy) {
- includeScale === void 0 && (includeScale = !1), isFixedStrategy === void 0 && (isFixedStrategy = !1);
- var clientRect = element.getBoundingClientRect(), scaleX = 1, scaleY = 1;
- includeScale && isHTMLElement(element) && (scaleX = element.offsetWidth > 0 && round2(clientRect.width) / element.offsetWidth || 1, scaleY = element.offsetHeight > 0 && round2(clientRect.height) / element.offsetHeight || 1);
- var _ref = isElement5(element) ? getWindow2(element) : window, visualViewport = _ref.visualViewport, addVisualOffsets = !isLayoutViewport() && isFixedStrategy, x = (clientRect.left + (addVisualOffsets && visualViewport ? visualViewport.offsetLeft : 0)) / scaleX, y = (clientRect.top + (addVisualOffsets && visualViewport ? visualViewport.offsetTop : 0)) / scaleY, width = clientRect.width / scaleX, height = clientRect.height / scaleY;
- return {
- width,
- height,
- top: y,
- right: x + width,
- bottom: y + height,
- left: x,
- x,
- y
- };
- }
- var init_getBoundingClientRect = __esm({
- "../../node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.js"() {
- init_instanceOf();
- init_math();
- init_getWindow();
- init_isLayoutViewport();
- }
- });
-
- // ../../node_modules/@popperjs/core/lib/dom-utils/getLayoutRect.js
- function getLayoutRect(element) {
- var clientRect = getBoundingClientRect(element), width = element.offsetWidth, height = element.offsetHeight;
- return Math.abs(clientRect.width - width) <= 1 && (width = clientRect.width), Math.abs(clientRect.height - height) <= 1 && (height = clientRect.height), {
- x: element.offsetLeft,
- y: element.offsetTop,
- width,
- height
- };
- }
- var init_getLayoutRect = __esm({
- "../../node_modules/@popperjs/core/lib/dom-utils/getLayoutRect.js"() {
- init_getBoundingClientRect();
- }
- });
-
- // ../../node_modules/@popperjs/core/lib/dom-utils/contains.js
- function contains(parent, child) {
- var rootNode = child.getRootNode && child.getRootNode();
- if (parent.contains(child))
- return !0;
- if (rootNode && isShadowRoot(rootNode)) {
- var next2 = child;
- do {
- if (next2 && parent.isSameNode(next2))
- return !0;
- next2 = next2.parentNode || next2.host;
- } while (next2);
- }
- return !1;
- }
- var init_contains = __esm({
- "../../node_modules/@popperjs/core/lib/dom-utils/contains.js"() {
- init_instanceOf();
- }
- });
-
- // ../../node_modules/@popperjs/core/lib/dom-utils/getComputedStyle.js
- function getComputedStyle2(element) {
- return getWindow2(element).getComputedStyle(element);
- }
- var init_getComputedStyle = __esm({
- "../../node_modules/@popperjs/core/lib/dom-utils/getComputedStyle.js"() {
- init_getWindow();
- }
- });
-
- // ../../node_modules/@popperjs/core/lib/dom-utils/isTableElement.js
- function isTableElement(element) {
- return ["table", "td", "th"].indexOf(getNodeName(element)) >= 0;
- }
- var init_isTableElement = __esm({
- "../../node_modules/@popperjs/core/lib/dom-utils/isTableElement.js"() {
- init_getNodeName();
- }
- });
-
- // ../../node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.js
- function getDocumentElement(element) {
- return ((isElement5(element) ? element.ownerDocument : (
- // $FlowFixMe[prop-missing]
- element.document
- )) || window.document).documentElement;
- }
- var init_getDocumentElement = __esm({
- "../../node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.js"() {
- init_instanceOf();
- }
- });
-
- // ../../node_modules/@popperjs/core/lib/dom-utils/getParentNode.js
- function getParentNode(element) {
- return getNodeName(element) === "html" ? element : (
- // this is a quicker (but less type safe) way to save quite some bytes from the bundle
- // $FlowFixMe[incompatible-return]
- // $FlowFixMe[prop-missing]
- element.assignedSlot || // step into the shadow DOM of the parent of a slotted node
- element.parentNode || // DOM Element detected
- (isShadowRoot(element) ? element.host : null) || // ShadowRoot detected
- // $FlowFixMe[incompatible-call]: HTMLElement is a Node
- getDocumentElement(element)
- );
- }
- var init_getParentNode = __esm({
- "../../node_modules/@popperjs/core/lib/dom-utils/getParentNode.js"() {
- init_getNodeName();
- init_getDocumentElement();
- init_instanceOf();
- }
- });
-
- // ../../node_modules/@popperjs/core/lib/dom-utils/getOffsetParent.js
- function getTrueOffsetParent(element) {
- return !isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837
- getComputedStyle2(element).position === "fixed" ? null : element.offsetParent;
- }
- function getContainingBlock(element) {
- var isFirefox = /firefox/i.test(getUAString()), isIE2 = /Trident/i.test(getUAString());
- if (isIE2 && isHTMLElement(element)) {
- var elementCss = getComputedStyle2(element);
- if (elementCss.position === "fixed")
- return null;
- }
- var currentNode = getParentNode(element);
- for (isShadowRoot(currentNode) && (currentNode = currentNode.host); isHTMLElement(currentNode) && ["html", "body"].indexOf(getNodeName(currentNode)) < 0; ) {
- var css3 = getComputedStyle2(currentNode);
- if (css3.transform !== "none" || css3.perspective !== "none" || css3.contain === "paint" || ["transform", "perspective"].indexOf(css3.willChange) !== -1 || isFirefox && css3.willChange === "filter" || isFirefox && css3.filter && css3.filter !== "none")
- return currentNode;
- currentNode = currentNode.parentNode;
- }
- return null;
- }
- function getOffsetParent(element) {
- for (var window2 = getWindow2(element), offsetParent = getTrueOffsetParent(element); offsetParent && isTableElement(offsetParent) && getComputedStyle2(offsetParent).position === "static"; )
- offsetParent = getTrueOffsetParent(offsetParent);
- return offsetParent && (getNodeName(offsetParent) === "html" || getNodeName(offsetParent) === "body" && getComputedStyle2(offsetParent).position === "static") ? window2 : offsetParent || getContainingBlock(element) || window2;
- }
- var init_getOffsetParent = __esm({
- "../../node_modules/@popperjs/core/lib/dom-utils/getOffsetParent.js"() {
- init_getWindow();
- init_getNodeName();
- init_getComputedStyle();
- init_instanceOf();
- init_isTableElement();
- init_getParentNode();
- init_userAgent();
- }
- });
-
- // ../../node_modules/@popperjs/core/lib/utils/getMainAxisFromPlacement.js
- function getMainAxisFromPlacement(placement) {
- return ["top", "bottom"].indexOf(placement) >= 0 ? "x" : "y";
- }
- var init_getMainAxisFromPlacement = __esm({
- "../../node_modules/@popperjs/core/lib/utils/getMainAxisFromPlacement.js"() {
- }
- });
-
- // ../../node_modules/@popperjs/core/lib/utils/within.js
- function within2(min2, value, max2) {
- return max(min2, min(value, max2));
- }
- function withinMaxClamp(min2, value, max2) {
- var v = within2(min2, value, max2);
- return v > max2 ? max2 : v;
- }
- var init_within = __esm({
- "../../node_modules/@popperjs/core/lib/utils/within.js"() {
- init_math();
- }
- });
-
- // ../../node_modules/@popperjs/core/lib/utils/getFreshSideObject.js
- function getFreshSideObject() {
- return {
- top: 0,
- right: 0,
- bottom: 0,
- left: 0
- };
- }
- var init_getFreshSideObject = __esm({
- "../../node_modules/@popperjs/core/lib/utils/getFreshSideObject.js"() {
- }
- });
-
- // ../../node_modules/@popperjs/core/lib/utils/mergePaddingObject.js
- function mergePaddingObject(paddingObject) {
- return Object.assign({}, getFreshSideObject(), paddingObject);
- }
- var init_mergePaddingObject = __esm({
- "../../node_modules/@popperjs/core/lib/utils/mergePaddingObject.js"() {
- init_getFreshSideObject();
- }
- });
-
- // ../../node_modules/@popperjs/core/lib/utils/expandToHashMap.js
- function expandToHashMap(value, keys3) {
- return keys3.reduce(function(hashMap, key) {
- return hashMap[key] = value, hashMap;
- }, {});
- }
- var init_expandToHashMap = __esm({
- "../../node_modules/@popperjs/core/lib/utils/expandToHashMap.js"() {
- }
- });
-
- // ../../node_modules/@popperjs/core/lib/modifiers/arrow.js
- function arrow(_ref) {
- var _state$modifiersData$, state3 = _ref.state, name = _ref.name, options = _ref.options, arrowElement = state3.elements.arrow, popperOffsets2 = state3.modifiersData.popperOffsets, basePlacement = getBasePlacement(state3.placement), axis = getMainAxisFromPlacement(basePlacement), isVertical = [left, right].indexOf(basePlacement) >= 0, len = isVertical ? "height" : "width";
- if (!(!arrowElement || !popperOffsets2)) {
- var paddingObject = toPaddingObject(options.padding, state3), arrowRect = getLayoutRect(arrowElement), minProp = axis === "y" ? top : left, maxProp = axis === "y" ? bottom : right, endDiff = state3.rects.reference[len] + state3.rects.reference[axis] - popperOffsets2[axis] - state3.rects.popper[len], startDiff = popperOffsets2[axis] - state3.rects.reference[axis], arrowOffsetParent = getOffsetParent(arrowElement), clientSize = arrowOffsetParent ? axis === "y" ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0, centerToReference = endDiff / 2 - startDiff / 2, min2 = paddingObject[minProp], max2 = clientSize - arrowRect[len] - paddingObject[maxProp], center = clientSize / 2 - arrowRect[len] / 2 + centerToReference, offset3 = within2(min2, center, max2), axisProp = axis;
- state3.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset3, _state$modifiersData$.centerOffset = offset3 - center, _state$modifiersData$);
- }
- }
- function effect2(_ref2) {
- var state3 = _ref2.state, options = _ref2.options, _options$element = options.element, arrowElement = _options$element === void 0 ? "[data-popper-arrow]" : _options$element;
- arrowElement != null && (typeof arrowElement == "string" && (arrowElement = state3.elements.popper.querySelector(arrowElement), !arrowElement) || contains(state3.elements.popper, arrowElement) && (state3.elements.arrow = arrowElement));
- }
- var toPaddingObject, arrow_default, init_arrow = __esm({
- "../../node_modules/@popperjs/core/lib/modifiers/arrow.js"() {
- init_getBasePlacement();
- init_getLayoutRect();
- init_contains();
- init_getOffsetParent();
- init_getMainAxisFromPlacement();
- init_within();
- init_mergePaddingObject();
- init_expandToHashMap();
- init_enums();
- toPaddingObject = function(padding, state3) {
- return padding = typeof padding == "function" ? padding(Object.assign({}, state3.rects, {
- placement: state3.placement
- })) : padding, mergePaddingObject(typeof padding != "number" ? padding : expandToHashMap(padding, basePlacements));
- };
- arrow_default = {
- name: "arrow",
- enabled: !0,
- phase: "main",
- fn: arrow,
- effect: effect2,
- requires: ["popperOffsets"],
- requiresIfExists: ["preventOverflow"]
- };
- }
- });
-
- // ../../node_modules/@popperjs/core/lib/utils/getVariation.js
- function getVariation(placement) {
- return placement.split("-")[1];
- }
- var init_getVariation = __esm({
- "../../node_modules/@popperjs/core/lib/utils/getVariation.js"() {
- }
- });
-
- // ../../node_modules/@popperjs/core/lib/modifiers/computeStyles.js
- function roundOffsetsByDPR(_ref, win) {
- var x = _ref.x, y = _ref.y, dpr = win.devicePixelRatio || 1;
- return {
- x: round2(x * dpr) / dpr || 0,
- y: round2(y * dpr) / dpr || 0
- };
- }
- function mapToStyles(_ref2) {
- var _Object$assign2, popper2 = _ref2.popper, popperRect = _ref2.popperRect, placement = _ref2.placement, variation = _ref2.variation, offsets = _ref2.offsets, position2 = _ref2.position, gpuAcceleration = _ref2.gpuAcceleration, adaptive = _ref2.adaptive, roundOffsets = _ref2.roundOffsets, isFixed = _ref2.isFixed, _offsets$x = offsets.x, x = _offsets$x === void 0 ? 0 : _offsets$x, _offsets$y = offsets.y, y = _offsets$y === void 0 ? 0 : _offsets$y, _ref3 = typeof roundOffsets == "function" ? roundOffsets({
- x,
- y
- }) : {
- x,
- y
- };
- x = _ref3.x, y = _ref3.y;
- var hasX = offsets.hasOwnProperty("x"), hasY = offsets.hasOwnProperty("y"), sideX = left, sideY = top, win = window;
- if (adaptive) {
- var offsetParent = getOffsetParent(popper2), heightProp = "clientHeight", widthProp = "clientWidth";
- if (offsetParent === getWindow2(popper2) && (offsetParent = getDocumentElement(popper2), getComputedStyle2(offsetParent).position !== "static" && position2 === "absolute" && (heightProp = "scrollHeight", widthProp = "scrollWidth")), offsetParent = offsetParent, placement === top || (placement === left || placement === right) && variation === end) {
- sideY = bottom;
- var offsetY = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.height : (
- // $FlowFixMe[prop-missing]
- offsetParent[heightProp]
- );
- y -= offsetY - popperRect.height, y *= gpuAcceleration ? 1 : -1;
- }
- if (placement === left || (placement === top || placement === bottom) && variation === end) {
- sideX = right;
- var offsetX = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.width : (
- // $FlowFixMe[prop-missing]
- offsetParent[widthProp]
- );
- x -= offsetX - popperRect.width, x *= gpuAcceleration ? 1 : -1;
- }
- }
- var commonStyles = Object.assign({
- position: position2
- }, adaptive && unsetSides), _ref4 = roundOffsets === !0 ? roundOffsetsByDPR({
- x,
- y
- }, getWindow2(popper2)) : {
- x,
- y
- };
- if (x = _ref4.x, y = _ref4.y, gpuAcceleration) {
- var _Object$assign;
- return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? "0" : "", _Object$assign[sideX] = hasX ? "0" : "", _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? "translate(" + x + "px, " + y + "px)" : "translate3d(" + x + "px, " + y + "px, 0)", _Object$assign));
- }
- return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + "px" : "", _Object$assign2[sideX] = hasX ? x + "px" : "", _Object$assign2.transform = "", _Object$assign2));
- }
- function computeStyles(_ref5) {
- var state3 = _ref5.state, options = _ref5.options, _options$gpuAccelerat = options.gpuAcceleration, gpuAcceleration = _options$gpuAccelerat === void 0 ? !0 : _options$gpuAccelerat, _options$adaptive = options.adaptive, adaptive = _options$adaptive === void 0 ? !0 : _options$adaptive, _options$roundOffsets = options.roundOffsets, roundOffsets = _options$roundOffsets === void 0 ? !0 : _options$roundOffsets, commonStyles = {
- placement: getBasePlacement(state3.placement),
- variation: getVariation(state3.placement),
- popper: state3.elements.popper,
- popperRect: state3.rects.popper,
- gpuAcceleration,
- isFixed: state3.options.strategy === "fixed"
- };
- state3.modifiersData.popperOffsets != null && (state3.styles.popper = Object.assign({}, state3.styles.popper, mapToStyles(Object.assign({}, commonStyles, {
- offsets: state3.modifiersData.popperOffsets,
- position: state3.options.strategy,
- adaptive,
- roundOffsets
- })))), state3.modifiersData.arrow != null && (state3.styles.arrow = Object.assign({}, state3.styles.arrow, mapToStyles(Object.assign({}, commonStyles, {
- offsets: state3.modifiersData.arrow,
- position: "absolute",
- adaptive: !1,
- roundOffsets
- })))), state3.attributes.popper = Object.assign({}, state3.attributes.popper, {
- "data-popper-placement": state3.placement
- });
- }
- var unsetSides, computeStyles_default, init_computeStyles = __esm({
- "../../node_modules/@popperjs/core/lib/modifiers/computeStyles.js"() {
- init_enums();
- init_getOffsetParent();
- init_getWindow();
- init_getDocumentElement();
- init_getComputedStyle();
- init_getBasePlacement();
- init_getVariation();
- init_math();
- unsetSides = {
- top: "auto",
- right: "auto",
- bottom: "auto",
- left: "auto"
- };
- computeStyles_default = {
- name: "computeStyles",
- enabled: !0,
- phase: "beforeWrite",
- fn: computeStyles,
- data: {}
- };
- }
- });
-
- // ../../node_modules/@popperjs/core/lib/modifiers/eventListeners.js
- function effect3(_ref) {
- var state3 = _ref.state, instance = _ref.instance, options = _ref.options, _options$scroll = options.scroll, scroll = _options$scroll === void 0 ? !0 : _options$scroll, _options$resize = options.resize, resize = _options$resize === void 0 ? !0 : _options$resize, window2 = getWindow2(state3.elements.popper), scrollParents = [].concat(state3.scrollParents.reference, state3.scrollParents.popper);
- return scroll && scrollParents.forEach(function(scrollParent) {
- scrollParent.addEventListener("scroll", instance.update, passive);
- }), resize && window2.addEventListener("resize", instance.update, passive), function() {
- scroll && scrollParents.forEach(function(scrollParent) {
- scrollParent.removeEventListener("scroll", instance.update, passive);
- }), resize && window2.removeEventListener("resize", instance.update, passive);
- };
- }
- var passive, eventListeners_default, init_eventListeners = __esm({
- "../../node_modules/@popperjs/core/lib/modifiers/eventListeners.js"() {
- init_getWindow();
- passive = {
- passive: !0
- };
- eventListeners_default = {
- name: "eventListeners",
- enabled: !0,
- phase: "write",
- fn: function() {
- },
- effect: effect3,
- data: {}
- };
- }
- });
-
- // ../../node_modules/@popperjs/core/lib/utils/getOppositePlacement.js
- function getOppositePlacement(placement) {
- return placement.replace(/left|right|bottom|top/g, function(matched) {
- return hash2[matched];
- });
- }
- var hash2, init_getOppositePlacement = __esm({
- "../../node_modules/@popperjs/core/lib/utils/getOppositePlacement.js"() {
- hash2 = {
- left: "right",
- right: "left",
- bottom: "top",
- top: "bottom"
- };
- }
- });
-
- // ../../node_modules/@popperjs/core/lib/utils/getOppositeVariationPlacement.js
- function getOppositeVariationPlacement(placement) {
- return placement.replace(/start|end/g, function(matched) {
- return hash3[matched];
- });
- }
- var hash3, init_getOppositeVariationPlacement = __esm({
- "../../node_modules/@popperjs/core/lib/utils/getOppositeVariationPlacement.js"() {
- hash3 = {
- start: "end",
- end: "start"
- };
- }
- });
-
- // ../../node_modules/@popperjs/core/lib/dom-utils/getWindowScroll.js
- function getWindowScroll(node2) {
- var win = getWindow2(node2), scrollLeft = win.pageXOffset, scrollTop = win.pageYOffset;
- return {
- scrollLeft,
- scrollTop
- };
- }
- var init_getWindowScroll = __esm({
- "../../node_modules/@popperjs/core/lib/dom-utils/getWindowScroll.js"() {
- init_getWindow();
- }
- });
-
- // ../../node_modules/@popperjs/core/lib/dom-utils/getWindowScrollBarX.js
- function getWindowScrollBarX(element) {
- return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft;
- }
- var init_getWindowScrollBarX = __esm({
- "../../node_modules/@popperjs/core/lib/dom-utils/getWindowScrollBarX.js"() {
- init_getBoundingClientRect();
- init_getDocumentElement();
- init_getWindowScroll();
- }
- });
-
- // ../../node_modules/@popperjs/core/lib/dom-utils/getViewportRect.js
- function getViewportRect(element, strategy) {
- var win = getWindow2(element), html = getDocumentElement(element), visualViewport = win.visualViewport, width = html.clientWidth, height = html.clientHeight, x = 0, y = 0;
- if (visualViewport) {
- width = visualViewport.width, height = visualViewport.height;
- var layoutViewport = isLayoutViewport();
- (layoutViewport || !layoutViewport && strategy === "fixed") && (x = visualViewport.offsetLeft, y = visualViewport.offsetTop);
- }
- return {
- width,
- height,
- x: x + getWindowScrollBarX(element),
- y
- };
- }
- var init_getViewportRect = __esm({
- "../../node_modules/@popperjs/core/lib/dom-utils/getViewportRect.js"() {
- init_getWindow();
- init_getDocumentElement();
- init_getWindowScrollBarX();
- init_isLayoutViewport();
- }
- });
-
- // ../../node_modules/@popperjs/core/lib/dom-utils/getDocumentRect.js
- function getDocumentRect(element) {
- var _element$ownerDocumen, html = getDocumentElement(element), winScroll = getWindowScroll(element), body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body, width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0), height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0), x = -winScroll.scrollLeft + getWindowScrollBarX(element), y = -winScroll.scrollTop;
- return getComputedStyle2(body || html).direction === "rtl" && (x += max(html.clientWidth, body ? body.clientWidth : 0) - width), {
- width,
- height,
- x,
- y
- };
- }
- var init_getDocumentRect = __esm({
- "../../node_modules/@popperjs/core/lib/dom-utils/getDocumentRect.js"() {
- init_getDocumentElement();
- init_getComputedStyle();
- init_getWindowScrollBarX();
- init_getWindowScroll();
- init_math();
- }
- });
-
- // ../../node_modules/@popperjs/core/lib/dom-utils/isScrollParent.js
- function isScrollParent(element) {
- var _getComputedStyle = getComputedStyle2(element), overflow = _getComputedStyle.overflow, overflowX = _getComputedStyle.overflowX, overflowY = _getComputedStyle.overflowY;
- return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);
- }
- var init_isScrollParent = __esm({
- "../../node_modules/@popperjs/core/lib/dom-utils/isScrollParent.js"() {
- init_getComputedStyle();
- }
- });
-
- // ../../node_modules/@popperjs/core/lib/dom-utils/getScrollParent.js
- function getScrollParent(node2) {
- return ["html", "body", "#document"].indexOf(getNodeName(node2)) >= 0 ? node2.ownerDocument.body : isHTMLElement(node2) && isScrollParent(node2) ? node2 : getScrollParent(getParentNode(node2));
- }
- var init_getScrollParent = __esm({
- "../../node_modules/@popperjs/core/lib/dom-utils/getScrollParent.js"() {
- init_getParentNode();
- init_isScrollParent();
- init_getNodeName();
- init_instanceOf();
- }
- });
-
- // ../../node_modules/@popperjs/core/lib/dom-utils/listScrollParents.js
- function listScrollParents(element, list) {
- var _element$ownerDocumen;
- list === void 0 && (list = []);
- var scrollParent = getScrollParent(element), isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body), win = getWindow2(scrollParent), target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent, updatedList = list.concat(target);
- return isBody ? updatedList : (
- // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
- updatedList.concat(listScrollParents(getParentNode(target)))
- );
- }
- var init_listScrollParents = __esm({
- "../../node_modules/@popperjs/core/lib/dom-utils/listScrollParents.js"() {
- init_getScrollParent();
- init_getParentNode();
- init_getWindow();
- init_isScrollParent();
- }
- });
-
- // ../../node_modules/@popperjs/core/lib/utils/rectToClientRect.js
- function rectToClientRect(rect) {
- return Object.assign({}, rect, {
- left: rect.x,
- top: rect.y,
- right: rect.x + rect.width,
- bottom: rect.y + rect.height
- });
- }
- var init_rectToClientRect = __esm({
- "../../node_modules/@popperjs/core/lib/utils/rectToClientRect.js"() {
- }
- });
-
- // ../../node_modules/@popperjs/core/lib/dom-utils/getClippingRect.js
- function getInnerBoundingClientRect(element, strategy) {
- var rect = getBoundingClientRect(element, !1, strategy === "fixed");
- return rect.top = rect.top + element.clientTop, rect.left = rect.left + element.clientLeft, rect.bottom = rect.top + element.clientHeight, rect.right = rect.left + element.clientWidth, rect.width = element.clientWidth, rect.height = element.clientHeight, rect.x = rect.left, rect.y = rect.top, rect;
- }
- function getClientRectFromMixedType(element, clippingParent, strategy) {
- return clippingParent === viewport ? rectToClientRect(getViewportRect(element, strategy)) : isElement5(clippingParent) ? getInnerBoundingClientRect(clippingParent, strategy) : rectToClientRect(getDocumentRect(getDocumentElement(element)));
- }
- function getClippingParents(element) {
- var clippingParents2 = listScrollParents(getParentNode(element)), canEscapeClipping = ["absolute", "fixed"].indexOf(getComputedStyle2(element).position) >= 0, clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;
- return isElement5(clipperElement) ? clippingParents2.filter(function(clippingParent) {
- return isElement5(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== "body";
- }) : [];
- }
- function getClippingRect(element, boundary, rootBoundary, strategy) {
- var mainClippingParents = boundary === "clippingParents" ? getClippingParents(element) : [].concat(boundary), clippingParents2 = [].concat(mainClippingParents, [rootBoundary]), firstClippingParent = clippingParents2[0], clippingRect = clippingParents2.reduce(function(accRect, clippingParent) {
- var rect = getClientRectFromMixedType(element, clippingParent, strategy);
- return accRect.top = max(rect.top, accRect.top), accRect.right = min(rect.right, accRect.right), accRect.bottom = min(rect.bottom, accRect.bottom), accRect.left = max(rect.left, accRect.left), accRect;
- }, getClientRectFromMixedType(element, firstClippingParent, strategy));
- return clippingRect.width = clippingRect.right - clippingRect.left, clippingRect.height = clippingRect.bottom - clippingRect.top, clippingRect.x = clippingRect.left, clippingRect.y = clippingRect.top, clippingRect;
- }
- var init_getClippingRect = __esm({
- "../../node_modules/@popperjs/core/lib/dom-utils/getClippingRect.js"() {
- init_enums();
- init_getViewportRect();
- init_getDocumentRect();
- init_listScrollParents();
- init_getOffsetParent();
- init_getDocumentElement();
- init_getComputedStyle();
- init_instanceOf();
- init_getBoundingClientRect();
- init_getParentNode();
- init_contains();
- init_getNodeName();
- init_rectToClientRect();
- init_math();
- }
- });
-
- // ../../node_modules/@popperjs/core/lib/utils/computeOffsets.js
- function computeOffsets(_ref) {
- var reference2 = _ref.reference, element = _ref.element, placement = _ref.placement, basePlacement = placement ? getBasePlacement(placement) : null, variation = placement ? getVariation(placement) : null, commonX = reference2.x + reference2.width / 2 - element.width / 2, commonY = reference2.y + reference2.height / 2 - element.height / 2, offsets;
- switch (basePlacement) {
- case top:
- offsets = {
- x: commonX,
- y: reference2.y - element.height
- };
- break;
- case bottom:
- offsets = {
- x: commonX,
- y: reference2.y + reference2.height
- };
- break;
- case right:
- offsets = {
- x: reference2.x + reference2.width,
- y: commonY
- };
- break;
- case left:
- offsets = {
- x: reference2.x - element.width,
- y: commonY
- };
- break;
- default:
- offsets = {
- x: reference2.x,
- y: reference2.y
- };
- }
- var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null;
- if (mainAxis != null) {
- var len = mainAxis === "y" ? "height" : "width";
- switch (variation) {
- case start:
- offsets[mainAxis] = offsets[mainAxis] - (reference2[len] / 2 - element[len] / 2);
- break;
- case end:
- offsets[mainAxis] = offsets[mainAxis] + (reference2[len] / 2 - element[len] / 2);
- break;
- default:
- }
- }
- return offsets;
- }
- var init_computeOffsets = __esm({
- "../../node_modules/@popperjs/core/lib/utils/computeOffsets.js"() {
- init_getBasePlacement();
- init_getVariation();
- init_getMainAxisFromPlacement();
- init_enums();
- }
- });
-
- // ../../node_modules/@popperjs/core/lib/utils/detectOverflow.js
- function detectOverflow(state3, options) {
- options === void 0 && (options = {});
- var _options = options, _options$placement = _options.placement, placement = _options$placement === void 0 ? state3.placement : _options$placement, _options$strategy = _options.strategy, strategy = _options$strategy === void 0 ? state3.strategy : _options$strategy, _options$boundary = _options.boundary, boundary = _options$boundary === void 0 ? clippingParents : _options$boundary, _options$rootBoundary = _options.rootBoundary, rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary, _options$elementConte = _options.elementContext, elementContext = _options$elementConte === void 0 ? popper : _options$elementConte, _options$altBoundary = _options.altBoundary, altBoundary = _options$altBoundary === void 0 ? !1 : _options$altBoundary, _options$padding = _options.padding, padding = _options$padding === void 0 ? 0 : _options$padding, paddingObject = mergePaddingObject(typeof padding != "number" ? padding : expandToHashMap(padding, basePlacements)), altContext = elementContext === popper ? reference : popper, popperRect = state3.rects.popper, element = state3.elements[altBoundary ? altContext : elementContext], clippingClientRect = getClippingRect(isElement5(element) ? element : element.contextElement || getDocumentElement(state3.elements.popper), boundary, rootBoundary, strategy), referenceClientRect = getBoundingClientRect(state3.elements.reference), popperOffsets2 = computeOffsets({
- reference: referenceClientRect,
- element: popperRect,
- strategy: "absolute",
- placement
- }), popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets2)), elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect, overflowOffsets = {
- top: clippingClientRect.top - elementClientRect.top + paddingObject.top,
- bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,
- left: clippingClientRect.left - elementClientRect.left + paddingObject.left,
- right: elementClientRect.right - clippingClientRect.right + paddingObject.right
- }, offsetData = state3.modifiersData.offset;
- if (elementContext === popper && offsetData) {
- var offset3 = offsetData[placement];
- Object.keys(overflowOffsets).forEach(function(key) {
- var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1, axis = [top, bottom].indexOf(key) >= 0 ? "y" : "x";
- overflowOffsets[key] += offset3[axis] * multiply;
- });
- }
- return overflowOffsets;
- }
- var init_detectOverflow = __esm({
- "../../node_modules/@popperjs/core/lib/utils/detectOverflow.js"() {
- init_getClippingRect();
- init_getDocumentElement();
- init_getBoundingClientRect();
- init_computeOffsets();
- init_rectToClientRect();
- init_enums();
- init_instanceOf();
- init_mergePaddingObject();
- init_expandToHashMap();
- }
- });
-
- // ../../node_modules/@popperjs/core/lib/utils/computeAutoPlacement.js
- function computeAutoPlacement(state3, options) {
- options === void 0 && (options = {});
- var _options = options, placement = _options.placement, boundary = _options.boundary, rootBoundary = _options.rootBoundary, padding = _options.padding, flipVariations = _options.flipVariations, _options$allowedAutoP = _options.allowedAutoPlacements, allowedAutoPlacements = _options$allowedAutoP === void 0 ? placements : _options$allowedAutoP, variation = getVariation(placement), placements2 = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function(placement2) {
- return getVariation(placement2) === variation;
- }) : basePlacements, allowedPlacements = placements2.filter(function(placement2) {
- return allowedAutoPlacements.indexOf(placement2) >= 0;
- });
- allowedPlacements.length === 0 && (allowedPlacements = placements2);
- var overflows = allowedPlacements.reduce(function(acc, placement2) {
- return acc[placement2] = detectOverflow(state3, {
- placement: placement2,
- boundary,
- rootBoundary,
- padding
- })[getBasePlacement(placement2)], acc;
- }, {});
- return Object.keys(overflows).sort(function(a3, b) {
- return overflows[a3] - overflows[b];
- });
- }
- var init_computeAutoPlacement = __esm({
- "../../node_modules/@popperjs/core/lib/utils/computeAutoPlacement.js"() {
- init_getVariation();
- init_enums();
- init_detectOverflow();
- init_getBasePlacement();
- }
- });
-
- // ../../node_modules/@popperjs/core/lib/modifiers/flip.js
- function getExpandedFallbackPlacements(placement) {
- if (getBasePlacement(placement) === auto)
- return [];
- var oppositePlacement = getOppositePlacement(placement);
- return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)];
- }
- function flip(_ref) {
- var state3 = _ref.state, options = _ref.options, name = _ref.name;
- if (!state3.modifiersData[name]._skip) {
- for (var _options$mainAxis = options.mainAxis, checkMainAxis = _options$mainAxis === void 0 ? !0 : _options$mainAxis, _options$altAxis = options.altAxis, checkAltAxis = _options$altAxis === void 0 ? !0 : _options$altAxis, specifiedFallbackPlacements = options.fallbackPlacements, padding = options.padding, boundary = options.boundary, rootBoundary = options.rootBoundary, altBoundary = options.altBoundary, _options$flipVariatio = options.flipVariations, flipVariations = _options$flipVariatio === void 0 ? !0 : _options$flipVariatio, allowedAutoPlacements = options.allowedAutoPlacements, preferredPlacement = state3.options.placement, basePlacement = getBasePlacement(preferredPlacement), isBasePlacement = basePlacement === preferredPlacement, fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement)), placements2 = [preferredPlacement].concat(fallbackPlacements).reduce(function(acc, placement2) {
- return acc.concat(getBasePlacement(placement2) === auto ? computeAutoPlacement(state3, {
- placement: placement2,
- boundary,
- rootBoundary,
- padding,
- flipVariations,
- allowedAutoPlacements
- }) : placement2);
- }, []), referenceRect = state3.rects.reference, popperRect = state3.rects.popper, checksMap = /* @__PURE__ */ new Map(), makeFallbackChecks = !0, firstFittingPlacement = placements2[0], i = 0; i < placements2.length; i++) {
- var placement = placements2[i], _basePlacement = getBasePlacement(placement), isStartVariation = getVariation(placement) === start, isVertical = [top, bottom].indexOf(_basePlacement) >= 0, len = isVertical ? "width" : "height", overflow = detectOverflow(state3, {
- placement,
- boundary,
- rootBoundary,
- altBoundary,
- padding
- }), mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : top;
- referenceRect[len] > popperRect[len] && (mainVariationSide = getOppositePlacement(mainVariationSide));
- var altVariationSide = getOppositePlacement(mainVariationSide), checks = [];
- if (checkMainAxis && checks.push(overflow[_basePlacement] <= 0), checkAltAxis && checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0), checks.every(function(check) {
- return check;
- })) {
- firstFittingPlacement = placement, makeFallbackChecks = !1;
- break;
- }
- checksMap.set(placement, checks);
- }
- if (makeFallbackChecks)
- for (var numberOfChecks = flipVariations ? 3 : 1, _loop = function(_i2) {
- var fittingPlacement = placements2.find(function(placement2) {
- var checks2 = checksMap.get(placement2);
- if (checks2)
- return checks2.slice(0, _i2).every(function(check) {
- return check;
- });
- });
- if (fittingPlacement)
- return firstFittingPlacement = fittingPlacement, "break";
- }, _i = numberOfChecks; _i > 0; _i--) {
- var _ret = _loop(_i);
- if (_ret === "break") break;
- }
- state3.placement !== firstFittingPlacement && (state3.modifiersData[name]._skip = !0, state3.placement = firstFittingPlacement, state3.reset = !0);
- }
- }
- var flip_default, init_flip = __esm({
- "../../node_modules/@popperjs/core/lib/modifiers/flip.js"() {
- init_getOppositePlacement();
- init_getBasePlacement();
- init_getOppositeVariationPlacement();
- init_detectOverflow();
- init_computeAutoPlacement();
- init_enums();
- init_getVariation();
- flip_default = {
- name: "flip",
- enabled: !0,
- phase: "main",
- fn: flip,
- requiresIfExists: ["offset"],
- data: {
- _skip: !1
- }
- };
- }
- });
-
- // ../../node_modules/@popperjs/core/lib/modifiers/hide.js
- function getSideOffsets(overflow, rect, preventedOffsets) {
- return preventedOffsets === void 0 && (preventedOffsets = {
- x: 0,
- y: 0
- }), {
- top: overflow.top - rect.height - preventedOffsets.y,
- right: overflow.right - rect.width + preventedOffsets.x,
- bottom: overflow.bottom - rect.height + preventedOffsets.y,
- left: overflow.left - rect.width - preventedOffsets.x
- };
- }
- function isAnySideFullyClipped(overflow) {
- return [top, right, bottom, left].some(function(side) {
- return overflow[side] >= 0;
- });
- }
- function hide(_ref) {
- var state3 = _ref.state, name = _ref.name, referenceRect = state3.rects.reference, popperRect = state3.rects.popper, preventedOffsets = state3.modifiersData.preventOverflow, referenceOverflow = detectOverflow(state3, {
- elementContext: "reference"
- }), popperAltOverflow = detectOverflow(state3, {
- altBoundary: !0
- }), referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect), popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets), isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets), hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets);
- state3.modifiersData[name] = {
- referenceClippingOffsets,
- popperEscapeOffsets,
- isReferenceHidden,
- hasPopperEscaped
- }, state3.attributes.popper = Object.assign({}, state3.attributes.popper, {
- "data-popper-reference-hidden": isReferenceHidden,
- "data-popper-escaped": hasPopperEscaped
- });
- }
- var hide_default, init_hide = __esm({
- "../../node_modules/@popperjs/core/lib/modifiers/hide.js"() {
- init_enums();
- init_detectOverflow();
- hide_default = {
- name: "hide",
- enabled: !0,
- phase: "main",
- requiresIfExists: ["preventOverflow"],
- fn: hide
- };
- }
- });
-
- // ../../node_modules/@popperjs/core/lib/modifiers/offset.js
- function distanceAndSkiddingToXY(placement, rects, offset3) {
- var basePlacement = getBasePlacement(placement), invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1, _ref = typeof offset3 == "function" ? offset3(Object.assign({}, rects, {
- placement
- })) : offset3, skidding = _ref[0], distance = _ref[1];
- return skidding = skidding || 0, distance = (distance || 0) * invertDistance, [left, right].indexOf(basePlacement) >= 0 ? {
- x: distance,
- y: skidding
- } : {
- x: skidding,
- y: distance
- };
- }
- function offset2(_ref2) {
- var state3 = _ref2.state, options = _ref2.options, name = _ref2.name, _options$offset = options.offset, offset3 = _options$offset === void 0 ? [0, 0] : _options$offset, data = placements.reduce(function(acc, placement) {
- return acc[placement] = distanceAndSkiddingToXY(placement, state3.rects, offset3), acc;
- }, {}), _data$state$placement = data[state3.placement], x = _data$state$placement.x, y = _data$state$placement.y;
- state3.modifiersData.popperOffsets != null && (state3.modifiersData.popperOffsets.x += x, state3.modifiersData.popperOffsets.y += y), state3.modifiersData[name] = data;
- }
- var offset_default, init_offset = __esm({
- "../../node_modules/@popperjs/core/lib/modifiers/offset.js"() {
- init_getBasePlacement();
- init_enums();
- offset_default = {
- name: "offset",
- enabled: !0,
- phase: "main",
- requires: ["popperOffsets"],
- fn: offset2
- };
- }
- });
-
- // ../../node_modules/@popperjs/core/lib/modifiers/popperOffsets.js
- function popperOffsets(_ref) {
- var state3 = _ref.state, name = _ref.name;
- state3.modifiersData[name] = computeOffsets({
- reference: state3.rects.reference,
- element: state3.rects.popper,
- strategy: "absolute",
- placement: state3.placement
- });
- }
- var popperOffsets_default, init_popperOffsets = __esm({
- "../../node_modules/@popperjs/core/lib/modifiers/popperOffsets.js"() {
- init_computeOffsets();
- popperOffsets_default = {
- name: "popperOffsets",
- enabled: !0,
- phase: "read",
- fn: popperOffsets,
- data: {}
- };
- }
- });
-
- // ../../node_modules/@popperjs/core/lib/utils/getAltAxis.js
- function getAltAxis(axis) {
- return axis === "x" ? "y" : "x";
- }
- var init_getAltAxis = __esm({
- "../../node_modules/@popperjs/core/lib/utils/getAltAxis.js"() {
- }
- });
-
- // ../../node_modules/@popperjs/core/lib/modifiers/preventOverflow.js
- function preventOverflow(_ref) {
- var state3 = _ref.state, options = _ref.options, name = _ref.name, _options$mainAxis = options.mainAxis, checkMainAxis = _options$mainAxis === void 0 ? !0 : _options$mainAxis, _options$altAxis = options.altAxis, checkAltAxis = _options$altAxis === void 0 ? !1 : _options$altAxis, boundary = options.boundary, rootBoundary = options.rootBoundary, altBoundary = options.altBoundary, padding = options.padding, _options$tether = options.tether, tether = _options$tether === void 0 ? !0 : _options$tether, _options$tetherOffset = options.tetherOffset, tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset, overflow = detectOverflow(state3, {
- boundary,
- rootBoundary,
- padding,
- altBoundary
- }), basePlacement = getBasePlacement(state3.placement), variation = getVariation(state3.placement), isBasePlacement = !variation, mainAxis = getMainAxisFromPlacement(basePlacement), altAxis = getAltAxis(mainAxis), popperOffsets2 = state3.modifiersData.popperOffsets, referenceRect = state3.rects.reference, popperRect = state3.rects.popper, tetherOffsetValue = typeof tetherOffset == "function" ? tetherOffset(Object.assign({}, state3.rects, {
- placement: state3.placement
- })) : tetherOffset, normalizedTetherOffsetValue = typeof tetherOffsetValue == "number" ? {
- mainAxis: tetherOffsetValue,
- altAxis: tetherOffsetValue
- } : Object.assign({
- mainAxis: 0,
- altAxis: 0
- }, tetherOffsetValue), offsetModifierState = state3.modifiersData.offset ? state3.modifiersData.offset[state3.placement] : null, data = {
- x: 0,
- y: 0
- };
- if (popperOffsets2) {
- if (checkMainAxis) {
- var _offsetModifierState$, mainSide = mainAxis === "y" ? top : left, altSide = mainAxis === "y" ? bottom : right, len = mainAxis === "y" ? "height" : "width", offset3 = popperOffsets2[mainAxis], min2 = offset3 + overflow[mainSide], max2 = offset3 - overflow[altSide], additive = tether ? -popperRect[len] / 2 : 0, minLen = variation === start ? referenceRect[len] : popperRect[len], maxLen = variation === start ? -popperRect[len] : -referenceRect[len], arrowElement = state3.elements.arrow, arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : {
- width: 0,
- height: 0
- }, arrowPaddingObject = state3.modifiersData["arrow#persistent"] ? state3.modifiersData["arrow#persistent"].padding : getFreshSideObject(), arrowPaddingMin = arrowPaddingObject[mainSide], arrowPaddingMax = arrowPaddingObject[altSide], arrowLen = within2(0, referenceRect[len], arrowRect[len]), minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis, maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis, arrowOffsetParent = state3.elements.arrow && getOffsetParent(state3.elements.arrow), clientOffset = arrowOffsetParent ? mainAxis === "y" ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0, offsetModifierValue = (_offsetModifierState$ = offsetModifierState?.[mainAxis]) != null ? _offsetModifierState$ : 0, tetherMin = offset3 + minOffset - offsetModifierValue - clientOffset, tetherMax = offset3 + maxOffset - offsetModifierValue, preventedOffset = within2(tether ? min(min2, tetherMin) : min2, offset3, tether ? max(max2, tetherMax) : max2);
- popperOffsets2[mainAxis] = preventedOffset, data[mainAxis] = preventedOffset - offset3;
- }
- if (checkAltAxis) {
- var _offsetModifierState$2, _mainSide = mainAxis === "x" ? top : left, _altSide = mainAxis === "x" ? bottom : right, _offset = popperOffsets2[altAxis], _len = altAxis === "y" ? "height" : "width", _min = _offset + overflow[_mainSide], _max = _offset - overflow[_altSide], isOriginSide = [top, left].indexOf(basePlacement) !== -1, _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState?.[altAxis]) != null ? _offsetModifierState$2 : 0, _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis, _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max, _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within2(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max);
- popperOffsets2[altAxis] = _preventedOffset, data[altAxis] = _preventedOffset - _offset;
- }
- state3.modifiersData[name] = data;
- }
- }
- var preventOverflow_default, init_preventOverflow = __esm({
- "../../node_modules/@popperjs/core/lib/modifiers/preventOverflow.js"() {
- init_enums();
- init_getBasePlacement();
- init_getMainAxisFromPlacement();
- init_getAltAxis();
- init_within();
- init_getLayoutRect();
- init_getOffsetParent();
- init_detectOverflow();
- init_getVariation();
- init_getFreshSideObject();
- init_math();
- preventOverflow_default = {
- name: "preventOverflow",
- enabled: !0,
- phase: "main",
- fn: preventOverflow,
- requiresIfExists: ["offset"]
- };
- }
- });
-
- // ../../node_modules/@popperjs/core/lib/modifiers/index.js
- var init_modifiers = __esm({
- "../../node_modules/@popperjs/core/lib/modifiers/index.js"() {
- init_applyStyles();
- init_arrow();
- init_computeStyles();
- init_eventListeners();
- init_flip();
- init_hide();
- init_offset();
- init_popperOffsets();
- init_preventOverflow();
- }
- });
-
- // ../../node_modules/@popperjs/core/lib/dom-utils/getHTMLElementScroll.js
- function getHTMLElementScroll(element) {
- return {
- scrollLeft: element.scrollLeft,
- scrollTop: element.scrollTop
- };
- }
- var init_getHTMLElementScroll = __esm({
- "../../node_modules/@popperjs/core/lib/dom-utils/getHTMLElementScroll.js"() {
- }
- });
-
- // ../../node_modules/@popperjs/core/lib/dom-utils/getNodeScroll.js
- function getNodeScroll(node2) {
- return node2 === getWindow2(node2) || !isHTMLElement(node2) ? getWindowScroll(node2) : getHTMLElementScroll(node2);
- }
- var init_getNodeScroll = __esm({
- "../../node_modules/@popperjs/core/lib/dom-utils/getNodeScroll.js"() {
- init_getWindowScroll();
- init_getWindow();
- init_instanceOf();
- init_getHTMLElementScroll();
- }
- });
-
- // ../../node_modules/@popperjs/core/lib/dom-utils/getCompositeRect.js
- function isElementScaled(element) {
- var rect = element.getBoundingClientRect(), scaleX = round2(rect.width) / element.offsetWidth || 1, scaleY = round2(rect.height) / element.offsetHeight || 1;
- return scaleX !== 1 || scaleY !== 1;
- }
- function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {
- isFixed === void 0 && (isFixed = !1);
- var isOffsetParentAnElement = isHTMLElement(offsetParent), offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent), documentElement = getDocumentElement(offsetParent), rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled, isFixed), scroll = {
- scrollLeft: 0,
- scrollTop: 0
- }, offsets = {
- x: 0,
- y: 0
- };
- return (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) && ((getNodeName(offsetParent) !== "body" || // https://github.com/popperjs/popper-core/issues/1078
- isScrollParent(documentElement)) && (scroll = getNodeScroll(offsetParent)), isHTMLElement(offsetParent) ? (offsets = getBoundingClientRect(offsetParent, !0), offsets.x += offsetParent.clientLeft, offsets.y += offsetParent.clientTop) : documentElement && (offsets.x = getWindowScrollBarX(documentElement))), {
- x: rect.left + scroll.scrollLeft - offsets.x,
- y: rect.top + scroll.scrollTop - offsets.y,
- width: rect.width,
- height: rect.height
- };
- }
- var init_getCompositeRect = __esm({
- "../../node_modules/@popperjs/core/lib/dom-utils/getCompositeRect.js"() {
- init_getBoundingClientRect();
- init_getNodeScroll();
- init_getNodeName();
- init_instanceOf();
- init_getWindowScrollBarX();
- init_getDocumentElement();
- init_isScrollParent();
- init_math();
- }
- });
-
- // ../../node_modules/@popperjs/core/lib/utils/orderModifiers.js
- function order(modifiers) {
- var map2 = /* @__PURE__ */ new Map(), visited = /* @__PURE__ */ new Set(), result = [];
- modifiers.forEach(function(modifier) {
- map2.set(modifier.name, modifier);
- });
- function sort(modifier) {
- visited.add(modifier.name);
- var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);
- requires.forEach(function(dep) {
- if (!visited.has(dep)) {
- var depModifier = map2.get(dep);
- depModifier && sort(depModifier);
- }
- }), result.push(modifier);
- }
- return modifiers.forEach(function(modifier) {
- visited.has(modifier.name) || sort(modifier);
- }), result;
- }
- function orderModifiers(modifiers) {
- var orderedModifiers = order(modifiers);
- return modifierPhases.reduce(function(acc, phase) {
- return acc.concat(orderedModifiers.filter(function(modifier) {
- return modifier.phase === phase;
- }));
- }, []);
- }
- var init_orderModifiers = __esm({
- "../../node_modules/@popperjs/core/lib/utils/orderModifiers.js"() {
- init_enums();
- }
- });
-
- // ../../node_modules/@popperjs/core/lib/utils/debounce.js
- function debounce(fn4) {
- var pending;
- return function() {
- return pending || (pending = new Promise(function(resolve) {
- Promise.resolve().then(function() {
- pending = void 0, resolve(fn4());
- });
- })), pending;
- };
- }
- var init_debounce = __esm({
- "../../node_modules/@popperjs/core/lib/utils/debounce.js"() {
- }
- });
-
- // ../../node_modules/@popperjs/core/lib/utils/mergeByName.js
- function mergeByName(modifiers) {
- var merged = modifiers.reduce(function(merged2, current) {
- var existing = merged2[current.name];
- return merged2[current.name] = existing ? Object.assign({}, existing, current, {
- options: Object.assign({}, existing.options, current.options),
- data: Object.assign({}, existing.data, current.data)
- }) : current, merged2;
- }, {});
- return Object.keys(merged).map(function(key) {
- return merged[key];
- });
- }
- var init_mergeByName = __esm({
- "../../node_modules/@popperjs/core/lib/utils/mergeByName.js"() {
- }
- });
-
- // ../../node_modules/@popperjs/core/lib/createPopper.js
- function areValidElements() {
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++)
- args[_key] = arguments[_key];
- return !args.some(function(element) {
- return !(element && typeof element.getBoundingClientRect == "function");
- });
- }
- function popperGenerator(generatorOptions) {
- generatorOptions === void 0 && (generatorOptions = {});
- var _generatorOptions = generatorOptions, _generatorOptions$def = _generatorOptions.defaultModifiers, defaultModifiers3 = _generatorOptions$def === void 0 ? [] : _generatorOptions$def, _generatorOptions$def2 = _generatorOptions.defaultOptions, defaultOptions2 = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS2 : _generatorOptions$def2;
- return function(reference2, popper2, options) {
- options === void 0 && (options = defaultOptions2);
- var state3 = {
- placement: "bottom",
- orderedModifiers: [],
- options: Object.assign({}, DEFAULT_OPTIONS2, defaultOptions2),
- modifiersData: {},
- elements: {
- reference: reference2,
- popper: popper2
- },
- attributes: {},
- styles: {}
- }, effectCleanupFns = [], isDestroyed = !1, instance = {
- state: state3,
- setOptions: function(setOptionsAction) {
- var options2 = typeof setOptionsAction == "function" ? setOptionsAction(state3.options) : setOptionsAction;
- cleanupModifierEffects(), state3.options = Object.assign({}, defaultOptions2, state3.options, options2), state3.scrollParents = {
- reference: isElement5(reference2) ? listScrollParents(reference2) : reference2.contextElement ? listScrollParents(reference2.contextElement) : [],
- popper: listScrollParents(popper2)
- };
- var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers3, state3.options.modifiers)));
- return state3.orderedModifiers = orderedModifiers.filter(function(m3) {
- return m3.enabled;
- }), runModifierEffects(), instance.update();
- },
- // Sync update – it will always be executed, even if not necessary. This
- // is useful for low frequency updates where sync behavior simplifies the
- // logic.
- // For high frequency updates (e.g. `resize` and `scroll` events), always
- // prefer the async Popper#update method
- forceUpdate: function() {
- if (!isDestroyed) {
- var _state$elements = state3.elements, reference3 = _state$elements.reference, popper3 = _state$elements.popper;
- if (areValidElements(reference3, popper3)) {
- state3.rects = {
- reference: getCompositeRect(reference3, getOffsetParent(popper3), state3.options.strategy === "fixed"),
- popper: getLayoutRect(popper3)
- }, state3.reset = !1, state3.placement = state3.options.placement, state3.orderedModifiers.forEach(function(modifier) {
- return state3.modifiersData[modifier.name] = Object.assign({}, modifier.data);
- });
- for (var index4 = 0; index4 < state3.orderedModifiers.length; index4++) {
- if (state3.reset === !0) {
- state3.reset = !1, index4 = -1;
- continue;
- }
- var _state$orderedModifie = state3.orderedModifiers[index4], fn4 = _state$orderedModifie.fn, _state$orderedModifie2 = _state$orderedModifie.options, _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2, name = _state$orderedModifie.name;
- typeof fn4 == "function" && (state3 = fn4({
- state: state3,
- options: _options,
- name,
- instance
- }) || state3);
- }
- }
- }
- },
- // Async and optimistically optimized update – it will not be executed if
- // not necessary (debounced to run at most once-per-tick)
- update: debounce(function() {
- return new Promise(function(resolve) {
- instance.forceUpdate(), resolve(state3);
- });
- }),
- destroy: function() {
- cleanupModifierEffects(), isDestroyed = !0;
- }
- };
- if (!areValidElements(reference2, popper2))
- return instance;
- instance.setOptions(options).then(function(state4) {
- !isDestroyed && options.onFirstUpdate && options.onFirstUpdate(state4);
- });
- function runModifierEffects() {
- state3.orderedModifiers.forEach(function(_ref) {
- var name = _ref.name, _ref$options = _ref.options, options2 = _ref$options === void 0 ? {} : _ref$options, effect4 = _ref.effect;
- if (typeof effect4 == "function") {
- var cleanupFn = effect4({
- state: state3,
- name,
- instance,
- options: options2
- }), noopFn = function() {
- };
- effectCleanupFns.push(cleanupFn || noopFn);
- }
- });
- }
- function cleanupModifierEffects() {
- effectCleanupFns.forEach(function(fn4) {
- return fn4();
- }), effectCleanupFns = [];
- }
- return instance;
- };
- }
- var DEFAULT_OPTIONS2, createPopper, init_createPopper = __esm({
- "../../node_modules/@popperjs/core/lib/createPopper.js"() {
- init_getCompositeRect();
- init_getLayoutRect();
- init_listScrollParents();
- init_getOffsetParent();
- init_orderModifiers();
- init_debounce();
- init_mergeByName();
- init_detectOverflow();
- init_instanceOf();
- DEFAULT_OPTIONS2 = {
- placement: "bottom",
- modifiers: [],
- strategy: "absolute"
- };
- createPopper = popperGenerator();
- }
- });
-
- // ../../node_modules/@popperjs/core/lib/popper-lite.js
- var defaultModifiers, createPopper2, init_popper_lite = __esm({
- "../../node_modules/@popperjs/core/lib/popper-lite.js"() {
- init_createPopper();
- init_eventListeners();
- init_popperOffsets();
- init_computeStyles();
- init_applyStyles();
- defaultModifiers = [eventListeners_default, popperOffsets_default, computeStyles_default, applyStyles_default], createPopper2 = popperGenerator({
- defaultModifiers
- });
- }
- });
-
- // ../../node_modules/@popperjs/core/lib/popper.js
- var defaultModifiers2, createPopper3, init_popper = __esm({
- "../../node_modules/@popperjs/core/lib/popper.js"() {
- init_createPopper();
- init_eventListeners();
- init_popperOffsets();
- init_computeStyles();
- init_applyStyles();
- init_offset();
- init_flip();
- init_preventOverflow();
- init_arrow();
- init_hide();
- init_popper_lite();
- init_modifiers();
- defaultModifiers2 = [eventListeners_default, popperOffsets_default, computeStyles_default, applyStyles_default, offset_default, flip_default, preventOverflow_default, arrow_default, hide_default], createPopper3 = popperGenerator({
- defaultModifiers: defaultModifiers2
- });
- }
- });
-
- // ../../node_modules/@popperjs/core/lib/index.js
- var init_lib = __esm({
- "../../node_modules/@popperjs/core/lib/index.js"() {
- init_enums();
- init_modifiers();
- init_createPopper();
- init_popper();
- init_popper_lite();
- }
- });
-
- // ../../node_modules/react-fast-compare/index.js
- var require_react_fast_compare = __commonJS({
- "../../node_modules/react-fast-compare/index.js"(exports, module2) {
- var hasElementType = typeof Element < "u", hasMap = typeof Map == "function", hasSet = typeof Set == "function", hasArrayBuffer = typeof ArrayBuffer == "function" && !!ArrayBuffer.isView;
- function equal(a3, b) {
- if (a3 === b) return !0;
- if (a3 && b && typeof a3 == "object" && typeof b == "object") {
- if (a3.constructor !== b.constructor) return !1;
- var length2, i, keys3;
- if (Array.isArray(a3)) {
- if (length2 = a3.length, length2 != b.length) return !1;
- for (i = length2; i-- !== 0; )
- if (!equal(a3[i], b[i])) return !1;
- return !0;
- }
- var it;
- if (hasMap && a3 instanceof Map && b instanceof Map) {
- if (a3.size !== b.size) return !1;
- for (it = a3.entries(); !(i = it.next()).done; )
- if (!b.has(i.value[0])) return !1;
- for (it = a3.entries(); !(i = it.next()).done; )
- if (!equal(i.value[1], b.get(i.value[0]))) return !1;
- return !0;
- }
- if (hasSet && a3 instanceof Set && b instanceof Set) {
- if (a3.size !== b.size) return !1;
- for (it = a3.entries(); !(i = it.next()).done; )
- if (!b.has(i.value[0])) return !1;
- return !0;
- }
- if (hasArrayBuffer && ArrayBuffer.isView(a3) && ArrayBuffer.isView(b)) {
- if (length2 = a3.length, length2 != b.length) return !1;
- for (i = length2; i-- !== 0; )
- if (a3[i] !== b[i]) return !1;
- return !0;
- }
- if (a3.constructor === RegExp) return a3.source === b.source && a3.flags === b.flags;
- if (a3.valueOf !== Object.prototype.valueOf && typeof a3.valueOf == "function" && typeof b.valueOf == "function") return a3.valueOf() === b.valueOf();
- if (a3.toString !== Object.prototype.toString && typeof a3.toString == "function" && typeof b.toString == "function") return a3.toString() === b.toString();
- if (keys3 = Object.keys(a3), length2 = keys3.length, length2 !== Object.keys(b).length) return !1;
- for (i = length2; i-- !== 0; )
- if (!Object.prototype.hasOwnProperty.call(b, keys3[i])) return !1;
- if (hasElementType && a3 instanceof Element) return !1;
- for (i = length2; i-- !== 0; )
- if (!((keys3[i] === "_owner" || keys3[i] === "__v" || keys3[i] === "__o") && a3.$$typeof) && !equal(a3[keys3[i]], b[keys3[i]]))
- return !1;
- return !0;
- }
- return a3 !== a3 && b !== b;
- }
- module2.exports = function(a3, b) {
- try {
- return equal(a3, b);
- } catch (error) {
- if ((error.message || "").match(/stack|recursion/i))
- return console.warn("react-fast-compare cannot handle circular refs"), !1;
- throw error;
- }
- };
- }
- });
-
- // ../../node_modules/react-popper/lib/esm/usePopper.js
- var React69, ReactDOM3, import_react_fast_compare, EMPTY_MODIFIERS, usePopper, init_usePopper = __esm({
- "../../node_modules/react-popper/lib/esm/usePopper.js"() {
- React69 = __toESM(require_react()), ReactDOM3 = __toESM(require_react_dom());
- init_lib();
- import_react_fast_compare = __toESM(require_react_fast_compare());
- init_utils3();
- EMPTY_MODIFIERS = [], usePopper = function(referenceElement, popperElement, options) {
- options === void 0 && (options = {});
- var prevOptions = React69.useRef(null), optionsWithDefaults = {
- onFirstUpdate: options.onFirstUpdate,
- placement: options.placement || "bottom",
- strategy: options.strategy || "absolute",
- modifiers: options.modifiers || EMPTY_MODIFIERS
- }, _React$useState = React69.useState({
- styles: {
- popper: {
- position: optionsWithDefaults.strategy,
- left: "0",
- top: "0"
- },
- arrow: {
- position: "absolute"
- }
- },
- attributes: {}
- }), state3 = _React$useState[0], setState2 = _React$useState[1], updateStateModifier = React69.useMemo(function() {
- return {
- name: "updateState",
- enabled: !0,
- phase: "write",
- fn: function(_ref) {
- var state4 = _ref.state, elements = Object.keys(state4.elements);
- ReactDOM3.flushSync(function() {
- setState2({
- styles: fromEntries3(elements.map(function(element) {
- return [element, state4.styles[element] || {}];
- })),
- attributes: fromEntries3(elements.map(function(element) {
- return [element, state4.attributes[element]];
- }))
- });
- });
- },
- requires: ["computeStyles"]
- };
- }, []), popperOptions = React69.useMemo(function() {
- var newOptions = {
- onFirstUpdate: optionsWithDefaults.onFirstUpdate,
- placement: optionsWithDefaults.placement,
- strategy: optionsWithDefaults.strategy,
- modifiers: [].concat(optionsWithDefaults.modifiers, [updateStateModifier, {
- name: "applyStyles",
- enabled: !1
- }])
- };
- return (0, import_react_fast_compare.default)(prevOptions.current, newOptions) ? prevOptions.current || newOptions : (prevOptions.current = newOptions, newOptions);
- }, [optionsWithDefaults.onFirstUpdate, optionsWithDefaults.placement, optionsWithDefaults.strategy, optionsWithDefaults.modifiers, updateStateModifier]), popperInstanceRef = React69.useRef();
- return useIsomorphicLayoutEffect2(function() {
- popperInstanceRef.current && popperInstanceRef.current.setOptions(popperOptions);
- }, [popperOptions]), useIsomorphicLayoutEffect2(function() {
- if (!(referenceElement == null || popperElement == null)) {
- var createPopper4 = options.createPopper || createPopper3, popperInstance = createPopper4(referenceElement, popperElement, popperOptions);
- return popperInstanceRef.current = popperInstance, function() {
- popperInstance.destroy(), popperInstanceRef.current = null;
- };
- }
- }, [referenceElement, popperElement, options.createPopper]), {
- state: popperInstanceRef.current ? popperInstanceRef.current.state : null,
- styles: state3.styles,
- attributes: state3.attributes,
- update: popperInstanceRef.current ? popperInstanceRef.current.update : null,
- forceUpdate: popperInstanceRef.current ? popperInstanceRef.current.forceUpdate : null
- };
- };
- }
- });
-
- // ../../node_modules/react-popper/lib/esm/Popper.js
- var React70, init_Popper = __esm({
- "../../node_modules/react-popper/lib/esm/Popper.js"() {
- React70 = __toESM(require_react());
- init_Manager();
- init_utils3();
- init_usePopper();
- }
- });
-
- // ../../node_modules/warning/warning.js
- var require_warning = __commonJS({
- "../../node_modules/warning/warning.js"(exports, module2) {
- "use strict";
- var __DEV__ = !1, warning3 = function() {
- };
- __DEV__ && (printWarning = function(format4, args) {
- var len = arguments.length;
- args = new Array(len > 1 ? len - 1 : 0);
- for (var key = 1; key < len; key++)
- args[key - 1] = arguments[key];
- var argIndex = 0, message = "Warning: " + format4.replace(/%s/g, function() {
- return args[argIndex++];
- });
- typeof console < "u" && console.error(message);
- try {
- throw new Error(message);
- } catch {
- }
- }, warning3 = function(condition, format4, args) {
- var len = arguments.length;
- args = new Array(len > 2 ? len - 2 : 0);
- for (var key = 2; key < len; key++)
- args[key - 2] = arguments[key];
- if (format4 === void 0)
- throw new Error(
- "`warning(condition, format, ...args)` requires a warning message argument"
- );
- condition || printWarning.apply(null, [format4].concat(args));
- });
- var printWarning;
- module2.exports = warning3;
- }
- });
-
- // ../../node_modules/react-popper/lib/esm/Reference.js
- var React71, import_warning, init_Reference = __esm({
- "../../node_modules/react-popper/lib/esm/Reference.js"() {
- React71 = __toESM(require_react()), import_warning = __toESM(require_warning());
- init_Manager();
- init_utils3();
- }
- });
-
- // ../../node_modules/react-popper/lib/esm/index.js
- var init_esm2 = __esm({
- "../../node_modules/react-popper/lib/esm/index.js"() {
- init_Popper();
- init_Manager();
- init_Reference();
- init_usePopper();
- }
- });
-
- // ../../node_modules/react-popper-tooltip/dist/esm/react-popper-tooltip.js
- function useGetLatest(val) {
- var ref = React72.useRef(val);
- return ref.current = val, React72.useCallback(function() {
- return ref.current;
- }, []);
- }
- function useControlledState(_ref) {
- var initial2 = _ref.initial, value = _ref.value, _ref$onChange = _ref.onChange, onChange = _ref$onChange === void 0 ? noop5 : _ref$onChange;
- if (initial2 === void 0 && value === void 0)
- throw new TypeError('Either "value" or "initial" variable must be set. Now both are undefined');
- var _React$useState = React72.useState(initial2), state3 = _React$useState[0], setState2 = _React$useState[1], getLatest = useGetLatest(state3), set3 = React72.useCallback(function(updater) {
- var state4 = getLatest(), updatedState = typeof updater == "function" ? updater(state4) : updater;
- typeof updatedState.persist == "function" && updatedState.persist(), setState2(updatedState), typeof onChange == "function" && onChange(updatedState);
- }, [getLatest, onChange]), isControlled = value !== void 0;
- return [isControlled ? value : state3, isControlled ? onChange : set3];
- }
- function generateBoundingClientRect(x, y) {
- return x === void 0 && (x = 0), y === void 0 && (y = 0), function() {
- return {
- width: 0,
- height: 0,
- top: y,
- right: x,
- bottom: y,
- left: x,
- x: 0,
- y: 0,
- toJSON: function() {
- return null;
- }
- };
- };
- }
- function usePopperTooltip(config4, popperOptions) {
- var _popperProps$state, _popperProps$state$mo, _popperProps$state$mo2;
- config4 === void 0 && (config4 = {}), popperOptions === void 0 && (popperOptions = {});
- var finalConfig = Object.keys(defaultConfig).reduce(function(config5, key) {
- var _extends22;
- return _extends({}, config5, (_extends22 = {}, _extends22[key] = config5[key] !== void 0 ? config5[key] : defaultConfig[key], _extends22));
- }, config4), defaultModifiers3 = React72.useMemo(
- function() {
- return [{
- name: "offset",
- options: {
- offset: finalConfig.offset
- }
- }];
- },
- // eslint-disable-next-line react-hooks/exhaustive-deps
- Array.isArray(finalConfig.offset) ? finalConfig.offset : []
- ), finalPopperOptions = _extends({}, popperOptions, {
- placement: popperOptions.placement || finalConfig.placement,
- modifiers: popperOptions.modifiers || defaultModifiers3
- }), _React$useState = React72.useState(null), triggerRef = _React$useState[0], setTriggerRef = _React$useState[1], _React$useState2 = React72.useState(null), tooltipRef = _React$useState2[0], setTooltipRef = _React$useState2[1], _useControlledState = useControlledState({
- initial: finalConfig.defaultVisible,
- value: finalConfig.visible,
- onChange: finalConfig.onVisibleChange
- }), visible = _useControlledState[0], setVisible = _useControlledState[1], timer = React72.useRef();
- React72.useEffect(function() {
- return function() {
- return clearTimeout(timer.current);
- };
- }, []);
- var _usePopper = usePopper(finalConfig.followCursor ? virtualElement : triggerRef, tooltipRef, finalPopperOptions), styles4 = _usePopper.styles, attributes = _usePopper.attributes, popperProps = _objectWithoutPropertiesLoose(_usePopper, _excluded5), update2 = popperProps.update, getLatest = useGetLatest({
- visible,
- triggerRef,
- tooltipRef,
- finalConfig
- }), isTriggeredBy = React72.useCallback(
- function(trigger) {
- return Array.isArray(finalConfig.trigger) ? finalConfig.trigger.includes(trigger) : finalConfig.trigger === trigger;
- },
- // eslint-disable-next-line react-hooks/exhaustive-deps
- Array.isArray(finalConfig.trigger) ? finalConfig.trigger : [finalConfig.trigger]
- ), hideTooltip = React72.useCallback(function() {
- clearTimeout(timer.current), timer.current = window.setTimeout(function() {
- return setVisible(!1);
- }, finalConfig.delayHide);
- }, [finalConfig.delayHide, setVisible]), showTooltip = React72.useCallback(function() {
- clearTimeout(timer.current), timer.current = window.setTimeout(function() {
- return setVisible(!0);
- }, finalConfig.delayShow);
- }, [finalConfig.delayShow, setVisible]), toggleTooltip = React72.useCallback(function() {
- getLatest().visible ? hideTooltip() : showTooltip();
- }, [getLatest, hideTooltip, showTooltip]);
- React72.useEffect(function() {
- if (getLatest().finalConfig.closeOnOutsideClick) {
- var handleClickOutside = function(event) {
- var _event$composedPath, _getLatest = getLatest(), tooltipRef2 = _getLatest.tooltipRef, triggerRef2 = _getLatest.triggerRef, target = (event.composedPath == null || (_event$composedPath = event.composedPath()) == null ? void 0 : _event$composedPath[0]) || event.target;
- target instanceof Node && tooltipRef2 != null && triggerRef2 != null && !tooltipRef2.contains(target) && !triggerRef2.contains(target) && hideTooltip();
- };
- return document.addEventListener("mousedown", handleClickOutside), function() {
- return document.removeEventListener("mousedown", handleClickOutside);
- };
- }
- }, [getLatest, hideTooltip]), React72.useEffect(function() {
- if (!(triggerRef == null || !isTriggeredBy("click")))
- return triggerRef.addEventListener("click", toggleTooltip), function() {
- return triggerRef.removeEventListener("click", toggleTooltip);
- };
- }, [triggerRef, isTriggeredBy, toggleTooltip]), React72.useEffect(function() {
- if (!(triggerRef == null || !isTriggeredBy("double-click")))
- return triggerRef.addEventListener("dblclick", toggleTooltip), function() {
- return triggerRef.removeEventListener("dblclick", toggleTooltip);
- };
- }, [triggerRef, isTriggeredBy, toggleTooltip]), React72.useEffect(function() {
- if (!(triggerRef == null || !isTriggeredBy("right-click"))) {
- var preventDefaultAndToggle = function(event) {
- event.preventDefault(), toggleTooltip();
- };
- return triggerRef.addEventListener("contextmenu", preventDefaultAndToggle), function() {
- return triggerRef.removeEventListener("contextmenu", preventDefaultAndToggle);
- };
- }
- }, [triggerRef, isTriggeredBy, toggleTooltip]), React72.useEffect(function() {
- if (!(triggerRef == null || !isTriggeredBy("focus")))
- return triggerRef.addEventListener("focus", showTooltip), triggerRef.addEventListener("blur", hideTooltip), function() {
- triggerRef.removeEventListener("focus", showTooltip), triggerRef.removeEventListener("blur", hideTooltip);
- };
- }, [triggerRef, isTriggeredBy, showTooltip, hideTooltip]), React72.useEffect(function() {
- if (!(triggerRef == null || !isTriggeredBy("hover")))
- return triggerRef.addEventListener("mouseenter", showTooltip), triggerRef.addEventListener("mouseleave", hideTooltip), function() {
- triggerRef.removeEventListener("mouseenter", showTooltip), triggerRef.removeEventListener("mouseleave", hideTooltip);
- };
- }, [triggerRef, isTriggeredBy, showTooltip, hideTooltip]), React72.useEffect(function() {
- if (!(tooltipRef == null || !isTriggeredBy("hover") || !getLatest().finalConfig.interactive))
- return tooltipRef.addEventListener("mouseenter", showTooltip), tooltipRef.addEventListener("mouseleave", hideTooltip), function() {
- tooltipRef.removeEventListener("mouseenter", showTooltip), tooltipRef.removeEventListener("mouseleave", hideTooltip);
- };
- }, [tooltipRef, isTriggeredBy, showTooltip, hideTooltip, getLatest]);
- var isReferenceHidden = popperProps == null || (_popperProps$state = popperProps.state) == null || (_popperProps$state$mo = _popperProps$state.modifiersData) == null || (_popperProps$state$mo2 = _popperProps$state$mo.hide) == null ? void 0 : _popperProps$state$mo2.isReferenceHidden;
- React72.useEffect(function() {
- finalConfig.closeOnTriggerHidden && isReferenceHidden && hideTooltip();
- }, [finalConfig.closeOnTriggerHidden, hideTooltip, isReferenceHidden]), React72.useEffect(function() {
- if (!finalConfig.followCursor || triggerRef == null) return;
- function setMousePosition(_ref) {
- var clientX = _ref.clientX, clientY = _ref.clientY;
- virtualElement.getBoundingClientRect = generateBoundingClientRect(clientX, clientY), update2?.();
- }
- return triggerRef.addEventListener("mousemove", setMousePosition), function() {
- return triggerRef.removeEventListener("mousemove", setMousePosition);
- };
- }, [finalConfig.followCursor, triggerRef, update2]), React72.useEffect(function() {
- if (!(tooltipRef == null || update2 == null || finalConfig.mutationObserverOptions == null)) {
- var observer = new MutationObserver(update2);
- return observer.observe(tooltipRef, finalConfig.mutationObserverOptions), function() {
- return observer.disconnect();
- };
- }
- }, [finalConfig.mutationObserverOptions, tooltipRef, update2]);
- var getTooltipProps = function(args) {
- return args === void 0 && (args = {}), _extends({}, args, {
- style: _extends({}, args.style, styles4.popper)
- }, attributes.popper, {
- "data-popper-interactive": finalConfig.interactive
- });
- }, getArrowProps = function(args) {
- return args === void 0 && (args = {}), _extends({}, args, attributes.arrow, {
- style: _extends({}, args.style, styles4.arrow),
- "data-popper-arrow": !0
- });
- };
- return _extends({
- getArrowProps,
- getTooltipProps,
- setTooltipRef,
- setTriggerRef,
- tooltipRef,
- triggerRef,
- visible
- }, popperProps);
- }
- var React72, noop5, _excluded5, virtualElement, defaultConfig, init_react_popper_tooltip = __esm({
- "../../node_modules/react-popper-tooltip/dist/esm/react-popper-tooltip.js"() {
- init_objectWithoutPropertiesLoose();
- init_extends();
- React72 = __toESM(require_react());
- init_esm2();
- noop5 = function() {
- };
- _excluded5 = ["styles", "attributes"], virtualElement = {
- getBoundingClientRect: generateBoundingClientRect()
- }, defaultConfig = {
- closeOnOutsideClick: !0,
- closeOnTriggerHidden: !1,
- defaultVisible: !1,
- delayHide: 0,
- delayShow: 0,
- followCursor: !1,
- interactive: !1,
- mutationObserverOptions: {
- attributes: !0,
- childList: !0,
- subtree: !0
- },
- offset: [0, 6],
- trigger: "hover"
- };
- }
- });
-
- // src/components/components/tooltip/WithTooltip.tsx
- var WithTooltip_exports = {};
- __export(WithTooltip_exports, {
- Tooltip: () => Tooltip3,
- WithToolTipState: () => DeprecatedState,
- WithTooltip: () => WithToolTipState,
- WithTooltipPure: () => DeprecatedPure
- });
- var import_react159, import_react_dom7, import_memoizerific11, document12, match2, ArrowSpacing, Arrow, Wrapper5, Tooltip3, TargetContainer, TargetSvgContainer, WithTooltipPure, WithToolTipState, DeprecatedPure, DeprecatedState, init_WithTooltip = __esm({
- "src/components/components/tooltip/WithTooltip.tsx"() {
- "use strict";
- import_react159 = __toESM(require_react(), 1), import_react_dom7 = __toESM(require_react_dom(), 1);
- init_client_logger();
- init_dist();
- import_memoizerific11 = __toESM(require_memoizerific(), 1);
- init_react_popper_tooltip();
- init_theming();
- ({ document: document12 } = scope), match2 = (0, import_memoizerific11.default)(1e3)(
- (requests, actual, value, fallback = 0) => actual.split("-")[0] === requests ? value : fallback
- ), ArrowSpacing = 8, Arrow = styled.div(
- {
- position: "absolute",
- borderStyle: "solid"
- },
- ({ placement }) => {
- let x = 0, y = 0;
- switch (!0) {
- case (placement.startsWith("left") || placement.startsWith("right")): {
- y = 8;
- break;
- }
- case (placement.startsWith("top") || placement.startsWith("bottom")): {
- x = 8;
- break;
- }
- default:
- }
- return { transform: `translate3d(${x}px, ${y}px, 0px)` };
- },
- ({ theme: theme3, color: color2, placement }) => ({
- bottom: `${match2("top", placement, `${ArrowSpacing * -1}px`, "auto")}`,
- top: `${match2("bottom", placement, `${ArrowSpacing * -1}px`, "auto")}`,
- right: `${match2("left", placement, `${ArrowSpacing * -1}px`, "auto")}`,
- left: `${match2("right", placement, `${ArrowSpacing * -1}px`, "auto")}`,
- borderBottomWidth: `${match2("top", placement, "0", ArrowSpacing)}px`,
- borderTopWidth: `${match2("bottom", placement, "0", ArrowSpacing)}px`,
- borderRightWidth: `${match2("left", placement, "0", ArrowSpacing)}px`,
- borderLeftWidth: `${match2("right", placement, "0", ArrowSpacing)}px`,
- borderTopColor: match2(
- "top",
- placement,
- theme3.color[color2] || color2 || theme3.base === "light" ? lightenColor(theme3.background.app) : theme3.background.app,
- "transparent"
- ),
- borderBottomColor: match2(
- "bottom",
- placement,
- theme3.color[color2] || color2 || theme3.base === "light" ? lightenColor(theme3.background.app) : theme3.background.app,
- "transparent"
- ),
- borderLeftColor: match2(
- "left",
- placement,
- theme3.color[color2] || color2 || theme3.base === "light" ? lightenColor(theme3.background.app) : theme3.background.app,
- "transparent"
- ),
- borderRightColor: match2(
- "right",
- placement,
- theme3.color[color2] || color2 || theme3.base === "light" ? lightenColor(theme3.background.app) : theme3.background.app,
- "transparent"
- )
- })
- ), Wrapper5 = styled.div(
- ({ hidden }) => ({
- display: hidden ? "none" : "inline-block",
- zIndex: 2147483647,
- colorScheme: "light dark"
- }),
- ({ theme: theme3, color: color2, hasChrome }) => hasChrome ? {
- background: color2 && theme3.color[color2] || color2 || theme3.base === "light" ? lightenColor(theme3.background.app) : theme3.background.app,
- filter: `
- drop-shadow(0px 5px 5px rgba(0,0,0,0.05))
- drop-shadow(0 1px 3px rgba(0,0,0,0.1))
- `,
- borderRadius: theme3.appBorderRadius + 2,
- fontSize: theme3.typography.size.s1
- } : {}
- ), Tooltip3 = import_react159.default.forwardRef(
- ({
- placement = "top",
- hasChrome = !0,
- children,
- arrowProps = {},
- tooltipRef,
- color: color2,
- withArrows,
- ...props
- }, ref) => import_react159.default.createElement(Wrapper5, { "data-testid": "tooltip", hasChrome, ref, ...props, color: color2 }, hasChrome && withArrows && import_react159.default.createElement(Arrow, { placement, ...arrowProps, color: color2 }), children)
- );
- Tooltip3.displayName = "Tooltip";
- TargetContainer = styled.div`
- display: inline-block;
- cursor: ${(props) => props.trigger === "hover" || props.trigger?.includes("hover") ? "default" : "pointer"};
- `, TargetSvgContainer = styled.g`
- cursor: ${(props) => props.trigger === "hover" || props.trigger?.includes("hover") ? "default" : "pointer"};
- `, WithTooltipPure = ({
- svg = !1,
- trigger = "click",
- closeOnOutsideClick = !1,
- placement = "top",
- modifiers = [
- {
- name: "preventOverflow",
- options: {
- padding: 8
- }
- },
- {
- name: "offset",
- options: {
- offset: [8, 8]
- }
- },
- {
- name: "arrow",
- options: {
- padding: 8
- }
- }
- ],
- hasChrome = !0,
- defaultVisible = !1,
- withArrows,
- offset: offset3,
- tooltip,
- children,
- closeOnTriggerHidden,
- mutationObserverOptions,
- delayHide = trigger === "hover" ? 200 : 0,
- visible,
- interactive,
- delayShow = trigger === "hover" ? 400 : 0,
- strategy,
- followCursor,
- onVisibleChange,
- portalContainer,
- ...props
- }) => {
- let Container7 = svg ? TargetSvgContainer : TargetContainer, {
- getArrowProps,
- getTooltipProps,
- setTooltipRef,
- setTriggerRef,
- visible: isVisible2,
- state: state3
- } = usePopperTooltip(
- {
- trigger,
- placement,
- defaultVisible,
- delayHide,
- interactive,
- closeOnOutsideClick,
- closeOnTriggerHidden,
- onVisibleChange,
- delayShow,
- followCursor,
- mutationObserverOptions,
- visible,
- offset: offset3
- },
- {
- modifiers,
- strategy
- }
- ), portalTarget = (typeof portalContainer == "string" ? document12.querySelector(portalContainer) : portalContainer) || document12.body, tooltipComponent = isVisible2 ? import_react159.default.createElement(
- Tooltip3,
- {
- placement: state3?.placement,
- ref: setTooltipRef,
- hasChrome,
- arrowProps: getArrowProps(),
- withArrows,
- ...getTooltipProps()
- },
- typeof tooltip == "function" ? tooltip({ onHide: () => onVisibleChange(!1) }) : tooltip
- ) : null;
- return import_react159.default.createElement(import_react159.default.Fragment, null, import_react159.default.createElement(Container7, { trigger, ref: setTriggerRef, ...props }, children), isVisible2 && import_react_dom7.default.createPortal(tooltipComponent, portalTarget));
- }, WithToolTipState = ({
- startOpen = !1,
- onVisibleChange: onChange,
- ...rest
- }) => {
- let [tooltipShown, setTooltipShown] = (0, import_react159.useState)(startOpen), onVisibilityChange = (0, import_react159.useCallback)(
- (visibility) => {
- onChange && onChange(visibility) === !1 || setTooltipShown(visibility);
- },
- [onChange]
- );
- return (0, import_react159.useEffect)(() => {
- let hide2 = () => onVisibilityChange(!1), handleKeyDown = (e) => {
- e.key === "Escape" && hide2();
- };
- document12.addEventListener("keydown", handleKeyDown, !1);
- let iframes = Array.from(document12.getElementsByTagName("iframe")), unbinders = [];
- return iframes.forEach((iframe) => {
- let bind = () => {
- try {
- iframe.contentWindow.document && (iframe.contentWindow.document.addEventListener("click", hide2), unbinders.push(() => {
- try {
- iframe.contentWindow.document.removeEventListener("click", hide2);
- } catch {
- }
- }));
- } catch {
- }
- };
- bind(), iframe.addEventListener("load", bind), unbinders.push(() => {
- iframe.removeEventListener("load", bind);
- });
- }), () => {
- document12.removeEventListener("keydown", handleKeyDown), unbinders.forEach((unbind) => {
- unbind();
- });
- };
- }), import_react159.default.createElement(WithTooltipPure, { ...rest, visible: tooltipShown, onVisibleChange: onVisibilityChange });
- }, DeprecatedPure = (props) => (deprecate(
- "WithTooltipPure is deprecated and will be removed in Storybook 11. Please use WithTooltip instead."
- ), import_react159.default.createElement(WithTooltipPure, { "data-deprecated": "WithTooltipPure", ...props })), DeprecatedState = (props) => (deprecate(
- "WithToolTipState is deprecated and will be removed in Storybook 11. Please use WithTooltip instead."
- ), import_react159.default.createElement(WithToolTipState, { "data-deprecated": "WithToolTipState", ...props }));
- }
- });
-
- // ../../node_modules/browser-dtector/browser-dtector.umd.min.js
- var require_browser_dtector_umd_min = __commonJS({
- "../../node_modules/browser-dtector/browser-dtector.umd.min.js"(exports, module2) {
- (function(e, o) {
- typeof exports == "object" && typeof module2 < "u" ? module2.exports = o() : typeof define == "function" && define.amd ? define(o) : (e = typeof globalThis < "u" ? globalThis : e || self).BrowserDetector = o();
- })(exports, (function() {
- "use strict";
- function e(e2, o2) {
- for (var r3 = 0; r3 < o2.length; r3++) {
- var n2 = o2[r3];
- n2.enumerable = n2.enumerable || !1, n2.configurable = !0, "value" in n2 && (n2.writable = !0), Object.defineProperty(e2, (i2 = n2.key, t2 = void 0, typeof (t2 = (function(e3, o3) {
- if (typeof e3 != "object" || e3 === null) return e3;
- var r4 = e3[Symbol.toPrimitive];
- if (r4 !== void 0) {
- var n3 = r4.call(e3, o3 || "default");
- if (typeof n3 != "object") return n3;
- throw new TypeError("@@toPrimitive must return a primitive value.");
- }
- return (o3 === "string" ? String : Number)(e3);
- })(i2, "string")) == "symbol" ? t2 : String(t2)), n2);
- }
- var i2, t2;
- }
- var o = { chrome: "Google Chrome", brave: "Brave", crios: "Google Chrome", edge: "Microsoft Edge", edg: "Microsoft Edge", edgios: "Microsoft Edge", fennec: "Mozilla Firefox", jsdom: "JsDOM", mozilla: "Mozilla Firefox", fxios: "Mozilla Firefox", msie: "Microsoft Internet Explorer", opera: "Opera", opios: "Opera", opr: "Opera", opt: "Opera", rv: "Microsoft Internet Explorer", safari: "Safari", samsungbrowser: "Samsung Browser", electron: "Electron" }, r2 = { android: "Android", androidTablet: "Android Tablet", cros: "Chrome OS", fennec: "Android Tablet", ipad: "IPad", iphone: "IPhone", jsdom: "JsDOM", linux: "Linux", mac: "Macintosh", tablet: "Android Tablet", win: "Windows", "windows phone": "Windows Phone", xbox: "Microsoft Xbox" }, n = function(e2) {
- var o2 = new RegExp("^-?\\d+(?:.\\d{0,".concat(arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : -1, "})?")), r3 = Number(e2).toString().match(o2);
- return r3 ? r3[0] : null;
- }, i = function() {
- return typeof window < "u" ? window.navigator : null;
- }, t = (function() {
- function t2(e2) {
- var o2;
- (function(e3, o3) {
- if (!(e3 instanceof o3)) throw new TypeError("Cannot call a class as a function");
- })(this, t2), this.userAgent = e2 || ((o2 = i()) === null || o2 === void 0 ? void 0 : o2.userAgent) || null;
- }
- var a3, l, s3;
- return a3 = t2, l = [{ key: "parseUserAgent", value: function(e2) {
- var t3, a4, l2, s4 = {}, c = e2 || this.userAgent || "", d = c.toLowerCase().replace(/\s\s+/g, " "), u2 = /(edge)\/([\w.]+)/.exec(d) || /(edg)[/]([\w.]+)/.exec(d) || /(opr)[/]([\w.]+)/.exec(d) || /(opt)[/]([\w.]+)/.exec(d) || /(fxios)[/]([\w.]+)/.exec(d) || /(edgios)[/]([\w.]+)/.exec(d) || /(jsdom)[/]([\w.]+)/.exec(d) || /(samsungbrowser)[/]([\w.]+)/.exec(d) || /(electron)[/]([\w.]+)/.exec(d) || /(chrome)[/]([\w.]+)/.exec(d) || /(crios)[/]([\w.]+)/.exec(d) || /(opios)[/]([\w.]+)/.exec(d) || /(version)(applewebkit)[/]([\w.]+).*(safari)[/]([\w.]+)/.exec(d) || /(webkit)[/]([\w.]+).*(version)[/]([\w.]+).*(safari)[/]([\w.]+)/.exec(d) || /(applewebkit)[/]([\w.]+).*(safari)[/]([\w.]+)/.exec(d) || /(webkit)[/]([\w.]+)/.exec(d) || /(opera)(?:.*version|)[/]([\w.]+)/.exec(d) || /(msie) ([\w.]+)/.exec(d) || /(fennec)[/]([\w.]+)/.exec(d) || d.indexOf("trident") >= 0 && /(rv)(?::| )([\w.]+)/.exec(d) || d.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(d) || [], f4 = /(ipad)/.exec(d) || /(ipod)/.exec(d) || /(iphone)/.exec(d) || /(jsdom)/.exec(d) || /(windows phone)/.exec(d) || /(xbox)/.exec(d) || /(win)/.exec(d) || /(tablet)/.exec(d) || /(android)/.test(d) && /(mobile)/.test(d) === !1 && ["androidTablet"] || /(android)/.exec(d) || /(mac)/.exec(d) || /(linux)/.exec(d) || /(cros)/.exec(d) || [], p3 = u2[5] || u2[3] || u2[1] || null, w = f4[0] || null, x = u2[4] || u2[2] || null, b = i();
- p3 === "chrome" && typeof (b == null || (t3 = b.brave) === null || t3 === void 0 ? void 0 : t3.isBrave) == "function" && (p3 = "brave"), p3 && (s4[p3] = !0), w && (s4[w] = !0);
- var v = !!(s4.tablet || s4.android || s4.androidTablet), m3 = !!(s4.ipad || s4.tablet || s4.androidTablet), g2 = !!(s4.android || s4.androidTablet || s4.tablet || s4.ipad || s4.ipod || s4.iphone || s4["windows phone"]), h3 = !!(s4.cros || s4.mac || s4.linux || s4.win), y = !!(s4.brave || s4.chrome || s4.crios || s4.opr || s4.safari || s4.edg || s4.electron), A3 = !!(s4.msie || s4.rv);
- return { name: (a4 = o[p3]) !== null && a4 !== void 0 ? a4 : null, platform: (l2 = r2[w]) !== null && l2 !== void 0 ? l2 : null, userAgent: c, version: x, shortVersion: x ? n(parseFloat(x), 2) : null, isAndroid: v, isTablet: m3, isMobile: g2, isDesktop: h3, isWebkit: y, isIE: A3 };
- } }, { key: "getBrowserInfo", value: function() {
- var e2 = this.parseUserAgent();
- return { name: e2.name, platform: e2.platform, userAgent: e2.userAgent, version: e2.version, shortVersion: e2.shortVersion };
- } }], s3 = [{ key: "VERSION", get: function() {
- return "3.4.0";
- } }], l && e(a3.prototype, l), s3 && e(a3, s3), Object.defineProperty(a3, "prototype", { writable: !1 }), t2;
- })();
- return t;
- }));
- }
- });
-
- // src/core-events/index.ts
- var core_events_exports = {};
- __export(core_events_exports, {
- AI_PROMPT_NUDGE: () => AI_PROMPT_NUDGE,
- AI_SETUP_ANALYTICS_REQUEST: () => AI_SETUP_ANALYTICS_REQUEST,
- AI_SETUP_ANALYTICS_RESPONSE: () => AI_SETUP_ANALYTICS_RESPONSE,
- ARGTYPES_INFO_REQUEST: () => ARGTYPES_INFO_REQUEST,
- ARGTYPES_INFO_RESPONSE: () => ARGTYPES_INFO_RESPONSE,
- CHANNEL_CREATED: () => CHANNEL_CREATED,
- CHANNEL_WS_DISCONNECT: () => CHANNEL_WS_DISCONNECT,
- CONFIG_ERROR: () => CONFIG_ERROR,
- CREATE_NEW_STORYFILE_REQUEST: () => CREATE_NEW_STORYFILE_REQUEST,
- CREATE_NEW_STORYFILE_RESPONSE: () => CREATE_NEW_STORYFILE_RESPONSE,
- CURRENT_STORY_WAS_SET: () => CURRENT_STORY_WAS_SET,
- DOCS_PREPARED: () => DOCS_PREPARED,
- DOCS_RENDERED: () => DOCS_RENDERED,
- FILE_COMPONENT_SEARCH_REQUEST: () => FILE_COMPONENT_SEARCH_REQUEST,
- FILE_COMPONENT_SEARCH_RESPONSE: () => FILE_COMPONENT_SEARCH_RESPONSE,
- FORCE_REMOUNT: () => FORCE_REMOUNT,
- FORCE_RE_RENDER: () => FORCE_RE_RENDER,
- GHOST_STORIES_REQUEST: () => GHOST_STORIES_REQUEST,
- GHOST_STORIES_RESPONSE: () => GHOST_STORIES_RESPONSE,
- GLOBALS_UPDATED: () => GLOBALS_UPDATED,
- MANAGER_INERT_ATTRIBUTE_CHANGED: () => MANAGER_INERT_ATTRIBUTE_CHANGED,
- NAVIGATE_URL: () => NAVIGATE_URL,
- OPEN_IN_EDITOR_REQUEST: () => OPEN_IN_EDITOR_REQUEST,
- OPEN_IN_EDITOR_RESPONSE: () => OPEN_IN_EDITOR_RESPONSE,
- PLAY_FUNCTION_THREW_EXCEPTION: () => PLAY_FUNCTION_THREW_EXCEPTION,
- PRELOAD_ENTRIES: () => PRELOAD_ENTRIES,
- PREVIEW_BUILDER_PROGRESS: () => PREVIEW_BUILDER_PROGRESS,
- PREVIEW_INITIALIZED: () => PREVIEW_INITIALIZED,
- PREVIEW_KEYDOWN: () => PREVIEW_KEYDOWN,
- REGISTER_SUBSCRIPTION: () => REGISTER_SUBSCRIPTION,
- REQUEST_WHATS_NEW_DATA: () => REQUEST_WHATS_NEW_DATA,
- RESET_STORY_ARGS: () => RESET_STORY_ARGS,
- RESULT_WHATS_NEW_DATA: () => RESULT_WHATS_NEW_DATA,
- SAVE_STORY_REQUEST: () => SAVE_STORY_REQUEST,
- SAVE_STORY_RESPONSE: () => SAVE_STORY_RESPONSE,
- SELECT_STORY: () => SELECT_STORY,
- SET_CONFIG: () => SET_CONFIG,
- SET_CURRENT_STORY: () => SET_CURRENT_STORY,
- SET_FILTER: () => SET_FILTER,
- SET_GLOBALS: () => SET_GLOBALS,
- SET_INDEX: () => SET_INDEX,
- SET_STORIES: () => SET_STORIES,
- SET_WHATS_NEW_CACHE: () => SET_WHATS_NEW_CACHE,
- SHARED_STATE_CHANGED: () => SHARED_STATE_CHANGED,
- SHARED_STATE_SET: () => SHARED_STATE_SET,
- SHARE_ISOLATE_MODE: () => SHARE_ISOLATE_MODE,
- SIDEBAR_FILTER_CHANGED: () => SIDEBAR_FILTER_CHANGED,
- STORIES_COLLAPSE_ALL: () => STORIES_COLLAPSE_ALL,
- STORIES_EXPAND_ALL: () => STORIES_EXPAND_ALL,
- STORY_ARGS_UPDATED: () => STORY_ARGS_UPDATED,
- STORY_CHANGED: () => STORY_CHANGED,
- STORY_ERRORED: () => STORY_ERRORED,
- STORY_FINISHED: () => STORY_FINISHED,
- STORY_HOT_UPDATED: () => STORY_HOT_UPDATED,
- STORY_INDEX_INVALIDATED: () => STORY_INDEX_INVALIDATED,
- STORY_MISSING: () => STORY_MISSING,
- STORY_PREPARED: () => STORY_PREPARED,
- STORY_RENDERED: () => STORY_RENDERED,
- STORY_RENDER_PHASE_CHANGED: () => STORY_RENDER_PHASE_CHANGED,
- STORY_SPECIFIED: () => STORY_SPECIFIED,
- STORY_THREW_EXCEPTION: () => STORY_THREW_EXCEPTION,
- STORY_UNCHANGED: () => STORY_UNCHANGED,
- TELEMETRY_ERROR: () => TELEMETRY_ERROR,
- TOGGLE_WHATS_NEW_NOTIFICATIONS: () => TOGGLE_WHATS_NEW_NOTIFICATIONS,
- UNHANDLED_ERRORS_WHILE_PLAYING: () => UNHANDLED_ERRORS_WHILE_PLAYING,
- UPDATE_GLOBALS: () => UPDATE_GLOBALS,
- UPDATE_QUERY_PARAMS: () => UPDATE_QUERY_PARAMS,
- UPDATE_STORY_ARGS: () => UPDATE_STORY_ARGS,
- default: () => core_events_default
- });
- var events = /* @__PURE__ */ ((events2) => (events2.CHANNEL_WS_DISCONNECT = "channelWSDisconnect", events2.CHANNEL_CREATED = "channelCreated", events2.CONFIG_ERROR = "configError", events2.STORY_INDEX_INVALIDATED = "storyIndexInvalidated", events2.STORY_SPECIFIED = "storySpecified", events2.SET_CONFIG = "setConfig", events2.SET_STORIES = "setStories", events2.SET_INDEX = "setIndex", events2.SET_CURRENT_STORY = "setCurrentStory", events2.CURRENT_STORY_WAS_SET = "currentStoryWasSet", events2.FORCE_RE_RENDER = "forceReRender", events2.FORCE_REMOUNT = "forceRemount", events2.PRELOAD_ENTRIES = "preloadStories", events2.STORY_PREPARED = "storyPrepared", events2.DOCS_PREPARED = "docsPrepared", events2.STORY_CHANGED = "storyChanged", events2.STORY_UNCHANGED = "storyUnchanged", events2.STORY_RENDERED = "storyRendered", events2.STORY_FINISHED = "storyFinished", events2.STORY_MISSING = "storyMissing", events2.STORY_ERRORED = "storyErrored", events2.STORY_THREW_EXCEPTION = "storyThrewException", events2.STORY_RENDER_PHASE_CHANGED = "storyRenderPhaseChanged", events2.STORY_HOT_UPDATED = "storyHotUpdated", events2.PLAY_FUNCTION_THREW_EXCEPTION = "playFunctionThrewException", events2.UNHANDLED_ERRORS_WHILE_PLAYING = "unhandledErrorsWhilePlaying", events2.UPDATE_STORY_ARGS = "updateStoryArgs", events2.STORY_ARGS_UPDATED = "storyArgsUpdated", events2.RESET_STORY_ARGS = "resetStoryArgs", events2.SET_FILTER = "setFilter", events2.SET_GLOBALS = "setGlobals", events2.UPDATE_GLOBALS = "updateGlobals", events2.GLOBALS_UPDATED = "globalsUpdated", events2.REGISTER_SUBSCRIPTION = "registerSubscription", events2.PREVIEW_INITIALIZED = "previewInitialized", events2.PREVIEW_KEYDOWN = "previewKeydown", events2.PREVIEW_BUILDER_PROGRESS = "preview_builder_progress", events2.SELECT_STORY = "selectStory", events2.STORIES_COLLAPSE_ALL = "storiesCollapseAll", events2.STORIES_EXPAND_ALL = "storiesExpandAll", events2.DOCS_RENDERED = "docsRendered", events2.SHARED_STATE_CHANGED = "sharedStateChanged", events2.SHARED_STATE_SET = "sharedStateSet", events2.NAVIGATE_URL = "navigateUrl", events2.UPDATE_QUERY_PARAMS = "updateQueryParams", events2.REQUEST_WHATS_NEW_DATA = "requestWhatsNewData", events2.RESULT_WHATS_NEW_DATA = "resultWhatsNewData", events2.SET_WHATS_NEW_CACHE = "setWhatsNewCache", events2.TOGGLE_WHATS_NEW_NOTIFICATIONS = "toggleWhatsNewNotifications", events2.TELEMETRY_ERROR = "telemetryError", events2.FILE_COMPONENT_SEARCH_REQUEST = "fileComponentSearchRequest", events2.FILE_COMPONENT_SEARCH_RESPONSE = "fileComponentSearchResponse", events2.SAVE_STORY_REQUEST = "saveStoryRequest", events2.SAVE_STORY_RESPONSE = "saveStoryResponse", events2.ARGTYPES_INFO_REQUEST = "argtypesInfoRequest", events2.ARGTYPES_INFO_RESPONSE = "argtypesInfoResponse", events2.CREATE_NEW_STORYFILE_REQUEST = "createNewStoryfileRequest", events2.CREATE_NEW_STORYFILE_RESPONSE = "createNewStoryfileResponse", events2.GHOST_STORIES_REQUEST = "ghostStoriesRequest", events2.GHOST_STORIES_RESPONSE = "ghostStoriesResponse", events2.AI_SETUP_ANALYTICS_RESPONSE = "aiSetupAnalyticsResponse", events2.AI_SETUP_ANALYTICS_REQUEST = "aiSetupAnalyticsRequest", events2.OPEN_IN_EDITOR_REQUEST = "openInEditorRequest", events2.OPEN_IN_EDITOR_RESPONSE = "openInEditorResponse", events2.MANAGER_INERT_ATTRIBUTE_CHANGED = "managerInertAttributeChanged", events2.SHARE_ISOLATE_MODE = "shareIsolateMode", events2.AI_PROMPT_NUDGE = "aiPromptNudge", events2.SIDEBAR_FILTER_CHANGED = "sidebarFilterChanged", events2))(events || {}), core_events_default = events, {
- CHANNEL_WS_DISCONNECT,
- CHANNEL_CREATED,
- CONFIG_ERROR,
- CREATE_NEW_STORYFILE_REQUEST,
- CREATE_NEW_STORYFILE_RESPONSE,
- CURRENT_STORY_WAS_SET,
- DOCS_PREPARED,
- DOCS_RENDERED,
- FILE_COMPONENT_SEARCH_REQUEST,
- FILE_COMPONENT_SEARCH_RESPONSE,
- FORCE_RE_RENDER,
- FORCE_REMOUNT,
- GLOBALS_UPDATED,
- NAVIGATE_URL,
- PLAY_FUNCTION_THREW_EXCEPTION,
- UNHANDLED_ERRORS_WHILE_PLAYING,
- PRELOAD_ENTRIES,
- PREVIEW_INITIALIZED,
- PREVIEW_BUILDER_PROGRESS,
- PREVIEW_KEYDOWN,
- REGISTER_SUBSCRIPTION,
- RESET_STORY_ARGS,
- SELECT_STORY,
- SET_CONFIG,
- SET_CURRENT_STORY,
- SET_FILTER,
- SET_GLOBALS,
- SET_INDEX,
- SET_STORIES,
- SHARED_STATE_CHANGED,
- SHARED_STATE_SET,
- STORIES_COLLAPSE_ALL,
- STORIES_EXPAND_ALL,
- STORY_ARGS_UPDATED,
- STORY_CHANGED,
- STORY_ERRORED,
- STORY_INDEX_INVALIDATED,
- STORY_MISSING,
- STORY_PREPARED,
- STORY_RENDER_PHASE_CHANGED,
- STORY_RENDERED,
- STORY_FINISHED,
- STORY_SPECIFIED,
- STORY_THREW_EXCEPTION,
- STORY_UNCHANGED,
- STORY_HOT_UPDATED,
- UPDATE_GLOBALS,
- UPDATE_QUERY_PARAMS,
- UPDATE_STORY_ARGS,
- REQUEST_WHATS_NEW_DATA,
- RESULT_WHATS_NEW_DATA,
- SET_WHATS_NEW_CACHE,
- TOGGLE_WHATS_NEW_NOTIFICATIONS,
- TELEMETRY_ERROR,
- SAVE_STORY_REQUEST,
- SAVE_STORY_RESPONSE,
- ARGTYPES_INFO_REQUEST,
- ARGTYPES_INFO_RESPONSE,
- GHOST_STORIES_REQUEST,
- GHOST_STORIES_RESPONSE,
- AI_SETUP_ANALYTICS_RESPONSE,
- AI_SETUP_ANALYTICS_REQUEST,
- OPEN_IN_EDITOR_REQUEST,
- OPEN_IN_EDITOR_RESPONSE,
- MANAGER_INERT_ATTRIBUTE_CHANGED,
- SHARE_ISOLATE_MODE,
- AI_PROMPT_NUDGE,
- SIDEBAR_FILTER_CHANGED
- } = events;
-
- // src/manager/globals/globals.ts
- var globalsNameReferenceMap = {
- react: "__REACT__",
- "react-dom": "__REACT_DOM__",
- "react-dom/client": "__REACT_DOM_CLIENT__",
- "@storybook/icons": "__STORYBOOK_ICONS__",
- "storybook/manager-api": "__STORYBOOK_API__",
- "storybook/test": "__STORYBOOK_TEST__",
- "storybook/theming": "__STORYBOOK_THEMING__",
- "storybook/theming/create": "__STORYBOOK_THEMING_CREATE__",
- "storybook/internal/channels": "__STORYBOOK_CHANNELS__",
- "storybook/internal/client-logger": "__STORYBOOK_CLIENT_LOGGER__",
- "storybook/internal/components": "__STORYBOOK_COMPONENTS__",
- "storybook/internal/core-events": "__STORYBOOK_CORE_EVENTS__",
- "storybook/internal/manager-errors": "__STORYBOOK_CORE_EVENTS_MANAGER_ERRORS__",
- "storybook/internal/router": "__STORYBOOK_ROUTER__",
- "storybook/internal/types": "__STORYBOOK_TYPES__"
- }, globalPackages = Object.keys(globalsNameReferenceMap);
-
- // src/manager/globals/runtime.ts
- var REACT = __toESM(require_react(), 1), REACT_DOM = __toESM(require_react_dom(), 1), REACT_DOM_CLIENT = __toESM(require_client(), 1);
-
- // src/channels/index.ts
- var channels_exports = {};
- __export(channels_exports, {
- Channel: () => Channel,
- HEARTBEAT_INTERVAL: () => HEARTBEAT_INTERVAL,
- HEARTBEAT_MAX_LATENCY: () => HEARTBEAT_MAX_LATENCY,
- PostMessageTransport: () => PostMessageTransport,
- WebsocketTransport: () => WebsocketTransport,
- createBrowserChannel: () => createBrowserChannel,
- default: () => channels_default
- });
- init_dist();
-
- // src/shared/universal-store/index.ts
- init_esm();
-
- // src/shared/universal-store/instances.ts
- var instances = /* @__PURE__ */ new Map();
-
- // src/shared/universal-store/index.ts
- var CHANNEL_EVENT_PREFIX = "UNIVERSAL_STORE:", ProgressState = {
- PENDING: "PENDING",
- RESOLVED: "RESOLVED",
- REJECTED: "REJECTED"
- }, _UniversalStore = class _UniversalStore {
- constructor(options, environmentOverrides) {
- /** Enable debug logs for this store */
- this.debugging = !1;
- // TODO: narrow type of listeners based on event type
- this.listeners = /* @__PURE__ */ new Map([["*", /* @__PURE__ */ new Set()]]);
- /** Gets the current state */
- this.getState = () => (this.debug("getState", { state: this.state }), this.state);
- /**
- * Subscribes to store events
- *
- * @returns A function to unsubscribe
- */
- this.subscribe = (eventTypeOrListener, maybeListener) => {
- let subscribesToAllEvents = typeof eventTypeOrListener == "function", eventType = subscribesToAllEvents ? "*" : eventTypeOrListener, listener = subscribesToAllEvents ? eventTypeOrListener : maybeListener;
- if (this.debug("subscribe", { eventType, listener }), !listener)
- throw new TypeError(
- `Missing first subscribe argument, or second if first is the event type, when subscribing to a UniversalStore with id '${this.id}'`
- );
- return this.listeners.has(eventType) || this.listeners.set(eventType, /* @__PURE__ */ new Set()), this.listeners.get(eventType).add(listener), () => {
- this.debug("unsubscribe", { eventType, listener }), this.listeners.has(eventType) && (this.listeners.get(eventType).delete(listener), this.listeners.get(eventType)?.size === 0 && this.listeners.delete(eventType));
- };
- };
- /** Sends a custom event to the other stores */
- this.send = (event) => {
- if (this.debug("send", { event }), this.status !== _UniversalStore.Status.READY)
- throw new TypeError(
- dedent`Cannot send event before store is ready. You can get the current status with store.status,
- or await store.readyPromise to wait for the store to be ready before sending events.
- ${JSON.stringify(
- {
- event,
- id: this.id,
- actor: this.actor,
- environment: this.environment
- },
- null,
- 2
- )}`
- );
- this.emitToListeners(event, { actor: this.actor }), this.emitToChannel(event, { actor: this.actor });
- };
- if (this.debugging = options.debug ?? !1, !_UniversalStore.isInternalConstructing)
- throw new TypeError(
- "UniversalStore is not constructable - use UniversalStore.create() instead"
- );
- if (_UniversalStore.isInternalConstructing = !1, this.id = options.id, this.actorId = Date.now().toString(36) + Math.random().toString(36).substring(2), this.actorType = options.leader ? _UniversalStore.ActorType.LEADER : _UniversalStore.ActorType.FOLLOWER, this.state = options.initialState, this.channelEventName = `${CHANNEL_EVENT_PREFIX}${this.id}`, this.debug("constructor", {
- options,
- environmentOverrides,
- channelEventName: this.channelEventName
- }), this.actor.type === _UniversalStore.ActorType.LEADER)
- this.syncing = {
- state: ProgressState.RESOLVED,
- promise: Promise.resolve()
- };
- else {
- let syncingResolve, syncingReject, syncingPromise = new Promise((resolve, reject) => {
- syncingResolve = () => {
- this.syncing.state === ProgressState.PENDING && (this.syncing.state = ProgressState.RESOLVED, resolve());
- }, syncingReject = (reason) => {
- this.syncing.state === ProgressState.PENDING && (this.syncing.state = ProgressState.REJECTED, reject(reason));
- };
- });
- this.syncing = {
- state: ProgressState.PENDING,
- promise: syncingPromise,
- resolve: syncingResolve,
- reject: syncingReject
- };
- }
- this.getState = this.getState.bind(this), this.setState = this.setState.bind(this), this.subscribe = this.subscribe.bind(this), this.onStateChange = this.onStateChange.bind(this), this.send = this.send.bind(this), this.emitToChannel = this.emitToChannel.bind(this), this.prepareThis = this.prepareThis.bind(this), this.emitToListeners = this.emitToListeners.bind(this), this.handleChannelEvents = this.handleChannelEvents.bind(this), this.debug = this.debug.bind(this), this.channel = environmentOverrides?.channel ?? _UniversalStore.preparation.channel, this.environment = environmentOverrides?.environment ?? _UniversalStore.preparation.environment, this.channel && this.environment ? (_UniversalStore.preparation.resolve({ channel: this.channel, environment: this.environment }), this.prepareThis({ channel: this.channel, environment: this.environment })) : _UniversalStore.preparation.promise.then(this.prepareThis);
- }
- static setupPreparationPromise() {
- let resolveRef, rejectRef, promise = new Promise(
- (resolve, reject) => {
- resolveRef = (args) => {
- resolve(args);
- }, rejectRef = (...args) => {
- reject(args);
- };
- }
- );
- _UniversalStore.preparation = {
- resolve: resolveRef,
- reject: rejectRef,
- promise
- };
- }
- /** The actor object representing the store instance with a unique ID and a type */
- get actor() {
- return Object.freeze({
- id: this.actorId,
- type: this.actorType,
- environment: this.environment ?? _UniversalStore.Environment.UNKNOWN
- });
- }
- /**
- * The current state of the store, that signals both if the store is prepared by Storybook and
- * also - in the case of a follower - if the state has been synced with the leader's state.
- */
- get status() {
- if (!this.channel || !this.environment)
- return _UniversalStore.Status.UNPREPARED;
- switch (this.syncing?.state) {
- case ProgressState.PENDING:
- case void 0:
- return _UniversalStore.Status.SYNCING;
- case ProgressState.REJECTED:
- return _UniversalStore.Status.ERROR;
- case ProgressState.RESOLVED:
- default:
- return _UniversalStore.Status.READY;
- }
- }
- /**
- * A promise that resolves when the store is fully ready. A leader will be ready when the store
- * has been prepared by Storybook, which is almost instantly.
- *
- * A follower will be ready when the state has been synced with the leader's state, within a few
- * hundred milliseconds.
- */
- untilReady() {
- return Promise.all([_UniversalStore.preparation.promise, this.syncing?.promise]);
- }
- /** Creates a new instance of UniversalStore */
- static create(options) {
- if (!options || typeof options?.id != "string")
- throw new TypeError("id is required and must be a string, when creating a UniversalStore");
- options.debug && console.debug(
- dedent`[UniversalStore]
- create`,
- { options }
- );
- let existing = instances.get(options.id);
- if (existing)
- return console.warn(dedent`UniversalStore with id "${options.id}" already exists in this environment, re-using existing.
- You should reuse the existing instance instead of trying to create a new one.`), existing;
- _UniversalStore.isInternalConstructing = !0;
- let store2 = new _UniversalStore(options);
- return instances.set(options.id, store2), store2;
- }
- /**
- * Used by Storybook to set the channel for all instances of UniversalStore in the given
- * environment.
- *
- * @internal
- */
- static __prepare(channel, environment) {
- _UniversalStore.preparation.channel = channel, _UniversalStore.preparation.environment = environment, _UniversalStore.preparation.resolve({ channel, environment });
- }
- /**
- * Updates the store's state
- *
- * Either a new state or a state updater function can be passed to the method.
- */
- setState(updater) {
- let previousState = this.state, newState = typeof updater == "function" ? updater(previousState) : updater;
- if (this.debug("setState", { newState, previousState, updater }), this.status !== _UniversalStore.Status.READY)
- throw new TypeError(
- dedent`Cannot set state before store is ready. You can get the current status with store.status,
- or await store.readyPromise to wait for the store to be ready before sending events.
- ${JSON.stringify(
- {
- newState,
- id: this.id,
- actor: this.actor,
- environment: this.environment
- },
- null,
- 2
- )}`
- );
- this.state = newState;
- let event = {
- type: _UniversalStore.InternalEventType.SET_STATE,
- payload: {
- state: newState,
- previousState
- }
- };
- this.emitToChannel(event, { actor: this.actor }), this.emitToListeners(event, { actor: this.actor });
- }
- /**
- * Subscribes to state changes
- *
- * @returns Unsubscribe function
- */
- onStateChange(listener) {
- return this.debug("onStateChange", { listener }), this.subscribe(
- _UniversalStore.InternalEventType.SET_STATE,
- ({ payload }, eventInfo) => {
- listener(payload.state, payload.previousState, eventInfo);
- }
- );
- }
- emitToChannel(event, eventInfo) {
- this.debug("emitToChannel", { event, eventInfo, channel: !!this.channel }), this.channel?.emit(this.channelEventName, {
- event,
- eventInfo
- });
- }
- prepareThis({
- channel,
- environment
- }) {
- this.channel = channel, this.environment = environment, this.debug("prepared", { channel: !!channel, environment }), this.channel.on(this.channelEventName, this.handleChannelEvents), this.actor.type === _UniversalStore.ActorType.LEADER ? this.emitToChannel(
- { type: _UniversalStore.InternalEventType.LEADER_CREATED },
- { actor: this.actor }
- ) : (this.emitToChannel(
- { type: _UniversalStore.InternalEventType.FOLLOWER_CREATED },
- { actor: this.actor }
- ), this.emitToChannel(
- { type: _UniversalStore.InternalEventType.EXISTING_STATE_REQUEST },
- { actor: this.actor }
- ), setTimeout(() => {
- this.syncing.reject(
- new TypeError(
- `No existing state found for follower with id: '${this.id}'. Make sure a leader with the same id exists before creating a follower.`
- )
- );
- }, 1e3));
- }
- emitToListeners(event, eventInfo) {
- let eventTypeListeners = this.listeners.get(event.type), everythingListeners = this.listeners.get("*");
- this.debug("emitToListeners", {
- event,
- eventInfo,
- eventTypeListeners,
- everythingListeners
- }), [...eventTypeListeners ?? [], ...everythingListeners ?? []].forEach(
- (listener) => listener(event, eventInfo)
- );
- }
- handleChannelEvents(channelEvent) {
- let { event, eventInfo } = channelEvent;
- if ([eventInfo.actor.id, eventInfo.forwardingActor?.id].includes(this.actor.id)) {
- this.debug("handleChannelEvents: Ignoring event from self", { channelEvent });
- return;
- } else if (this.syncing?.state === ProgressState.PENDING && event.type !== _UniversalStore.InternalEventType.EXISTING_STATE_RESPONSE) {
- this.debug("handleChannelEvents: Ignoring event while syncing", { channelEvent });
- return;
- }
- if (this.debug("handleChannelEvents", { channelEvent }), this.actor.type === _UniversalStore.ActorType.LEADER) {
- let shouldForwardEvent = !0;
- switch (event.type) {
- case _UniversalStore.InternalEventType.EXISTING_STATE_REQUEST:
- shouldForwardEvent = !1;
- let responseEvent = {
- type: _UniversalStore.InternalEventType.EXISTING_STATE_RESPONSE,
- payload: this.state
- };
- this.debug("handleChannelEvents: responding to existing state request", {
- responseEvent
- }), this.emitToChannel(responseEvent, { actor: this.actor }), this.emitToListeners(responseEvent, { actor: this.actor });
- break;
- case _UniversalStore.InternalEventType.LEADER_CREATED:
- shouldForwardEvent = !1, this.syncing.state = ProgressState.REJECTED, this.debug("handleChannelEvents: erroring due to second leader being created", {
- event
- }), console.error(
- dedent`Detected multiple UniversalStore leaders created with the same id "${this.id}".
- Only one leader can exists at a time, your stores are now in an invalid state.
- Leaders detected:
- this: ${JSON.stringify(this.actor, null, 2)}
- other: ${JSON.stringify(eventInfo.actor, null, 2)}`
- );
- break;
- }
- shouldForwardEvent && (this.debug("handleChannelEvents: forwarding event", { channelEvent }), this.emitToChannel(event, { actor: eventInfo.actor, forwardingActor: this.actor }));
- }
- if (this.actor.type === _UniversalStore.ActorType.FOLLOWER)
- switch (event.type) {
- case _UniversalStore.InternalEventType.EXISTING_STATE_RESPONSE:
- if (this.debug("handleChannelEvents: Setting state from leader's existing state response", {
- event
- }), this.syncing?.state !== ProgressState.PENDING)
- break;
- this.syncing.resolve?.();
- let setStateEvent = {
- type: _UniversalStore.InternalEventType.SET_STATE,
- payload: {
- state: event.payload,
- previousState: this.state
- }
- };
- this.state = event.payload, this.emitToListeners(setStateEvent, eventInfo);
- break;
- }
- switch (event.type) {
- case _UniversalStore.InternalEventType.SET_STATE:
- this.debug("handleChannelEvents: Setting state", { event }), this.state = event.payload.state;
- break;
- }
- this.emitToListeners(event, { actor: eventInfo.actor });
- }
- debug(message, data) {
- this.debugging && console.debug(
- dedent`[UniversalStore::${this.id}::${this.environment ?? _UniversalStore.Environment.UNKNOWN}]
- ${message}`,
- JSON.stringify(
- {
- data,
- actor: this.actor,
- state: this.state,
- status: this.status
- },
- null,
- 2
- )
- );
- }
- /**
- * Used to reset the static fields of the UniversalStore class when cleaning up tests
- *
- * @internal
- */
- static __reset() {
- _UniversalStore.preparation.reject(new Error("reset")), _UniversalStore.setupPreparationPromise(), _UniversalStore.isInternalConstructing = !1;
- }
- };
- /**
- * Defines the possible actor types in the store system
- *
- * @readonly
- */
- _UniversalStore.ActorType = {
- LEADER: "LEADER",
- FOLLOWER: "FOLLOWER"
- }, /**
- * Defines the possible environments the store can run in
- *
- * @readonly
- */
- _UniversalStore.Environment = {
- SERVER: "SERVER",
- MANAGER: "MANAGER",
- PREVIEW: "PREVIEW",
- UNKNOWN: "UNKNOWN",
- MOCK: "MOCK"
- }, /**
- * Internal event types used for store synchronization
- *
- * @readonly
- */
- _UniversalStore.InternalEventType = {
- EXISTING_STATE_REQUEST: "__EXISTING_STATE_REQUEST",
- EXISTING_STATE_RESPONSE: "__EXISTING_STATE_RESPONSE",
- SET_STATE: "__SET_STATE",
- LEADER_CREATED: "__LEADER_CREATED",
- FOLLOWER_CREATED: "__FOLLOWER_CREATED"
- }, _UniversalStore.Status = {
- UNPREPARED: "UNPREPARED",
- SYNCING: "SYNCING",
- READY: "READY",
- ERROR: "ERROR"
- }, // This is used to check if constructor was called from the static factory create()
- _UniversalStore.isInternalConstructing = !1, _UniversalStore.setupPreparationPromise();
- var UniversalStore = _UniversalStore;
-
- // src/channels/main.ts
- var isMulti = (args) => args.transports !== void 0, generateRandomId = () => Math.random().toString(16).slice(2), Channel = class {
- constructor(input2 = {}) {
- this.sender = generateRandomId();
- this.events = {};
- this.data = {};
- this.transports = [];
- this.isAsync = input2.async || !1, isMulti(input2) ? (this.transports = input2.transports || [], this.transports.forEach((t) => {
- t.setHandler((event) => this.handleEvent(event));
- })) : this.transports = input2.transport ? [input2.transport] : [], this.transports.forEach((t) => {
- t.setHandler((event) => this.handleEvent(event));
- });
- }
- get hasTransport() {
- return this.transports.length > 0;
- }
- addListener(eventName, listener) {
- this.events[eventName] = this.events[eventName] || [], this.events[eventName].push(listener);
- }
- emit(eventName, ...args) {
- let event = { type: eventName, args, from: this.sender }, options = {};
- args.length >= 1 && args[0] && args[0].options && (options = args[0].options);
- let handler = () => {
- this.transports.forEach((t) => {
- t.send(event, options);
- }), this.handleEvent(event);
- };
- this.isAsync ? setImmediate(handler) : handler();
- }
- last(eventName) {
- return this.data[eventName];
- }
- eventNames() {
- return Object.keys(this.events);
- }
- listenerCount(eventName) {
- let listeners3 = this.listeners(eventName);
- return listeners3 ? listeners3.length : 0;
- }
- listeners(eventName) {
- return this.events[eventName] || void 0;
- }
- once(eventName, listener) {
- let onceListener = this.onceListener(eventName, listener);
- this.addListener(eventName, onceListener);
- }
- removeAllListeners(eventName) {
- eventName ? this.events[eventName] && delete this.events[eventName] : this.events = {};
- }
- removeListener(eventName, listener) {
- let listeners3 = this.listeners(eventName);
- listeners3 && (this.events[eventName] = listeners3.filter((l) => l !== listener));
- }
- on(eventName, listener) {
- this.addListener(eventName, listener);
- }
- off(eventName, listener) {
- this.removeListener(eventName, listener);
- }
- handleEvent(event) {
- let listeners3 = this.listeners(event.type);
- listeners3 && listeners3.length && listeners3.forEach((fn4) => {
- fn4.apply(event, event.args);
- }), this.data[event.type] = event.args;
- }
- onceListener(eventName, listener) {
- let onceListener = (...args) => (this.removeListener(eventName, onceListener), listener(...args));
- return onceListener;
- }
- };
-
- // src/channels/postmessage/index.ts
- init_client_logger();
- init_dist();
-
- // ../../node_modules/telejson/dist/chunk-EAFQLD22.mjs
- var __create2 = Object.create, __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __getProtoOf2 = Object.getPrototypeOf, __hasOwnProp2 = Object.prototype.hasOwnProperty, __commonJS2 = (cb, mod) => function() {
- return mod || (0, cb[__getOwnPropNames2(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
- }, __copyProps2 = (to, from2, except, desc) => {
- if (from2 && typeof from2 == "object" || typeof from2 == "function")
- for (let key of __getOwnPropNames2(from2))
- !__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc2(from2, key)) || desc.enumerable });
- return to;
- }, __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
- // If the importer is in node compatibility mode or this is not an ESM
- // file that has been converted to a CommonJS file using a Babel-
- // compatible transform (i.e. "__esModule" has not been set), then set
- // "default" to the CommonJS "module.exports" for node compatibility.
- isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: !0 }) : target,
- mod
- )), eventProperties = [
- "bubbles",
- "cancelBubble",
- "cancelable",
- "composed",
- "currentTarget",
- "defaultPrevented",
- "eventPhase",
- "isTrusted",
- "returnValue",
- "srcElement",
- "target",
- "timeStamp",
- "type"
- ], customEventSpecificProperties = ["detail"];
- function extractEventHiddenProperties(event) {
- let rebuildEvent = eventProperties.filter((value) => event[value] !== void 0).reduce((acc, value) => (acc[value] = event[value], acc), {});
- if (event instanceof CustomEvent)
- for (let value of customEventSpecificProperties.filter(
- (value2) => event[value2] !== void 0
- ))
- rebuildEvent[value] = event[value];
- return rebuildEvent;
- }
-
- // ../../node_modules/telejson/dist/index.mjs
- var require_es_object_atoms = __commonJS2({
- "node_modules/.pnpm/es-object-atoms@1.1.1/node_modules/es-object-atoms/index.js"(exports, module2) {
- "use strict";
- module2.exports = Object;
- }
- }), require_es_errors = __commonJS2({
- "node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/index.js"(exports, module2) {
- "use strict";
- module2.exports = Error;
- }
- }), require_eval = __commonJS2({
- "node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/eval.js"(exports, module2) {
- "use strict";
- module2.exports = EvalError;
- }
- }), require_range = __commonJS2({
- "node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/range.js"(exports, module2) {
- "use strict";
- module2.exports = RangeError;
- }
- }), require_ref = __commonJS2({
- "node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/ref.js"(exports, module2) {
- "use strict";
- module2.exports = ReferenceError;
- }
- }), require_syntax = __commonJS2({
- "node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/syntax.js"(exports, module2) {
- "use strict";
- module2.exports = SyntaxError;
- }
- }), require_type = __commonJS2({
- "node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/type.js"(exports, module2) {
- "use strict";
- module2.exports = TypeError;
- }
- }), require_uri = __commonJS2({
- "node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/uri.js"(exports, module2) {
- "use strict";
- module2.exports = URIError;
- }
- }), require_abs = __commonJS2({
- "node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/abs.js"(exports, module2) {
- "use strict";
- module2.exports = Math.abs;
- }
- }), require_floor = __commonJS2({
- "node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/floor.js"(exports, module2) {
- "use strict";
- module2.exports = Math.floor;
- }
- }), require_max = __commonJS2({
- "node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/max.js"(exports, module2) {
- "use strict";
- module2.exports = Math.max;
- }
- }), require_min = __commonJS2({
- "node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/min.js"(exports, module2) {
- "use strict";
- module2.exports = Math.min;
- }
- }), require_pow = __commonJS2({
- "node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/pow.js"(exports, module2) {
- "use strict";
- module2.exports = Math.pow;
- }
- }), require_round = __commonJS2({
- "node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/round.js"(exports, module2) {
- "use strict";
- module2.exports = Math.round;
- }
- }), require_isNaN = __commonJS2({
- "node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/isNaN.js"(exports, module2) {
- "use strict";
- module2.exports = Number.isNaN || function(a3) {
- return a3 !== a3;
- };
- }
- }), require_sign = __commonJS2({
- "node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/sign.js"(exports, module2) {
- "use strict";
- var $isNaN = require_isNaN();
- module2.exports = function(number) {
- return $isNaN(number) || number === 0 ? number : number < 0 ? -1 : 1;
- };
- }
- }), require_gOPD = __commonJS2({
- "node_modules/.pnpm/gopd@1.2.0/node_modules/gopd/gOPD.js"(exports, module2) {
- "use strict";
- module2.exports = Object.getOwnPropertyDescriptor;
- }
- }), require_gopd = __commonJS2({
- "node_modules/.pnpm/gopd@1.2.0/node_modules/gopd/index.js"(exports, module2) {
- "use strict";
- var $gOPD = require_gOPD();
- if ($gOPD)
- try {
- $gOPD([], "length");
- } catch {
- $gOPD = null;
- }
- module2.exports = $gOPD;
- }
- }), require_es_define_property = __commonJS2({
- "node_modules/.pnpm/es-define-property@1.0.1/node_modules/es-define-property/index.js"(exports, module2) {
- "use strict";
- var $defineProperty = Object.defineProperty || !1;
- if ($defineProperty)
- try {
- $defineProperty({}, "a", { value: 1 });
- } catch {
- $defineProperty = !1;
- }
- module2.exports = $defineProperty;
- }
- }), require_shams = __commonJS2({
- "node_modules/.pnpm/has-symbols@1.1.0/node_modules/has-symbols/shams.js"(exports, module2) {
- "use strict";
- module2.exports = function() {
- if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function")
- return !1;
- if (typeof Symbol.iterator == "symbol")
- return !0;
- var obj = {}, sym = Symbol("test"), symObj = Object(sym);
- if (typeof sym == "string" || Object.prototype.toString.call(sym) !== "[object Symbol]" || Object.prototype.toString.call(symObj) !== "[object Symbol]")
- return !1;
- var symVal = 42;
- obj[sym] = symVal;
- for (var _ in obj)
- return !1;
- if (typeof Object.keys == "function" && Object.keys(obj).length !== 0 || typeof Object.getOwnPropertyNames == "function" && Object.getOwnPropertyNames(obj).length !== 0)
- return !1;
- var syms = Object.getOwnPropertySymbols(obj);
- if (syms.length !== 1 || syms[0] !== sym || !Object.prototype.propertyIsEnumerable.call(obj, sym))
- return !1;
- if (typeof Object.getOwnPropertyDescriptor == "function") {
- var descriptor = (
- /** @type {PropertyDescriptor} */
- Object.getOwnPropertyDescriptor(obj, sym)
- );
- if (descriptor.value !== symVal || descriptor.enumerable !== !0)
- return !1;
- }
- return !0;
- };
- }
- }), require_has_symbols = __commonJS2({
- "node_modules/.pnpm/has-symbols@1.1.0/node_modules/has-symbols/index.js"(exports, module2) {
- "use strict";
- var origSymbol = typeof Symbol < "u" && Symbol, hasSymbolSham = require_shams();
- module2.exports = function() {
- return typeof origSymbol != "function" || typeof Symbol != "function" || typeof origSymbol("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 : hasSymbolSham();
- };
- }
- }), require_Reflect_getPrototypeOf = __commonJS2({
- "node_modules/.pnpm/get-proto@1.0.1/node_modules/get-proto/Reflect.getPrototypeOf.js"(exports, module2) {
- "use strict";
- module2.exports = typeof Reflect < "u" && Reflect.getPrototypeOf || null;
- }
- }), require_Object_getPrototypeOf = __commonJS2({
- "node_modules/.pnpm/get-proto@1.0.1/node_modules/get-proto/Object.getPrototypeOf.js"(exports, module2) {
- "use strict";
- var $Object = require_es_object_atoms();
- module2.exports = $Object.getPrototypeOf || null;
- }
- }), require_implementation = __commonJS2({
- "node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/implementation.js"(exports, module2) {
- "use strict";
- var ERROR_MESSAGE = "Function.prototype.bind called on incompatible ", toStr3 = Object.prototype.toString, max2 = Math.max, funcType = "[object Function]", concatty = function(a3, b) {
- for (var arr = [], i = 0; i < a3.length; i += 1)
- arr[i] = a3[i];
- for (var j = 0; j < b.length; j += 1)
- arr[j + a3.length] = b[j];
- return arr;
- }, slicy = function(arrLike, offset3) {
- for (var arr = [], i = offset3 || 0, j = 0; i < arrLike.length; i += 1, j += 1)
- arr[j] = arrLike[i];
- return arr;
- }, joiny = function(arr, joiner) {
- for (var str2 = "", i = 0; i < arr.length; i += 1)
- str2 += arr[i], i + 1 < arr.length && (str2 += joiner);
- return str2;
- };
- module2.exports = function(that) {
- var target = this;
- if (typeof target != "function" || toStr3.apply(target) !== funcType)
- throw new TypeError(ERROR_MESSAGE + target);
- for (var args = slicy(arguments, 1), bound, binder = function() {
- if (this instanceof bound) {
- var result = target.apply(
- this,
- concatty(args, arguments)
- );
- return Object(result) === result ? result : this;
- }
- return target.apply(
- that,
- concatty(args, arguments)
- );
- }, boundLength = max2(0, target.length - args.length), boundArgs = [], i = 0; i < boundLength; i++)
- boundArgs[i] = "$" + i;
- if (bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder), target.prototype) {
- var Empty = function() {
- };
- Empty.prototype = target.prototype, bound.prototype = new Empty(), Empty.prototype = null;
- }
- return bound;
- };
- }
- }), require_function_bind = __commonJS2({
- "node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/index.js"(exports, module2) {
- "use strict";
- var implementation = require_implementation();
- module2.exports = Function.prototype.bind || implementation;
- }
- }), require_functionCall = __commonJS2({
- "node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/functionCall.js"(exports, module2) {
- "use strict";
- module2.exports = Function.prototype.call;
- }
- }), require_functionApply = __commonJS2({
- "node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/functionApply.js"(exports, module2) {
- "use strict";
- module2.exports = Function.prototype.apply;
- }
- }), require_reflectApply = __commonJS2({
- "node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/reflectApply.js"(exports, module2) {
- "use strict";
- module2.exports = typeof Reflect < "u" && Reflect && Reflect.apply;
- }
- }), require_actualApply = __commonJS2({
- "node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/actualApply.js"(exports, module2) {
- "use strict";
- var bind = require_function_bind(), $apply = require_functionApply(), $call = require_functionCall(), $reflectApply = require_reflectApply();
- module2.exports = $reflectApply || bind.call($call, $apply);
- }
- }), require_call_bind_apply_helpers = __commonJS2({
- "node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/index.js"(exports, module2) {
- "use strict";
- var bind = require_function_bind(), $TypeError = require_type(), $call = require_functionCall(), $actualApply = require_actualApply();
- module2.exports = function(args) {
- if (args.length < 1 || typeof args[0] != "function")
- throw new $TypeError("a function is required");
- return $actualApply(bind, $call, args);
- };
- }
- }), require_get = __commonJS2({
- "node_modules/.pnpm/dunder-proto@1.0.1/node_modules/dunder-proto/get.js"(exports, module2) {
- "use strict";
- var callBind = require_call_bind_apply_helpers(), gOPD = require_gopd(), hasProtoAccessor;
- try {
- hasProtoAccessor = /** @type {{ __proto__?: typeof Array.prototype }} */
- [].__proto__ === Array.prototype;
- } catch (e) {
- if (!e || typeof e != "object" || !("code" in e) || e.code !== "ERR_PROTO_ACCESS")
- throw e;
- }
- var desc = !!hasProtoAccessor && gOPD && gOPD(
- Object.prototype,
- /** @type {keyof typeof Object.prototype} */
- "__proto__"
- ), $Object = Object, $getPrototypeOf = $Object.getPrototypeOf;
- module2.exports = desc && typeof desc.get == "function" ? callBind([desc.get]) : typeof $getPrototypeOf == "function" ? (
- /** @type {import('./get')} */
- (function(value) {
- return $getPrototypeOf(value == null ? value : $Object(value));
- })
- ) : !1;
- }
- }), require_get_proto = __commonJS2({
- "node_modules/.pnpm/get-proto@1.0.1/node_modules/get-proto/index.js"(exports, module2) {
- "use strict";
- var reflectGetProto = require_Reflect_getPrototypeOf(), originalGetProto = require_Object_getPrototypeOf(), getDunderProto = require_get();
- module2.exports = reflectGetProto ? function(O) {
- return reflectGetProto(O);
- } : originalGetProto ? function(O) {
- if (!O || typeof O != "object" && typeof O != "function")
- throw new TypeError("getProto: not an object");
- return originalGetProto(O);
- } : getDunderProto ? function(O) {
- return getDunderProto(O);
- } : null;
- }
- }), require_hasown = __commonJS2({
- "node_modules/.pnpm/hasown@2.0.2/node_modules/hasown/index.js"(exports, module2) {
- "use strict";
- var call2 = Function.prototype.call, $hasOwn = Object.prototype.hasOwnProperty, bind = require_function_bind();
- module2.exports = bind.call(call2, $hasOwn);
- }
- }), require_get_intrinsic = __commonJS2({
- "node_modules/.pnpm/get-intrinsic@1.3.0/node_modules/get-intrinsic/index.js"(exports, module2) {
- "use strict";
- var undefined2, $Object = require_es_object_atoms(), $Error = require_es_errors(), $EvalError = require_eval(), $RangeError = require_range(), $ReferenceError = require_ref(), $SyntaxError = require_syntax(), $TypeError = require_type(), $URIError = require_uri(), abs2 = require_abs(), floor = require_floor(), max2 = require_max(), min2 = require_min(), pow = require_pow(), round3 = require_round(), sign = require_sign(), $Function = Function, getEvalledConstructor = function(expressionSyntax) {
- try {
- return $Function('"use strict"; return (' + expressionSyntax + ").constructor;")();
- } catch {
- }
- }, $gOPD = require_gopd(), $defineProperty = require_es_define_property(), throwTypeError = function() {
- throw new $TypeError();
- }, ThrowTypeError = $gOPD ? (function() {
- try {
- return arguments.callee, throwTypeError;
- } catch {
- try {
- return $gOPD(arguments, "callee").get;
- } catch {
- return throwTypeError;
- }
- }
- })() : throwTypeError, hasSymbols = require_has_symbols()(), getProto = require_get_proto(), $ObjectGPO = require_Object_getPrototypeOf(), $ReflectGPO = require_Reflect_getPrototypeOf(), $apply = require_functionApply(), $call = require_functionCall(), needsEval = {}, TypedArray = typeof Uint8Array > "u" || !getProto ? undefined2 : getProto(Uint8Array), INTRINSICS = {
- __proto__: null,
- "%AggregateError%": typeof AggregateError > "u" ? undefined2 : AggregateError,
- "%Array%": Array,
- "%ArrayBuffer%": typeof ArrayBuffer > "u" ? undefined2 : ArrayBuffer,
- "%ArrayIteratorPrototype%": hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined2,
- "%AsyncFromSyncIteratorPrototype%": undefined2,
- "%AsyncFunction%": needsEval,
- "%AsyncGenerator%": needsEval,
- "%AsyncGeneratorFunction%": needsEval,
- "%AsyncIteratorPrototype%": needsEval,
- "%Atomics%": typeof Atomics > "u" ? undefined2 : Atomics,
- "%BigInt%": typeof BigInt > "u" ? undefined2 : BigInt,
- "%BigInt64Array%": typeof BigInt64Array > "u" ? undefined2 : BigInt64Array,
- "%BigUint64Array%": typeof BigUint64Array > "u" ? undefined2 : BigUint64Array,
- "%Boolean%": Boolean,
- "%DataView%": typeof DataView > "u" ? undefined2 : DataView,
- "%Date%": Date,
- "%decodeURI%": decodeURI,
- "%decodeURIComponent%": decodeURIComponent,
- "%encodeURI%": encodeURI,
- "%encodeURIComponent%": encodeURIComponent,
- "%Error%": $Error,
- "%eval%": eval,
- // eslint-disable-line no-eval
- "%EvalError%": $EvalError,
- "%Float16Array%": typeof Float16Array > "u" ? undefined2 : Float16Array,
- "%Float32Array%": typeof Float32Array > "u" ? undefined2 : Float32Array,
- "%Float64Array%": typeof Float64Array > "u" ? undefined2 : Float64Array,
- "%FinalizationRegistry%": typeof FinalizationRegistry > "u" ? undefined2 : FinalizationRegistry,
- "%Function%": $Function,
- "%GeneratorFunction%": needsEval,
- "%Int8Array%": typeof Int8Array > "u" ? undefined2 : Int8Array,
- "%Int16Array%": typeof Int16Array > "u" ? undefined2 : Int16Array,
- "%Int32Array%": typeof Int32Array > "u" ? undefined2 : Int32Array,
- "%isFinite%": isFinite,
- "%isNaN%": isNaN,
- "%IteratorPrototype%": hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined2,
- "%JSON%": typeof JSON == "object" ? JSON : undefined2,
- "%Map%": typeof Map > "u" ? undefined2 : Map,
- "%MapIteratorPrototype%": typeof Map > "u" || !hasSymbols || !getProto ? undefined2 : getProto((/* @__PURE__ */ new Map())[Symbol.iterator]()),
- "%Math%": Math,
- "%Number%": Number,
- "%Object%": $Object,
- "%Object.getOwnPropertyDescriptor%": $gOPD,
- "%parseFloat%": parseFloat,
- "%parseInt%": parseInt,
- "%Promise%": typeof Promise > "u" ? undefined2 : Promise,
- "%Proxy%": typeof Proxy > "u" ? undefined2 : Proxy,
- "%RangeError%": $RangeError,
- "%ReferenceError%": $ReferenceError,
- "%Reflect%": typeof Reflect > "u" ? undefined2 : Reflect,
- "%RegExp%": RegExp,
- "%Set%": typeof Set > "u" ? undefined2 : Set,
- "%SetIteratorPrototype%": typeof Set > "u" || !hasSymbols || !getProto ? undefined2 : getProto((/* @__PURE__ */ new Set())[Symbol.iterator]()),
- "%SharedArrayBuffer%": typeof SharedArrayBuffer > "u" ? undefined2 : SharedArrayBuffer,
- "%String%": String,
- "%StringIteratorPrototype%": hasSymbols && getProto ? getProto(""[Symbol.iterator]()) : undefined2,
- "%Symbol%": hasSymbols ? Symbol : undefined2,
- "%SyntaxError%": $SyntaxError,
- "%ThrowTypeError%": ThrowTypeError,
- "%TypedArray%": TypedArray,
- "%TypeError%": $TypeError,
- "%Uint8Array%": typeof Uint8Array > "u" ? undefined2 : Uint8Array,
- "%Uint8ClampedArray%": typeof Uint8ClampedArray > "u" ? undefined2 : Uint8ClampedArray,
- "%Uint16Array%": typeof Uint16Array > "u" ? undefined2 : Uint16Array,
- "%Uint32Array%": typeof Uint32Array > "u" ? undefined2 : Uint32Array,
- "%URIError%": $URIError,
- "%WeakMap%": typeof WeakMap > "u" ? undefined2 : WeakMap,
- "%WeakRef%": typeof WeakRef > "u" ? undefined2 : WeakRef,
- "%WeakSet%": typeof WeakSet > "u" ? undefined2 : WeakSet,
- "%Function.prototype.call%": $call,
- "%Function.prototype.apply%": $apply,
- "%Object.defineProperty%": $defineProperty,
- "%Object.getPrototypeOf%": $ObjectGPO,
- "%Math.abs%": abs2,
- "%Math.floor%": floor,
- "%Math.max%": max2,
- "%Math.min%": min2,
- "%Math.pow%": pow,
- "%Math.round%": round3,
- "%Math.sign%": sign,
- "%Reflect.getPrototypeOf%": $ReflectGPO
- };
- if (getProto)
- try {
- null.error;
- } catch (e) {
- errorProto = getProto(getProto(e)), INTRINSICS["%Error.prototype%"] = errorProto;
- }
- var errorProto, doEval = function doEval2(name) {
- var value;
- if (name === "%AsyncFunction%")
- value = getEvalledConstructor("async function () {}");
- else if (name === "%GeneratorFunction%")
- value = getEvalledConstructor("function* () {}");
- else if (name === "%AsyncGeneratorFunction%")
- value = getEvalledConstructor("async function* () {}");
- else if (name === "%AsyncGenerator%") {
- var fn4 = doEval2("%AsyncGeneratorFunction%");
- fn4 && (value = fn4.prototype);
- } else if (name === "%AsyncIteratorPrototype%") {
- var gen = doEval2("%AsyncGenerator%");
- gen && getProto && (value = getProto(gen.prototype));
- }
- return INTRINSICS[name] = value, value;
- }, LEGACY_ALIASES = {
- __proto__: null,
- "%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
- "%ArrayPrototype%": ["Array", "prototype"],
- "%ArrayProto_entries%": ["Array", "prototype", "entries"],
- "%ArrayProto_forEach%": ["Array", "prototype", "forEach"],
- "%ArrayProto_keys%": ["Array", "prototype", "keys"],
- "%ArrayProto_values%": ["Array", "prototype", "values"],
- "%AsyncFunctionPrototype%": ["AsyncFunction", "prototype"],
- "%AsyncGenerator%": ["AsyncGeneratorFunction", "prototype"],
- "%AsyncGeneratorPrototype%": ["AsyncGeneratorFunction", "prototype", "prototype"],
- "%BooleanPrototype%": ["Boolean", "prototype"],
- "%DataViewPrototype%": ["DataView", "prototype"],
- "%DatePrototype%": ["Date", "prototype"],
- "%ErrorPrototype%": ["Error", "prototype"],
- "%EvalErrorPrototype%": ["EvalError", "prototype"],
- "%Float32ArrayPrototype%": ["Float32Array", "prototype"],
- "%Float64ArrayPrototype%": ["Float64Array", "prototype"],
- "%FunctionPrototype%": ["Function", "prototype"],
- "%Generator%": ["GeneratorFunction", "prototype"],
- "%GeneratorPrototype%": ["GeneratorFunction", "prototype", "prototype"],
- "%Int8ArrayPrototype%": ["Int8Array", "prototype"],
- "%Int16ArrayPrototype%": ["Int16Array", "prototype"],
- "%Int32ArrayPrototype%": ["Int32Array", "prototype"],
- "%JSONParse%": ["JSON", "parse"],
- "%JSONStringify%": ["JSON", "stringify"],
- "%MapPrototype%": ["Map", "prototype"],
- "%NumberPrototype%": ["Number", "prototype"],
- "%ObjectPrototype%": ["Object", "prototype"],
- "%ObjProto_toString%": ["Object", "prototype", "toString"],
- "%ObjProto_valueOf%": ["Object", "prototype", "valueOf"],
- "%PromisePrototype%": ["Promise", "prototype"],
- "%PromiseProto_then%": ["Promise", "prototype", "then"],
- "%Promise_all%": ["Promise", "all"],
- "%Promise_reject%": ["Promise", "reject"],
- "%Promise_resolve%": ["Promise", "resolve"],
- "%RangeErrorPrototype%": ["RangeError", "prototype"],
- "%ReferenceErrorPrototype%": ["ReferenceError", "prototype"],
- "%RegExpPrototype%": ["RegExp", "prototype"],
- "%SetPrototype%": ["Set", "prototype"],
- "%SharedArrayBufferPrototype%": ["SharedArrayBuffer", "prototype"],
- "%StringPrototype%": ["String", "prototype"],
- "%SymbolPrototype%": ["Symbol", "prototype"],
- "%SyntaxErrorPrototype%": ["SyntaxError", "prototype"],
- "%TypedArrayPrototype%": ["TypedArray", "prototype"],
- "%TypeErrorPrototype%": ["TypeError", "prototype"],
- "%Uint8ArrayPrototype%": ["Uint8Array", "prototype"],
- "%Uint8ClampedArrayPrototype%": ["Uint8ClampedArray", "prototype"],
- "%Uint16ArrayPrototype%": ["Uint16Array", "prototype"],
- "%Uint32ArrayPrototype%": ["Uint32Array", "prototype"],
- "%URIErrorPrototype%": ["URIError", "prototype"],
- "%WeakMapPrototype%": ["WeakMap", "prototype"],
- "%WeakSetPrototype%": ["WeakSet", "prototype"]
- }, bind = require_function_bind(), hasOwn2 = require_hasown(), $concat = bind.call($call, Array.prototype.concat), $spliceApply = bind.call($apply, Array.prototype.splice), $replace = bind.call($call, String.prototype.replace), $strSlice = bind.call($call, String.prototype.slice), $exec = bind.call($call, RegExp.prototype.exec), rePropName2 = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, reEscapeChar2 = /\\(\\)?/g, stringToPath2 = function(string) {
- var first = $strSlice(string, 0, 1), last2 = $strSlice(string, -1);
- if (first === "%" && last2 !== "%")
- throw new $SyntaxError("invalid intrinsic syntax, expected closing `%`");
- if (last2 === "%" && first !== "%")
- throw new $SyntaxError("invalid intrinsic syntax, expected opening `%`");
- var result = [];
- return $replace(string, rePropName2, function(match3, number, quote, subString) {
- result[result.length] = quote ? $replace(subString, reEscapeChar2, "$1") : number || match3;
- }), result;
- }, getBaseIntrinsic = function(name, allowMissing) {
- var intrinsicName = name, alias;
- if (hasOwn2(LEGACY_ALIASES, intrinsicName) && (alias = LEGACY_ALIASES[intrinsicName], intrinsicName = "%" + alias[0] + "%"), hasOwn2(INTRINSICS, intrinsicName)) {
- var value = INTRINSICS[intrinsicName];
- if (value === needsEval && (value = doEval(intrinsicName)), typeof value > "u" && !allowMissing)
- throw new $TypeError("intrinsic " + name + " exists, but is not available. Please file an issue!");
- return {
- alias,
- name: intrinsicName,
- value
- };
- }
- throw new $SyntaxError("intrinsic " + name + " does not exist!");
- };
- module2.exports = function(name, allowMissing) {
- if (typeof name != "string" || name.length === 0)
- throw new $TypeError("intrinsic name must be a non-empty string");
- if (arguments.length > 1 && typeof allowMissing != "boolean")
- throw new $TypeError('"allowMissing" argument must be a boolean');
- if ($exec(/^%?[^%]*%?$/, name) === null)
- throw new $SyntaxError("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
- var parts = stringToPath2(name), intrinsicBaseName = parts.length > 0 ? parts[0] : "", intrinsic = getBaseIntrinsic("%" + intrinsicBaseName + "%", allowMissing), intrinsicRealName = intrinsic.name, value = intrinsic.value, skipFurtherCaching = !1, alias = intrinsic.alias;
- alias && (intrinsicBaseName = alias[0], $spliceApply(parts, $concat([0, 1], alias)));
- for (var i = 1, isOwn = !0; i < parts.length; i += 1) {
- var part = parts[i], first = $strSlice(part, 0, 1), last2 = $strSlice(part, -1);
- if ((first === '"' || first === "'" || first === "`" || last2 === '"' || last2 === "'" || last2 === "`") && first !== last2)
- throw new $SyntaxError("property names with quotes must have matching quotes");
- if ((part === "constructor" || !isOwn) && (skipFurtherCaching = !0), intrinsicBaseName += "." + part, intrinsicRealName = "%" + intrinsicBaseName + "%", hasOwn2(INTRINSICS, intrinsicRealName))
- value = INTRINSICS[intrinsicRealName];
- else if (value != null) {
- if (!(part in value)) {
- if (!allowMissing)
- throw new $TypeError("base intrinsic for " + name + " exists, but the property is not available.");
- return;
- }
- if ($gOPD && i + 1 >= parts.length) {
- var desc = $gOPD(value, part);
- isOwn = !!desc, isOwn && "get" in desc && !("originalValue" in desc.get) ? value = desc.get : value = value[part];
- } else
- isOwn = hasOwn2(value, part), value = value[part];
- isOwn && !skipFurtherCaching && (INTRINSICS[intrinsicRealName] = value);
- }
- }
- return value;
- };
- }
- }), require_call_bound = __commonJS2({
- "node_modules/.pnpm/call-bound@1.0.4/node_modules/call-bound/index.js"(exports, module2) {
- "use strict";
- var GetIntrinsic = require_get_intrinsic(), callBindBasic = require_call_bind_apply_helpers(), $indexOf = callBindBasic([GetIntrinsic("%String.prototype.indexOf%")]);
- module2.exports = function(name, allowMissing) {
- var intrinsic = (
- /** @type {(this: unknown, ...args: unknown[]) => unknown} */
- GetIntrinsic(name, !!allowMissing)
- );
- return typeof intrinsic == "function" && $indexOf(name, ".prototype.") > -1 ? callBindBasic(
- /** @type {const} */
- [intrinsic]
- ) : intrinsic;
- };
- }
- }), require_shams2 = __commonJS2({
- "node_modules/.pnpm/has-tostringtag@1.0.2/node_modules/has-tostringtag/shams.js"(exports, module2) {
- "use strict";
- var hasSymbols = require_shams();
- module2.exports = function() {
- return hasSymbols() && !!Symbol.toStringTag;
- };
- }
- }), require_is_regex = __commonJS2({
- "node_modules/.pnpm/is-regex@1.2.1/node_modules/is-regex/index.js"(exports, module2) {
- "use strict";
- var callBound = require_call_bound(), hasToStringTag = require_shams2()(), hasOwn2 = require_hasown(), gOPD = require_gopd(), fn4;
- hasToStringTag ? ($exec = callBound("RegExp.prototype.exec"), isRegexMarker = {}, throwRegexMarker = function() {
- throw isRegexMarker;
- }, badStringifier = {
- toString: throwRegexMarker,
- valueOf: throwRegexMarker
- }, typeof Symbol.toPrimitive == "symbol" && (badStringifier[Symbol.toPrimitive] = throwRegexMarker), fn4 = function(value) {
- if (!value || typeof value != "object")
- return !1;
- var descriptor = (
- /** @type {NonNullable<typeof gOPD>} */
- gOPD(
- /** @type {{ lastIndex?: unknown }} */
- value,
- "lastIndex"
- )
- ), hasLastIndexDataProperty = descriptor && hasOwn2(descriptor, "value");
- if (!hasLastIndexDataProperty)
- return !1;
- try {
- $exec(
- value,
- /** @type {string} */
- /** @type {unknown} */
- badStringifier
- );
- } catch (e) {
- return e === isRegexMarker;
- }
- }) : ($toString = callBound("Object.prototype.toString"), regexClass = "[object RegExp]", fn4 = function(value) {
- return !value || typeof value != "object" && typeof value != "function" ? !1 : $toString(value) === regexClass;
- });
- var $exec, isRegexMarker, throwRegexMarker, badStringifier, $toString, regexClass;
- module2.exports = fn4;
- }
- }), require_is_function = __commonJS2({
- "node_modules/.pnpm/is-function@1.0.2/node_modules/is-function/index.js"(exports, module2) {
- module2.exports = isFunction32;
- var toString22 = Object.prototype.toString;
- function isFunction32(fn4) {
- if (!fn4)
- return !1;
- var string = toString22.call(fn4);
- return string === "[object Function]" || typeof fn4 == "function" && string !== "[object RegExp]" || typeof window < "u" && // IE8 and below
- (fn4 === window.setTimeout || fn4 === window.alert || fn4 === window.confirm || fn4 === window.prompt);
- }
- }
- }), require_safe_regex_test = __commonJS2({
- "node_modules/.pnpm/safe-regex-test@1.1.0/node_modules/safe-regex-test/index.js"(exports, module2) {
- "use strict";
- var callBound = require_call_bound(), isRegex = require_is_regex(), $exec = callBound("RegExp.prototype.exec"), $TypeError = require_type();
- module2.exports = function(regex) {
- if (!isRegex(regex))
- throw new $TypeError("`regex` must be a RegExp");
- return function(s3) {
- return $exec(regex, s3) !== null;
- };
- };
- }
- }), require_is_symbol = __commonJS2({
- "node_modules/.pnpm/is-symbol@1.1.1/node_modules/is-symbol/index.js"(exports, module2) {
- "use strict";
- var callBound = require_call_bound(), $toString = callBound("Object.prototype.toString"), hasSymbols = require_has_symbols()(), safeRegexTest = require_safe_regex_test();
- hasSymbols ? ($symToStr = callBound("Symbol.prototype.toString"), isSymString = safeRegexTest(/^Symbol\(.*\)$/), isSymbolObject = function(value) {
- return typeof value.valueOf() != "symbol" ? !1 : isSymString($symToStr(value));
- }, module2.exports = function(value) {
- if (typeof value == "symbol")
- return !0;
- if (!value || typeof value != "object" || $toString(value) !== "[object Symbol]")
- return !1;
- try {
- return isSymbolObject(value);
- } catch {
- return !1;
- }
- }) : module2.exports = function(value) {
- return !1;
- };
- var $symToStr, isSymString, isSymbolObject;
- }
- }), import_is_regex = __toESM2(require_is_regex()), import_is_function = __toESM2(require_is_function()), import_is_symbol = __toESM2(require_is_symbol());
- function isObject(val) {
- return val != null && typeof val == "object" && Array.isArray(val) === !1;
- }
- var freeGlobal = typeof global == "object" && global && global.Object === Object && global, freeGlobal_default = freeGlobal, freeSelf = typeof self == "object" && self && self.Object === Object && self, root = freeGlobal_default || freeSelf || Function("return this")(), root_default = root, Symbol2 = root_default.Symbol, Symbol_default = Symbol2, objectProto = Object.prototype, hasOwnProperty = objectProto.hasOwnProperty, nativeObjectToString = objectProto.toString, symToStringTag = Symbol_default ? Symbol_default.toStringTag : void 0;
- function getRawTag(value) {
- var isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag];
- try {
- value[symToStringTag] = void 0;
- var unmasked = !0;
- } catch {
- }
- var result = nativeObjectToString.call(value);
- return unmasked && (isOwn ? value[symToStringTag] = tag : delete value[symToStringTag]), result;
- }
- var getRawTag_default = getRawTag, objectProto2 = Object.prototype, nativeObjectToString2 = objectProto2.toString;
- function objectToString(value) {
- return nativeObjectToString2.call(value);
- }
- var objectToString_default = objectToString, nullTag = "[object Null]", undefinedTag = "[object Undefined]", symToStringTag2 = Symbol_default ? Symbol_default.toStringTag : void 0;
- function baseGetTag(value) {
- return value == null ? value === void 0 ? undefinedTag : nullTag : symToStringTag2 && symToStringTag2 in Object(value) ? getRawTag_default(value) : objectToString_default(value);
- }
- var baseGetTag_default = baseGetTag;
- function isObjectLike(value) {
- return value != null && typeof value == "object";
- }
- var isObjectLike_default = isObjectLike, symbolTag = "[object Symbol]";
- function isSymbol(value) {
- return typeof value == "symbol" || isObjectLike_default(value) && baseGetTag_default(value) == symbolTag;
- }
- var isSymbol_default = isSymbol;
- function arrayMap(array, iteratee) {
- for (var index4 = -1, length2 = array == null ? 0 : array.length, result = Array(length2); ++index4 < length2; )
- result[index4] = iteratee(array[index4], index4, array);
- return result;
- }
- var arrayMap_default = arrayMap, isArray = Array.isArray, isArray_default = isArray, INFINITY = 1 / 0, symbolProto = Symbol_default ? Symbol_default.prototype : void 0, symbolToString = symbolProto ? symbolProto.toString : void 0;
- function baseToString(value) {
- if (typeof value == "string")
- return value;
- if (isArray_default(value))
- return arrayMap_default(value, baseToString) + "";
- if (isSymbol_default(value))
- return symbolToString ? symbolToString.call(value) : "";
- var result = value + "";
- return result == "0" && 1 / value == -INFINITY ? "-0" : result;
- }
- var baseToString_default = baseToString;
- function isObject2(value) {
- var type5 = typeof value;
- return value != null && (type5 == "object" || type5 == "function");
- }
- var isObject_default = isObject2, asyncTag = "[object AsyncFunction]", funcTag = "[object Function]", genTag = "[object GeneratorFunction]", proxyTag = "[object Proxy]";
- function isFunction(value) {
- if (!isObject_default(value))
- return !1;
- var tag = baseGetTag_default(value);
- return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
- }
- var isFunction_default = isFunction, coreJsData = root_default["__core-js_shared__"], coreJsData_default = coreJsData, maskSrcKey = (function() {
- var uid = /[^.]+$/.exec(coreJsData_default && coreJsData_default.keys && coreJsData_default.keys.IE_PROTO || "");
- return uid ? "Symbol(src)_1." + uid : "";
- })();
- function isMasked(func) {
- return !!maskSrcKey && maskSrcKey in func;
- }
- var isMasked_default = isMasked, funcProto = Function.prototype, funcToString = funcProto.toString;
- function toSource(func) {
- if (func != null) {
- try {
- return funcToString.call(func);
- } catch {
- }
- try {
- return func + "";
- } catch {
- }
- }
- return "";
- }
- var toSource_default = toSource, reRegExpChar = /[\\^$.*+?()[\]{}|]/g, reIsHostCtor = /^\[object .+?Constructor\]$/, funcProto2 = Function.prototype, objectProto3 = Object.prototype, funcToString2 = funcProto2.toString, hasOwnProperty2 = objectProto3.hasOwnProperty, reIsNative = RegExp(
- "^" + funcToString2.call(hasOwnProperty2).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
- );
- function baseIsNative(value) {
- if (!isObject_default(value) || isMasked_default(value))
- return !1;
- var pattern = isFunction_default(value) ? reIsNative : reIsHostCtor;
- return pattern.test(toSource_default(value));
- }
- var baseIsNative_default = baseIsNative;
- function getValue(object, key) {
- return object?.[key];
- }
- var getValue_default = getValue;
- function getNative(object, key) {
- var value = getValue_default(object, key);
- return baseIsNative_default(value) ? value : void 0;
- }
- var getNative_default = getNative;
- function eq(value, other) {
- return value === other || value !== value && other !== other;
- }
- var eq_default = eq, reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, reIsPlainProp = /^\w*$/;
- function isKey(value, object) {
- if (isArray_default(value))
- return !1;
- var type5 = typeof value;
- return type5 == "number" || type5 == "symbol" || type5 == "boolean" || value == null || isSymbol_default(value) ? !0 : reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object(object);
- }
- var isKey_default = isKey, nativeCreate = getNative_default(Object, "create"), nativeCreate_default = nativeCreate;
- function hashClear() {
- this.__data__ = nativeCreate_default ? nativeCreate_default(null) : {}, this.size = 0;
- }
- var hashClear_default = hashClear;
- function hashDelete(key) {
- var result = this.has(key) && delete this.__data__[key];
- return this.size -= result ? 1 : 0, result;
- }
- var hashDelete_default = hashDelete, HASH_UNDEFINED = "__lodash_hash_undefined__", objectProto4 = Object.prototype, hasOwnProperty3 = objectProto4.hasOwnProperty;
- function hashGet(key) {
- var data = this.__data__;
- if (nativeCreate_default) {
- var result = data[key];
- return result === HASH_UNDEFINED ? void 0 : result;
- }
- return hasOwnProperty3.call(data, key) ? data[key] : void 0;
- }
- var hashGet_default = hashGet, objectProto5 = Object.prototype, hasOwnProperty4 = objectProto5.hasOwnProperty;
- function hashHas(key) {
- var data = this.__data__;
- return nativeCreate_default ? data[key] !== void 0 : hasOwnProperty4.call(data, key);
- }
- var hashHas_default = hashHas, HASH_UNDEFINED2 = "__lodash_hash_undefined__";
- function hashSet(key, value) {
- var data = this.__data__;
- return this.size += this.has(key) ? 0 : 1, data[key] = nativeCreate_default && value === void 0 ? HASH_UNDEFINED2 : value, this;
- }
- var hashSet_default = hashSet;
- function Hash(entries) {
- var index4 = -1, length2 = entries == null ? 0 : entries.length;
- for (this.clear(); ++index4 < length2; ) {
- var entry = entries[index4];
- this.set(entry[0], entry[1]);
- }
- }
- Hash.prototype.clear = hashClear_default;
- Hash.prototype.delete = hashDelete_default;
- Hash.prototype.get = hashGet_default;
- Hash.prototype.has = hashHas_default;
- Hash.prototype.set = hashSet_default;
- var Hash_default = Hash;
- function listCacheClear() {
- this.__data__ = [], this.size = 0;
- }
- var listCacheClear_default = listCacheClear;
- function assocIndexOf(array, key) {
- for (var length2 = array.length; length2--; )
- if (eq_default(array[length2][0], key))
- return length2;
- return -1;
- }
- var assocIndexOf_default = assocIndexOf, arrayProto = Array.prototype, splice = arrayProto.splice;
- function listCacheDelete(key) {
- var data = this.__data__, index4 = assocIndexOf_default(data, key);
- if (index4 < 0)
- return !1;
- var lastIndex = data.length - 1;
- return index4 == lastIndex ? data.pop() : splice.call(data, index4, 1), --this.size, !0;
- }
- var listCacheDelete_default = listCacheDelete;
- function listCacheGet(key) {
- var data = this.__data__, index4 = assocIndexOf_default(data, key);
- return index4 < 0 ? void 0 : data[index4][1];
- }
- var listCacheGet_default = listCacheGet;
- function listCacheHas(key) {
- return assocIndexOf_default(this.__data__, key) > -1;
- }
- var listCacheHas_default = listCacheHas;
- function listCacheSet(key, value) {
- var data = this.__data__, index4 = assocIndexOf_default(data, key);
- return index4 < 0 ? (++this.size, data.push([key, value])) : data[index4][1] = value, this;
- }
- var listCacheSet_default = listCacheSet;
- function ListCache(entries) {
- var index4 = -1, length2 = entries == null ? 0 : entries.length;
- for (this.clear(); ++index4 < length2; ) {
- var entry = entries[index4];
- this.set(entry[0], entry[1]);
- }
- }
- ListCache.prototype.clear = listCacheClear_default;
- ListCache.prototype.delete = listCacheDelete_default;
- ListCache.prototype.get = listCacheGet_default;
- ListCache.prototype.has = listCacheHas_default;
- ListCache.prototype.set = listCacheSet_default;
- var ListCache_default = ListCache, Map2 = getNative_default(root_default, "Map"), Map_default = Map2;
- function mapCacheClear() {
- this.size = 0, this.__data__ = {
- hash: new Hash_default(),
- map: new (Map_default || ListCache_default)(),
- string: new Hash_default()
- };
- }
- var mapCacheClear_default = mapCacheClear;
- function isKeyable(value) {
- var type5 = typeof value;
- return type5 == "string" || type5 == "number" || type5 == "symbol" || type5 == "boolean" ? value !== "__proto__" : value === null;
- }
- var isKeyable_default = isKeyable;
- function getMapData(map2, key) {
- var data = map2.__data__;
- return isKeyable_default(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
- }
- var getMapData_default = getMapData;
- function mapCacheDelete(key) {
- var result = getMapData_default(this, key).delete(key);
- return this.size -= result ? 1 : 0, result;
- }
- var mapCacheDelete_default = mapCacheDelete;
- function mapCacheGet(key) {
- return getMapData_default(this, key).get(key);
- }
- var mapCacheGet_default = mapCacheGet;
- function mapCacheHas(key) {
- return getMapData_default(this, key).has(key);
- }
- var mapCacheHas_default = mapCacheHas;
- function mapCacheSet(key, value) {
- var data = getMapData_default(this, key), size = data.size;
- return data.set(key, value), this.size += data.size == size ? 0 : 1, this;
- }
- var mapCacheSet_default = mapCacheSet;
- function MapCache(entries) {
- var index4 = -1, length2 = entries == null ? 0 : entries.length;
- for (this.clear(); ++index4 < length2; ) {
- var entry = entries[index4];
- this.set(entry[0], entry[1]);
- }
- }
- MapCache.prototype.clear = mapCacheClear_default;
- MapCache.prototype.delete = mapCacheDelete_default;
- MapCache.prototype.get = mapCacheGet_default;
- MapCache.prototype.has = mapCacheHas_default;
- MapCache.prototype.set = mapCacheSet_default;
- var MapCache_default = MapCache, FUNC_ERROR_TEXT = "Expected a function";
- function memoize(func, resolver) {
- if (typeof func != "function" || resolver != null && typeof resolver != "function")
- throw new TypeError(FUNC_ERROR_TEXT);
- var memoized = function() {
- var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache;
- if (cache.has(key))
- return cache.get(key);
- var result = func.apply(this, args);
- return memoized.cache = cache.set(key, result) || cache, result;
- };
- return memoized.cache = new (memoize.Cache || MapCache_default)(), memoized;
- }
- memoize.Cache = MapCache_default;
- var memoize_default = memoize, MAX_MEMOIZE_SIZE = 500;
- function memoizeCapped(func) {
- var result = memoize_default(func, function(key) {
- return cache.size === MAX_MEMOIZE_SIZE && cache.clear(), key;
- }), cache = result.cache;
- return result;
- }
- var memoizeCapped_default = memoizeCapped, rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, reEscapeChar = /\\(\\)?/g, stringToPath = memoizeCapped_default(function(string) {
- var result = [];
- return string.charCodeAt(0) === 46 && result.push(""), string.replace(rePropName, function(match3, number, quote, subString) {
- result.push(quote ? subString.replace(reEscapeChar, "$1") : number || match3);
- }), result;
- }), stringToPath_default = stringToPath;
- function toString(value) {
- return value == null ? "" : baseToString_default(value);
- }
- var toString_default = toString;
- function castPath(value, object) {
- return isArray_default(value) ? value : isKey_default(value, object) ? [value] : stringToPath_default(toString_default(value));
- }
- var castPath_default = castPath, INFINITY2 = 1 / 0;
- function toKey(value) {
- if (typeof value == "string" || isSymbol_default(value))
- return value;
- var result = value + "";
- return result == "0" && 1 / value == -INFINITY2 ? "-0" : result;
- }
- var toKey_default = toKey;
- function baseGet(object, path) {
- path = castPath_default(path, object);
- for (var index4 = 0, length2 = path.length; object != null && index4 < length2; )
- object = object[toKey_default(path[index4++])];
- return index4 && index4 == length2 ? object : void 0;
- }
- var baseGet_default = baseGet;
- function get(object, path, defaultValue) {
- var result = object == null ? void 0 : baseGet_default(object, path);
- return result === void 0 ? defaultValue : result;
- }
- var get_default = get, isObject3 = isObject, dateFormat = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{3})?Z$/, isJSON = (input2) => input2.match(/^[\[\{\"\}].*[\]\}\"]$/);
- function convertUnconventionalData(data) {
- if (!isObject3(data))
- return data;
- let result = data, wasMutated = !1;
- return typeof Event < "u" && data instanceof Event && (result = extractEventHiddenProperties(result), wasMutated = !0), result = Object.keys(result).reduce((acc, key) => {
- try {
- result[key] && result[key].toJSON, acc[key] = result[key];
- } catch {
- wasMutated = !0;
- }
- return acc;
- }, {}), wasMutated ? result : data;
- }
- var replacer = function(options) {
- let objects, map2, stack, keys3;
- return function(key, value) {
- try {
- if (key === "")
- return keys3 = [], objects = /* @__PURE__ */ new Map([[value, "[]"]]), map2 = /* @__PURE__ */ new Map(), stack = [], value;
- let origin = map2.get(this) || this;
- for (; stack.length && origin !== stack[0]; )
- stack.shift(), keys3.pop();
- if (typeof value == "boolean")
- return value;
- if (value === void 0)
- return options.allowUndefined ? "_undefined_" : void 0;
- if (value === null)
- return null;
- if (typeof value == "number")
- return value === Number.NEGATIVE_INFINITY ? "_-Infinity_" : value === Number.POSITIVE_INFINITY ? "_Infinity_" : Number.isNaN(value) ? "_NaN_" : value;
- if (typeof value == "bigint")
- return `_bigint_${value.toString()}`;
- if (typeof value == "string")
- return dateFormat.test(value) ? options.allowDate ? `_date_${value}` : void 0 : value;
- if ((0, import_is_regex.default)(value))
- return options.allowRegExp ? `_regexp_${value.flags}|${value.source}` : void 0;
- if ((0, import_is_function.default)(value))
- return;
- if ((0, import_is_symbol.default)(value)) {
- if (!options.allowSymbol)
- return;
- let globalRegistryKey = Symbol.keyFor(value);
- return globalRegistryKey !== void 0 ? `_gsymbol_${globalRegistryKey}` : `_symbol_${value.toString().slice(7, -1)}`;
- }
- if (stack.length >= options.maxDepth)
- return Array.isArray(value) ? `[Array(${value.length})]` : "[Object]";
- if (value === this)
- return `_duplicate_${JSON.stringify(keys3)}`;
- if (value instanceof Error && options.allowError)
- return {
- __isConvertedError__: !0,
- errorProperties: {
- // @ts-expect-error cause is not defined in the current tsconfig target(es2020)
- ...value.cause ? { cause: value.cause } : {},
- ...value,
- name: value.name,
- message: value.message,
- stack: value.stack,
- "_constructor-name_": value.constructor.name
- }
- };
- if (value?.constructor?.name && value.constructor.name !== "Object" && !Array.isArray(value)) {
- let found2 = objects.get(value);
- if (!found2) {
- let plainObject = {
- __isClassInstance__: !0,
- __className__: value.constructor.name,
- ...Object.getOwnPropertyNames(value).reduce(
- (acc, prop) => {
- try {
- acc[prop] = value[prop];
- } catch {
- }
- return acc;
- },
- {}
- )
- };
- return keys3.push(key), stack.unshift(plainObject), objects.set(value, JSON.stringify(keys3)), value !== plainObject && map2.set(value, plainObject), plainObject;
- }
- return `_duplicate_${found2}`;
- }
- let found = objects.get(value);
- if (!found) {
- let converted = Array.isArray(value) ? value : convertUnconventionalData(value);
- return keys3.push(key), stack.unshift(converted), objects.set(value, JSON.stringify(keys3)), value !== converted && map2.set(value, converted), converted;
- }
- return `_duplicate_${found}`;
- } catch {
- return;
- }
- };
- }, reviver = function(options) {
- let refs = [], root2;
- return function(key, value) {
- if (key === "" && (root2 = value, refs.forEach(({ target, container, replacement }) => {
- let replacementArr = isJSON(replacement) ? JSON.parse(replacement) : replacement.split(".");
- replacementArr.length === 0 ? container[target] = root2 : container[target] = get_default(root2, replacementArr);
- })), key === "_constructor-name_")
- return value;
- if (isObject3(value) && value.__isConvertedError__) {
- let { message, ...properties } = value.errorProperties, error = new Error(message);
- return Object.assign(error, properties), error;
- }
- if (typeof value == "string" && value.startsWith("_regexp_") && options.allowRegExp) {
- let [, flags, source] = value.match(/_regexp_([^|]*)\|(.*)/) || [];
- return new RegExp(source, flags);
- }
- return typeof value == "string" && value.startsWith("_date_") && options.allowDate ? new Date(value.replace("_date_", "")) : typeof value == "string" && value.startsWith("_duplicate_") ? (refs.push({ target: key, container: this, replacement: value.replace(/^_duplicate_/, "") }), null) : typeof value == "string" && value.startsWith("_symbol_") && options.allowSymbol ? Symbol(value.replace("_symbol_", "")) : typeof value == "string" && value.startsWith("_gsymbol_") && options.allowSymbol ? Symbol.for(value.replace("_gsymbol_", "")) : typeof value == "string" && value === "_-Infinity_" ? Number.NEGATIVE_INFINITY : typeof value == "string" && value === "_Infinity_" ? Number.POSITIVE_INFINITY : typeof value == "string" && value === "_NaN_" ? Number.NaN : typeof value == "string" && value.startsWith("_bigint_") && typeof BigInt == "function" ? BigInt(value.replace("_bigint_", "")) : value;
- };
- }, defaultOptions = {
- maxDepth: 10,
- space: void 0,
- allowRegExp: !0,
- allowDate: !0,
- allowError: !0,
- allowUndefined: !0,
- allowSymbol: !0
- }, stringify = (data, options = {}) => {
- let mergedOptions = { ...defaultOptions, ...options };
- return JSON.stringify(convertUnconventionalData(data), replacer(mergedOptions), options.space);
- }, mutator = () => {
- let mutated = /* @__PURE__ */ new Map();
- return function mutateUndefined(value) {
- isObject3(value) && Object.entries(value).forEach(([k, v]) => {
- v === "_undefined_" ? value[k] = void 0 : mutated.get(v) || (mutated.set(v, !0), mutateUndefined(v));
- }), Array.isArray(value) && value.forEach((v, index4) => {
- v === "_undefined_" ? (mutated.set(v, !0), value[index4] = void 0) : mutated.get(v) || (mutated.set(v, !0), mutateUndefined(v));
- });
- };
- }, parse = (data, options = {}) => {
- let mergedOptions = { ...defaultOptions, ...options }, result = JSON.parse(data, reviver(mergedOptions));
- return mutator()(result), result;
- };
-
- // ../../node_modules/tiny-invariant/dist/esm/tiny-invariant.js
- var isProduction = !0, prefix = "Invariant failed";
- function invariant(condition, message) {
- if (!condition) {
- if (isProduction)
- throw new Error(prefix);
- var provided = typeof message == "function" ? message() : message, value = provided ? "".concat(prefix, ": ").concat(provided) : prefix;
- throw new Error(value);
- }
- }
-
- // src/channels/postmessage/getEventSourceUrl.ts
- init_client_logger();
- var pickFrameByRefId = (candidates, refId) => {
- if (candidates.length === 1)
- return candidates[0];
- if (!(candidates.length === 0 || !refId))
- return candidates.find(
- (el) => (el.getAttribute("src") ?? "").includes(`refId=${encodeURIComponent(refId)}`)
- );
- }, getEventSourceUrl = (event, refId) => {
- let candidates = Array.from(
- document.querySelectorAll("iframe[data-is-storybook]")
- ).filter((element) => {
- try {
- return element.contentWindow?.location.origin === event.source.location.origin && element.contentWindow?.location.pathname === event.source.location.pathname;
- } catch {
- }
- try {
- return element.contentWindow === event.source;
- } catch {
- }
- let src2 = element.getAttribute("src"), origin;
- try {
- if (!src2)
- return !1;
- ({ origin } = new URL(src2, document.location.toString()));
- } catch {
- return !1;
- }
- return origin === event.origin;
- }), src = pickFrameByRefId(candidates, refId)?.getAttribute("src");
- if (src) {
- let { protocol, host, pathname } = new URL(src, document.location.toString());
- return `${protocol}//${host}${pathname}`;
- }
- return candidates.length > 1 && logger.error("found multiple candidates for event source"), null;
- };
-
- // src/channels/postmessage/index.ts
- var { document: document2, location: location2 } = scope, KEY = "storybook-channel", defaultEventOptions = { maxDepth: 25 }, PostMessageTransport = class {
- constructor(config4) {
- this.config = config4;
- this.connected = !1;
- if (this.buffer = [], typeof scope?.addEventListener == "function" && scope.addEventListener("message", this.handleEvent.bind(this), !1), config4.page !== "manager" && config4.page !== "preview")
- throw new Error(`postmsg-channel: "config.page" cannot be "${config4.page}"`);
- }
- setHandler(handler) {
- this.handler = (...args) => {
- handler.apply(this, args), !this.connected && this.getLocalFrame().length && (this.flush(), this.connected = !0);
- };
- }
- /**
- * Sends `event` to the associated window. If the window does not yet exist the event will be
- * stored in a buffer and sent when the window exists.
- *
- * @param event
- */
- send(event, options) {
- let {
- target,
- // telejson options
- allowRegExp,
- allowSymbol,
- allowDate,
- allowError,
- allowUndefined,
- maxDepth,
- space
- } = options || {}, eventOptions = Object.fromEntries(
- Object.entries({
- allowRegExp,
- allowSymbol,
- allowDate,
- allowError,
- allowUndefined,
- maxDepth,
- space
- }).filter(([k, v]) => typeof v < "u")
- ), stringifyOptions = {
- ...defaultEventOptions,
- ...scope.CHANNEL_OPTIONS || {},
- ...eventOptions
- }, frames = this.getFrames(target), query = new URLSearchParams(location2?.search || ""), data = stringify(
- {
- key: KEY,
- event,
- refId: query.get("refId")
- },
- stringifyOptions
- );
- return frames.length ? (this.buffer.length && this.flush(), frames.forEach((f4) => {
- try {
- f4.postMessage(data, "*");
- } catch {
- logger.error("sending over postmessage fail");
- }
- }), Promise.resolve(null)) : new Promise((resolve, reject) => {
- this.buffer.push({ event, resolve, reject });
- });
- }
- flush() {
- let { buffer } = this;
- this.buffer = [], buffer.forEach((item) => {
- this.send(item.event).then(item.resolve).catch(item.reject);
- });
- }
- getFrames(target) {
- if (this.config.page === "manager") {
- let list = Array.from(
- document2.querySelectorAll("iframe[data-is-storybook][data-is-loaded]")
- ).flatMap((e) => {
- try {
- return e.contentWindow && e.dataset.isStorybook !== void 0 && e.id === target ? [e.contentWindow] : [];
- } catch {
- return [];
- }
- });
- return list?.length ? list : this.getCurrentFrames();
- }
- return scope && scope.parent && scope.parent !== scope.self ? [scope.parent] : [];
- }
- getCurrentFrames() {
- return this.config.page === "manager" ? Array.from(
- document2.querySelectorAll('[data-is-storybook="true"]')
- ).flatMap((e) => e.contentWindow ? [e.contentWindow] : []) : scope && scope.parent ? [scope.parent] : [];
- }
- getLocalFrame() {
- return this.config.page === "manager" ? Array.from(
- document2.querySelectorAll("#storybook-preview-iframe")
- ).flatMap((e) => e.contentWindow ? [e.contentWindow] : []) : scope && scope.parent ? [scope.parent] : [];
- }
- handleEvent(rawEvent) {
- try {
- let { data } = rawEvent, { key, event, refId } = typeof data == "string" && isJSON(data) ? parse(data, scope.CHANNEL_OPTIONS || {}) : data;
- if (key === KEY) {
- let pageString = this.config.page === "manager" ? '<span style="color: #37D5D3; background: black"> manager </span>' : '<span style="color: #1EA7FD; background: black"> preview </span>', eventString = Object.values(core_events_exports).includes(event.type) ? `<span style="color: #FF4785">${event.type}</span>` : `<span style="color: #FFAE00">${event.type}</span>`;
- if (refId && (event.refId = refId), event.source = this.config.page === "preview" ? rawEvent.origin : getEventSourceUrl(rawEvent, refId), !event.source) {
- pretty.error(
- `${pageString} received ${eventString} but was unable to determine the source of the event`
- );
- return;
- }
- let message = `${pageString} received ${eventString} (${data.length})`;
- pretty.debug(
- location2.origin !== event.source ? message : `${message} <span style="color: gray">(on ${location2.origin} from ${event.source})</span>`,
- ...event.args
- ), invariant(this.handler, "ChannelHandler should be set"), this.handler(event);
- }
- } catch (error) {
- logger.error(error);
- }
- }
- };
-
- // src/channels/websocket/index.ts
- init_dist();
- var { WebSocket } = scope, HEARTBEAT_INTERVAL = 15e3, HEARTBEAT_MAX_LATENCY = 5e3, WebsocketTransport = class {
- constructor({ url, onError, page }) {
- this.buffer = [];
- this.isReady = !1;
- this.isClosed = !1;
- this.pingTimeout = 0;
- this.socket = new WebSocket(url), this.socket.onopen = () => {
- this.isReady = !0, this.heartbeat(), this.flush();
- }, this.socket.onmessage = ({ data }) => {
- let event = typeof data == "string" && isJSON(data) ? parse(data) : data;
- invariant(this.handler, "WebsocketTransport handler should be set"), this.handler(event), event.type === "ping" && (this.heartbeat(), this.send({ type: "pong" }));
- }, this.socket.onerror = (e) => {
- onError && onError(e);
- }, this.socket.onclose = (ev) => {
- invariant(this.handler, "WebsocketTransport handler should be set"), this.handler({
- type: CHANNEL_WS_DISCONNECT,
- args: [{ reason: ev.reason, code: ev.code }],
- from: page || "preview"
- }), this.isClosed = !0, clearTimeout(this.pingTimeout);
- };
- }
- heartbeat() {
- clearTimeout(this.pingTimeout), this.pingTimeout = setTimeout(() => {
- this.socket.close(3008, "timeout");
- }, HEARTBEAT_INTERVAL + HEARTBEAT_MAX_LATENCY);
- }
- setHandler(handler) {
- this.handler = handler;
- }
- send(event) {
- this.isClosed || (this.isReady ? this.sendNow(event) : this.sendLater(event));
- }
- sendLater(event) {
- this.buffer.push(event);
- }
- sendNow(event) {
- let data = stringify(event, {
- maxDepth: 15,
- ...scope.CHANNEL_OPTIONS
- });
- this.socket.send(data);
- }
- flush() {
- let { buffer } = this;
- this.buffer = [], buffer.forEach((event) => this.send(event));
- }
- };
-
- // src/channels/index.ts
- var { CHANNEL_OPTIONS, CONFIG_TYPE } = scope, channels_default = Channel;
- function createBrowserChannel({ page, extraTransports = [] }) {
- let transports = [new PostMessageTransport({ page }), ...extraTransports];
- if (CONFIG_TYPE === "DEVELOPMENT") {
- let protocol = window.location.protocol === "http:" ? "ws" : "wss", { hostname, port } = window.location, { wsToken } = CHANNEL_OPTIONS || {}, channelUrl = `${protocol}://${hostname}:${port}/storybook-server-channel?token=${wsToken}`;
- transports.push(new WebsocketTransport({ url: channelUrl, onError: () => {
- }, page }));
- }
- let channel = new Channel({ transports });
- return UniversalStore.__prepare(
- channel,
- page === "manager" ? UniversalStore.Environment.MANAGER : UniversalStore.Environment.PREVIEW
- ), channel;
- }
-
- // src/manager/globals/runtime.ts
- init_client_logger();
-
- // src/components/index.ts
- var components_exports = {};
- __export(components_exports, {
- A: () => A,
- AbstractToolbar: () => AbstractToolbar,
- ActionBar: () => ActionBar,
- ActionList: () => ActionList,
- AddonPanel: () => AddonPanel,
- Badge: () => Badge,
- Bar: () => Bar,
- Blockquote: () => Blockquote,
- Button: () => Button,
- Card: () => Card,
- ClipboardCode: () => ClipboardCode,
- Code: () => Code2,
- Collapsible: () => Collapsible,
- DL: () => DL,
- Div: () => Div,
- DocumentWrapper: () => DocumentWrapper,
- EmptyTabContent: () => EmptyTabContent,
- ErrorFormatter: () => ErrorFormatter,
- FlexBar: () => FlexBar,
- Form: () => Form2,
- H1: () => H1,
- H2: () => H2,
- H3: () => H3,
- H4: () => H4,
- H5: () => H5,
- H6: () => H6,
- HR: () => HR,
- IconButton: () => IconButton,
- Img: () => Img,
- LI: () => LI,
- Link: () => Link2,
- ListItem: () => ListItem_default,
- Loader: () => Loader,
- Modal: () => Modal,
- ModalDecorator: () => ModalDecorator,
- OL: () => OL,
- P: () => P,
- Placeholder: () => Placeholder,
- Popover: () => Popover,
- PopoverProvider: () => PopoverProvider,
- Pre: () => Pre2,
- ProgressSpinner: () => ProgressSpinner,
- ResetWrapper: () => ResetWrapper,
- ScrollArea: () => ScrollArea2,
- Select: () => Select2,
- Separator: () => Separator2,
- Spaced: () => Spaced,
- Span: () => Span,
- StatelessTab: () => StatelessTab,
- StatelessTabList: () => StatelessTabList,
- StatelessTabPanel: () => StatelessTabPanel,
- StatelessTabsView: () => StatelessTabsView,
- StorybookIcon: () => StorybookIcon3,
- StorybookLogo: () => StorybookLogo,
- SyntaxHighlighter: () => SyntaxHighlighter3,
- TT: () => TT,
- TabBar: () => TabBar,
- TabButton: () => TabButton,
- TabList: () => TabList,
- TabPanel: () => TabPanel,
- TabWrapper: () => TabWrapper,
- Table: () => Table,
- Tabs: () => Tabs,
- TabsState: () => TabsState,
- TabsView: () => TabsView,
- ToggleButton: () => ToggleButton,
- Toolbar: () => Toolbar,
- Tooltip: () => Tooltip2,
- TooltipLinkList: () => TooltipLinkList,
- TooltipMessage: () => TooltipMessage,
- TooltipNote: () => TooltipNote,
- TooltipProvider: () => TooltipProvider,
- UL: () => UL,
- WithTooltip: () => WithTooltip,
- WithTooltipPure: () => WithTooltipPure2,
- Zoom: () => Zoom,
- codeCommon: () => codeCommon,
- components: () => components2,
- convertToReactAriaPlacement: () => convertToReactAriaPlacement,
- createCopyToClipboardFunction: () => createCopyToClipboardFunction,
- getStoryHref: () => getStoryHref,
- interleaveSeparators: () => interleaveSeparators,
- nameSpaceClassNames: () => nameSpaceClassNames,
- resetComponents: () => resetComponents,
- useTabsState: () => useTabsState,
- withReset: () => withReset
- });
- var import_react191 = __toESM(require_react(), 1);
-
- // src/components/components/typography/components.tsx
- var import_react16 = __toESM(require_react(), 1);
-
- // src/components/components/typography/DocumentFormatting.tsx
- var nameSpaceClassNames = ({ ...props }, key) => {
- let classes = [props.class, props.className];
- return delete props.class, props.className = ["sbdocs", `sbdocs-${key}`, ...classes].filter(Boolean).join(" "), props;
- };
-
- // src/components/components/typography/ResetWrapper.tsx
- init_theming();
-
- // src/components/components/typography/lib/common.tsx
- var headerCommon = ({ theme: theme3 }) => ({
- margin: "20px 0 8px",
- padding: 0,
- cursor: "text",
- position: "relative",
- color: theme3.color.defaultText,
- "&:first-of-type": {
- marginTop: 0,
- paddingTop: 0
- },
- "&:hover a.anchor": {
- textDecoration: "none"
- },
- "& tt, & code": {
- fontSize: "inherit"
- }
- }), codeCommon = ({ theme: theme3 }) => ({
- lineHeight: 1,
- margin: "0 2px",
- padding: "3px 5px",
- whiteSpace: "nowrap",
- borderRadius: 3,
- fontSize: theme3.typography.size.s2 - 1,
- border: theme3.base === "light" ? "1px solid hsl(0 0 0 / 0.05)" : "1px solid hsl(0 0 100 / 0.05)",
- color: theme3.color.defaultText,
- backgroundColor: theme3.base === "light" ? "hsl(0 0 0 / 0.01)" : "hsl(0 0 100 / 0.02)"
- }), withReset = ({ theme: theme3 }) => ({
- fontFamily: theme3.typography.fonts.base,
- fontSize: theme3.typography.size.s3,
- margin: 0,
- WebkitFontSmoothing: "antialiased",
- MozOsxFontSmoothing: "grayscale",
- WebkitTapHighlightColor: "rgba(0, 0, 0, 0)",
- WebkitOverflowScrolling: "touch"
- }), withMargin = {
- margin: "16px 0"
- };
-
- // src/components/components/typography/ResetWrapper.tsx
- var ResetWrapper = styled.div(withReset);
-
- // src/components/components/typography/elements/A.tsx
- init_theming();
-
- // src/components/components/typography/elements/Link.tsx
- var import_react7 = __toESM(require_react(), 1), Link = ({
- href: input2 = "",
- ...props
- }) => {
- let href = /^\//.test(input2) ? `./?path=${input2}` : input2, target = /^#.*/.test(input2) ? "_self" : "_top";
- return import_react7.default.createElement("a", { href, target, ...props });
- };
-
- // src/components/components/typography/elements/A.tsx
- var A = styled(Link)(({ theme: theme3 }) => ({
- ...withReset({ theme: theme3 }),
- fontSize: "inherit",
- lineHeight: "24px",
- color: theme3.color.secondary,
- // Ensure WCAG Level A compliance (SC 1.4.1), see https://www.w3.org/WAI/WCAG22/Techniques/failures/F73
- textDecoration: "underline",
- textDecorationThickness: "0.03125rem",
- textUnderlineOffset: "0.11em",
- "&.absent": {
- color: "#cc0000"
- },
- "&.anchor": {
- display: "block",
- paddingLeft: 30,
- marginLeft: -30,
- cursor: "pointer",
- position: "absolute",
- top: 0,
- left: 0,
- bottom: 0,
- textDecoration: "none"
- },
- "&.anchor:hover, &.anchor:focus": {
- textDecoration: "underline"
- },
- "& code": {
- color: "inherit",
- textDecoration: "underline",
- textDecorationThickness: "0.03125rem",
- paddingLeft: 0,
- paddingRight: 0,
- "&::before": {
- content: '"\\00a0"',
- fontSize: "0.5em"
- },
- "&::after": {
- content: '"\\00a0"',
- fontSize: "0.5em"
- }
- }
- }));
-
- // src/components/components/typography/elements/Blockquote.tsx
- init_theming();
- var Blockquote = styled.blockquote(({ theme: theme3 }) => ({
- ...withReset({ theme: theme3 }),
- ...withMargin,
- borderLeft: `4px solid ${theme3.color.medium}`,
- padding: "0 15px",
- color: theme3.color.dark,
- "& > :first-of-type": {
- marginTop: 0
- },
- "& > :last-child": {
- marginBottom: 0
- }
- }));
-
- // src/components/components/typography/elements/Code.tsx
- var import_react15 = __toESM(require_react(), 1);
- init_theming();
-
- // src/components/components/syntaxhighlighter/lazy-syntaxhighlighter.tsx
- var import_react14 = __toESM(require_react(), 1), languages = [], Comp = null, LazySyntaxHighlighter = (0, import_react14.lazy)(async () => {
- let { SyntaxHighlighter: SyntaxHighlighter4 } = await Promise.resolve().then(() => (init_syntaxhighlighter(), syntaxhighlighter_exports));
- return languages.length > 0 && (languages.forEach((args) => {
- SyntaxHighlighter4.registerLanguage(...args);
- }), languages = []), Comp === null && (Comp = SyntaxHighlighter4), {
- default: (props) => import_react14.default.createElement(SyntaxHighlighter4, { ...props })
- };
- }), LazySyntaxHighlighterWithFormatter = (0, import_react14.lazy)(async () => {
- let [{ SyntaxHighlighter: SyntaxHighlighter4 }, { formatter: formatter2 }] = await Promise.all([
- Promise.resolve().then(() => (init_syntaxhighlighter(), syntaxhighlighter_exports)),
- Promise.resolve().then(() => (init_formatter(), formatter_exports))
- ]);
- return languages.length > 0 && (languages.forEach((args) => {
- SyntaxHighlighter4.registerLanguage(...args);
- }), languages = []), Comp === null && (Comp = SyntaxHighlighter4), {
- default: (props) => import_react14.default.createElement(SyntaxHighlighter4, { ...props, formatter: formatter2 })
- };
- }), SyntaxHighlighter3 = (props) => import_react14.default.createElement(import_react14.Suspense, { fallback: import_react14.default.createElement("div", null) }, props.format !== !1 ? import_react14.default.createElement(LazySyntaxHighlighterWithFormatter, { ...props }) : import_react14.default.createElement(LazySyntaxHighlighter, { ...props }));
- SyntaxHighlighter3.registerLanguage = (...args) => {
- if (Comp !== null) {
- Comp.registerLanguage(...args);
- return;
- }
- languages.push(args);
- };
-
- // src/components/components/typography/lib/isReactChildString.tsx
- var isReactChildString = (child) => typeof child == "string";
-
- // src/components/components/typography/elements/Code.tsx
- var isInlineCodeRegex = /[\n\r]/g, DefaultCodeBlock = styled.code(({ theme: theme3 }) => ({
- // from reset
- fontFamily: theme3.typography.fonts.mono,
- WebkitFontSmoothing: "antialiased",
- MozOsxFontSmoothing: "grayscale",
- display: "inline-block",
- paddingLeft: 2,
- paddingRight: 2,
- verticalAlign: "baseline",
- color: "inherit",
- ...codeCommon({ theme: theme3 })
- })), StyledSyntaxHighlighter = styled(SyntaxHighlighter3)(({ theme: theme3 }) => ({
- // DocBlocks-specific styling and overrides
- fontFamily: theme3.typography.fonts.mono,
- fontSize: `${theme3.typography.size.s2 - 1}px`,
- lineHeight: "19px",
- margin: "25px 0 40px",
- borderRadius: theme3.appBorderRadius,
- boxShadow: theme3.base === "light" ? "rgba(0, 0, 0, 0.10) 0 1px 3px 0" : "rgba(0, 0, 0, 0.20) 0 2px 5px 0",
- "pre.prismjs": {
- padding: 20,
- background: "inherit"
- }
- })), Code2 = ({
- className,
- children,
- ...props
- }) => {
- let language = (className || "").match(/lang-(\S+)/), childrenArray = import_react15.Children.toArray(children);
- return childrenArray.filter(isReactChildString).some((child) => child.match(isInlineCodeRegex)) ? import_react15.default.createElement(
- StyledSyntaxHighlighter,
- {
- bordered: !0,
- copyable: !0,
- language: language?.[1] ?? "text",
- format: !1,
- ...props
- },
- children
- ) : import_react15.default.createElement(DefaultCodeBlock, { ...props, className }, childrenArray);
- };
-
- // src/components/components/typography/elements/DL.tsx
- init_theming();
- var DL = styled.dl(({ theme: theme3 }) => ({
- ...withReset({ theme: theme3 }),
- ...withMargin,
- padding: 0,
- "& dt": {
- fontSize: "14px",
- fontWeight: "bold",
- fontStyle: "italic",
- padding: 0,
- margin: "16px 0 4px"
- },
- "& dt:first-of-type": {
- padding: 0
- },
- "& dt > :first-of-type": {
- marginTop: 0
- },
- "& dt > :last-child": {
- marginBottom: 0
- },
- "& dd": {
- margin: "0 0 16px",
- padding: "0 15px"
- },
- "& dd > :first-of-type": {
- marginTop: 0
- },
- "& dd > :last-child": {
- marginBottom: 0
- }
- }));
-
- // src/components/components/typography/elements/Div.tsx
- init_theming();
- var Div = styled.div(withReset);
-
- // src/components/components/typography/elements/H1.tsx
- init_theming();
- var H1 = styled.h1(({ theme: theme3 }) => ({
- ...withReset({ theme: theme3 }),
- ...headerCommon({ theme: theme3 }),
- fontSize: `${theme3.typography.size.l1}px`,
- fontWeight: theme3.typography.weight.bold
- }));
-
- // src/components/components/typography/elements/H2.tsx
- init_theming();
- var H2 = styled.h2(({ theme: theme3 }) => ({
- ...withReset({ theme: theme3 }),
- ...headerCommon({ theme: theme3 }),
- fontSize: `${theme3.typography.size.m2}px`,
- paddingBottom: 4,
- borderBottom: `1px solid ${theme3.appBorderColor}`
- }));
-
- // src/components/components/typography/elements/H3.tsx
- init_theming();
- var H3 = styled.h3(({ theme: theme3 }) => ({
- ...withReset({ theme: theme3 }),
- ...headerCommon({ theme: theme3 }),
- fontSize: `${theme3.typography.size.m1}px`
- }));
-
- // src/components/components/typography/elements/H4.tsx
- init_theming();
- var H4 = styled.h4(({ theme: theme3 }) => ({
- ...withReset({ theme: theme3 }),
- ...headerCommon({ theme: theme3 }),
- fontSize: `${theme3.typography.size.s3}px`
- }));
-
- // src/components/components/typography/elements/H5.tsx
- init_theming();
- var H5 = styled.h5(({ theme: theme3 }) => ({
- ...withReset({ theme: theme3 }),
- ...headerCommon({ theme: theme3 }),
- fontSize: `${theme3.typography.size.s2}px`
- }));
-
- // src/components/components/typography/elements/H6.tsx
- init_theming();
- var H6 = styled.h6(({ theme: theme3 }) => ({
- ...withReset({ theme: theme3 }),
- ...headerCommon({ theme: theme3 }),
- fontSize: `${theme3.typography.size.s2}px`,
- color: theme3.color.dark
- }));
-
- // src/components/components/typography/elements/HR.tsx
- init_theming();
- var HR = styled.hr(({ theme: theme3 }) => ({
- border: "0 none",
- borderTop: `1px solid ${theme3.appBorderColor}`,
- height: 4,
- padding: 0
- }));
-
- // src/components/components/typography/elements/Img.tsx
- init_theming();
- var Img = styled.img({
- maxWidth: "100%"
- });
-
- // src/components/components/typography/elements/LI.tsx
- init_theming();
- var LI = styled.li(({ theme: theme3 }) => ({
- ...withReset({ theme: theme3 }),
- fontSize: theme3.typography.size.s2,
- color: theme3.color.defaultText,
- lineHeight: "24px",
- "& + li": {
- marginTop: ".25em"
- },
- "& ul, & ol": {
- marginTop: ".25em",
- marginBottom: 0
- },
- "& code": codeCommon({ theme: theme3 })
- }));
-
- // src/components/components/typography/elements/OL.tsx
- init_theming();
- var listCommon = {
- paddingLeft: 30,
- "& :first-of-type": {
- marginTop: 0
- },
- "& :last-child": {
- marginBottom: 0
- }
- }, OL = styled.ol(({ theme: theme3 }) => ({
- ...withReset({ theme: theme3 }),
- ...withMargin,
- ...listCommon,
- listStyle: "decimal"
- }));
-
- // src/components/components/typography/elements/P.tsx
- init_theming();
- var P = styled.p(({ theme: theme3 }) => ({
- ...withReset({ theme: theme3 }),
- ...withMargin,
- fontSize: theme3.typography.size.s2,
- lineHeight: "24px",
- color: theme3.color.defaultText,
- "& code": codeCommon({ theme: theme3 })
- }));
-
- // src/components/components/typography/elements/Pre.tsx
- init_theming();
- var Pre2 = styled.pre(({ theme: theme3 }) => ({
- ...withReset({ theme: theme3 }),
- ...withMargin,
- // reset
- fontFamily: theme3.typography.fonts.mono,
- WebkitFontSmoothing: "antialiased",
- MozOsxFontSmoothing: "grayscale",
- lineHeight: "18px",
- padding: "11px 1rem",
- whiteSpace: "pre-wrap",
- color: "inherit",
- borderRadius: 3,
- margin: "1rem 0",
- "&:not(.prismjs)": {
- background: "transparent",
- border: "none",
- borderRadius: 0,
- padding: 0,
- margin: 0
- },
- "& pre, &.prismjs": {
- padding: 15,
- margin: 0,
- whiteSpace: "pre-wrap",
- color: "inherit",
- fontSize: "13px",
- lineHeight: "19px",
- code: {
- color: "inherit",
- fontSize: "inherit"
- }
- },
- "& code": {
- whiteSpace: "pre"
- },
- "& code, & tt": {
- border: "none"
- }
- }));
-
- // src/components/components/typography/elements/Span.tsx
- init_theming();
- var Span = styled.span(({ theme: theme3 }) => ({
- ...withReset({ theme: theme3 }),
- "&.frame": {
- display: "block",
- overflow: "hidden",
- "& > span": {
- border: `1px solid ${theme3.color.medium}`,
- display: "block",
- float: "left",
- overflow: "hidden",
- margin: "13px 0 0",
- padding: 7,
- width: "auto"
- },
- "& span img": {
- display: "block",
- float: "left"
- },
- "& span span": {
- clear: "both",
- color: theme3.color.darkest,
- display: "block",
- padding: "5px 0 0"
- }
- },
- "&.align-center": {
- display: "block",
- overflow: "hidden",
- clear: "both",
- "& > span": {
- display: "block",
- overflow: "hidden",
- margin: "13px auto 0",
- textAlign: "center"
- },
- "& span img": {
- margin: "0 auto",
- textAlign: "center"
- }
- },
- "&.align-right": {
- display: "block",
- overflow: "hidden",
- clear: "both",
- "& > span": {
- display: "block",
- overflow: "hidden",
- margin: "13px 0 0",
- textAlign: "right"
- },
- "& span img": {
- margin: 0,
- textAlign: "right"
- }
- },
- "&.float-left": {
- display: "block",
- marginRight: 13,
- overflow: "hidden",
- float: "left",
- "& span": {
- margin: "13px 0 0"
- }
- },
- "&.float-right": {
- display: "block",
- marginLeft: 13,
- overflow: "hidden",
- float: "right",
- "& > span": {
- display: "block",
- overflow: "hidden",
- margin: "13px auto 0",
- textAlign: "right"
- }
- }
- }));
-
- // src/components/components/typography/elements/TT.tsx
- init_theming();
- var TT = styled.title(codeCommon);
-
- // src/components/components/typography/elements/Table.tsx
- init_theming();
- var Table = styled.table(({ theme: theme3 }) => ({
- ...withReset({ theme: theme3 }),
- ...withMargin,
- fontSize: theme3.typography.size.s2,
- lineHeight: "24px",
- padding: 0,
- borderCollapse: "collapse",
- "& tr": {
- borderTop: `1px solid ${theme3.appBorderColor}`,
- backgroundColor: theme3.appContentBg,
- margin: 0,
- padding: 0
- },
- "& tr:nth-of-type(2n)": {
- backgroundColor: theme3.base === "dark" ? theme3.color.darker : theme3.color.lighter
- },
- "& tr th": {
- fontWeight: "bold",
- color: theme3.color.defaultText,
- border: `1px solid ${theme3.appBorderColor}`,
- margin: 0,
- padding: "6px 13px"
- },
- "& tr td": {
- border: `1px solid ${theme3.appBorderColor}`,
- color: theme3.color.defaultText,
- margin: 0,
- padding: "6px 13px"
- },
- "& tr th :first-of-type, & tr td :first-of-type": {
- marginTop: 0
- },
- "& tr th :last-child, & tr td :last-child": {
- marginBottom: 0
- }
- }));
-
- // src/components/components/typography/elements/UL.tsx
- init_theming();
- var listCommon2 = {
- paddingLeft: 30,
- "& :first-of-type": {
- marginTop: 0
- },
- "& :last-child": {
- marginBottom: 0
- }
- }, UL = styled.ul(({ theme: theme3 }) => ({
- ...withReset({ theme: theme3 }),
- ...withMargin,
- ...listCommon2,
- listStyle: "disc"
- }));
-
- // src/components/components/typography/components.tsx
- var components = {
- h1: (props) => import_react16.default.createElement(H1, { ...nameSpaceClassNames(props, "h1") }),
- h2: (props) => import_react16.default.createElement(H2, { ...nameSpaceClassNames(props, "h2") }),
- h3: (props) => import_react16.default.createElement(H3, { ...nameSpaceClassNames(props, "h3") }),
- h4: (props) => import_react16.default.createElement(H4, { ...nameSpaceClassNames(props, "h4") }),
- h5: (props) => import_react16.default.createElement(H5, { ...nameSpaceClassNames(props, "h5") }),
- h6: (props) => import_react16.default.createElement(H6, { ...nameSpaceClassNames(props, "h6") }),
- pre: (props) => import_react16.default.createElement(Pre2, { ...nameSpaceClassNames(props, "pre") }),
- a: (props) => import_react16.default.createElement(A, { ...nameSpaceClassNames(props, "a") }),
- hr: (props) => import_react16.default.createElement(HR, { ...nameSpaceClassNames(props, "hr") }),
- dl: (props) => import_react16.default.createElement(DL, { ...nameSpaceClassNames(props, "dl") }),
- blockquote: (props) => import_react16.default.createElement(Blockquote, { ...nameSpaceClassNames(props, "blockquote") }),
- table: (props) => import_react16.default.createElement(Table, { ...nameSpaceClassNames(props, "table") }),
- img: (props) => import_react16.default.createElement(Img, { ...nameSpaceClassNames(props, "img") }),
- div: (props) => import_react16.default.createElement(Div, { ...nameSpaceClassNames(props, "div") }),
- span: (props) => import_react16.default.createElement(Span, { ...nameSpaceClassNames(props, "span") }),
- li: (props) => import_react16.default.createElement(LI, { ...nameSpaceClassNames(props, "li") }),
- ul: (props) => import_react16.default.createElement(UL, { ...nameSpaceClassNames(props, "ul") }),
- ol: (props) => import_react16.default.createElement(OL, { ...nameSpaceClassNames(props, "ol") }),
- p: (props) => import_react16.default.createElement(P, { ...nameSpaceClassNames(props, "p") }),
- code: (props) => import_react16.default.createElement(Code2, { ...nameSpaceClassNames(props, "code") }),
- tt: (props) => import_react16.default.createElement(TT, { ...nameSpaceClassNames(props, "tt") }),
- resetwrapper: (props) => import_react16.default.createElement(ResetWrapper, { ...nameSpaceClassNames(props, "resetwrapper") })
- };
-
- // src/components/components/Badge/Badge.tsx
- var import_react17 = __toESM(require_react(), 1);
- init_polished_esm();
- init_theming();
- var BadgeWrapper = styled.div(
- ({ theme: theme3, compact: compact2 }) => ({
- display: "inline-flex",
- alignItems: "center",
- justifyContent: "center",
- fontSize: theme3.typography.size.s1,
- fontWeight: theme3.typography.weight.bold,
- lineHeight: "12px",
- minWidth: 20,
- borderRadius: 20,
- padding: compact2 ? "4px 7px" : "4px 10px"
- }),
- {
- svg: {
- height: 12,
- width: 12,
- marginRight: 4,
- marginTop: -2,
- path: {
- fill: "currentColor"
- }
- }
- },
- ({ theme: theme3, status }) => {
- switch (status) {
- case "critical":
- return {
- color: theme3.fgColor.critical,
- background: theme3.bgColor.critical,
- boxShadow: `inset 0 0 0 1px ${theme3.borderColor.critical}`
- };
- case "negative":
- return {
- color: theme3.fgColor.negative,
- background: theme3.bgColor.negative,
- boxShadow: `inset 0 0 0 1px ${theme3.borderColor.negative}`
- };
- case "warning":
- return {
- color: theme3.fgColor.warning,
- background: theme3.bgColor.warning,
- boxShadow: `inset 0 0 0 1px ${theme3.borderColor.warning}`
- };
- case "neutral":
- return {
- color: theme3.fgColor.muted,
- background: theme3.base === "dark" ? theme3.barBg : theme3.background.app,
- boxShadow: `inset 0 0 0 1px ${curriedTransparentize$1(0.8, theme3.textMutedColor)}`
- };
- case "positive":
- return {
- color: theme3.fgColor.positive,
- background: theme3.bgColor.positive,
- boxShadow: `inset 0 0 0 1px ${theme3.borderColor.positive}`
- };
- case "active":
- return {
- color: theme3.base === "light" ? curriedDarken$1(0.1, theme3.color.secondary) : theme3.color.secondary,
- background: theme3.background.hoverable,
- boxShadow: `inset 0 0 0 1px ${curriedTransparentize$1(0.9, theme3.color.secondary)}`
- };
- default:
- return {};
- }
- }
- ), Badge = ({ ...props }) => import_react17.default.createElement(BadgeWrapper, { ...props });
-
- // src/components/components/typography/link/link.tsx
- var import_react18 = __toESM(require_react(), 1);
- init_client_logger();
-
- // ../../node_modules/@storybook/icons/dist/index.js
- var dist_exports2 = {};
- __export(dist_exports2, {
- AccessibilityAltIcon: () => AccessibilityAltIcon,
- AccessibilityIcon: () => AccessibilityIcon,
- AccessibilityIgnoredIcon: () => AccessibilityIgnoredIcon,
- AddIcon: () => AddIcon,
- AdminIcon: () => AdminIcon,
- AlertAltIcon: () => AlertAltIcon,
- AlertIcon: () => AlertIcon,
- AlignLeftIcon: () => AlignLeftIcon,
- AlignRightIcon: () => AlignRightIcon,
- AppleIcon: () => AppleIcon,
- ArrowBottomLeftIcon: () => ArrowBottomLeftIcon,
- ArrowBottomRightIcon: () => ArrowBottomRightIcon,
- ArrowDownIcon: () => ArrowDownIcon,
- ArrowLeftIcon: () => ArrowLeftIcon,
- ArrowRightIcon: () => ArrowRightIcon,
- ArrowSolidDownIcon: () => ArrowSolidDownIcon,
- ArrowSolidLeftIcon: () => ArrowSolidLeftIcon,
- ArrowSolidRightIcon: () => ArrowSolidRightIcon,
- ArrowSolidUpIcon: () => ArrowSolidUpIcon,
- ArrowTopLeftIcon: () => ArrowTopLeftIcon,
- ArrowTopRightIcon: () => ArrowTopRightIcon,
- ArrowUpIcon: () => ArrowUpIcon,
- AzureDevOpsIcon: () => AzureDevOpsIcon,
- BackIcon: () => BackIcon,
- BasketIcon: () => BasketIcon,
- BatchAcceptIcon: () => BatchAcceptIcon,
- BatchDenyIcon: () => BatchDenyIcon,
- BeakerIcon: () => BeakerIcon,
- BellIcon: () => BellIcon,
- BitbucketIcon: () => BitbucketIcon,
- BoldIcon: () => BoldIcon,
- BookIcon: () => BookIcon,
- BookmarkHollowIcon: () => BookmarkHollowIcon,
- BookmarkIcon: () => BookmarkIcon,
- BottomBarIcon: () => BottomBarIcon,
- BottomBarToggleIcon: () => BottomBarToggleIcon,
- BoxIcon: () => BoxIcon,
- BranchIcon: () => BranchIcon,
- BrowserIcon: () => BrowserIcon,
- BugIcon: () => BugIcon,
- ButtonIcon: () => ButtonIcon,
- CPUIcon: () => CPUIcon,
- CalendarIcon: () => CalendarIcon,
- CameraIcon: () => CameraIcon,
- CameraStabilizeIcon: () => CameraStabilizeIcon,
- CategoryIcon: () => CategoryIcon,
- CertificateIcon: () => CertificateIcon,
- ChangedIcon: () => ChangedIcon,
- ChatIcon: () => ChatIcon,
- CheckIcon: () => CheckIcon,
- ChecklistIcon: () => ChecklistIcon,
- ChevronDownIcon: () => ChevronDownIcon,
- ChevronLeftIcon: () => ChevronLeftIcon,
- ChevronRightIcon: () => ChevronRightIcon,
- ChevronSmallDownIcon: () => ChevronSmallDownIcon,
- ChevronSmallLeftIcon: () => ChevronSmallLeftIcon,
- ChevronSmallRightIcon: () => ChevronSmallRightIcon,
- ChevronSmallUpIcon: () => ChevronSmallUpIcon,
- ChevronUpIcon: () => ChevronUpIcon,
- ChromaticIcon: () => ChromaticIcon,
- ChromeIcon: () => ChromeIcon,
- CircleHollowIcon: () => CircleHollowIcon,
- CircleIcon: () => CircleIcon,
- ClearIcon: () => ClearIcon,
- CloseAltIcon: () => CloseAltIcon,
- CloseIcon: () => CloseIcon,
- CloudHollowIcon: () => CloudHollowIcon,
- CloudIcon: () => CloudIcon,
- CogIcon: () => CogIcon,
- CollapseIcon: () => CollapseIcon,
- CommandIcon: () => CommandIcon,
- CommentAddIcon: () => CommentAddIcon,
- CommentIcon: () => CommentIcon,
- CommentsIcon: () => CommentsIcon,
- CommitIcon: () => CommitIcon,
- CompassIcon: () => CompassIcon,
- ComponentDrivenIcon: () => ComponentDrivenIcon,
- ComponentIcon: () => ComponentIcon,
- ContrastIcon: () => ContrastIcon,
- ContrastIgnoredIcon: () => ContrastIgnoredIcon,
- ControlsIcon: () => ControlsIcon,
- CopyIcon: () => CopyIcon,
- CreditIcon: () => CreditIcon,
- CrossIcon: () => CrossIcon,
- DashboardIcon: () => DashboardIcon,
- DatabaseIcon: () => DatabaseIcon,
- DeleteIcon: () => DeleteIcon,
- DiamondIcon: () => DiamondIcon,
- DirectionIcon: () => DirectionIcon,
- DiscordIcon: () => DiscordIcon,
- DocChartIcon: () => DocChartIcon,
- DocListIcon: () => DocListIcon,
- DocumentIcon: () => DocumentIcon,
- DownloadIcon: () => DownloadIcon,
- DragIcon: () => DragIcon,
- EditIcon: () => EditIcon,
- EditorIcon: () => EditorIcon,
- EllipsisIcon: () => EllipsisIcon,
- EmailIcon: () => EmailIcon,
- ExpandAltIcon: () => ExpandAltIcon,
- ExpandIcon: () => ExpandIcon,
- EyeCloseIcon: () => EyeCloseIcon,
- EyeIcon: () => EyeIcon,
- FaceHappyIcon: () => FaceHappyIcon,
- FaceNeutralIcon: () => FaceNeutralIcon,
- FaceSadIcon: () => FaceSadIcon,
- FacebookIcon: () => FacebookIcon,
- FailedIcon: () => FailedIcon,
- FastForwardIcon: () => FastForwardIcon,
- FigmaIcon: () => FigmaIcon,
- FilesIcon: () => FilesIcon,
- FilterIcon: () => FilterIcon,
- FlagIcon: () => FlagIcon,
- FolderIcon: () => FolderIcon,
- FormIcon: () => FormIcon,
- GDriveIcon: () => GDriveIcon,
- GiftIcon: () => GiftIcon,
- GithubIcon: () => GithubIcon,
- GitlabIcon: () => GitlabIcon,
- GlobeIcon: () => GlobeIcon,
- GoogleIcon: () => GoogleIcon,
- GraphBarIcon: () => GraphBarIcon,
- GraphLineIcon: () => GraphLineIcon,
- GraphqlIcon: () => GraphqlIcon,
- GridAltIcon: () => GridAltIcon,
- GridIcon: () => GridIcon,
- GrowIcon: () => GrowIcon,
- HeartHollowIcon: () => HeartHollowIcon,
- HeartIcon: () => HeartIcon,
- HomeIcon: () => HomeIcon,
- HourglassIcon: () => HourglassIcon,
- InfoIcon: () => InfoIcon,
- ItalicIcon: () => ItalicIcon,
- JumpToIcon: () => JumpToIcon,
- KeyIcon: () => KeyIcon,
- LightningIcon: () => LightningIcon,
- LightningOffIcon: () => LightningOffIcon,
- LinkBrokenIcon: () => LinkBrokenIcon,
- LinkIcon: () => LinkIcon,
- LinkedinIcon: () => LinkedinIcon,
- LinuxIcon: () => LinuxIcon,
- ListOrderedIcon: () => ListOrderedIcon,
- ListUnorderedIcon: () => ListUnorderedIcon,
- LocationIcon: () => LocationIcon,
- LockIcon: () => LockIcon,
- MarkdownIcon: () => MarkdownIcon,
- MarkupIcon: () => MarkupIcon,
- MediumIcon: () => MediumIcon,
- MemoryIcon: () => MemoryIcon,
- MenuIcon: () => MenuIcon,
- MergeIcon: () => MergeIcon,
- MirrorIcon: () => MirrorIcon,
- MobileIcon: () => MobileIcon,
- MoonIcon: () => MoonIcon,
- NutIcon: () => NutIcon,
- OutboxIcon: () => OutboxIcon,
- OutlineIcon: () => OutlineIcon,
- PaintBrushAltIcon: () => PaintBrushAltIcon,
- PaintBrushIcon: () => PaintBrushIcon,
- PaperClipIcon: () => PaperClipIcon,
- ParagraphIcon: () => ParagraphIcon,
- PassedIcon: () => PassedIcon,
- PhoneIcon: () => PhoneIcon,
- PhotoDragIcon: () => PhotoDragIcon,
- PhotoIcon: () => PhotoIcon,
- PhotoStabilizeIcon: () => PhotoStabilizeIcon,
- PinAltIcon: () => PinAltIcon,
- PinIcon: () => PinIcon,
- PlayAllHollowIcon: () => PlayAllHollowIcon,
- PlayBackIcon: () => PlayBackIcon,
- PlayHollowIcon: () => PlayHollowIcon,
- PlayIcon: () => PlayIcon,
- PlayNextIcon: () => PlayNextIcon,
- PlusIcon: () => PlusIcon,
- PointerDefaultIcon: () => PointerDefaultIcon,
- PointerHandIcon: () => PointerHandIcon,
- PopOutIcon: () => PopOutIcon,
- PowerIcon: () => PowerIcon,
- PrintIcon: () => PrintIcon,
- ProceedIcon: () => ProceedIcon,
- ProfileIcon: () => ProfileIcon,
- PullRequestIcon: () => PullRequestIcon,
- QuestionIcon: () => QuestionIcon,
- RSSIcon: () => RSSIcon,
- RedirectIcon: () => RedirectIcon,
- ReduxIcon: () => ReduxIcon,
- RefreshIcon: () => RefreshIcon,
- ReplyIcon: () => ReplyIcon,
- RepoIcon: () => RepoIcon,
- RequestChangeIcon: () => RequestChangeIcon,
- RewindIcon: () => RewindIcon,
- RulerIcon: () => RulerIcon,
- SaveIcon: () => SaveIcon,
- SearchIcon: () => SearchIcon,
- ShareAltIcon: () => ShareAltIcon,
- ShareIcon: () => ShareIcon,
- ShieldIcon: () => ShieldIcon,
- SideBySideIcon: () => SideBySideIcon,
- SidebarAltIcon: () => SidebarAltIcon,
- SidebarAltToggleIcon: () => SidebarAltToggleIcon,
- SidebarIcon: () => SidebarIcon,
- SidebarToggleIcon: () => SidebarToggleIcon,
- SortDownIcon: () => SortDownIcon,
- SortUpIcon: () => SortUpIcon,
- SpeakerIcon: () => SpeakerIcon,
- StackedIcon: () => StackedIcon,
- StarHollowIcon: () => StarHollowIcon,
- StarIcon: () => StarIcon,
- StatusFailIcon: () => StatusFailIcon,
- StatusIcon: () => StatusIcon,
- StatusNewIcon: () => StatusNewIcon,
- StatusPassIcon: () => StatusPassIcon,
- StatusWarnIcon: () => StatusWarnIcon,
- StickerIcon: () => StickerIcon,
- StopAltHollowIcon: () => StopAltHollowIcon,
- StopAltIcon: () => StopAltIcon,
- StopIcon: () => StopIcon,
- StorybookIcon: () => StorybookIcon,
- StructureIcon: () => StructureIcon,
- SubtractIcon: () => SubtractIcon,
- SunIcon: () => SunIcon,
- SupportIcon: () => SupportIcon,
- SweepIcon: () => SweepIcon,
- SwitchAltIcon: () => SwitchAltIcon,
- SyncIcon: () => SyncIcon,
- TabletIcon: () => TabletIcon,
- ThumbsUpIcon: () => ThumbsUpIcon,
- TimeIcon: () => TimeIcon,
- TimerIcon: () => TimerIcon,
- TransferIcon: () => TransferIcon,
- TrashIcon: () => TrashIcon,
- TwitterIcon: () => TwitterIcon,
- TypeIcon: () => TypeIcon,
- UbuntuIcon: () => UbuntuIcon,
- UndoIcon: () => UndoIcon,
- UnfoldIcon: () => UnfoldIcon,
- UnlockIcon: () => UnlockIcon,
- UnpinIcon: () => UnpinIcon,
- UploadIcon: () => UploadIcon,
- UserAddIcon: () => UserAddIcon,
- UserAltIcon: () => UserAltIcon,
- UserIcon: () => UserIcon,
- UsersIcon: () => UsersIcon,
- VSCodeIcon: () => VSCodeIcon,
- VerifiedIcon: () => VerifiedIcon,
- VideoIcon: () => VideoIcon,
- WandIcon: () => WandIcon,
- WatchIcon: () => WatchIcon,
- WindowsIcon: () => WindowsIcon,
- WrenchIcon: () => WrenchIcon,
- XIcon: () => XIcon,
- YoutubeIcon: () => YoutubeIcon,
- ZoomIcon: () => ZoomIcon,
- ZoomOutIcon: () => ZoomOutIcon,
- ZoomResetIcon: () => ZoomResetIcon,
- iconList: () => iconList
- });
- var React255 = __toESM(require_react(), 1), iconList = [
- {
- name: "Images",
- icons: [
- "PhotoIcon",
- "ComponentIcon",
- "GridIcon",
- "OutlineIcon",
- "PhotoDragIcon",
- "PhotoStabilizeIcon",
- "CameraStabilizeIcon",
- "GridAltIcon",
- "SearchIcon",
- "ZoomIcon",
- "ZoomOutIcon",
- "ZoomResetIcon",
- "EyeIcon",
- "EyeCloseIcon",
- "LightningIcon",
- "LightningOffIcon",
- "MirrorIcon",
- "GrowIcon",
- "ContrastIcon",
- "SwitchAltIcon",
- "ContrastIgnoredIcon",
- "PaintBrushIcon",
- "PaintBrushAltIcon",
- "RulerIcon",
- "CameraIcon",
- "VideoIcon",
- "SpeakerIcon",
- "PlayIcon",
- "PlayBackIcon",
- "PlayNextIcon",
- "RewindIcon",
- "FastForwardIcon",
- "StopAltIcon",
- "SunIcon",
- "MoonIcon",
- "StopAltHollowIcon",
- "PlayHollowIcon",
- "PlayAllHollowIcon",
- "StopIcon",
- "SideBySideIcon",
- "StackedIcon"
- ]
- },
- {
- name: "Documents",
- icons: [
- "BookIcon",
- "DocumentIcon",
- "CopyIcon",
- "FilesIcon",
- "CategoryIcon",
- "FolderIcon",
- "PrintIcon",
- "GraphLineIcon",
- "CalendarIcon",
- "GraphBarIcon",
- "AlignLeftIcon",
- "AlignRightIcon",
- "FilterIcon",
- "DocChartIcon",
- "DocListIcon",
- "DragIcon",
- "MenuIcon"
- ]
- },
- {
- name: "Editing",
- icons: [
- "MarkupIcon",
- "BoldIcon",
- "ItalicIcon",
- "PaperClipIcon",
- "ListOrderedIcon",
- "ListUnorderedIcon",
- "ChecklistIcon",
- "ParagraphIcon",
- "MarkdownIcon"
- ]
- },
- {
- name: "Git",
- icons: [
- "RepoIcon",
- "CommitIcon",
- "BranchIcon",
- "PullRequestIcon",
- "MergeIcon"
- ]
- },
- {
- name: "OS",
- icons: [
- "AppleIcon",
- "LinuxIcon",
- "UbuntuIcon",
- "WindowsIcon",
- "ChromeIcon"
- ]
- },
- {
- name: "Logos",
- icons: [
- "StorybookIcon",
- "AzureDevOpsIcon",
- "BitbucketIcon",
- "ChromaticIcon",
- "ComponentDrivenIcon",
- "DiscordIcon",
- "FacebookIcon",
- "FigmaIcon",
- "GDriveIcon",
- "GithubIcon",
- "GitlabIcon",
- "GoogleIcon",
- "GraphqlIcon",
- "MediumIcon",
- "ReduxIcon",
- "TwitterIcon",
- "YoutubeIcon",
- "VSCodeIcon",
- "LinkedinIcon",
- "XIcon"
- ]
- },
- {
- name: "Devices",
- icons: [
- "BrowserIcon",
- "TabletIcon",
- "MobileIcon",
- "WatchIcon",
- "SidebarIcon",
- "SidebarAltIcon",
- "SidebarAltToggleIcon",
- "SidebarToggleIcon",
- "BottomBarIcon",
- "BottomBarToggleIcon",
- "CPUIcon",
- "DatabaseIcon",
- "MemoryIcon",
- "StructureIcon",
- "BoxIcon",
- "PowerIcon"
- ]
- },
- {
- name: "CRUD",
- icons: [
- "EditIcon",
- "CogIcon",
- "NutIcon",
- "WrenchIcon",
- "EllipsisIcon",
- "WandIcon",
- "SweepIcon",
- "CheckIcon",
- "FormIcon",
- "BatchDenyIcon",
- "BatchAcceptIcon",
- "ControlsIcon",
- "PlusIcon",
- "CloseAltIcon",
- "CrossIcon",
- "TrashIcon",
- "PinAltIcon",
- "UnpinIcon",
- "AddIcon",
- "SubtractIcon",
- "CloseIcon",
- "DeleteIcon",
- "PassedIcon",
- "ChangedIcon",
- "FailedIcon",
- "ClearIcon",
- "CommentIcon",
- "CommentAddIcon",
- "RequestChangeIcon",
- "CommentsIcon",
- "ChatIcon",
- "LockIcon",
- "UnlockIcon",
- "KeyIcon",
- "OutboxIcon",
- "CreditIcon",
- "ButtonIcon",
- "TypeIcon",
- "PointerDefaultIcon",
- "PointerHandIcon",
- "CommandIcon",
- "SaveIcon",
- "SortDownIcon",
- "SortUpIcon",
- "BugIcon",
- "EditorIcon"
- ]
- },
- {
- name: "Communicate",
- icons: [
- "InfoIcon",
- "QuestionIcon",
- "SupportIcon",
- "AlertIcon",
- "AlertAltIcon",
- "EmailIcon",
- "PhoneIcon",
- "LinkIcon",
- "LinkBrokenIcon",
- "BellIcon",
- "RSSIcon",
- "ShareAltIcon",
- "ShareIcon",
- "JumpToIcon",
- "CircleHollowIcon",
- "CircleIcon",
- "BookmarkHollowIcon",
- "BookmarkIcon",
- "DiamondIcon",
- "HeartHollowIcon",
- "HeartIcon",
- "StarHollowIcon",
- "StarIcon",
- "CertificateIcon",
- "VerifiedIcon",
- "ThumbsUpIcon",
- "ShieldIcon",
- "BasketIcon",
- "BeakerIcon",
- "HourglassIcon",
- "FlagIcon",
- "CloudHollowIcon",
- "CloudIcon",
- "StickerIcon",
- "StatusFailIcon",
- "StatusIcon",
- "StatusWarnIcon",
- "StatusPassIcon",
- "GiftIcon",
- "StatusNewIcon",
- "PopOutIcon"
- ]
- },
- {
- name: "Wayfinding",
- icons: [
- "ChevronUpIcon",
- "ChevronDownIcon",
- "ChevronLeftIcon",
- "ChevronRightIcon",
- "ChevronSmallUpIcon",
- "ChevronSmallDownIcon",
- "ChevronSmallLeftIcon",
- "ChevronSmallRightIcon",
- "ArrowUpIcon",
- "ArrowDownIcon",
- "ArrowLeftIcon",
- "ArrowRightIcon",
- "ArrowTopLeftIcon",
- "ArrowTopRightIcon",
- "ArrowBottomLeftIcon",
- "ArrowBottomRightIcon",
- "ArrowSolidUpIcon",
- "ArrowSolidDownIcon",
- "ArrowSolidLeftIcon",
- "ArrowSolidRightIcon",
- "ExpandAltIcon",
- "CollapseIcon",
- "ExpandIcon",
- "UnfoldIcon",
- "TransferIcon",
- "RedirectIcon",
- "UndoIcon",
- "ReplyIcon",
- "SyncIcon",
- "UploadIcon",
- "DownloadIcon",
- "BackIcon",
- "ProceedIcon",
- "RefreshIcon",
- "GlobeIcon",
- "CompassIcon",
- "LocationIcon",
- "PinIcon",
- "TimeIcon",
- "DashboardIcon",
- "TimerIcon",
- "HomeIcon",
- "AdminIcon",
- "DirectionIcon"
- ]
- },
- {
- name: "People",
- icons: [
- "UserIcon",
- "UserAltIcon",
- "UserAddIcon",
- "UsersIcon",
- "ProfileIcon",
- "FaceHappyIcon",
- "FaceNeutralIcon",
- "FaceSadIcon",
- "AccessibilityIcon",
- "AccessibilityAltIcon",
- "AccessibilityIgnoredIcon"
- ]
- }
- ], PhotoIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M6.25 4.254a1.25 1.25 0 11-2.5 0 1.25 1.25 0 012.5 0zm-.5 0a.75.75 0 11-1.5 0 .75.75 0 011.5 0z",
- fill: color2
- }
- ),
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M13 1.504v11a.5.5 0 01-.5.5h-11a.5.5 0 01-.5-.5v-11a.5.5 0 01.5-.5h11a.5.5 0 01.5.5zM2 9.297V2.004h10v5.293L9.854 5.15a.5.5 0 00-.708 0L6.5 7.797 5.354 6.65a.5.5 0 00-.708 0L2 9.297zM9.5 6.21l2.5 2.5v3.293H2V10.71l3-3 3.146 3.146a.5.5 0 00.708-.707L7.207 8.504 9.5 6.21z",
- fill: color2
- }
- )
- )), ComponentIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M3.5 1.004a2.5 2.5 0 00-2.5 2.5v7a2.5 2.5 0 002.5 2.5h7a2.5 2.5 0 002.5-2.5v-7a2.5 2.5 0 00-2.5-2.5h-7zm8.5 5.5H7.5v-4.5h3a1.5 1.5 0 011.5 1.5v3zm0 1v3a1.5 1.5 0 01-1.5 1.5h-3v-4.5H12zm-5.5 4.5v-4.5H2v3a1.5 1.5 0 001.5 1.5h3zM2 6.504h4.5v-4.5h-3a1.5 1.5 0 00-1.5 1.5v3z",
- fill: color2
- }
- )
- )), GridIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M1 1.504a.5.5 0 01.5-.5H6a.5.5 0 01.5.5v4.5a.5.5 0 01-.5.5H1.5a.5.5 0 01-.5-.5v-4.5zm1 4v-3.5h3.5v3.5H2zM7.5 1.504a.5.5 0 01.5-.5h4.5a.5.5 0 01.5.5v4.5a.5.5 0 01-.5.5H8a.5.5 0 01-.5-.5v-4.5zm1 4v-3.5H12v3.5H8.5zM1.5 7.504a.5.5 0 00-.5.5v4.5a.5.5 0 00.5.5H6a.5.5 0 00.5-.5v-4.5a.5.5 0 00-.5-.5H1.5zm.5 1v3.5h3.5v-3.5H2zM7.5 8.004a.5.5 0 01.5-.5h4.5a.5.5 0 01.5.5v4.5a.5.5 0 01-.5.5H8a.5.5 0 01-.5-.5v-4.5zm1 4v-3.5H12v3.5H8.5z",
- fill: color2
- }
- )
- )), OutlineIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M2 2.004v2H1v-2.5a.5.5 0 01.5-.5H4v1H2zM1 9.004v-4h1v4H1zM1 10.004v2.5a.5.5 0 00.5.5H4v-1H2v-2H1zM10 13.004h2.5a.5.5 0 00.5-.5v-2.5h-1v2h-2v1zM12 4.004h1v-2.5a.5.5 0 00-.5-.5H10v1h2v2zM9 12.004v1H5v-1h4zM9 1.004v1H5v-1h4zM13 9.004h-1v-4h1v4zM7 8.004a1 1 0 100-2 1 1 0 000 2z",
- fill: color2
- }
- )
- )), PhotoDragIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 15",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M8.25 3.254a1.25 1.25 0 11-2.5 0 1.25 1.25 0 012.5 0zm-.5 0a.75.75 0 11-1.5 0 .75.75 0 011.5 0z",
- fill: color2
- }
- ),
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M14 7.003v-6.5a.5.5 0 00-.5-.5h-10a.5.5 0 00-.5.5v2.5H.5a.5.5 0 00-.5.5v2.5h1v-2h2v6.5a.5.5 0 00.5.5H10v2H8v1h2.5a.5.5 0 00.5-.5v-2.5h2.5a.5.5 0 00.5-.5v-3.5zm-10-6v5.794L5.646 5.15a.5.5 0 01.708 0L7.5 6.297l2.646-2.647a.5.5 0 01.708 0L13 5.797V1.004H4zm9 6.208l-2.5-2.5-2.293 2.293L9.354 8.15a.5.5 0 11-.708.707L6 6.211l-2 2v1.793h9V7.21z",
- fill: color2
- }
- ),
- React255.createElement(
- "path",
- {
- d: "M0 10.004v-3h1v3H0zM0 13.504v-2.5h1v2h2v1H.5a.5.5 0 01-.5-.5zM7 14.004H4v-1h3v1z",
- fill: color2
- }
- )
- )), PhotoStabilizeIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M6 4a1.25 1.25 0 110 2.5A1.25 1.25 0 016 4zm0 .5A.75.75 0 106 6a.75.75 0 000-1.5z",
- fill: color2
- }
- ),
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M11.5 2a.5.5 0 01.5.5v9a.5.5 0 01-.5.5h-9a.5.5 0 01-.5-.5v-9a.5.5 0 01.5-.5h9zM7.207 9l.647.646a.5.5 0 01-.708.707L5 8.207l-2 2V11h8V8.207l-1.5-1.5L7.207 9zM3 8.793l1.646-1.647.079-.064a.5.5 0 01.629.064L6.5 8.293l2.646-2.647.079-.064a.5.5 0 01.629.064L11 6.793V3H3v5.793z",
- fill: color2
- }
- ),
- React255.createElement(
- "path",
- {
- d: "M0 3.5v-1A2.5 2.5 0 012.5 0h1a.5.5 0 010 1h-1A1.5 1.5 0 001 2.5v1a.5.5 0 01-1 0zM10.5 0h1A2.5 2.5 0 0114 2.5v1a.5.5 0 01-1 0v-1A1.5 1.5 0 0011.5 1h-1a.5.5 0 010-1zM0 10.5v1A2.5 2.5 0 002.5 14h1a.5.5 0 000-1h-1A1.5 1.5 0 011 11.5v-1a.5.5 0 00-1 0zM10.5 14h1a2.5 2.5 0 002.5-2.5v-1a.5.5 0 00-1 0v1a1.5 1.5 0 01-1.5 1.5h-1a.5.5 0 000 1z",
- fill: color2
- }
- )
- )), CameraStabilizeIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement("g", { clipPath: "url(#prefix__clip0_2484_400)", fill: color2 }, React255.createElement("path", { d: "M2.5 1A1.5 1.5 0 001 2.5v1a.5.5 0 01-1 0v-1A2.5 2.5 0 012.5 0h1a.5.5 0 010 1h-1zM8 7a1 1 0 11-2 0 1 1 0 012 0z" }), React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M5.852 2.223A.5.5 0 016.268 2h1.464a.5.5 0 01.416.223L9.333 4H11.5a.5.5 0 01.5.5v5a.5.5 0 01-.5.5h-9a.5.5 0 01-.5-.5v-5a.5.5 0 01.5-.5h2.167l1.185-1.777zM9 7a2 2 0 11-4 0 2 2 0 014 0z"
- }
- ), React255.createElement("path", { d: "M11.5 1A1.5 1.5 0 0113 2.5v1a.5.5 0 001 0v-1A2.5 2.5 0 0011.5 0h-1a.5.5 0 000 1h1zM2.5 13A1.5 1.5 0 011 11.5v-1a.5.5 0 00-1 0v1A2.5 2.5 0 002.5 14h1a.5.5 0 000-1h-1zM11.5 13a1.5 1.5 0 001.5-1.5v-1a.5.5 0 011 0v1a2.5 2.5 0 01-2.5 2.5h-1a.5.5 0 010-1h1z" })),
- React255.createElement("defs", null, React255.createElement("clipPath", { id: "prefix__clip0_2484_400" }, React255.createElement("path", { fill: "#fff", d: "M0 0h14v14H0z" })))
- )), GridAltIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M4 3V1h1v2H4zM4 6v2h1V6H4zM4 11v2h1v-2H4zM9 11v2h1v-2H9zM9 8V6h1v2H9zM9 1v2h1V1H9zM13 5h-2V4h2v1zM11 10h2V9h-2v1zM3 10H1V9h2v1zM1 5h2V4H1v1zM8 5H6V4h2v1zM6 10h2V9H6v1zM4 4h1v1H4V4zM10 4H9v1h1V4zM9 9h1v1H9V9zM5 9H4v1h1V9z",
- fill: color2
- }
- )
- )), SearchIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M9.544 10.206a5.5 5.5 0 11.662-.662.5.5 0 01.148.102l3 3a.5.5 0 01-.708.708l-3-3a.5.5 0 01-.102-.148zM10.5 6a4.5 4.5 0 11-9 0 4.5 4.5 0 019 0z",
- fill: color2
- }
- )
- )), ZoomIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M6 3.5a.5.5 0 01.5.5v1.5H8a.5.5 0 010 1H6.5V8a.5.5 0 01-1 0V6.5H4a.5.5 0 010-1h1.5V4a.5.5 0 01.5-.5z",
- fill: color2
- }
- ),
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M9.544 10.206a5.5 5.5 0 11.662-.662.5.5 0 01.148.102l3 3a.5.5 0 01-.708.708l-3-3a.5.5 0 01-.102-.148zM10.5 6a4.5 4.5 0 11-9 0 4.5 4.5 0 019 0z",
- fill: color2
- }
- )
- )), ZoomOutIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement("path", { d: "M4 5.5a.5.5 0 000 1h4a.5.5 0 000-1H4z", fill: color2 }),
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M6 11.5c1.35 0 2.587-.487 3.544-1.294a.5.5 0 00.102.148l3 3a.5.5 0 00.708-.708l-3-3a.5.5 0 00-.148-.102A5.5 5.5 0 106 11.5zm0-1a4.5 4.5 0 100-9 4.5 4.5 0 000 9z",
- fill: color2
- }
- )
- )), ZoomResetIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M1.5 2.837V1.5a.5.5 0 00-1 0V4a.5.5 0 00.5.5h2.5a.5.5 0 000-1H2.258a4.5 4.5 0 11-.496 4.016.5.5 0 10-.942.337 5.502 5.502 0 008.724 2.353.5.5 0 00.102.148l3 3a.5.5 0 00.708-.708l-3-3a.5.5 0 00-.148-.102A5.5 5.5 0 101.5 2.837z",
- fill: color2
- }
- )
- )), EyeIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement("path", { d: "M7 9.5a2.5 2.5 0 100-5 2.5 2.5 0 000 5z", fill: color2 }),
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M14 7l-.21.293C13.669 7.465 10.739 11.5 7 11.5S.332 7.465.21 7.293L0 7l.21-.293C.331 6.536 3.261 2.5 7 2.5s6.668 4.036 6.79 4.207L14 7zM2.896 5.302A12.725 12.725 0 001.245 7c.296.37.874 1.04 1.65 1.698C4.043 9.67 5.482 10.5 7 10.5c1.518 0 2.958-.83 4.104-1.802A12.72 12.72 0 0012.755 7c-.297-.37-.875-1.04-1.65-1.698C9.957 4.33 8.517 3.5 7 3.5c-1.519 0-2.958.83-4.104 1.802z",
- fill: color2
- }
- )
- )), EyeCloseIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M1.854 1.146a.5.5 0 10-.708.708l11 11a.5.5 0 00.708-.708l-11-11zM11.104 8.698c-.177.15-.362.298-.553.439l.714.714a13.25 13.25 0 002.526-2.558L14 7l-.21-.293C13.669 6.536 10.739 2.5 7 2.5c-.89 0-1.735.229-2.506.58l.764.763A4.859 4.859 0 017 3.5c1.518 0 2.958.83 4.104 1.802A12.724 12.724 0 0112.755 7a12.72 12.72 0 01-1.65 1.698zM.21 6.707c.069-.096 1.03-1.42 2.525-2.558l.714.714c-.191.141-.376.288-.553.439A12.725 12.725 0 001.245 7c.296.37.874 1.04 1.65 1.698C4.043 9.67 5.482 10.5 7 10.5a4.86 4.86 0 001.742-.344l.764.764c-.772.351-1.616.58-2.506.58C3.262 11.5.332 7.465.21 7.293L0 7l.21-.293z",
- fill: color2
- }
- ),
- React255.createElement(
- "path",
- {
- d: "M4.5 7c0-.322.061-.63.172-.914l3.242 3.242A2.5 2.5 0 014.5 7zM9.328 7.914L6.086 4.672a2.5 2.5 0 013.241 3.241z",
- fill: color2
- }
- )
- )), LightningIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M2.522 6.6a.566.566 0 00-.176.544.534.534 0 00.382.41l2.781.721-1.493 5.013a.563.563 0 00.216.627.496.496 0 00.63-.06l6.637-6.453a.568.568 0 00.151-.54.534.534 0 00-.377-.396l-2.705-.708 2.22-4.976a.568.568 0 00-.15-.666.497.497 0 00-.648.008L2.522 6.6zm7.72.63l-3.067-.804L9.02 2.29 3.814 6.803l2.95.764-1.277 4.285 4.754-4.622zM4.51 13.435l.037.011-.037-.011z",
- fill: color2
- }
- )
- )), LightningOffIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M10.139 8.725l1.36-1.323a.568.568 0 00.151-.54.534.534 0 00-.377-.396l-2.705-.708 2.22-4.976a.568.568 0 00-.15-.666.497.497 0 00-.648.008L5.464 4.05l.708.71 2.848-2.47-1.64 3.677.697.697 2.164.567-.81.787.708.708zM2.523 6.6a.566.566 0 00-.177.544.534.534 0 00.382.41l2.782.721-1.494 5.013a.563.563 0 00.217.627.496.496 0 00.629-.06l3.843-3.736-.708-.707-2.51 2.44 1.137-3.814-.685-.685-2.125-.55.844-.731-.71-.71L2.524 6.6zM1.854 1.146a.5.5 0 10-.708.708l11 11a.5.5 0 00.708-.708l-11-11z",
- fill: color2
- }
- )
- )), MirrorIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M1 1.504a.5.5 0 01.5-.5h11a.5.5 0 01.5.5v11a.5.5 0 01-.5.5h-11a.5.5 0 01-.5-.5v-11zm1 10.5h10v-10l-10 10z",
- fill: color2
- }
- )
- )), GrowIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M1.5 1.004a.5.5 0 100 1H12v10.5a.5.5 0 001 0v-10.5a1 1 0 00-1-1H1.5z",
- fill: color2
- }
- ),
- React255.createElement(
- "path",
- {
- d: "M1 3.504a.5.5 0 01.5-.5H10a1 1 0 011 1v8.5a.5.5 0 01-1 0v-8.5H1.5a.5.5 0 01-.5-.5z",
- fill: color2
- }
- ),
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M1.5 5.004a.5.5 0 00-.5.5v7a.5.5 0 00.5.5h7a.5.5 0 00.5-.5v-7a.5.5 0 00-.5-.5h-7zm.5 1v6h6v-6H2z",
- fill: color2
- }
- )
- )), ContrastIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 15",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M3 3.004H.5a.5.5 0 00-.5.5v10a.5.5 0 00.5.5h10a.5.5 0 00.5-.5v-2.5h2.5a.5.5 0 00.5-.5v-10a.5.5 0 00-.5-.5h-10a.5.5 0 00-.5.5v2.5zm1 1v2.293l2.293-2.293H4zm-1 0v6.5a.499.499 0 00.497.5H10v2H1v-9h2zm1-1h6.5a.499.499 0 01.5.5v6.5h2v-9H4v2zm6 7V7.71l-2.293 2.293H10zm0-3.707V4.71l-5.293 5.293h1.586L10 6.297zm-.707-2.293H7.707L4 7.71v1.586l5.293-5.293z",
- fill: color2
- }
- )
- )), SwitchAltIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 15",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M3 3.004v-2.5a.5.5 0 01.5-.5h10a.5.5 0 01.5.5v10a.5.5 0 01-.5.5H11v2.5a.5.5 0 01-.5.5H.5a.5.5 0 01-.5-.5v-10a.5.5 0 01.5-.5H3zm1 0v-2h9v9h-2v-6.5a.5.5 0 00-.5-.5H4zm6 8v2H1v-9h2v6.5a.5.5 0 00.5.5H10zm0-1H4v-6h6v6z",
- fill: color2
- }
- )
- )), ContrastIgnoredIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "g",
- {
- clipPath: "url(#prefix__clip0_2359_559)",
- fillRule: "evenodd",
- clipRule: "evenodd",
- fill: color2
- },
- React255.createElement("path", { d: "M3 3.004H.5a.5.5 0 00-.5.5v10a.5.5 0 00.5.5h7.176a4.526 4.526 0 01-.916-1H1v-9h2v6.5a.499.499 0 00.497.5h2.531a4.548 4.548 0 01-.001-1h-1.32l2.16-2.16c.274-.374.603-.703.977-.977L10 4.711v1.316a4.552 4.552 0 011 0V3.504a.48.48 0 00-.038-.191.5.5 0 00-.462-.31H4v-2h9v5.755c.378.253.715.561 1 .913V.504a.5.5 0 00-.5-.5h-10a.5.5 0 00-.5.5v2.5zm1 1v2.293l2.293-2.293H4zm5.293 0H7.707L4 7.71v1.586l5.293-5.293z" }),
- React255.createElement("path", { d: "M14 10.5a3.5 3.5 0 11-7 0 3.5 3.5 0 017 0zm-5.5 0A.5.5 0 019 10h3a.5.5 0 010 1H9a.5.5 0 01-.5-.5z" })
- ),
- React255.createElement("defs", null, React255.createElement("clipPath", { id: "prefix__clip0_2359_559" }, React255.createElement("path", { fill: "#fff", d: "M0 0h14v14H0z" })))
- )), PaintBrushIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M11.854.146a.5.5 0 00-.708 0L2.983 8.31a2.24 2.24 0 00-1.074.6C.677 10.14.24 11.902.085 12.997 0 13.6 0 14 0 14s.4 0 1.002-.085c1.095-.155 2.857-.592 4.089-1.824a2.24 2.24 0 00.6-1.074l8.163-8.163a.5.5 0 000-.708l-2-2zM5.6 9.692l.942-.942L5.25 7.457l-.942.943A2.242 2.242 0 015.6 9.692zm1.649-1.65L12.793 2.5 11.5 1.207 5.957 6.75 7.25 8.043zM4.384 9.617a1.25 1.25 0 010 1.768c-.767.766-1.832 1.185-2.78 1.403-.17.04-.335.072-.49.098.027-.154.06-.318.099-.49.219-.947.637-2.012 1.403-2.779a1.25 1.25 0 011.768 0z",
- fill: color2
- }
- )
- )), PaintBrushAltIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M10.027.271a.752.752 0 01.947 0l.057.052 2.646 2.647.052.056a.752.752 0 010 .948l-.052.056-4.47 4.47 1.147 1.146.293-.293a.5.5 0 01.707 0l2.293 2.293a.5.5 0 010 .707l-1.293 1.293-.078.065a.502.502 0 01-.55 0l-.08-.065-2.292-2.293a.5.5 0 010-.707l.293-.293L8.324 9.03a.75.75 0 010-1.06l4.47-4.47L10.5 1.207l-.647.646.086.086a1.5 1.5 0 010 2.122L4.5 9.5l-.177.183C2.592 11.53 4 12.03 4 13a1 1 0 01-2 0c0-1 1.464-1.537 0-3l.003-.004-.063-.057-.879-.879a1.5 1.5 0 01-.103-2.006l.103-.115L6.94 1.061a1.5 1.5 0 012.121 0l.086.085.823-.823.057-.052zM10.415 11L12 12.586l.585-.586-1.585-1.586-.586.586zM8.354 1.768a.5.5 0 00-.629-.064l-.078.064L2.32 7.094c.782.138 2.263-.097 3.52-.349l3.393-3.392.063-.078a.501.501 0 000-.55l-.063-.079-.879-.878z",
- fill: color2
- }
- )
- )), RulerIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M1.5 1.004a.5.5 0 01.5.5v.5h10v-.5a.5.5 0 011 0v2a.5.5 0 01-1 0v-.5H2v.5a.5.5 0 01-1 0v-2a.5.5 0 01.5-.5z",
- fill: color2
- }
- ),
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M1.5 6a.5.5 0 00-.5.5v6a.5.5 0 00.5.5h11a.5.5 0 00.5-.5v-6a.5.5 0 00-.5-.5h-11zM2 7v5h10V7h-1v2.5a.5.5 0 01-1 0V7h-.75v1a.5.5 0 01-1 0V7H7.5v2.5a.5.5 0 01-1 0V7h-.75v1a.5.5 0 01-1 0V7H4v2.5a.5.5 0 01-1 0V7H2z",
- fill: color2
- }
- )
- )), CameraIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M10 7a3 3 0 11-6 0 3 3 0 016 0zM9 7a2 2 0 11-4 0 2 2 0 014 0z",
- fill: color2
- }
- ),
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M2.5 1a.5.5 0 00-.5.5v.504H.5a.5.5 0 00-.5.5v9a.5.5 0 00.5.5h13a.5.5 0 00.5-.5v-9a.5.5 0 00-.5-.5H6V1.5a.5.5 0 00-.5-.5h-3zM1 3.004v8h12v-8H1z",
- fill: color2
- }
- )
- )), VideoIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement("path", { d: "M2.5 10a.5.5 0 100-1 .5.5 0 000 1z", fill: color2 }),
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M0 4a2 2 0 012-2h6a2 2 0 012 2v.5l3.189-2.391A.5.5 0 0114 2.5v9a.5.5 0 01-.804.397L10 9.5v.5a2 2 0 01-2 2H2a2 2 0 01-2-2V4zm9 0v1.5a.5.5 0 00.8.4L13 3.5v7L9.8 8.1a.5.5 0 00-.8.4V10a1 1 0 01-1 1H2a1 1 0 01-1-1V4a1 1 0 011-1h6a1 1 0 011 1z",
- fill: color2
- }
- )
- )), SpeakerIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M1 4.5v5a.5.5 0 00.5.5H4l3.17 2.775a.5.5 0 00.83-.377V1.602a.5.5 0 00-.83-.376L4 4H1.5a.5.5 0 00-.5.5zM4 9V5H2v4h2zm.998.545A.504.504 0 005 9.5v-5c0-.015 0-.03-.002-.044L7 2.704v8.592L4.998 9.545z",
- fill: color2
- }
- ),
- React255.createElement(
- "path",
- {
- d: "M10.15 1.752a.5.5 0 00-.3.954 4.502 4.502 0 010 8.588.5.5 0 00.3.954 5.502 5.502 0 000-10.496z",
- fill: color2
- }
- ),
- React255.createElement(
- "path",
- {
- d: "M10.25 3.969a.5.5 0 00-.5.865 2.499 2.499 0 010 4.332.5.5 0 10.5.866 3.499 3.499 0 000-6.063z",
- fill: color2
- }
- )
- )), PlayIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M12.813 7.425l-9.05 5.603A.5.5 0 013 12.603V1.398a.5.5 0 01.763-.425l9.05 5.602a.5.5 0 010 .85z",
- fill: color2
- }
- )
- )), PlayBackIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M11.24 12.035L3.697 7.427A.494.494 0 013.5 7.2v4.05a.75.75 0 01-1.5 0v-8.5a.75.75 0 011.5 0V6.8a.494.494 0 01.198-.227l7.541-4.608A.5.5 0 0112 2.39v9.217a.5.5 0 01-.76.427z",
- fill: color2
- }
- )
- )), PlayNextIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M2.76 12.035l7.542-4.608A.495.495 0 0010.5 7.2v4.05a.75.75 0 001.5 0v-8.5a.75.75 0 00-1.5 0V6.8a.495.495 0 00-.198-.227L2.76 1.965A.5.5 0 002 2.39v9.217a.5.5 0 00.76.427z",
- fill: color2
- }
- )
- )), RewindIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M9 2.42v2.315l4.228-2.736a.5.5 0 01.772.42v9.162a.5.5 0 01-.772.42L9 9.263v2.317a.5.5 0 01-.772.42L1.5 7.647v3.603a.75.75 0 01-1.5 0v-8.5a.75.75 0 011.5 0v3.603L8.228 2A.5.5 0 019 2.42z",
- fill: color2
- }
- )
- )), FastForwardIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M5 2.42v2.315L.772 1.999a.5.5 0 00-.772.42v9.162a.5.5 0 00.772.42L5 9.263v2.317a.5.5 0 00.772.42L12.5 7.647v3.603a.75.75 0 001.5 0v-8.5a.75.75 0 00-1.5 0v3.603L5.772 2A.5.5 0 005 2.42z",
- fill: color2
- }
- )
- )), StopAltIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M1 1.504a.5.5 0 01.5-.5h11a.5.5 0 01.5.5v11a.5.5 0 01-.5.5h-11a.5.5 0 01-.5-.5v-11z",
- fill: color2
- }
- )
- )), SunIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement("g", { clipPath: "url(#prefix__clip0_1107_3492)", fill: color2 }, React255.createElement("path", { d: "M7.5.5a.5.5 0 00-1 0V2a.5.5 0 001 0V.5z" }), React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M7 10a3 3 0 100-6 3 3 0 000 6zm0-1a2 2 0 100-4 2 2 0 000 4z"
- }
- ), React255.createElement("path", { d: "M7 11.5a.5.5 0 01.5.5v1.5a.5.5 0 01-1 0V12a.5.5 0 01.5-.5zM11.5 7a.5.5 0 01.5-.5h1.5a.5.5 0 010 1H12a.5.5 0 01-.5-.5zM.5 6.5a.5.5 0 000 1H2a.5.5 0 000-1H.5zM3.818 10.182a.5.5 0 010 .707l-1.06 1.06a.5.5 0 11-.708-.706l1.06-1.06a.5.5 0 01.708 0zM11.95 2.757a.5.5 0 10-.707-.707l-1.061 1.061a.5.5 0 10.707.707l1.06-1.06zM10.182 10.182a.5.5 0 01.707 0l1.06 1.06a.5.5 0 11-.706.708l-1.061-1.06a.5.5 0 010-.708zM2.757 2.05a.5.5 0 10-.707.707l1.06 1.061a.5.5 0 00.708-.707l-1.06-1.06z" })),
- React255.createElement("defs", null, React255.createElement("clipPath", { id: "prefix__clip0_1107_3492" }, React255.createElement("path", { fill: "#fff", d: "M0 0h14v14H0z" })))
- )), MoonIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement("g", { clipPath: "url(#prefix__clip0_1107_3493)" }, React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M7.78.044A6.968 6.968 0 003.5.94a6.999 6.999 0 107 12.122 6.97 6.97 0 002.87-3.16c.098-.213-.144-.417-.359-.322a4.976 4.976 0 01-2.01.42A5 5 0 018.542.645C8.747.53 8.73.214 8.5.164a7.042 7.042 0 00-.72-.12zm-1.268.975a6 6 0 004.98 9.96 6 6 0 11-4.98-9.96z",
- fill: color2
- }
- )),
- React255.createElement("defs", null, React255.createElement("clipPath", { id: "prefix__clip0_1107_3493" }, React255.createElement("path", { fill: "#fff", d: "M0 0h14v14H0z" })))
- )), StopAltHollowIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M2.2 2.204v9.6h9.6v-9.6H2.2zm-.7-1.2a.5.5 0 00-.5.5v11a.5.5 0 00.5.5h11a.5.5 0 00.5-.5v-11a.5.5 0 00-.5-.5h-11z",
- fill: color2
- }
- )
- )), PlayHollowIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M4.2 10.88L10.668 7 4.2 3.12v7.76zM3 2.414v9.174a.8.8 0 001.212.686l7.645-4.587a.8.8 0 000-1.372L4.212 1.727A.8.8 0 003 2.413z",
- fill: color2
- }
- )
- )), PlayAllHollowIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M5.2 10.88L11.668 7 5.2 3.12v7.76zM4 2.414v9.174a.8.8 0 001.212.686l7.645-4.587a.8.8 0 000-1.372L5.212 1.727A.8.8 0 004 2.413zM1.5 1.6a.6.6 0 01.6.6v9.6a.6.6 0 11-1.2 0V2.2a.6.6 0 01.6-.6z",
- fill: color2
- }
- ),
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M.963 1.932a.6.6 0 01.805-.268l1 .5a.6.6 0 01-.536 1.073l-1-.5a.6.6 0 01-.269-.805zM3.037 11.132a.6.6 0 01-.269.805l-1 .5a.6.6 0 01-.536-1.073l1-.5a.6.6 0 01.805.268z",
- fill: color2
- }
- )
- )), StopIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M4.5 4a.5.5 0 00-.5.5v5a.5.5 0 00.5.5h5a.5.5 0 00.5-.5v-5a.5.5 0 00-.5-.5h-5z",
- fill: color2
- }
- ),
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M14 7A7 7 0 110 7a7 7 0 0114 0zm-1 0A6 6 0 111 7a6 6 0 0112 0z",
- fill: color2
- }
- )
- )), SideBySideIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M1 1.504a.5.5 0 01.5-.5h11a.5.5 0 01.5.5v11a.5.5 0 01-.5.5h-11a.5.5 0 01-.5-.5v-11zm1 10.5v-10h5v10H2z",
- fill: color2
- }
- )
- )), StackedIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M12.5 1.004a.5.5 0 01.5.5v11a.5.5 0 01-.5.5h-11a.5.5 0 01-.5-.5v-11a.5.5 0 01.5-.5h11zm-10.5 1h10v5H2v-5z",
- fill: color2
- }
- )
- )), BookIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M13 2a2 2 0 00-2-2H1.5a.5.5 0 00-.5.5v13a.5.5 0 00.5.5H11a2 2 0 002-2V2zM3 13h8a1 1 0 001-1V2a1 1 0 00-1-1H7v6.004a.5.5 0 01-.856.352l-.002-.002L5.5 6.71l-.645.647A.5.5 0 014 7.009V1H3v12zM5 1v4.793l.146-.146a.5.5 0 01.743.039l.111.11V1H5z",
- fill: color2
- }
- )
- )), DocumentIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M4 5.5a.5.5 0 01.5-.5h5a.5.5 0 010 1h-5a.5.5 0 01-.5-.5zM4.5 7.5a.5.5 0 000 1h5a.5.5 0 000-1h-5zM4 10.5a.5.5 0 01.5-.5h5a.5.5 0 010 1h-5a.5.5 0 01-.5-.5z",
- fill: color2
- }
- ),
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M1.5 0a.5.5 0 00-.5.5v13a.5.5 0 00.5.5h11a.5.5 0 00.5-.5V3.207a.5.5 0 00-.146-.353L10.146.146A.5.5 0 009.793 0H1.5zM2 1h7.5v2a.5.5 0 00.5.5h2V13H2V1z",
- fill: color2
- }
- )
- )), CopyIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 15",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M11.746.07A.5.5 0 0011.5.003h-6a.5.5 0 00-.5.5v2.5H.5a.5.5 0 00-.5.5v10a.5.5 0 00.5.5h8a.5.5 0 00.5-.5v-2.5h4.5a.5.5 0 00.5-.5v-8a.498.498 0 00-.15-.357L11.857.154a.506.506 0 00-.11-.085zM9 10.003h4v-7h-1.5a.5.5 0 01-.5-.5v-1.5H6v2h.5a.5.5 0 01.357.15L8.85 5.147c.093.09.15.217.15.357v4.5zm-8-6v9h7v-7H6.5a.5.5 0 01-.5-.5v-1.5H1z",
- fill: color2
- }
- )
- )), FilesIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 15",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M6.5 11a.5.5 0 010 1h-4a.5.5 0 010-1h4zM4.5 5a.5.5 0 01.5.5V7h1.5a.5.5 0 010 1H5v1.5a.5.5 0 01-1 0V8H2.5a.5.5 0 010-1H4V5.5a.5.5 0 01.5-.5z",
- fill: color2
- }
- ),
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M11.5.004a.5.5 0 01.357.15l1.993 1.993a.5.5 0 01.15.358v8a.5.5 0 01-.5.5H9v2.499a.5.5 0 01-.5.5h-8a.5.5 0 01-.5-.5v-10a.5.5 0 01.5-.5H5v-2.5a.5.5 0 01.5-.5h6zm-10.5 13h7v-7l-2-2H1v9zm5-10h.5a.5.5 0 01.357.15L8.85 5.146a.5.5 0 01.15.358v4.5h4v-7l-2-2H6v2z",
- fill: color2
- }
- )
- )), CategoryIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M3 1.5a.5.5 0 01.5-.5h7a.5.5 0 010 1h-7a.5.5 0 01-.5-.5zM2 3.504a.5.5 0 01.5-.5h9a.5.5 0 010 1h-9a.5.5 0 01-.5-.5z",
- fill: color2
- }
- ),
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M1 5.5a.5.5 0 01.5-.5h11a.5.5 0 01.5.5v7a.5.5 0 01-.5.5h-11a.5.5 0 01-.5-.5v-7zM2 12V6h10v6H2z",
- fill: color2
- }
- )
- )), FolderIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M6.586 3.504l-1.5-1.5H1v9h12v-7.5H6.586zm.414-1L5.793 1.297a1 1 0 00-.707-.293H.5a.5.5 0 00-.5.5v10a.5.5 0 00.5.5h13a.5.5 0 00.5-.5v-8.5a.5.5 0 00-.5-.5H7z",
- fill: color2
- }
- )
- )), PrintIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M4.5 8.004a.5.5 0 100 1h5a.5.5 0 000-1h-5zM4.5 10.004a.5.5 0 000 1h5a.5.5 0 000-1h-5z",
- fill: color2
- }
- ),
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M2 1.504a.5.5 0 01.5-.5h8a.498.498 0 01.357.15l.993.993c.093.09.15.217.15.357v1.5h1.5a.5.5 0 01.5.5v5a.5.5 0 01-.5.5H12v2.5a.5.5 0 01-.5.5h-9a.5.5 0 01-.5-.5v-2.5H.5a.5.5 0 01-.5-.5v-5a.5.5 0 01.5-.5H2v-2.5zm11 7.5h-1v-2.5a.5.5 0 00-.5-.5h-9a.5.5 0 00-.5.5v2.5H1v-4h12v4zm-2-6v1H3v-2h7v.5a.5.5 0 00.5.5h.5zm-8 9h8v-5H3v5z",
- fill: color2
- }
- )
- )), GraphLineIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M5.146 6.15a.5.5 0 01.708 0L7 7.297 9.146 5.15a.5.5 0 01.708 0l1 1a.5.5 0 01-.708.707L9.5 6.211 7.354 8.357a.5.5 0 01-.708 0L5.5 7.211 3.854 8.857a.5.5 0 11-.708-.707l2-2z",
- fill: color2
- }
- ),
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M1.5 1.004a.5.5 0 00-.5.5v11a.5.5 0 00.5.5h11a.5.5 0 00.5-.5v-11a.5.5 0 00-.5-.5h-11zm.5 1v10h10v-10H2z",
- fill: color2
- }
- )
- )), CalendarIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M3.5 0a.5.5 0 01.5.5V1h6V.5a.5.5 0 011 0V1h1.5a.5.5 0 01.5.5v11a.5.5 0 01-.5.5h-11a.5.5 0 01-.5-.5v-11a.5.5 0 01.5-.5H3V.5a.5.5 0 01.5-.5zM2 4v2.3h3V4H2zm0 5.2V6.8h3v2.4H2zm0 .5V12h3V9.7H2zm3.5 0V12h3V9.7h-3zm3.5 0V12h3V9.7H9zm3-.5H9V6.8h3v2.4zm-3.5 0h-3V6.8h3v2.4zM9 4v2.3h3V4H9zM5.5 6.3h3V4h-3v2.3z",
- fill: color2
- }
- )
- )), GraphBarIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M12 2.5a.5.5 0 00-1 0v10a.5.5 0 001 0v-10zM9 4.5a.5.5 0 00-1 0v8a.5.5 0 001 0v-8zM5.5 7a.5.5 0 01.5.5v5a.5.5 0 01-1 0v-5a.5.5 0 01.5-.5zM3 10.5a.5.5 0 00-1 0v2a.5.5 0 001 0v-2z",
- fill: color2
- }
- )
- )), AlignLeftIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M13 2a.5.5 0 010 1H1a.5.5 0 010-1h12zM10 5a.5.5 0 010 1H1a.5.5 0 010-1h9zM11.5 8.5A.5.5 0 0011 8H1a.5.5 0 000 1h10a.5.5 0 00.5-.5zM7.5 11a.5.5 0 010 1H1a.5.5 0 010-1h6.5z",
- fill: color2
- }
- )
- )), AlignRightIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M1 2a.5.5 0 000 1h12a.5.5 0 000-1H1zM4 5a.5.5 0 000 1h9a.5.5 0 000-1H4zM2.5 8.5A.5.5 0 013 8h10a.5.5 0 010 1H3a.5.5 0 01-.5-.5zM6.5 11a.5.5 0 000 1H13a.5.5 0 000-1H6.5z",
- fill: color2
- }
- )
- )), FilterIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M1 2a.5.5 0 000 1h12a.5.5 0 000-1H1zM3 5a.5.5 0 000 1h8a.5.5 0 000-1H3zM4.5 8.5A.5.5 0 015 8h4a.5.5 0 010 1H5a.5.5 0 01-.5-.5zM6.5 11a.5.5 0 000 1h1a.5.5 0 000-1h-1z",
- fill: color2
- }
- )
- )), DocChartIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M1 1.5a.5.5 0 01.5-.5h11a.5.5 0 01.5.5v11a.5.5 0 01-.5.5h-11a.5.5 0 01-.5-.5v-11zM2 4v2.3h3V4H2zm0 5.2V6.8h3v2.4H2zm0 .5V12h3V9.7H2zm3.5 0V12h3V9.7h-3zm3.5 0V12h3V9.7H9zm3-.5H9V6.8h3v2.4zm-3.5 0h-3V6.8h3v2.4zM9 6.3h3V4H9v2.3zm-3.5 0h3V4h-3v2.3z",
- fill: color2
- }
- )
- )), DocListIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M3.5 6.5A.5.5 0 014 6h6a.5.5 0 010 1H4a.5.5 0 01-.5-.5zM4 9a.5.5 0 000 1h6a.5.5 0 000-1H4z",
- fill: color2
- }
- ),
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M1 1.5a.5.5 0 01.5-.5h11a.5.5 0 01.5.5v11a.5.5 0 01-.5.5h-11a.5.5 0 01-.5-.5v-11zM2 4v8h10V4H2z",
- fill: color2
- }
- )
- )), DragIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M13 4a.5.5 0 010 1H1a.5.5 0 010-1h12zM13.5 9.5A.5.5 0 0013 9H1a.5.5 0 000 1h12a.5.5 0 00.5-.5z",
- fill: color2
- }
- )
- )), MenuIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M13 3.5a.5.5 0 010 1H1a.5.5 0 010-1h12zM13.5 10a.5.5 0 00-.5-.5H1a.5.5 0 000 1h12a.5.5 0 00.5-.5zM13 6.5a.5.5 0 010 1H1a.5.5 0 010-1h12z",
- fill: color2
- }
- )
- )), MarkupIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M8.982 1.632a.5.5 0 00-.964-.263l-3 11a.5.5 0 10.964.263l3-11zM3.32 3.616a.5.5 0 01.064.704L1.151 7l2.233 2.68a.5.5 0 11-.768.64l-2.5-3a.5.5 0 010-.64l2.5-3a.5.5 0 01.704-.064zM10.68 3.616a.5.5 0 00-.064.704L12.849 7l-2.233 2.68a.5.5 0 00.768.64l2.5-3a.5.5 0 000-.64l-2.5-3a.5.5 0 00-.704-.064z",
- fill: color2
- }
- )
- )), BoldIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M3 2v1.5h1v7H3V12h5a3 3 0 001.791-5.407A2.75 2.75 0 008 2.011V2H3zm5 5.5H5.5v3H8a1.5 1.5 0 100-3zm-.25-4H5.5V6h2.25a1.25 1.25 0 100-2.5z",
- fill: color2
- }
- )
- )), ItalicIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement("path", { d: "M5 2h6v1H8.5l-2 8H9v1H3v-1h2.5l2-8H5V2z", fill: color2 })
- )), PaperClipIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M10.553 2.268a1.5 1.5 0 00-2.12 0L2.774 7.925a2.5 2.5 0 003.536 3.535l3.535-3.535a.5.5 0 11.707.707l-3.535 3.536-.002.002a3.5 3.5 0 01-4.959-4.941l.011-.011L7.725 1.56l.007-.008a2.5 2.5 0 013.53 3.541l-.002.002-5.656 5.657-.003.003a1.5 1.5 0 01-2.119-2.124l3.536-3.536a.5.5 0 11.707.707L4.189 9.34a.5.5 0 00.707.707l5.657-5.657a1.5 1.5 0 000-2.121z",
- fill: color2
- }
- )
- )), ListOrderedIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M5 2.5a.5.5 0 01.5-.5h7a.5.5 0 010 1h-7a.5.5 0 01-.5-.5zM5 7a.5.5 0 01.5-.5h7a.5.5 0 010 1h-7A.5.5 0 015 7zM5.5 11a.5.5 0 000 1h7a.5.5 0 000-1h-7zM2.5 2H1v1h1v3h1V2.5a.5.5 0 00-.5-.5zM3 8.5v1a.5.5 0 01-1 0V9h-.5a.5.5 0 010-1h1a.5.5 0 01.5.5zM2 10.5a.5.5 0 00-1 0V12h2v-1H2v-.5z",
- fill: color2
- }
- )
- )), ListUnorderedIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M2.75 2.5a.75.75 0 11-1.5 0 .75.75 0 011.5 0zM5.5 2a.5.5 0 000 1h7a.5.5 0 000-1h-7zM5.5 11a.5.5 0 000 1h7a.5.5 0 000-1h-7zM2 12.25a.75.75 0 100-1.5.75.75 0 000 1.5zM5 7a.5.5 0 01.5-.5h7a.5.5 0 010 1h-7A.5.5 0 015 7zM2 7.75a.75.75 0 100-1.5.75.75 0 000 1.5z",
- fill: color2
- }
- )
- )), ChecklistIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M3.5 10a.5.5 0 01.5.5v2a.5.5 0 01-.5.5h-2a.5.5 0 01-.5-.5v-2a.5.5 0 01.5-.5h2zM2 12h1v-1H2v1z",
- fill: color2
- }
- ),
- React255.createElement(
- "path",
- {
- d: "M12.5 11a.5.5 0 110 1h-7a.5.5 0 010-1h7zM3.146 5.646a.5.5 0 11.708.707L3.207 7l.647.646a.5.5 0 11-.708.707L2.5 7.707l-.646.646a.5.5 0 01-.708-.707L1.793 7l-.647-.647a.5.5 0 11.708-.707l.646.647.646-.647zM12.5 6.5a.5.5 0 010 1h-7a.5.5 0 010-1h7zM4.146 1.146a.5.5 0 11.708.707l-2 2-.079.065a.498.498 0 01-.629-.065l-1-1a.5.5 0 11.708-.707l.646.647 1.646-1.647zM12.5 2a.5.5 0 010 1h-7a.5.5 0 010-1h7z",
- fill: color2
- }
- )
- )), ParagraphIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M6 7a3 3 0 110-6h5.5a.5.5 0 010 1H10v10.5a.5.5 0 01-1 0V2H7v10.5a.5.5 0 01-1 0V7z",
- fill: color2
- }
- )
- )), MarkdownIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M2 4.5h1.5L5 6.375 6.5 4.5H8v5H6.5V7L5 8.875 3.5 7v2.5H2v-5zM9.75 4.5h1.5V7h1.25l-2 2.5-2-2.5h1.25V4.5z",
- fill: color2
- }
- ),
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M.5 2a.5.5 0 00-.5.5v9a.5.5 0 00.5.5h13a.5.5 0 00.5-.5v-9a.5.5 0 00-.5-.5H.5zM1 3v8h12V3H1z",
- fill: color2
- }
- )
- )), RepoIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M5 2.5a.5.5 0 11-1 0 .5.5 0 011 0zM4.5 5a.5.5 0 100-1 .5.5 0 000 1zM5 6.5a.5.5 0 11-1 0 .5.5 0 011 0z",
- fill: color2
- }
- ),
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M11 0a2 2 0 012 2v10a2 2 0 01-2 2H1.5a.5.5 0 01-.5-.5V.5a.5.5 0 01.5-.5H11zm0 1H3v12h8a1 1 0 001-1V2a1 1 0 00-1-1z",
- fill: color2
- }
- )
- )), CommitIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M3.031 7.5a4 4 0 007.938 0H13.5a.5.5 0 000-1h-2.53a4 4 0 00-7.94 0H.501a.5.5 0 000 1h2.531zM7 10a3 3 0 100-6 3 3 0 000 6z",
- fill: color2
- }
- )
- )), BranchIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M6 2.5a1.5 1.5 0 01-1 1.415v4.053C5.554 7.4 6.367 7 7.5 7c.89 0 1.453-.252 1.812-.557.218-.184.374-.4.482-.62a1.5 1.5 0 111.026.143c-.155.423-.425.87-.86 1.24C9.394 7.685 8.59 8 7.5 8c-1.037 0-1.637.42-1.994.917a2.81 2.81 0 00-.472 1.18A1.5 1.5 0 114 10.086v-6.17A1.5 1.5 0 116 2.5zm-2 9a.5.5 0 111 0 .5.5 0 01-1 0zm1-9a.5.5 0 11-1 0 .5.5 0 011 0zm6 2a.5.5 0 11-1 0 .5.5 0 011 0z",
- fill: color2
- }
- )
- )), PullRequestIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M8.354 1.354L7.707 2H8.5A2.5 2.5 0 0111 4.5v5.585a1.5 1.5 0 11-1 0V4.5A1.5 1.5 0 008.5 3h-.793l.647.646a.5.5 0 11-.708.708l-1.5-1.5a.5.5 0 010-.708l1.5-1.5a.5.5 0 11.708.708zM11 11.5a.5.5 0 11-1 0 .5.5 0 011 0zM4 3.915a1.5 1.5 0 10-1 0v6.17a1.5 1.5 0 101 0v-6.17zM3.5 11a.5.5 0 100 1 .5.5 0 000-1zm0-8a.5.5 0 100-1 .5.5 0 000 1z",
- fill: color2
- }
- )
- )), MergeIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M4.108 3.872A1.5 1.5 0 103 3.915v6.17a1.5 1.5 0 101 0V6.41c.263.41.573.77.926 1.083 1.108.98 2.579 1.433 4.156 1.5A1.5 1.5 0 109.09 7.99c-1.405-.065-2.62-.468-3.5-1.248-.723-.64-1.262-1.569-1.481-2.871zM3.5 11a.5.5 0 100 1 .5.5 0 000-1zM4 2.5a.5.5 0 11-1 0 .5.5 0 011 0zm7 6a.5.5 0 11-1 0 .5.5 0 011 0z",
- fill: color2
- }
- )
- )), AppleIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M11.03 8.103a3.044 3.044 0 01-.202-1.744 2.697 2.697 0 011.4-1.935c-.749-1.18-1.967-1.363-2.35-1.403-.835-.086-2.01.56-2.648.57h-.016c-.639-.01-1.814-.656-2.649-.57-.415.044-1.741.319-2.541 1.593-.281.447-.498 1.018-.586 1.744a6.361 6.361 0 00-.044.85c.005.305.028.604.07.895.09.62.259 1.207.477 1.744.242.595.543 1.13.865 1.585.712 1.008 1.517 1.59 1.971 1.6.934.021 1.746-.61 2.416-.594.006.002.014.003.02.002h.017c.007 0 .014 0 .021-.002.67-.017 1.481.615 2.416.595.453-.011 1.26-.593 1.971-1.6a7.95 7.95 0 00.97-1.856c-.697-.217-1.27-.762-1.578-1.474zm-2.168-5.97c.717-.848.69-2.07.624-2.125-.065-.055-1.25.163-1.985.984-.735.82-.69 2.071-.624 2.125.064.055 1.268-.135 1.985-.984z",
- fill: color2
- }
- )
- )), LinuxIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M7 0a3 3 0 013 3v1.24c.129.132.25.27.362.415.113.111.283.247.515.433l.194.155c.325.261.711.582 1.095.966.765.765 1.545 1.806 1.823 3.186a.501.501 0 01-.338.581 3.395 3.395 0 01-1.338.134 2.886 2.886 0 01-1.049-.304 5.535 5.535 0 01-.17.519 2 2 0 11-2.892 2.55A5.507 5.507 0 017 13c-.439 0-.838-.044-1.201-.125a2 2 0 11-2.892-2.55 5.553 5.553 0 01-.171-.519c-.349.182-.714.27-1.05.304A3.395 3.395 0 01.35 9.977a.497.497 0 01-.338-.582c.278-1.38 1.058-2.42 1.823-3.186.384-.384.77-.705 1.095-.966l.194-.155c.232-.186.402-.322.515-.433.112-.145.233-.283.362-.414V3a3 3 0 013-3zm1.003 11.895a2 2 0 012.141-1.89c.246-.618.356-1.322.356-2.005 0-.514-.101-1.07-.301-1.599l-.027-.017a6.387 6.387 0 00-.857-.42 6.715 6.715 0 00-1.013-.315l-.852.638a.75.75 0 01-.9 0l-.852-.638a6.716 6.716 0 00-1.693.634 4.342 4.342 0 00-.177.101l-.027.017A4.6 4.6 0 003.501 8c0 .683.109 1.387.355 2.005a2 2 0 012.142 1.89c.295.067.627.105 1.002.105s.707-.038 1.003-.105zM5 12a1 1 0 11-2 0 1 1 0 012 0zm6 0a1 1 0 11-2 0 1 1 0 012 0zM6.1 4.3a1.5 1.5 0 011.8 0l.267.2L7 5.375 5.833 4.5l.267-.2zM8.5 2a.5.5 0 01.5.5V3a.5.5 0 01-1 0v-.5a.5.5 0 01.5-.5zM6 2.5a.5.5 0 00-1 0V3a.5.5 0 001 0v-.5z",
- fill: color2
- }
- )
- )), UbuntuIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement("g", { clipPath: "url(#prefix__clip0_1107_3497)", fill: color2 }, React255.createElement("path", { d: "M12.261 2.067c0 1.142-.89 2.068-1.988 2.068-1.099 0-1.99-.926-1.99-2.068C8.283.926 9.174 0 10.273 0c1.098 0 1.989.926 1.989 2.067zM3.978 6.6c0 1.142-.89 2.068-1.989 2.068C.891 8.668 0 7.742 0 6.601c0-1.142.89-2.068 1.989-2.068 1.099 0 1.989.926 1.989 2.068zM6.475 11.921A4.761 4.761 0 014.539 11a4.993 4.993 0 01-1.367-1.696 2.765 2.765 0 01-1.701.217 6.725 6.725 0 001.844 2.635 6.379 6.379 0 004.23 1.577 3.033 3.033 0 01-.582-1.728 4.767 4.767 0 01-.488-.083zM11.813 11.933c0 1.141-.89 2.067-1.989 2.067-1.098 0-1.989-.926-1.989-2.067 0-1.142.891-2.068 1.99-2.068 1.098 0 1.989.926 1.989 2.068zM12.592 11.173a6.926 6.926 0 001.402-3.913 6.964 6.964 0 00-1.076-4.023A2.952 2.952 0 0111.8 4.6c.398.78.592 1.656.564 2.539a5.213 5.213 0 01-.724 2.495c.466.396.8.935.952 1.54zM1.987 3.631c-.05 0-.101.002-.151.004C3.073 1.365 5.504.024 8.005.23a3.07 3.07 0 00-.603 1.676 4.707 4.707 0 00-2.206.596 4.919 4.919 0 00-1.7 1.576 2.79 2.79 0 00-1.509-.447z" })),
- React255.createElement("defs", null, React255.createElement("clipPath", { id: "prefix__clip0_1107_3497" }, React255.createElement("path", { fill: "#fff", d: "M0 0h14v14H0z" })))
- )), WindowsIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M6.5 1H1v5.5h5.5V1zM13 1H7.5v5.5H13V1zM7.5 7.5H13V13H7.5V7.5zM6.5 7.5H1V13h5.5V7.5z",
- fill: color2
- }
- )
- )), ChromeIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement("g", { clipPath: "url(#prefix__clip0_1107_3496)" }, React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M13.023 3.431a.115.115 0 01-.099.174H7.296A3.408 3.408 0 003.7 6.148a.115.115 0 01-.21.028l-1.97-3.413a.115.115 0 01.01-.129A6.97 6.97 0 017 0a6.995 6.995 0 016.023 3.431zM7 9.615A2.619 2.619 0 014.384 7 2.62 2.62 0 017 4.383 2.619 2.619 0 019.616 7 2.619 2.619 0 017 9.615zm1.034.71a.115.115 0 00-.121-.041 3.4 3.4 0 01-.913.124 3.426 3.426 0 01-3.091-1.973L1.098 3.567a.115.115 0 00-.2.001 7.004 7.004 0 005.058 10.354l.017.001c.04 0 .078-.021.099-.057l1.971-3.414a.115.115 0 00-.009-.128zm1.43-5.954h3.947c.047 0 .09.028.107.072.32.815.481 1.675.481 2.557a6.957 6.957 0 01-2.024 4.923A6.957 6.957 0 017.08 14h-.001a.115.115 0 01-.1-.172L9.794 8.95A3.384 3.384 0 0010.408 7c0-.921-.364-1.785-1.024-2.433a.115.115 0 01.08-.196z",
- fill: color2
- }
- )),
- React255.createElement("defs", null, React255.createElement("clipPath", { id: "prefix__clip0_1107_3496" }, React255.createElement("path", { fill: "#fff", d: "M0 0h14v14H0z" })))
- )), StorybookIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M2.042.616a.704.704 0 00-.66.729L1.816 12.9c.014.367.306.66.672.677l9.395.422h.032a.704.704 0 00.704-.703V.704c0-.015 0-.03-.002-.044a.704.704 0 00-.746-.659l-.773.049.057 1.615a.105.105 0 01-.17.086l-.52-.41-.617.468a.105.105 0 01-.168-.088L9.746.134 2.042.616zm8.003 4.747c-.247.192-2.092.324-2.092.05.04-1.045-.429-1.091-.689-1.091-.247 0-.662.075-.662.634 0 .57.607.893 1.32 1.27 1.014.538 2.24 1.188 2.24 2.823 0 1.568-1.273 2.433-2.898 2.433-1.676 0-3.141-.678-2.976-3.03.065-.275 2.197-.21 2.197 0-.026.971.195 1.256.753 1.256.43 0 .624-.236.624-.634 0-.602-.633-.958-1.361-1.367-.987-.554-2.148-1.205-2.148-2.7 0-1.494 1.027-2.489 2.86-2.489 1.832 0 2.832.98 2.832 2.845z",
- fill: color2
- }
- )
- )), AzureDevOpsIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement("g", { clipPath: "url(#prefix__clip0_1107_3503)" }, React255.createElement(
- "path",
- {
- d: "M0 5.176l1.31-1.73 4.902-1.994V.014l4.299 3.144-8.78 1.706v4.8L0 9.162V5.176zm14-2.595v8.548l-3.355 2.857-5.425-1.783v1.783L1.73 9.661l8.784 1.047v-7.55L14 2.581z",
- fill: color2
- }
- )),
- React255.createElement("defs", null, React255.createElement("clipPath", { id: "prefix__clip0_1107_3503" }, React255.createElement("path", { fill: "#fff", d: "M0 0h14v14H0z" })))
- )), BitbucketIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M1 1.522a.411.411 0 00-.412.476l1.746 10.597a.56.56 0 00.547.466h8.373a.411.411 0 00.412-.345l1.017-6.248h-3.87L8.35 9.18H5.677l-.724-3.781h7.904L13.412 2A.411.411 0 0013 1.524L1 1.522z",
- fill: color2
- }
- )
- )), ChromaticIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M0 7a7 7 0 1014 0A7 7 0 000 7zm5.215-3.869a1.967 1.967 0 013.747.834v1.283l-3.346-1.93a2.486 2.486 0 00-.401-.187zm3.484 2.58l-3.346-1.93a1.968 1.968 0 00-2.685.72 1.954 1.954 0 00.09 2.106 2.45 2.45 0 01.362-.254l1.514-.873a.27.27 0 01.268 0l2.1 1.21 1.697-.978zm-.323 4.972L6.86 9.81a.268.268 0 01-.134-.231V7.155l-1.698-.98v3.86a1.968 1.968 0 003.747.835 2.488 2.488 0 01-.4-.187zm.268-.464a1.967 1.967 0 002.685-.719 1.952 1.952 0 00-.09-2.106c-.112.094-.233.18-.361.253L7.53 9.577l1.113.642zm-4.106.257a1.974 1.974 0 01-1.87-.975A1.95 1.95 0 012.47 8.01c.136-.507.461-.93.916-1.193L4.5 6.175v3.86c0 .148.013.295.039.44zM11.329 4.5a1.973 1.973 0 00-1.87-.976c.025.145.039.292.039.44v1.747a.268.268 0 01-.135.232l-2.1 1.211v1.96l3.346-1.931a1.966 1.966 0 00.72-2.683z",
- fill: color2
- }
- )
- )), ComponentDrivenIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M10.847 2.181L8.867.201a.685.685 0 00-.97 0l-4.81 4.81a.685.685 0 000 .969l2.466 2.465-2.405 2.404a.685.685 0 000 .97l1.98 1.98a.685.685 0 00.97 0l4.81-4.81a.685.685 0 000-.969L8.441 5.555l2.405-2.404a.685.685 0 000-.97z",
- fill: color2
- }
- )
- )), DiscordIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M11.852 2.885c-.893-.41-1.85-.712-2.85-.884a.043.043 0 00-.046.021c-.123.22-.26.505-.355.73a10.658 10.658 0 00-3.2 0 7.377 7.377 0 00-.36-.73.045.045 0 00-.046-.021c-1 .172-1.957.474-2.85.884a.04.04 0 00-.019.016C.311 5.612-.186 8.257.058 10.869a.048.048 0 00.018.033 11.608 11.608 0 003.496 1.767.045.045 0 00.049-.016c.27-.368.51-.755.715-1.163a.044.044 0 00-.024-.062 7.661 7.661 0 01-1.092-.52.045.045 0 01-.005-.075c.074-.055.147-.112.217-.17a.043.043 0 01.046-.006c2.29 1.046 4.771 1.046 7.035 0a.043.043 0 01.046.006c.07.057.144.115.218.17a.045.045 0 01-.004.075 7.186 7.186 0 01-1.093.52.045.045 0 00-.024.062c.21.407.45.795.715 1.162.011.016.03.023.05.017a11.57 11.57 0 003.5-1.767.045.045 0 00.019-.032c.292-3.02-.49-5.643-2.07-7.969a.036.036 0 00-.018-.016zM4.678 9.279c-.69 0-1.258-.634-1.258-1.411 0-.778.558-1.411 1.258-1.411.707 0 1.27.639 1.259 1.41 0 .778-.558 1.412-1.259 1.412zm4.652 0c-.69 0-1.258-.634-1.258-1.411 0-.778.557-1.411 1.258-1.411.707 0 1.27.639 1.258 1.41 0 .778-.551 1.412-1.258 1.412z",
- fill: color2
- }
- )
- )), FacebookIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M7.399 14H5.06V7H3.5V4.588l1.56-.001-.002-1.421C5.058 1.197 5.533 0 7.6 0h1.721v2.413H8.246c-.805 0-.844.337-.844.966l-.003 1.208h1.934l-.228 2.412L7.401 7l-.002 7z",
- fill: color2
- }
- )
- )), FigmaIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M9.2 0H4.803A2.603 2.603 0 003.41 4.802a2.603 2.603 0 000 4.396 2.602 2.602 0 103.998 2.199v-2.51a2.603 2.603 0 103.187-4.085A2.604 2.604 0 009.2 0zM7.407 7a1.793 1.793 0 103.586 0 1.793 1.793 0 00-3.586 0zm-.81 2.603H4.803a1.793 1.793 0 101.794 1.794V9.603zM4.803 4.397h1.794V.81H4.803a1.793 1.793 0 000 3.587zm0 .81a1.793 1.793 0 000 3.586h1.794V5.207H4.803zm4.397-.81H7.407V.81H9.2a1.794 1.794 0 010 3.587z",
- fill: color2
- }
- )
- )), GDriveIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M6.37 8.768l-2.042 3.537h6.755l2.042-3.537H6.37zm6.177-1.003l-3.505-6.07H4.96l3.504 6.07h4.084zM4.378 2.7L.875 8.77l2.042 3.536L6.42 6.236 4.378 2.7z",
- fill: color2
- }
- )
- )), GithubIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M7 0C3.132 0 0 3.132 0 7a6.996 6.996 0 004.786 6.641c.35.062.482-.149.482-.332 0-.166-.01-.718-.01-1.304-1.758.324-2.213-.429-2.353-.823-.079-.2-.42-.822-.717-.988-.246-.132-.596-.455-.01-.464.552-.009.946.508 1.077.717.63 1.06 1.636.762 2.039.578.061-.455.245-.761.446-.936-1.558-.175-3.185-.779-3.185-3.457 0-.76.271-1.39.717-1.88-.07-.176-.314-.893.07-1.856 0 0 .587-.183 1.925.718a6.495 6.495 0 011.75-.236c.595 0 1.19.078 1.75.236 1.34-.91 1.926-.718 1.926-.718.385.963.14 1.68.07 1.855.446.49.717 1.111.717 1.881 0 2.687-1.636 3.282-3.194 3.457.254.218.473.638.473 1.295 0 .936-.009 1.688-.009 1.925 0 .184.131.402.481.332A7.012 7.012 0 0014 7c0-3.868-3.133-7-7-7z",
- fill: color2
- }
- )
- )), GitlabIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M1.068 5.583l1.487-4.557a.256.256 0 01.487 0L4.53 5.583H1.068L7 13.15 4.53 5.583h4.941l-2.47 7.565 5.931-7.565H9.471l1.488-4.557a.256.256 0 01.486 0l1.488 4.557.75 2.3a.508.508 0 01-.185.568L7 13.148v.001H7L.503 8.452a.508.508 0 01-.186-.57l.75-2.299z",
- fill: color2
- }
- )
- )), GoogleIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M10.925 1.094H7.262c-1.643 0-3.189 1.244-3.189 2.685 0 1.473 1.12 2.661 2.791 2.661.116 0 .23-.002.34-.01a1.49 1.49 0 00-.186.684c0 .41.22.741.498 1.012-.21 0-.413.006-.635.006-2.034 0-3.6 1.296-3.6 2.64 0 1.323 1.717 2.15 3.75 2.15 2.32 0 3.6-1.315 3.6-2.639 0-1.06-.313-1.696-1.28-2.38-.331-.235-.965-.805-.965-1.14 0-.392.112-.586.703-1.047.606-.474 1.035-1.14 1.035-1.914 0-.92-.41-1.819-1.18-2.115h1.161l.82-.593zm-1.335 8.96c.03.124.045.25.045.378 0 1.07-.688 1.905-2.665 1.905-1.406 0-2.421-.89-2.421-1.96 0-1.047 1.259-1.92 2.665-1.904.328.004.634.057.911.146.764.531 1.311.832 1.465 1.436zM7.34 6.068c-.944-.028-1.841-1.055-2.005-2.295-.162-1.24.47-2.188 1.415-2.16.943.029 1.84 1.023 2.003 2.262.163 1.24-.47 2.222-1.414 2.193z",
- fill: color2
- }
- )
- )), GraphqlIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M7.873 11.608a1.167 1.167 0 00-1.707-.027L3.46 10.018l.01-.04h7.072l.022.076-2.69 1.554zM6.166 2.42l.031.03-3.535 6.124a1.265 1.265 0 00-.043-.012V5.438a1.166 1.166 0 00.84-1.456L6.167 2.42zm4.387 1.562a1.165 1.165 0 00.84 1.456v3.124l-.043.012-3.536-6.123a1.2 1.2 0 00.033-.032l2.706 1.563zM3.473 9.42a1.168 1.168 0 00-.327-.568L6.68 2.73a1.17 1.17 0 00.652 0l3.536 6.123a1.169 1.169 0 00-.327.567H3.473zm8.79-.736a1.169 1.169 0 00-.311-.124V5.44a1.17 1.17 0 10-1.122-1.942L8.13 1.938a1.168 1.168 0 00-1.122-1.5 1.17 1.17 0 00-1.121 1.5l-2.702 1.56a1.168 1.168 0 00-1.86.22 1.17 1.17 0 00.739 1.722v3.12a1.168 1.168 0 00-.74 1.721 1.17 1.17 0 001.861.221l2.701 1.56a1.169 1.169 0 102.233-.035l2.687-1.552a1.168 1.168 0 101.457-1.791z",
- fill: color2
- }
- )
- )), MediumIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M0 0v14h14V0H0zm11.63 3.317l-.75.72a.22.22 0 00-.083.212v-.001 5.289a.22.22 0 00.083.21l.733.72v.159H7.925v-.158l.76-.738c.074-.074.074-.096.074-.21V5.244l-2.112 5.364h-.285l-2.46-5.364V8.84a.494.494 0 00.136.413h.001l.988 1.198v.158H2.226v-.158l.988-1.198a.477.477 0 00.126-.416v.003-4.157a.363.363 0 00-.118-.307l-.878-1.058v-.158h2.727l2.107 4.622L9.031 3.16h2.6v.158z",
- fill: color2
- }
- )
- )), ReduxIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M4.06 9.689c.016.49.423.88.912.88h.032a.911.911 0 00.88-.945.916.916 0 00-.912-.88h-.033c-.033 0-.08 0-.113.016-.669-1.108-.946-2.314-.848-3.618.065-.978.391-1.825.961-2.526.473-.603 1.386-.896 2.005-.913 1.728-.032 2.461 2.119 2.51 2.983.212.049.57.163.815.244C10.073 2.29 8.444.92 6.88.92c-1.467 0-2.82 1.06-3.357 2.625-.75 2.086-.261 4.09.651 5.671a.74.74 0 00-.114.473zm8.279-2.298c-1.239-1.45-3.064-2.249-5.15-2.249h-.261a.896.896 0 00-.798-.489h-.033A.912.912 0 006.13 6.48h.031a.919.919 0 00.8-.554h.293c1.239 0 2.412.358 3.472 1.059.814.538 1.401 1.238 1.727 2.086.277.684.261 1.353-.033 1.923-.456.864-1.222 1.337-2.232 1.337a4.16 4.16 0 01-1.597-.343 9.58 9.58 0 01-.734.587c.7.326 1.418.505 2.102.505 1.565 0 2.722-.863 3.162-1.727.473-.946.44-2.575-.782-3.961zm-7.433 5.51a4.005 4.005 0 01-.977.113c-1.206 0-2.298-.505-2.836-1.32C.376 10.603.13 8.289 2.494 6.577c.05.261.147.62.212.832-.31.228-.798.685-1.108 1.303-.44.864-.391 1.729.13 2.527.359.537.93.864 1.663.962.896.114 1.793-.05 2.657-.505 1.271-.669 2.119-1.467 2.672-2.56a.944.944 0 01-.26-.603.913.913 0 01.88-.945h.033a.915.915 0 01.098 1.825c-.897 1.842-2.478 3.08-4.565 3.488z",
- fill: color2
- }
- )
- )), TwitterIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M14 2.547a5.632 5.632 0 01-1.65.464 2.946 2.946 0 001.263-1.63 5.67 5.67 0 01-1.823.715 2.837 2.837 0 00-2.097-.93c-1.586 0-2.872 1.319-2.872 2.946 0 .23.025.456.074.67C4.508 4.66 2.392 3.488.975 1.706c-.247.435-.389.941-.389 1.481 0 1.022.507 1.923 1.278 2.452a2.806 2.806 0 01-1.3-.368l-.001.037c0 1.427.99 2.617 2.303 2.888a2.82 2.82 0 01-1.297.05c.366 1.17 1.427 2.022 2.683 2.045A5.671 5.671 0 010 11.51a7.985 7.985 0 004.403 1.323c5.283 0 8.172-4.488 8.172-8.38 0-.128-.003-.255-.009-.38A5.926 5.926 0 0014 2.546z",
- fill: color2
- }
- )
- )), YoutubeIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M13.99 8.172c.005-.281.007-.672.007-1.172 0-.5-.002-.89-.007-1.172a14.952 14.952 0 00-.066-1.066 9.638 9.638 0 00-.169-1.153c-.083-.38-.264-.7-.542-.96a1.667 1.667 0 00-.972-.454C11.084 2.065 9.337 2 6.999 2s-4.085.065-5.241.195a1.65 1.65 0 00-.969.453c-.276.26-.455.58-.539.961a8.648 8.648 0 00-.176 1.153c-.039.43-.061.785-.066 1.066C.002 6.11 0 6.5 0 7c0 .5.002.89.008 1.172.005.281.027.637.066 1.067.04.43.095.813.168 1.152.084.38.265.7.543.96.279.261.603.412.973.453 1.156.13 2.902.196 5.24.196 2.34 0 4.087-.065 5.243-.196a1.65 1.65 0 00.967-.453c.276-.26.456-.58.54-.96.077-.339.136-.722.175-1.152.04-.43.062-.786.067-1.067zM9.762 6.578A.45.45 0 019.997 7a.45.45 0 01-.235.422l-3.998 2.5a.442.442 0 01-.266.078.538.538 0 01-.242-.063.465.465 0 01-.258-.437v-5c0-.197.086-.343.258-.437a.471.471 0 01.508.016l3.998 2.5z",
- fill: color2
- }
- )
- )), VSCodeIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M10.243.04a.87.87 0 01.38.087l2.881 1.386a.874.874 0 01.496.79V11.713a.875.875 0 01-.496.775l-2.882 1.386a.872.872 0 01-.994-.17L4.11 8.674l-2.404 1.823a.583.583 0 01-.744-.034l-.771-.7a.583.583 0 010-.862L2.274 7 .19 5.1a.583.583 0 010-.862l.772-.701a.583.583 0 01.744-.033L4.11 5.327 9.628.296a.871.871 0 01.615-.255zm.259 3.784L6.315 7l4.187 3.176V3.824z",
- fill: color2
- }
- )
- )), LinkedinIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M11.667 13H2.333A1.333 1.333 0 011 11.667V2.333C1 1.597 1.597 1 2.333 1h9.334C12.403 1 13 1.597 13 2.333v9.334c0 .736-.597 1.333-1.333 1.333zm-2.114-1.667h1.78V7.675c0-1.548-.877-2.296-2.102-2.296-1.226 0-1.742.955-1.742.955v-.778H5.773v5.777h1.716V8.3c0-.812.374-1.296 1.09-1.296.658 0 .974.465.974 1.296v3.033zm-6.886-7.6c0 .589.474 1.066 1.058 1.066.585 0 1.058-.477 1.058-1.066 0-.589-.473-1.066-1.058-1.066-.584 0-1.058.477-1.058 1.066zm1.962 7.6h-1.79V5.556h1.79v5.777z",
- fill: color2
- }
- )
- )), XIcon = React255.forwardRef(
- ({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M11.02.446h2.137L8.49 5.816l5.51 7.28H9.67L6.298 8.683l-3.88 4.413H.282l5.004-5.735L0 .446h4.442l3.064 4.048L11.02.446zm-.759 11.357h1.18L3.796 1.655H2.502l7.759 10.148z",
- fill: color2
- }
- )
- )
- ), BrowserIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M.5 13.004a.5.5 0 01-.5-.5v-11a.5.5 0 01.5-.5h13a.5.5 0 01.5.5v11a.5.5 0 01-.5.5H.5zm.5-1v-8h12v8H1zm1-9.5a.5.5 0 11-1 0 .5.5 0 011 0zm2 0a.5.5 0 11-1 0 .5.5 0 011 0zm2 0a.5.5 0 11-1 0 .5.5 0 011 0z",
- fill: color2
- }
- )
- )), TabletIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 15",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M3.5.004a1.5 1.5 0 00-1.5 1.5v11a1.5 1.5 0 001.5 1.5h7a1.5 1.5 0 001.5-1.5v-11a1.5 1.5 0 00-1.5-1.5h-7zm0 1h7a.5.5 0 01.5.5v9.5H3v-9.5a.5.5 0 01.5-.5zm2.5 11a.5.5 0 000 1h2a.5.5 0 000-1H6z",
- fill: color2
- }
- )
- )), MobileIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 15",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M3 1.504a1.5 1.5 0 011.5-1.5h5a1.5 1.5 0 011.5 1.5v11a1.5 1.5 0 01-1.5 1.5h-5a1.5 1.5 0 01-1.5-1.5v-11zm1 10.5v-10h6v10H4z",
- fill: color2
- }
- )
- )), WatchIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 15",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M4 .504a.5.5 0 01.5-.5h5a.5.5 0 010 1h-5a.5.5 0 01-.5-.5zm5.5 2.5h-5a.5.5 0 00-.5.5v7a.5.5 0 00.5.5h5a.5.5 0 00.5-.5v-7a.5.5 0 00-.5-.5zm-5-1a1.5 1.5 0 00-1.5 1.5v7a1.5 1.5 0 001.5 1.5h5a1.5 1.5 0 001.5-1.5v-7a1.5 1.5 0 00-1.5-1.5h-5zm2.5 2a.5.5 0 01.5.5v2h1a.5.5 0 110 1H7a.5.5 0 01-.5-.5v-2.5a.5.5 0 01.5-.5zm-2.5 9a.5.5 0 000 1h5a.5.5 0 000-1h-5z",
- fill: color2
- }
- )
- )), SidebarIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M2.5 4.504a.5.5 0 01.5-.5h1a.5.5 0 110 1H3a.5.5 0 01-.5-.5zM3 6.004a.5.5 0 100 1h1a.5.5 0 000-1H3zM2.5 8.504a.5.5 0 01.5-.5h1a.5.5 0 110 1H3a.5.5 0 01-.5-.5z",
- fill: color2
- }
- ),
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M1.5 13.004a.5.5 0 01-.5-.5v-11a.5.5 0 01.5-.5h11a.5.5 0 01.5.5v11a.5.5 0 01-.5.5h-11zm.5-1v-10h3v10H2zm4-10h6v10H6v-10z",
- fill: color2
- }
- )
- )), SidebarAltIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M9.5 4.504a.5.5 0 01.5-.5h1a.5.5 0 010 1h-1a.5.5 0 01-.5-.5zM10 6.004a.5.5 0 100 1h1a.5.5 0 000-1h-1zM9.5 8.504a.5.5 0 01.5-.5h1a.5.5 0 010 1h-1a.5.5 0 01-.5-.5z",
- fill: color2
- }
- ),
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M1.5 13.004a.5.5 0 01-.5-.5v-11a.5.5 0 01.5-.5h11a.5.5 0 01.5.5v11a.5.5 0 01-.5.5h-11zm.5-1v-10h6v10H2zm7-10h3v10H9v-10z",
- fill: color2
- }
- )
- )), SidebarAltToggleIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M11.5 4.504a.5.5 0 00-.5-.5h-1a.5.5 0 100 1h1a.5.5 0 00.5-.5zM11 6.004a.5.5 0 010 1h-1a.5.5 0 010-1h1zM11.5 8.504a.5.5 0 00-.5-.5h-1a.5.5 0 100 1h1a.5.5 0 00.5-.5z",
- fill: color2
- }
- ),
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M1.5 13.004a.5.5 0 01-.5-.5v-11a.5.5 0 01.5-.5h11a.5.5 0 01.5.5v11a.5.5 0 01-.5.5h-11zm7.5-1h3v-10H9v10zm-1 0H2v-10h6v4.5H5.207l.65-.65a.5.5 0 10-.707-.708L3.646 6.65a.5.5 0 000 .707l1.497 1.497a.5.5 0 10.707-.708l-.643-.642H8v4.5z",
- fill: color2
- }
- )
- )), SidebarToggleIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M1.5 4.504a.5.5 0 01.5-.5h1a.5.5 0 110 1H2a.5.5 0 01-.5-.5zM2 6.004a.5.5 0 100 1h1a.5.5 0 000-1H2zM1.5 8.504a.5.5 0 01.5-.5h1a.5.5 0 110 1H2a.5.5 0 01-.5-.5z",
- fill: color2
- }
- ),
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M.5 13.004a.5.5 0 01-.5-.5v-11a.5.5 0 01.5-.5h11a.5.5 0 01.5.5v11a.5.5 0 01-.5.5H.5zm.5-1v-10h3v10H1zm4 0v-4.5h2.793l-.643.642a.5.5 0 10.707.708l1.497-1.497a.5.5 0 000-.707L7.85 5.146a.5.5 0 10-.707.708l.65.65H5v-4.5h6v10H5z",
- fill: color2
- }
- )
- )), BottomBarIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M3 10.504a.5.5 0 01.5-.5h1a.5.5 0 010 1h-1a.5.5 0 01-.5-.5zM6.5 10.004a.5.5 0 000 1h1a.5.5 0 000-1h-1zM9 10.504a.5.5 0 01.5-.5h1a.5.5 0 010 1h-1a.5.5 0 01-.5-.5z",
- fill: color2
- }
- ),
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M1 1.504a.5.5 0 01.5-.5h11a.5.5 0 01.5.5v11a.5.5 0 01-.5.5h-11a.5.5 0 01-.5-.5v-11zm1 6.5v-6h10v6H2zm10 1v3H2v-3h10z",
- fill: color2
- }
- )
- )), BottomBarToggleIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M3.5 10.004a.5.5 0 000 1h1a.5.5 0 000-1h-1zM6 10.504a.5.5 0 01.5-.5h1a.5.5 0 010 1h-1a.5.5 0 01-.5-.5zM9.5 10.004a.5.5 0 000 1h1a.5.5 0 000-1h-1z",
- fill: color2
- }
- ),
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M1 12.504v-11a.5.5 0 01.5-.5h11a.5.5 0 01.5.5v11a.5.5 0 01-.5.5h-11a.5.5 0 01-.5-.5zm1-.5v-3h10v3H2zm4.5-4H2v-6h10v6H7.5V5.21l.646.646a.5.5 0 10.708-.707l-1.5-1.5a.5.5 0 00-.708 0l-1.5 1.5a.5.5 0 10.708.707l.646-.646v2.793z",
- fill: color2
- }
- )
- )), CPUIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 15",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M5 5.504a.5.5 0 01.5-.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5h-3a.5.5 0 01-.5-.5v-3zm1 2.5v-2h2v2H6z",
- fill: color2
- }
- ),
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M5.5.004a.5.5 0 01.5.5v1.5h2v-1.5a.5.5 0 011 0v1.5h2.5a.5.5 0 01.5.5v2.5h1.5a.5.5 0 010 1H12v2h1.5a.5.5 0 010 1H12v2.5a.5.5 0 01-.5.5H9v1.5a.5.5 0 01-1 0v-1.5H6v1.5a.5.5 0 01-1 0v-1.5H2.5a.5.5 0 01-.5-.5v-2.5H.5a.5.5 0 010-1H2v-2H.5a.5.5 0 010-1H2v-2.5a.5.5 0 01.5-.5H5v-1.5a.5.5 0 01.5-.5zm5.5 3H3v8h8v-8z",
- fill: color2
- }
- )
- )), DatabaseIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M12 3c0-1.105-2.239-2-5-2s-5 .895-5 2v8c0 .426.26.752.544.977.29.228.68.413 1.116.558.878.293 2.059.465 3.34.465 1.281 0 2.462-.172 3.34-.465.436-.145.825-.33 1.116-.558.285-.225.544-.551.544-.977V3zm-1.03 0a.787.787 0 00-.05-.052c-.13-.123-.373-.28-.756-.434C9.404 2.21 8.286 2 7 2c-1.286 0-2.404.21-3.164.514-.383.153-.625.31-.756.434A.756.756 0 003.03 3a.756.756 0 00.05.052c.13.123.373.28.756.434C4.596 3.79 5.714 4 7 4c1.286 0 2.404-.21 3.164-.514.383-.153.625-.31.756-.434A.787.787 0 0010.97 3zM11 5.75V4.2c-.912.486-2.364.8-4 .8-1.636 0-3.088-.314-4-.8v1.55l.002.008a.147.147 0 00.016.033.618.618 0 00.145.15c.165.13.435.27.813.395.751.25 1.82.414 3.024.414s2.273-.163 3.024-.414c.378-.126.648-.265.813-.395a.62.62 0 00.146-.15.149.149 0 00.015-.033A.03.03 0 0011 5.75zM3 7.013c.2.103.423.193.66.272.878.293 2.059.465 3.34.465 1.281 0 2.462-.172 3.34-.465.237-.079.46-.17.66-.272V8.5l-.002.008a.149.149 0 01-.015.033.62.62 0 01-.146.15c-.165.13-.435.27-.813.395-.751.25-1.82.414-3.024.414s-2.273-.163-3.024-.414c-.378-.126-.648-.265-.813-.395a.618.618 0 01-.145-.15.147.147 0 01-.016-.033A.027.027 0 013 8.5V7.013zm0 2.75V11l.002.008a.147.147 0 00.016.033.617.617 0 00.145.15c.165.13.435.27.813.395.751.25 1.82.414 3.024.414s2.273-.163 3.024-.414c.378-.126.648-.265.813-.395a.619.619 0 00.146-.15.148.148 0 00.015-.033L11 11V9.763c-.2.103-.423.193-.66.272-.878.293-2.059.465-3.34.465-1.281 0-2.462-.172-3.34-.465A4.767 4.767 0 013 9.763z",
- fill: color2
- }
- )
- )), MemoryIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 15",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M5 3a.5.5 0 00-1 0v3a.5.5 0 001 0V3zM7 2.5a.5.5 0 01.5.5v3a.5.5 0 01-1 0V3a.5.5 0 01.5-.5zM10 4.504a.5.5 0 10-1 0V6a.5.5 0 001 0V4.504z",
- fill: color2
- }
- ),
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M12 3.54l-.001-.002a.499.499 0 00-.145-.388l-3-3a.499.499 0 00-.388-.145L8.464.004H2.5a.5.5 0 00-.5.5v13a.5.5 0 00.5.5h9a.5.5 0 00.5-.5V3.54zM3 1.004h5.293L11 3.71v5.293H3v-8zm0 9v3h8v-3H3z",
- fill: color2
- }
- )
- )), StructureIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M8.164 3.446a1.5 1.5 0 10-2.328 0L1.81 10.032A1.503 1.503 0 000 11.5a1.5 1.5 0 002.915.5h8.17a1.5 1.5 0 101.104-1.968L8.164 3.446zm-1.475.522a1.506 1.506 0 00.622 0l4.025 6.586a1.495 1.495 0 00-.25.446H2.914a1.497 1.497 0 00-.25-.446l4.024-6.586z",
- fill: color2
- }
- )
- )), BoxIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M7.21.046l6.485 2.994A.5.5 0 0114 3.51v6.977a.495.495 0 01-.23.432.481.481 0 01-.071.038L7.23 13.944a.499.499 0 01-.46 0L.3 10.958a.498.498 0 01-.3-.47V3.511a.497.497 0 01.308-.473L6.78.051a.499.499 0 01.43-.005zM1 4.282v5.898l5.5 2.538V6.82L1 4.282zm6.5 8.436L13 10.18V4.282L7.5 6.82v5.898zM12.307 3.5L7 5.95 1.693 3.5 7 1.05l5.307 2.45z",
- fill: color2
- }
- )
- )), PowerIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement("path", { d: "M7.5.5a.5.5 0 00-1 0v6a.5.5 0 001 0v-6z", fill: color2 }),
- React255.createElement(
- "path",
- {
- d: "M4.273 2.808a.5.5 0 00-.546-.837 6 6 0 106.546 0 .5.5 0 00-.546.837 5 5 0 11-5.454 0z",
- fill: color2
- }
- )
- )), EditIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M13.854 2.146l-2-2a.5.5 0 00-.708 0l-1.5 1.5-8.995 8.995a.499.499 0 00-.143.268L.012 13.39a.495.495 0 00.135.463.5.5 0 00.462.134l2.482-.496a.495.495 0 00.267-.143l8.995-8.995 1.5-1.5a.5.5 0 000-.708zM12 3.293l.793-.793L11.5 1.207 10.707 2 12 3.293zm-2-.586L1.707 11 3 12.293 11.293 4 10 2.707zM1.137 12.863l.17-.849.679.679-.849.17z",
- fill: color2
- }
- )
- )), CogIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M5.586 5.586A2 2 0 018.862 7.73a.5.5 0 10.931.365 3 3 0 10-1.697 1.697.5.5 0 10-.365-.93 2 2 0 01-2.145-3.277z",
- fill: color2
- }
- ),
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M.939 6.527c.127.128.19.297.185.464a.635.635 0 01-.185.465L0 8.395a7.099 7.099 0 001.067 2.572h1.32c.182 0 .345.076.46.197a.635.635 0 01.198.46v1.317A7.097 7.097 0 005.602 14l.94-.94a.634.634 0 01.45-.186H7.021c.163 0 .326.061.45.186l.939.938a7.098 7.098 0 002.547-1.057V11.61c0-.181.075-.344.197-.46a.634.634 0 01.46-.197h1.33c.507-.76.871-1.622 1.056-2.55l-.946-.946a.635.635 0 01-.186-.465.635.635 0 01.186-.464l.943-.944a7.099 7.099 0 00-1.044-2.522h-1.34a.635.635 0 01-.46-.197.635.635 0 01-.196-.46V1.057A7.096 7.096 0 008.413.002l-.942.942a.634.634 0 01-.45.186H6.992a.634.634 0 01-.45-.186L5.598 0a7.097 7.097 0 00-2.553 1.058v1.33c0 .182-.076.345-.197.46a.635.635 0 01-.46.198h-1.33A7.098 7.098 0 00.003 5.591l.936.936zm.707 1.636c.324-.324.482-.752.479-1.172a1.634 1.634 0 00-.48-1.171l-.538-.539c.126-.433.299-.847.513-1.235h.768c.459 0 .873-.19 1.167-.49.3-.295.49-.708.49-1.167v-.77c.39-.215.807-.388 1.243-.515l.547.547c.32.32.742.48 1.157.48l.015-.001h.014c.415 0 .836-.158 1.157-.479l.545-.544c.433.126.846.299 1.234.512v.784c0 .46.19.874.49 1.168.294.3.708.49 1.167.49h.776c.209.382.378.788.502 1.213l-.545.546a1.635 1.635 0 00-.48 1.17c-.003.421.155.849.48 1.173l.549.55c-.126.434-.3.85-.513 1.239h-.77c-.458 0-.872.19-1.166.49-.3.294-.49.708-.49 1.167v.77a6.09 6.09 0 01-1.238.514l-.54-.54a1.636 1.636 0 00-1.158-.48H6.992c-.415 0-.837.159-1.157.48l-.543.543a6.091 6.091 0 01-1.247-.516v-.756c0-.459-.19-.873-.49-1.167-.294-.3-.708-.49-1.167-.49h-.761a6.094 6.094 0 01-.523-1.262l.542-.542z",
- fill: color2
- }
- )
- )), NutIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M5.585 8.414a2 2 0 113.277-.683.5.5 0 10.931.365 3 3 0 10-1.697 1.697.5.5 0 00-.365-.93 2 2 0 01-2.146-.449z",
- fill: color2
- }
- ),
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M6.5.289a1 1 0 011 0l5.062 2.922a1 1 0 01.5.866v5.846a1 1 0 01-.5.866L7.5 13.71a1 1 0 01-1 0L1.437 10.79a1 1 0 01-.5-.866V4.077a1 1 0 01.5-.866L6.5.29zm.5.866l5.062 2.922v5.846L7 12.845 1.937 9.923V4.077L7 1.155z",
- fill: color2
- }
- )
- )), WrenchIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M10.5 1c.441 0 .564.521.252.833l-.806.807a.51.51 0 000 .72l.694.694a.51.51 0 00.72 0l.807-.806c.312-.312.833-.19.833.252a2.5 2.5 0 01-3.414 2.328l-6.879 6.88a1 1 0 01-1.414-1.415l6.88-6.88A2.5 2.5 0 0110.5 1zM2 12.5a.5.5 0 100-1 .5.5 0 000 1z",
- fill: color2
- }
- )
- )), EllipsisIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M4 7a1.5 1.5 0 11-3 0 1.5 1.5 0 013 0zM13 7a1.5 1.5 0 11-3 0 1.5 1.5 0 013 0zM7 8.5a1.5 1.5 0 100-3 1.5 1.5 0 000 3z",
- fill: color2
- }
- )
- )), WandIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 15",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M5.903.112a.107.107 0 01.194 0l.233.505.552.066c.091.01.128.123.06.185l-.408.377.109.546a.107.107 0 01-.158.114L6 1.633l-.486.272a.107.107 0 01-.157-.114l.108-.546-.408-.377a.107.107 0 01.06-.185L5.67.617l.233-.505zM2.194.224a.214.214 0 00-.389 0l-.466 1.01-1.104.13a.214.214 0 00-.12.371l.816.755-.217 1.091a.214.214 0 00.315.23L2 3.266l.971.543c.16.09.35-.05.315-.229l-.217-1.09.817-.756a.214.214 0 00-.12-.37L2.66 1.234 2.194.224zM12.194 8.224a.214.214 0 00-.389 0l-.466 1.01-1.104.13a.214.214 0 00-.12.371l.816.755-.217 1.091a.214.214 0 00.315.23l.97-.544.971.543c.16.09.35-.05.315-.229l-.217-1.09.817-.756a.214.214 0 00-.12-.37l-1.105-.131-.466-1.01z",
- fill: color2
- }
- ),
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M.147 11.857a.5.5 0 010-.707l11-11a.5.5 0 01.706 0l2 2a.5.5 0 010 .708l-11 11a.5.5 0 01-.706 0l-2-2zm2.353.94l-1.293-1.293 6.758-6.758L9.258 6.04 2.5 12.797zm7.465-7.465l2.828-2.828L11.5 1.211 8.672 4.039l1.293 1.293z",
- fill: color2
- }
- )
- )), SweepIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M9.621 3.914l.379.379 3.146-3.147a.5.5 0 01.708.708L10.707 5l.379.379a3 3 0 010 4.242l-.707.707-.005.005-.008.008-.012.013-1.733 1.732a3 3 0 01-4.242 0L.146 7.854a.5.5 0 01.708-.707.915.915 0 001.292 0L4.64 4.654a.52.52 0 01.007-.008l.733-.732a3 3 0 014.242 0zm-4.26 1.432l.139-.139 3.146 3.147a.5.5 0 10.708-.707L6.212 4.505a2 2 0 012.702.116l.731.731.001.002h.002l.73.732a2 2 0 010 2.828l-.706.707-.012.013a.503.503 0 00-.014.013l-1.732 1.732a2 2 0 01-2.828 0L3.354 9.647a2.489 2.489 0 001.414-.708l1.086-1.085a.5.5 0 10-.708-.707L4.061 8.232a1.5 1.5 0 01-2.01.102c.294-.088.57-.248.803-.48l2.5-2.5a.475.475 0 00.007-.008z",
- fill: color2
- }
- ),
- React255.createElement(
- "path",
- {
- d: "M2 5.004a1 1 0 11-2 0 1 1 0 012 0zM4 3.25a.75.75 0 11-1.5 0 .75.75 0 011.5 0z",
- fill: color2
- }
- )
- )), CheckIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M13.854 3.354a.5.5 0 00-.708-.708L5 10.793.854 6.646a.5.5 0 10-.708.708l4.5 4.5a.5.5 0 00.708 0l8.5-8.5z",
- fill: color2
- }
- )
- )), FormIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M2 1.004a1 1 0 00-1 1v10a1 1 0 001 1h10a1 1 0 001-1V6.393a.5.5 0 00-1 0v5.61H2v-10h7.5a.5.5 0 000-1H2z",
- fill: color2
- }
- ),
- React255.createElement(
- "path",
- {
- d: "M6.354 9.857l7.5-7.5a.5.5 0 00-.708-.707L6 8.797 3.854 6.65a.5.5 0 10-.708.707l2.5 2.5a.5.5 0 00.708 0z",
- fill: color2
- }
- )
- )), BatchDenyIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M11.5 2a.5.5 0 000 1h2a.5.5 0 000-1h-2zM8.854 2.646a.5.5 0 010 .708L5.207 7l3.647 3.646a.5.5 0 01-.708.708L4.5 7.707.854 11.354a.5.5 0 01-.708-.708L3.793 7 .146 3.354a.5.5 0 11.708-.708L4.5 6.293l3.646-3.647a.5.5 0 01.708 0zM11 7a.5.5 0 01.5-.5h2a.5.5 0 010 1h-2A.5.5 0 0111 7zM11.5 11a.5.5 0 000 1h2a.5.5 0 000-1h-2z",
- fill: color2
- }
- )
- )), BatchAcceptIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M11.5 2a.5.5 0 000 1h2a.5.5 0 000-1h-2zM9.3 2.6a.5.5 0 01.1.7l-5.995 7.993a.505.505 0 01-.37.206.5.5 0 01-.395-.152L.146 8.854a.5.5 0 11.708-.708l2.092 2.093L8.6 2.7a.5.5 0 01.7-.1zM11 7a.5.5 0 01.5-.5h2a.5.5 0 010 1h-2A.5.5 0 0111 7zM11.5 11a.5.5 0 000 1h2a.5.5 0 000-1h-2z",
- fill: color2
- }
- )
- )), ControlsIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M10.5 1a.5.5 0 01.5.5V2h1.5a.5.5 0 010 1H11v.5a.5.5 0 01-1 0V3H1.5a.5.5 0 010-1H10v-.5a.5.5 0 01.5-.5zM1.5 11a.5.5 0 000 1H10v.5a.5.5 0 001 0V12h1.5a.5.5 0 000-1H11v-.5a.5.5 0 00-1 0v.5H1.5zM1 7a.5.5 0 01.5-.5H3V6a.5.5 0 011 0v.5h8.5a.5.5 0 010 1H4V8a.5.5 0 01-1 0v-.5H1.5A.5.5 0 011 7z",
- fill: color2
- }
- )
- )), PlusIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M7 1a.5.5 0 01.5.5v5h5a.5.5 0 010 1h-5v5a.5.5 0 01-1 0v-5h-5a.5.5 0 010-1h5v-5A.5.5 0 017 1z",
- fill: color2
- }
- )
- )), CloseAltIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M2.03.97A.75.75 0 00.97 2.03L5.94 7 .97 11.97a.75.75 0 101.06 1.06L7 8.06l4.97 4.97a.75.75 0 101.06-1.06L8.06 7l4.97-4.97A.75.75 0 0011.97.97L7 5.94 2.03.97z",
- fill: color2
- }
- )
- )), CrossIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M11.146 2.146a.5.5 0 11.707.707L7.708 7l4.147 4.146a.5.5 0 11-.707.707L7 7.708l-4.146 4.147a.5.5 0 01-.707-.708L6.293 7 2.147 2.853a.5.5 0 11.707-.707L7 6.293l4.146-4.147z",
- fill: color2
- }
- )
- )), TrashIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M5.5 4.5A.5.5 0 016 5v5a.5.5 0 01-1 0V5a.5.5 0 01.5-.5zM9 5a.5.5 0 00-1 0v5a.5.5 0 001 0V5z",
- fill: color2
- }
- ),
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M4.5.5A.5.5 0 015 0h4a.5.5 0 01.5.5V2h3a.5.5 0 010 1H12v8a2 2 0 01-2 2H4a2 2 0 01-2-2V3h-.5a.5.5 0 010-1h3V.5zM3 3v8a1 1 0 001 1h6a1 1 0 001-1V3H3zm2.5-2h3v1h-3V1z",
- fill: color2
- }
- )
- )), PinAltIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement("g", { clipPath: "url(#prefix__clip0_1107_3502)" }, React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M13.44 4.44L9.56.56a1.5 1.5 0 00-2.12 0L7 1a1.415 1.415 0 000 2L5 5H3.657A4 4 0 00.828 6.17l-.474.475a.5.5 0 000 .707l2.793 2.793-3 3a.5.5 0 00.707.708l3-3 2.792 2.792a.5.5 0 00.708 0l.474-.475A4 4 0 009 10.343V9l2-2a1.414 1.414 0 002 0l.44-.44a1.5 1.5 0 000-2.12zM11 5.585l-3 3v1.757a3 3 0 01-.879 2.121L7 12.586 1.414 7l.122-.122A3 3 0 013.656 6h1.758l3-3-.707-.707a.414.414 0 010-.586l.44-.44a.5.5 0 01.707 0l3.878 3.88a.5.5 0 010 .706l-.44.44a.414.414 0 01-.585 0L11 5.586z",
- fill: color2
- }
- )),
- React255.createElement("defs", null, React255.createElement("clipPath", { id: "prefix__clip0_1107_3502" }, React255.createElement("path", { fill: "#fff", d: "M0 0h14v14H0z" })))
- )), UnpinIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement("g", { clipPath: "url(#prefix__clip0_1107_3501)", fill: color2 }, React255.createElement("path", { d: "M13.44 4.44L9.56.56a1.5 1.5 0 00-2.12 0L7 1a1.415 1.415 0 000 2L5.707 4.293 6.414 5l2-2-.707-.707a.414.414 0 010-.586l.44-.44a.5.5 0 01.707 0l3.878 3.88a.5.5 0 010 .706l-.44.44a.414.414 0 01-.585 0L11 5.586l-2 2 .707.707L11 7a1.414 1.414 0 002 0l.44-.44a1.5 1.5 0 000-2.12zM.828 6.171a4 4 0 012.758-1.17l1 .999h-.93a3 3 0 00-2.12.878L1.414 7 7 12.586l.121-.122A3 3 0 008 10.343v-.929l1 1a4 4 0 01-1.172 2.757l-.474.475a.5.5 0 01-.708 0l-2.792-2.792-3 3a.5.5 0 01-.708-.708l3-3L.355 7.353a.5.5 0 010-.707l.474-.475zM1.854 1.146a.5.5 0 10-.708.708l11 11a.5.5 0 00.708-.708l-11-11z" })),
- React255.createElement("defs", null, React255.createElement("clipPath", { id: "prefix__clip0_1107_3501" }, React255.createElement("path", { fill: "#fff", d: "M0 0h14v14H0z" })))
- )), AddIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M7 3a.5.5 0 01.5.5v3h3a.5.5 0 010 1h-3v3a.5.5 0 01-1 0v-3h-3a.5.5 0 010-1h3v-3A.5.5 0 017 3z",
- fill: color2
- }
- ),
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M7 14A7 7 0 107 0a7 7 0 000 14zm0-1A6 6 0 107 1a6 6 0 000 12z",
- fill: color2
- }
- )
- )), SubtractIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement("path", { d: "M3.5 6.5a.5.5 0 000 1h7a.5.5 0 000-1h-7z", fill: color2 }),
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M14 7A7 7 0 110 7a7 7 0 0114 0zm-1 0A6 6 0 111 7a6 6 0 0112 0z",
- fill: color2
- }
- )
- )), CloseIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M9.854 4.146a.5.5 0 010 .708L7.707 7l2.147 2.146a.5.5 0 01-.708.708L7 7.707 4.854 9.854a.5.5 0 01-.708-.708L6.293 7 4.146 4.854a.5.5 0 11.708-.708L7 6.293l2.146-2.147a.5.5 0 01.708 0z",
- fill: color2
- }
- ),
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M7 14A7 7 0 107 0a7 7 0 000 14zm0-1A6 6 0 107 1a6 6 0 000 12z",
- fill: color2
- }
- )
- )), DeleteIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M14 7A7 7 0 110 7a7 7 0 0114 0zm-1 0a6 6 0 01-9.874 4.582l8.456-8.456A5.976 5.976 0 0113 7zM2.418 10.874l8.456-8.456a6 6 0 00-8.456 8.456z",
- fill: color2
- }
- )
- )), PassedIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M7 14A7 7 0 107 0a7 7 0 000 14zm3.854-9.354a.5.5 0 010 .708l-4.5 4.5a.5.5 0 01-.708 0l-2.5-2.5a.5.5 0 11.708-.708L6 8.793l4.146-4.147a.5.5 0 01.708 0z",
- fill: color2
- }
- )
- )), ChangedIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M7 14A7 7 0 107 0a7 7 0 000 14zM3.5 6.5a.5.5 0 000 1h7a.5.5 0 000-1h-7z",
- fill: color2
- }
- )
- )), FailedIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M7 14A7 7 0 107 0a7 7 0 000 14zm2.854-9.854a.5.5 0 010 .708L7.707 7l2.147 2.146a.5.5 0 01-.708.708L7 7.707 4.854 9.854a.5.5 0 01-.708-.708L6.293 7 4.146 4.854a.5.5 0 11.708-.708L7 6.293l2.146-2.147a.5.5 0 01.708 0z",
- fill: color2
- }
- )
- )), ClearIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M5 2h7a2 2 0 012 2v6a2 2 0 01-2 2H5a1.994 1.994 0 01-1.414-.586l-3-3a2 2 0 010-2.828l3-3A1.994 1.994 0 015 2zm1.146 3.146a.5.5 0 01.708 0L8 6.293l1.146-1.147a.5.5 0 11.708.708L8.707 7l1.147 1.146a.5.5 0 01-.708.708L8 7.707 6.854 8.854a.5.5 0 11-.708-.708L7.293 7 6.146 5.854a.5.5 0 010-.708z",
- fill: color2
- }
- )
- )), CommentIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 15",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M3.5 5.004a.5.5 0 100 1h7a.5.5 0 000-1h-7zM3 8.504a.5.5 0 01.5-.5h7a.5.5 0 010 1h-7a.5.5 0 01-.5-.5z",
- fill: color2
- }
- ),
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M12.5 12.004H5.707l-1.853 1.854a.5.5 0 01-.351.146h-.006a.499.499 0 01-.497-.5v-1.5H1.5a.5.5 0 01-.5-.5v-9a.5.5 0 01.5-.5h11a.5.5 0 01.5.5v9a.5.5 0 01-.5.5zm-10.5-1v-8h10v8H2z",
- fill: color2
- }
- )
- )), CommentAddIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 15",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M7.5 5.004a.5.5 0 10-1 0v1.5H5a.5.5 0 100 1h1.5v1.5a.5.5 0 001 0v-1.5H9a.5.5 0 000-1H7.5v-1.5z",
- fill: color2
- }
- ),
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M3.691 13.966a.498.498 0 01-.188.038h-.006a.499.499 0 01-.497-.5v-1.5H1.5a.5.5 0 01-.5-.5v-9a.5.5 0 01.5-.5h11a.5.5 0 01.5.5v9a.5.5 0 01-.5.5H5.707l-1.853 1.854a.5.5 0 01-.163.108zM2 3.004v8h10v-8H2z",
- fill: color2
- }
- )
- )), RequestChangeIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 15",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M9.854 6.65a.5.5 0 010 .707l-2 2a.5.5 0 11-.708-.707l1.15-1.15-3.796.004a.5.5 0 010-1L8.29 6.5 7.145 5.357a.5.5 0 11.708-.707l2 2z",
- fill: color2
- }
- ),
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M3.691 13.966a.498.498 0 01-.188.038h-.006a.499.499 0 01-.497-.5v-1.5H1.5a.5.5 0 01-.5-.5v-9a.5.5 0 01.5-.5h11a.5.5 0 01.5.5v9a.5.5 0 01-.5.5H5.707l-1.853 1.854a.5.5 0 01-.163.108zM2 3.004v8h10v-8H2z",
- fill: color2
- }
- )
- )), CommentsIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 15",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M8.5 7.004a.5.5 0 000-1h-5a.5.5 0 100 1h5zM9 8.504a.5.5 0 01-.5.5h-5a.5.5 0 010-1h5a.5.5 0 01.5.5z",
- fill: color2
- }
- ),
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M12 11.504v-1.5h1.5a.5.5 0 00.5-.5v-8a.5.5 0 00-.5-.5h-11a.5.5 0 00-.5.5v1.5H.5a.5.5 0 00-.5.5v8a.5.5 0 00.5.5H2v1.5a.499.499 0 00.497.5h.006a.498.498 0 00.35-.146l1.854-1.854H11.5a.5.5 0 00.5-.5zm-9-8.5v-1h10v7h-1v-5.5a.5.5 0 00-.5-.5H3zm-2 8v-7h10v7H1z",
- fill: color2
- }
- )
- )), ChatIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M1 2a2 2 0 012-2h8a2 2 0 012 2v8a2 2 0 01-2 2H6.986a.444.444 0 01-.124.103l-3.219 1.84A.43.43 0 013 13.569V12a2 2 0 01-2-2V2zm3.42 4.78a.921.921 0 110-1.843.921.921 0 010 1.842zm1.658-.922a.921.921 0 101.843 0 .921.921 0 00-1.843 0zm2.58 0a.921.921 0 101.842 0 .921.921 0 00-1.843 0z",
- fill: color2
- }
- )
- )), LockIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 15",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M8 8.004a1 1 0 01-.5.866v1.634a.5.5 0 01-1 0V8.87A1 1 0 118 8.004z",
- fill: color2
- }
- ),
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M3 4.004a4 4 0 118 0v1h1.5a.5.5 0 01.5.5v8a.5.5 0 01-.5.5h-11a.5.5 0 01-.5-.5v-8a.5.5 0 01.5-.5H3v-1zm7 1v-1a3 3 0 10-6 0v1h6zm2 1H2v7h10v-7z",
- fill: color2
- }
- )
- )), UnlockIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement("g", { clipPath: "url(#prefix__clip0_1107_3614)", fill: color2 }, React255.createElement("path", { d: "M6.5 8.87a1 1 0 111 0v1.634a.5.5 0 01-1 0V8.87z" }), React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M7 1a3 3 0 00-3 3v1.004h8.5a.5.5 0 01.5.5v8a.5.5 0 01-.5.5h-11a.5.5 0 01-.5-.5v-8a.5.5 0 01.5-.5H3V4a4 4 0 017.755-1.381.5.5 0 01-.939.345A3.001 3.001 0 007 1zM2 6.004h10v7H2v-7z"
- }
- )),
- React255.createElement("defs", null, React255.createElement("clipPath", { id: "prefix__clip0_1107_3614" }, React255.createElement("path", { fill: "#fff", d: "M0 0h14v14H0z" })))
- )), KeyIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement("path", { d: "M11 4a1 1 0 11-2 0 1 1 0 012 0z", fill: color2 }),
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M7.5 8.532V9.5a.5.5 0 01-.5.5H5.5v1.5a.5.5 0 01-.5.5H3.5v1.5a.5.5 0 01-.5.5H.5a.5.5 0 01-.5-.5v-2a.5.5 0 01.155-.362l5.11-5.11A4.5 4.5 0 117.5 8.532zM6 4.5a3.5 3.5 0 111.5 2.873c-.29-.203-1-.373-1 .481V9H5a.5.5 0 00-.5.5V11H3a.5.5 0 00-.5.5V13H1v-1.293l5.193-5.193a.552.552 0 00.099-.613A3.473 3.473 0 016 4.5z",
- fill: color2
- }
- )
- )), OutboxIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M7.354.15a.5.5 0 00-.708 0l-2 2a.5.5 0 10.708.707L6.5 1.711v6.793a.5.5 0 001 0V1.71l1.146 1.146a.5.5 0 10.708-.707l-2-2z",
- fill: color2
- }
- ),
- React255.createElement(
- "path",
- {
- d: "M2 7.504a.5.5 0 10-1 0v5a.5.5 0 00.5.5h11a.5.5 0 00.5-.5v-5a.5.5 0 00-1 0v4.5H2v-4.5z",
- fill: color2
- }
- )
- )), CreditIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement("path", { d: "M2.5 8.004a.5.5 0 100 1h3a.5.5 0 000-1h-3z", fill: color2 }),
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M0 11.504a.5.5 0 00.5.5h13a.5.5 0 00.5-.5v-9a.5.5 0 00-.5-.5H.5a.5.5 0 00-.5.5v9zm1-8.5v1h12v-1H1zm0 8h12v-5H1v5z",
- fill: color2
- }
- )
- )), ButtonIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M1 3.004a1 1 0 00-1 1v5a1 1 0 001 1h3.5a.5.5 0 100-1H1v-5h12v5h-1a.5.5 0 000 1h1a1 1 0 001-1v-5a1 1 0 00-1-1H1z",
- fill: color2
- }
- ),
- React255.createElement(
- "path",
- {
- d: "M6.45 7.006a.498.498 0 01.31.07L10.225 9.1a.5.5 0 01-.002.873l-1.074.621.75 1.3a.75.75 0 01-1.3.75l-.75-1.3-1.074.62a.497.497 0 01-.663-.135.498.498 0 01-.095-.3L6 7.515a.497.497 0 01.45-.509z",
- fill: color2
- }
- )
- )), TypeIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M4 1.504a.5.5 0 01.5-.5h5a.5.5 0 110 1h-2v10h2a.5.5 0 010 1h-5a.5.5 0 010-1h2v-10h-2a.5.5 0 01-.5-.5z",
- fill: color2
- }
- ),
- React255.createElement(
- "path",
- {
- d: "M0 4.504a.5.5 0 01.5-.5h4a.5.5 0 110 1H1v4h3.5a.5.5 0 110 1h-4a.5.5 0 01-.5-.5v-5zM9.5 4.004a.5.5 0 100 1H13v4H9.5a.5.5 0 100 1h4a.5.5 0 00.5-.5v-5a.5.5 0 00-.5-.5h-4z",
- fill: color2
- }
- )
- )), PointerDefaultIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M5.943 12.457a.27.27 0 00.248-.149L7.77 9.151l2.54 2.54a.257.257 0 00.188.073c.082 0 .158-.03.21-.077l.788-.79a.27.27 0 000-.392L8.891 7.9l3.416-1.708a.29.29 0 00.117-.106.222.222 0 00.033-.134.332.332 0 00-.053-.161.174.174 0 00-.092-.072l-.02-.007-10.377-4.15a.274.274 0 00-.355.354l4.15 10.372a.275.275 0 00.233.169zm-.036 1l-.02-.002c-.462-.03-.912-.31-1.106-.796L.632 2.287A1.274 1.274 0 012.286.633l10.358 4.143c.516.182.782.657.81 1.114a1.25 1.25 0 01-.7 1.197L10.58 8.174l1.624 1.624a1.27 1.27 0 010 1.807l-.8.801-.008.007c-.491.46-1.298.48-1.792-.014l-1.56-1.56-.957 1.916a1.27 1.27 0 01-1.142.702h-.037z",
- fill: color2
- }
- )
- )), PointerHandIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M11.87 6.008a.505.505 0 00-.003-.028v-.002c-.026-.27-.225-.48-.467-.498a.5.5 0 00-.53.5v1.41c0 .25-.22.47-.47.47a.48.48 0 01-.47-.47V5.17a.6.6 0 00-.002-.05c-.023-.268-.223-.49-.468-.5a.5.5 0 00-.52.5v1.65a.486.486 0 01-.47.47.48.48 0 01-.47-.47V4.62a.602.602 0 00-.002-.05v-.002c-.023-.266-.224-.48-.468-.498a.5.5 0 00-.53.5v2.2c0 .25-.22.47-.47.47a.49.49 0 01-.47-.47V1.8c0-.017 0-.034-.002-.05-.022-.268-.214-.49-.468-.5a.5.5 0 00-.52.5v6.78c0 .25-.22.47-.47.47a.48.48 0 01-.47-.47l.001-.1c.001-.053.002-.104 0-.155a.775.775 0 00-.06-.315.65.65 0 00-.16-.22 29.67 29.67 0 01-.21-.189c-.2-.182-.4-.365-.617-.532l-.003-.003A6.366 6.366 0 003.06 7l-.01-.007c-.433-.331-.621-.243-.69-.193-.26.14-.29.5-.13.74l1.73 2.6v.01h-.016l-.035.023.05-.023s1.21 2.6 3.57 2.6c3.54 0 4.2-1.9 4.31-4.42.039-.591.036-1.189.032-1.783l-.002-.507v-.032zm.969 2.376c-.057 1.285-.254 2.667-1.082 3.72-.88 1.118-2.283 1.646-4.227 1.646-1.574 0-2.714-.87-3.406-1.623a6.958 6.958 0 01-1.046-1.504l-.006-.012-1.674-2.516a1.593 1.593 0 01-.25-1.107 1.44 1.44 0 01.69-1.041c.195-.124.485-.232.856-.186.357.044.681.219.976.446.137.106.272.22.4.331V1.75A1.5 1.5 0 015.63.25c.93.036 1.431.856 1.431 1.55v1.335a1.5 1.5 0 01.53-.063h.017c.512.04.915.326 1.153.71a1.5 1.5 0 01.74-.161c.659.025 1.115.458 1.316.964a1.493 1.493 0 01.644-.103h.017c.856.067 1.393.814 1.393 1.558l.002.48c.004.596.007 1.237-.033 1.864z",
- fill: color2
- }
- )
- )), CommandIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M3.5 6A2.5 2.5 0 116 3.5V5h2V3.5A2.5 2.5 0 1110.5 6H9v2h1.5A2.5 2.5 0 118 10.5V9H6v1.5A2.5 2.5 0 113.5 8H5V6H3.5zM2 3.5a1.5 1.5 0 113 0V5H3.5A1.5 1.5 0 012 3.5zM6 6v2h2V6H6zm3-1h1.5A1.5 1.5 0 109 3.5V5zM3.5 9H5v1.5A1.5 1.5 0 113.5 9zM9 9v1.5A1.5 1.5 0 1010.5 9H9z",
- fill: color2
- }
- )
- )), SaveIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M8.896 1c.2 0 .39.08.53.22l3.354 3.353c.14.14.22.332.22.53V11a2 2 0 01-2 2H3a2 2 0 01-2-2V3a2 2 0 012-2h5.896zM3 2a1 1 0 00-1 1v8a1 1 0 001 1h1V8.5a.5.5 0 01.5-.5h5a.5.5 0 01.5.5V12h1a1 1 0 001-1V5.207L8.793 2H5v2h3.5a.5.5 0 010 1h-4a.5.5 0 01-.5-.5V2H3zm2 10h4V9H5v3z",
- fill: color2
- }
- )
- )), SortDownIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M4.5 2a.5.5 0 01.5.5v8.293l2.146-2.147a.5.5 0 11.708.708L4.86 12.346l-.007.008a.499.499 0 01-.351.146h-.006a.5.5 0 01-.35-.146l-3-3a.5.5 0 11.707-.708L4 10.793V2.5a.5.5 0 01.5-.5zM7 2.5a.5.5 0 01.5-.5h5a.5.5 0 010 1h-5a.5.5 0 01-.5-.5zM7 5.5a.5.5 0 01.5-.5h5a.5.5 0 010 1h-5a.5.5 0 01-.5-.5zM10.5 8a.5.5 0 000 1h2a.5.5 0 000-1h-2zM8 11.5a.5.5 0 01.5-.5h4a.5.5 0 010 1h-4a.5.5 0 01-.5-.5z",
- fill: color2
- }
- )
- )), SortUpIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M4.308 1.538a.496.496 0 00-.162.108l-3 3a.5.5 0 10.708.707L4 3.207V11.5a.5.5 0 001 0V3.207l2.146 2.147a.5.5 0 10.708-.708l-3-3a.5.5 0 00-.546-.108zM8 2.5a.5.5 0 01.5-.5h4a.5.5 0 010 1h-4a.5.5 0 01-.5-.5zM10.5 5a.5.5 0 000 1h2a.5.5 0 000-1h-2zM13 8.5a.5.5 0 01-.5.5h-5a.5.5 0 010-1h5a.5.5 0 01.5.5zM7 11.5a.5.5 0 01.5-.5h5a.5.5 0 010 1h-5a.5.5 0 01-.5-.5z",
- fill: color2
- }
- )
- )), BugIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M11 0a.5.5 0 010 1 2 2 0 00-1.987 1.78C9.618 3.33 10 4.12 10 5a3 3 0 003-3 .5.5 0 011 0 4.002 4.002 0 01-3 3.874V7h2.5a.5.5 0 010 1H11v.626c1.725.444 3 2.01 3 3.874a.5.5 0 01-1 0 3 3 0 00-2.055-2.846 4 4 0 01-7.891 0A3 3 0 001 12.5a.5.5 0 01-1 0 4.002 4.002 0 013-3.874V8H.5a.5.5 0 010-1H3V5.874A4.002 4.002 0 010 2a.5.5 0 011 0 3 3 0 003 3c0-.88.382-1.67.986-2.22A1.999 1.999 0 003 1a.5.5 0 010-1c1.384 0 2.545.938 2.892 2.213a2.99 2.99 0 012.215 0A2.999 2.999 0 0111 0zM4 9a3 3 0 002.5 2.958V6H4v3zm3.5 2.958A3 3 0 0010 9V6H7.5v5.958zM7 3a2 2 0 00-2 2h4a2 2 0 00-2-2z",
- fill: color2
- }
- )
- )), EditorIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M7.536 5.314a.5.5 0 01.928.372l-2 5a.5.5 0 01-.928-.371l2-5zM3.646 6.146a.5.5 0 01.708.708L3.207 8l1.147 1.146a.5.5 0 01-.708.708l-1.5-1.5a.5.5 0 01-.063-.63l.063-.078 1.5-1.5zM9.646 6.146a.5.5 0 01.707 0l1.5 1.5.065.079a.497.497 0 01-.064.629l-1.5 1.5a.5.5 0 01-.708-.708L10.793 8 9.646 6.854a.5.5 0 010-.708z",
- fill: color2
- }
- ),
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M13.5 1.004a.5.5 0 01.5.5v11l-.01.1a.501.501 0 01-.39.39l-.1.01H.5l-.1-.01a.501.501 0 01-.39-.39l-.01-.1v-11a.5.5 0 01.5-.5h13zm-12.5 11h12v-8H1v8zm.5-10a.5.5 0 100 1 .5.5 0 000-1zm2 0a.5.5 0 100 1 .5.5 0 000-1zm2 0a.5.5 0 100 1 .5.5 0 000-1z",
- fill: color2
- }
- )
- )), InfoIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M7 13A6 6 0 107 1a6 6 0 000 12zm0 1A7 7 0 107 0a7 7 0 000 14z",
- fill: color2
- }
- ),
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M7 5.5a.5.5 0 01.5.5v4.5a.5.5 0 01-1 0V6a.5.5 0 01.5-.5z",
- fill: color2
- }
- ),
- React255.createElement("path", { d: "M7.75 3.75a.75.75 0 11-1.5 0 .75.75 0 011.5 0z", fill: color2 })
- )), QuestionIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M5.25 5.25A1.75 1.75 0 117 7a.5.5 0 00-.5.5V9a.5.5 0 001 0V7.955A2.75 2.75 0 104.25 5.25a.5.5 0 001 0zM7 11.5A.75.75 0 107 10a.75.75 0 000 1.5z",
- fill: color2
- }
- ),
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M14 7A7 7 0 110 7a7 7 0 0114 0zm-1 0A6 6 0 111 7a6 6 0 0112 0z",
- fill: color2
- }
- )
- )), SupportIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M14 7A7 7 0 110 7a7 7 0 0114 0zm-3.524 4.89A5.972 5.972 0 017 13a5.972 5.972 0 01-3.477-1.11l1.445-1.444C5.564 10.798 6.258 11 7 11s1.436-.202 2.032-.554l1.444 1.445zm-.03-2.858l1.445 1.444A5.972 5.972 0 0013 7c0-1.296-.41-2.496-1.11-3.477l-1.444 1.445C10.798 5.564 11 6.258 11 7s-.202 1.436-.554 2.032zM9.032 3.554l1.444-1.445A5.972 5.972 0 007 1c-1.296 0-2.496.41-3.477 1.11l1.445 1.444A3.981 3.981 0 017 3c.742 0 1.436.202 2.032.554zM3.554 4.968L2.109 3.523A5.973 5.973 0 001 7c0 1.296.41 2.496 1.11 3.476l1.444-1.444A3.981 3.981 0 013 7c0-.742.202-1.436.554-2.032zM10 7a3 3 0 11-6 0 3 3 0 016 0z",
- fill: color2
- }
- )
- )), AlertIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M7 4.5a.5.5 0 01.5.5v3.5a.5.5 0 11-1 0V5a.5.5 0 01.5-.5zM7.75 10.5a.75.75 0 11-1.5 0 .75.75 0 011.5 0z",
- fill: color2
- }
- ),
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M7.206 1.045a.498.498 0 01.23.209l6.494 10.992a.5.5 0 01-.438.754H.508a.497.497 0 01-.506-.452.498.498 0 01.072-.31l6.49-10.984a.497.497 0 01.642-.21zM7 2.483L1.376 12h11.248L7 2.483z",
- fill: color2
- }
- )
- )), AlertAltIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M14 7A7 7 0 110 7a7 7 0 0114 0zM6.5 8a.5.5 0 001 0V4a.5.5 0 00-1 0v4zm-.25 2.25a.75.75 0 111.5 0 .75.75 0 01-1.5 0z",
- fill: color2
- }
- )
- )), EmailIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M0 2.504a.5.5 0 01.5-.5h13a.5.5 0 01.5.5v9a.5.5 0 01-.5.5H.5a.5.5 0 01-.5-.5v-9zm1 1.012v7.488h12V3.519L7.313 7.894a.496.496 0 01-.526.062.497.497 0 01-.1-.062L1 3.516zm11.03-.512H1.974L7 6.874l5.03-3.87z",
- fill: color2
- }
- )
- )), PhoneIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M7.76 8.134l-.05.05a.2.2 0 01-.28.03 6.76 6.76 0 01-1.63-1.65.21.21 0 01.04-.27l.05-.05c.23-.2.54-.47.71-.96.17-.47-.02-1.04-.66-1.94-.26-.38-.72-.96-1.22-1.46-.68-.69-1.2-1-1.65-1a.98.98 0 00-.51.13A3.23 3.23 0 00.9 3.424c-.13 1.1.26 2.37 1.17 3.78a16.679 16.679 0 004.55 4.6 6.57 6.57 0 003.53 1.32 3.2 3.2 0 002.85-1.66c.14-.24.24-.64-.07-1.18a7.803 7.803 0 00-1.73-1.81c-.64-.5-1.52-1.11-2.13-1.11a.97.97 0 00-.34.06c-.472.164-.74.458-.947.685l-.023.025zm4.32 2.678a6.801 6.801 0 00-1.482-1.54l-.007-.005-.006-.005a8.418 8.418 0 00-.957-.662 2.7 2.7 0 00-.4-.193.683.683 0 00-.157-.043l-.004.002-.009.003c-.224.078-.343.202-.56.44l-.014.016-.046.045a1.2 1.2 0 01-1.602.149A7.76 7.76 0 014.98 7.134l-.013-.019-.013-.02a1.21 1.21 0 01.195-1.522l.06-.06.026-.024c.219-.19.345-.312.422-.533l.003-.01v-.008a.518.518 0 00-.032-.142c-.06-.178-.203-.453-.502-.872l-.005-.008-.005-.007A10.18 10.18 0 004.013 2.59l-.005-.005c-.31-.314-.543-.5-.716-.605-.147-.088-.214-.096-.222-.097h-.016l-.006.003-.01.006a2.23 2.23 0 00-1.145 1.656c-.09.776.175 1.806 1.014 3.108a15.68 15.68 0 004.274 4.32l.022.014.022.016a5.57 5.57 0 002.964 1.117 2.2 2.2 0 001.935-1.141l.006-.012.004-.007a.182.182 0 00-.007-.038.574.574 0 00-.047-.114z",
- fill: color2
- }
- )
- )), LinkIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M11.841 2.159a2.25 2.25 0 00-3.182 0l-2.5 2.5a2.25 2.25 0 000 3.182.5.5 0 01-.707.707 3.25 3.25 0 010-4.596l2.5-2.5a3.25 3.25 0 014.596 4.596l-2.063 2.063a4.27 4.27 0 00-.094-1.32l1.45-1.45a2.25 2.25 0 000-3.182z",
- fill: color2
- }
- ),
- React255.createElement(
- "path",
- {
- d: "M3.61 7.21c-.1-.434-.132-.88-.095-1.321L1.452 7.952a3.25 3.25 0 104.596 4.596l2.5-2.5a3.25 3.25 0 000-4.596.5.5 0 00-.707.707 2.25 2.25 0 010 3.182l-2.5 2.5A2.25 2.25 0 112.159 8.66l1.45-1.45z",
- fill: color2
- }
- )
- )), LinkBrokenIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M1.452 7.952l1.305-1.305.708.707-1.306 1.305a2.25 2.25 0 103.182 3.182l1.306-1.305.707.707-1.306 1.305a3.25 3.25 0 01-4.596-4.596zM12.548 6.048l-1.305 1.306-.707-.708 1.305-1.305a2.25 2.25 0 10-3.182-3.182L7.354 3.464l-.708-.707 1.306-1.305a3.25 3.25 0 014.596 4.596zM1.854 1.146a.5.5 0 10-.708.708l11 11a.5.5 0 00.707-.707l-11-11z",
- fill: color2
- }
- )
- )), BellIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M7.994 1.11a1 1 0 10-1.988 0A4.502 4.502 0 002.5 5.5v3.882l-.943 1.885a.497.497 0 00-.053.295.5.5 0 00.506.438h3.575a1.5 1.5 0 102.83 0h3.575a.5.5 0 00.453-.733L11.5 9.382V5.5a4.502 4.502 0 00-3.506-4.39zM2.81 11h8.382l-.5-1H3.31l-.5 1zM10.5 9V5.5a3.5 3.5 0 10-7 0V9h7zm-4 3.5a.5.5 0 111 0 .5.5 0 01-1 0z",
- fill: color2
- }
- )
- )), RSSIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M1.5.5A.5.5 0 012 0c6.627 0 12 5.373 12 12a.5.5 0 01-1 0C13 5.925 8.075 1 2 1a.5.5 0 01-.5-.5z",
- fill: color2
- }
- ),
- React255.createElement(
- "path",
- {
- d: "M1.5 4.5A.5.5 0 012 4a8 8 0 018 8 .5.5 0 01-1 0 7 7 0 00-7-7 .5.5 0 01-.5-.5z",
- fill: color2
- }
- ),
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M5 11a2 2 0 11-4 0 2 2 0 014 0zm-1 0a1 1 0 11-2 0 1 1 0 012 0z",
- fill: color2
- }
- )
- )), ShareAltIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M2 1.004a1 1 0 00-1 1v10a1 1 0 001 1h10a1 1 0 001-1v-4.5a.5.5 0 00-1 0v4.5H2v-10h4.5a.5.5 0 000-1H2z",
- fill: color2
- }
- ),
- React255.createElement(
- "path",
- {
- d: "M7.354 7.357L12 2.711v1.793a.5.5 0 001 0v-3a.5.5 0 00-.5-.5h-3a.5.5 0 100 1h1.793L6.646 6.65a.5.5 0 10.708.707z",
- fill: color2
- }
- )
- )), ShareIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M6.646.15a.5.5 0 01.708 0l2 2a.5.5 0 11-.708.707L7.5 1.711v6.793a.5.5 0 01-1 0V1.71L5.354 2.857a.5.5 0 11-.708-.707l2-2z",
- fill: color2
- }
- ),
- React255.createElement(
- "path",
- {
- d: "M2 4.004a1 1 0 00-1 1v7a1 1 0 001 1h10a1 1 0 001-1v-7a1 1 0 00-1-1H9.5a.5.5 0 100 1H12v7H2v-7h2.5a.5.5 0 000-1H2z",
- fill: color2
- }
- )
- )), JumpToIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M13.854 6.646a.5.5 0 010 .708l-2 2a.5.5 0 01-.708-.708L12.293 7.5H5.5a.5.5 0 010-1h6.793l-1.147-1.146a.5.5 0 01.708-.708l2 2z",
- fill: color2
- }
- ),
- React255.createElement(
- "path",
- {
- d: "M10 2a1 1 0 00-1-1H2a1 1 0 00-1 1v10a1 1 0 001 1h7a1 1 0 001-1V9.5a.5.5 0 00-1 0V12H2V2h7v2.5a.5.5 0 001 0V2z",
- fill: color2
- }
- )
- )), CircleHollowIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M7 13A6 6 0 107 1a6 6 0 000 12zm0 1A7 7 0 107 0a7 7 0 000 14z",
- fill: color2
- }
- )
- )), CircleIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement("path", { d: "M14 7A7 7 0 110 7a7 7 0 0114 0z", fill: color2 })
- )), BookmarkHollowIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 15",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M3.5 0h7a.5.5 0 01.5.5v13a.5.5 0 01-.454.498.462.462 0 01-.371-.118L7 11.159l-3.175 2.72a.46.46 0 01-.379.118A.5.5 0 013 13.5V.5a.5.5 0 01.5-.5zM4 12.413l2.664-2.284a.454.454 0 01.377-.128.498.498 0 01.284.12L10 12.412V1H4v11.413z",
- fill: color2
- }
- )
- )), BookmarkIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 15",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M3.5 0h7a.5.5 0 01.5.5v13a.5.5 0 01-.454.498.462.462 0 01-.371-.118L7 11.159l-3.175 2.72a.46.46 0 01-.379.118A.5.5 0 013 13.5V.5a.5.5 0 01.5-.5z",
- fill: color2
- }
- )
- )), DiamondIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement("g", { clipPath: "url(#prefix__clip0_1449_588)" }, React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M8.414 1.586a2 2 0 00-2.828 0l-4 4a2 2 0 000 2.828l4 4a2 2 0 002.828 0l4-4a2 2 0 000-2.828l-4-4zm.707-.707a3 3 0 00-4.242 0l-4 4a3 3 0 000 4.242l4 4a3 3 0 004.242 0l4-4a3 3 0 000-4.242l-4-4z",
- fill: color2
- }
- )),
- React255.createElement("defs", null, React255.createElement("clipPath", { id: "prefix__clip0_1449_588" }, React255.createElement("path", { fill: "#fff", d: "M0 0h14v14H0z" })))
- )), HeartHollowIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M12.814 1.846c.06.05.116.101.171.154l.001.002a3.254 3.254 0 01.755 1.168c.171.461.259.974.259 1.538 0 .332-.046.656-.143.976a4.546 4.546 0 01-.397.937c-.169.302-.36.589-.58.864a7.627 7.627 0 01-.674.746l-4.78 4.596a.585.585 0 01-.427.173.669.669 0 01-.44-.173L1.78 8.217a7.838 7.838 0 01-.677-.748 6.124 6.124 0 01-.572-.855 4.975 4.975 0 01-.388-.931A3.432 3.432 0 010 4.708C0 4.144.09 3.63.265 3.17c.176-.459.429-.85.757-1.168a3.432 3.432 0 011.193-.74c.467-.176.99-.262 1.57-.262.304 0 .608.044.907.137.301.092.586.215.855.367.27.148.526.321.771.512.244.193.471.386.682.584.202-.198.427-.391.678-.584.248-.19.507-.364.78-.512a4.65 4.65 0 01.845-.367c.294-.093.594-.137.9-.137.585 0 1.115.086 1.585.262.392.146.734.34 1.026.584zM1.2 3.526c.128-.333.304-.598.52-.806.218-.212.497-.389.849-.522m-1.37 1.328A3.324 3.324 0 001 4.708c0 .225.032.452.101.686.082.265.183.513.307.737.135.246.294.484.479.716.188.237.386.454.59.652l.001.002 4.514 4.355 4.519-4.344c.2-.193.398-.41.585-.648l.003-.003c.184-.23.345-.472.486-.726l.004-.007c.131-.23.232-.474.31-.732v-.002c.068-.224.101-.45.101-.686 0-.457-.07-.849-.195-1.185a2.177 2.177 0 00-.515-.802l.007-.012-.008.009a2.383 2.383 0 00-.85-.518l-.003-.001C11.1 2.072 10.692 2 10.203 2c-.21 0-.406.03-.597.09h-.001c-.22.07-.443.167-.663.289l-.007.003c-.22.12-.434.262-.647.426-.226.174-.42.341-.588.505l-.684.672-.7-.656a9.967 9.967 0 00-.615-.527 4.82 4.82 0 00-.635-.422l-.01-.005a3.289 3.289 0 00-.656-.281l-.008-.003A2.014 2.014 0 003.785 2c-.481 0-.881.071-1.217.198",
- fill: color2
- }
- )
- )), HeartIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M12.814 1.846c.06.05.116.101.171.154l.001.002a3.254 3.254 0 01.755 1.168c.171.461.259.974.259 1.538 0 .332-.046.656-.143.976a4.546 4.546 0 01-.397.937c-.169.302-.36.589-.58.864a7.627 7.627 0 01-.674.746l-4.78 4.596a.585.585 0 01-.427.173.669.669 0 01-.44-.173L1.78 8.217a7.838 7.838 0 01-.677-.748 6.124 6.124 0 01-.572-.855 4.975 4.975 0 01-.388-.931A3.432 3.432 0 010 4.708C0 4.144.09 3.63.265 3.17c.176-.459.429-.85.757-1.168a3.432 3.432 0 011.193-.74c.467-.176.99-.262 1.57-.262.304 0 .608.044.907.137.301.092.586.215.855.367.27.148.526.321.771.512.244.193.471.386.682.584.202-.198.427-.391.678-.584.248-.19.507-.364.78-.512a4.65 4.65 0 01.845-.367c.294-.093.594-.137.9-.137.585 0 1.115.086 1.585.262.392.146.734.34 1.026.584z",
- fill: color2
- }
- )
- )), StarHollowIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M6.319.783a.75.75 0 011.362 0l1.63 3.535 3.867.458a.75.75 0 01.42 1.296L10.74 8.715l.76 3.819a.75.75 0 01-1.103.8L7 11.434l-3.398 1.902a.75.75 0 01-1.101-.801l.758-3.819L.401 6.072a.75.75 0 01.42-1.296l3.867-.458L6.318.783zm.68.91l-1.461 3.17a.75.75 0 01-.593.431l-3.467.412 2.563 2.37a.75.75 0 01.226.697l-.68 3.424 3.046-1.705a.75.75 0 01.733 0l3.047 1.705-.68-3.424a.75.75 0 01.226-.697l2.563-2.37-3.467-.412a.75.75 0 01-.593-.43L7 1.694z",
- fill: color2
- }
- )
- )), StarIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M7.68.783a.75.75 0 00-1.361 0l-1.63 3.535-3.867.458A.75.75 0 00.4 6.072l2.858 2.643-.758 3.819a.75.75 0 001.101.8L7 11.434l3.397 1.902a.75.75 0 001.102-.801l-.759-3.819L13.6 6.072a.75.75 0 00-.421-1.296l-3.866-.458L7.68.783z",
- fill: color2
- }
- )
- )), CertificateIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M10 7.854a4.5 4.5 0 10-6 0V13a.5.5 0 00.497.5h.006c.127 0 .254-.05.35-.146L7 11.207l2.146 2.147A.5.5 0 0010 13V7.854zM7 8a3.5 3.5 0 100-7 3.5 3.5 0 000 7zm-.354 2.146a.5.5 0 01.708 0L9 11.793v-3.26C8.398 8.831 7.718 9 7 9a4.481 4.481 0 01-2-.468v3.26l1.646-1.646z",
- fill: color2
- }
- )
- )), VerifiedIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M6.565 13.123a.991.991 0 01.87 0l.987.482a.991.991 0 001.31-.426l.515-.97a.991.991 0 01.704-.511l1.082-.19a.99.99 0 00.81-1.115l-.154-1.087a.991.991 0 01.269-.828l.763-.789a.991.991 0 000-1.378l-.763-.79a.991.991 0 01-.27-.827l.155-1.087a.99.99 0 00-.81-1.115l-1.082-.19a.991.991 0 01-.704-.511L9.732.82a.99.99 0 00-1.31-.426l-.987.482a.991.991 0 01-.87 0L5.578.395a.99.99 0 00-1.31.426l-.515.97a.99.99 0 01-.704.511l-1.082.19a.99.99 0 00-.81 1.115l.154 1.087a.99.99 0 01-.269.828L.28 6.31a.99.99 0 000 1.378l.763.79a.99.99 0 01.27.827l-.155 1.087a.99.99 0 00.81 1.115l1.082.19a.99.99 0 01.704.511l.515.97c.25.473.83.661 1.31.426l.987-.482zm4.289-8.477a.5.5 0 010 .708l-4.5 4.5a.5.5 0 01-.708 0l-2.5-2.5a.5.5 0 11.708-.708L6 8.793l4.146-4.147a.5.5 0 01.708 0z",
- fill: color2
- }
- )
- )), ThumbsUpIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M11 12.02c-.4.37-.91.56-1.56.56h-.88a5.493 5.493 0 01-1.3-.16c-.42-.1-.91-.25-1.47-.45a5.056 5.056 0 00-.95-.27H2.88a.84.84 0 01-.62-.26.84.84 0 01-.26-.61V6.45c0-.24.09-.45.26-.62a.84.84 0 01.62-.25h1.87c.16-.11.47-.47.93-1.06.27-.35.51-.64.74-.88.1-.11.19-.3.24-.58.05-.28.12-.57.2-.87.1-.3.24-.55.43-.74a.87.87 0 01.62-.25c.38 0 .72.07 1.03.22.3.15.54.38.7.7.15.31.23.73.23 1.27a3 3 0 01-.32 1.31h1.2c.47 0 .88.17 1.23.52s.52.8.52 1.22c0 .29-.04.66-.34 1.12.05.15.07.3.07.47 0 .35-.09.68-.26.98a2.05 2.05 0 01-.4 1.51 1.9 1.9 0 01-.57 1.5zm.473-5.33a.965.965 0 00.027-.25.742.742 0 00-.227-.513.683.683 0 00-.523-.227H7.927l.73-1.45a2 2 0 00.213-.867c0-.444-.068-.695-.127-.822a.53.53 0 00-.245-.244 1.296 1.296 0 00-.539-.116.989.989 0 00-.141.28 9.544 9.544 0 00-.174.755c-.069.387-.213.779-.484 1.077l-.009.01-.009.01c-.195.202-.41.46-.67.798l-.003.004c-.235.3-.44.555-.613.753-.151.173-.343.381-.54.516l-.255.176H5v4.133l.018.003c.384.07.76.176 1.122.318.532.189.98.325 1.352.413l.007.002a4.5 4.5 0 001.063.131h.878c.429 0 .683-.115.871-.285a.9.9 0 00.262-.702l-.028-.377.229-.3a1.05 1.05 0 00.205-.774l-.044-.333.165-.292a.969.969 0 00.13-.487.457.457 0 00-.019-.154l-.152-.458.263-.404a1.08 1.08 0 00.152-.325zM3.5 10.8a.5.5 0 100-1 .5.5 0 000 1z",
- fill: color2
- }
- )
- )), ShieldIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M11.765 2.076A.5.5 0 0112 2.5v6.009a.497.497 0 01-.17.366L7.337 12.87a.497.497 0 01-.674 0L2.17 8.875l-.009-.007a.498.498 0 01-.16-.358L2 8.5v-6a.5.5 0 01.235-.424l.018-.011c.016-.01.037-.024.065-.04.056-.032.136-.077.24-.128a6.97 6.97 0 01.909-.371C4.265 1.26 5.443 1 7 1s2.735.26 3.533.526c.399.133.702.267.91.37a4.263 4.263 0 01.304.169l.018.01zM3 2.793v5.482l1.068.95 6.588-6.588a6.752 6.752 0 00-.44-.163C9.517 2.24 8.444 2 7 2c-1.443 0-2.515.24-3.217.474-.351.117-.61.233-.778.317L3 2.793zm4 9.038l-2.183-1.94L11 3.706v4.568l-4 3.556z",
- fill: color2
- }
- )
- )), BasketIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M10.354 2.854a.5.5 0 10-.708-.708l-3 3a.5.5 0 10.708.708l3-3z",
- fill: color2
- }
- ),
- React255.createElement(
- "path",
- {
- d: "M2.09 6H4.5a.5.5 0 000-1H1.795a.75.75 0 00-.74.873l.813 4.874A1.5 1.5 0 003.348 12h7.305a1.5 1.5 0 001.48-1.253l.812-4.874a.75.75 0 00-.74-.873H10a.5.5 0 000 1h1.91l-.764 4.582a.5.5 0 01-.493.418H3.347a.5.5 0 01-.493-.418L2.09 6z",
- fill: color2
- }
- ),
- React255.createElement(
- "path",
- {
- d: "M4.5 7a.5.5 0 01.5.5v2a.5.5 0 01-1 0v-2a.5.5 0 01.5-.5zM10 7.5a.5.5 0 00-1 0v2a.5.5 0 001 0v-2zM6.5 9.5v-2a.5.5 0 011 0v2a.5.5 0 01-1 0z",
- fill: color2
- }
- )
- )), BeakerIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M4.5 2h.75v3.866l-3.034 5.26A1.25 1.25 0 003.299 13H10.7a1.25 1.25 0 001.083-1.875L8.75 5.866V2h.75a.5.5 0 100-1h-5a.5.5 0 000 1zm1.75 0h1.5v4.134L8.827 8H5.173L6.25 6.134V2zM4.597 9l-1.515 2.625A.25.25 0 003.3 12H10.7a.25.25 0 00.217-.375L9.404 9H4.597z",
- fill: color2
- }
- )
- )), HourglassIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement("path", { d: "M7.5 10.5a.5.5 0 11-1 0 .5.5 0 011 0z", fill: color2 }),
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M3.5 1a.5.5 0 00-.5.5c0 1.063.137 1.892.678 2.974.346.692.858 1.489 1.598 2.526-.89 1.247-1.455 2.152-1.798 2.956-.377.886-.477 1.631-.478 2.537v.007a.5.5 0 00.5.5h7c.017 0 .034 0 .051-.003A.5.5 0 0011 12.5v-.007c0-.906-.1-1.65-.478-2.537-.343-.804-.909-1.709-1.798-2.956.74-1.037 1.252-1.834 1.598-2.526C10.863 3.392 11 2.563 11 1.5a.5.5 0 00-.5-.5h-7zm6.487 11a4.675 4.675 0 00-.385-1.652c-.277-.648-.735-1.407-1.499-2.494-.216.294-.448.606-.696.937a.497.497 0 01-.195.162.5.5 0 01-.619-.162c-.248-.331-.48-.643-.696-.937-.764 1.087-1.222 1.846-1.499 2.494A4.675 4.675 0 004.013 12h5.974zM6.304 6.716c.212.293.443.609.696.948a90.058 90.058 0 00.709-.965c.48-.664.86-1.218 1.163-1.699H5.128a32.672 32.672 0 001.176 1.716zM4.559 4h4.882c.364-.735.505-1.312.546-2H4.013c.04.688.182 1.265.546 2z",
- fill: color2
- }
- )
- )), FlagIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M11.5 1h-9a.5.5 0 00-.5.5v11a.5.5 0 001 0V8h8.5a.5.5 0 00.354-.854L9.207 4.5l2.647-2.646A.499.499 0 0011.5 1zM8.146 4.146L10.293 2H3v5h7.293L8.146 4.854a.5.5 0 010-.708z",
- fill: color2
- }
- )
- )), CloudHollowIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M10 7V6a3 3 0 00-5.91-.736l-.17.676-.692.075A2.5 2.5 0 003.5 11h3c.063 0 .125-.002.187-.007l.076-.005.076.006c.053.004.106.006.161.006h4a2 2 0 100-4h-1zM3.12 5.02A3.5 3.5 0 003.5 12h3c.087 0 .174-.003.26-.01.079.007.16.01.24.01h4a3 3 0 100-6 4 4 0 00-7.88-.98z",
- fill: color2
- }
- )
- )), CloudIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M7 2a4 4 0 014 4 3 3 0 110 6H7c-.08 0-.161-.003-.24-.01-.086.007-.173.01-.26.01h-3a3.5 3.5 0 01-.38-6.98A4.002 4.002 0 017 2z",
- fill: color2
- }
- )
- )), StickerIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M11 7a4 4 0 11-8 0 4 4 0 018 0zm-1 0a3 3 0 11-6 0 3 3 0 016 0z",
- fill: color2
- }
- ),
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M4.268 13.18c.25.472.83.66 1.31.425l.987-.482a.991.991 0 01.87 0l.987.482a.991.991 0 001.31-.426l.515-.97a.991.991 0 01.704-.511l1.082-.19a.99.99 0 00.81-1.115l-.154-1.087a.991.991 0 01.269-.828l.763-.789a.991.991 0 000-1.378l-.763-.79a.991.991 0 01-.27-.827l.155-1.087a.99.99 0 00-.81-1.115l-1.082-.19a.991.991 0 01-.704-.511L9.732.82a.99.99 0 00-1.31-.426l-.987.482a.991.991 0 01-.87 0L5.578.395a.99.99 0 00-1.31.426l-.515.97a.99.99 0 01-.704.511l-1.082.19a.99.99 0 00-.81 1.115l.154 1.087a.99.99 0 01-.269.828L.28 6.31a.99.99 0 000 1.378l.763.79a.99.99 0 01.27.827l-.155 1.087a.99.99 0 00.81 1.115l1.082.19a.99.99 0 01.704.511l.515.97zm5.096-1.44l-.511.963-.979-.478a1.99 1.99 0 00-1.748 0l-.979.478-.51-.962a1.991 1.991 0 00-1.415-1.028l-1.073-.188.152-1.079a1.991 1.991 0 00-.54-1.663L1.004 7l.757-.783a1.991 1.991 0 00.54-1.663L2.15 3.475l1.073-.188A1.991 1.991 0 004.636 2.26l.511-.962.979.478a1.99 1.99 0 001.748 0l.979-.478.51.962c.288.543.81.922 1.415 1.028l1.073.188-.152 1.079a1.99 1.99 0 00.54 1.663l.757.783-.757.783a1.99 1.99 0 00-.54 1.663l.152 1.079-1.073.188a1.991 1.991 0 00-1.414 1.028z",
- fill: color2
- }
- )
- )), StatusFailIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M9.147 4.146a.5.5 0 11.707.707L7.707 7l2.147 2.146a.5.5 0 11-.707.707L7 7.707 4.854 9.853a.5.5 0 01-.707-.707L6.293 7 4.147 4.853a.5.5 0 11.707-.707L7 6.293l2.147-2.147z",
- fill: color2
- }
- )
- )), StatusIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement("circle", { cx: 7, cy: 7, r: 3, fill: color2 })
- )), StatusWarnIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M7.206 3.044a.498.498 0 01.23.212l3.492 5.985a.494.494 0 01.006.507.497.497 0 01-.443.252H3.51a.499.499 0 01-.437-.76l3.492-5.984a.497.497 0 01.642-.212zM7 4.492L4.37 9h5.26L7 4.492z",
- fill: color2
- }
- )
- )), StatusPassIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M10.854 4.146a.5.5 0 010 .708l-5 5a.5.5 0 01-.708 0l-2-2a.5.5 0 11.708-.708L5.5 8.793l4.646-4.647a.5.5 0 01.708 0z",
- fill: color2
- }
- )
- )), GiftIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M9 0a2.5 2.5 0 011.997 4H12.5A1.5 1.5 0 0114 5.5v1c0 .653-.418 1.206-1 1.412V11.5a1.5 1.5 0 01-1.5 1.5h-9A1.5 1.5 0 011 11.5V7.912c-.582-.206-1-.76-1-1.412v-1A1.5 1.5 0 011.5 4h1.883A2.234 2.234 0 013 2.75c0-.6.208-1.142.597-1.535.39-.394.93-.607 1.533-.607.637 0 1.197.349 1.602.843A2.498 2.498 0 019 0zM7.5 12h4a.5.5 0 00.5-.5V8H7.5v4zM2 11.5a.5.5 0 00.5.5h4V8H2v3.5zM7.5 7h5a.5.5 0 00.5-.5v-1a.5.5 0 00-.5-.5h-5v2zm-6-2a.5.5 0 00-.5.5v1a.5.5 0 00.5.5h5V5h-5zm3.63-3.392c-.363 0-.639.125-.822.31-.184.187-.308.466-.308.832C4 3.44 4.56 4 5.25 4H6.5v-.25c0-.648-.197-1.203-.477-1.585-.283-.388-.616-.557-.893-.557zM9 1a1.5 1.5 0 00-1.5 1.5V4H9a1.5 1.5 0 100-3z",
- fill: color2
- }
- )
- )), StatusNewIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M7.052 3.004c.01 0 .02 0 .03.002.004 0 .01.003.015.004a.493.493 0 01.051.013l.043.015a.497.497 0 01.089.049l.03.023c.015.012.029.023.042.036.012.012.023.026.035.04l.023.03c.01.015.019.03.027.047.008.014.016.028.022.043.006.014.01.028.015.043.005.017.01.034.013.051l.005.017.03.182A3.5 3.5 0 0010.4 6.476l.182.03c.005 0 .01.003.016.004a.494.494 0 01.051.013l.043.015a.503.503 0 01.089.049l.03.023c.015.012.029.023.042.036.012.012.023.026.035.04l.023.03c.01.015.019.03.027.047.008.014.016.028.022.043l.014.04.014.054.005.017c.002.01 0 .019.001.028.002.018.004.036.004.054 0 .018-.002.035-.004.053v.03l-.006.015a.479.479 0 01-.013.051l-.015.043a.507.507 0 01-.049.089l-.023.03-.035.042-.042.035-.03.023a.503.503 0 01-.046.027c-.014.008-.028.016-.043.022-.014.006-.028.01-.043.015a.491.491 0 01-.051.013l-.016.005-.182.03A3.5 3.5 0 007.522 10.4l-.03.182c0 .005-.004.01-.005.016a.491.491 0 01-.013.051l-.015.043a.503.503 0 01-.049.089l-.023.03-.035.042-.041.035-.03.023a.507.507 0 01-.047.027c-.014.008-.028.016-.043.022-.014.006-.028.01-.043.015a.479.479 0 01-.051.013l-.016.005c-.01.002-.02 0-.03.001-.017.002-.034.004-.052.004-.018 0-.036-.002-.054-.004h-.028c-.006-.002-.011-.005-.017-.006a.503.503 0 01-.051-.013l-.043-.015a.505.505 0 01-.089-.049l-.03-.023c-.015-.012-.029-.023-.041-.035-.013-.013-.024-.027-.036-.042l-.023-.03a.503.503 0 01-.027-.046c-.008-.014-.016-.028-.022-.043-.006-.014-.01-.028-.015-.043a.494.494 0 01-.013-.051l-.004-.016-.03-.182a3.5 3.5 0 00-2.877-2.877l-.182-.03c-.006 0-.011-.004-.017-.005a.493.493 0 01-.051-.013l-.043-.015a.492.492 0 01-.089-.049l-.03-.023c-.015-.012-.029-.023-.041-.035-.013-.013-.024-.027-.036-.041l-.023-.03a.497.497 0 01-.027-.047c-.008-.014-.016-.028-.022-.043-.006-.013-.01-.028-.015-.043a.493.493 0 01-.013-.051l-.004-.016c-.002-.01-.001-.02-.002-.03C3.002 7.035 3 7.018 3 7c0-.018.002-.036.004-.054 0-.009 0-.019.002-.028 0-.006.003-.011.004-.017l.015-.054.013-.04a.498.498 0 01.049-.089l.023-.03.026-.032.02-.02.03-.025.03-.023a.498.498 0 01.047-.027c.014-.008.028-.016.043-.022.014-.006.028-.01.043-.015A.493.493 0 013.4 6.51l.017-.004.182-.03a3.5 3.5 0 002.877-2.877l.03-.182c0-.006.003-.011.004-.017a.493.493 0 01.013-.051l.015-.043a.498.498 0 01.049-.089l.023-.03.026-.032.02-.02.03-.025.03-.023a.498.498 0 01.047-.027c.014-.008.028-.016.043-.022.014-.006.028-.01.043-.015A.493.493 0 016.9 3.01l.017-.004c.01-.002.019-.001.028-.002C6.963 3.002 6.981 3 7 3c.018 0 .035.002.053.004z",
- fill: color2
- }
- )
- )), PopOutIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement("g", { clipPath: "url(#prefix__clip0_3002_502)", fill: color2 }, React255.createElement("path", { d: "M10.5 12a.5.5 0 01.5.5v.504a1 1 0 01-1 1H8.5a.5.5 0 010-1H10V12.5a.5.5 0 01.5-.5zM.498 11a.5.5 0 01.5.5v1.502H2.5a.5.5 0 110 1H.998a1 1 0 01-1-1V11.5a.5.5 0 01.5-.5zM6.5 13a.5.5 0 010 1h-2a.5.5 0 010-1h2zM10.501 3.004h.006a.495.495 0 01.232.063c.04.022.08.049.115.083a.497.497 0 01.077.104.493.493 0 01.06.151l.003.038c.003.02.006.04.006.06V6.5a.5.5 0 01-1 0V4.71L6.857 7.855a.5.5 0 11-.707-.708l3.144-3.144L7.499 4a.5.5 0 01.002-1l3 .004z" }), React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M13.6.014a.5.5 0 01.4.49v10l-.01.1a.501.501 0 01-.39.39l-.1.01h-10a.5.5 0 01-.49-.4l-.01-.1v-10a.5.5 0 01.5-.5h10l.1.01zM4 10.004h9v-9H4v9z"
- }
- ), React255.createElement("path", { d: "M.5 7a.5.5 0 01.5.5v2a.5.5 0 01-1 0v-2A.5.5 0 01.5 7zM1.5 3.002a.5.5 0 010 1H.998L1 5.499a.5.5 0 01-1 .002l-.002-1.498a1 1 0 011-1.001H1.5z" })),
- React255.createElement("defs", null, React255.createElement("clipPath", { id: "prefix__clip0_3002_502" }, React255.createElement("path", { fill: "#fff", d: "M0 0h14v14H0z" })))
- )), ChevronUpIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M7.354 3.896l5.5 5.5a.5.5 0 01-.708.708L7 4.957l-5.146 5.147a.5.5 0 01-.708-.708l5.5-5.5a.5.5 0 01.708 0z",
- fill: color2
- }
- )
- )), ChevronDownIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M1.146 4.604l5.5 5.5a.5.5 0 00.708 0l5.5-5.5a.5.5 0 00-.708-.708L7 9.043 1.854 3.896a.5.5 0 10-.708.708z",
- fill: color2
- }
- )
- )), ChevronLeftIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M2.76 7.096a.498.498 0 00.136.258l5.5 5.5a.5.5 0 00.707-.708L3.958 7l5.147-5.146a.5.5 0 10-.708-.708l-5.5 5.5a.5.5 0 00-.137.45z",
- fill: color2
- }
- )
- )), ChevronRightIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M11.104 7.354l-5.5 5.5a.5.5 0 01-.708-.708L10.043 7 4.896 1.854a.5.5 0 11.708-.708l5.5 5.5a.5.5 0 010 .708z",
- fill: color2
- }
- )
- )), ChevronSmallUpIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M3.854 9.104a.5.5 0 11-.708-.708l3.5-3.5a.5.5 0 01.708 0l3.5 3.5a.5.5 0 01-.708.708L7 5.957 3.854 9.104z",
- fill: color2
- }
- )
- )), ChevronSmallDownIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M3.854 4.896a.5.5 0 10-.708.708l3.5 3.5a.5.5 0 00.708 0l3.5-3.5a.5.5 0 00-.708-.708L7 8.043 3.854 4.896z",
- fill: color2
- }
- )
- )), ChevronSmallLeftIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M9.104 10.146a.5.5 0 01-.708.708l-3.5-3.5a.5.5 0 010-.708l3.5-3.5a.5.5 0 11.708.708L5.957 7l3.147 3.146z",
- fill: color2
- }
- )
- )), ChevronSmallRightIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M4.896 10.146a.5.5 0 00.708.708l3.5-3.5a.5.5 0 000-.708l-3.5-3.5a.5.5 0 10-.708.708L8.043 7l-3.147 3.146z",
- fill: color2
- }
- )
- )), ArrowUpIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M11.854 4.646l-4.5-4.5a.5.5 0 00-.708 0l-4.5 4.5a.5.5 0 10.708.708L6.5 1.707V13.5a.5.5 0 001 0V1.707l3.646 3.647a.5.5 0 00.708-.708z",
- fill: color2
- }
- )
- )), ArrowDownIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M7.5.5a.5.5 0 00-1 0v11.793L2.854 8.646a.5.5 0 10-.708.708l4.5 4.5a.5.5 0 00.351.146h.006c.127 0 .254-.05.35-.146l4.5-4.5a.5.5 0 00-.707-.708L7.5 12.293V.5z",
- fill: color2
- }
- )
- )), ArrowLeftIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M5.354 2.146a.5.5 0 010 .708L1.707 6.5H13.5a.5.5 0 010 1H1.707l3.647 3.646a.5.5 0 01-.708.708l-4.5-4.5a.5.5 0 010-.708l4.5-4.5a.5.5 0 01.708 0z",
- fill: color2
- }
- )
- )), ArrowRightIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M8.646 2.146a.5.5 0 01.708 0l4.5 4.5a.5.5 0 010 .708l-4.5 4.5a.5.5 0 01-.708-.708L12.293 7.5H.5a.5.5 0 010-1h11.793L8.646 2.854a.5.5 0 010-.708z",
- fill: color2
- }
- )
- )), ArrowTopLeftIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M1.904 8.768V2.404a.5.5 0 01.5-.5h6.364a.5.5 0 110 1H3.61l8.339 8.339a.5.5 0 01-.707.707l-8.34-8.34v5.158a.5.5 0 01-1 0z",
- fill: color2
- }
- )
- )), ArrowTopRightIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M12.096 8.768V2.404a.5.5 0 00-.5-.5H5.232a.5.5 0 100 1h5.157L2.05 11.243a.5.5 0 10.707.707l8.34-8.34v5.158a.5.5 0 101 0z",
- fill: color2
- }
- )
- )), ArrowBottomLeftIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M1.904 5.232v6.364a.5.5 0 00.5.5h6.364a.5.5 0 000-1H3.61l8.339-8.339a.5.5 0 00-.707-.707l-8.34 8.34V5.231a.5.5 0 00-1 0z",
- fill: color2
- }
- )
- )), ArrowBottomRightIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M12.096 5.232v6.364a.5.5 0 01-.5.5H5.232a.5.5 0 010-1h5.157L2.05 2.757a.5.5 0 01.707-.707l8.34 8.34V5.231a.5.5 0 111 0z",
- fill: color2
- }
- )
- )), ArrowSolidUpIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M6.772 3.59c.126-.12.33-.12.456 0l5.677 5.387c.203.193.06.523-.228.523H1.323c-.287 0-.431-.33-.228-.523L6.772 3.59z",
- fill: color2
- }
- )
- )), ArrowSolidDownIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M7.228 10.41a.335.335 0 01-.456 0L1.095 5.023c-.203-.193-.06-.523.228-.523h11.354c.287 0 .431.33.228.523L7.228 10.41z",
- fill: color2
- }
- )
- )), ArrowSolidLeftIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M3.712 7.212a.3.3 0 010-.424l5.276-5.276a.3.3 0 01.512.212v10.552a.3.3 0 01-.512.212L3.712 7.212z",
- fill: color2
- }
- )
- )), ArrowSolidRightIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M10.288 7.212a.3.3 0 000-.424L5.012 1.512a.3.3 0 00-.512.212v10.552a.3.3 0 00.512.212l5.276-5.276z",
- fill: color2
- }
- )
- )), ExpandAltIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M7.354.146l4 4a.5.5 0 01-.708.708L7 1.207 3.354 4.854a.5.5 0 11-.708-.708l4-4a.5.5 0 01.708 0zM11.354 9.146a.5.5 0 010 .708l-4 4a.5.5 0 01-.708 0l-4-4a.5.5 0 11.708-.708L7 12.793l3.646-3.647a.5.5 0 01.708 0z",
- fill: color2
- }
- )
- )), CollapseIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M3.354.146a.5.5 0 10-.708.708l4 4a.5.5 0 00.708 0l4-4a.5.5 0 00-.708-.708L7 3.793 3.354.146zM6.646 9.146a.5.5 0 01.708 0l4 4a.5.5 0 01-.708.708L7 10.207l-3.646 3.647a.5.5 0 01-.708-.708l4-4z",
- fill: color2
- }
- )
- )), ExpandIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M1.5 1h2a.5.5 0 010 1h-.793l3.147 3.146a.5.5 0 11-.708.708L2 2.707V3.5a.5.5 0 01-1 0v-2a.5.5 0 01.5-.5zM10 1.5a.5.5 0 01.5-.5h2a.5.5 0 01.5.5v2a.5.5 0 01-1 0v-.793L8.854 5.854a.5.5 0 11-.708-.708L11.293 2H10.5a.5.5 0 01-.5-.5zM12.5 10a.5.5 0 01.5.5v2a.5.5 0 01-.5.5h-2a.5.5 0 010-1h.793L8.146 8.854a.5.5 0 11.708-.708L12 11.293V10.5a.5.5 0 01.5-.5zM2 11.293V10.5a.5.5 0 00-1 0v2a.5.5 0 00.5.5h2a.5.5 0 000-1h-.793l3.147-3.146a.5.5 0 10-.708-.708L2 11.293z",
- fill: color2
- }
- )
- )), UnfoldIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M6.646.147l-1.5 1.5a.5.5 0 10.708.707l.646-.647V5a.5.5 0 001 0V1.707l.646.647a.5.5 0 10.708-.707l-1.5-1.5a.5.5 0 00-.708 0z",
- fill: color2
- }
- ),
- React255.createElement(
- "path",
- {
- d: "M1.309 4.038a.498.498 0 00-.16.106l-.005.005a.498.498 0 00.002.705L3.293 7 1.146 9.146A.498.498 0 001.5 10h3a.5.5 0 000-1H2.707l1.5-1.5h5.586l2.353 2.354a.5.5 0 00.708-.708L10.707 7l2.146-2.146.11-.545-.107.542A.499.499 0 0013 4.503v-.006a.5.5 0 00-.144-.348l-.005-.005A.498.498 0 0012.5 4h-3a.5.5 0 000 1h1.793l-1.5 1.5H4.207L2.707 5H4.5a.5.5 0 000-1h-3a.498.498 0 00-.191.038z",
- fill: color2
- }
- ),
- React255.createElement(
- "path",
- {
- d: "M7 8.5a.5.5 0 01.5.5v3.293l.646-.647a.5.5 0 01.708.708l-1.5 1.5a.5.5 0 01-.708 0l-1.5-1.5a.5.5 0 01.708-.708l.646.647V9a.5.5 0 01.5-.5zM9 9.5a.5.5 0 01.5-.5h3a.5.5 0 010 1h-3a.5.5 0 01-.5-.5z",
- fill: color2
- }
- )
- )), TransferIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M10.646 2.646a.5.5 0 01.708 0l1.5 1.5a.5.5 0 010 .708l-1.5 1.5a.5.5 0 01-.708-.708L11.293 5H1.5a.5.5 0 010-1h9.793l-.647-.646a.5.5 0 010-.708zM3.354 8.354L2.707 9H12.5a.5.5 0 010 1H2.707l.647.646a.5.5 0 01-.708.708l-1.5-1.5a.5.5 0 010-.708l1.5-1.5a.5.5 0 11.708.708z",
- fill: color2
- }
- )
- )), RedirectIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M1.5 1a.5.5 0 01.5.5V10a2 2 0 004 0V4a3 3 0 016 0v7.793l1.146-1.147a.5.5 0 01.708.708l-2 2a.5.5 0 01-.708 0l-2-2a.5.5 0 01.708-.708L11 11.793V4a2 2 0 10-4 0v6.002a3 3 0 01-6 0V1.5a.5.5 0 01.5-.5z",
- fill: color2
- }
- )
- )), UndoIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M1.146 3.854a.5.5 0 010-.708l2-2a.5.5 0 11.708.708L2.707 3h6.295A4 4 0 019 11H3a.5.5 0 010-1h6a3 3 0 100-6H2.707l1.147 1.146a.5.5 0 11-.708.708l-2-2z",
- fill: color2
- }
- )
- )), ReplyIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M4.354 2.146a.5.5 0 010 .708L1.707 5.5H9.5A4.5 4.5 0 0114 10v1.5a.5.5 0 01-1 0V10a3.5 3.5 0 00-3.5-3.5H1.707l2.647 2.646a.5.5 0 11-.708.708l-3.5-3.5a.5.5 0 010-.708l3.5-3.5a.5.5 0 01.708 0z",
- fill: color2
- }
- )
- )), SyncIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M5.5 1A.5.5 0 005 .5H2a.5.5 0 000 1h1.535a6.502 6.502 0 002.383 11.91.5.5 0 10.165-.986A5.502 5.502 0 014.5 2.1V4a.5.5 0 001 0V1.353a.5.5 0 000-.023V1zM7.507 1a.5.5 0 01.576-.41 6.502 6.502 0 012.383 11.91H12a.5.5 0 010 1H9a.5.5 0 01-.5-.5v-3a.5.5 0 011 0v1.9A5.5 5.5 0 007.917 1.576.5.5 0 017.507 1z",
- fill: color2
- }
- )
- )), UploadIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M8.646 5.854L7.5 4.707V10.5a.5.5 0 01-1 0V4.707L5.354 5.854a.5.5 0 11-.708-.708l2-2a.5.5 0 01.708 0l2 2a.5.5 0 11-.708.708z",
- fill: color2
- }
- ),
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M14 7A7 7 0 110 7a7 7 0 0114 0zm-1 0A6 6 0 111 7a6 6 0 0112 0z",
- fill: color2
- }
- )
- )), DownloadIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M5.354 8.146L6.5 9.293V3.5a.5.5 0 011 0v5.793l1.146-1.147a.5.5 0 11.708.708l-2 2a.5.5 0 01-.708 0l-2-2a.5.5 0 11.708-.708z",
- fill: color2
- }
- ),
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M0 7a7 7 0 1114 0A7 7 0 010 7zm1 0a6 6 0 1112 0A6 6 0 011 7z",
- fill: color2
- }
- )
- )), BackIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M5.854 5.354L4.707 6.5H10.5a.5.5 0 010 1H4.707l1.147 1.146a.5.5 0 11-.708.708l-2-2a.5.5 0 010-.708l2-2a.5.5 0 11.708.708z",
- fill: color2
- }
- ),
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M7 0a7 7 0 110 14A7 7 0 017 0zm0 1a6 6 0 110 12A6 6 0 017 1z",
- fill: color2
- }
- )
- )), ProceedIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M3.5 6.5h5.793L8.146 5.354a.5.5 0 11.708-.708l2 2a.5.5 0 010 .708l-2 2a.5.5 0 11-.708-.708L9.293 7.5H3.5a.5.5 0 010-1z",
- fill: color2
- }
- ),
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M7 14A7 7 0 117 0a7 7 0 010 14zm0-1A6 6 0 117 1a6 6 0 010 12z",
- fill: color2
- }
- )
- )), RefreshIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M7.092.5H7a6.5 6.5 0 106.41 7.583.5.5 0 10-.986-.166A5.495 5.495 0 017 12.5a5.5 5.5 0 010-11h.006a5.5 5.5 0 014.894 3H10a.5.5 0 000 1h3a.5.5 0 00.5-.5V2a.5.5 0 00-1 0v1.535A6.495 6.495 0 007.092.5z",
- fill: color2
- }
- )
- )), GlobeIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M14 7A7 7 0 100 7a7 7 0 0014 0zm-6.535 5.738c-.233.23-.389.262-.465.262-.076 0-.232-.032-.465-.262-.238-.234-.497-.623-.737-1.182-.434-1.012-.738-2.433-.79-4.056h3.984c-.052 1.623-.356 3.043-.79 4.056-.24.56-.5.948-.737 1.182zM8.992 6.5H5.008c.052-1.623.356-3.044.79-4.056.24-.56.5-.948.737-1.182C6.768 1.032 6.924 1 7 1c.076 0 .232.032.465.262.238.234.497.623.737 1.182.434 1.012.738 2.433.79 4.056zm1 1c-.065 2.176-.558 4.078-1.282 5.253A6.005 6.005 0 0012.98 7.5H9.992zm2.987-1H9.992c-.065-2.176-.558-4.078-1.282-5.253A6.005 6.005 0 0112.98 6.5zm-8.971 0c.065-2.176.558-4.078 1.282-5.253A6.005 6.005 0 001.02 6.5h2.988zm-2.987 1a6.005 6.005 0 004.27 5.253C4.565 11.578 4.072 9.676 4.007 7.5H1.02z",
- fill: color2
- }
- )
- )), CompassIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M10.087 3.397L5.95 5.793a.374.374 0 00-.109.095.377.377 0 00-.036.052l-2.407 4.147a.374.374 0 00-.004.384c.104.179.334.24.513.136l4.142-2.404a.373.373 0 00.148-.143l2.406-4.146a.373.373 0 00-.037-.443.373.373 0 00-.478-.074zM4.75 9.25l2.847-1.652-1.195-1.195L4.75 9.25z",
- fill: color2
- }
- ),
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M14 7A7 7 0 110 7a7 7 0 0114 0zm-1 0A6 6 0 111 7a6 6 0 0112 0z",
- fill: color2
- }
- )
- )), LocationIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M0 7a7 7 0 1114 0A7 7 0 010 7zm6.5 3.5v2.48A6.001 6.001 0 011.02 7.5H3.5a.5.5 0 000-1H1.02A6.001 6.001 0 016.5 1.02V3.5a.5.5 0 001 0V1.02a6.001 6.001 0 015.48 5.48H10.5a.5.5 0 000 1h2.48a6.002 6.002 0 01-5.48 5.48V10.5a.5.5 0 00-1 0z",
- fill: color2
- }
- )
- )), PinIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M9 5a2 2 0 11-4 0 2 2 0 014 0zM8 5a1 1 0 11-2 0 1 1 0 012 0z",
- fill: color2
- }
- ),
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M12 5A5 5 0 002 5c0 2.633 2.273 6.154 4.65 8.643.192.2.508.2.7 0C9.726 11.153 12 7.633 12 5zM7 1a4 4 0 014 4c0 1.062-.471 2.42-1.303 3.88-.729 1.282-1.69 2.562-2.697 3.67-1.008-1.108-1.968-2.388-2.697-3.67C3.47 7.42 3 6.063 3 5a4 4 0 014-4z",
- fill: color2
- }
- )
- )), TimeIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M7 2a.5.5 0 01.5.5v4H10a.5.5 0 010 1H7a.5.5 0 01-.5-.5V2.5A.5.5 0 017 2z",
- fill: color2
- }
- ),
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M7 14A7 7 0 107 0a7 7 0 000 14zm0-1A6 6 0 107 1a6 6 0 000 12z",
- fill: color2
- }
- )
- )), DashboardIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M9.79 4.093a.5.5 0 01.117.698L7.91 7.586a1 1 0 11-.814-.581l1.997-2.796a.5.5 0 01.698-.116z",
- fill: color2
- }
- ),
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M2.069 12.968a7 7 0 119.863 0A12.962 12.962 0 007 12c-1.746 0-3.41.344-4.931.968zm9.582-1.177a6 6 0 10-9.301 0A13.98 13.98 0 017 11c1.629 0 3.194.279 4.65.791z",
- fill: color2
- }
- )
- )), TimerIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement("path", { d: "M7.5 4.5a.5.5 0 00-1 0v2.634a1 1 0 101 0V4.5z", fill: color2 }),
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M5.5.5A.5.5 0 016 0h2a.5.5 0 010 1h-.5v1.02a5.973 5.973 0 013.374 1.398l.772-.772a.5.5 0 01.708.708l-.772.772A6 6 0 116.5 2.02V1H6a.5.5 0 01-.5-.5zM7 3a5 5 0 100 10A5 5 0 007 3z",
- fill: color2
- }
- )
- )), HomeIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M7.354 1.146l5.5 5.5a.5.5 0 01-.708.708L12 7.207V12.5a.5.5 0 01-.5.5h-3a.5.5 0 01-.5-.5V9H6v3.5a.5.5 0 01-.5.5h-3a.5.5 0 01-.5-.5V7.207l-.146.147a.5.5 0 11-.708-.708l1-1 4.5-4.5a.5.5 0 01.708 0zM3 6.207V12h2V8.5a.5.5 0 01.5-.5h3a.5.5 0 01.5.5V12h2V6.207l-4-4-4 4z",
- fill: color2
- }
- )
- )), AdminIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M1.213 4.094a.5.5 0 01.056-.034l5.484-2.995a.498.498 0 01.494 0L12.73 4.06a.507.507 0 01.266.389.498.498 0 01-.507.555H1.51a.5.5 0 01-.297-.91zm2.246-.09h7.082L7 2.07 3.459 4.004z",
- fill: color2
- }
- ),
- React255.createElement(
- "path",
- {
- d: "M4 6a.5.5 0 00-1 0v5a.5.5 0 001 0V6zM11 6a.5.5 0 00-1 0v5a.5.5 0 001 0V6zM5.75 5.5a.5.5 0 01.5.5v5a.5.5 0 01-1 0V6a.5.5 0 01.5-.5zM8.75 6a.5.5 0 00-1 0v5a.5.5 0 001 0V6zM1.5 12.504a.5.5 0 01.5-.5h10a.5.5 0 010 1H2a.5.5 0 01-.5-.5z",
- fill: color2
- }
- )
- )), DirectionIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement("g", { clipPath: "url(#prefix__clip0_1107_3594)" }, React255.createElement(
- "path",
- {
- d: "M11.451.537l.01 12.922L7.61 8.946a1.078 1.078 0 00-.731-.374L.965 8.087 11.45.537z",
- stroke: color2,
- strokeWidth: 1.077
- }
- )),
- React255.createElement("defs", null, React255.createElement("clipPath", { id: "prefix__clip0_1107_3594" }, React255.createElement("path", { fill: "#fff", d: "M0 0h14v14H0z" })))
- )), UserIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M14 7A7 7 0 110 7a7 7 0 0114 0zM2.671 11.155c.696-1.006 2.602-1.816 3.194-1.91.226-.036.232-.658.232-.658s-.665-.658-.81-1.544c-.39 0-.63-.94-.241-1.272a2.578 2.578 0 00-.012-.13c-.066-.607-.28-2.606 1.965-2.606 2.246 0 2.031 2 1.966 2.606l-.012.13c.39.331.149 1.272-.24 1.272-.146.886-.81 1.544-.81 1.544s.004.622.23.658c.593.094 2.5.904 3.195 1.91a6 6 0 10-8.657 0z",
- fill: color2
- }
- )
- )), UserAltIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M7.275 13.16a11.388 11.388 0 005.175-1.232v-.25c0-1.566-3.237-2.994-4.104-3.132-.27-.043-.276-.783-.276-.783s.791-.783.964-1.836c.463 0 .75-1.119.286-1.513C9.34 4 9.916 1.16 6.997 1.16c-2.92 0-2.343 2.84-2.324 3.254-.463.394-.177 1.513.287 1.513.172 1.053.963 1.836.963 1.836s-.006.74-.275.783c-.858.136-4.036 1.536-4.103 3.082a11.388 11.388 0 005.73 1.532z",
- fill: color2
- }
- )
- )), UserAddIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M1.183 11.906a10.645 10.645 0 01-1.181-.589c.062-1.439 3.02-2.74 3.818-2.868.25-.04.256-.728.256-.728s-.736-.729-.896-1.709c-.432 0-.698-1.041-.267-1.408A2.853 2.853 0 002.9 4.46c-.072-.672-.31-2.884 2.175-2.884 2.486 0 2.248 2.212 2.176 2.884-.007.062-.012.112-.014.144.432.367.165 1.408-.266 1.408-.16.98-.896 1.709-.896 1.709s.005.688.256.728c.807.129 3.82 1.457 3.82 2.915v.233a10.598 10.598 0 01-4.816 1.146c-1.441 0-2.838-.282-4.152-.837zM11.5 2.16a.5.5 0 01.5.5v1.5h1.5a.5.5 0 010 1H12v1.5a.5.5 0 01-1 0v-1.5H9.5a.5.5 0 110-1H11v-1.5a.5.5 0 01.5-.5z",
- fill: color2
- }
- )
- )), UsersIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M9.21 11.623a10.586 10.586 0 01-4.031.787A10.585 10.585 0 010 11.07c.06-1.354 2.933-2.578 3.708-2.697.243-.038.249-.685.249-.685s-.715-.685-.87-1.607c-.42 0-.679-.979-.26-1.323a2.589 2.589 0 00-.013-.136c-.07-.632-.3-2.712 2.113-2.712 2.414 0 2.183 2.08 2.113 2.712-.007.059-.012.105-.013.136.419.344.16 1.323-.259 1.323-.156.922-.87 1.607-.87 1.607s.005.647.248.685c.784.12 3.71 1.37 3.71 2.74v.22c-.212.103-.427.2-.646.29z",
- fill: color2
- }
- ),
- React255.createElement(
- "path",
- {
- d: "M8.81 8.417a9.643 9.643 0 00-.736-.398c.61-.42 1.396-.71 1.7-.757.167-.026.171-.471.171-.471s-.491-.471-.598-1.104c-.288 0-.466-.674-.178-.91-.001-.022-.005-.053-.01-.094-.048-.434-.206-1.864 1.453-1.864 1.66 0 1.5 1.43 1.453 1.864l-.01.094c.289.236.11.91-.178.91-.107.633-.598 1.104-.598 1.104s.004.445.171.47c.539.084 2.55.942 2.55 1.884v.628a10.604 10.604 0 01-3.302.553 2.974 2.974 0 00-.576-.879c-.375-.408-.853-.754-1.312-1.03z",
- fill: color2
- }
- )
- )), ProfileIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M9.106 7.354c-.627.265-1.295.4-1.983.4a5.062 5.062 0 01-2.547-.681c.03-.688 1.443-1.31 1.824-1.37.12-.02.122-.348.122-.348s-.351-.348-.428-.816c-.206 0-.333-.498-.127-.673 0-.016-.003-.04-.007-.07C5.926 3.477 5.812 2.42 7 2.42c1.187 0 1.073 1.057 1.039 1.378l-.007.069c.207.175.08.673-.127.673-.076.468-.428.816-.428.816s.003.329.122.348c.386.06 1.825.696 1.825 1.392v.111c-.104.053-.21.102-.318.148zM3.75 11.25A.25.25 0 014 11h6a.25.25 0 110 .5H4a.25.25 0 01-.25-.25zM4 9a.25.25 0 000 .5h6a.25.25 0 100-.5H4z",
- fill: color2
- }
- ),
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M1 .5a.5.5 0 01.5-.5h11a.5.5 0 01.5.5v13a.5.5 0 01-.5.5h-11a.5.5 0 01-.5-.5V.5zM2 13V1h10v12H2z",
- fill: color2
- }
- )
- )), FaceHappyIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M3.968 8.75a.5.5 0 00-.866.5A4.498 4.498 0 007 11.5c1.666 0 3.12-.906 3.898-2.25a.5.5 0 10-.866-.5A3.498 3.498 0 017 10.5a3.498 3.498 0 01-3.032-1.75zM5.5 5a1 1 0 11-2 0 1 1 0 012 0zM9.5 6a1 1 0 100-2 1 1 0 000 2z",
- fill: color2
- }
- ),
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M14 7A7 7 0 110 7a7 7 0 0114 0zm-1 0A6 6 0 111 7a6 6 0 0112 0z",
- fill: color2
- }
- )
- )), FaceNeutralIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M4.5 9a.5.5 0 000 1h5a.5.5 0 000-1h-5zM5.5 5a1 1 0 11-2 0 1 1 0 012 0zM9.5 6a1 1 0 100-2 1 1 0 000 2z",
- fill: color2
- }
- ),
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M14 7A7 7 0 110 7a7 7 0 0114 0zm-1 0A6 6 0 111 7a6 6 0 0112 0z",
- fill: color2
- }
- )
- )), FaceSadIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M3.968 10.25a.5.5 0 01-.866-.5A4.498 4.498 0 017 7.5c1.666 0 3.12.906 3.898 2.25a.5.5 0 11-.866.5A3.498 3.498 0 007 8.5a3.498 3.498 0 00-3.032 1.75zM5.5 5a1 1 0 11-2 0 1 1 0 012 0zM9.5 6a1 1 0 100-2 1 1 0 000 2z",
- fill: color2
- }
- ),
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M14 7A7 7 0 110 7a7 7 0 0114 0zm-1 0A6 6 0 111 7a6 6 0 0112 0z",
- fill: color2
- }
- )
- )), AccessibilityIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- d: "M3.526 4.842a.5.5 0 01.632-.316l2.051.684a2.5 2.5 0 001.582 0l2.05-.684a.5.5 0 01.317.948l-2.453.818a.3.3 0 00-.205.285v.243a4.5 4.5 0 00.475 2.012l.972 1.944a.5.5 0 11-.894.448L7 9.118l-1.053 2.106a.5.5 0 11-.894-.447l.972-1.945A4.5 4.5 0 006.5 6.82v-.243a.3.3 0 00-.205-.285l-2.453-.818a.5.5 0 01-.316-.632z",
- fill: color2
- }
- ),
- React255.createElement("path", { d: "M7 4.5a1 1 0 100-2 1 1 0 000 2z", fill: color2 }),
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M7 14A7 7 0 107 0a7 7 0 000 14zm0-1A6 6 0 107 1a6 6 0 000 12z",
- fill: color2
- }
- )
- )), AccessibilityAltIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M7 14A7 7 0 107 0a7 7 0 000 14zM8 3.5a1 1 0 11-2 0 1 1 0 012 0zM3.526 4.842a.5.5 0 01.632-.316l2.051.684a2.5 2.5 0 001.582 0l2.05-.684a.5.5 0 01.317.948l-2.453.818a.3.3 0 00-.205.285v.243a4.5 4.5 0 00.475 2.012l.972 1.944a.5.5 0 11-.894.448L7 9.118l-1.053 2.106a.5.5 0 11-.894-.447l.972-1.945A4.5 4.5 0 006.5 6.82v-.243a.3.3 0 00-.205-.285l-2.453-.818a.5.5 0 01-.316-.632z",
- fill: color2
- }
- )
- )), AccessibilityIgnoredIcon = React255.forwardRef(({ color: color2 = "currentColor", size = 14, ...props }, forwardedRef) => React255.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg",
- ref: forwardedRef,
- ...props
- },
- React255.createElement("g", { clipPath: "url(#prefix__clip0_2359_558)", fill: color2 }, React255.createElement("path", { d: "M7.636 13.972a7 7 0 116.335-6.335c-.28-.34-.609-.637-.976-.883a6 6 0 10-6.24 6.241c.245.367.542.696.881.977z" }), React255.createElement("path", { d: "M7.511 7.136a4.489 4.489 0 00-1.478 3.915l-.086.173a.5.5 0 11-.894-.447l.972-1.945A4.5 4.5 0 006.5 6.82v-.243a.3.3 0 00-.205-.285l-2.453-.818a.5.5 0 01.316-.948l2.051.684a2.5 2.5 0 001.582 0l2.05-.684a.5.5 0 01.317.948l-2.453.818a.3.3 0 00-.205.285v.243c0 .105.004.21.011.316z" }), React255.createElement("path", { d: "M8 3.5a1 1 0 11-2 0 1 1 0 012 0z" }), React255.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M14 10.5a3.5 3.5 0 11-7 0 3.5 3.5 0 017 0zm-5.5 0A.5.5 0 019 10h3a.5.5 0 010 1H9a.5.5 0 01-.5-.5z"
- }
- )),
- React255.createElement("defs", null, React255.createElement("clipPath", { id: "prefix__clip0_2359_558" }, React255.createElement("path", { fill: "#fff", d: "M0 0h14v14H0z" })))
- ));
-
- // src/components/components/typography/link/link.tsx
- init_polished_esm();
- init_theming();
- var LEFT_BUTTON = 0, isPlainLeftClick = (e) => e.button === LEFT_BUTTON && !e.altKey && !e.ctrlKey && !e.metaKey && !e.shiftKey, cancelled = (e, cb) => {
- isPlainLeftClick(e) && (e.preventDefault(), cb(e));
- }, LinkInner = styled.span(
- ({ withArrow }) => withArrow ? {
- "> svg:last-of-type": {
- height: "0.7em",
- width: "0.7em",
- marginRight: 0,
- marginLeft: "0.25em",
- bottom: "auto",
- verticalAlign: "inherit"
- }
- } : {},
- ({ containsIcon }) => containsIcon ? {
- svg: {
- height: "1em",
- width: "1em",
- verticalAlign: "middle",
- position: "relative",
- bottom: 0,
- marginRight: 0
- }
- } : {}
- ), A2 = styled.a(
- ({ theme: theme3 }) => ({
- display: "inline-block",
- transition: "all 150ms ease-out",
- textDecoration: "none",
- color: theme3.color.secondary,
- "&:hover, &:focus": {
- cursor: "pointer",
- color: curriedDarken$1(0.07, theme3.color.secondary),
- "svg path:not([fill])": {
- fill: curriedDarken$1(0.07, theme3.color.secondary)
- }
- },
- "&:active": {
- color: curriedDarken$1(0.1, theme3.color.secondary),
- "svg path:not([fill])": {
- fill: curriedDarken$1(0.1, theme3.color.secondary)
- }
- },
- svg: {
- display: "inline-block",
- height: "1em",
- width: "1em",
- verticalAlign: "text-top",
- position: "relative",
- bottom: "-0.125em",
- marginRight: "0.4em",
- "& path": {
- fill: theme3.color.secondary
- }
- }
- }),
- ({ theme: theme3, secondary, tertiary }) => {
- let colors3;
- return secondary && (colors3 = [theme3.textMutedColor, theme3.color.secondary, theme3.color.secondary]), tertiary && (colors3 = [theme3.color.dark, theme3.color.secondary, theme3.color.secondary]), colors3 ? {
- color: colors3[0],
- "svg path:not([fill])": {
- fill: colors3[0]
- },
- "&:hover": {
- color: colors3[1],
- "svg path:not([fill])": {
- fill: colors3[1]
- }
- },
- "&:active": {
- color: colors3[2],
- "svg path:not([fill])": {
- fill: colors3[2]
- }
- }
- } : {};
- },
- ({ nochrome }) => nochrome ? {
- color: "inherit",
- "&:hover, &:active": {
- color: "inherit",
- textDecoration: "underline"
- }
- } : {},
- ({ theme: theme3, inverse }) => inverse ? {
- color: theme3.color.lightest,
- ":not([fill])": {
- fill: theme3.color.lightest
- },
- "&:hover": {
- color: theme3.color.lighter,
- "svg path:not([fill])": {
- fill: theme3.color.lighter
- }
- },
- "&:active": {
- color: theme3.color.light,
- "svg path:not([fill])": {
- fill: theme3.color.light
- }
- }
- } : {},
- ({ isButton: isButton2, theme: theme3 }) => isButton2 ? {
- border: 0,
- borderRadius: theme3.input.borderRadius,
- background: "none",
- padding: 0,
- fontSize: "inherit",
- lineHeight: "inherit",
- "&:focus-visible": {
- outline: `2px solid ${theme3.color.secondary}`,
- outlineOffset: 2,
- // Should ensure focus outline gets drawn above next sibling
- zIndex: "1"
- }
- } : {}
- ), Link2 = (0, import_react18.forwardRef)(
- ({
- cancel = !0,
- children,
- onClick = void 0,
- withArrow = !1,
- containsIcon = !1,
- className = void 0,
- isButton: isButton2 = void 0,
- href,
- ...rest
- }, ref) => (isButton2 !== void 0 && deprecate(
- "Link: `isButton` is deprecated and will be removed in Storybook 11. Links without a `href` are automatically rendered as buttons."
- ), import_react18.default.createElement(
- A2,
- {
- as: href ? "a" : "button",
- href,
- ...rest,
- ref,
- isButton: !href || isButton2 === !0,
- onClick: onClick && cancel ? (e) => cancelled(e, onClick) : onClick,
- className
- },
- import_react18.default.createElement(LinkInner, { withArrow, containsIcon }, children, withArrow && import_react18.default.createElement(ChevronRightIcon, null))
- ))
- );
- Link2.displayName = "Link";
-
- // src/components/components/typography/DocumentWrapper.tsx
- init_theming();
- var DocumentWrapper = styled.div(({ theme: theme3 }) => ({
- fontSize: `${theme3.typography.size.s2}px`,
- lineHeight: "1.6",
- h1: {
- fontSize: `${theme3.typography.size.l1}px`,
- fontWeight: theme3.typography.weight.bold
- },
- h2: {
- fontSize: `${theme3.typography.size.m2}px`,
- borderBottom: `1px solid ${theme3.appBorderColor}`
- },
- h3: {
- fontSize: `${theme3.typography.size.m1}px`
- },
- h4: {
- fontSize: `${theme3.typography.size.s3}px`
- },
- h5: {
- fontSize: `${theme3.typography.size.s2}px`
- },
- h6: {
- fontSize: `${theme3.typography.size.s2}px`,
- color: theme3.color.dark
- },
- "pre:not(.prismjs)": {
- background: "transparent",
- border: "none",
- borderRadius: 0,
- padding: 0,
- margin: 0
- },
- "pre pre, pre.prismjs": {
- padding: 15,
- margin: 0,
- whiteSpace: "pre-wrap",
- color: "inherit",
- fontSize: "13px",
- lineHeight: "19px"
- },
- "pre pre code, pre.prismjs code": {
- color: "inherit",
- fontSize: "inherit"
- },
- "pre code": {
- margin: 0,
- padding: 0,
- whiteSpace: "pre",
- border: "none",
- background: "transparent"
- },
- "pre code, pre tt": {
- backgroundColor: "transparent",
- border: "none"
- },
- /* GitHub inspired Markdown styles loosely from https://gist.github.com/tuzz/3331384 */
- "body > *:first-of-type": {
- marginTop: "0 !important"
- },
- "body > *:last-child": {
- marginBottom: "0 !important"
- },
- a: {
- color: theme3.color.secondary,
- // Ensure WCAG Level A compliance (SC 1.4.1), see https://www.w3.org/WAI/WCAG22/Techniques/failures/F73
- textDecoration: "underline",
- textDecorationThickness: "0.03125rem",
- textUnderlineOffset: "0.11em",
- "& code": {
- color: "inherit",
- textDecoration: "underline",
- textDecorationThickness: "0.03125rem",
- paddingLeft: 0,
- paddingRight: 0,
- "&::before": {
- content: '"\\00a0"',
- fontSize: "0.5em"
- },
- "&::after": {
- content: '"\\00a0"',
- fontSize: "0.5em"
- }
- }
- },
- "a.absent": {
- color: "#cc0000"
- },
- "a.anchor": {
- display: "block",
- paddingLeft: 30,
- marginLeft: -30,
- cursor: "pointer",
- position: "absolute",
- top: 0,
- left: 0,
- bottom: 0,
- textDecoration: "none"
- },
- "&.anchor:hover, &.anchor:focus": {
- textDecoration: "underline"
- },
- "h1, h2, h3, h4, h5, h6": {
- margin: "20px 0 10px",
- padding: 0,
- cursor: "text",
- position: "relative",
- "&:first-of-type": {
- marginTop: 0,
- paddingTop: 0
- },
- "&:hover a.anchor": {
- textDecoration: "none"
- },
- "& tt, & code": {
- fontSize: "inherit"
- }
- },
- "h1:first-of-type + h2": {
- marginTop: 0,
- paddingTop: 0
- },
- "p, blockquote, ul, ol, dl, li, table, pre": {
- margin: "15px 0"
- },
- hr: {
- border: "0 none",
- borderTop: `1px solid ${theme3.appBorderColor}`,
- height: 4,
- padding: 0
- },
- "body > h1:first-of-type, body > h2:first-of-type, body > h3:first-of-type, body > h4:first-of-type, body > h5:first-of-type, body > h6:first-of-type": {
- marginTop: 0,
- paddingTop: 0
- },
- "body > h1:first-of-type + h2": {
- marginTop: 0,
- paddingTop: 0
- },
- "a:first-of-type h1, a:first-of-type h2, a:first-of-type h3, a:first-of-type h4, a:first-of-type h5, a:first-of-type h6": {
- marginTop: 0,
- paddingTop: 0
- },
- "h1 p, h2 p, h3 p, h4 p, h5 p, h6 p": {
- marginTop: 0
- },
- "li p.first": {
- display: "inline-block"
- },
- "ul, ol": {
- paddingLeft: 30,
- "& :first-of-type": {
- marginTop: 0
- },
- "& :last-child": {
- marginBottom: 0
- }
- },
- dl: {
- padding: 0
- },
- "dl dt": {
- fontSize: "14px",
- fontWeight: "bold",
- fontStyle: "italic",
- margin: "0 0 15px",
- padding: "0 15px",
- "&:first-of-type": {
- padding: 0
- },
- "& > :first-of-type": {
- marginTop: 0
- },
- "& > :last-child": {
- marginBottom: 0
- }
- },
- blockquote: {
- borderLeft: `4px solid ${theme3.color.medium}`,
- padding: "0 15px",
- color: theme3.color.dark,
- "& > :first-of-type": {
- marginTop: 0
- },
- "& > :last-child": {
- marginBottom: 0
- }
- },
- table: {
- padding: 0,
- borderCollapse: "collapse",
- "& tr": {
- borderTop: `1px solid ${theme3.appBorderColor}`,
- backgroundColor: "white",
- margin: 0,
- padding: 0,
- "& th": {
- fontWeight: "bold",
- border: `1px solid ${theme3.appBorderColor}`,
- textAlign: "left",
- margin: 0,
- padding: "6px 13px"
- },
- "& td": {
- border: `1px solid ${theme3.appBorderColor}`,
- textAlign: "left",
- margin: 0,
- padding: "6px 13px"
- },
- "&:nth-of-type(2n)": {
- backgroundColor: theme3.color.lighter
- },
- "& th :first-of-type, & td :first-of-type": {
- marginTop: 0
- },
- "& th :last-child, & td :last-child": {
- marginBottom: 0
- }
- }
- },
- img: {
- maxWidth: "100%"
- },
- "span.frame": {
- display: "block",
- overflow: "hidden",
- "& > span": {
- border: `1px solid ${theme3.color.medium}`,
- display: "block",
- float: "left",
- overflow: "hidden",
- margin: "13px 0 0",
- padding: 7,
- width: "auto"
- },
- "& span img": {
- display: "block",
- float: "left"
- },
- "& span span": {
- clear: "both",
- color: theme3.color.darkest,
- display: "block",
- padding: "5px 0 0"
- }
- },
- "span.align-center": {
- display: "block",
- overflow: "hidden",
- clear: "both",
- "& > span": {
- display: "block",
- overflow: "hidden",
- margin: "13px auto 0",
- textAlign: "center"
- },
- "& span img": {
- margin: "0 auto",
- textAlign: "center"
- }
- },
- "span.align-right": {
- display: "block",
- overflow: "hidden",
- clear: "both",
- "& > span": {
- display: "block",
- overflow: "hidden",
- margin: "13px 0 0",
- textAlign: "right"
- },
- "& span img": {
- margin: 0,
- textAlign: "right"
- }
- },
- "span.float-left": {
- display: "block",
- marginRight: 13,
- overflow: "hidden",
- float: "left",
- "& span": {
- margin: "13px 0 0"
- }
- },
- "span.float-right": {
- display: "block",
- marginLeft: 13,
- overflow: "hidden",
- float: "right",
- "& > span": {
- display: "block",
- overflow: "hidden",
- margin: "13px auto 0",
- textAlign: "right"
- }
- },
- "code, tt": {
- margin: "0 2px",
- padding: "0 5px",
- whiteSpace: "nowrap",
- border: `1px solid ${theme3.color.mediumlight}`,
- backgroundColor: theme3.color.lighter,
- borderRadius: 3,
- color: theme3.base === "dark" ? theme3.color.darkest : theme3.color.dark
- }
- }));
-
- // src/components/components/syntaxhighlighter/clipboard.ts
- init_dist();
- var { document: document3, window: globalWindow2 } = scope;
- async function copyUsingClipboardAPI(text) {
- try {
- await globalWindow2.top?.navigator.clipboard.writeText(text);
- } catch {
- await globalWindow2.navigator.clipboard.writeText(text);
- }
- }
- async function copyUsingWorkAround(text) {
- let tmp = document3.createElement("TEXTAREA"), focus = document3.activeElement;
- tmp.value = text, document3.body.appendChild(tmp), tmp.select(), document3.execCommand("copy"), document3.body.removeChild(tmp), focus.focus();
- }
- function createCopyToClipboardFunction() {
- return globalWindow2.navigator?.clipboard ? copyUsingClipboardAPI : copyUsingWorkAround;
- }
-
- // src/components/index.ts
- init_ActionBar();
-
- // src/components/components/ActionList/ActionList.tsx
- var import_react96 = __toESM(require_react(), 1);
- init_polished_esm();
- init_theming();
-
- // src/components/components/Button/Button.tsx
- var import_react94 = __toESM(require_react(), 1);
- init_client_logger();
-
- // ../../node_modules/@radix-ui/react-slot/dist/index.mjs
- var React28 = __toESM(require_react(), 1);
-
- // ../../node_modules/@radix-ui/react-slot/node_modules/@radix-ui/react-compose-refs/dist/index.mjs
- var React27 = __toESM(require_react(), 1);
- function setRef2(ref, value) {
- if (typeof ref == "function")
- return ref(value);
- ref != null && (ref.current = value);
- }
- function composeRefs2(...refs) {
- return (node2) => {
- let hasCleanup = !1, cleanups = refs.map((ref) => {
- let cleanup = setRef2(ref, node2);
- return !hasCleanup && typeof cleanup == "function" && (hasCleanup = !0), cleanup;
- });
- if (hasCleanup)
- return () => {
- for (let i = 0; i < cleanups.length; i++) {
- let cleanup = cleanups[i];
- typeof cleanup == "function" ? cleanup() : setRef2(refs[i], null);
- }
- };
- };
- }
-
- // ../../node_modules/@radix-ui/react-slot/dist/index.mjs
- var import_jsx_runtime6 = __toESM(require_jsx_runtime(), 1), REACT_LAZY_TYPE = Symbol.for("react.lazy"), use = React28[" use ".trim().toString()];
- function isPromiseLike(value) {
- return typeof value == "object" && value !== null && "then" in value;
- }
- function isLazyComponent(element) {
- return element != null && typeof element == "object" && "$$typeof" in element && element.$$typeof === REACT_LAZY_TYPE && "_payload" in element && isPromiseLike(element._payload);
- }
- function createSlot(ownerName) {
- let SlotClone2 = createSlotClone(ownerName), Slot22 = React28.forwardRef((props, forwardedRef) => {
- let { children, ...slotProps } = props;
- isLazyComponent(children) && typeof use == "function" && (children = use(children._payload));
- let childrenArray = React28.Children.toArray(children), slottable = childrenArray.find(isSlottable2);
- if (slottable) {
- let newElement = slottable.props.children, newChildren = childrenArray.map((child) => child === slottable ? React28.Children.count(newElement) > 1 ? React28.Children.only(null) : React28.isValidElement(newElement) ? newElement.props.children : null : child);
- return (0, import_jsx_runtime6.jsx)(SlotClone2, { ...slotProps, ref: forwardedRef, children: React28.isValidElement(newElement) ? React28.cloneElement(newElement, void 0, newChildren) : null });
- }
- return (0, import_jsx_runtime6.jsx)(SlotClone2, { ...slotProps, ref: forwardedRef, children });
- });
- return Slot22.displayName = `${ownerName}.Slot`, Slot22;
- }
- var Slot2 = createSlot("Slot");
- function createSlotClone(ownerName) {
- let SlotClone2 = React28.forwardRef((props, forwardedRef) => {
- let { children, ...slotProps } = props;
- if (isLazyComponent(children) && typeof use == "function" && (children = use(children._payload)), React28.isValidElement(children)) {
- let childrenRef = getElementRef3(children), props2 = mergeProps2(slotProps, children.props);
- return children.type !== React28.Fragment && (props2.ref = forwardedRef ? composeRefs2(forwardedRef, childrenRef) : childrenRef), React28.cloneElement(children, props2);
- }
- return React28.Children.count(children) > 1 ? React28.Children.only(null) : null;
- });
- return SlotClone2.displayName = `${ownerName}.SlotClone`, SlotClone2;
- }
- var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
- function createSlottable(ownerName) {
- let Slottable22 = ({ children }) => (0, import_jsx_runtime6.jsx)(import_jsx_runtime6.Fragment, { children });
- return Slottable22.displayName = `${ownerName}.Slottable`, Slottable22.__radixId = SLOTTABLE_IDENTIFIER, Slottable22;
- }
- var Slottable2 = createSlottable("Slottable");
- function isSlottable2(child) {
- return React28.isValidElement(child) && typeof child.type == "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
- }
- function mergeProps2(slotProps, childProps) {
- let overrideProps = { ...childProps };
- for (let propName in childProps) {
- let slotPropValue = slotProps[propName], childPropValue = childProps[propName];
- /^on[A-Z]/.test(propName) ? slotPropValue && childPropValue ? overrideProps[propName] = (...args) => {
- let result = childPropValue(...args);
- return slotPropValue(...args), result;
- } : slotPropValue && (overrideProps[propName] = slotPropValue) : propName === "style" ? overrideProps[propName] = { ...slotPropValue, ...childPropValue } : propName === "className" && (overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" "));
- }
- return { ...slotProps, ...overrideProps };
- }
- function getElementRef3(element) {
- let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get, mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
- return mayWarn ? element.ref : (getter = Object.getOwnPropertyDescriptor(element, "ref")?.get, mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning, mayWarn ? element.props.ref : element.props.ref || element.ref);
- }
-
- // src/components/components/Button/Button.tsx
- init_polished_esm();
-
- // src/manager-api/index.ts
- var manager_api_exports = {};
- __export(manager_api_exports, {
- ActiveTabs: () => ActiveTabs2,
- Consumer: () => ManagerConsumer,
- ManagerContext: () => ManagerContext,
- Provider: () => ManagerProvider,
- RequestResponseError: () => RequestResponseError,
- Tag: () => Tag,
- addons: () => addons,
- combineParameters: () => combineParameters2,
- controlOrMetaKey: () => controlOrMetaKey,
- controlOrMetaSymbol: () => controlOrMetaSymbol,
- eventMatchesShortcut: () => eventMatchesShortcut,
- eventToShortcut: () => eventToShortcut,
- experimental_MockUniversalStore: () => MockUniversalStore,
- experimental_UniversalStore: () => UniversalStore,
- experimental_getStatusStore: () => getStatusStoreByTypeId,
- experimental_getTestProviderStore: () => getTestProviderStoreById,
- experimental_requestResponse: () => experimental_requestResponse,
- experimental_useStatusStore: () => useStatusStore,
- experimental_useTestProviderStore: () => useTestProviderStore,
- experimental_useUniversalStore: () => useUniversalStore,
- internal_checklistStore: () => checklistStore,
- internal_fullStatusStore: () => fullStatusStore,
- internal_fullTestProviderStore: () => fullTestProviderStore,
- internal_universalChecklistStore: () => universalChecklistStore,
- internal_universalStatusStore: () => universalStatusStore,
- internal_universalTestProviderStore: () => universalTestProviderStore,
- isMacLike: () => isMacLike,
- isShortcutTaken: () => isShortcutTaken,
- keyToSymbol: () => keyToSymbol,
- merge: () => merge_default,
- mockChannel: () => mockChannel,
- optionOrAltSymbol: () => optionOrAltSymbol,
- shortcutMatchesShortcut: () => shortcutMatchesShortcut,
- shortcutToAriaKeyshortcuts: () => shortcutToAriaKeyshortcuts,
- shortcutToHumanString: () => shortcutToHumanString,
- types: () => typesX,
- useAddonState: () => useAddonState,
- useArgTypes: () => useArgTypes,
- useArgs: () => useArgs2,
- useChannel: () => useChannel2,
- useGlobalTypes: () => useGlobalTypes,
- useGlobals: () => useGlobals2,
- useParameter: () => useParameter2,
- useSharedState: () => useSharedState,
- useStoryPrepared: () => useStoryPrepared,
- useStorybookApi: () => useStorybookApi,
- useStorybookState: () => useStorybookState
- });
-
- // src/manager-api/root.tsx
- var import_react23 = __toESM(require_react(), 1);
-
- // ../../node_modules/es-toolkit/dist/predicate/isPlainObject.mjs
- function isPlainObject(value) {
- if (!value || typeof value != "object")
- return !1;
- let proto = Object.getPrototypeOf(value);
- return proto === null || proto === Object.prototype || Object.getPrototypeOf(proto) === null ? Object.prototype.toString.call(value) === "[object Object]" : !1;
- }
-
- // ../../node_modules/es-toolkit/dist/compat/_internal/getSymbols.mjs
- function getSymbols(object) {
- return Object.getOwnPropertySymbols(object).filter((symbol) => Object.prototype.propertyIsEnumerable.call(object, symbol));
- }
-
- // ../../node_modules/es-toolkit/dist/compat/_internal/getTag.mjs
- function getTag(value) {
- return value == null ? value === void 0 ? "[object Undefined]" : "[object Null]" : Object.prototype.toString.call(value);
- }
-
- // ../../node_modules/es-toolkit/dist/compat/_internal/tags.mjs
- var regexpTag = "[object RegExp]", stringTag = "[object String]", numberTag = "[object Number]", booleanTag = "[object Boolean]", argumentsTag = "[object Arguments]", symbolTag2 = "[object Symbol]", dateTag = "[object Date]", mapTag = "[object Map]", setTag = "[object Set]", arrayTag = "[object Array]", functionTag = "[object Function]", arrayBufferTag = "[object ArrayBuffer]", objectTag = "[object Object]", errorTag = "[object Error]", dataViewTag = "[object DataView]", uint8ArrayTag = "[object Uint8Array]", uint8ClampedArrayTag = "[object Uint8ClampedArray]", uint16ArrayTag = "[object Uint16Array]", uint32ArrayTag = "[object Uint32Array]", bigUint64ArrayTag = "[object BigUint64Array]", int8ArrayTag = "[object Int8Array]", int16ArrayTag = "[object Int16Array]", int32ArrayTag = "[object Int32Array]", bigInt64ArrayTag = "[object BigInt64Array]", float32ArrayTag = "[object Float32Array]", float64ArrayTag = "[object Float64Array]";
-
- // ../../node_modules/es-toolkit/dist/compat/util/eq.mjs
- function eq2(value, other) {
- return value === other || Number.isNaN(value) && Number.isNaN(other);
- }
-
- // ../../node_modules/es-toolkit/dist/predicate/isEqualWith.mjs
- function isEqualWith(a3, b, areValuesEqual) {
- return isEqualWithImpl(a3, b, void 0, void 0, void 0, void 0, areValuesEqual);
- }
- function isEqualWithImpl(a3, b, property, aParent, bParent, stack, areValuesEqual) {
- let result = areValuesEqual(a3, b, property, aParent, bParent, stack);
- if (result !== void 0)
- return result;
- if (typeof a3 == typeof b)
- switch (typeof a3) {
- case "bigint":
- case "string":
- case "boolean":
- case "symbol":
- case "undefined":
- return a3 === b;
- case "number":
- return a3 === b || Object.is(a3, b);
- case "function":
- return a3 === b;
- case "object":
- return areObjectsEqual(a3, b, stack, areValuesEqual);
- }
- return areObjectsEqual(a3, b, stack, areValuesEqual);
- }
- function areObjectsEqual(a3, b, stack, areValuesEqual) {
- if (Object.is(a3, b))
- return !0;
- let aTag = getTag(a3), bTag = getTag(b);
- if (aTag === argumentsTag && (aTag = objectTag), bTag === argumentsTag && (bTag = objectTag), aTag !== bTag)
- return !1;
- switch (aTag) {
- case stringTag:
- return a3.toString() === b.toString();
- case numberTag: {
- let x = a3.valueOf(), y = b.valueOf();
- return eq2(x, y);
- }
- case booleanTag:
- case dateTag:
- case symbolTag2:
- return Object.is(a3.valueOf(), b.valueOf());
- case regexpTag:
- return a3.source === b.source && a3.flags === b.flags;
- case functionTag:
- return a3 === b;
- }
- stack = stack ?? /* @__PURE__ */ new Map();
- let aStack = stack.get(a3), bStack = stack.get(b);
- if (aStack != null && bStack != null)
- return aStack === b;
- stack.set(a3, b), stack.set(b, a3);
- try {
- switch (aTag) {
- case mapTag: {
- if (a3.size !== b.size)
- return !1;
- for (let [key, value] of a3.entries())
- if (!b.has(key) || !isEqualWithImpl(value, b.get(key), key, a3, b, stack, areValuesEqual))
- return !1;
- return !0;
- }
- case setTag: {
- if (a3.size !== b.size)
- return !1;
- let aValues = Array.from(a3.values()), bValues = Array.from(b.values());
- for (let i = 0; i < aValues.length; i++) {
- let aValue = aValues[i], index4 = bValues.findIndex((bValue) => isEqualWithImpl(aValue, bValue, void 0, a3, b, stack, areValuesEqual));
- if (index4 === -1)
- return !1;
- bValues.splice(index4, 1);
- }
- return !0;
- }
- case arrayTag:
- case uint8ArrayTag:
- case uint8ClampedArrayTag:
- case uint16ArrayTag:
- case uint32ArrayTag:
- case bigUint64ArrayTag:
- case int8ArrayTag:
- case int16ArrayTag:
- case int32ArrayTag:
- case bigInt64ArrayTag:
- case float32ArrayTag:
- case float64ArrayTag: {
- if (typeof Buffer < "u" && Buffer.isBuffer(a3) !== Buffer.isBuffer(b) || a3.length !== b.length)
- return !1;
- for (let i = 0; i < a3.length; i++)
- if (!isEqualWithImpl(a3[i], b[i], i, a3, b, stack, areValuesEqual))
- return !1;
- return !0;
- }
- case arrayBufferTag:
- return a3.byteLength !== b.byteLength ? !1 : areObjectsEqual(new Uint8Array(a3), new Uint8Array(b), stack, areValuesEqual);
- case dataViewTag:
- return a3.byteLength !== b.byteLength || a3.byteOffset !== b.byteOffset ? !1 : areObjectsEqual(new Uint8Array(a3), new Uint8Array(b), stack, areValuesEqual);
- case errorTag:
- return a3.name === b.name && a3.message === b.message;
- case objectTag: {
- if (!(areObjectsEqual(a3.constructor, b.constructor, stack, areValuesEqual) || isPlainObject(a3) && isPlainObject(b)))
- return !1;
- let aKeys = [...Object.keys(a3), ...getSymbols(a3)], bKeys = [...Object.keys(b), ...getSymbols(b)];
- if (aKeys.length !== bKeys.length)
- return !1;
- for (let i = 0; i < aKeys.length; i++) {
- let propKey = aKeys[i], aProp = a3[propKey];
- if (!Object.hasOwn(b, propKey))
- return !1;
- let bProp = b[propKey];
- if (!isEqualWithImpl(aProp, bProp, propKey, a3, b, stack, areValuesEqual))
- return !1;
- }
- return !0;
- }
- default:
- return !1;
- }
- } finally {
- stack.delete(a3), stack.delete(b);
- }
- }
-
- // ../../node_modules/es-toolkit/dist/function/noop.mjs
- function noop() {
- }
-
- // ../../node_modules/es-toolkit/dist/predicate/isEqual.mjs
- function isEqual(a3, b) {
- return isEqualWith(a3, b, noop);
- }
-
- // ../../node_modules/es-toolkit/dist/predicate/isPrimitive.mjs
- function isPrimitive(value) {
- return value == null || typeof value != "object" && typeof value != "function";
- }
-
- // ../../node_modules/es-toolkit/dist/predicate/isTypedArray.mjs
- function isTypedArray(x) {
- return ArrayBuffer.isView(x) && !(x instanceof DataView);
- }
-
- // src/manager-api/context.ts
- var import_react19 = __toESM(require_react(), 1), createContext4 = ({ api, state: state3 }) => (0, import_react19.createContext)({ api, state: state3 });
-
- // src/manager-api/lib/merge.ts
- init_client_logger();
-
- // ../../node_modules/es-toolkit/dist/object/clone.mjs
- function clone(obj) {
- if (isPrimitive(obj))
- return obj;
- if (Array.isArray(obj) || isTypedArray(obj) || obj instanceof ArrayBuffer || typeof SharedArrayBuffer < "u" && obj instanceof SharedArrayBuffer)
- return obj.slice(0);
- let prototype = Object.getPrototypeOf(obj), Constructor = prototype.constructor;
- if (obj instanceof Date || obj instanceof Map || obj instanceof Set)
- return new Constructor(obj);
- if (obj instanceof RegExp) {
- let newRegExp = new Constructor(obj);
- return newRegExp.lastIndex = obj.lastIndex, newRegExp;
- }
- if (obj instanceof DataView)
- return new Constructor(obj.buffer.slice(0));
- if (obj instanceof Error) {
- let newError = new Constructor(obj.message);
- return newError.stack = obj.stack, newError.name = obj.name, newError.cause = obj.cause, newError;
- }
- if (typeof File < "u" && obj instanceof File)
- return new Constructor([obj], obj.name, { type: obj.type, lastModified: obj.lastModified });
- if (typeof obj == "object") {
- let newObject = Object.create(prototype);
- return Object.assign(newObject, obj);
- }
- return obj;
- }
-
- // ../../node_modules/es-toolkit/dist/object/mapValues.mjs
- function mapValues(object, getNewValue) {
- let result = {}, keys3 = Object.keys(object);
- for (let i = 0; i < keys3.length; i++) {
- let key = keys3[i], value = object[key];
- result[key] = getNewValue(value, key, object);
- }
- return result;
- }
-
- // ../../node_modules/es-toolkit/dist/_internal/isUnsafeProperty.mjs
- function isUnsafeProperty(key) {
- return key === "__proto__";
- }
-
- // ../../node_modules/es-toolkit/dist/object/mergeWith.mjs
- function mergeWith(target, source, merge3) {
- let sourceKeys = Object.keys(source);
- for (let i = 0; i < sourceKeys.length; i++) {
- let key = sourceKeys[i];
- if (isUnsafeProperty(key))
- continue;
- let sourceValue = source[key], targetValue = target[key], merged = merge3(targetValue, sourceValue, key, target, source);
- merged !== void 0 ? target[key] = merged : Array.isArray(sourceValue) ? Array.isArray(targetValue) ? target[key] = mergeWith(targetValue, sourceValue, merge3) : target[key] = mergeWith([], sourceValue, merge3) : isPlainObject(sourceValue) ? isPlainObject(targetValue) ? target[key] = mergeWith(targetValue, sourceValue, merge3) : target[key] = mergeWith({}, sourceValue, merge3) : (targetValue === void 0 || sourceValue !== void 0) && (target[key] = sourceValue);
- }
- return target;
- }
-
- // ../../node_modules/es-toolkit/dist/object/omit.mjs
- function omit(obj, keys3) {
- let result = { ...obj };
- for (let i = 0; i < keys3.length; i++) {
- let key = keys3[i];
- delete result[key];
- }
- return result;
- }
-
- // ../../node_modules/es-toolkit/dist/object/pick.mjs
- function pick(obj, keys3) {
- let result = {};
- for (let i = 0; i < keys3.length; i++) {
- let key = keys3[i];
- Object.hasOwn(obj, key) && (result[key] = obj[key]);
- }
- return result;
- }
-
- // ../../node_modules/es-toolkit/dist/object/pickBy.mjs
- function pickBy(obj, shouldPick) {
- let result = {}, keys3 = Object.keys(obj);
- for (let i = 0; i < keys3.length; i++) {
- let key = keys3[i], value = obj[key];
- shouldPick(value, key) && (result[key] = value);
- }
- return result;
- }
-
- // ../../node_modules/es-toolkit/dist/string/words.mjs
- var CASE_SPLIT_PATTERN = new RegExp("\\p{Lu}?\\p{Ll}+|[0-9]+|\\p{Lu}+(?!\\p{Ll})|\\p{Emoji_Presentation}|\\p{Extended_Pictographic}|\\p{L}+", "gu");
-
- // ../../node_modules/es-toolkit/dist/object/toMerged.mjs
- function toMerged(target, source) {
- return mergeWith(clone(target), source, function mergeRecursively(targetValue, sourceValue) {
- if (Array.isArray(sourceValue))
- return Array.isArray(targetValue) ? mergeWith(clone(targetValue), sourceValue, mergeRecursively) : mergeWith([], sourceValue, mergeRecursively);
- if (isPlainObject(sourceValue))
- return isPlainObject(targetValue) ? mergeWith(clone(targetValue), sourceValue, mergeRecursively) : mergeWith({}, sourceValue, mergeRecursively);
- });
- }
-
- // src/manager-api/lib/merge.ts
- var merge_default = (a3, ...b) => {
- let target = {};
- target = mergeWith(
- {},
- a3,
- (objValue, srcValue) => {
- if (Array.isArray(srcValue) && Array.isArray(objValue))
- return srcValue.forEach((s3) => {
- objValue.find((o) => o === s3 || isEqual(o, s3)) || objValue.push(s3);
- }), objValue;
- if (Array.isArray(objValue))
- return logger.log(["the types mismatch, picking", objValue]), objValue;
- }
- );
- for (let obj of b)
- target = mergeWith(target, obj, (objValue, srcValue) => {
- if (Array.isArray(srcValue) && Array.isArray(objValue))
- return srcValue.forEach((s3) => {
- objValue.find((o) => o === s3 || isEqual(o, s3)) || objValue.push(s3);
- }), objValue;
- if (Array.isArray(objValue))
- return logger.log(["the types mismatch, picking", objValue]), objValue;
- });
- return target;
- }, noArrayMerge = (a3, ...b) => {
- let target = {};
- target = mergeWith(
- {},
- a3,
- (objValue, srcValue) => {
- if (Array.isArray(srcValue))
- return srcValue;
- }
- );
- for (let obj of b)
- target = mergeWith(target, obj, (objValue, srcValue) => {
- if (Array.isArray(srcValue))
- return srcValue;
- });
- return target;
- };
-
- // src/manager-api/initial-state.ts
- var main = (...additions) => additions.reduce((acc, item) => merge_default(acc, item), {}), initial_state_default = main;
-
- // src/manager-api/lib/addons.ts
- init_client_logger();
-
- // src/types/index.ts
- var types_exports = {};
- __export(types_exports, {
- Addon_TypesEnum: () => Addon_TypesEnum,
- CHANGE_DETECTION_STATUS_TYPE_ID: () => CHANGE_DETECTION_STATUS_TYPE_ID,
- CoreWebpackCompiler: () => CoreWebpackCompiler,
- Feature: () => Feature,
- SupportedBuilder: () => SupportedBuilder,
- SupportedFramework: () => SupportedFramework,
- SupportedLanguage: () => SupportedLanguage,
- SupportedRenderer: () => SupportedRenderer
- });
-
- // src/types/modules/addons.ts
- var Addon_TypesEnum = /* @__PURE__ */ ((Addon_TypesEnum2) => (Addon_TypesEnum2.TAB = "tab", Addon_TypesEnum2.PANEL = "panel", Addon_TypesEnum2.TOOL = "tool", Addon_TypesEnum2.TOOLEXTRA = "toolextra", Addon_TypesEnum2.PREVIEW = "preview", Addon_TypesEnum2.experimental_PAGE = "page", Addon_TypesEnum2.experimental_TEST_PROVIDER = "test-provider", Addon_TypesEnum2))(Addon_TypesEnum || {});
-
- // src/types/modules/frameworks.ts
- var SupportedFramework = /* @__PURE__ */ ((SupportedFramework2) => (SupportedFramework2.ANGULAR = "angular", SupportedFramework2.EMBER = "ember", SupportedFramework2.HTML_VITE = "html-vite", SupportedFramework2.NEXTJS = "nextjs", SupportedFramework2.NEXTJS_VITE = "nextjs-vite", SupportedFramework2.PREACT_VITE = "preact-vite", SupportedFramework2.REACT_NATIVE_WEB_VITE = "react-native-web-vite", SupportedFramework2.REACT_VITE = "react-vite", SupportedFramework2.REACT_WEBPACK5 = "react-webpack5", SupportedFramework2.SERVER_WEBPACK5 = "server-webpack5", SupportedFramework2.SVELTE_VITE = "svelte-vite", SupportedFramework2.SVELTEKIT = "sveltekit", SupportedFramework2.TANSTACK_REACT = "tanstack-react", SupportedFramework2.VUE3_VITE = "vue3-vite", SupportedFramework2.WEB_COMPONENTS_VITE = "web-components-vite", SupportedFramework2.HTML_RSBUILD = "html-rsbuild", SupportedFramework2.NUXT = "nuxt", SupportedFramework2.QWIK = "qwik", SupportedFramework2.REACT_RSBUILD = "react-rsbuild", SupportedFramework2.SOLID = "solid", SupportedFramework2.VUE3_RSBUILD = "vue3-rsbuild", SupportedFramework2.WEB_COMPONENTS_RSBUILD = "web-components-rsbuild", SupportedFramework2))(SupportedFramework || {});
-
- // src/types/modules/renderers.ts
- var SupportedRenderer = /* @__PURE__ */ ((SupportedRenderer2) => (SupportedRenderer2.REACT = "react", SupportedRenderer2.REACT_NATIVE = "react-native", SupportedRenderer2.VUE3 = "vue3", SupportedRenderer2.ANGULAR = "angular", SupportedRenderer2.EMBER = "ember", SupportedRenderer2.PREACT = "preact", SupportedRenderer2.SVELTE = "svelte", SupportedRenderer2.QWIK = "qwik", SupportedRenderer2.HTML = "html", SupportedRenderer2.WEB_COMPONENTS = "web-components", SupportedRenderer2.SERVER = "server", SupportedRenderer2.SOLID = "solid", SupportedRenderer2.NUXT = "nuxt", SupportedRenderer2))(SupportedRenderer || {});
-
- // src/manager-errors.ts
- var manager_errors_exports = {};
- __export(manager_errors_exports, {
- Category: () => Category,
- ProviderDoesNotExtendBaseProviderError: () => ProviderDoesNotExtendBaseProviderError,
- StatusTypeIdMismatchError: () => StatusTypeIdMismatchError,
- UncaughtManagerError: () => UncaughtManagerError
- });
-
- // src/storybook-error.ts
- function parseErrorCode({
- code,
- category
- }) {
- let paddedCode = String(code).padStart(4, "0");
- return `SB_${category}_${paddedCode}`;
- }
- function appendErrorRef(url) {
- if (/^(?!.*storybook\.js\.org)|[?&]ref=error\b/.test(url))
- return url;
- try {
- let urlObj = new URL(url);
- return urlObj.searchParams.set("ref", "error"), urlObj.toString();
- } catch {
- return url;
- }
- }
- var StorybookError = class _StorybookError extends Error {
- constructor(props) {
- super(
- _StorybookError.getFullMessage(props),
- props.cause === void 0 ? void 0 : { cause: props.cause }
- );
- /**
- * Data associated with the error. Used to provide additional information in the error message or
- * to be passed to telemetry.
- */
- this.data = {};
- /** Flag used to easily determine if the error originates from Storybook. */
- this.fromStorybook = !0;
- /**
- * Flag used to determine if the error is handled by us and should therefore not be shown to the
- * user.
- */
- this.isHandledError = !1;
- /**
- * A collection of sub errors which relate to a parent error.
- *
- * Sub-errors are used to represent multiple related errors that occurred together. When a
- * StorybookError with sub-errors is sent to telemetry, both the parent error and each sub-error
- * are sent as separate telemetry events. This allows for better error tracking and debugging.
- *
- * @example
- *
- * ```ts
- * const error1 = new SomeError();
- * const error2 = new AnotherError();
- * const parentError = new ParentError({
- * // ... other props
- * subErrors: [error1, error2],
- * });
- * ```
- */
- this.subErrors = [];
- this.category = props.category, this.documentation = props.documentation ?? !1, this.code = props.code, this.isHandledError = props.isHandledError ?? !1, this.name = props.name, this.subErrors = props.subErrors ?? [];
- }
- get fullErrorCode() {
- return parseErrorCode({ code: this.code, category: this.category });
- }
- /** Overrides the default `Error.name` property in the format: SB_<CATEGORY>_<CODE>. */
- get name() {
- let errorName = this._name || this.constructor.name;
- return `${this.fullErrorCode} (${errorName})`;
- }
- set name(name) {
- this._name = name;
- }
- /** Generates the error message along with additional documentation link (if applicable). */
- static getFullMessage({
- documentation,
- code,
- category,
- message
- }) {
- let page;
- return documentation === !0 ? page = `https://storybook.js.org/error/${parseErrorCode({ code, category })}?ref=error` : typeof documentation == "string" ? page = appendErrorRef(documentation) : Array.isArray(documentation) && (page = `
- ${documentation.map((doc) => ` - ${appendErrorRef(doc)}`).join(`
- `)}`), `${message}${page != null ? `
-
- More info: ${page}
- ` : ""}`;
- }
- };
-
- // src/manager-errors.ts
- var Category = /* @__PURE__ */ ((Category2) => (Category2.MANAGER_UNCAUGHT = "MANAGER_UNCAUGHT", Category2.MANAGER_UI = "MANAGER_UI", Category2.MANAGER_API = "MANAGER_API", Category2.MANAGER_CLIENT_LOGGER = "MANAGER_CLIENT-LOGGER", Category2.MANAGER_CHANNELS = "MANAGER_CHANNELS", Category2.MANAGER_CORE_EVENTS = "MANAGER_CORE-EVENTS", Category2.MANAGER_ROUTER = "MANAGER_ROUTER", Category2.MANAGER_THEMING = "MANAGER_THEMING", Category2))(Category || {}), ProviderDoesNotExtendBaseProviderError = class extends StorybookError {
- constructor() {
- super({
- name: "ProviderDoesNotExtendBaseProviderError",
- category: "MANAGER_UI" /* MANAGER_UI */,
- code: 1,
- message: "The Provider passed into Storybook's UI is not extended from the base Provider. Please check your Provider implementation."
- });
- }
- }, UncaughtManagerError = class extends StorybookError {
- constructor(data) {
- super({
- name: "UncaughtManagerError",
- category: "MANAGER_UNCAUGHT" /* MANAGER_UNCAUGHT */,
- code: 1,
- message: data.error.message
- });
- this.data = data;
- this.stack = data.error.stack;
- }
- }, StatusTypeIdMismatchError = class extends StorybookError {
- constructor(data) {
- super({
- name: "StatusTypeIdMismatchError",
- category: "MANAGER_API" /* MANAGER_API */,
- code: 1,
- message: `Status has typeId "${data.status.typeId}" but was added to store with typeId "${data.typeId}". Full status: ${JSON.stringify(
- data.status,
- null,
- 2
- )}`
- });
- this.data = data;
- }
- };
-
- // src/preview-errors.ts
- init_esm();
- var StatusTypeIdMismatchError2 = class extends StorybookError {
- constructor(data) {
- super({
- name: "StatusTypeIdMismatchError",
- category: "PREVIEW_API" /* PREVIEW_API */,
- code: 16,
- message: `Status has typeId "${data.status.typeId}" but was added to store with typeId "${data.typeId}". Full status: ${JSON.stringify(
- data.status,
- null,
- 2
- )}`
- });
- this.data = data;
- }
- };
-
- // src/server-errors.ts
- var import_picocolors = __toESM(require_picocolors_browser(), 1);
- init_esm();
- var StatusTypeIdMismatchError3 = class extends StorybookError {
- constructor(data) {
- super({
- name: "StatusTypeIdMismatchError",
- category: "CORE-SERVER" /* CORE_SERVER */,
- code: 16,
- message: `Status has typeId "${data.status.typeId}" but was added to store with typeId "${data.typeId}". Full status: ${JSON.stringify(
- data.status,
- null,
- 2
- )}`
- });
- this.data = data;
- }
- };
-
- // src/shared/status-store/index.ts
- var STATUS_VALUE_PREFIX = "status-value:", STATUS_VALUES = [
- "status-value:pending",
- "status-value:success",
- "status-value:new",
- "status-value:modified",
- "status-value:affected",
- "status-value:warning",
- "status-value:error",
- "status-value:unknown"
- ], toStatusValue = (shortName) => {
- if (shortName === "related") return "status-value:affected";
- let candidate = `${STATUS_VALUE_PREFIX}${shortName}`;
- return STATUS_VALUES.includes(candidate) ? candidate : void 0;
- }, statusValueShortName = (value) => value === "status-value:affected" ? "related" : value.slice(STATUS_VALUE_PREFIX.length);
- var CHANGE_DETECTION_STATUS_TYPE_ID = "storybook/change-detection", UNIVERSAL_STATUS_STORE_OPTIONS = {
- id: "storybook/status",
- leader: !0,
- initialState: {}
- }, StatusStoreEventType = {
- SELECT: "select"
- };
- function countStatusesByValue(allStatuses) {
- let counts = {};
- for (let statusByTypeId of Object.values(allStatuses))
- for (let status of Object.values(statusByTypeId))
- counts[status.value] = (counts[status.value] ?? 0) + 1;
- return counts;
- }
- function createStatusStore({
- universalStatusStore: universalStatusStore2,
- useUniversalStore: useUniversalStore2,
- environment
- }) {
- let fullStatusStore2 = {
- getAll() {
- return universalStatusStore2.getState();
- },
- set(statuses) {
- universalStatusStore2.setState((state3) => {
- let newState = { ...state3 };
- for (let status of statuses) {
- let { storyId, typeId } = status;
- newState[storyId] = { ...newState[storyId] ?? {}, [typeId]: status };
- }
- return newState;
- });
- },
- onAllStatusChange(listener) {
- return universalStatusStore2.onStateChange((state3, prevState) => {
- listener(state3, prevState);
- });
- },
- onSelect(listener) {
- return universalStatusStore2.subscribe(StatusStoreEventType.SELECT, (event) => {
- listener(event.payload);
- });
- },
- selectStatuses: (statuses) => {
- universalStatusStore2.send({ type: StatusStoreEventType.SELECT, payload: statuses });
- },
- unset(storyIds) {
- if (!storyIds) {
- universalStatusStore2.setState({});
- return;
- }
- universalStatusStore2.setState((state3) => {
- let newState = { ...state3 };
- for (let storyId of storyIds)
- delete newState[storyId];
- return newState;
- });
- },
- typeId: void 0
- }, getStatusStoreByTypeId2 = (typeId) => ({
- getAll: fullStatusStore2.getAll,
- set(statuses) {
- universalStatusStore2.setState((state3) => {
- let newState = { ...state3 };
- for (let status of statuses) {
- let { storyId } = status;
- if (status.typeId !== typeId)
- switch (environment) {
- case "server":
- throw new StatusTypeIdMismatchError3({
- status,
- typeId
- });
- case "manager":
- throw new StatusTypeIdMismatchError({
- status,
- typeId
- });
- case "preview":
- default:
- throw new StatusTypeIdMismatchError2({
- status,
- typeId
- });
- }
- newState[storyId] = { ...newState[storyId] ?? {}, [typeId]: status };
- }
- return newState;
- });
- },
- onAllStatusChange: fullStatusStore2.onAllStatusChange,
- onSelect(listener) {
- return universalStatusStore2.subscribe(StatusStoreEventType.SELECT, (event) => {
- event.payload.some((status) => status.typeId === typeId) && listener(event.payload);
- });
- },
- unset(storyIds) {
- universalStatusStore2.setState((state3) => {
- let newState = { ...state3 };
- for (let storyId in newState)
- if (newState[storyId]?.[typeId] && (!storyIds || storyIds?.includes(storyId))) {
- let { [typeId]: omittedStatus, ...storyStatusesWithoutTypeId } = newState[storyId];
- newState[storyId] = storyStatusesWithoutTypeId;
- }
- return newState;
- });
- },
- typeId
- });
- return useUniversalStore2 ? {
- getStatusStoreByTypeId: getStatusStoreByTypeId2,
- fullStatusStore: fullStatusStore2,
- universalStatusStore: universalStatusStore2,
- useStatusStore: (selector) => useUniversalStore2(universalStatusStore2, selector)[0]
- } : { getStatusStoreByTypeId: getStatusStoreByTypeId2, fullStatusStore: fullStatusStore2, universalStatusStore: universalStatusStore2 };
- }
-
- // src/types/modules/webpack.ts
- var CoreWebpackCompiler = /* @__PURE__ */ ((CoreWebpackCompiler2) => (CoreWebpackCompiler2.Babel = "babel", CoreWebpackCompiler2.SWC = "swc", CoreWebpackCompiler2))(CoreWebpackCompiler || {});
-
- // src/types/modules/builders.ts
- var SupportedBuilder = /* @__PURE__ */ ((SupportedBuilder2) => (SupportedBuilder2.WEBPACK5 = "webpack5", SupportedBuilder2.VITE = "vite", SupportedBuilder2.RSBUILD = "rsbuild", SupportedBuilder2))(SupportedBuilder || {});
-
- // src/types/modules/features.ts
- var Feature = /* @__PURE__ */ ((Feature2) => (Feature2.DOCS = "docs", Feature2.TEST = "test", Feature2.ONBOARDING = "onboarding", Feature2.A11Y = "a11y", Feature2.AI = "ai", Feature2))(Feature || {});
-
- // src/types/modules/languages.ts
- var SupportedLanguage = /* @__PURE__ */ ((SupportedLanguage2) => (SupportedLanguage2.JAVASCRIPT = "javascript", SupportedLanguage2.TYPESCRIPT = "typescript", SupportedLanguage2))(SupportedLanguage || {});
-
- // src/manager-api/lib/addons.ts
- init_dist();
-
- // src/manager-api/lib/storybook-channel-mock.ts
- function mockChannel() {
- let transport = {
- setHandler: () => {
- },
- send: () => {
- }
- };
- return new Channel({ transport });
- }
-
- // src/manager-api/lib/addons.ts
- var AddonStore = class {
- constructor() {
- this.loaders = {};
- this.elements = {};
- this.config = {};
- this.getChannel = () => (this.channel || this.setChannel(mockChannel()), this.channel);
- this.ready = () => this.promise;
- this.hasChannel = () => !!this.channel;
- this.setChannel = (channel) => {
- this.channel = channel, this.resolve();
- };
- this.setConfig = (value) => {
- Object.assign(this.config, value), this.hasChannel() ? this.getChannel().emit(SET_CONFIG, this.config) : this.ready().then((channel) => {
- channel.emit(SET_CONFIG, this.config);
- });
- };
- this.getConfig = () => this.config;
- /**
- * Registers an addon loader function.
- *
- * @param {string} id - The id of the addon loader.
- * @param {(api: API) => void} callback - The function that will be called to register the addon.
- * @returns {void}
- */
- this.register = (id, callback) => {
- this.loaders[id] && logger.warn(`${id} was loaded twice, this could have bad side-effects`), this.loaders[id] = callback;
- };
- this.loadAddons = (api) => {
- Object.values(this.loaders).forEach((value) => value(api));
- };
- this.promise = new Promise((res) => {
- this.resolve = () => res(this.getChannel());
- });
- }
- getElements(type5) {
- return this.elements[type5] || (this.elements[type5] = {}), this.elements[type5];
- }
- /**
- * Adds an addon to the addon store.
- *
- * @param {string} id - The id of the addon.
- * @param {Addon_Type} addon - The addon to add.
- * @returns {void}
- */
- add(id, addon) {
- let { type: type5 } = addon, collection = this.getElements(type5);
- collection[id] = { ...addon, id };
- }
- experimental_getRegisteredAddons(type5) {
- return Object.keys(type5 ? this.getElements(type5) : this.loaders);
- }
- }, KEY2 = "__STORYBOOK_ADDONS_MANAGER";
- function getAddonsStore() {
- return scope[KEY2] || (scope[KEY2] = new AddonStore()), scope[KEY2];
- }
- var addons = getAddonsStore();
-
- // src/manager-api/modules/addons.ts
- var addons_exports = {};
- __export(addons_exports, {
- ensurePanel: () => ensurePanel,
- init: () => init
- });
- init_client_logger();
- function ensurePanel(panels, selectedPanel, currentPanel) {
- let keys3 = Object.keys(panels ?? {});
- return keys3.indexOf(selectedPanel) >= 0 ? selectedPanel : keys3.length ? keys3[0] : currentPanel;
- }
- var init = ({ provider, store: store2, fullAPI }) => {
- let api = {
- getElements: (type5) => provider.getElements(type5),
- clearStatuses: () => {
- let testProviders = api.getElements("test-provider" /* experimental_TEST_PROVIDER */);
- Object.values(testProviders).forEach((testProvider) => {
- try {
- testProvider.clear?.();
- } catch (e) {
- try {
- logger.warn(`Failed to clear test provider "${testProvider.id}":`, e);
- } catch {
- }
- }
- });
- },
- getSelectedPanel: () => {
- let { selectedPanel } = store2.getState();
- return ensurePanel(api.getElements("panel" /* PANEL */), selectedPanel, selectedPanel);
- },
- setSelectedPanel: (panelName) => {
- store2.setState({ selectedPanel: panelName }, { persistence: "session" });
- },
- setAddonState(addonId, newStateOrMerger, options) {
- let merger = typeof newStateOrMerger == "function" ? newStateOrMerger : () => newStateOrMerger;
- return store2.setState(
- (s3) => ({ ...s3, addons: { ...s3.addons, [addonId]: merger(s3.addons[addonId]) } }),
- options
- ).then(() => api.getAddonState(addonId));
- },
- getAddonState: (addonId) => store2.getState().addons[addonId] || globalThis?.STORYBOOK_ADDON_STATE[addonId]
- };
- return {
- api,
- state: {
- selectedPanel: ensurePanel(
- api.getElements("panel" /* PANEL */),
- store2.getState().selectedPanel
- ),
- addons: {}
- }
- };
- };
-
- // src/manager-api/modules/channel.ts
- var channel_exports = {};
- __export(channel_exports, {
- init: () => init2
- });
- var init2 = ({ provider }) => ({ api: {
- getChannel: () => provider.channel,
- on: (type5, handler) => (provider.channel?.on(type5, handler), () => provider.channel?.off(type5, handler)),
- off: (type5, handler) => provider.channel?.off(type5, handler),
- once: (type5, handler) => provider.channel?.once(type5, handler),
- emit: (type5, data, ...args) => {
- data?.options?.target && data.options.target !== "storybook-preview-iframe" && !data.options.target.startsWith("storybook-ref-") && (data.options.target = data.options.target !== "storybook_internal" ? `storybook-ref-${data.options.target}` : "storybook-preview-iframe"), provider.channel?.emit(type5, data, ...args);
- }
- }, state: {} });
-
- // src/manager-api/modules/globals.ts
- var globals_exports = {};
- __export(globals_exports, {
- init: () => init5
- });
- init_client_logger();
-
- // ../../node_modules/dequal/dist/index.mjs
- var has = Object.prototype.hasOwnProperty;
- function find(iter, tar, key) {
- for (key of iter.keys())
- if (dequal(key, tar)) return key;
- }
- function dequal(foo, bar) {
- var ctor, len, tmp;
- if (foo === bar) return !0;
- if (foo && bar && (ctor = foo.constructor) === bar.constructor) {
- if (ctor === Date) return foo.getTime() === bar.getTime();
- if (ctor === RegExp) return foo.toString() === bar.toString();
- if (ctor === Array) {
- if ((len = foo.length) === bar.length)
- for (; len-- && dequal(foo[len], bar[len]); ) ;
- return len === -1;
- }
- if (ctor === Set) {
- if (foo.size !== bar.size)
- return !1;
- for (len of foo)
- if (tmp = len, tmp && typeof tmp == "object" && (tmp = find(bar, tmp), !tmp) || !bar.has(tmp)) return !1;
- return !0;
- }
- if (ctor === Map) {
- if (foo.size !== bar.size)
- return !1;
- for (len of foo)
- if (tmp = len[0], tmp && typeof tmp == "object" && (tmp = find(bar, tmp), !tmp) || !dequal(len[1], bar.get(tmp)))
- return !1;
- return !0;
- }
- if (ctor === ArrayBuffer)
- foo = new Uint8Array(foo), bar = new Uint8Array(bar);
- else if (ctor === DataView) {
- if ((len = foo.byteLength) === bar.byteLength)
- for (; len-- && foo.getInt8(len) === bar.getInt8(len); ) ;
- return len === -1;
- }
- if (ArrayBuffer.isView(foo)) {
- if ((len = foo.byteLength) === bar.byteLength)
- for (; len-- && foo[len] === bar[len]; ) ;
- return len === -1;
- }
- if (!ctor || typeof foo == "object") {
- len = 0;
- for (ctor in foo)
- if (has.call(foo, ctor) && ++len && !has.call(bar, ctor) || !(ctor in bar) || !dequal(foo[ctor], bar[ctor])) return !1;
- return Object.keys(bar).length === len;
- }
- }
- return foo !== foo && bar !== bar;
- }
-
- // src/manager-api/lib/events.ts
- init_client_logger();
-
- // src/manager-api/modules/refs.ts
- var refs_exports = {};
- __export(refs_exports, {
- defaultStoryMapper: () => defaultStoryMapper,
- getSourceType: () => getSourceType,
- init: () => init4
- });
- init_dist();
- init_esm();
-
- // src/csf/includeConditionalArg.ts
- var import_tiny_isequal = __toESM(require_tiny_isequal(), 1);
-
- // src/preview-api/modules/addons/main.ts
- init_dist();
-
- // src/preview-api/modules/addons/storybook-channel-mock.ts
- function mockChannel2() {
- let transport = {
- setHandler: () => {
- },
- send: () => {
- }
- };
- return new Channel({ transport });
- }
-
- // src/preview-api/modules/addons/main.ts
- var AddonStore2 = class {
- constructor() {
- this.getChannel = () => {
- if (!this.channel) {
- let channel = mockChannel2();
- return this.setChannel(channel), channel;
- }
- return this.channel;
- };
- this.ready = () => this.promise;
- this.hasChannel = () => !!this.channel;
- this.setChannel = (channel) => {
- this.channel = channel, this.resolve();
- };
- this.promise = new Promise((res) => {
- this.resolve = () => res(this.getChannel());
- });
- }
- }, KEY3 = "__STORYBOOK_ADDONS_PREVIEW";
- function getAddonsStore2() {
- return scope[KEY3] || (scope[KEY3] = new AddonStore2()), scope[KEY3];
- }
- var addons2 = getAddonsStore2();
-
- // src/preview-api/modules/addons/hooks.ts
- init_client_logger();
- init_dist();
- var areDepsEqual = (deps, nextDeps) => deps.length === nextDeps.length && deps.every((dep, i) => dep === nextDeps[i]), invalidHooksError = () => new Error(
- `Storybook preview hooks can only be called inside decorators and story functions.
-
- When combining Storybook hooks (e.g. useArgs) with framework hooks (e.g. React's useState, useEffect, useRef) in the same render function, use Storybook's equivalents from 'storybook/preview-api' instead: useState, useEffect, useRef, useMemo, useCallback, useReducer.`
- );
- function getHooksContextOrNull() {
- return scope.STORYBOOK_HOOKS_CONTEXT || null;
- }
- function getHooksContextOrThrow() {
- let hooks = getHooksContextOrNull();
- if (hooks == null)
- throw invalidHooksError();
- return hooks;
- }
- function useHook(name, callback, deps) {
- let hooks = getHooksContextOrThrow();
- if (hooks.currentPhase === "MOUNT") {
- deps != null && !Array.isArray(deps) && logger.warn(
- `${name} received a final argument that is not an array (instead, received ${deps}). When specified, the final argument must be an array.`
- );
- let hook = { name, deps };
- return hooks.currentHooks.push(hook), callback(hook), hook;
- }
- if (hooks.currentPhase === "UPDATE") {
- let hook = hooks.getNextHook();
- if (hook == null)
- throw new Error("Rendered more hooks than during the previous render.");
- return hook.name !== name && logger.warn(
- `Storybook has detected a change in the order of Hooks${hooks.currentDecoratorName ? ` called by ${hooks.currentDecoratorName}` : ""}. This will lead to bugs and errors if not fixed.`
- ), deps != null && hook.deps == null && logger.warn(
- `${name} received a final argument during this render, but not during the previous render. Even though the final argument is optional, its type cannot change between renders.`
- ), deps != null && hook.deps != null && deps.length !== hook.deps.length && logger.warn(`The final argument passed to ${name} changed size between renders. The order and size of this array must remain constant.
- Previous: ${hook.deps}
- Incoming: ${deps}`), (deps == null || hook.deps == null || !areDepsEqual(deps, hook.deps)) && (callback(hook), hook.deps = deps), hook;
- }
- throw invalidHooksError();
- }
- function useMemoLike(name, nextCreate, deps) {
- let { memoizedState } = useHook(
- name,
- (hook) => {
- hook.memoizedState = nextCreate();
- },
- deps
- );
- return memoizedState;
- }
- function useMemo4(nextCreate, deps) {
- return useMemoLike("useMemo", nextCreate, deps);
- }
- function useEffect6(create4, deps) {
- let hooks = getHooksContextOrThrow(), effect4 = useMemoLike("useEffect", () => ({ create: create4 }), deps);
- hooks.currentEffects.includes(effect4) || hooks.currentEffects.push(effect4);
- }
-
- // src/preview-api/modules/store/StoryStore.ts
- var import_memoizerific5 = __toESM(require_memoizerific(), 1);
-
- // src/preview-api/modules/store/args.ts
- init_client_logger();
- init_esm();
- var INCOMPATIBLE = Symbol("incompatible");
- var DEEPLY_EQUAL = Symbol("Deeply equal");
-
- // src/preview-api/modules/store/GlobalsStore.ts
- init_client_logger();
-
- // src/preview-api/modules/store/StoryIndexStore.ts
- var import_memoizerific4 = __toESM(require_memoizerific(), 1), getImportPathMap = (0, import_memoizerific4.default)(1)(
- (entries) => Object.values(entries).reduce(
- (acc, entry) => (acc[entry.importPath] = acc[entry.importPath] || entry, acc),
- {}
- )
- );
-
- // src/preview-api/modules/store/csf/normalizeStory.ts
- init_client_logger();
- init_esm();
- var deprecatedStoryAnnotation = dedent`
- CSF .story annotations deprecated; annotate story functions directly:
- - StoryFn.story.name => StoryFn.storyName
- - StoryFn.story.(parameters|decorators) => StoryFn.(parameters|decorators)
- See https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#hoisted-csf-annotations for details and codemod.
- `;
-
- // src/preview-api/modules/store/csf/processCSFFile.ts
- init_client_logger();
-
- // src/preview-api/modules/store/csf/prepareStory.ts
- init_dist();
- init_dist();
-
- // src/shared/constants/tags.ts
- var Tag = {
- /** Indicates that autodocs should be generated for this component */
- AUTODOCS: "autodocs",
- /** MDX documentation attached to a component's stories file */
- ATTACHED_MDX: "attached-mdx",
- /** Standalone MDX documentation not attached to stories */
- UNATTACHED_MDX: "unattached-mdx",
- /** Story has a play function */
- PLAY_FN: "play-fn",
- /** Story has a test function */
- TEST_FN: "test-fn",
- /** Development environment tag */
- DEV: "dev",
- /** Test environment tag */
- TEST: "test",
- /** Manifest generation tag */
- MANIFEST: "manifest"
- }, BUILT_IN_FILTERS = {
- _docs: (entry, excluded) => excluded ? entry.type !== "docs" : entry.type === "docs",
- _play: (entry, excluded) => excluded ? entry.type !== "story" || !entry.tags?.includes(Tag.PLAY_FN) : entry.type === "story" && !!entry.tags?.includes(Tag.PLAY_FN),
- _test: (entry, excluded) => excluded ? entry.type !== "story" || entry.subtype !== "test" : entry.type === "story" && entry.subtype === "test"
- }, USER_TAG_FILTER = (tag) => (entry, excluded) => excluded ? !entry.tags?.includes(tag) : !!entry.tags?.includes(tag);
-
- // src/preview-api/modules/store/parameters.ts
- var combineParameters = (...parameterSets) => {
- let mergeKeys = {}, definedParametersSets = parameterSets.filter(Boolean), combined = definedParametersSets.reduce((acc, parameters2) => (Object.entries(parameters2).forEach(([key, value]) => {
- let existing = acc[key];
- Array.isArray(value) || typeof existing > "u" ? acc[key] = value : isPlainObject(value) && isPlainObject(existing) ? mergeKeys[key] = !0 : typeof value < "u" && (acc[key] = value);
- }), acc), {});
- return Object.keys(mergeKeys).forEach((key) => {
- let mergeValues = definedParametersSets.filter(Boolean).map((p3) => p3[key]).filter((value) => typeof value < "u");
- mergeValues.every((value) => isPlainObject(value)) ? combined[key] = combineParameters(...mergeValues) : combined[key] = mergeValues[mergeValues.length - 1];
- }), combined;
- };
-
- // src/preview-api/modules/store/inferArgTypes.ts
- init_client_logger();
- init_esm();
- var inferType = (value, name, visited, cache) => {
- let type5 = typeof value;
- switch (type5) {
- case "boolean":
- case "string":
- case "number":
- case "function":
- case "symbol":
- return { name: type5 };
- default:
- break;
- }
- if (value) {
- if (cache.has(value))
- return cache.get(value);
- if (visited.has(value))
- return logger.warn(dedent`
- We've detected a cycle in arg '${name}'. Args should be JSON-serializable.
-
- Consider using the mapping feature or fully custom args:
- - Mapping: https://storybook.js.org/docs/writing-stories/args#mapping-to-complex-arg-values
- - Custom args: https://storybook.js.org/docs/essentials/controls#fully-custom-args
- `), { name: "other", value: "cyclic object" };
- visited.add(value);
- let result;
- return Array.isArray(value) ? result = { name: "array", value: value.length > 0 ? inferType(value[0], name, visited, cache) : { name: "other", value: "unknown" } } : result = { name: "object", value: mapValues(value, (field) => inferType(field, name, visited, cache)) }, visited.delete(value), cache.set(value, result), result;
- }
- return { name: "object", value: {} };
- }, inferArgTypes = (context) => {
- let { id, argTypes: userArgTypes = {}, initialArgs = {} } = context, cache = /* @__PURE__ */ new Map(), argTypes = mapValues(initialArgs, (arg, key) => ({
- name: key,
- type: inferType(arg, `${id}.${key}`, /* @__PURE__ */ new Set(), cache)
- })), userArgTypesNames = mapValues(userArgTypes, (argType, key) => ({
- name: key
- }));
- return combineParameters(argTypes, userArgTypesNames, userArgTypes);
- };
- inferArgTypes.secondPass = !0;
-
- // src/preview-api/modules/store/inferControls.ts
- init_client_logger();
-
- // src/preview-api/modules/store/filterArgTypes.ts
- var matches = (name, descriptor) => Array.isArray(descriptor) ? descriptor.includes(name) : name.match(descriptor), filterArgTypes = (argTypes, include2, exclude) => !include2 && !exclude ? argTypes : argTypes && pickBy(argTypes, (argType, key) => {
- let name = argType.name || key.toString();
- return !!(!include2 || matches(name, include2)) && (!exclude || !matches(name, exclude));
- });
-
- // src/preview-api/modules/store/inferControls.ts
- var inferControl = (argType, name, matchers) => {
- let { type: type5, options } = argType;
- if (type5) {
- if (matchers.color && matchers.color.test(name)) {
- let controlType = type5.name;
- if (controlType === "string")
- return { control: { type: "color" } };
- controlType !== "enum" && logger.warn(
- `Addon controls: Control of type color only supports string, received "${controlType}" instead`
- );
- }
- if (matchers.date && matchers.date.test(name))
- return { control: { type: "date" } };
- switch (type5.name) {
- case "array":
- return { control: { type: "object" } };
- case "boolean":
- return { control: { type: "boolean" } };
- case "string":
- return { control: { type: "text" } };
- case "number":
- return { control: { type: "number" } };
- case "enum": {
- let { value } = type5;
- return { control: { type: value?.length <= 5 ? "radio" : "select" }, options: value };
- }
- case "function":
- case "symbol":
- return null;
- default:
- return { control: { type: options ? "select" : "object" } };
- }
- }
- }, inferControls = (context) => {
- let {
- argTypes,
- parameters: { __isArgsStory, controls: { include: include2 = null, exclude = null, matchers = {} } = {} }
- } = context;
- if (!__isArgsStory)
- return argTypes;
- let filteredArgTypes = filterArgTypes(argTypes, include2, exclude), withControls = mapValues(filteredArgTypes, (argType, name) => argType?.type && inferControl(argType, name.toString(), matchers));
- return combineParameters(withControls, filteredArgTypes);
- };
- inferControls.secondPass = !0;
-
- // src/preview-api/modules/store/csf/composeConfigs.ts
- init_dist();
-
- // src/preview-api/modules/store/csf/portable-stories.ts
- init_esm();
-
- // src/preview-api/modules/preview-web/render/animation-utils.ts
- function isTestEnvironment() {
- try {
- return (
- // @ts-expect-error This property exists in Vitest browser mode
- !!globalThis.__vitest_browser__ || !!globalThis.window?.navigator?.userAgent?.match(/StorybookTestRunner/)
- );
- } catch {
- return !1;
- }
- }
-
- // src/preview-api/modules/store/autoTitle.ts
- init_client_logger();
- init_esm();
-
- // src/preview-api/modules/store/sortStories.ts
- init_esm();
-
- // src/preview-api/modules/preview-web/Preview.tsx
- init_client_logger();
- init_dist();
-
- // src/preview-api/modules/preview-web/render/Render.ts
- var PREPARE_ABORTED = new Error("prepareAborted");
-
- // src/preview-api/modules/preview-web/render/StoryRender.ts
- var { AbortController: AbortController2 } = globalThis;
-
- // src/preview-api/modules/preview-web/Preview.tsx
- var { fetch } = scope;
-
- // src/preview-api/modules/preview-web/PreviewWeb.tsx
- init_dist();
-
- // src/preview-api/modules/preview-web/PreviewWithSelection.tsx
- init_client_logger();
-
- // src/preview-api/modules/preview-web/docs-context/DocsContext.ts
- init_esm();
-
- // src/preview-api/modules/preview-web/UrlStore.ts
- init_dist();
- var import_picoquery2 = __toESM(require_main(), 1);
-
- // src/preview-api/modules/preview-web/parseArgsParam.ts
- init_client_logger();
- var import_picoquery = __toESM(require_main(), 1);
- init_esm();
-
- // src/preview-api/modules/preview-web/UrlStore.ts
- var { history, document: document4 } = scope;
-
- // src/preview-api/modules/preview-web/WebView.ts
- init_client_logger();
- init_dist();
- var import_ansi_to_html = __toESM(require_ansi_to_html(), 1), import_picoquery3 = __toESM(require_main(), 1);
- init_esm();
- var { document: document5 } = scope;
- var ansiConverter = new import_ansi_to_html.default({
- escapeXML: !0
- });
-
- // src/preview-api/modules/preview-web/simulate-pageload.ts
- init_dist();
- var { document: document6 } = scope;
-
- // ../../node_modules/comment-parser/es6/primitives.js
- var Markers;
- (function(Markers2) {
- Markers2.start = "/**", Markers2.nostart = "/***", Markers2.delim = "*", Markers2.end = "*/";
- })(Markers = Markers || (Markers = {}));
-
- // ../../node_modules/comment-parser/es6/stringifier/index.js
- function join(tokens2) {
- return tokens2.start + tokens2.delimiter + tokens2.postDelimiter + tokens2.tag + tokens2.postTag + tokens2.type + tokens2.postType + tokens2.name + tokens2.postName + tokens2.description + tokens2.end + tokens2.lineEnd;
- }
- function getStringifier() {
- return (block) => block.source.map(({ tokens: tokens2 }) => join(tokens2)).join(`
- `);
- }
-
- // ../../node_modules/comment-parser/es6/stringifier/inspect.js
- var zeroWidth = {
- line: 0,
- start: 0,
- delimiter: 0,
- postDelimiter: 0,
- tag: 0,
- postTag: 0,
- name: 0,
- postName: 0,
- type: 0,
- postType: 0,
- description: 0,
- end: 0,
- lineEnd: 0
- };
- var fields = Object.keys(zeroWidth);
-
- // ../../node_modules/comment-parser/es6/index.js
- var stringify4 = getStringifier();
-
- // src/docs-tools/argTypes/jsdocParser.ts
- var import_jsdoc_type_pratt_parser = __toESM(require_dist(), 1);
- var jsdocStringifyRules = (0, import_jsdoc_type_pratt_parser.stringifyRules)(), originalJsdocStringifyObject = jsdocStringifyRules.JsdocTypeObject;
- jsdocStringifyRules.JsdocTypeAny = () => "any";
- jsdocStringifyRules.JsdocTypeObject = (result, transform) => `(${originalJsdocStringifyObject(result, transform)})`;
- jsdocStringifyRules.JsdocTypeOptional = (result, transform) => transform(result.element);
- jsdocStringifyRules.JsdocTypeNullable = (result, transform) => transform(result.element);
- jsdocStringifyRules.JsdocTypeNotNullable = (result, transform) => transform(result.element);
- jsdocStringifyRules.JsdocTypeUnion = (result, transform) => result.elements.map(transform).join("|");
-
- // src/docs-tools/shared.ts
- var ADDON_ID = "storybook/docs", PANEL_ID = `${ADDON_ID}/panel`;
- var SNIPPET_RENDERED = `${ADDON_ID}/snippet-rendered`;
-
- // src/actions/runtime/action.ts
- init_dist();
-
- // src/actions/constants.ts
- var ADDON_ID2 = "storybook/actions", PANEL_ID2 = `${ADDON_ID2}/panel`, EVENT_ID = `${ADDON_ID2}/action-event`, CLEAR_ID = `${ADDON_ID2}/action-clear`;
-
- // src/test/index.ts
- var test_exports = {};
- __export(test_exports, {
- buildQueries: () => buildQueries2,
- clearAllMocks: () => clearAllMocks,
- configure: () => configure2,
- createEvent: () => createEvent3,
- expect: () => expect3,
- findAllByAltText: () => findAllByAltText2,
- findAllByDisplayValue: () => findAllByDisplayValue2,
- findAllByLabelText: () => findAllByLabelText2,
- findAllByPlaceholderText: () => findAllByPlaceholderText2,
- findAllByRole: () => findAllByRole2,
- findAllByTestId: () => findAllByTestId2,
- findAllByText: () => findAllByText2,
- findAllByTitle: () => findAllByTitle2,
- findByAltText: () => findByAltText2,
- findByDisplayValue: () => findByDisplayValue2,
- findByLabelText: () => findByLabelText2,
- findByPlaceholderText: () => findByPlaceholderText2,
- findByRole: () => findByRole2,
- findByTestId: () => findByTestId2,
- findByText: () => findByText2,
- findByTitle: () => findByTitle2,
- fireEvent: () => fireEvent2,
- fn: () => fn2,
- getAllByAltText: () => getAllByAltText2,
- getAllByDisplayValue: () => getAllByDisplayValue2,
- getAllByLabelText: () => getAllByLabelText2,
- getAllByPlaceholderText: () => getAllByPlaceholderText2,
- getAllByRole: () => getAllByRole2,
- getAllByTestId: () => getAllByTestId2,
- getAllByText: () => getAllByText2,
- getAllByTitle: () => getAllByTitle2,
- getByAltText: () => getByAltText2,
- getByDisplayValue: () => getByDisplayValue2,
- getByLabelText: () => getByLabelText2,
- getByPlaceholderText: () => getByPlaceholderText2,
- getByRole: () => getByRole2,
- getByTestId: () => getByTestId2,
- getByText: () => getByText2,
- getByTitle: () => getByTitle2,
- getConfig: () => getConfig3,
- getDefaultNormalizer: () => getDefaultNormalizer2,
- getElementError: () => getElementError2,
- getNodeText: () => getNodeText2,
- getQueriesForElement: () => getQueriesForElement2,
- getRoles: () => getRoles2,
- getSuggestedQuery: () => getSuggestedQuery2,
- isInaccessible: () => isInaccessible2,
- isMockFunction: () => isMockFunction2,
- logDOM: () => logDOM2,
- logRoles: () => logRoles2,
- mocked: () => mocked,
- mocks: () => mocks,
- onMockCall: () => onMockCall,
- prettyDOM: () => prettyDOM2,
- prettyFormat: () => prettyFormat2,
- queries: () => queries2,
- queryAllByAltText: () => queryAllByAltText2,
- queryAllByAttribute: () => queryAllByAttribute2,
- queryAllByDisplayValue: () => queryAllByDisplayValue2,
- queryAllByLabelText: () => queryAllByLabelText2,
- queryAllByPlaceholderText: () => queryAllByPlaceholderText2,
- queryAllByRole: () => queryAllByRole2,
- queryAllByTestId: () => queryAllByTestId2,
- queryAllByText: () => queryAllByText2,
- queryAllByTitle: () => queryAllByTitle2,
- queryByAltText: () => queryByAltText2,
- queryByAttribute: () => queryByAttribute2,
- queryByDisplayValue: () => queryByDisplayValue2,
- queryByLabelText: () => queryByLabelText2,
- queryByPlaceholderText: () => queryByPlaceholderText2,
- queryByRole: () => queryByRole2,
- queryByTestId: () => queryByTestId2,
- queryByText: () => queryByText2,
- queryByTitle: () => queryByTitle2,
- queryHelpers: () => queryHelpers2,
- resetAllMocks: () => resetAllMocks,
- restoreAllMocks: () => restoreAllMocks,
- sb: () => sb,
- screen: () => screen2,
- spyOn: () => spyOn2,
- uninstrumentedUserEvent: () => uninstrumentedUserEvent,
- userEvent: () => userEvent2,
- waitFor: () => waitFor2,
- waitForElementToBeRemoved: () => waitForElementToBeRemoved2,
- within: () => within
- });
-
- // src/instrumenter/instrumenter.ts
- init_client_logger();
- init_dist();
-
- // ../../node_modules/@vitest/utils/node_modules/tinyrainbow/dist/chunk-BVHSVHOK.js
- var f = {
- reset: [0, 0],
- bold: [1, 22, "\x1B[22m\x1B[1m"],
- dim: [2, 22, "\x1B[22m\x1B[2m"],
- italic: [3, 23],
- underline: [4, 24],
- inverse: [7, 27],
- hidden: [8, 28],
- strikethrough: [9, 29],
- black: [30, 39],
- red: [31, 39],
- green: [32, 39],
- yellow: [33, 39],
- blue: [34, 39],
- magenta: [35, 39],
- cyan: [36, 39],
- white: [37, 39],
- gray: [90, 39],
- bgBlack: [40, 49],
- bgRed: [41, 49],
- bgGreen: [42, 49],
- bgYellow: [43, 49],
- bgBlue: [44, 49],
- bgMagenta: [45, 49],
- bgCyan: [46, 49],
- bgWhite: [47, 49],
- blackBright: [90, 39],
- redBright: [91, 39],
- greenBright: [92, 39],
- yellowBright: [93, 39],
- blueBright: [94, 39],
- magentaBright: [95, 39],
- cyanBright: [96, 39],
- whiteBright: [97, 39],
- bgBlackBright: [100, 49],
- bgRedBright: [101, 49],
- bgGreenBright: [102, 49],
- bgYellowBright: [103, 49],
- bgBlueBright: [104, 49],
- bgMagentaBright: [105, 49],
- bgCyanBright: [106, 49],
- bgWhiteBright: [107, 49]
- }, h = Object.entries(f);
- function a(n) {
- return String(n);
- }
- a.open = "";
- a.close = "";
- var B = h.reduce(
- (n, [e]) => (n[e] = a, n),
- { isColorSupported: !1 }
- );
- function C(n = !1) {
- let e = typeof process < "u" ? process : void 0, i = e?.env || {}, g2 = e?.argv || [];
- return !("NO_COLOR" in i || g2.includes("--no-color")) && ("FORCE_COLOR" in i || g2.includes("--color") || e?.platform === "win32" || n && i.TERM !== "dumb" || "CI" in i) || typeof window < "u" && !!window.chrome;
- }
- function p(n = !1) {
- let e = C(n), i = (r2, t, c, o) => {
- let l = "", s3 = 0;
- do
- l += r2.substring(s3, o) + c, s3 = o + t.length, o = r2.indexOf(t, s3);
- while (~o);
- return l + r2.substring(s3);
- }, g2 = (r2, t, c = r2) => {
- let o = (l) => {
- let s3 = String(l), b = s3.indexOf(t, r2.length);
- return ~b ? r2 + i(s3, t, c, b) + t : r2 + s3 + t;
- };
- return o.open = r2, o.close = t, o;
- }, u2 = {
- isColorSupported: e
- }, d = (r2) => `\x1B[${r2}m`;
- for (let [r2, t] of h)
- u2[r2] = e ? g2(
- d(t[0]),
- d(t[1]),
- t[2]
- ) : a;
- return u2;
- }
-
- // ../../node_modules/@vitest/utils/node_modules/tinyrainbow/dist/browser.js
- var s = p();
-
- // ../../node_modules/@vitest/utils/node_modules/@vitest/pretty-format/dist/index.js
- function _mergeNamespaces(n, m3) {
- return m3.forEach(function(e) {
- e && typeof e != "string" && !Array.isArray(e) && Object.keys(e).forEach(function(k) {
- if (k !== "default" && !(k in n)) {
- var d = Object.getOwnPropertyDescriptor(e, k);
- Object.defineProperty(n, k, d.get ? d : {
- enumerable: !0,
- get: function() {
- return e[k];
- }
- });
- }
- });
- }), Object.freeze(n);
- }
- function getKeysOfEnumerableProperties(object, compareKeys) {
- let rawKeys = Object.keys(object), keys3 = compareKeys === null ? rawKeys : rawKeys.sort(compareKeys);
- if (Object.getOwnPropertySymbols)
- for (let symbol of Object.getOwnPropertySymbols(object))
- Object.getOwnPropertyDescriptor(object, symbol).enumerable && keys3.push(symbol);
- return keys3;
- }
- function printIteratorEntries(iterator, config4, indentation, depth, refs, printer2, separator = ": ") {
- let result = "", width = 0, current = iterator.next();
- if (!current.done) {
- result += config4.spacingOuter;
- let indentationNext = indentation + config4.indent;
- for (; !current.done; ) {
- if (result += indentationNext, width++ === config4.maxWidth) {
- result += "\u2026";
- break;
- }
- let name = printer2(current.value[0], config4, indentationNext, depth, refs), value = printer2(current.value[1], config4, indentationNext, depth, refs);
- result += name + separator + value, current = iterator.next(), current.done ? config4.min || (result += ",") : result += `,${config4.spacingInner}`;
- }
- result += config4.spacingOuter + indentation;
- }
- return result;
- }
- function printIteratorValues(iterator, config4, indentation, depth, refs, printer2) {
- let result = "", width = 0, current = iterator.next();
- if (!current.done) {
- result += config4.spacingOuter;
- let indentationNext = indentation + config4.indent;
- for (; !current.done; ) {
- if (result += indentationNext, width++ === config4.maxWidth) {
- result += "\u2026";
- break;
- }
- result += printer2(current.value, config4, indentationNext, depth, refs), current = iterator.next(), current.done ? config4.min || (result += ",") : result += `,${config4.spacingInner}`;
- }
- result += config4.spacingOuter + indentation;
- }
- return result;
- }
- function printListItems(list, config4, indentation, depth, refs, printer2) {
- let result = "";
- list = list instanceof ArrayBuffer ? new DataView(list) : list;
- let isDataView = (l) => l instanceof DataView, length2 = isDataView(list) ? list.byteLength : list.length;
- if (length2 > 0) {
- result += config4.spacingOuter;
- let indentationNext = indentation + config4.indent;
- for (let i = 0; i < length2; i++) {
- if (result += indentationNext, i === config4.maxWidth) {
- result += "\u2026";
- break;
- }
- (isDataView(list) || i in list) && (result += printer2(isDataView(list) ? list.getInt8(i) : list[i], config4, indentationNext, depth, refs)), i < length2 - 1 ? result += `,${config4.spacingInner}` : config4.min || (result += ",");
- }
- result += config4.spacingOuter + indentation;
- }
- return result;
- }
- function printObjectProperties(val, config4, indentation, depth, refs, printer2) {
- let result = "", keys3 = getKeysOfEnumerableProperties(val, config4.compareKeys);
- if (keys3.length > 0) {
- result += config4.spacingOuter;
- let indentationNext = indentation + config4.indent;
- for (let i = 0; i < keys3.length; i++) {
- let key = keys3[i], name = printer2(key, config4, indentationNext, depth, refs), value = printer2(val[key], config4, indentationNext, depth, refs);
- result += `${indentationNext + name}: ${value}`, i < keys3.length - 1 ? result += `,${config4.spacingInner}` : config4.min || (result += ",");
- }
- result += config4.spacingOuter + indentation;
- }
- return result;
- }
- var asymmetricMatcher = typeof Symbol == "function" && Symbol.for ? Symbol.for("jest.asymmetricMatcher") : 1267621, SPACE$2 = " ", serialize$5 = (val, config4, indentation, depth, refs, printer2) => {
- let stringedValue = val.toString();
- if (stringedValue === "ArrayContaining" || stringedValue === "ArrayNotContaining")
- return ++depth > config4.maxDepth ? `[${stringedValue}]` : `${stringedValue + SPACE$2}[${printListItems(val.sample, config4, indentation, depth, refs, printer2)}]`;
- if (stringedValue === "ObjectContaining" || stringedValue === "ObjectNotContaining")
- return ++depth > config4.maxDepth ? `[${stringedValue}]` : `${stringedValue + SPACE$2}{${printObjectProperties(val.sample, config4, indentation, depth, refs, printer2)}}`;
- if (stringedValue === "StringMatching" || stringedValue === "StringNotMatching" || stringedValue === "StringContaining" || stringedValue === "StringNotContaining")
- return stringedValue + SPACE$2 + printer2(val.sample, config4, indentation, depth, refs);
- if (typeof val.toAsymmetricMatcher != "function")
- throw new TypeError(`Asymmetric matcher ${val.constructor.name} does not implement toAsymmetricMatcher()`);
- return val.toAsymmetricMatcher();
- }, test$5 = (val) => val && val.$$typeof === asymmetricMatcher, plugin$5 = {
- serialize: serialize$5,
- test: test$5
- }, SPACE$1 = " ", OBJECT_NAMES = /* @__PURE__ */ new Set(["DOMStringMap", "NamedNodeMap"]), ARRAY_REGEXP = /^(?:HTML\w*Collection|NodeList)$/;
- function testName(name) {
- return OBJECT_NAMES.has(name) || ARRAY_REGEXP.test(name);
- }
- var test$4 = (val) => val && val.constructor && !!val.constructor.name && testName(val.constructor.name);
- function isNamedNodeMap(collection) {
- return collection.constructor.name === "NamedNodeMap";
- }
- var serialize$4 = (collection, config4, indentation, depth, refs, printer2) => {
- let name = collection.constructor.name;
- return ++depth > config4.maxDepth ? `[${name}]` : (config4.min ? "" : name + SPACE$1) + (OBJECT_NAMES.has(name) ? `{${printObjectProperties(isNamedNodeMap(collection) ? [...collection].reduce((props, attribute) => (props[attribute.name] = attribute.value, props), {}) : { ...collection }, config4, indentation, depth, refs, printer2)}}` : `[${printListItems([...collection], config4, indentation, depth, refs, printer2)}]`);
- }, plugin$4 = {
- serialize: serialize$4,
- test: test$4
- };
- function escapeHTML(str2) {
- return str2.replaceAll("<", "<").replaceAll(">", ">");
- }
- function printProps(keys3, props, config4, indentation, depth, refs, printer2) {
- let indentationNext = indentation + config4.indent, colors3 = config4.colors;
- return keys3.map((key) => {
- let value = props[key], printed = printer2(value, config4, indentationNext, depth, refs);
- return typeof value != "string" && (printed.includes(`
- `) && (printed = config4.spacingOuter + indentationNext + printed + config4.spacingOuter + indentation), printed = `{${printed}}`), `${config4.spacingInner + indentation + colors3.prop.open + key + colors3.prop.close}=${colors3.value.open}${printed}${colors3.value.close}`;
- }).join("");
- }
- function printChildren(children, config4, indentation, depth, refs, printer2) {
- return children.map((child) => config4.spacingOuter + indentation + (typeof child == "string" ? printText(child, config4) : printer2(child, config4, indentation, depth, refs))).join("");
- }
- function printText(text, config4) {
- let contentColor = config4.colors.content;
- return contentColor.open + escapeHTML(text) + contentColor.close;
- }
- function printComment(comment2, config4) {
- let commentColor = config4.colors.comment;
- return `${commentColor.open}<!--${escapeHTML(comment2)}-->${commentColor.close}`;
- }
- function printElement(type5, printedProps, printedChildren, config4, indentation) {
- let tagColor = config4.colors.tag;
- return `${tagColor.open}<${type5}${printedProps && tagColor.close + printedProps + config4.spacingOuter + indentation + tagColor.open}${printedChildren ? `>${tagColor.close}${printedChildren}${config4.spacingOuter}${indentation}${tagColor.open}</${type5}` : `${printedProps && !config4.min ? "" : " "}/`}>${tagColor.close}`;
- }
- function printElementAsLeaf(type5, config4) {
- let tagColor = config4.colors.tag;
- return `${tagColor.open}<${type5}${tagColor.close} \u2026${tagColor.open} />${tagColor.close}`;
- }
- var ELEMENT_NODE = 1, TEXT_NODE = 3, COMMENT_NODE = 8, FRAGMENT_NODE = 11, ELEMENT_REGEXP = /^(?:(?:HTML|SVG)\w*)?Element$/;
- function testHasAttribute(val) {
- try {
- return typeof val.hasAttribute == "function" && val.hasAttribute("is");
- } catch {
- return !1;
- }
- }
- function testNode(val) {
- let constructorName = val.constructor.name, { nodeType, tagName } = val, isCustomElement3 = typeof tagName == "string" && tagName.includes("-") || testHasAttribute(val);
- return nodeType === ELEMENT_NODE && (ELEMENT_REGEXP.test(constructorName) || isCustomElement3) || nodeType === TEXT_NODE && constructorName === "Text" || nodeType === COMMENT_NODE && constructorName === "Comment" || nodeType === FRAGMENT_NODE && constructorName === "DocumentFragment";
- }
- var test$3 = (val) => {
- var _val$constructor;
- return (val == null || (_val$constructor = val.constructor) === null || _val$constructor === void 0 ? void 0 : _val$constructor.name) && testNode(val);
- };
- function nodeIsText(node2) {
- return node2.nodeType === TEXT_NODE;
- }
- function nodeIsComment(node2) {
- return node2.nodeType === COMMENT_NODE;
- }
- function nodeIsFragment(node2) {
- return node2.nodeType === FRAGMENT_NODE;
- }
- var serialize$3 = (node2, config4, indentation, depth, refs, printer2) => {
- if (nodeIsText(node2))
- return printText(node2.data, config4);
- if (nodeIsComment(node2))
- return printComment(node2.data, config4);
- let type5 = nodeIsFragment(node2) ? "DocumentFragment" : node2.tagName.toLowerCase();
- return ++depth > config4.maxDepth ? printElementAsLeaf(type5, config4) : printElement(type5, printProps(nodeIsFragment(node2) ? [] : Array.from(node2.attributes, (attr) => attr.name).sort(), nodeIsFragment(node2) ? {} : [...node2.attributes].reduce((props, attribute) => (props[attribute.name] = attribute.value, props), {}), config4, indentation + config4.indent, depth, refs, printer2), printChildren(Array.prototype.slice.call(node2.childNodes || node2.children), config4, indentation + config4.indent, depth, refs, printer2), config4, indentation);
- }, plugin$3 = {
- serialize: serialize$3,
- test: test$3
- }, IS_ITERABLE_SENTINEL = "@@__IMMUTABLE_ITERABLE__@@", IS_LIST_SENTINEL = "@@__IMMUTABLE_LIST__@@", IS_KEYED_SENTINEL = "@@__IMMUTABLE_KEYED__@@", IS_MAP_SENTINEL = "@@__IMMUTABLE_MAP__@@", IS_ORDERED_SENTINEL = "@@__IMMUTABLE_ORDERED__@@", IS_RECORD_SENTINEL = "@@__IMMUTABLE_RECORD__@@", IS_SEQ_SENTINEL = "@@__IMMUTABLE_SEQ__@@", IS_SET_SENTINEL = "@@__IMMUTABLE_SET__@@", IS_STACK_SENTINEL = "@@__IMMUTABLE_STACK__@@", getImmutableName = (name) => `Immutable.${name}`, printAsLeaf = (name) => `[${name}]`, SPACE = " ", LAZY = "\u2026";
- function printImmutableEntries(val, config4, indentation, depth, refs, printer2, type5) {
- return ++depth > config4.maxDepth ? printAsLeaf(getImmutableName(type5)) : `${getImmutableName(type5) + SPACE}{${printIteratorEntries(val.entries(), config4, indentation, depth, refs, printer2)}}`;
- }
- function getRecordEntries(val) {
- let i = 0;
- return { next() {
- if (i < val._keys.length) {
- let key = val._keys[i++];
- return {
- done: !1,
- value: [key, val.get(key)]
- };
- }
- return {
- done: !0,
- value: void 0
- };
- } };
- }
- function printImmutableRecord(val, config4, indentation, depth, refs, printer2) {
- let name = getImmutableName(val._name || "Record");
- return ++depth > config4.maxDepth ? printAsLeaf(name) : `${name + SPACE}{${printIteratorEntries(getRecordEntries(val), config4, indentation, depth, refs, printer2)}}`;
- }
- function printImmutableSeq(val, config4, indentation, depth, refs, printer2) {
- let name = getImmutableName("Seq");
- return ++depth > config4.maxDepth ? printAsLeaf(name) : val[IS_KEYED_SENTINEL] ? `${name + SPACE}{${val._iter || val._object ? printIteratorEntries(val.entries(), config4, indentation, depth, refs, printer2) : LAZY}}` : `${name + SPACE}[${val._iter || val._array || val._collection || val._iterable ? printIteratorValues(val.values(), config4, indentation, depth, refs, printer2) : LAZY}]`;
- }
- function printImmutableValues(val, config4, indentation, depth, refs, printer2, type5) {
- return ++depth > config4.maxDepth ? printAsLeaf(getImmutableName(type5)) : `${getImmutableName(type5) + SPACE}[${printIteratorValues(val.values(), config4, indentation, depth, refs, printer2)}]`;
- }
- var serialize$2 = (val, config4, indentation, depth, refs, printer2) => val[IS_MAP_SENTINEL] ? printImmutableEntries(val, config4, indentation, depth, refs, printer2, val[IS_ORDERED_SENTINEL] ? "OrderedMap" : "Map") : val[IS_LIST_SENTINEL] ? printImmutableValues(val, config4, indentation, depth, refs, printer2, "List") : val[IS_SET_SENTINEL] ? printImmutableValues(val, config4, indentation, depth, refs, printer2, val[IS_ORDERED_SENTINEL] ? "OrderedSet" : "Set") : val[IS_STACK_SENTINEL] ? printImmutableValues(val, config4, indentation, depth, refs, printer2, "Stack") : val[IS_SEQ_SENTINEL] ? printImmutableSeq(val, config4, indentation, depth, refs, printer2) : printImmutableRecord(val, config4, indentation, depth, refs, printer2), test$2 = (val) => val && (val[IS_ITERABLE_SENTINEL] === !0 || val[IS_RECORD_SENTINEL] === !0), plugin$2 = {
- serialize: serialize$2,
- test: test$2
- };
- function getDefaultExportFromCjs(x) {
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x.default : x;
- }
- var reactIs$1 = { exports: {} }, reactIs_production = {};
- var hasRequiredReactIs_production;
- function requireReactIs_production() {
- if (hasRequiredReactIs_production) return reactIs_production;
- hasRequiredReactIs_production = 1;
- var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE2 = Symbol.for("react.lazy"), REACT_VIEW_TRANSITION_TYPE = Symbol.for("react.view_transition"), REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference");
- function typeOf(object) {
- if (typeof object == "object" && object !== null) {
- var $$typeof = object.$$typeof;
- switch ($$typeof) {
- case REACT_ELEMENT_TYPE:
- switch (object = object.type, object) {
- case REACT_FRAGMENT_TYPE:
- case REACT_PROFILER_TYPE:
- case REACT_STRICT_MODE_TYPE:
- case REACT_SUSPENSE_TYPE:
- case REACT_SUSPENSE_LIST_TYPE:
- case REACT_VIEW_TRANSITION_TYPE:
- return object;
- default:
- switch (object = object && object.$$typeof, object) {
- case REACT_CONTEXT_TYPE:
- case REACT_FORWARD_REF_TYPE:
- case REACT_LAZY_TYPE2:
- case REACT_MEMO_TYPE:
- return object;
- case REACT_CONSUMER_TYPE:
- return object;
- default:
- return $$typeof;
- }
- }
- case REACT_PORTAL_TYPE:
- return $$typeof;
- }
- }
- }
- return reactIs_production.ContextConsumer = REACT_CONSUMER_TYPE, reactIs_production.ContextProvider = REACT_CONTEXT_TYPE, reactIs_production.Element = REACT_ELEMENT_TYPE, reactIs_production.ForwardRef = REACT_FORWARD_REF_TYPE, reactIs_production.Fragment = REACT_FRAGMENT_TYPE, reactIs_production.Lazy = REACT_LAZY_TYPE2, reactIs_production.Memo = REACT_MEMO_TYPE, reactIs_production.Portal = REACT_PORTAL_TYPE, reactIs_production.Profiler = REACT_PROFILER_TYPE, reactIs_production.StrictMode = REACT_STRICT_MODE_TYPE, reactIs_production.Suspense = REACT_SUSPENSE_TYPE, reactIs_production.SuspenseList = REACT_SUSPENSE_LIST_TYPE, reactIs_production.isContextConsumer = function(object) {
- return typeOf(object) === REACT_CONSUMER_TYPE;
- }, reactIs_production.isContextProvider = function(object) {
- return typeOf(object) === REACT_CONTEXT_TYPE;
- }, reactIs_production.isElement = function(object) {
- return typeof object == "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
- }, reactIs_production.isForwardRef = function(object) {
- return typeOf(object) === REACT_FORWARD_REF_TYPE;
- }, reactIs_production.isFragment = function(object) {
- return typeOf(object) === REACT_FRAGMENT_TYPE;
- }, reactIs_production.isLazy = function(object) {
- return typeOf(object) === REACT_LAZY_TYPE2;
- }, reactIs_production.isMemo = function(object) {
- return typeOf(object) === REACT_MEMO_TYPE;
- }, reactIs_production.isPortal = function(object) {
- return typeOf(object) === REACT_PORTAL_TYPE;
- }, reactIs_production.isProfiler = function(object) {
- return typeOf(object) === REACT_PROFILER_TYPE;
- }, reactIs_production.isStrictMode = function(object) {
- return typeOf(object) === REACT_STRICT_MODE_TYPE;
- }, reactIs_production.isSuspense = function(object) {
- return typeOf(object) === REACT_SUSPENSE_TYPE;
- }, reactIs_production.isSuspenseList = function(object) {
- return typeOf(object) === REACT_SUSPENSE_LIST_TYPE;
- }, reactIs_production.isValidElementType = function(type5) {
- return typeof type5 == "string" || typeof type5 == "function" || type5 === REACT_FRAGMENT_TYPE || type5 === REACT_PROFILER_TYPE || type5 === REACT_STRICT_MODE_TYPE || type5 === REACT_SUSPENSE_TYPE || type5 === REACT_SUSPENSE_LIST_TYPE || typeof type5 == "object" && type5 !== null && (type5.$$typeof === REACT_LAZY_TYPE2 || type5.$$typeof === REACT_MEMO_TYPE || type5.$$typeof === REACT_CONTEXT_TYPE || type5.$$typeof === REACT_CONSUMER_TYPE || type5.$$typeof === REACT_FORWARD_REF_TYPE || type5.$$typeof === REACT_CLIENT_REFERENCE || type5.getModuleId !== void 0);
- }, reactIs_production.typeOf = typeOf, reactIs_production;
- }
- var hasRequiredReactIs$1;
- function requireReactIs$1() {
- return hasRequiredReactIs$1 || (hasRequiredReactIs$1 = 1, reactIs$1.exports = requireReactIs_production()), reactIs$1.exports;
- }
- var reactIsExports$1 = requireReactIs$1(), index$1 = getDefaultExportFromCjs(reactIsExports$1), ReactIs19 = _mergeNamespaces({
- __proto__: null,
- default: index$1
- }, [reactIsExports$1]), reactIs = { exports: {} }, reactIs_production_min = {};
- var hasRequiredReactIs_production_min;
- function requireReactIs_production_min() {
- if (hasRequiredReactIs_production_min) return reactIs_production_min;
- hasRequiredReactIs_production_min = 1;
- var b = Symbol.for("react.element"), c = Symbol.for("react.portal"), d = Symbol.for("react.fragment"), e = Symbol.for("react.strict_mode"), f4 = Symbol.for("react.profiler"), g2 = Symbol.for("react.provider"), h3 = Symbol.for("react.context"), k = Symbol.for("react.server_context"), l = Symbol.for("react.forward_ref"), m3 = Symbol.for("react.suspense"), n = Symbol.for("react.suspense_list"), p3 = Symbol.for("react.memo"), q = Symbol.for("react.lazy"), t = Symbol.for("react.offscreen"), u2;
- u2 = Symbol.for("react.module.reference");
- function v(a3) {
- if (typeof a3 == "object" && a3 !== null) {
- var r2 = a3.$$typeof;
- switch (r2) {
- case b:
- switch (a3 = a3.type, a3) {
- case d:
- case f4:
- case e:
- case m3:
- case n:
- return a3;
- default:
- switch (a3 = a3 && a3.$$typeof, a3) {
- case k:
- case h3:
- case l:
- case q:
- case p3:
- case g2:
- return a3;
- default:
- return r2;
- }
- }
- case c:
- return r2;
- }
- }
- }
- return reactIs_production_min.ContextConsumer = h3, reactIs_production_min.ContextProvider = g2, reactIs_production_min.Element = b, reactIs_production_min.ForwardRef = l, reactIs_production_min.Fragment = d, reactIs_production_min.Lazy = q, reactIs_production_min.Memo = p3, reactIs_production_min.Portal = c, reactIs_production_min.Profiler = f4, reactIs_production_min.StrictMode = e, reactIs_production_min.Suspense = m3, reactIs_production_min.SuspenseList = n, reactIs_production_min.isAsyncMode = function() {
- return !1;
- }, reactIs_production_min.isConcurrentMode = function() {
- return !1;
- }, reactIs_production_min.isContextConsumer = function(a3) {
- return v(a3) === h3;
- }, reactIs_production_min.isContextProvider = function(a3) {
- return v(a3) === g2;
- }, reactIs_production_min.isElement = function(a3) {
- return typeof a3 == "object" && a3 !== null && a3.$$typeof === b;
- }, reactIs_production_min.isForwardRef = function(a3) {
- return v(a3) === l;
- }, reactIs_production_min.isFragment = function(a3) {
- return v(a3) === d;
- }, reactIs_production_min.isLazy = function(a3) {
- return v(a3) === q;
- }, reactIs_production_min.isMemo = function(a3) {
- return v(a3) === p3;
- }, reactIs_production_min.isPortal = function(a3) {
- return v(a3) === c;
- }, reactIs_production_min.isProfiler = function(a3) {
- return v(a3) === f4;
- }, reactIs_production_min.isStrictMode = function(a3) {
- return v(a3) === e;
- }, reactIs_production_min.isSuspense = function(a3) {
- return v(a3) === m3;
- }, reactIs_production_min.isSuspenseList = function(a3) {
- return v(a3) === n;
- }, reactIs_production_min.isValidElementType = function(a3) {
- return typeof a3 == "string" || typeof a3 == "function" || a3 === d || a3 === f4 || a3 === e || a3 === m3 || a3 === n || a3 === t || typeof a3 == "object" && a3 !== null && (a3.$$typeof === q || a3.$$typeof === p3 || a3.$$typeof === g2 || a3.$$typeof === h3 || a3.$$typeof === l || a3.$$typeof === u2 || a3.getModuleId !== void 0);
- }, reactIs_production_min.typeOf = v, reactIs_production_min;
- }
- var hasRequiredReactIs;
- function requireReactIs() {
- return hasRequiredReactIs || (hasRequiredReactIs = 1, reactIs.exports = requireReactIs_production_min()), reactIs.exports;
- }
- var reactIsExports = requireReactIs(), index = getDefaultExportFromCjs(reactIsExports), ReactIs18 = _mergeNamespaces({
- __proto__: null,
- default: index
- }, [reactIsExports]), reactIsMethods = [
- "isAsyncMode",
- "isConcurrentMode",
- "isContextConsumer",
- "isContextProvider",
- "isElement",
- "isForwardRef",
- "isFragment",
- "isLazy",
- "isMemo",
- "isPortal",
- "isProfiler",
- "isStrictMode",
- "isSuspense",
- "isSuspenseList",
- "isValidElementType"
- ], ReactIs = Object.fromEntries(reactIsMethods.map((m3) => [m3, (v) => ReactIs18[m3](v) || ReactIs19[m3](v)]));
- function getChildren(arg, children = []) {
- if (Array.isArray(arg))
- for (let item of arg)
- getChildren(item, children);
- else arg != null && arg !== !1 && arg !== "" && children.push(arg);
- return children;
- }
- function getType(element) {
- let type5 = element.type;
- if (typeof type5 == "string")
- return type5;
- if (typeof type5 == "function")
- return type5.displayName || type5.name || "Unknown";
- if (ReactIs.isFragment(element))
- return "React.Fragment";
- if (ReactIs.isSuspense(element))
- return "React.Suspense";
- if (typeof type5 == "object" && type5 !== null) {
- if (ReactIs.isContextProvider(element))
- return "Context.Provider";
- if (ReactIs.isContextConsumer(element))
- return "Context.Consumer";
- if (ReactIs.isForwardRef(element)) {
- if (type5.displayName)
- return type5.displayName;
- let functionName = type5.render.displayName || type5.render.name || "";
- return functionName === "" ? "ForwardRef" : `ForwardRef(${functionName})`;
- }
- if (ReactIs.isMemo(element)) {
- let functionName = type5.displayName || type5.type.displayName || type5.type.name || "";
- return functionName === "" ? "Memo" : `Memo(${functionName})`;
- }
- }
- return "UNDEFINED";
- }
- function getPropKeys$1(element) {
- let { props } = element;
- return Object.keys(props).filter((key) => key !== "children" && props[key] !== void 0).sort();
- }
- var serialize$1 = (element, config4, indentation, depth, refs, printer2) => ++depth > config4.maxDepth ? printElementAsLeaf(getType(element), config4) : printElement(getType(element), printProps(getPropKeys$1(element), element.props, config4, indentation + config4.indent, depth, refs, printer2), printChildren(getChildren(element.props.children), config4, indentation + config4.indent, depth, refs, printer2), config4, indentation), test$1 = (val) => val != null && ReactIs.isElement(val), plugin$1 = {
- serialize: serialize$1,
- test: test$1
- }, testSymbol = typeof Symbol == "function" && Symbol.for ? Symbol.for("react.test.json") : 245830487;
- function getPropKeys(object) {
- let { props } = object;
- return props ? Object.keys(props).filter((key) => props[key] !== void 0).sort() : [];
- }
- var serialize2 = (object, config4, indentation, depth, refs, printer2) => ++depth > config4.maxDepth ? printElementAsLeaf(object.type, config4) : printElement(object.type, object.props ? printProps(getPropKeys(object), object.props, config4, indentation + config4.indent, depth, refs, printer2) : "", object.children ? printChildren(object.children, config4, indentation + config4.indent, depth, refs, printer2) : "", config4, indentation), test = (val) => val && val.$$typeof === testSymbol, plugin = {
- serialize: serialize2,
- test
- }, toString2 = Object.prototype.toString, toISOString = Date.prototype.toISOString, errorToString = Error.prototype.toString, regExpToString = RegExp.prototype.toString;
- function getConstructorName(val) {
- return typeof val.constructor == "function" && val.constructor.name || "Object";
- }
- function isWindow(val) {
- return typeof window < "u" && val === window;
- }
- var SYMBOL_REGEXP = /^Symbol\((.*)\)(.*)$/, NEWLINE_REGEXP = /\n/g, PrettyFormatPluginError = class extends Error {
- constructor(message, stack) {
- super(message), this.stack = stack, this.name = this.constructor.name;
- }
- };
- function isToStringedArrayType(toStringed) {
- return toStringed === "[object Array]" || toStringed === "[object ArrayBuffer]" || toStringed === "[object DataView]" || toStringed === "[object Float32Array]" || toStringed === "[object Float64Array]" || toStringed === "[object Int8Array]" || toStringed === "[object Int16Array]" || toStringed === "[object Int32Array]" || toStringed === "[object Uint8Array]" || toStringed === "[object Uint8ClampedArray]" || toStringed === "[object Uint16Array]" || toStringed === "[object Uint32Array]";
- }
- function printNumber(val) {
- return Object.is(val, -0) ? "-0" : String(val);
- }
- function printBigInt(val) {
- return `${val}n`;
- }
- function printFunction(val, printFunctionName) {
- return printFunctionName ? `[Function ${val.name || "anonymous"}]` : "[Function]";
- }
- function printSymbol(val) {
- return String(val).replace(SYMBOL_REGEXP, "Symbol($1)");
- }
- function printError(val) {
- return `[${errorToString.call(val)}]`;
- }
- function printBasicValue(val, printFunctionName, escapeRegex, escapeString) {
- if (val === !0 || val === !1)
- return `${val}`;
- if (val === void 0)
- return "undefined";
- if (val === null)
- return "null";
- let typeOf = typeof val;
- if (typeOf === "number")
- return printNumber(val);
- if (typeOf === "bigint")
- return printBigInt(val);
- if (typeOf === "string")
- return escapeString ? `"${val.replaceAll(/"|\\/g, "\\$&")}"` : `"${val}"`;
- if (typeOf === "function")
- return printFunction(val, printFunctionName);
- if (typeOf === "symbol")
- return printSymbol(val);
- let toStringed = toString2.call(val);
- return toStringed === "[object WeakMap]" ? "WeakMap {}" : toStringed === "[object WeakSet]" ? "WeakSet {}" : toStringed === "[object Function]" || toStringed === "[object GeneratorFunction]" ? printFunction(val, printFunctionName) : toStringed === "[object Symbol]" ? printSymbol(val) : toStringed === "[object Date]" ? Number.isNaN(+val) ? "Date { NaN }" : toISOString.call(val) : toStringed === "[object Error]" ? printError(val) : toStringed === "[object RegExp]" ? escapeRegex ? regExpToString.call(val).replaceAll(/[$()*+.?[\\\]^{|}]/g, "\\$&") : regExpToString.call(val) : val instanceof Error ? printError(val) : null;
- }
- function printComplexValue(val, config4, indentation, depth, refs, hasCalledToJSON) {
- if (refs.includes(val))
- return "[Circular]";
- refs = [...refs], refs.push(val);
- let hitMaxDepth = ++depth > config4.maxDepth, min2 = config4.min;
- if (config4.callToJSON && !hitMaxDepth && val.toJSON && typeof val.toJSON == "function" && !hasCalledToJSON)
- return printer(val.toJSON(), config4, indentation, depth, refs, !0);
- let toStringed = toString2.call(val);
- return toStringed === "[object Arguments]" ? hitMaxDepth ? "[Arguments]" : `${min2 ? "" : "Arguments "}[${printListItems(val, config4, indentation, depth, refs, printer)}]` : isToStringedArrayType(toStringed) ? hitMaxDepth ? `[${val.constructor.name}]` : `${min2 || !config4.printBasicPrototype && val.constructor.name === "Array" ? "" : `${val.constructor.name} `}[${printListItems(val, config4, indentation, depth, refs, printer)}]` : toStringed === "[object Map]" ? hitMaxDepth ? "[Map]" : `Map {${printIteratorEntries(val.entries(), config4, indentation, depth, refs, printer, " => ")}}` : toStringed === "[object Set]" ? hitMaxDepth ? "[Set]" : `Set {${printIteratorValues(val.values(), config4, indentation, depth, refs, printer)}}` : hitMaxDepth || isWindow(val) ? `[${getConstructorName(val)}]` : `${min2 || !config4.printBasicPrototype && getConstructorName(val) === "Object" ? "" : `${getConstructorName(val)} `}{${printObjectProperties(val, config4, indentation, depth, refs, printer)}}`;
- }
- var ErrorPlugin = {
- test: (val) => val && val instanceof Error,
- serialize(val, config4, indentation, depth, refs, printer2) {
- if (refs.includes(val))
- return "[Circular]";
- refs = [...refs, val];
- let hitMaxDepth = ++depth > config4.maxDepth, { message, cause, ...rest } = val, entries = {
- message,
- ...typeof cause < "u" ? { cause } : {},
- ...val instanceof AggregateError ? { errors: val.errors } : {},
- ...rest
- }, name = val.name !== "Error" ? val.name : getConstructorName(val);
- return hitMaxDepth ? `[${name}]` : `${name} {${printIteratorEntries(Object.entries(entries).values(), config4, indentation, depth, refs, printer2)}}`;
- }
- };
- function isNewPlugin(plugin2) {
- return plugin2.serialize != null;
- }
- function printPlugin(plugin2, val, config4, indentation, depth, refs) {
- let printed;
- try {
- printed = isNewPlugin(plugin2) ? plugin2.serialize(val, config4, indentation, depth, refs, printer) : plugin2.print(val, (valChild) => printer(valChild, config4, indentation, depth, refs), (str2) => {
- let indentationNext = indentation + config4.indent;
- return indentationNext + str2.replaceAll(NEWLINE_REGEXP, `
- ${indentationNext}`);
- }, {
- edgeSpacing: config4.spacingOuter,
- min: config4.min,
- spacing: config4.spacingInner
- }, config4.colors);
- } catch (error) {
- throw new PrettyFormatPluginError(error.message, error.stack);
- }
- if (typeof printed != "string")
- throw new TypeError(`pretty-format: Plugin must return type "string" but instead returned "${typeof printed}".`);
- return printed;
- }
- function findPlugin(plugins3, val) {
- for (let plugin2 of plugins3)
- try {
- if (plugin2.test(val))
- return plugin2;
- } catch (error) {
- throw new PrettyFormatPluginError(error.message, error.stack);
- }
- return null;
- }
- function printer(val, config4, indentation, depth, refs, hasCalledToJSON) {
- let plugin2 = findPlugin(config4.plugins, val);
- if (plugin2 !== null)
- return printPlugin(plugin2, val, config4, indentation, depth, refs);
- let basicResult = printBasicValue(val, config4.printFunctionName, config4.escapeRegex, config4.escapeString);
- return basicResult !== null ? basicResult : printComplexValue(val, config4, indentation, depth, refs, hasCalledToJSON);
- }
- var DEFAULT_THEME = {
- comment: "gray",
- content: "reset",
- prop: "yellow",
- tag: "cyan",
- value: "green"
- }, DEFAULT_THEME_KEYS = Object.keys(DEFAULT_THEME), DEFAULT_OPTIONS = {
- callToJSON: !0,
- compareKeys: void 0,
- escapeRegex: !1,
- escapeString: !0,
- highlight: !1,
- indent: 2,
- maxDepth: Number.POSITIVE_INFINITY,
- maxWidth: Number.POSITIVE_INFINITY,
- min: !1,
- plugins: [],
- printBasicPrototype: !0,
- printFunctionName: !0,
- theme: DEFAULT_THEME
- };
- function validateOptions2(options) {
- for (let key of Object.keys(options))
- if (!Object.prototype.hasOwnProperty.call(DEFAULT_OPTIONS, key))
- throw new Error(`pretty-format: Unknown option "${key}".`);
- if (options.min && options.indent !== void 0 && options.indent !== 0)
- throw new Error('pretty-format: Options "min" and "indent" cannot be used together.');
- }
- function getColorsHighlight() {
- return DEFAULT_THEME_KEYS.reduce((colors3, key) => {
- let value = DEFAULT_THEME[key], color2 = value && s[value];
- if (color2 && typeof color2.close == "string" && typeof color2.open == "string")
- colors3[key] = color2;
- else
- throw new Error(`pretty-format: Option "theme" has a key "${key}" whose value "${value}" is undefined in ansi-styles.`);
- return colors3;
- }, /* @__PURE__ */ Object.create(null));
- }
- function getColorsEmpty() {
- return DEFAULT_THEME_KEYS.reduce((colors3, key) => (colors3[key] = {
- close: "",
- open: ""
- }, colors3), /* @__PURE__ */ Object.create(null));
- }
- function getPrintFunctionName(options) {
- return options?.printFunctionName ?? DEFAULT_OPTIONS.printFunctionName;
- }
- function getEscapeRegex(options) {
- return options?.escapeRegex ?? DEFAULT_OPTIONS.escapeRegex;
- }
- function getEscapeString(options) {
- return options?.escapeString ?? DEFAULT_OPTIONS.escapeString;
- }
- function getConfig(options) {
- return {
- callToJSON: options?.callToJSON ?? DEFAULT_OPTIONS.callToJSON,
- colors: options?.highlight ? getColorsHighlight() : getColorsEmpty(),
- compareKeys: typeof options?.compareKeys == "function" || options?.compareKeys === null ? options.compareKeys : DEFAULT_OPTIONS.compareKeys,
- escapeRegex: getEscapeRegex(options),
- escapeString: getEscapeString(options),
- indent: options?.min ? "" : createIndent(options?.indent ?? DEFAULT_OPTIONS.indent),
- maxDepth: options?.maxDepth ?? DEFAULT_OPTIONS.maxDepth,
- maxWidth: options?.maxWidth ?? DEFAULT_OPTIONS.maxWidth,
- min: options?.min ?? DEFAULT_OPTIONS.min,
- plugins: options?.plugins ?? DEFAULT_OPTIONS.plugins,
- printBasicPrototype: options?.printBasicPrototype ?? !0,
- printFunctionName: getPrintFunctionName(options),
- spacingInner: options?.min ? " " : `
- `,
- spacingOuter: options?.min ? "" : `
- `
- };
- }
- function createIndent(indent2) {
- return Array.from({ length: indent2 + 1 }).join(" ");
- }
- function format(val, options) {
- if (options && (validateOptions2(options), options.plugins)) {
- let plugin2 = findPlugin(options.plugins, val);
- if (plugin2 !== null)
- return printPlugin(plugin2, val, getConfig(options), "", 0, []);
- }
- let basicResult = printBasicValue(val, getPrintFunctionName(options), getEscapeRegex(options), getEscapeString(options));
- return basicResult !== null ? basicResult : printComplexValue(val, getConfig(options), "", 0, []);
- }
- var plugins = {
- AsymmetricMatcher: plugin$5,
- DOMCollection: plugin$4,
- DOMElement: plugin$3,
- Immutable: plugin$2,
- ReactElement: plugin$1,
- ReactTestComponent: plugin,
- Error: ErrorPlugin
- };
-
- // ../../node_modules/loupe/lib/helpers.js
- var ansiColors = {
- bold: ["1", "22"],
- dim: ["2", "22"],
- italic: ["3", "23"],
- underline: ["4", "24"],
- // 5 & 6 are blinking
- inverse: ["7", "27"],
- hidden: ["8", "28"],
- strike: ["9", "29"],
- // 10-20 are fonts
- // 21-29 are resets for 1-9
- black: ["30", "39"],
- red: ["31", "39"],
- green: ["32", "39"],
- yellow: ["33", "39"],
- blue: ["34", "39"],
- magenta: ["35", "39"],
- cyan: ["36", "39"],
- white: ["37", "39"],
- brightblack: ["30;1", "39"],
- brightred: ["31;1", "39"],
- brightgreen: ["32;1", "39"],
- brightyellow: ["33;1", "39"],
- brightblue: ["34;1", "39"],
- brightmagenta: ["35;1", "39"],
- brightcyan: ["36;1", "39"],
- brightwhite: ["37;1", "39"],
- grey: ["90", "39"]
- }, styles = {
- special: "cyan",
- number: "yellow",
- bigint: "yellow",
- boolean: "yellow",
- undefined: "grey",
- null: "bold",
- string: "green",
- symbol: "green",
- date: "magenta",
- regexp: "red"
- }, truncator = "\u2026";
- function colorise(value, styleType) {
- let color2 = ansiColors[styles[styleType]] || ansiColors[styleType] || "";
- return color2 ? `\x1B[${color2[0]}m${String(value)}\x1B[${color2[1]}m` : String(value);
- }
- function normaliseOptions({
- showHidden = !1,
- depth = 2,
- colors: colors3 = !1,
- customInspect = !0,
- showProxy = !1,
- maxArrayLength = 1 / 0,
- breakLength = 1 / 0,
- seen = [],
- // eslint-disable-next-line no-shadow
- truncate: truncate3 = 1 / 0,
- stylize = String
- } = {}, inspect5) {
- let options = {
- showHidden: !!showHidden,
- depth: Number(depth),
- colors: !!colors3,
- customInspect: !!customInspect,
- showProxy: !!showProxy,
- maxArrayLength: Number(maxArrayLength),
- breakLength: Number(breakLength),
- truncate: Number(truncate3),
- seen,
- inspect: inspect5,
- stylize
- };
- return options.colors && (options.stylize = colorise), options;
- }
- function isHighSurrogate(char2) {
- return char2 >= "\uD800" && char2 <= "\uDBFF";
- }
- function truncate(string, length2, tail2 = truncator) {
- string = String(string);
- let tailLength = tail2.length, stringLength = string.length;
- if (tailLength > length2 && stringLength > tailLength)
- return tail2;
- if (stringLength > length2 && stringLength > tailLength) {
- let end2 = length2 - tailLength;
- return end2 > 0 && isHighSurrogate(string[end2 - 1]) && (end2 = end2 - 1), `${string.slice(0, end2)}${tail2}`;
- }
- return string;
- }
- function inspectList(list, options, inspectItem, separator = ", ") {
- inspectItem = inspectItem || options.inspect;
- let size = list.length;
- if (size === 0)
- return "";
- let originalLength = options.truncate, output = "", peek2 = "", truncated = "";
- for (let i = 0; i < size; i += 1) {
- let last2 = i + 1 === list.length, secondToLast = i + 2 === list.length;
- truncated = `${truncator}(${list.length - i})`;
- let value = list[i];
- options.truncate = originalLength - output.length - (last2 ? 0 : separator.length);
- let string = peek2 || inspectItem(value, options) + (last2 ? "" : separator), nextLength = output.length + string.length, truncatedLength = nextLength + truncated.length;
- if (last2 && nextLength > originalLength && output.length + truncated.length <= originalLength || !last2 && !secondToLast && truncatedLength > originalLength || (peek2 = last2 ? "" : inspectItem(list[i + 1], options) + (secondToLast ? "" : separator), !last2 && secondToLast && truncatedLength > originalLength && nextLength + peek2.length > originalLength))
- break;
- if (output += string, !last2 && !secondToLast && nextLength + peek2.length >= originalLength) {
- truncated = `${truncator}(${list.length - i - 1})`;
- break;
- }
- truncated = "";
- }
- return `${output}${truncated}`;
- }
- function quoteComplexKey(key) {
- return key.match(/^[a-zA-Z_][a-zA-Z_0-9]*$/) ? key : JSON.stringify(key).replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'");
- }
- function inspectProperty([key, value], options) {
- return options.truncate -= 2, typeof key == "string" ? key = quoteComplexKey(key) : typeof key != "number" && (key = `[${options.inspect(key, options)}]`), options.truncate -= key.length, value = options.inspect(value, options), `${key}: ${value}`;
- }
-
- // ../../node_modules/loupe/lib/array.js
- function inspectArray(array, options) {
- let nonIndexProperties = Object.keys(array).slice(array.length);
- if (!array.length && !nonIndexProperties.length)
- return "[]";
- options.truncate -= 4;
- let listContents = inspectList(array, options);
- options.truncate -= listContents.length;
- let propertyContents = "";
- return nonIndexProperties.length && (propertyContents = inspectList(nonIndexProperties.map((key) => [key, array[key]]), options, inspectProperty)), `[ ${listContents}${propertyContents ? `, ${propertyContents}` : ""} ]`;
- }
-
- // ../../node_modules/loupe/lib/typedarray.js
- var getArrayName = (array) => typeof Buffer == "function" && array instanceof Buffer ? "Buffer" : array[Symbol.toStringTag] ? array[Symbol.toStringTag] : array.constructor.name;
- function inspectTypedArray(array, options) {
- let name = getArrayName(array);
- options.truncate -= name.length + 4;
- let nonIndexProperties = Object.keys(array).slice(array.length);
- if (!array.length && !nonIndexProperties.length)
- return `${name}[]`;
- let output = "";
- for (let i = 0; i < array.length; i++) {
- let string = `${options.stylize(truncate(array[i], options.truncate), "number")}${i === array.length - 1 ? "" : ", "}`;
- if (options.truncate -= string.length, array[i] !== array.length && options.truncate <= 3) {
- output += `${truncator}(${array.length - array[i] + 1})`;
- break;
- }
- output += string;
- }
- let propertyContents = "";
- return nonIndexProperties.length && (propertyContents = inspectList(nonIndexProperties.map((key) => [key, array[key]]), options, inspectProperty)), `${name}[ ${output}${propertyContents ? `, ${propertyContents}` : ""} ]`;
- }
-
- // ../../node_modules/loupe/lib/date.js
- function inspectDate(dateObject, options) {
- let stringRepresentation = dateObject.toJSON();
- if (stringRepresentation === null)
- return "Invalid Date";
- let split = stringRepresentation.split("T"), date = split[0];
- return options.stylize(`${date}T${truncate(split[1], options.truncate - date.length - 1)}`, "date");
- }
-
- // ../../node_modules/loupe/lib/function.js
- function inspectFunction(func, options) {
- let functionType = func[Symbol.toStringTag] || "Function", name = func.name;
- return name ? options.stylize(`[${functionType} ${truncate(name, options.truncate - 11)}]`, "special") : options.stylize(`[${functionType}]`, "special");
- }
-
- // ../../node_modules/loupe/lib/map.js
- function inspectMapEntry([key, value], options) {
- return options.truncate -= 4, key = options.inspect(key, options), options.truncate -= key.length, value = options.inspect(value, options), `${key} => ${value}`;
- }
- function mapToEntries(map2) {
- let entries = [];
- return map2.forEach((value, key) => {
- entries.push([key, value]);
- }), entries;
- }
- function inspectMap(map2, options) {
- return map2.size === 0 ? "Map{}" : (options.truncate -= 7, `Map{ ${inspectList(mapToEntries(map2), options, inspectMapEntry)} }`);
- }
-
- // ../../node_modules/loupe/lib/number.js
- var isNaN2 = Number.isNaN || ((i) => i !== i);
- function inspectNumber(number, options) {
- return isNaN2(number) ? options.stylize("NaN", "number") : number === 1 / 0 ? options.stylize("Infinity", "number") : number === -1 / 0 ? options.stylize("-Infinity", "number") : number === 0 ? options.stylize(1 / number === 1 / 0 ? "+0" : "-0", "number") : options.stylize(truncate(String(number), options.truncate), "number");
- }
-
- // ../../node_modules/loupe/lib/bigint.js
- function inspectBigInt(number, options) {
- let nums = truncate(number.toString(), options.truncate - 1);
- return nums !== truncator && (nums += "n"), options.stylize(nums, "bigint");
- }
-
- // ../../node_modules/loupe/lib/regexp.js
- function inspectRegExp(value, options) {
- let flags = value.toString().split("/")[2], sourceLength = options.truncate - (2 + flags.length), source = value.source;
- return options.stylize(`/${truncate(source, sourceLength)}/${flags}`, "regexp");
- }
-
- // ../../node_modules/loupe/lib/set.js
- function arrayFromSet(set3) {
- let values = [];
- return set3.forEach((value) => {
- values.push(value);
- }), values;
- }
- function inspectSet(set3, options) {
- return set3.size === 0 ? "Set{}" : (options.truncate -= 7, `Set{ ${inspectList(arrayFromSet(set3), options)} }`);
- }
-
- // ../../node_modules/loupe/lib/string.js
- var stringEscapeChars = new RegExp("['\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]", "g"), escapeCharacters = {
- "\b": "\\b",
- " ": "\\t",
- "\n": "\\n",
- "\f": "\\f",
- "\r": "\\r",
- "'": "\\'",
- "\\": "\\\\"
- }, hex = 16, unicodeLength = 4;
- function escape(char2) {
- return escapeCharacters[char2] || `\\u${`0000${char2.charCodeAt(0).toString(hex)}`.slice(-unicodeLength)}`;
- }
- function inspectString(string, options) {
- return stringEscapeChars.test(string) && (string = string.replace(stringEscapeChars, escape)), options.stylize(`'${truncate(string, options.truncate - 2)}'`, "string");
- }
-
- // ../../node_modules/loupe/lib/symbol.js
- function inspectSymbol(value) {
- return "description" in Symbol.prototype ? value.description ? `Symbol(${value.description})` : "Symbol()" : value.toString();
- }
-
- // ../../node_modules/loupe/lib/promise.js
- var getPromiseValue = () => "Promise{\u2026}";
- try {
- let { getPromiseDetails, kPending, kRejected } = process.binding("util");
- Array.isArray(getPromiseDetails(Promise.resolve())) && (getPromiseValue = (value, options) => {
- let [state3, innerValue] = getPromiseDetails(value);
- return state3 === kPending ? "Promise{<pending>}" : `Promise${state3 === kRejected ? "!" : ""}{${options.inspect(innerValue, options)}}`;
- });
- } catch {
- }
- var promise_default = getPromiseValue;
-
- // ../../node_modules/loupe/lib/object.js
- function inspectObject(object, options) {
- let properties = Object.getOwnPropertyNames(object), symbols = Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(object) : [];
- if (properties.length === 0 && symbols.length === 0)
- return "{}";
- if (options.truncate -= 4, options.seen = options.seen || [], options.seen.includes(object))
- return "[Circular]";
- options.seen.push(object);
- let propertyContents = inspectList(properties.map((key) => [key, object[key]]), options, inspectProperty), symbolContents = inspectList(symbols.map((key) => [key, object[key]]), options, inspectProperty);
- options.seen.pop();
- let sep = "";
- return propertyContents && symbolContents && (sep = ", "), `{ ${propertyContents}${sep}${symbolContents} }`;
- }
-
- // ../../node_modules/loupe/lib/class.js
- var toStringTag = typeof Symbol < "u" && Symbol.toStringTag ? Symbol.toStringTag : !1;
- function inspectClass(value, options) {
- let name = "";
- return toStringTag && toStringTag in value && (name = value[toStringTag]), name = name || value.constructor.name, (!name || name === "_class") && (name = "<Anonymous Class>"), options.truncate -= name.length, `${name}${inspectObject(value, options)}`;
- }
-
- // ../../node_modules/loupe/lib/arguments.js
- function inspectArguments(args, options) {
- return args.length === 0 ? "Arguments[]" : (options.truncate -= 13, `Arguments[ ${inspectList(args, options)} ]`);
- }
-
- // ../../node_modules/loupe/lib/error.js
- var errorKeys = [
- "stack",
- "line",
- "column",
- "name",
- "message",
- "fileName",
- "lineNumber",
- "columnNumber",
- "number",
- "description",
- "cause"
- ];
- function inspectObject2(error, options) {
- let properties = Object.getOwnPropertyNames(error).filter((key) => errorKeys.indexOf(key) === -1), name = error.name;
- options.truncate -= name.length;
- let message = "";
- if (typeof error.message == "string" ? message = truncate(error.message, options.truncate) : properties.unshift("message"), message = message ? `: ${message}` : "", options.truncate -= message.length + 5, options.seen = options.seen || [], options.seen.includes(error))
- return "[Circular]";
- options.seen.push(error);
- let propertyContents = inspectList(properties.map((key) => [key, error[key]]), options, inspectProperty);
- return `${name}${message}${propertyContents ? ` { ${propertyContents} }` : ""}`;
- }
-
- // ../../node_modules/loupe/lib/html.js
- function inspectAttribute([key, value], options) {
- return options.truncate -= 3, value ? `${options.stylize(String(key), "yellow")}=${options.stylize(`"${value}"`, "string")}` : `${options.stylize(String(key), "yellow")}`;
- }
- function inspectNodeCollection(collection, options) {
- return inspectList(collection, options, inspectNode, `
- `);
- }
- function inspectNode(node2, options) {
- switch (node2.nodeType) {
- case 1:
- return inspectHTML(node2, options);
- case 3:
- return options.inspect(node2.data, options);
- default:
- return options.inspect(node2, options);
- }
- }
- function inspectHTML(element, options) {
- let properties = element.getAttributeNames(), name = element.tagName.toLowerCase(), head2 = options.stylize(`<${name}`, "special"), headClose = options.stylize(">", "special"), tail2 = options.stylize(`</${name}>`, "special");
- options.truncate -= name.length * 2 + 5;
- let propertyContents = "";
- properties.length > 0 && (propertyContents += " ", propertyContents += inspectList(properties.map((key) => [key, element.getAttribute(key)]), options, inspectAttribute, " ")), options.truncate -= propertyContents.length;
- let truncate3 = options.truncate, children = inspectNodeCollection(element.children, options);
- return children && children.length > truncate3 && (children = `${truncator}(${element.children.length})`), `${head2}${propertyContents}${headClose}${children}${tail2}`;
- }
-
- // ../../node_modules/loupe/lib/index.js
- var symbolsSupported = typeof Symbol == "function" && typeof Symbol.for == "function", chaiInspect = symbolsSupported ? Symbol.for("chai/inspect") : "@@chai/inspect", nodeInspect = Symbol.for("nodejs.util.inspect.custom"), constructorMap = /* @__PURE__ */ new WeakMap(), stringTagMap = {}, baseTypesMap = {
- undefined: (value, options) => options.stylize("undefined", "undefined"),
- null: (value, options) => options.stylize("null", "null"),
- boolean: (value, options) => options.stylize(String(value), "boolean"),
- Boolean: (value, options) => options.stylize(String(value), "boolean"),
- number: inspectNumber,
- Number: inspectNumber,
- bigint: inspectBigInt,
- BigInt: inspectBigInt,
- string: inspectString,
- String: inspectString,
- function: inspectFunction,
- Function: inspectFunction,
- symbol: inspectSymbol,
- // A Symbol polyfill will return `Symbol` not `symbol` from typedetect
- Symbol: inspectSymbol,
- Array: inspectArray,
- Date: inspectDate,
- Map: inspectMap,
- Set: inspectSet,
- RegExp: inspectRegExp,
- Promise: promise_default,
- // WeakSet, WeakMap are totally opaque to us
- WeakSet: (value, options) => options.stylize("WeakSet{\u2026}", "special"),
- WeakMap: (value, options) => options.stylize("WeakMap{\u2026}", "special"),
- Arguments: inspectArguments,
- Int8Array: inspectTypedArray,
- Uint8Array: inspectTypedArray,
- Uint8ClampedArray: inspectTypedArray,
- Int16Array: inspectTypedArray,
- Uint16Array: inspectTypedArray,
- Int32Array: inspectTypedArray,
- Uint32Array: inspectTypedArray,
- Float32Array: inspectTypedArray,
- Float64Array: inspectTypedArray,
- Generator: () => "",
- DataView: () => "",
- ArrayBuffer: () => "",
- Error: inspectObject2,
- HTMLCollection: inspectNodeCollection,
- NodeList: inspectNodeCollection
- }, inspectCustom = (value, options, type5) => chaiInspect in value && typeof value[chaiInspect] == "function" ? value[chaiInspect](options) : nodeInspect in value && typeof value[nodeInspect] == "function" ? value[nodeInspect](options.depth, options) : "inspect" in value && typeof value.inspect == "function" ? value.inspect(options.depth, options) : "constructor" in value && constructorMap.has(value.constructor) ? constructorMap.get(value.constructor)(value, options) : stringTagMap[type5] ? stringTagMap[type5](value, options) : "", toString3 = Object.prototype.toString;
- function inspect2(value, opts = {}) {
- let options = normaliseOptions(opts, inspect2), { customInspect } = options, type5 = value === null ? "null" : typeof value;
- if (type5 === "object" && (type5 = toString3.call(value).slice(8, -1)), type5 in baseTypesMap)
- return baseTypesMap[type5](value, options);
- if (customInspect && value) {
- let output = inspectCustom(value, options, type5);
- if (output)
- return typeof output == "string" ? output : inspect2(output, options);
- }
- let proto = value ? Object.getPrototypeOf(value) : !1;
- return proto === Object.prototype || proto === null ? inspectObject(value, options) : value && typeof HTMLElement == "function" && value instanceof HTMLElement ? inspectHTML(value, options) : "constructor" in value ? value.constructor !== Object ? inspectClass(value, options) : inspectObject(value, options) : value === Object(value) ? inspectObject(value, options) : options.stylize(String(value), type5);
- }
-
- // ../../node_modules/@vitest/utils/dist/chunk-_commonjsHelpers.js
- var { AsymmetricMatcher, DOMCollection, DOMElement, Immutable, ReactElement, ReactTestComponent } = plugins, PLUGINS = [
- ReactTestComponent,
- ReactElement,
- DOMElement,
- DOMCollection,
- Immutable,
- AsymmetricMatcher
- ];
- function stringify5(object, maxDepth = 10, { maxLength, ...options } = {}) {
- let MAX_LENGTH = maxLength ?? 1e4, result;
- try {
- result = format(object, {
- maxDepth,
- escapeString: !1,
- plugins: PLUGINS,
- ...options
- });
- } catch {
- result = format(object, {
- callToJSON: !1,
- maxDepth,
- escapeString: !1,
- plugins: PLUGINS,
- ...options
- });
- }
- return result.length >= MAX_LENGTH && maxDepth > 1 ? stringify5(object, Math.floor(Math.min(maxDepth, Number.MAX_SAFE_INTEGER) / 2), {
- maxLength,
- ...options
- }) : result;
- }
- var formatRegExp = /%[sdjifoOc%]/g;
- function format2(...args) {
- if (typeof args[0] != "string") {
- let objects = [];
- for (let i2 = 0; i2 < args.length; i2++)
- objects.push(inspect3(args[i2], {
- depth: 0,
- colors: !1
- }));
- return objects.join(" ");
- }
- let len = args.length, i = 1, template = args[0], str2 = String(template).replace(formatRegExp, (x) => {
- if (x === "%%")
- return "%";
- if (i >= len)
- return x;
- switch (x) {
- case "%s": {
- let value = args[i++];
- return typeof value == "bigint" ? `${value.toString()}n` : typeof value == "number" && value === 0 && 1 / value < 0 ? "-0" : typeof value == "object" && value !== null ? typeof value.toString == "function" && value.toString !== Object.prototype.toString ? value.toString() : inspect3(value, {
- depth: 0,
- colors: !1
- }) : String(value);
- }
- case "%d": {
- let value = args[i++];
- return typeof value == "bigint" ? `${value.toString()}n` : Number(value).toString();
- }
- case "%i": {
- let value = args[i++];
- return typeof value == "bigint" ? `${value.toString()}n` : Number.parseInt(String(value)).toString();
- }
- case "%f":
- return Number.parseFloat(String(args[i++])).toString();
- case "%o":
- return inspect3(args[i++], {
- showHidden: !0,
- showProxy: !0
- });
- case "%O":
- return inspect3(args[i++]);
- case "%c":
- return i++, "";
- case "%j":
- try {
- return JSON.stringify(args[i++]);
- } catch (err) {
- let m3 = err.message;
- if (m3.includes("circular structure") || m3.includes("cyclic structures") || m3.includes("cyclic object"))
- return "[Circular]";
- throw err;
- }
- default:
- return x;
- }
- });
- for (let x = args[i]; i < len; x = args[++i])
- x === null || typeof x != "object" ? str2 += ` ${x}` : str2 += ` ${inspect3(x)}`;
- return str2;
- }
- function inspect3(obj, options = {}) {
- return options.truncate === 0 && (options.truncate = Number.POSITIVE_INFINITY), inspect2(obj, options);
- }
- function getDefaultExportFromCjs2(x) {
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x.default : x;
- }
-
- // ../../node_modules/@vitest/utils/dist/helpers.js
- function assertTypes(value, name, types) {
- let receivedType = typeof value;
- if (!types.includes(receivedType))
- throw new TypeError(`${name} value must be ${types.join(" or ")}, received "${receivedType}"`);
- }
- function isObject5(item) {
- return item != null && typeof item == "object" && !Array.isArray(item);
- }
- function isFinalObj(obj) {
- return obj === Object.prototype || obj === Function.prototype || obj === RegExp.prototype;
- }
- function getType2(value) {
- return Object.prototype.toString.apply(value).slice(8, -1);
- }
- function collectOwnProperties(obj, collector) {
- let collect = typeof collector == "function" ? collector : (key) => collector.add(key);
- Object.getOwnPropertyNames(obj).forEach(collect), Object.getOwnPropertySymbols(obj).forEach(collect);
- }
- function getOwnProperties(obj) {
- let ownProps = /* @__PURE__ */ new Set();
- return isFinalObj(obj) ? [] : (collectOwnProperties(obj, ownProps), Array.from(ownProps));
- }
- var defaultCloneOptions = { forceWritable: !1 };
- function deepClone(val, options = defaultCloneOptions) {
- return clone2(val, /* @__PURE__ */ new WeakMap(), options);
- }
- function clone2(val, seen, options = defaultCloneOptions) {
- let k, out;
- if (seen.has(val))
- return seen.get(val);
- if (Array.isArray(val)) {
- for (out = Array.from({ length: k = val.length }), seen.set(val, out); k--; )
- out[k] = clone2(val[k], seen, options);
- return out;
- }
- if (Object.prototype.toString.call(val) === "[object Object]") {
- out = Object.create(Object.getPrototypeOf(val)), seen.set(val, out);
- let props = getOwnProperties(val);
- for (let k2 of props) {
- let descriptor = Object.getOwnPropertyDescriptor(val, k2);
- if (!descriptor)
- continue;
- let cloned = clone2(val[k2], seen, options);
- options.forceWritable ? Object.defineProperty(out, k2, {
- enumerable: descriptor.enumerable,
- configurable: !0,
- writable: !0,
- value: cloned
- }) : "get" in descriptor ? Object.defineProperty(out, k2, {
- ...descriptor,
- get() {
- return cloned;
- }
- }) : Object.defineProperty(out, k2, {
- ...descriptor,
- value: cloned
- });
- }
- return out;
- }
- return val;
- }
- function noop2() {
- }
-
- // ../../node_modules/@vitest/utils/dist/diff.js
- var DIFF_DELETE = -1, DIFF_INSERT = 1, DIFF_EQUAL = 0, Diff = class {
- 0;
- 1;
- constructor(op, text) {
- this[0] = op, this[1] = text;
- }
- };
- function diff_commonPrefix(text1, text2) {
- if (!text1 || !text2 || text1.charAt(0) !== text2.charAt(0))
- return 0;
- let pointermin = 0, pointermax = Math.min(text1.length, text2.length), pointermid = pointermax, pointerstart = 0;
- for (; pointermin < pointermid; )
- text1.substring(pointerstart, pointermid) === text2.substring(pointerstart, pointermid) ? (pointermin = pointermid, pointerstart = pointermin) : pointermax = pointermid, pointermid = Math.floor((pointermax - pointermin) / 2 + pointermin);
- return pointermid;
- }
- function diff_commonSuffix(text1, text2) {
- if (!text1 || !text2 || text1.charAt(text1.length - 1) !== text2.charAt(text2.length - 1))
- return 0;
- let pointermin = 0, pointermax = Math.min(text1.length, text2.length), pointermid = pointermax, pointerend = 0;
- for (; pointermin < pointermid; )
- text1.substring(text1.length - pointermid, text1.length - pointerend) === text2.substring(text2.length - pointermid, text2.length - pointerend) ? (pointermin = pointermid, pointerend = pointermin) : pointermax = pointermid, pointermid = Math.floor((pointermax - pointermin) / 2 + pointermin);
- return pointermid;
- }
- function diff_commonOverlap_(text1, text2) {
- let text1_length = text1.length, text2_length = text2.length;
- if (text1_length === 0 || text2_length === 0)
- return 0;
- text1_length > text2_length ? text1 = text1.substring(text1_length - text2_length) : text1_length < text2_length && (text2 = text2.substring(0, text1_length));
- let text_length = Math.min(text1_length, text2_length);
- if (text1 === text2)
- return text_length;
- let best = 0, length2 = 1;
- for (; ; ) {
- let pattern = text1.substring(text_length - length2), found = text2.indexOf(pattern);
- if (found === -1)
- return best;
- length2 += found, (found === 0 || text1.substring(text_length - length2) === text2.substring(0, length2)) && (best = length2, length2++);
- }
- }
- function diff_cleanupSemantic(diffs) {
- let changes = !1, equalities = [], equalitiesLength = 0, lastEquality = null, pointer4 = 0, length_insertions1 = 0, length_deletions1 = 0, length_insertions2 = 0, length_deletions2 = 0;
- for (; pointer4 < diffs.length; )
- diffs[pointer4][0] === DIFF_EQUAL ? (equalities[equalitiesLength++] = pointer4, length_insertions1 = length_insertions2, length_deletions1 = length_deletions2, length_insertions2 = 0, length_deletions2 = 0, lastEquality = diffs[pointer4][1]) : (diffs[pointer4][0] === DIFF_INSERT ? length_insertions2 += diffs[pointer4][1].length : length_deletions2 += diffs[pointer4][1].length, lastEquality && lastEquality.length <= Math.max(length_insertions1, length_deletions1) && lastEquality.length <= Math.max(length_insertions2, length_deletions2) && (diffs.splice(equalities[equalitiesLength - 1], 0, new Diff(DIFF_DELETE, lastEquality)), diffs[equalities[equalitiesLength - 1] + 1][0] = DIFF_INSERT, equalitiesLength--, equalitiesLength--, pointer4 = equalitiesLength > 0 ? equalities[equalitiesLength - 1] : -1, length_insertions1 = 0, length_deletions1 = 0, length_insertions2 = 0, length_deletions2 = 0, lastEquality = null, changes = !0)), pointer4++;
- for (changes && diff_cleanupMerge(diffs), diff_cleanupSemanticLossless(diffs), pointer4 = 1; pointer4 < diffs.length; ) {
- if (diffs[pointer4 - 1][0] === DIFF_DELETE && diffs[pointer4][0] === DIFF_INSERT) {
- let deletion = diffs[pointer4 - 1][1], insertion = diffs[pointer4][1], overlap_length1 = diff_commonOverlap_(deletion, insertion), overlap_length2 = diff_commonOverlap_(insertion, deletion);
- overlap_length1 >= overlap_length2 ? (overlap_length1 >= deletion.length / 2 || overlap_length1 >= insertion.length / 2) && (diffs.splice(pointer4, 0, new Diff(DIFF_EQUAL, insertion.substring(0, overlap_length1))), diffs[pointer4 - 1][1] = deletion.substring(0, deletion.length - overlap_length1), diffs[pointer4 + 1][1] = insertion.substring(overlap_length1), pointer4++) : (overlap_length2 >= deletion.length / 2 || overlap_length2 >= insertion.length / 2) && (diffs.splice(pointer4, 0, new Diff(DIFF_EQUAL, deletion.substring(0, overlap_length2))), diffs[pointer4 - 1][0] = DIFF_INSERT, diffs[pointer4 - 1][1] = insertion.substring(0, insertion.length - overlap_length2), diffs[pointer4 + 1][0] = DIFF_DELETE, diffs[pointer4 + 1][1] = deletion.substring(overlap_length2), pointer4++), pointer4++;
- }
- pointer4++;
- }
- }
- var nonAlphaNumericRegex_ = /[^a-z0-9]/i, whitespaceRegex_ = /\s/, linebreakRegex_ = /[\r\n]/, blanklineEndRegex_ = /\n\r?\n$/, blanklineStartRegex_ = /^\r?\n\r?\n/;
- function diff_cleanupSemanticLossless(diffs) {
- let pointer4 = 1;
- for (; pointer4 < diffs.length - 1; ) {
- if (diffs[pointer4 - 1][0] === DIFF_EQUAL && diffs[pointer4 + 1][0] === DIFF_EQUAL) {
- let equality1 = diffs[pointer4 - 1][1], edit = diffs[pointer4][1], equality2 = diffs[pointer4 + 1][1], commonOffset = diff_commonSuffix(equality1, edit);
- if (commonOffset) {
- let commonString = edit.substring(edit.length - commonOffset);
- equality1 = equality1.substring(0, equality1.length - commonOffset), edit = commonString + edit.substring(0, edit.length - commonOffset), equality2 = commonString + equality2;
- }
- let bestEquality1 = equality1, bestEdit = edit, bestEquality2 = equality2, bestScore = diff_cleanupSemanticScore_(equality1, edit) + diff_cleanupSemanticScore_(edit, equality2);
- for (; edit.charAt(0) === equality2.charAt(0); ) {
- equality1 += edit.charAt(0), edit = edit.substring(1) + equality2.charAt(0), equality2 = equality2.substring(1);
- let score = diff_cleanupSemanticScore_(equality1, edit) + diff_cleanupSemanticScore_(edit, equality2);
- score >= bestScore && (bestScore = score, bestEquality1 = equality1, bestEdit = edit, bestEquality2 = equality2);
- }
- diffs[pointer4 - 1][1] !== bestEquality1 && (bestEquality1 ? diffs[pointer4 - 1][1] = bestEquality1 : (diffs.splice(pointer4 - 1, 1), pointer4--), diffs[pointer4][1] = bestEdit, bestEquality2 ? diffs[pointer4 + 1][1] = bestEquality2 : (diffs.splice(pointer4 + 1, 1), pointer4--));
- }
- pointer4++;
- }
- }
- function diff_cleanupMerge(diffs) {
- diffs.push(new Diff(DIFF_EQUAL, ""));
- let pointer4 = 0, count_delete = 0, count_insert = 0, text_delete = "", text_insert = "", commonlength;
- for (; pointer4 < diffs.length; )
- switch (diffs[pointer4][0]) {
- case DIFF_INSERT:
- count_insert++, text_insert += diffs[pointer4][1], pointer4++;
- break;
- case DIFF_DELETE:
- count_delete++, text_delete += diffs[pointer4][1], pointer4++;
- break;
- case DIFF_EQUAL:
- count_delete + count_insert > 1 ? (count_delete !== 0 && count_insert !== 0 && (commonlength = diff_commonPrefix(text_insert, text_delete), commonlength !== 0 && (pointer4 - count_delete - count_insert > 0 && diffs[pointer4 - count_delete - count_insert - 1][0] === DIFF_EQUAL ? diffs[pointer4 - count_delete - count_insert - 1][1] += text_insert.substring(0, commonlength) : (diffs.splice(0, 0, new Diff(DIFF_EQUAL, text_insert.substring(0, commonlength))), pointer4++), text_insert = text_insert.substring(commonlength), text_delete = text_delete.substring(commonlength)), commonlength = diff_commonSuffix(text_insert, text_delete), commonlength !== 0 && (diffs[pointer4][1] = text_insert.substring(text_insert.length - commonlength) + diffs[pointer4][1], text_insert = text_insert.substring(0, text_insert.length - commonlength), text_delete = text_delete.substring(0, text_delete.length - commonlength))), pointer4 -= count_delete + count_insert, diffs.splice(pointer4, count_delete + count_insert), text_delete.length && (diffs.splice(pointer4, 0, new Diff(DIFF_DELETE, text_delete)), pointer4++), text_insert.length && (diffs.splice(pointer4, 0, new Diff(DIFF_INSERT, text_insert)), pointer4++), pointer4++) : pointer4 !== 0 && diffs[pointer4 - 1][0] === DIFF_EQUAL ? (diffs[pointer4 - 1][1] += diffs[pointer4][1], diffs.splice(pointer4, 1)) : pointer4++, count_insert = 0, count_delete = 0, text_delete = "", text_insert = "";
- break;
- }
- diffs[diffs.length - 1][1] === "" && diffs.pop();
- let changes = !1;
- for (pointer4 = 1; pointer4 < diffs.length - 1; )
- diffs[pointer4 - 1][0] === DIFF_EQUAL && diffs[pointer4 + 1][0] === DIFF_EQUAL && (diffs[pointer4][1].substring(diffs[pointer4][1].length - diffs[pointer4 - 1][1].length) === diffs[pointer4 - 1][1] ? (diffs[pointer4][1] = diffs[pointer4 - 1][1] + diffs[pointer4][1].substring(0, diffs[pointer4][1].length - diffs[pointer4 - 1][1].length), diffs[pointer4 + 1][1] = diffs[pointer4 - 1][1] + diffs[pointer4 + 1][1], diffs.splice(pointer4 - 1, 1), changes = !0) : diffs[pointer4][1].substring(0, diffs[pointer4 + 1][1].length) === diffs[pointer4 + 1][1] && (diffs[pointer4 - 1][1] += diffs[pointer4 + 1][1], diffs[pointer4][1] = diffs[pointer4][1].substring(diffs[pointer4 + 1][1].length) + diffs[pointer4 + 1][1], diffs.splice(pointer4 + 1, 1), changes = !0)), pointer4++;
- changes && diff_cleanupMerge(diffs);
- }
- function diff_cleanupSemanticScore_(one, two) {
- if (!one || !two)
- return 6;
- let char1 = one.charAt(one.length - 1), char2 = two.charAt(0), nonAlphaNumeric1 = char1.match(nonAlphaNumericRegex_), nonAlphaNumeric2 = char2.match(nonAlphaNumericRegex_), whitespace1 = nonAlphaNumeric1 && char1.match(whitespaceRegex_), whitespace2 = nonAlphaNumeric2 && char2.match(whitespaceRegex_), lineBreak1 = whitespace1 && char1.match(linebreakRegex_), lineBreak2 = whitespace2 && char2.match(linebreakRegex_), blankLine1 = lineBreak1 && one.match(blanklineEndRegex_), blankLine2 = lineBreak2 && two.match(blanklineStartRegex_);
- return blankLine1 || blankLine2 ? 5 : lineBreak1 || lineBreak2 ? 4 : nonAlphaNumeric1 && !whitespace1 && whitespace2 ? 3 : whitespace1 || whitespace2 ? 2 : nonAlphaNumeric1 || nonAlphaNumeric2 ? 1 : 0;
- }
- var NO_DIFF_MESSAGE = "Compared values have no visual difference.", SIMILAR_MESSAGE = "Compared values serialize to the same structure.\nPrinting internal object structure without calling `toJSON` instead.", build = {}, hasRequiredBuild;
- function requireBuild() {
- if (hasRequiredBuild) return build;
- hasRequiredBuild = 1, Object.defineProperty(build, "__esModule", {
- value: !0
- }), build.default = diffSequence;
- let pkg = "diff-sequences", NOT_YET_SET = 0, countCommonItemsF = (aIndex, aEnd, bIndex, bEnd, isCommon) => {
- let nCommon = 0;
- for (; aIndex < aEnd && bIndex < bEnd && isCommon(aIndex, bIndex); )
- aIndex += 1, bIndex += 1, nCommon += 1;
- return nCommon;
- }, countCommonItemsR = (aStart, aIndex, bStart, bIndex, isCommon) => {
- let nCommon = 0;
- for (; aStart <= aIndex && bStart <= bIndex && isCommon(aIndex, bIndex); )
- aIndex -= 1, bIndex -= 1, nCommon += 1;
- return nCommon;
- }, extendPathsF = (d, aEnd, bEnd, bF, isCommon, aIndexesF, iMaxF) => {
- let iF = 0, kF = -d, aFirst = aIndexesF[iF], aIndexPrev1 = aFirst;
- aIndexesF[iF] += countCommonItemsF(
- aFirst + 1,
- aEnd,
- bF + aFirst - kF + 1,
- bEnd,
- isCommon
- );
- let nF = d < iMaxF ? d : iMaxF;
- for (iF += 1, kF += 2; iF <= nF; iF += 1, kF += 2) {
- if (iF !== d && aIndexPrev1 < aIndexesF[iF])
- aFirst = aIndexesF[iF];
- else if (aFirst = aIndexPrev1 + 1, aEnd <= aFirst)
- return iF - 1;
- aIndexPrev1 = aIndexesF[iF], aIndexesF[iF] = aFirst + countCommonItemsF(aFirst + 1, aEnd, bF + aFirst - kF + 1, bEnd, isCommon);
- }
- return iMaxF;
- }, extendPathsR = (d, aStart, bStart, bR, isCommon, aIndexesR, iMaxR) => {
- let iR = 0, kR = d, aFirst = aIndexesR[iR], aIndexPrev1 = aFirst;
- aIndexesR[iR] -= countCommonItemsR(
- aStart,
- aFirst - 1,
- bStart,
- bR + aFirst - kR - 1,
- isCommon
- );
- let nR = d < iMaxR ? d : iMaxR;
- for (iR += 1, kR -= 2; iR <= nR; iR += 1, kR -= 2) {
- if (iR !== d && aIndexesR[iR] < aIndexPrev1)
- aFirst = aIndexesR[iR];
- else if (aFirst = aIndexPrev1 - 1, aFirst < aStart)
- return iR - 1;
- aIndexPrev1 = aIndexesR[iR], aIndexesR[iR] = aFirst - countCommonItemsR(
- aStart,
- aFirst - 1,
- bStart,
- bR + aFirst - kR - 1,
- isCommon
- );
- }
- return iMaxR;
- }, extendOverlappablePathsF = (d, aStart, aEnd, bStart, bEnd, isCommon, aIndexesF, iMaxF, aIndexesR, iMaxR, division) => {
- let bF = bStart - aStart, aLength = aEnd - aStart, baDeltaLength = bEnd - bStart - aLength, kMinOverlapF = -baDeltaLength - (d - 1), kMaxOverlapF = -baDeltaLength + (d - 1), aIndexPrev1 = NOT_YET_SET, nF = d < iMaxF ? d : iMaxF;
- for (let iF = 0, kF = -d; iF <= nF; iF += 1, kF += 2) {
- let insert = iF === 0 || iF !== d && aIndexPrev1 < aIndexesF[iF], aLastPrev = insert ? aIndexesF[iF] : aIndexPrev1, aFirst = insert ? aLastPrev : aLastPrev + 1, bFirst = bF + aFirst - kF, nCommonF = countCommonItemsF(
- aFirst + 1,
- aEnd,
- bFirst + 1,
- bEnd,
- isCommon
- ), aLast = aFirst + nCommonF;
- if (aIndexPrev1 = aIndexesF[iF], aIndexesF[iF] = aLast, kMinOverlapF <= kF && kF <= kMaxOverlapF) {
- let iR = (d - 1 - (kF + baDeltaLength)) / 2;
- if (iR <= iMaxR && aIndexesR[iR] - 1 <= aLast) {
- let bLastPrev = bF + aLastPrev - (insert ? kF + 1 : kF - 1), nCommonR = countCommonItemsR(
- aStart,
- aLastPrev,
- bStart,
- bLastPrev,
- isCommon
- ), aIndexPrevFirst = aLastPrev - nCommonR, bIndexPrevFirst = bLastPrev - nCommonR, aEndPreceding = aIndexPrevFirst + 1, bEndPreceding = bIndexPrevFirst + 1;
- division.nChangePreceding = d - 1, d - 1 === aEndPreceding + bEndPreceding - aStart - bStart ? (division.aEndPreceding = aStart, division.bEndPreceding = bStart) : (division.aEndPreceding = aEndPreceding, division.bEndPreceding = bEndPreceding), division.nCommonPreceding = nCommonR, nCommonR !== 0 && (division.aCommonPreceding = aEndPreceding, division.bCommonPreceding = bEndPreceding), division.nCommonFollowing = nCommonF, nCommonF !== 0 && (division.aCommonFollowing = aFirst + 1, division.bCommonFollowing = bFirst + 1);
- let aStartFollowing = aLast + 1, bStartFollowing = bFirst + nCommonF + 1;
- return division.nChangeFollowing = d - 1, d - 1 === aEnd + bEnd - aStartFollowing - bStartFollowing ? (division.aStartFollowing = aEnd, division.bStartFollowing = bEnd) : (division.aStartFollowing = aStartFollowing, division.bStartFollowing = bStartFollowing), !0;
- }
- }
- }
- return !1;
- }, extendOverlappablePathsR = (d, aStart, aEnd, bStart, bEnd, isCommon, aIndexesF, iMaxF, aIndexesR, iMaxR, division) => {
- let bR = bEnd - aEnd, aLength = aEnd - aStart, baDeltaLength = bEnd - bStart - aLength, kMinOverlapR = baDeltaLength - d, kMaxOverlapR = baDeltaLength + d, aIndexPrev1 = NOT_YET_SET, nR = d < iMaxR ? d : iMaxR;
- for (let iR = 0, kR = d; iR <= nR; iR += 1, kR -= 2) {
- let insert = iR === 0 || iR !== d && aIndexesR[iR] < aIndexPrev1, aLastPrev = insert ? aIndexesR[iR] : aIndexPrev1, aFirst = insert ? aLastPrev : aLastPrev - 1, bFirst = bR + aFirst - kR, nCommonR = countCommonItemsR(
- aStart,
- aFirst - 1,
- bStart,
- bFirst - 1,
- isCommon
- ), aLast = aFirst - nCommonR;
- if (aIndexPrev1 = aIndexesR[iR], aIndexesR[iR] = aLast, kMinOverlapR <= kR && kR <= kMaxOverlapR) {
- let iF = (d + (kR - baDeltaLength)) / 2;
- if (iF <= iMaxF && aLast - 1 <= aIndexesF[iF]) {
- let bLast = bFirst - nCommonR;
- if (division.nChangePreceding = d, d === aLast + bLast - aStart - bStart ? (division.aEndPreceding = aStart, division.bEndPreceding = bStart) : (division.aEndPreceding = aLast, division.bEndPreceding = bLast), division.nCommonPreceding = nCommonR, nCommonR !== 0 && (division.aCommonPreceding = aLast, division.bCommonPreceding = bLast), division.nChangeFollowing = d - 1, d === 1)
- division.nCommonFollowing = 0, division.aStartFollowing = aEnd, division.bStartFollowing = bEnd;
- else {
- let bLastPrev = bR + aLastPrev - (insert ? kR - 1 : kR + 1), nCommonF = countCommonItemsF(
- aLastPrev,
- aEnd,
- bLastPrev,
- bEnd,
- isCommon
- );
- division.nCommonFollowing = nCommonF, nCommonF !== 0 && (division.aCommonFollowing = aLastPrev, division.bCommonFollowing = bLastPrev);
- let aStartFollowing = aLastPrev + nCommonF, bStartFollowing = bLastPrev + nCommonF;
- d - 1 === aEnd + bEnd - aStartFollowing - bStartFollowing ? (division.aStartFollowing = aEnd, division.bStartFollowing = bEnd) : (division.aStartFollowing = aStartFollowing, division.bStartFollowing = bStartFollowing);
- }
- return !0;
- }
- }
- }
- return !1;
- }, divide = (nChange, aStart, aEnd, bStart, bEnd, isCommon, aIndexesF, aIndexesR, division) => {
- let bF = bStart - aStart, bR = bEnd - aEnd, aLength = aEnd - aStart, bLength = bEnd - bStart, baDeltaLength = bLength - aLength, iMaxF = aLength, iMaxR = aLength;
- if (aIndexesF[0] = aStart - 1, aIndexesR[0] = aEnd, baDeltaLength % 2 === 0) {
- let dMin = (nChange || baDeltaLength) / 2, dMax = (aLength + bLength) / 2;
- for (let d = 1; d <= dMax; d += 1)
- if (iMaxF = extendPathsF(d, aEnd, bEnd, bF, isCommon, aIndexesF, iMaxF), d < dMin)
- iMaxR = extendPathsR(d, aStart, bStart, bR, isCommon, aIndexesR, iMaxR);
- else if (
- // If a reverse path overlaps a forward path in the same diagonal,
- // return a division of the index intervals at the middle change.
- extendOverlappablePathsR(
- d,
- aStart,
- aEnd,
- bStart,
- bEnd,
- isCommon,
- aIndexesF,
- iMaxF,
- aIndexesR,
- iMaxR,
- division
- )
- )
- return;
- } else {
- let dMin = ((nChange || baDeltaLength) + 1) / 2, dMax = (aLength + bLength + 1) / 2, d = 1;
- for (iMaxF = extendPathsF(d, aEnd, bEnd, bF, isCommon, aIndexesF, iMaxF), d += 1; d <= dMax; d += 1)
- if (iMaxR = extendPathsR(
- d - 1,
- aStart,
- bStart,
- bR,
- isCommon,
- aIndexesR,
- iMaxR
- ), d < dMin)
- iMaxF = extendPathsF(d, aEnd, bEnd, bF, isCommon, aIndexesF, iMaxF);
- else if (
- // If a forward path overlaps a reverse path in the same diagonal,
- // return a division of the index intervals at the middle change.
- extendOverlappablePathsF(
- d,
- aStart,
- aEnd,
- bStart,
- bEnd,
- isCommon,
- aIndexesF,
- iMaxF,
- aIndexesR,
- iMaxR,
- division
- )
- )
- return;
- }
- throw new Error(
- `${pkg}: no overlap aStart=${aStart} aEnd=${aEnd} bStart=${bStart} bEnd=${bEnd}`
- );
- }, findSubsequences = (nChange, aStart, aEnd, bStart, bEnd, transposed, callbacks, aIndexesF, aIndexesR, division) => {
- if (bEnd - bStart < aEnd - aStart) {
- if (transposed = !transposed, transposed && callbacks.length === 1) {
- let { foundSubsequence: foundSubsequence2, isCommon: isCommon2 } = callbacks[0];
- callbacks[1] = {
- foundSubsequence: (nCommon, bCommon, aCommon) => {
- foundSubsequence2(nCommon, aCommon, bCommon);
- },
- isCommon: (bIndex, aIndex) => isCommon2(aIndex, bIndex)
- };
- }
- let tStart = aStart, tEnd = aEnd;
- aStart = bStart, aEnd = bEnd, bStart = tStart, bEnd = tEnd;
- }
- let { foundSubsequence, isCommon } = callbacks[transposed ? 1 : 0];
- divide(
- nChange,
- aStart,
- aEnd,
- bStart,
- bEnd,
- isCommon,
- aIndexesF,
- aIndexesR,
- division
- );
- let {
- nChangePreceding,
- aEndPreceding,
- bEndPreceding,
- nCommonPreceding,
- aCommonPreceding,
- bCommonPreceding,
- nCommonFollowing,
- aCommonFollowing,
- bCommonFollowing,
- nChangeFollowing,
- aStartFollowing,
- bStartFollowing
- } = division;
- aStart < aEndPreceding && bStart < bEndPreceding && findSubsequences(
- nChangePreceding,
- aStart,
- aEndPreceding,
- bStart,
- bEndPreceding,
- transposed,
- callbacks,
- aIndexesF,
- aIndexesR,
- division
- ), nCommonPreceding !== 0 && foundSubsequence(nCommonPreceding, aCommonPreceding, bCommonPreceding), nCommonFollowing !== 0 && foundSubsequence(nCommonFollowing, aCommonFollowing, bCommonFollowing), aStartFollowing < aEnd && bStartFollowing < bEnd && findSubsequences(
- nChangeFollowing,
- aStartFollowing,
- aEnd,
- bStartFollowing,
- bEnd,
- transposed,
- callbacks,
- aIndexesF,
- aIndexesR,
- division
- );
- }, validateLength = (name, arg) => {
- if (typeof arg != "number")
- throw new TypeError(`${pkg}: ${name} typeof ${typeof arg} is not a number`);
- if (!Number.isSafeInteger(arg))
- throw new RangeError(`${pkg}: ${name} value ${arg} is not a safe integer`);
- if (arg < 0)
- throw new RangeError(`${pkg}: ${name} value ${arg} is a negative integer`);
- }, validateCallback = (name, arg) => {
- let type5 = typeof arg;
- if (type5 !== "function")
- throw new TypeError(`${pkg}: ${name} typeof ${type5} is not a function`);
- };
- function diffSequence(aLength, bLength, isCommon, foundSubsequence) {
- validateLength("aLength", aLength), validateLength("bLength", bLength), validateCallback("isCommon", isCommon), validateCallback("foundSubsequence", foundSubsequence);
- let nCommonF = countCommonItemsF(0, aLength, 0, bLength, isCommon);
- if (nCommonF !== 0 && foundSubsequence(nCommonF, 0, 0), aLength !== nCommonF || bLength !== nCommonF) {
- let aStart = nCommonF, bStart = nCommonF, nCommonR = countCommonItemsR(
- aStart,
- aLength - 1,
- bStart,
- bLength - 1,
- isCommon
- ), aEnd = aLength - nCommonR, bEnd = bLength - nCommonR, nCommonFR = nCommonF + nCommonR;
- aLength !== nCommonFR && bLength !== nCommonFR && findSubsequences(
- 0,
- aStart,
- aEnd,
- bStart,
- bEnd,
- !1,
- [
- {
- foundSubsequence,
- isCommon
- }
- ],
- [NOT_YET_SET],
- [NOT_YET_SET],
- {
- aCommonFollowing: NOT_YET_SET,
- aCommonPreceding: NOT_YET_SET,
- aEndPreceding: NOT_YET_SET,
- aStartFollowing: NOT_YET_SET,
- bCommonFollowing: NOT_YET_SET,
- bCommonPreceding: NOT_YET_SET,
- bEndPreceding: NOT_YET_SET,
- bStartFollowing: NOT_YET_SET,
- nChangeFollowing: NOT_YET_SET,
- nChangePreceding: NOT_YET_SET,
- nCommonFollowing: NOT_YET_SET,
- nCommonPreceding: NOT_YET_SET
- }
- ), nCommonR !== 0 && foundSubsequence(nCommonR, aEnd, bEnd);
- }
- }
- return build;
- }
- var buildExports = requireBuild(), diffSequences = getDefaultExportFromCjs2(buildExports);
- function formatTrailingSpaces(line2, trailingSpaceFormatter) {
- return line2.replace(/\s+$/, (match3) => trailingSpaceFormatter(match3));
- }
- function printDiffLine(line2, isFirstOrLast, color2, indicator, trailingSpaceFormatter, emptyFirstOrLastLinePlaceholder) {
- return line2.length !== 0 ? color2(`${indicator} ${formatTrailingSpaces(line2, trailingSpaceFormatter)}`) : indicator !== " " ? color2(indicator) : isFirstOrLast && emptyFirstOrLastLinePlaceholder.length !== 0 ? color2(`${indicator} ${emptyFirstOrLastLinePlaceholder}`) : "";
- }
- function printDeleteLine(line2, isFirstOrLast, { aColor, aIndicator, changeLineTrailingSpaceColor, emptyFirstOrLastLinePlaceholder }) {
- return printDiffLine(line2, isFirstOrLast, aColor, aIndicator, changeLineTrailingSpaceColor, emptyFirstOrLastLinePlaceholder);
- }
- function printInsertLine(line2, isFirstOrLast, { bColor, bIndicator, changeLineTrailingSpaceColor, emptyFirstOrLastLinePlaceholder }) {
- return printDiffLine(line2, isFirstOrLast, bColor, bIndicator, changeLineTrailingSpaceColor, emptyFirstOrLastLinePlaceholder);
- }
- function printCommonLine(line2, isFirstOrLast, { commonColor, commonIndicator, commonLineTrailingSpaceColor, emptyFirstOrLastLinePlaceholder }) {
- return printDiffLine(line2, isFirstOrLast, commonColor, commonIndicator, commonLineTrailingSpaceColor, emptyFirstOrLastLinePlaceholder);
- }
- function createPatchMark(aStart, aEnd, bStart, bEnd, { patchColor }) {
- return patchColor(`@@ -${aStart + 1},${aEnd - aStart} +${bStart + 1},${bEnd - bStart} @@`);
- }
- function joinAlignedDiffsNoExpand(diffs, options) {
- let iLength = diffs.length, nContextLines = options.contextLines, nContextLines2 = nContextLines + nContextLines, jLength = iLength, hasExcessAtStartOrEnd = !1, nExcessesBetweenChanges = 0, i = 0;
- for (; i !== iLength; ) {
- let iStart = i;
- for (; i !== iLength && diffs[i][0] === DIFF_EQUAL; )
- i += 1;
- if (iStart !== i)
- if (iStart === 0)
- i > nContextLines && (jLength -= i - nContextLines, hasExcessAtStartOrEnd = !0);
- else if (i === iLength) {
- let n = i - iStart;
- n > nContextLines && (jLength -= n - nContextLines, hasExcessAtStartOrEnd = !0);
- } else {
- let n = i - iStart;
- n > nContextLines2 && (jLength -= n - nContextLines2, nExcessesBetweenChanges += 1);
- }
- for (; i !== iLength && diffs[i][0] !== DIFF_EQUAL; )
- i += 1;
- }
- let hasPatch = nExcessesBetweenChanges !== 0 || hasExcessAtStartOrEnd;
- nExcessesBetweenChanges !== 0 ? jLength += nExcessesBetweenChanges + 1 : hasExcessAtStartOrEnd && (jLength += 1);
- let jLast = jLength - 1, lines = [], jPatchMark = 0;
- hasPatch && lines.push("");
- let aStart = 0, bStart = 0, aEnd = 0, bEnd = 0, pushCommonLine = (line2) => {
- let j = lines.length;
- lines.push(printCommonLine(line2, j === 0 || j === jLast, options)), aEnd += 1, bEnd += 1;
- }, pushDeleteLine = (line2) => {
- let j = lines.length;
- lines.push(printDeleteLine(line2, j === 0 || j === jLast, options)), aEnd += 1;
- }, pushInsertLine = (line2) => {
- let j = lines.length;
- lines.push(printInsertLine(line2, j === 0 || j === jLast, options)), bEnd += 1;
- };
- for (i = 0; i !== iLength; ) {
- let iStart = i;
- for (; i !== iLength && diffs[i][0] === DIFF_EQUAL; )
- i += 1;
- if (iStart !== i)
- if (iStart === 0) {
- i > nContextLines && (iStart = i - nContextLines, aStart = iStart, bStart = iStart, aEnd = aStart, bEnd = bStart);
- for (let iCommon = iStart; iCommon !== i; iCommon += 1)
- pushCommonLine(diffs[iCommon][1]);
- } else if (i === iLength) {
- let iEnd = i - iStart > nContextLines ? iStart + nContextLines : i;
- for (let iCommon = iStart; iCommon !== iEnd; iCommon += 1)
- pushCommonLine(diffs[iCommon][1]);
- } else {
- let nCommon = i - iStart;
- if (nCommon > nContextLines2) {
- let iEnd = iStart + nContextLines;
- for (let iCommon = iStart; iCommon !== iEnd; iCommon += 1)
- pushCommonLine(diffs[iCommon][1]);
- lines[jPatchMark] = createPatchMark(aStart, aEnd, bStart, bEnd, options), jPatchMark = lines.length, lines.push("");
- let nOmit = nCommon - nContextLines2;
- aStart = aEnd + nOmit, bStart = bEnd + nOmit, aEnd = aStart, bEnd = bStart;
- for (let iCommon = i - nContextLines; iCommon !== i; iCommon += 1)
- pushCommonLine(diffs[iCommon][1]);
- } else
- for (let iCommon = iStart; iCommon !== i; iCommon += 1)
- pushCommonLine(diffs[iCommon][1]);
- }
- for (; i !== iLength && diffs[i][0] === DIFF_DELETE; )
- pushDeleteLine(diffs[i][1]), i += 1;
- for (; i !== iLength && diffs[i][0] === DIFF_INSERT; )
- pushInsertLine(diffs[i][1]), i += 1;
- }
- return hasPatch && (lines[jPatchMark] = createPatchMark(aStart, aEnd, bStart, bEnd, options)), lines.join(`
- `);
- }
- function joinAlignedDiffsExpand(diffs, options) {
- return diffs.map((diff2, i, diffs2) => {
- let line2 = diff2[1], isFirstOrLast = i === 0 || i === diffs2.length - 1;
- switch (diff2[0]) {
- case DIFF_DELETE:
- return printDeleteLine(line2, isFirstOrLast, options);
- case DIFF_INSERT:
- return printInsertLine(line2, isFirstOrLast, options);
- default:
- return printCommonLine(line2, isFirstOrLast, options);
- }
- }).join(`
- `);
- }
- var noColor = (string) => string, DIFF_CONTEXT_DEFAULT = 5, DIFF_TRUNCATE_THRESHOLD_DEFAULT = 0;
- function getDefaultOptions() {
- return {
- aAnnotation: "Expected",
- aColor: s.green,
- aIndicator: "-",
- bAnnotation: "Received",
- bColor: s.red,
- bIndicator: "+",
- changeColor: s.inverse,
- changeLineTrailingSpaceColor: noColor,
- commonColor: s.dim,
- commonIndicator: " ",
- commonLineTrailingSpaceColor: noColor,
- compareKeys: void 0,
- contextLines: DIFF_CONTEXT_DEFAULT,
- emptyFirstOrLastLinePlaceholder: "",
- expand: !1,
- includeChangeCounts: !1,
- omitAnnotationLines: !1,
- patchColor: s.yellow,
- printBasicPrototype: !1,
- truncateThreshold: DIFF_TRUNCATE_THRESHOLD_DEFAULT,
- truncateAnnotation: "... Diff result is truncated",
- truncateAnnotationColor: noColor
- };
- }
- function getCompareKeys(compareKeys) {
- return compareKeys && typeof compareKeys == "function" ? compareKeys : void 0;
- }
- function getContextLines(contextLines) {
- return typeof contextLines == "number" && Number.isSafeInteger(contextLines) && contextLines >= 0 ? contextLines : DIFF_CONTEXT_DEFAULT;
- }
- function normalizeDiffOptions(options = {}) {
- return {
- ...getDefaultOptions(),
- ...options,
- compareKeys: getCompareKeys(options.compareKeys),
- contextLines: getContextLines(options.contextLines)
- };
- }
- function isEmptyString(lines) {
- return lines.length === 1 && lines[0].length === 0;
- }
- function countChanges(diffs) {
- let a3 = 0, b = 0;
- return diffs.forEach((diff2) => {
- switch (diff2[0]) {
- case DIFF_DELETE:
- a3 += 1;
- break;
- case DIFF_INSERT:
- b += 1;
- break;
- }
- }), {
- a: a3,
- b
- };
- }
- function printAnnotation({ aAnnotation, aColor, aIndicator, bAnnotation, bColor, bIndicator, includeChangeCounts, omitAnnotationLines }, changeCounts) {
- if (omitAnnotationLines)
- return "";
- let aRest = "", bRest = "";
- if (includeChangeCounts) {
- let aCount = String(changeCounts.a), bCount = String(changeCounts.b), baAnnotationLengthDiff = bAnnotation.length - aAnnotation.length, aAnnotationPadding = " ".repeat(Math.max(0, baAnnotationLengthDiff)), bAnnotationPadding = " ".repeat(Math.max(0, -baAnnotationLengthDiff)), baCountLengthDiff = bCount.length - aCount.length, aCountPadding = " ".repeat(Math.max(0, baCountLengthDiff)), bCountPadding = " ".repeat(Math.max(0, -baCountLengthDiff));
- aRest = `${aAnnotationPadding} ${aIndicator} ${aCountPadding}${aCount}`, bRest = `${bAnnotationPadding} ${bIndicator} ${bCountPadding}${bCount}`;
- }
- let a3 = `${aIndicator} ${aAnnotation}${aRest}`, b = `${bIndicator} ${bAnnotation}${bRest}`;
- return `${aColor(a3)}
- ${bColor(b)}
-
- `;
- }
- function printDiffLines(diffs, truncated, options) {
- return printAnnotation(options, countChanges(diffs)) + (options.expand ? joinAlignedDiffsExpand(diffs, options) : joinAlignedDiffsNoExpand(diffs, options)) + (truncated ? options.truncateAnnotationColor(`
- ${options.truncateAnnotation}`) : "");
- }
- function diffLinesUnified(aLines, bLines, options) {
- let normalizedOptions = normalizeDiffOptions(options), [diffs, truncated] = diffLinesRaw(isEmptyString(aLines) ? [] : aLines, isEmptyString(bLines) ? [] : bLines, normalizedOptions);
- return printDiffLines(diffs, truncated, normalizedOptions);
- }
- function diffLinesUnified2(aLinesDisplay, bLinesDisplay, aLinesCompare, bLinesCompare, options) {
- if (isEmptyString(aLinesDisplay) && isEmptyString(aLinesCompare) && (aLinesDisplay = [], aLinesCompare = []), isEmptyString(bLinesDisplay) && isEmptyString(bLinesCompare) && (bLinesDisplay = [], bLinesCompare = []), aLinesDisplay.length !== aLinesCompare.length || bLinesDisplay.length !== bLinesCompare.length)
- return diffLinesUnified(aLinesDisplay, bLinesDisplay, options);
- let [diffs, truncated] = diffLinesRaw(aLinesCompare, bLinesCompare, options), aIndex = 0, bIndex = 0;
- return diffs.forEach((diff2) => {
- switch (diff2[0]) {
- case DIFF_DELETE:
- diff2[1] = aLinesDisplay[aIndex], aIndex += 1;
- break;
- case DIFF_INSERT:
- diff2[1] = bLinesDisplay[bIndex], bIndex += 1;
- break;
- default:
- diff2[1] = bLinesDisplay[bIndex], aIndex += 1, bIndex += 1;
- }
- }), printDiffLines(diffs, truncated, normalizeDiffOptions(options));
- }
- function diffLinesRaw(aLines, bLines, options) {
- let truncate3 = options?.truncateThreshold ?? !1, truncateThreshold = Math.max(Math.floor(options?.truncateThreshold ?? 0), 0), aLength = truncate3 ? Math.min(aLines.length, truncateThreshold) : aLines.length, bLength = truncate3 ? Math.min(bLines.length, truncateThreshold) : bLines.length, truncated = aLength !== aLines.length || bLength !== bLines.length, isCommon = (aIndex2, bIndex2) => aLines[aIndex2] === bLines[bIndex2], diffs = [], aIndex = 0, bIndex = 0;
- for (diffSequences(aLength, bLength, isCommon, (nCommon, aCommon, bCommon) => {
- for (; aIndex !== aCommon; aIndex += 1)
- diffs.push(new Diff(DIFF_DELETE, aLines[aIndex]));
- for (; bIndex !== bCommon; bIndex += 1)
- diffs.push(new Diff(DIFF_INSERT, bLines[bIndex]));
- for (; nCommon !== 0; nCommon -= 1, aIndex += 1, bIndex += 1)
- diffs.push(new Diff(DIFF_EQUAL, bLines[bIndex]));
- }); aIndex !== aLength; aIndex += 1)
- diffs.push(new Diff(DIFF_DELETE, aLines[aIndex]));
- for (; bIndex !== bLength; bIndex += 1)
- diffs.push(new Diff(DIFF_INSERT, bLines[bIndex]));
- return [diffs, truncated];
- }
- function getType3(value) {
- if (value === void 0)
- return "undefined";
- if (value === null)
- return "null";
- if (Array.isArray(value))
- return "array";
- if (typeof value == "boolean")
- return "boolean";
- if (typeof value == "function")
- return "function";
- if (typeof value == "number")
- return "number";
- if (typeof value == "string")
- return "string";
- if (typeof value == "bigint")
- return "bigint";
- if (typeof value == "object") {
- if (value != null) {
- if (value.constructor === RegExp)
- return "regexp";
- if (value.constructor === Map)
- return "map";
- if (value.constructor === Set)
- return "set";
- if (value.constructor === Date)
- return "date";
- }
- return "object";
- } else if (typeof value == "symbol")
- return "symbol";
- throw new Error(`value of unknown type: ${value}`);
- }
- function getNewLineSymbol(string) {
- return string.includes(`\r
- `) ? `\r
- ` : `
- `;
- }
- function diffStrings(a3, b, options) {
- let truncate3 = options?.truncateThreshold ?? !1, truncateThreshold = Math.max(Math.floor(options?.truncateThreshold ?? 0), 0), aLength = a3.length, bLength = b.length;
- if (truncate3) {
- let aMultipleLines = a3.includes(`
- `), bMultipleLines = b.includes(`
- `), aNewLineSymbol = getNewLineSymbol(a3), bNewLineSymbol = getNewLineSymbol(b), _a4 = aMultipleLines ? `${a3.split(aNewLineSymbol, truncateThreshold).join(aNewLineSymbol)}
- ` : a3, _b = bMultipleLines ? `${b.split(bNewLineSymbol, truncateThreshold).join(bNewLineSymbol)}
- ` : b;
- aLength = _a4.length, bLength = _b.length;
- }
- let truncated = aLength !== a3.length || bLength !== b.length, isCommon = (aIndex2, bIndex2) => a3[aIndex2] === b[bIndex2], aIndex = 0, bIndex = 0, diffs = [];
- return diffSequences(aLength, bLength, isCommon, (nCommon, aCommon, bCommon) => {
- aIndex !== aCommon && diffs.push(new Diff(DIFF_DELETE, a3.slice(aIndex, aCommon))), bIndex !== bCommon && diffs.push(new Diff(DIFF_INSERT, b.slice(bIndex, bCommon))), aIndex = aCommon + nCommon, bIndex = bCommon + nCommon, diffs.push(new Diff(DIFF_EQUAL, b.slice(bCommon, bIndex)));
- }), aIndex !== aLength && diffs.push(new Diff(DIFF_DELETE, a3.slice(aIndex))), bIndex !== bLength && diffs.push(new Diff(DIFF_INSERT, b.slice(bIndex))), [diffs, truncated];
- }
- function concatenateRelevantDiffs(op, diffs, changeColor) {
- return diffs.reduce((reduced, diff2) => reduced + (diff2[0] === DIFF_EQUAL ? diff2[1] : diff2[0] === op && diff2[1].length !== 0 ? changeColor(diff2[1]) : ""), "");
- }
- var ChangeBuffer = class {
- op;
- line;
- lines;
- changeColor;
- constructor(op, changeColor) {
- this.op = op, this.line = [], this.lines = [], this.changeColor = changeColor;
- }
- pushSubstring(substring) {
- this.pushDiff(new Diff(this.op, substring));
- }
- pushLine() {
- this.lines.push(this.line.length !== 1 ? new Diff(this.op, concatenateRelevantDiffs(this.op, this.line, this.changeColor)) : this.line[0][0] === this.op ? this.line[0] : new Diff(this.op, this.line[0][1])), this.line.length = 0;
- }
- isLineEmpty() {
- return this.line.length === 0;
- }
- // Minor input to buffer.
- pushDiff(diff2) {
- this.line.push(diff2);
- }
- // Main input to buffer.
- align(diff2) {
- let string = diff2[1];
- if (string.includes(`
- `)) {
- let substrings = string.split(`
- `), iLast = substrings.length - 1;
- substrings.forEach((substring, i) => {
- i < iLast ? (this.pushSubstring(substring), this.pushLine()) : substring.length !== 0 && this.pushSubstring(substring);
- });
- } else
- this.pushDiff(diff2);
- }
- // Output from buffer.
- moveLinesTo(lines) {
- this.isLineEmpty() || this.pushLine(), lines.push(...this.lines), this.lines.length = 0;
- }
- }, CommonBuffer = class {
- deleteBuffer;
- insertBuffer;
- lines;
- constructor(deleteBuffer, insertBuffer) {
- this.deleteBuffer = deleteBuffer, this.insertBuffer = insertBuffer, this.lines = [];
- }
- pushDiffCommonLine(diff2) {
- this.lines.push(diff2);
- }
- pushDiffChangeLines(diff2) {
- let isDiffEmpty = diff2[1].length === 0;
- (!isDiffEmpty || this.deleteBuffer.isLineEmpty()) && this.deleteBuffer.pushDiff(diff2), (!isDiffEmpty || this.insertBuffer.isLineEmpty()) && this.insertBuffer.pushDiff(diff2);
- }
- flushChangeLines() {
- this.deleteBuffer.moveLinesTo(this.lines), this.insertBuffer.moveLinesTo(this.lines);
- }
- // Input to buffer.
- align(diff2) {
- let op = diff2[0], string = diff2[1];
- if (string.includes(`
- `)) {
- let substrings = string.split(`
- `), iLast = substrings.length - 1;
- substrings.forEach((substring, i) => {
- if (i === 0) {
- let subdiff = new Diff(op, substring);
- this.deleteBuffer.isLineEmpty() && this.insertBuffer.isLineEmpty() ? (this.flushChangeLines(), this.pushDiffCommonLine(subdiff)) : (this.pushDiffChangeLines(subdiff), this.flushChangeLines());
- } else i < iLast ? this.pushDiffCommonLine(new Diff(op, substring)) : substring.length !== 0 && this.pushDiffChangeLines(new Diff(op, substring));
- });
- } else
- this.pushDiffChangeLines(diff2);
- }
- // Output from buffer.
- getLines() {
- return this.flushChangeLines(), this.lines;
- }
- };
- function getAlignedDiffs(diffs, changeColor) {
- let deleteBuffer = new ChangeBuffer(DIFF_DELETE, changeColor), insertBuffer = new ChangeBuffer(DIFF_INSERT, changeColor), commonBuffer = new CommonBuffer(deleteBuffer, insertBuffer);
- return diffs.forEach((diff2) => {
- switch (diff2[0]) {
- case DIFF_DELETE:
- deleteBuffer.align(diff2);
- break;
- case DIFF_INSERT:
- insertBuffer.align(diff2);
- break;
- default:
- commonBuffer.align(diff2);
- }
- }), commonBuffer.getLines();
- }
- function hasCommonDiff(diffs, isMultiline) {
- if (isMultiline) {
- let iLast = diffs.length - 1;
- return diffs.some((diff2, i) => diff2[0] === DIFF_EQUAL && (i !== iLast || diff2[1] !== `
- `));
- }
- return diffs.some((diff2) => diff2[0] === DIFF_EQUAL);
- }
- function diffStringsUnified(a3, b, options) {
- if (a3 !== b && a3.length !== 0 && b.length !== 0) {
- let isMultiline = a3.includes(`
- `) || b.includes(`
- `), [diffs, truncated] = diffStringsRaw(isMultiline ? `${a3}
- ` : a3, isMultiline ? `${b}
- ` : b, !0, options);
- if (hasCommonDiff(diffs, isMultiline)) {
- let optionsNormalized = normalizeDiffOptions(options), lines = getAlignedDiffs(diffs, optionsNormalized.changeColor);
- return printDiffLines(lines, truncated, optionsNormalized);
- }
- }
- return diffLinesUnified(a3.split(`
- `), b.split(`
- `), options);
- }
- function diffStringsRaw(a3, b, cleanup, options) {
- let [diffs, truncated] = diffStrings(a3, b, options);
- return cleanup && diff_cleanupSemantic(diffs), [diffs, truncated];
- }
- function getCommonMessage(message, options) {
- let { commonColor } = normalizeDiffOptions(options);
- return commonColor(message);
- }
- var { AsymmetricMatcher: AsymmetricMatcher2, DOMCollection: DOMCollection2, DOMElement: DOMElement2, Immutable: Immutable2, ReactElement: ReactElement2, ReactTestComponent: ReactTestComponent2 } = plugins, PLUGINS2 = [
- ReactTestComponent2,
- ReactElement2,
- DOMElement2,
- DOMCollection2,
- Immutable2,
- AsymmetricMatcher2,
- plugins.Error
- ], FORMAT_OPTIONS = {
- maxDepth: 20,
- plugins: PLUGINS2
- }, FALLBACK_FORMAT_OPTIONS = {
- callToJSON: !1,
- maxDepth: 8,
- plugins: PLUGINS2
- };
- function diff(a3, b, options) {
- if (Object.is(a3, b))
- return "";
- let aType = getType3(a3), expectedType = aType, omitDifference = !1;
- if (aType === "object" && typeof a3.asymmetricMatch == "function") {
- if (a3.$$typeof !== Symbol.for("jest.asymmetricMatcher") || typeof a3.getExpectedType != "function")
- return;
- expectedType = a3.getExpectedType(), omitDifference = expectedType === "string";
- }
- if (expectedType !== getType3(b)) {
- let truncate3 = function(s3) {
- return s3.length <= MAX_LENGTH ? s3 : `${s3.slice(0, MAX_LENGTH)}...`;
- }, { aAnnotation, aColor, aIndicator, bAnnotation, bColor, bIndicator } = normalizeDiffOptions(options), formatOptions = getFormatOptions(FALLBACK_FORMAT_OPTIONS, options), aDisplay = format(a3, formatOptions), bDisplay = format(b, formatOptions), MAX_LENGTH = 1e5;
- aDisplay = truncate3(aDisplay), bDisplay = truncate3(bDisplay);
- let aDiff = `${aColor(`${aIndicator} ${aAnnotation}:`)}
- ${aDisplay}`, bDiff = `${bColor(`${bIndicator} ${bAnnotation}:`)}
- ${bDisplay}`;
- return `${aDiff}
-
- ${bDiff}`;
- }
- if (!omitDifference)
- switch (aType) {
- case "string":
- return diffLinesUnified(a3.split(`
- `), b.split(`
- `), options);
- case "boolean":
- case "number":
- return comparePrimitive(a3, b, options);
- case "map":
- return compareObjects(sortMap(a3), sortMap(b), options);
- case "set":
- return compareObjects(sortSet(a3), sortSet(b), options);
- default:
- return compareObjects(a3, b, options);
- }
- }
- function comparePrimitive(a3, b, options) {
- let aFormat = format(a3, FORMAT_OPTIONS), bFormat = format(b, FORMAT_OPTIONS);
- return aFormat === bFormat ? "" : diffLinesUnified(aFormat.split(`
- `), bFormat.split(`
- `), options);
- }
- function sortMap(map2) {
- return new Map(Array.from(map2.entries()).sort());
- }
- function sortSet(set3) {
- return new Set(Array.from(set3.values()).sort());
- }
- function compareObjects(a3, b, options) {
- let difference2, hasThrown = !1;
- try {
- let formatOptions = getFormatOptions(FORMAT_OPTIONS, options);
- difference2 = getObjectsDifference(a3, b, formatOptions, options);
- } catch {
- hasThrown = !0;
- }
- let noDiffMessage = getCommonMessage(NO_DIFF_MESSAGE, options);
- if (difference2 === void 0 || difference2 === noDiffMessage) {
- let formatOptions = getFormatOptions(FALLBACK_FORMAT_OPTIONS, options);
- difference2 = getObjectsDifference(a3, b, formatOptions, options), difference2 !== noDiffMessage && !hasThrown && (difference2 = `${getCommonMessage(SIMILAR_MESSAGE, options)}
-
- ${difference2}`);
- }
- return difference2;
- }
- function getFormatOptions(formatOptions, options) {
- let { compareKeys, printBasicPrototype, maxDepth } = normalizeDiffOptions(options);
- return {
- ...formatOptions,
- compareKeys,
- printBasicPrototype,
- maxDepth: maxDepth ?? formatOptions.maxDepth
- };
- }
- function getObjectsDifference(a3, b, formatOptions, options) {
- let formatOptionsZeroIndent = {
- ...formatOptions,
- indent: 0
- }, aCompare = format(a3, formatOptionsZeroIndent), bCompare = format(b, formatOptionsZeroIndent);
- if (aCompare === bCompare)
- return getCommonMessage(NO_DIFF_MESSAGE, options);
- {
- let aDisplay = format(a3, formatOptions), bDisplay = format(b, formatOptions);
- return diffLinesUnified2(aDisplay.split(`
- `), bDisplay.split(`
- `), aCompare.split(`
- `), bCompare.split(`
- `), options);
- }
- }
- var MAX_DIFF_STRING_LENGTH = 2e4;
- function isAsymmetricMatcher(data) {
- return getType2(data) === "Object" && typeof data.asymmetricMatch == "function";
- }
- function isReplaceable(obj1, obj2) {
- let obj1Type = getType2(obj1), obj2Type = getType2(obj2);
- return obj1Type === obj2Type && (obj1Type === "Object" || obj1Type === "Array");
- }
- function printDiffOrStringify(received, expected, options) {
- let { aAnnotation, bAnnotation } = normalizeDiffOptions(options);
- if (typeof expected == "string" && typeof received == "string" && expected.length > 0 && received.length > 0 && expected.length <= MAX_DIFF_STRING_LENGTH && received.length <= MAX_DIFF_STRING_LENGTH && expected !== received) {
- if (expected.includes(`
- `) || received.includes(`
- `))
- return diffStringsUnified(expected, received, options);
- let [diffs] = diffStringsRaw(expected, received, !0), hasCommonDiff2 = diffs.some((diff2) => diff2[0] === DIFF_EQUAL), printLabel = getLabelPrinter(aAnnotation, bAnnotation), expectedLine = printLabel(aAnnotation) + printExpected(getCommonAndChangedSubstrings(diffs, DIFF_DELETE, hasCommonDiff2)), receivedLine = printLabel(bAnnotation) + printReceived(getCommonAndChangedSubstrings(diffs, DIFF_INSERT, hasCommonDiff2));
- return `${expectedLine}
- ${receivedLine}`;
- }
- let clonedExpected = deepClone(expected, { forceWritable: !0 }), clonedReceived = deepClone(received, { forceWritable: !0 }), { replacedExpected, replacedActual } = replaceAsymmetricMatcher(clonedReceived, clonedExpected);
- return diff(replacedExpected, replacedActual, options);
- }
- function replaceAsymmetricMatcher(actual, expected, actualReplaced = /* @__PURE__ */ new WeakSet(), expectedReplaced = /* @__PURE__ */ new WeakSet()) {
- return actual instanceof Error && expected instanceof Error && typeof actual.cause < "u" && typeof expected.cause > "u" ? (delete actual.cause, {
- replacedActual: actual,
- replacedExpected: expected
- }) : isReplaceable(actual, expected) ? actualReplaced.has(actual) || expectedReplaced.has(expected) ? {
- replacedActual: actual,
- replacedExpected: expected
- } : (actualReplaced.add(actual), expectedReplaced.add(expected), getOwnProperties(expected).forEach((key) => {
- let expectedValue = expected[key], actualValue = actual[key];
- if (isAsymmetricMatcher(expectedValue))
- expectedValue.asymmetricMatch(actualValue) && (actual[key] = expectedValue);
- else if (isAsymmetricMatcher(actualValue))
- actualValue.asymmetricMatch(expectedValue) && (expected[key] = actualValue);
- else if (isReplaceable(actualValue, expectedValue)) {
- let replaced = replaceAsymmetricMatcher(actualValue, expectedValue, actualReplaced, expectedReplaced);
- actual[key] = replaced.replacedActual, expected[key] = replaced.replacedExpected;
- }
- }), {
- replacedActual: actual,
- replacedExpected: expected
- }) : {
- replacedActual: actual,
- replacedExpected: expected
- };
- }
- function getLabelPrinter(...strings) {
- let maxLength = strings.reduce((max2, string) => string.length > max2 ? string.length : max2, 0);
- return (string) => `${string}: ${" ".repeat(maxLength - string.length)}`;
- }
- var SPACE_SYMBOL = "\xB7";
- function replaceTrailingSpaces(text) {
- return text.replace(/\s+$/gm, (spaces) => SPACE_SYMBOL.repeat(spaces.length));
- }
- function printReceived(object) {
- return s.red(replaceTrailingSpaces(stringify5(object)));
- }
- function printExpected(value) {
- return s.green(replaceTrailingSpaces(stringify5(value)));
- }
- function getCommonAndChangedSubstrings(diffs, op, hasCommonDiff2) {
- return diffs.reduce((reduced, diff2) => reduced + (diff2[0] === DIFF_EQUAL ? diff2[1] : diff2[0] === op ? hasCommonDiff2 ? s.inverse(diff2[1]) : diff2[1] : ""), "");
- }
-
- // ../../node_modules/@vitest/utils/dist/error.js
- var IS_RECORD_SYMBOL = "@@__IMMUTABLE_RECORD__@@", IS_COLLECTION_SYMBOL = "@@__IMMUTABLE_ITERABLE__@@";
- function isImmutable(v) {
- return v && (v[IS_COLLECTION_SYMBOL] || v[IS_RECORD_SYMBOL]);
- }
- var OBJECT_PROTO = Object.getPrototypeOf({});
- function getUnserializableMessage(err) {
- return err instanceof Error ? `<unserializable>: ${err.message}` : typeof err == "string" ? `<unserializable>: ${err}` : "<unserializable>";
- }
- function serializeValue(val, seen = /* @__PURE__ */ new WeakMap()) {
- if (!val || typeof val == "string")
- return val;
- if (val instanceof Error && "toJSON" in val && typeof val.toJSON == "function") {
- let jsonValue = val.toJSON();
- return jsonValue && jsonValue !== val && typeof jsonValue == "object" && (typeof val.message == "string" && safe(() => jsonValue.message ?? (jsonValue.message = val.message)), typeof val.stack == "string" && safe(() => jsonValue.stack ?? (jsonValue.stack = val.stack)), typeof val.name == "string" && safe(() => jsonValue.name ?? (jsonValue.name = val.name)), val.cause != null && safe(() => jsonValue.cause ?? (jsonValue.cause = serializeValue(val.cause, seen)))), serializeValue(jsonValue, seen);
- }
- if (typeof val == "function")
- return `Function<${val.name || "anonymous"}>`;
- if (typeof val == "symbol")
- return val.toString();
- if (typeof val != "object")
- return val;
- if (typeof Buffer < "u" && val instanceof Buffer)
- return `<Buffer(${val.length}) ...>`;
- if (typeof Uint8Array < "u" && val instanceof Uint8Array)
- return `<Uint8Array(${val.length}) ...>`;
- if (isImmutable(val))
- return serializeValue(val.toJSON(), seen);
- if (val instanceof Promise || val.constructor && val.constructor.prototype === "AsyncFunction")
- return "Promise";
- if (typeof Element < "u" && val instanceof Element)
- return val.tagName;
- if (typeof val.asymmetricMatch == "function")
- return `${val.toString()} ${format2(val.sample)}`;
- if (typeof val.toJSON == "function")
- return serializeValue(val.toJSON(), seen);
- if (seen.has(val))
- return seen.get(val);
- if (Array.isArray(val)) {
- let clone3 = new Array(val.length);
- return seen.set(val, clone3), val.forEach((e, i) => {
- try {
- clone3[i] = serializeValue(e, seen);
- } catch (err) {
- clone3[i] = getUnserializableMessage(err);
- }
- }), clone3;
- } else {
- let clone3 = /* @__PURE__ */ Object.create(null);
- seen.set(val, clone3);
- let obj = val;
- for (; obj && obj !== OBJECT_PROTO; )
- Object.getOwnPropertyNames(obj).forEach((key) => {
- if (!(key in clone3))
- try {
- clone3[key] = serializeValue(val[key], seen);
- } catch (err) {
- delete clone3[key], clone3[key] = getUnserializableMessage(err);
- }
- }), obj = Object.getPrototypeOf(obj);
- return clone3;
- }
- }
- function safe(fn4) {
- try {
- return fn4();
- } catch {
- }
- }
- function normalizeErrorMessage(message) {
- return message.replace(/__(vite_ssr_import|vi_import)_\d+__\./g, "");
- }
- function processError(_err, diffOptions, seen = /* @__PURE__ */ new WeakSet()) {
- if (!_err || typeof _err != "object")
- return { message: String(_err) };
- let err = _err;
- (err.showDiff || err.showDiff === void 0 && err.expected !== void 0 && err.actual !== void 0) && (err.diff = printDiffOrStringify(err.actual, err.expected, {
- ...diffOptions,
- ...err.diffOptions
- })), "expected" in err && typeof err.expected != "string" && (err.expected = stringify5(err.expected, 10)), "actual" in err && typeof err.actual != "string" && (err.actual = stringify5(err.actual, 10));
- try {
- typeof err.message == "string" && (err.message = normalizeErrorMessage(err.message));
- } catch {
- }
- try {
- !seen.has(err) && typeof err.cause == "object" && (seen.add(err), err.cause = processError(err.cause, diffOptions, seen));
- } catch {
- }
- try {
- return serializeValue(err);
- } catch (e) {
- return serializeValue(new Error(`Failed to fully serialize error: ${e?.message}
- Inner error message: ${err?.message}`));
- }
- }
-
- // src/instrumenter/EVENTS.ts
- var EVENTS = {
- CALL: "storybook/instrumenter/call",
- SYNC: "storybook/instrumenter/sync",
- START: "storybook/instrumenter/start",
- BACK: "storybook/instrumenter/back",
- GOTO: "storybook/instrumenter/goto",
- NEXT: "storybook/instrumenter/next",
- END: "storybook/instrumenter/end"
- };
-
- // src/instrumenter/preview-api.ts
- var addons3 = globalThis.__STORYBOOK_ADDONS_PREVIEW;
-
- // src/instrumenter/instrumenter.ts
- var alreadyCompletedException = new Error(
- "This function ran after the play function completed. Did you forget to `await` it?"
- ), isObject6 = (o) => Object.prototype.toString.call(o) === "[object Object]", isModule = (o) => Object.prototype.toString.call(o) === "[object Module]", isInstrumentable = (o) => {
- if (!isObject6(o) && !isModule(o))
- return !1;
- if (o.constructor === void 0)
- return !0;
- let proto = o.constructor.prototype;
- return !!isObject6(proto);
- }, construct = (obj) => {
- try {
- return new obj.constructor();
- } catch {
- return {};
- }
- }, getInitialState = () => ({
- renderPhase: "preparing",
- isDebugging: !1,
- isPlaying: !1,
- isLocked: !1,
- cursor: 0,
- calls: [],
- shadowCalls: [],
- callRefsByResult: /* @__PURE__ */ new Map(),
- chainedCallIds: /* @__PURE__ */ new Set(),
- ancestors: [],
- playUntil: void 0,
- resolvers: {},
- syncTimeout: void 0
- }), getRetainedState = (state3, isDebugging = !1) => {
- let calls = (isDebugging ? state3.shadowCalls : state3.calls).filter((call2) => call2.retain);
- if (!calls.length)
- return;
- let callRefsByResult = new Map(
- Array.from(state3.callRefsByResult.entries()).filter(([, ref]) => ref.retain)
- );
- return { cursor: calls.length, calls, callRefsByResult };
- }, Instrumenter = class {
- constructor() {
- this.detached = !1;
- this.initialized = !1;
- // State is tracked per story to deal with multiple stories on the same canvas (i.e. docs mode)
- this.state = {};
- this.loadParentWindowState = () => {
- try {
- this.state = scope.window?.parent?.__STORYBOOK_ADDON_INTERACTIONS_INSTRUMENTER_STATE__ || {};
- } catch {
- this.detached = !0;
- }
- };
- this.updateParentWindowState = () => {
- try {
- scope.window.parent.__STORYBOOK_ADDON_INTERACTIONS_INSTRUMENTER_STATE__ = this.state;
- } catch {
- this.detached = !0;
- }
- };
- this.loadParentWindowState();
- let resetState = ({
- storyId,
- renderPhase,
- isPlaying = !0,
- isDebugging = !1
- }) => {
- let state3 = this.getState(storyId);
- this.setState(storyId, {
- ...getInitialState(),
- ...getRetainedState(state3, isDebugging),
- renderPhase: renderPhase || state3.renderPhase,
- shadowCalls: isDebugging ? state3.shadowCalls : [],
- chainedCallIds: isDebugging ? state3.chainedCallIds : /* @__PURE__ */ new Set(),
- playUntil: isDebugging ? state3.playUntil : void 0,
- isPlaying,
- isDebugging
- }), this.sync(storyId);
- }, start2 = (channel) => ({ storyId, playUntil }) => {
- this.getState(storyId).isDebugging || this.setState(storyId, ({ calls }) => ({
- calls: [],
- shadowCalls: calls.map((call2) => ({ ...call2, status: "waiting" /* WAITING */ })),
- isDebugging: !0
- }));
- let log = this.getLog(storyId);
- this.setState(storyId, ({ shadowCalls }) => {
- if (playUntil || !log.length)
- return { playUntil };
- let firstRowIndex = shadowCalls.findIndex((call2) => call2.id === log[0].callId);
- return {
- playUntil: shadowCalls.slice(0, firstRowIndex).filter((call2) => call2.interceptable && !call2.ancestors?.length).slice(-1)[0]?.id
- };
- }), channel.emit(FORCE_REMOUNT, { storyId, isDebugging: !0 });
- }, back = (channel) => ({ storyId }) => {
- let log = this.getLog(storyId).filter((call2) => !call2.ancestors?.length), last2 = log.reduceRight((res, item, index4) => res >= 0 || item.status === "waiting" /* WAITING */ ? res : index4, -1);
- start2(channel)({ storyId, playUntil: log[last2 - 1]?.callId });
- }, goto = (channel) => ({ storyId, callId }) => {
- let { calls, shadowCalls, resolvers } = this.getState(storyId), call2 = calls.find(({ id }) => id === callId), shadowCall = shadowCalls.find(({ id }) => id === callId);
- if (!call2 && shadowCall && Object.values(resolvers).length > 0) {
- let nextId = this.getLog(storyId).find((c) => c.status === "waiting" /* WAITING */)?.callId;
- shadowCall.id !== nextId && this.setState(storyId, { playUntil: shadowCall.id }), Object.values(resolvers).forEach((resolve) => resolve());
- } else
- start2(channel)({ storyId, playUntil: callId });
- }, next2 = (channel) => ({ storyId }) => {
- let { resolvers } = this.getState(storyId);
- if (Object.values(resolvers).length > 0)
- Object.values(resolvers).forEach((resolve) => resolve());
- else {
- let nextId = this.getLog(storyId).find((c) => c.status === "waiting" /* WAITING */)?.callId;
- nextId ? start2(channel)({ storyId, playUntil: nextId }) : end2({ storyId });
- }
- }, end2 = ({ storyId }) => {
- this.setState(storyId, { playUntil: void 0, isDebugging: !1 }), Object.values(this.getState(storyId).resolvers).forEach((resolve) => resolve());
- }, renderPhaseChanged = ({
- storyId,
- newPhase
- }) => {
- let { isDebugging } = this.getState(storyId);
- if (newPhase === "preparing" && isDebugging)
- return resetState({ storyId, renderPhase: newPhase, isDebugging });
- if (newPhase === "playing")
- return resetState({ storyId, renderPhase: newPhase, isDebugging });
- newPhase === "played" ? this.setState(storyId, {
- renderPhase: newPhase,
- isLocked: !1,
- isPlaying: !1,
- isDebugging: !1
- }) : newPhase === "errored" ? this.setState(storyId, {
- renderPhase: newPhase,
- isLocked: !1,
- isPlaying: !1
- }) : newPhase === "aborted" ? this.setState(storyId, {
- renderPhase: newPhase,
- isLocked: !0,
- isPlaying: !1
- }) : this.setState(storyId, {
- renderPhase: newPhase
- }), this.sync(storyId);
- };
- addons3 && addons3.ready().then(() => {
- this.channel = addons3.getChannel(), this.channel.on(FORCE_REMOUNT, resetState), this.channel.on(STORY_RENDER_PHASE_CHANGED, renderPhaseChanged), this.channel.on(SET_CURRENT_STORY, () => {
- this.initialized ? this.cleanup() : this.initialized = !0;
- }), this.channel.on(EVENTS.START, start2(this.channel)), this.channel.on(EVENTS.BACK, back(this.channel)), this.channel.on(EVENTS.GOTO, goto(this.channel)), this.channel.on(EVENTS.NEXT, next2(this.channel)), this.channel.on(EVENTS.END, end2);
- });
- }
- getState(storyId) {
- return this.state[storyId] || getInitialState();
- }
- setState(storyId, update2) {
- if (storyId) {
- let state3 = this.getState(storyId), patch = typeof update2 == "function" ? update2(state3) : update2;
- this.state = { ...this.state, [storyId]: { ...state3, ...patch } }, this.updateParentWindowState();
- }
- }
- cleanup() {
- this.state = Object.entries(this.state).reduce(
- (acc, [storyId, state3]) => {
- let retainedState = getRetainedState(state3);
- return retainedState && (acc[storyId] = Object.assign(getInitialState(), retainedState)), acc;
- },
- {}
- );
- let payload = { controlStates: {
- detached: this.detached,
- start: !1,
- back: !1,
- goto: !1,
- next: !1,
- end: !1
- }, logItems: [] };
- this.channel?.emit(EVENTS.SYNC, payload), this.updateParentWindowState();
- }
- getLog(storyId) {
- let { calls, shadowCalls } = this.getState(storyId), merged = [...shadowCalls];
- calls.forEach((call2, index4) => {
- merged[index4] = call2;
- });
- let seen = /* @__PURE__ */ new Set();
- return merged.reduceRight((acc, call2) => (call2.args.forEach((arg) => {
- arg?.__callId__ && seen.add(arg.__callId__);
- }), call2.path.forEach((node2) => {
- node2.__callId__ && seen.add(node2.__callId__);
- }), (call2.interceptable || call2.exception) && !seen.has(call2.id) && (acc.unshift({ callId: call2.id, status: call2.status, ancestors: call2.ancestors }), seen.add(call2.id)), acc), []);
- }
- // Traverses the object structure to recursively patch all function properties.
- // Returns the original object, or a new object with the same constructor,
- // depending on whether it should mutate.
- instrument(obj, options, depth = 0) {
- if (!isInstrumentable(obj))
- return obj;
- let { mutate = !1, path = [] } = options, keys3 = options.getKeys ? options.getKeys(obj, depth) : Object.keys(obj);
- return depth += 1, keys3.reduce(
- (acc, key) => {
- let descriptor = getPropertyDescriptor(obj, key);
- if (typeof descriptor?.get == "function") {
- if (descriptor.configurable) {
- let getter = () => descriptor?.get?.bind(obj)?.();
- Object.defineProperty(acc, key, {
- get: () => this.instrument(getter(), { ...options, path: path.concat(key) }, depth)
- });
- }
- return acc;
- }
- let value = obj[key];
- return typeof value != "function" ? (acc[key] = this.instrument(value, { ...options, path: path.concat(key) }, depth), acc) : "__originalFn__" in value && typeof value.__originalFn__ == "function" ? (acc[key] = value, acc) : (acc[key] = (...args) => this.track(key, value, obj, args, options), acc[key].__originalFn__ = value, Object.defineProperty(acc[key], "name", { value: key, writable: !1 }), Object.keys(value).length > 0 && Object.assign(
- acc[key],
- this.instrument({ ...value }, { ...options, path: path.concat(key) }, depth)
- ), acc);
- },
- mutate ? obj : construct(obj)
- );
- }
- // Monkey patch an object method to record calls.
- // Returns a function that invokes the original function, records the invocation ("call") and
- // returns the original result.
- track(method, fn4, object, args, options) {
- let storyId = args?.[0]?.__storyId__ || scope.__STORYBOOK_PREVIEW__?.selectionStore?.selection?.storyId, { cursor: cursor2, ancestors } = this.getState(storyId);
- this.setState(storyId, { cursor: cursor2 + 1 });
- let id = `${ancestors.slice(-1)[0] || storyId} [${cursor2}] ${method}`, { path = [], intercept = !1, retain = !1 } = options, interceptable = typeof intercept == "function" ? intercept(method, path) : intercept, call2 = { id, cursor: cursor2, storyId, ancestors, path, method, args, interceptable, retain }, result = (interceptable && !ancestors.length ? this.intercept : this.invoke).call(this, fn4, object, call2, options);
- return this.instrument(result, { ...options, mutate: !0, path: [{ __callId__: call2.id }] });
- }
- intercept(fn4, object, call2, options) {
- let { chainedCallIds, isDebugging, playUntil } = this.getState(call2.storyId), isChainedUpon = chainedCallIds.has(call2.id);
- return !isDebugging || isChainedUpon || playUntil ? (playUntil === call2.id && this.setState(call2.storyId, { playUntil: void 0 }), this.invoke(fn4, object, call2, options)) : new Promise((resolve) => {
- this.setState(call2.storyId, ({ resolvers }) => ({
- isLocked: !1,
- resolvers: { ...resolvers, [call2.id]: resolve }
- }));
- }).then(() => (this.setState(call2.storyId, (state3) => {
- let { [call2.id]: _, ...resolvers } = state3.resolvers;
- return { isLocked: !0, resolvers };
- }), this.invoke(fn4, object, call2, options)));
- }
- invoke(fn4, object, call2, options) {
- let { callRefsByResult, renderPhase } = this.getState(call2.storyId), maximumDepth = 25, serializeValues = (value, depth, seen) => {
- if (seen.includes(value))
- return "[Circular]";
- if (seen = [...seen, value], depth > maximumDepth)
- return "...";
- if (callRefsByResult.has(value))
- return callRefsByResult.get(value);
- if (value instanceof Array)
- return value.map((it) => serializeValues(it, ++depth, seen));
- if (value instanceof Date)
- return { __date__: { value: value.toISOString() } };
- if (value instanceof Error) {
- let { name, message, stack } = value;
- return { __error__: { name, message, stack } };
- }
- if (value instanceof RegExp) {
- let { flags, source } = value;
- return { __regexp__: { flags, source } };
- }
- if (value instanceof scope.window?.HTMLElement) {
- let { prefix: prefix4, localName, id, classList, innerText } = value, classNames = Array.from(classList);
- return { __element__: { prefix: prefix4, localName, id, classNames, innerText } };
- }
- return typeof value == "function" ? {
- __function__: { name: "getMockName" in value ? value.getMockName() : value.name }
- } : typeof value == "symbol" ? { __symbol__: { description: value.description } } : typeof value == "object" && value?.constructor?.name && value?.constructor?.name !== "Object" ? { __class__: { name: value.constructor.name } } : Object.prototype.toString.call(value) === "[object Object]" ? Object.fromEntries(
- Object.entries(value).map(([key, val]) => [key, serializeValues(val, ++depth, seen)])
- ) : value;
- }, info = {
- ...call2,
- args: call2.args.map((arg) => serializeValues(arg, 0, []))
- };
- call2.path.forEach((ref) => {
- ref?.__callId__ && this.setState(call2.storyId, ({ chainedCallIds }) => ({
- chainedCallIds: new Set(Array.from(chainedCallIds).concat(ref.__callId__))
- }));
- });
- let handleException = (e) => {
- if (e instanceof Error) {
- let { name, message, stack, callId = call2.id } = e, {
- showDiff = void 0,
- diff: diff2 = void 0,
- actual = void 0,
- expected = void 0
- } = e.name === "AssertionError" ? processError(e) : e, exception = { name, message, stack, callId, showDiff, diff: diff2, actual, expected };
- if (this.update({ ...info, status: "error" /* ERROR */, exception }), this.setState(call2.storyId, (state3) => ({
- callRefsByResult: new Map([
- ...Array.from(state3.callRefsByResult.entries()),
- [e, { __callId__: call2.id, retain: call2.retain }]
- ])
- })), call2.ancestors?.length)
- throw Object.prototype.hasOwnProperty.call(e, "callId") || Object.defineProperty(e, "callId", { value: call2.id }), e;
- }
- throw e;
- };
- try {
- if (renderPhase === "played" && !call2.retain)
- throw alreadyCompletedException;
- let finalArgs = (options.getArgs ? options.getArgs(call2, this.getState(call2.storyId)) : call2.args).map((arg) => typeof arg != "function" || isClass(arg) || Object.keys(arg).length ? arg : (...args) => {
- let { cursor: cursor2, ancestors } = this.getState(call2.storyId);
- this.setState(call2.storyId, { cursor: 0, ancestors: [...ancestors, call2.id] });
- let restore = () => this.setState(call2.storyId, { cursor: cursor2, ancestors }), willRestore = !1;
- try {
- let res = arg(...args);
- return res instanceof Promise ? (willRestore = !0, res.finally(restore)) : res;
- } finally {
- willRestore || restore();
- }
- }), result = fn4.apply(object, finalArgs);
- return result && ["object", "function", "symbol"].includes(typeof result) && this.setState(call2.storyId, (state3) => ({
- callRefsByResult: new Map([
- ...Array.from(state3.callRefsByResult.entries()),
- [result, { __callId__: call2.id, retain: call2.retain }]
- ])
- })), this.update({
- ...info,
- status: result instanceof Promise ? "active" /* ACTIVE */ : "done" /* DONE */
- }), result instanceof Promise ? result.then((value) => (this.update({ ...info, status: "done" /* DONE */ }), value), handleException) : result;
- } catch (e) {
- return handleException(e);
- }
- }
- // Sends the call info to the manager and synchronizes the log.
- update(call2) {
- this.channel?.emit(EVENTS.CALL, call2), this.setState(call2.storyId, ({ calls }) => {
- let callsById = calls.concat(call2).reduce((a3, c) => Object.assign(a3, { [c.id]: c }), {});
- return {
- // Calls are sorted to ensure parent calls always come before calls in their callback.
- calls: Object.values(callsById).sort(
- (a3, b) => a3.id.localeCompare(b.id, void 0, { numeric: !0 })
- )
- };
- }), this.sync(call2.storyId);
- }
- // Builds a log of interceptable calls and control states and sends it to the manager.
- // Uses a 0ms debounce because this might get called many times in one tick.
- sync(storyId) {
- let synchronize = () => {
- let { isLocked, isPlaying } = this.getState(storyId), logItems = this.getLog(storyId), pausedAt = logItems.filter(({ ancestors }) => !ancestors.length).find((item) => item.status === "waiting" /* WAITING */)?.callId, hasActive = logItems.some((item) => item.status === "active" /* ACTIVE */);
- if (this.detached || isLocked || hasActive || logItems.length === 0) {
- let payload2 = { controlStates: {
- detached: this.detached,
- start: !1,
- back: !1,
- goto: !1,
- next: !1,
- end: !1
- }, logItems };
- this.channel?.emit(EVENTS.SYNC, payload2);
- return;
- }
- let hasPrevious = logItems.some(
- (item) => item.status === "done" /* DONE */ || item.status === "error" /* ERROR */
- ), payload = { controlStates: {
- detached: this.detached,
- start: hasPrevious,
- back: hasPrevious,
- goto: !0,
- next: isPlaying,
- end: isPlaying
- }, logItems, pausedAt };
- this.channel?.emit(EVENTS.SYNC, payload);
- };
- this.setState(storyId, ({ syncTimeout }) => (clearTimeout(syncTimeout), { syncTimeout: setTimeout(synchronize, 0) }));
- }
- };
- function instrument(obj, options = {}) {
- try {
- let forceInstrument = !1, skipInstrument = !1;
- return scope.window?.location?.search?.includes("instrument=true") ? forceInstrument = !0 : scope.window?.location?.search?.includes("instrument=false") && (skipInstrument = !0), scope.window?.parent === scope.window && !forceInstrument || skipInstrument ? obj : (scope.window && !scope.window.__STORYBOOK_ADDON_INTERACTIONS_INSTRUMENTER__ && (scope.window.__STORYBOOK_ADDON_INTERACTIONS_INSTRUMENTER__ = new Instrumenter()), (scope.window?.__STORYBOOK_ADDON_INTERACTIONS_INSTRUMENTER__).instrument(obj, options));
- } catch (e) {
- return once.warn(e), obj;
- }
- }
- function getPropertyDescriptor(obj, propName) {
- let target = obj;
- for (; target != null; ) {
- let descriptor = Object.getOwnPropertyDescriptor(target, propName);
- if (descriptor)
- return descriptor;
- target = Object.getPrototypeOf(target);
- }
- }
- function isClass(obj) {
- if (typeof obj != "function")
- return !1;
- let descriptor = Object.getOwnPropertyDescriptor(obj, "prototype");
- return descriptor ? !descriptor.writable : !1;
- }
-
- // ../../node_modules/chai/index.js
- var __defProp3 = Object.defineProperty, __name = (target, value) => __defProp3(target, "name", { value, configurable: !0 }), __export2 = (target, all) => {
- for (var name in all)
- __defProp3(target, name, { get: all[name], enumerable: !0 });
- }, utils_exports = {};
- __export2(utils_exports, {
- addChainableMethod: () => addChainableMethod,
- addLengthGuard: () => addLengthGuard,
- addMethod: () => addMethod,
- addProperty: () => addProperty,
- checkError: () => check_error_exports,
- compareByInspect: () => compareByInspect,
- eql: () => deep_eql_default,
- expectTypes: () => expectTypes,
- flag: () => flag,
- getActual: () => getActual,
- getMessage: () => getMessage2,
- getName: () => getName,
- getOperator: () => getOperator,
- getOwnEnumerableProperties: () => getOwnEnumerableProperties,
- getOwnEnumerablePropertySymbols: () => getOwnEnumerablePropertySymbols,
- getPathInfo: () => getPathInfo,
- hasProperty: () => hasProperty,
- inspect: () => inspect22,
- isNaN: () => isNaN22,
- isNumeric: () => isNumeric,
- isProxyEnabled: () => isProxyEnabled,
- isRegExp: () => isRegExp22,
- objDisplay: () => objDisplay,
- overwriteChainableMethod: () => overwriteChainableMethod,
- overwriteMethod: () => overwriteMethod,
- overwriteProperty: () => overwriteProperty,
- proxify: () => proxify,
- test: () => test2,
- transferFlags: () => transferFlags,
- type: () => type
- });
- var check_error_exports = {};
- __export2(check_error_exports, {
- compatibleConstructor: () => compatibleConstructor,
- compatibleInstance: () => compatibleInstance,
- compatibleMessage: () => compatibleMessage,
- getConstructorName: () => getConstructorName2,
- getMessage: () => getMessage
- });
- function isErrorInstance(obj) {
- return obj instanceof Error || Object.prototype.toString.call(obj) === "[object Error]";
- }
- __name(isErrorInstance, "isErrorInstance");
- function isRegExp2(obj) {
- return Object.prototype.toString.call(obj) === "[object RegExp]";
- }
- __name(isRegExp2, "isRegExp");
- function compatibleInstance(thrown, errorLike) {
- return isErrorInstance(errorLike) && thrown === errorLike;
- }
- __name(compatibleInstance, "compatibleInstance");
- function compatibleConstructor(thrown, errorLike) {
- return isErrorInstance(errorLike) ? thrown.constructor === errorLike.constructor || thrown instanceof errorLike.constructor : (typeof errorLike == "object" || typeof errorLike == "function") && errorLike.prototype ? thrown.constructor === errorLike || thrown instanceof errorLike : !1;
- }
- __name(compatibleConstructor, "compatibleConstructor");
- function compatibleMessage(thrown, errMatcher) {
- let comparisonString = typeof thrown == "string" ? thrown : thrown.message;
- return isRegExp2(errMatcher) ? errMatcher.test(comparisonString) : typeof errMatcher == "string" ? comparisonString.indexOf(errMatcher) !== -1 : !1;
- }
- __name(compatibleMessage, "compatibleMessage");
- function getConstructorName2(errorLike) {
- let constructorName = errorLike;
- return isErrorInstance(errorLike) ? constructorName = errorLike.constructor.name : typeof errorLike == "function" && (constructorName = errorLike.name, constructorName === "" && (constructorName = new errorLike().name || constructorName)), constructorName;
- }
- __name(getConstructorName2, "getConstructorName");
- function getMessage(errorLike) {
- let msg = "";
- return errorLike && errorLike.message ? msg = errorLike.message : typeof errorLike == "string" && (msg = errorLike), msg;
- }
- __name(getMessage, "getMessage");
- function flag(obj, key, value) {
- let flags = obj.__flags || (obj.__flags = /* @__PURE__ */ Object.create(null));
- if (arguments.length === 3)
- flags[key] = value;
- else
- return flags[key];
- }
- __name(flag, "flag");
- function test2(obj, args) {
- let negate = flag(obj, "negate"), expr = args[0];
- return negate ? !expr : expr;
- }
- __name(test2, "test");
- function type(obj) {
- if (typeof obj > "u")
- return "undefined";
- if (obj === null)
- return "null";
- let stringTag2 = obj[Symbol.toStringTag];
- return typeof stringTag2 == "string" ? stringTag2 : Object.prototype.toString.call(obj).slice(8, -1);
- }
- __name(type, "type");
- var canElideFrames = "captureStackTrace" in Error, _a, AssertionError = (_a = class extends Error {
- message;
- get name() {
- return "AssertionError";
- }
- get ok() {
- return !1;
- }
- constructor(message = "Unspecified AssertionError", props, ssf) {
- super(message), this.message = message, canElideFrames && Error.captureStackTrace(this, ssf || _a);
- for (let key in props)
- key in this || (this[key] = props[key]);
- }
- toJSON(stack) {
- return {
- ...this,
- name: this.name,
- message: this.message,
- ok: !1,
- stack: stack !== !1 ? this.stack : void 0
- };
- }
- }, __name(_a, "AssertionError"), _a);
- function expectTypes(obj, types) {
- let flagMsg = flag(obj, "message"), ssfi = flag(obj, "ssfi");
- flagMsg = flagMsg ? flagMsg + ": " : "", obj = flag(obj, "object"), types = types.map(function(t) {
- return t.toLowerCase();
- }), types.sort();
- let str2 = types.map(function(t, index4) {
- let art = ~["a", "e", "i", "o", "u"].indexOf(t.charAt(0)) ? "an" : "a";
- return (types.length > 1 && index4 === types.length - 1 ? "or " : "") + art + " " + t;
- }).join(", "), objType = type(obj).toLowerCase();
- if (!types.some(function(expected) {
- return objType === expected;
- }))
- throw new AssertionError(
- flagMsg + "object tested must be " + str2 + ", but " + objType + " given",
- void 0,
- ssfi
- );
- }
- __name(expectTypes, "expectTypes");
- function getActual(obj, args) {
- return args.length > 4 ? args[4] : obj._obj;
- }
- __name(getActual, "getActual");
- var ansiColors2 = {
- bold: ["1", "22"],
- dim: ["2", "22"],
- italic: ["3", "23"],
- underline: ["4", "24"],
- // 5 & 6 are blinking
- inverse: ["7", "27"],
- hidden: ["8", "28"],
- strike: ["9", "29"],
- // 10-20 are fonts
- // 21-29 are resets for 1-9
- black: ["30", "39"],
- red: ["31", "39"],
- green: ["32", "39"],
- yellow: ["33", "39"],
- blue: ["34", "39"],
- magenta: ["35", "39"],
- cyan: ["36", "39"],
- white: ["37", "39"],
- brightblack: ["30;1", "39"],
- brightred: ["31;1", "39"],
- brightgreen: ["32;1", "39"],
- brightyellow: ["33;1", "39"],
- brightblue: ["34;1", "39"],
- brightmagenta: ["35;1", "39"],
- brightcyan: ["36;1", "39"],
- brightwhite: ["37;1", "39"],
- grey: ["90", "39"]
- }, styles2 = {
- special: "cyan",
- number: "yellow",
- bigint: "yellow",
- boolean: "yellow",
- undefined: "grey",
- null: "bold",
- string: "green",
- symbol: "green",
- date: "magenta",
- regexp: "red"
- }, truncator2 = "\u2026";
- function colorise2(value, styleType) {
- let color2 = ansiColors2[styles2[styleType]] || ansiColors2[styleType] || "";
- return color2 ? `\x1B[${color2[0]}m${String(value)}\x1B[${color2[1]}m` : String(value);
- }
- __name(colorise2, "colorise");
- function normaliseOptions2({
- showHidden = !1,
- depth = 2,
- colors: colors3 = !1,
- customInspect = !0,
- showProxy = !1,
- maxArrayLength = 1 / 0,
- breakLength = 1 / 0,
- seen = [],
- // eslint-disable-next-line no-shadow
- truncate: truncate22 = 1 / 0,
- stylize = String
- } = {}, inspect32) {
- let options = {
- showHidden: !!showHidden,
- depth: Number(depth),
- colors: !!colors3,
- customInspect: !!customInspect,
- showProxy: !!showProxy,
- maxArrayLength: Number(maxArrayLength),
- breakLength: Number(breakLength),
- truncate: Number(truncate22),
- seen,
- inspect: inspect32,
- stylize
- };
- return options.colors && (options.stylize = colorise2), options;
- }
- __name(normaliseOptions2, "normaliseOptions");
- function isHighSurrogate2(char2) {
- return char2 >= "\uD800" && char2 <= "\uDBFF";
- }
- __name(isHighSurrogate2, "isHighSurrogate");
- function truncate2(string, length2, tail2 = truncator2) {
- string = String(string);
- let tailLength = tail2.length, stringLength = string.length;
- if (tailLength > length2 && stringLength > tailLength)
- return tail2;
- if (stringLength > length2 && stringLength > tailLength) {
- let end2 = length2 - tailLength;
- return end2 > 0 && isHighSurrogate2(string[end2 - 1]) && (end2 = end2 - 1), `${string.slice(0, end2)}${tail2}`;
- }
- return string;
- }
- __name(truncate2, "truncate");
- function inspectList2(list, options, inspectItem, separator = ", ") {
- inspectItem = inspectItem || options.inspect;
- let size = list.length;
- if (size === 0)
- return "";
- let originalLength = options.truncate, output = "", peek2 = "", truncated = "";
- for (let i = 0; i < size; i += 1) {
- let last2 = i + 1 === list.length, secondToLast = i + 2 === list.length;
- truncated = `${truncator2}(${list.length - i})`;
- let value = list[i];
- options.truncate = originalLength - output.length - (last2 ? 0 : separator.length);
- let string = peek2 || inspectItem(value, options) + (last2 ? "" : separator), nextLength = output.length + string.length, truncatedLength = nextLength + truncated.length;
- if (last2 && nextLength > originalLength && output.length + truncated.length <= originalLength || !last2 && !secondToLast && truncatedLength > originalLength || (peek2 = last2 ? "" : inspectItem(list[i + 1], options) + (secondToLast ? "" : separator), !last2 && secondToLast && truncatedLength > originalLength && nextLength + peek2.length > originalLength))
- break;
- if (output += string, !last2 && !secondToLast && nextLength + peek2.length >= originalLength) {
- truncated = `${truncator2}(${list.length - i - 1})`;
- break;
- }
- truncated = "";
- }
- return `${output}${truncated}`;
- }
- __name(inspectList2, "inspectList");
- function quoteComplexKey2(key) {
- return key.match(/^[a-zA-Z_][a-zA-Z_0-9]*$/) ? key : JSON.stringify(key).replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'");
- }
- __name(quoteComplexKey2, "quoteComplexKey");
- function inspectProperty2([key, value], options) {
- return options.truncate -= 2, typeof key == "string" ? key = quoteComplexKey2(key) : typeof key != "number" && (key = `[${options.inspect(key, options)}]`), options.truncate -= key.length, value = options.inspect(value, options), `${key}: ${value}`;
- }
- __name(inspectProperty2, "inspectProperty");
- function inspectArray2(array, options) {
- let nonIndexProperties = Object.keys(array).slice(array.length);
- if (!array.length && !nonIndexProperties.length)
- return "[]";
- options.truncate -= 4;
- let listContents = inspectList2(array, options);
- options.truncate -= listContents.length;
- let propertyContents = "";
- return nonIndexProperties.length && (propertyContents = inspectList2(nonIndexProperties.map((key) => [key, array[key]]), options, inspectProperty2)), `[ ${listContents}${propertyContents ? `, ${propertyContents}` : ""} ]`;
- }
- __name(inspectArray2, "inspectArray");
- var getArrayName2 = __name((array) => typeof Buffer == "function" && array instanceof Buffer ? "Buffer" : array[Symbol.toStringTag] ? array[Symbol.toStringTag] : array.constructor.name, "getArrayName");
- function inspectTypedArray2(array, options) {
- let name = getArrayName2(array);
- options.truncate -= name.length + 4;
- let nonIndexProperties = Object.keys(array).slice(array.length);
- if (!array.length && !nonIndexProperties.length)
- return `${name}[]`;
- let output = "";
- for (let i = 0; i < array.length; i++) {
- let string = `${options.stylize(truncate2(array[i], options.truncate), "number")}${i === array.length - 1 ? "" : ", "}`;
- if (options.truncate -= string.length, array[i] !== array.length && options.truncate <= 3) {
- output += `${truncator2}(${array.length - array[i] + 1})`;
- break;
- }
- output += string;
- }
- let propertyContents = "";
- return nonIndexProperties.length && (propertyContents = inspectList2(nonIndexProperties.map((key) => [key, array[key]]), options, inspectProperty2)), `${name}[ ${output}${propertyContents ? `, ${propertyContents}` : ""} ]`;
- }
- __name(inspectTypedArray2, "inspectTypedArray");
- function inspectDate2(dateObject, options) {
- let stringRepresentation = dateObject.toJSON();
- if (stringRepresentation === null)
- return "Invalid Date";
- let split = stringRepresentation.split("T"), date = split[0];
- return options.stylize(`${date}T${truncate2(split[1], options.truncate - date.length - 1)}`, "date");
- }
- __name(inspectDate2, "inspectDate");
- function inspectFunction2(func, options) {
- let functionType = func[Symbol.toStringTag] || "Function", name = func.name;
- return name ? options.stylize(`[${functionType} ${truncate2(name, options.truncate - 11)}]`, "special") : options.stylize(`[${functionType}]`, "special");
- }
- __name(inspectFunction2, "inspectFunction");
- function inspectMapEntry2([key, value], options) {
- return options.truncate -= 4, key = options.inspect(key, options), options.truncate -= key.length, value = options.inspect(value, options), `${key} => ${value}`;
- }
- __name(inspectMapEntry2, "inspectMapEntry");
- function mapToEntries2(map2) {
- let entries = [];
- return map2.forEach((value, key) => {
- entries.push([key, value]);
- }), entries;
- }
- __name(mapToEntries2, "mapToEntries");
- function inspectMap2(map2, options) {
- return map2.size === 0 ? "Map{}" : (options.truncate -= 7, `Map{ ${inspectList2(mapToEntries2(map2), options, inspectMapEntry2)} }`);
- }
- __name(inspectMap2, "inspectMap");
- var isNaN3 = Number.isNaN || ((i) => i !== i);
- function inspectNumber2(number, options) {
- return isNaN3(number) ? options.stylize("NaN", "number") : number === 1 / 0 ? options.stylize("Infinity", "number") : number === -1 / 0 ? options.stylize("-Infinity", "number") : number === 0 ? options.stylize(1 / number === 1 / 0 ? "+0" : "-0", "number") : options.stylize(truncate2(String(number), options.truncate), "number");
- }
- __name(inspectNumber2, "inspectNumber");
- function inspectBigInt2(number, options) {
- let nums = truncate2(number.toString(), options.truncate - 1);
- return nums !== truncator2 && (nums += "n"), options.stylize(nums, "bigint");
- }
- __name(inspectBigInt2, "inspectBigInt");
- function inspectRegExp2(value, options) {
- let flags = value.toString().split("/")[2], sourceLength = options.truncate - (2 + flags.length), source = value.source;
- return options.stylize(`/${truncate2(source, sourceLength)}/${flags}`, "regexp");
- }
- __name(inspectRegExp2, "inspectRegExp");
- function arrayFromSet2(set22) {
- let values = [];
- return set22.forEach((value) => {
- values.push(value);
- }), values;
- }
- __name(arrayFromSet2, "arrayFromSet");
- function inspectSet2(set22, options) {
- return set22.size === 0 ? "Set{}" : (options.truncate -= 7, `Set{ ${inspectList2(arrayFromSet2(set22), options)} }`);
- }
- __name(inspectSet2, "inspectSet");
- var stringEscapeChars2 = new RegExp("['\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]", "g"), escapeCharacters2 = {
- "\b": "\\b",
- " ": "\\t",
- "\n": "\\n",
- "\f": "\\f",
- "\r": "\\r",
- "'": "\\'",
- "\\": "\\\\"
- }, hex2 = 16, unicodeLength2 = 4;
- function escape2(char2) {
- return escapeCharacters2[char2] || `\\u${`0000${char2.charCodeAt(0).toString(hex2)}`.slice(-unicodeLength2)}`;
- }
- __name(escape2, "escape");
- function inspectString2(string, options) {
- return stringEscapeChars2.test(string) && (string = string.replace(stringEscapeChars2, escape2)), options.stylize(`'${truncate2(string, options.truncate - 2)}'`, "string");
- }
- __name(inspectString2, "inspectString");
- function inspectSymbol2(value) {
- return "description" in Symbol.prototype ? value.description ? `Symbol(${value.description})` : "Symbol()" : value.toString();
- }
- __name(inspectSymbol2, "inspectSymbol");
- var getPromiseValue2 = __name(() => "Promise{\u2026}", "getPromiseValue"), promise_default2 = getPromiseValue2;
- function inspectObject3(object, options) {
- let properties = Object.getOwnPropertyNames(object), symbols = Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(object) : [];
- if (properties.length === 0 && symbols.length === 0)
- return "{}";
- if (options.truncate -= 4, options.seen = options.seen || [], options.seen.includes(object))
- return "[Circular]";
- options.seen.push(object);
- let propertyContents = inspectList2(properties.map((key) => [key, object[key]]), options, inspectProperty2), symbolContents = inspectList2(symbols.map((key) => [key, object[key]]), options, inspectProperty2);
- options.seen.pop();
- let sep = "";
- return propertyContents && symbolContents && (sep = ", "), `{ ${propertyContents}${sep}${symbolContents} }`;
- }
- __name(inspectObject3, "inspectObject");
- var toStringTag2 = typeof Symbol < "u" && Symbol.toStringTag ? Symbol.toStringTag : !1;
- function inspectClass2(value, options) {
- let name = "";
- return toStringTag2 && toStringTag2 in value && (name = value[toStringTag2]), name = name || value.constructor.name, (!name || name === "_class") && (name = "<Anonymous Class>"), options.truncate -= name.length, `${name}${inspectObject3(value, options)}`;
- }
- __name(inspectClass2, "inspectClass");
- function inspectArguments2(args, options) {
- return args.length === 0 ? "Arguments[]" : (options.truncate -= 13, `Arguments[ ${inspectList2(args, options)} ]`);
- }
- __name(inspectArguments2, "inspectArguments");
- var errorKeys2 = [
- "stack",
- "line",
- "column",
- "name",
- "message",
- "fileName",
- "lineNumber",
- "columnNumber",
- "number",
- "description",
- "cause"
- ];
- function inspectObject22(error, options) {
- let properties = Object.getOwnPropertyNames(error).filter((key) => errorKeys2.indexOf(key) === -1), name = error.name;
- options.truncate -= name.length;
- let message = "";
- if (typeof error.message == "string" ? message = truncate2(error.message, options.truncate) : properties.unshift("message"), message = message ? `: ${message}` : "", options.truncate -= message.length + 5, options.seen = options.seen || [], options.seen.includes(error))
- return "[Circular]";
- options.seen.push(error);
- let propertyContents = inspectList2(properties.map((key) => [key, error[key]]), options, inspectProperty2);
- return `${name}${message}${propertyContents ? ` { ${propertyContents} }` : ""}`;
- }
- __name(inspectObject22, "inspectObject");
- function inspectAttribute2([key, value], options) {
- return options.truncate -= 3, value ? `${options.stylize(String(key), "yellow")}=${options.stylize(`"${value}"`, "string")}` : `${options.stylize(String(key), "yellow")}`;
- }
- __name(inspectAttribute2, "inspectAttribute");
- function inspectNodeCollection2(collection, options) {
- return inspectList2(collection, options, inspectNode2, `
- `);
- }
- __name(inspectNodeCollection2, "inspectNodeCollection");
- function inspectNode2(node2, options) {
- switch (node2.nodeType) {
- case 1:
- return inspectHTML2(node2, options);
- case 3:
- return options.inspect(node2.data, options);
- default:
- return options.inspect(node2, options);
- }
- }
- __name(inspectNode2, "inspectNode");
- function inspectHTML2(element, options) {
- let properties = element.getAttributeNames(), name = element.tagName.toLowerCase(), head2 = options.stylize(`<${name}`, "special"), headClose = options.stylize(">", "special"), tail2 = options.stylize(`</${name}>`, "special");
- options.truncate -= name.length * 2 + 5;
- let propertyContents = "";
- properties.length > 0 && (propertyContents += " ", propertyContents += inspectList2(properties.map((key) => [key, element.getAttribute(key)]), options, inspectAttribute2, " ")), options.truncate -= propertyContents.length;
- let truncate22 = options.truncate, children = inspectNodeCollection2(element.children, options);
- return children && children.length > truncate22 && (children = `${truncator2}(${element.children.length})`), `${head2}${propertyContents}${headClose}${children}${tail2}`;
- }
- __name(inspectHTML2, "inspectHTML");
- var symbolsSupported2 = typeof Symbol == "function" && typeof Symbol.for == "function", chaiInspect2 = symbolsSupported2 ? Symbol.for("chai/inspect") : "@@chai/inspect", nodeInspect2 = Symbol.for("nodejs.util.inspect.custom"), constructorMap2 = /* @__PURE__ */ new WeakMap(), stringTagMap2 = {}, baseTypesMap2 = {
- undefined: __name((value, options) => options.stylize("undefined", "undefined"), "undefined"),
- null: __name((value, options) => options.stylize("null", "null"), "null"),
- boolean: __name((value, options) => options.stylize(String(value), "boolean"), "boolean"),
- Boolean: __name((value, options) => options.stylize(String(value), "boolean"), "Boolean"),
- number: inspectNumber2,
- Number: inspectNumber2,
- bigint: inspectBigInt2,
- BigInt: inspectBigInt2,
- string: inspectString2,
- String: inspectString2,
- function: inspectFunction2,
- Function: inspectFunction2,
- symbol: inspectSymbol2,
- // A Symbol polyfill will return `Symbol` not `symbol` from typedetect
- Symbol: inspectSymbol2,
- Array: inspectArray2,
- Date: inspectDate2,
- Map: inspectMap2,
- Set: inspectSet2,
- RegExp: inspectRegExp2,
- Promise: promise_default2,
- // WeakSet, WeakMap are totally opaque to us
- WeakSet: __name((value, options) => options.stylize("WeakSet{\u2026}", "special"), "WeakSet"),
- WeakMap: __name((value, options) => options.stylize("WeakMap{\u2026}", "special"), "WeakMap"),
- Arguments: inspectArguments2,
- Int8Array: inspectTypedArray2,
- Uint8Array: inspectTypedArray2,
- Uint8ClampedArray: inspectTypedArray2,
- Int16Array: inspectTypedArray2,
- Uint16Array: inspectTypedArray2,
- Int32Array: inspectTypedArray2,
- Uint32Array: inspectTypedArray2,
- Float32Array: inspectTypedArray2,
- Float64Array: inspectTypedArray2,
- Generator: __name(() => "", "Generator"),
- DataView: __name(() => "", "DataView"),
- ArrayBuffer: __name(() => "", "ArrayBuffer"),
- Error: inspectObject22,
- HTMLCollection: inspectNodeCollection2,
- NodeList: inspectNodeCollection2
- }, inspectCustom2 = __name((value, options, type32) => chaiInspect2 in value && typeof value[chaiInspect2] == "function" ? value[chaiInspect2](options) : nodeInspect2 in value && typeof value[nodeInspect2] == "function" ? value[nodeInspect2](options.depth, options) : "inspect" in value && typeof value.inspect == "function" ? value.inspect(options.depth, options) : "constructor" in value && constructorMap2.has(value.constructor) ? constructorMap2.get(value.constructor)(value, options) : stringTagMap2[type32] ? stringTagMap2[type32](value, options) : "", "inspectCustom"), toString4 = Object.prototype.toString;
- function inspect4(value, opts = {}) {
- let options = normaliseOptions2(opts, inspect4), { customInspect } = options, type32 = value === null ? "null" : typeof value;
- if (type32 === "object" && (type32 = toString4.call(value).slice(8, -1)), type32 in baseTypesMap2)
- return baseTypesMap2[type32](value, options);
- if (customInspect && value) {
- let output = inspectCustom2(value, options, type32);
- if (output)
- return typeof output == "string" ? output : inspect4(output, options);
- }
- let proto = value ? Object.getPrototypeOf(value) : !1;
- return proto === Object.prototype || proto === null ? inspectObject3(value, options) : value && typeof HTMLElement == "function" && value instanceof HTMLElement ? inspectHTML2(value, options) : "constructor" in value ? value.constructor !== Object ? inspectClass2(value, options) : inspectObject3(value, options) : value === Object(value) ? inspectObject3(value, options) : options.stylize(String(value), type32);
- }
- __name(inspect4, "inspect");
- var config2 = {
- /**
- * ### config.includeStack
- *
- * User configurable property, influences whether stack trace
- * is included in Assertion error message. Default of false
- * suppresses stack trace in the error message.
- *
- * chai.config.includeStack = true; // enable stack on error
- *
- * @param {boolean}
- * @public
- */
- includeStack: !1,
- /**
- * ### config.showDiff
- *
- * User configurable property, influences whether or not
- * the `showDiff` flag should be included in the thrown
- * AssertionErrors. `false` will always be `false`; `true`
- * will be true when the assertion has requested a diff
- * be shown.
- *
- * @param {boolean}
- * @public
- */
- showDiff: !0,
- /**
- * ### config.truncateThreshold
- *
- * User configurable property, sets length threshold for actual and
- * expected values in assertion errors. If this threshold is exceeded, for
- * example for large data structures, the value is replaced with something
- * like `[ Array(3) ]` or `{ Object (prop1, prop2) }`.
- *
- * Set it to zero if you want to disable truncating altogether.
- *
- * This is especially userful when doing assertions on arrays: having this
- * set to a reasonable large value makes the failure messages readily
- * inspectable.
- *
- * chai.config.truncateThreshold = 0; // disable truncating
- *
- * @param {number}
- * @public
- */
- truncateThreshold: 40,
- /**
- * ### config.useProxy
- *
- * User configurable property, defines if chai will use a Proxy to throw
- * an error when a non-existent property is read, which protects users
- * from typos when using property-based assertions.
- *
- * Set it to false if you want to disable this feature.
- *
- * chai.config.useProxy = false; // disable use of Proxy
- *
- * This feature is automatically disabled regardless of this config value
- * in environments that don't support proxies.
- *
- * @param {boolean}
- * @public
- */
- useProxy: !0,
- /**
- * ### config.proxyExcludedKeys
- *
- * User configurable property, defines which properties should be ignored
- * instead of throwing an error if they do not exist on the assertion.
- * This is only applied if the environment Chai is running in supports proxies and
- * if the `useProxy` configuration setting is enabled.
- * By default, `then` and `inspect` will not throw an error if they do not exist on the
- * assertion object because the `.inspect` property is read by `util.inspect` (for example, when
- * using `console.log` on the assertion object) and `.then` is necessary for promise type-checking.
- *
- * // By default these keys will not throw an error if they do not exist on the assertion object
- * chai.config.proxyExcludedKeys = ['then', 'inspect'];
- *
- * @param {Array}
- * @public
- */
- proxyExcludedKeys: ["then", "catch", "inspect", "toJSON"],
- /**
- * ### config.deepEqual
- *
- * User configurable property, defines which a custom function to use for deepEqual
- * comparisons.
- * By default, the function used is the one from the `deep-eql` package without custom comparator.
- *
- * // use a custom comparator
- * chai.config.deepEqual = (expected, actual) => {
- * return chai.util.eql(expected, actual, {
- * comparator: (expected, actual) => {
- * // for non number comparison, use the default behavior
- * if(typeof expected !== 'number') return null;
- * // allow a difference of 10 between compared numbers
- * return typeof actual === 'number' && Math.abs(actual - expected) < 10
- * }
- * })
- * };
- *
- * @param {Function}
- * @public
- */
- deepEqual: null
- };
- function inspect22(obj, showHidden, depth, colors3) {
- let options = {
- colors: colors3,
- depth: typeof depth > "u" ? 2 : depth,
- showHidden,
- truncate: config2.truncateThreshold ? config2.truncateThreshold : 1 / 0
- };
- return inspect4(obj, options);
- }
- __name(inspect22, "inspect");
- function objDisplay(obj) {
- let str2 = inspect22(obj), type32 = Object.prototype.toString.call(obj);
- if (config2.truncateThreshold && str2.length >= config2.truncateThreshold) {
- if (type32 === "[object Function]")
- return !obj.name || obj.name === "" ? "[Function]" : "[Function: " + obj.name + "]";
- if (type32 === "[object Array]")
- return "[ Array(" + obj.length + ") ]";
- if (type32 === "[object Object]") {
- let keys3 = Object.keys(obj);
- return "{ Object (" + (keys3.length > 2 ? keys3.splice(0, 2).join(", ") + ", ..." : keys3.join(", ")) + ") }";
- } else
- return str2;
- } else
- return str2;
- }
- __name(objDisplay, "objDisplay");
- function getMessage2(obj, args) {
- let negate = flag(obj, "negate"), val = flag(obj, "object"), expected = args[3], actual = getActual(obj, args), msg = negate ? args[2] : args[1], flagMsg = flag(obj, "message");
- return typeof msg == "function" && (msg = msg()), msg = msg || "", msg = msg.replace(/#\{this\}/g, function() {
- return objDisplay(val);
- }).replace(/#\{act\}/g, function() {
- return objDisplay(actual);
- }).replace(/#\{exp\}/g, function() {
- return objDisplay(expected);
- }), flagMsg ? flagMsg + ": " + msg : msg;
- }
- __name(getMessage2, "getMessage");
- function transferFlags(assertion, object, includeAll) {
- let flags = assertion.__flags || (assertion.__flags = /* @__PURE__ */ Object.create(null));
- object.__flags || (object.__flags = /* @__PURE__ */ Object.create(null)), includeAll = arguments.length === 3 ? includeAll : !0;
- for (let flag3 in flags)
- (includeAll || flag3 !== "object" && flag3 !== "ssfi" && flag3 !== "lockSsfi" && flag3 != "message") && (object.__flags[flag3] = flags[flag3]);
- }
- __name(transferFlags, "transferFlags");
- function type2(obj) {
- if (typeof obj > "u")
- return "undefined";
- if (obj === null)
- return "null";
- let stringTag2 = obj[Symbol.toStringTag];
- return typeof stringTag2 == "string" ? stringTag2 : Object.prototype.toString.call(obj).slice(8, -1);
- }
- __name(type2, "type");
- function FakeMap() {
- this._key = "chai/deep-eql__" + Math.random() + Date.now();
- }
- __name(FakeMap, "FakeMap");
- FakeMap.prototype = {
- get: __name(function(key) {
- return key[this._key];
- }, "get"),
- set: __name(function(key, value) {
- Object.isExtensible(key) && Object.defineProperty(key, this._key, {
- value,
- configurable: !0
- });
- }, "set")
- };
- var MemoizeMap = typeof WeakMap == "function" ? WeakMap : FakeMap;
- function memoizeCompare(leftHandOperand, rightHandOperand, memoizeMap) {
- if (!memoizeMap || isPrimitive2(leftHandOperand) || isPrimitive2(rightHandOperand))
- return null;
- var leftHandMap = memoizeMap.get(leftHandOperand);
- if (leftHandMap) {
- var result = leftHandMap.get(rightHandOperand);
- if (typeof result == "boolean")
- return result;
- }
- return null;
- }
- __name(memoizeCompare, "memoizeCompare");
- function memoizeSet(leftHandOperand, rightHandOperand, memoizeMap, result) {
- if (!(!memoizeMap || isPrimitive2(leftHandOperand) || isPrimitive2(rightHandOperand))) {
- var leftHandMap = memoizeMap.get(leftHandOperand);
- leftHandMap ? leftHandMap.set(rightHandOperand, result) : (leftHandMap = new MemoizeMap(), leftHandMap.set(rightHandOperand, result), memoizeMap.set(leftHandOperand, leftHandMap));
- }
- }
- __name(memoizeSet, "memoizeSet");
- var deep_eql_default = deepEqual;
- function deepEqual(leftHandOperand, rightHandOperand, options) {
- if (options && options.comparator)
- return extensiveDeepEqual(leftHandOperand, rightHandOperand, options);
- var simpleResult = simpleEqual(leftHandOperand, rightHandOperand);
- return simpleResult !== null ? simpleResult : extensiveDeepEqual(leftHandOperand, rightHandOperand, options);
- }
- __name(deepEqual, "deepEqual");
- function simpleEqual(leftHandOperand, rightHandOperand) {
- return leftHandOperand === rightHandOperand ? leftHandOperand !== 0 || 1 / leftHandOperand === 1 / rightHandOperand : leftHandOperand !== leftHandOperand && // eslint-disable-line no-self-compare
- rightHandOperand !== rightHandOperand ? !0 : isPrimitive2(leftHandOperand) || isPrimitive2(rightHandOperand) ? !1 : null;
- }
- __name(simpleEqual, "simpleEqual");
- function extensiveDeepEqual(leftHandOperand, rightHandOperand, options) {
- options = options || {}, options.memoize = options.memoize === !1 ? !1 : options.memoize || new MemoizeMap();
- var comparator = options && options.comparator, memoizeResultLeft = memoizeCompare(leftHandOperand, rightHandOperand, options.memoize);
- if (memoizeResultLeft !== null)
- return memoizeResultLeft;
- var memoizeResultRight = memoizeCompare(rightHandOperand, leftHandOperand, options.memoize);
- if (memoizeResultRight !== null)
- return memoizeResultRight;
- if (comparator) {
- var comparatorResult = comparator(leftHandOperand, rightHandOperand);
- if (comparatorResult === !1 || comparatorResult === !0)
- return memoizeSet(leftHandOperand, rightHandOperand, options.memoize, comparatorResult), comparatorResult;
- var simpleResult = simpleEqual(leftHandOperand, rightHandOperand);
- if (simpleResult !== null)
- return simpleResult;
- }
- var leftHandType = type2(leftHandOperand);
- if (leftHandType !== type2(rightHandOperand))
- return memoizeSet(leftHandOperand, rightHandOperand, options.memoize, !1), !1;
- memoizeSet(leftHandOperand, rightHandOperand, options.memoize, !0);
- var result = extensiveDeepEqualByType(leftHandOperand, rightHandOperand, leftHandType, options);
- return memoizeSet(leftHandOperand, rightHandOperand, options.memoize, result), result;
- }
- __name(extensiveDeepEqual, "extensiveDeepEqual");
- function extensiveDeepEqualByType(leftHandOperand, rightHandOperand, leftHandType, options) {
- switch (leftHandType) {
- case "String":
- case "Number":
- case "Boolean":
- case "Date":
- return deepEqual(leftHandOperand.valueOf(), rightHandOperand.valueOf());
- case "Promise":
- case "Symbol":
- case "function":
- case "WeakMap":
- case "WeakSet":
- return leftHandOperand === rightHandOperand;
- case "Error":
- return keysEqual(leftHandOperand, rightHandOperand, ["name", "message", "code"], options);
- case "Arguments":
- case "Int8Array":
- case "Uint8Array":
- case "Uint8ClampedArray":
- case "Int16Array":
- case "Uint16Array":
- case "Int32Array":
- case "Uint32Array":
- case "Float32Array":
- case "Float64Array":
- case "Array":
- return iterableEqual(leftHandOperand, rightHandOperand, options);
- case "RegExp":
- return regexpEqual(leftHandOperand, rightHandOperand);
- case "Generator":
- return generatorEqual(leftHandOperand, rightHandOperand, options);
- case "DataView":
- return iterableEqual(new Uint8Array(leftHandOperand.buffer), new Uint8Array(rightHandOperand.buffer), options);
- case "ArrayBuffer":
- return iterableEqual(new Uint8Array(leftHandOperand), new Uint8Array(rightHandOperand), options);
- case "Set":
- return entriesEqual(leftHandOperand, rightHandOperand, options);
- case "Map":
- return entriesEqual(leftHandOperand, rightHandOperand, options);
- case "Temporal.PlainDate":
- case "Temporal.PlainTime":
- case "Temporal.PlainDateTime":
- case "Temporal.Instant":
- case "Temporal.ZonedDateTime":
- case "Temporal.PlainYearMonth":
- case "Temporal.PlainMonthDay":
- return leftHandOperand.equals(rightHandOperand);
- case "Temporal.Duration":
- return leftHandOperand.total("nanoseconds") === rightHandOperand.total("nanoseconds");
- case "Temporal.TimeZone":
- case "Temporal.Calendar":
- return leftHandOperand.toString() === rightHandOperand.toString();
- default:
- return objectEqual(leftHandOperand, rightHandOperand, options);
- }
- }
- __name(extensiveDeepEqualByType, "extensiveDeepEqualByType");
- function regexpEqual(leftHandOperand, rightHandOperand) {
- return leftHandOperand.toString() === rightHandOperand.toString();
- }
- __name(regexpEqual, "regexpEqual");
- function entriesEqual(leftHandOperand, rightHandOperand, options) {
- try {
- if (leftHandOperand.size !== rightHandOperand.size)
- return !1;
- if (leftHandOperand.size === 0)
- return !0;
- } catch {
- return !1;
- }
- var leftHandItems = [], rightHandItems = [];
- return leftHandOperand.forEach(__name(function(key, value) {
- leftHandItems.push([key, value]);
- }, "gatherEntries")), rightHandOperand.forEach(__name(function(key, value) {
- rightHandItems.push([key, value]);
- }, "gatherEntries")), iterableEqual(leftHandItems.sort(), rightHandItems.sort(), options);
- }
- __name(entriesEqual, "entriesEqual");
- function iterableEqual(leftHandOperand, rightHandOperand, options) {
- var length2 = leftHandOperand.length;
- if (length2 !== rightHandOperand.length)
- return !1;
- if (length2 === 0)
- return !0;
- for (var index4 = -1; ++index4 < length2; )
- if (deepEqual(leftHandOperand[index4], rightHandOperand[index4], options) === !1)
- return !1;
- return !0;
- }
- __name(iterableEqual, "iterableEqual");
- function generatorEqual(leftHandOperand, rightHandOperand, options) {
- return iterableEqual(getGeneratorEntries(leftHandOperand), getGeneratorEntries(rightHandOperand), options);
- }
- __name(generatorEqual, "generatorEqual");
- function hasIteratorFunction(target) {
- return typeof Symbol < "u" && typeof target == "object" && typeof Symbol.iterator < "u" && typeof target[Symbol.iterator] == "function";
- }
- __name(hasIteratorFunction, "hasIteratorFunction");
- function getIteratorEntries(target) {
- if (hasIteratorFunction(target))
- try {
- return getGeneratorEntries(target[Symbol.iterator]());
- } catch {
- return [];
- }
- return [];
- }
- __name(getIteratorEntries, "getIteratorEntries");
- function getGeneratorEntries(generator) {
- for (var generatorResult = generator.next(), accumulator = [generatorResult.value]; generatorResult.done === !1; )
- generatorResult = generator.next(), accumulator.push(generatorResult.value);
- return accumulator;
- }
- __name(getGeneratorEntries, "getGeneratorEntries");
- function getEnumerableKeys(target) {
- var keys3 = [];
- for (var key in target)
- keys3.push(key);
- return keys3;
- }
- __name(getEnumerableKeys, "getEnumerableKeys");
- function getEnumerableSymbols(target) {
- for (var keys3 = [], allKeys = Object.getOwnPropertySymbols(target), i = 0; i < allKeys.length; i += 1) {
- var key = allKeys[i];
- Object.getOwnPropertyDescriptor(target, key).enumerable && keys3.push(key);
- }
- return keys3;
- }
- __name(getEnumerableSymbols, "getEnumerableSymbols");
- function keysEqual(leftHandOperand, rightHandOperand, keys3, options) {
- var length2 = keys3.length;
- if (length2 === 0)
- return !0;
- for (var i = 0; i < length2; i += 1)
- if (deepEqual(leftHandOperand[keys3[i]], rightHandOperand[keys3[i]], options) === !1)
- return !1;
- return !0;
- }
- __name(keysEqual, "keysEqual");
- function objectEqual(leftHandOperand, rightHandOperand, options) {
- var leftHandKeys = getEnumerableKeys(leftHandOperand), rightHandKeys = getEnumerableKeys(rightHandOperand), leftHandSymbols = getEnumerableSymbols(leftHandOperand), rightHandSymbols = getEnumerableSymbols(rightHandOperand);
- if (leftHandKeys = leftHandKeys.concat(leftHandSymbols), rightHandKeys = rightHandKeys.concat(rightHandSymbols), leftHandKeys.length && leftHandKeys.length === rightHandKeys.length)
- return iterableEqual(mapSymbols(leftHandKeys).sort(), mapSymbols(rightHandKeys).sort()) === !1 ? !1 : keysEqual(leftHandOperand, rightHandOperand, leftHandKeys, options);
- var leftHandEntries = getIteratorEntries(leftHandOperand), rightHandEntries = getIteratorEntries(rightHandOperand);
- return leftHandEntries.length && leftHandEntries.length === rightHandEntries.length ? (leftHandEntries.sort(), rightHandEntries.sort(), iterableEqual(leftHandEntries, rightHandEntries, options)) : leftHandKeys.length === 0 && leftHandEntries.length === 0 && rightHandKeys.length === 0 && rightHandEntries.length === 0;
- }
- __name(objectEqual, "objectEqual");
- function isPrimitive2(value) {
- return value === null || typeof value != "object";
- }
- __name(isPrimitive2, "isPrimitive");
- function mapSymbols(arr) {
- return arr.map(__name(function(entry) {
- return typeof entry == "symbol" ? entry.toString() : entry;
- }, "mapSymbol"));
- }
- __name(mapSymbols, "mapSymbols");
- function hasProperty(obj, name) {
- return typeof obj > "u" || obj === null ? !1 : name in Object(obj);
- }
- __name(hasProperty, "hasProperty");
- function parsePath(path) {
- return path.replace(/([^\\])\[/g, "$1.[").match(/(\\\.|[^.]+?)+/g).map((value) => {
- if (value === "constructor" || value === "__proto__" || value === "prototype")
- return {};
- let mArr = /^\[(\d+)\]$/.exec(value), parsed = null;
- return mArr ? parsed = { i: parseFloat(mArr[1]) } : parsed = { p: value.replace(/\\([.[\]])/g, "$1") }, parsed;
- });
- }
- __name(parsePath, "parsePath");
- function internalGetPathValue(obj, parsed, pathDepth) {
- let temporaryValue = obj, res = null;
- pathDepth = typeof pathDepth > "u" ? parsed.length : pathDepth;
- for (let i = 0; i < pathDepth; i++) {
- let part = parsed[i];
- temporaryValue && (typeof part.p > "u" ? temporaryValue = temporaryValue[part.i] : temporaryValue = temporaryValue[part.p], i === pathDepth - 1 && (res = temporaryValue));
- }
- return res;
- }
- __name(internalGetPathValue, "internalGetPathValue");
- function getPathInfo(obj, path) {
- let parsed = parsePath(path), last2 = parsed[parsed.length - 1], info = {
- parent: parsed.length > 1 ? internalGetPathValue(obj, parsed, parsed.length - 1) : obj,
- name: last2.p || last2.i,
- value: internalGetPathValue(obj, parsed)
- };
- return info.exists = hasProperty(info.parent, info.name), info;
- }
- __name(getPathInfo, "getPathInfo");
- var _a2, Assertion = (_a2 = class {
- /** @type {{}} */
- __flags = {};
- /**
- * Creates object for chaining.
- * `Assertion` objects contain metadata in the form of flags. Three flags can
- * be assigned during instantiation by passing arguments to this constructor:
- *
- * - `object`: This flag contains the target of the assertion. For example, in
- * the assertion `expect(numKittens).to.equal(7);`, the `object` flag will
- * contain `numKittens` so that the `equal` assertion can reference it when
- * needed.
- *
- * - `message`: This flag contains an optional custom error message to be
- * prepended to the error message that's generated by the assertion when it
- * fails.
- *
- * - `ssfi`: This flag stands for "start stack function indicator". It
- * contains a function reference that serves as the starting point for
- * removing frames from the stack trace of the error that's created by the
- * assertion when it fails. The goal is to provide a cleaner stack trace to
- * end users by removing Chai's internal functions. Note that it only works
- * in environments that support `Error.captureStackTrace`, and only when
- * `Chai.config.includeStack` hasn't been set to `false`.
- *
- * - `lockSsfi`: This flag controls whether or not the given `ssfi` flag
- * should retain its current value, even as assertions are chained off of
- * this object. This is usually set to `true` when creating a new assertion
- * from within another assertion. It's also temporarily set to `true` before
- * an overwritten assertion gets called by the overwriting assertion.
- *
- * - `eql`: This flag contains the deepEqual function to be used by the assertion.
- *
- * @param {unknown} obj target of the assertion
- * @param {string} [msg] (optional) custom error message
- * @param {Function} [ssfi] (optional) starting point for removing stack frames
- * @param {boolean} [lockSsfi] (optional) whether or not the ssfi flag is locked
- */
- constructor(obj, msg, ssfi, lockSsfi) {
- return flag(this, "ssfi", ssfi || _a2), flag(this, "lockSsfi", lockSsfi), flag(this, "object", obj), flag(this, "message", msg), flag(this, "eql", config2.deepEqual || deep_eql_default), proxify(this);
- }
- /** @returns {boolean} */
- static get includeStack() {
- return console.warn(
- "Assertion.includeStack is deprecated, use chai.config.includeStack instead."
- ), config2.includeStack;
- }
- /** @param {boolean} value */
- static set includeStack(value) {
- console.warn(
- "Assertion.includeStack is deprecated, use chai.config.includeStack instead."
- ), config2.includeStack = value;
- }
- /** @returns {boolean} */
- static get showDiff() {
- return console.warn(
- "Assertion.showDiff is deprecated, use chai.config.showDiff instead."
- ), config2.showDiff;
- }
- /** @param {boolean} value */
- static set showDiff(value) {
- console.warn(
- "Assertion.showDiff is deprecated, use chai.config.showDiff instead."
- ), config2.showDiff = value;
- }
- /**
- * @param {string} name
- * @param {Function} fn
- */
- static addProperty(name, fn4) {
- addProperty(this.prototype, name, fn4);
- }
- /**
- * @param {string} name
- * @param {Function} fn
- */
- static addMethod(name, fn4) {
- addMethod(this.prototype, name, fn4);
- }
- /**
- * @param {string} name
- * @param {Function} fn
- * @param {Function} chainingBehavior
- */
- static addChainableMethod(name, fn4, chainingBehavior) {
- addChainableMethod(this.prototype, name, fn4, chainingBehavior);
- }
- /**
- * @param {string} name
- * @param {Function} fn
- */
- static overwriteProperty(name, fn4) {
- overwriteProperty(this.prototype, name, fn4);
- }
- /**
- * @param {string} name
- * @param {Function} fn
- */
- static overwriteMethod(name, fn4) {
- overwriteMethod(this.prototype, name, fn4);
- }
- /**
- * @param {string} name
- * @param {Function} fn
- * @param {Function} chainingBehavior
- */
- static overwriteChainableMethod(name, fn4, chainingBehavior) {
- overwriteChainableMethod(this.prototype, name, fn4, chainingBehavior);
- }
- /**
- * ### .assert(expression, message, negateMessage, expected, actual, showDiff)
- *
- * Executes an expression and check expectations. Throws AssertionError for reporting if test doesn't pass.
- *
- * @name assert
- * @param {unknown} _expr to be tested
- * @param {string | Function} msg or function that returns message to display if expression fails
- * @param {string | Function} _negateMsg or function that returns negatedMessage to display if negated expression fails
- * @param {unknown} expected value (remember to check for negation)
- * @param {unknown} _actual (optional) will default to `this.obj`
- * @param {boolean} showDiff (optional) when set to `true`, assert will display a diff in addition to the message if expression fails
- * @returns {void}
- */
- assert(_expr, msg, _negateMsg, expected, _actual, showDiff) {
- let ok = test2(this, arguments);
- if (showDiff !== !1 && (showDiff = !0), expected === void 0 && _actual === void 0 && (showDiff = !1), config2.showDiff !== !0 && (showDiff = !1), !ok) {
- msg = getMessage2(this, arguments);
- let assertionErrorObjectProperties = {
- actual: getActual(this, arguments),
- expected,
- showDiff
- }, operator = getOperator(this, arguments);
- throw operator && (assertionErrorObjectProperties.operator = operator), new AssertionError(
- msg,
- assertionErrorObjectProperties,
- // @ts-expect-error Not sure what to do about these types yet
- config2.includeStack ? this.assert : flag(this, "ssfi")
- );
- }
- }
- /**
- * Quick reference to stored `actual` value for plugin developers.
- *
- * @returns {unknown}
- */
- get _obj() {
- return flag(this, "object");
- }
- /**
- * Quick reference to stored `actual` value for plugin developers.
- *
- * @param {unknown} val
- */
- set _obj(val) {
- flag(this, "object", val);
- }
- }, __name(_a2, "Assertion"), _a2);
- function isProxyEnabled() {
- return config2.useProxy && typeof Proxy < "u" && typeof Reflect < "u";
- }
- __name(isProxyEnabled, "isProxyEnabled");
- function addProperty(ctx, name, getter) {
- getter = getter === void 0 ? function() {
- } : getter, Object.defineProperty(ctx, name, {
- get: __name(function propertyGetter() {
- !isProxyEnabled() && !flag(this, "lockSsfi") && flag(this, "ssfi", propertyGetter);
- let result = getter.call(this);
- if (result !== void 0) return result;
- let newAssertion = new Assertion();
- return transferFlags(this, newAssertion), newAssertion;
- }, "propertyGetter"),
- configurable: !0
- });
- }
- __name(addProperty, "addProperty");
- var fnLengthDesc = Object.getOwnPropertyDescriptor(function() {
- }, "length");
- function addLengthGuard(fn4, assertionName, isChainable) {
- return fnLengthDesc.configurable && Object.defineProperty(fn4, "length", {
- get: __name(function() {
- throw Error(
- isChainable ? "Invalid Chai property: " + assertionName + '.length. Due to a compatibility issue, "length" cannot directly follow "' + assertionName + '". Use "' + assertionName + '.lengthOf" instead.' : "Invalid Chai property: " + assertionName + '.length. See docs for proper usage of "' + assertionName + '".'
- );
- }, "get")
- }), fn4;
- }
- __name(addLengthGuard, "addLengthGuard");
- function getProperties(object) {
- let result = Object.getOwnPropertyNames(object);
- function addProperty2(property) {
- result.indexOf(property) === -1 && result.push(property);
- }
- __name(addProperty2, "addProperty");
- let proto = Object.getPrototypeOf(object);
- for (; proto !== null; )
- Object.getOwnPropertyNames(proto).forEach(addProperty2), proto = Object.getPrototypeOf(proto);
- return result;
- }
- __name(getProperties, "getProperties");
- var builtins = ["__flags", "__methods", "_obj", "assert"];
- function proxify(obj, nonChainableMethodName) {
- return isProxyEnabled() ? new Proxy(obj, {
- get: __name(function proxyGetter(target, property) {
- if (typeof property == "string" && config2.proxyExcludedKeys.indexOf(property) === -1 && !Reflect.has(target, property)) {
- if (nonChainableMethodName)
- throw Error(
- "Invalid Chai property: " + nonChainableMethodName + "." + property + '. See docs for proper usage of "' + nonChainableMethodName + '".'
- );
- let suggestion = null, suggestionDistance = 4;
- throw getProperties(target).forEach(function(prop) {
- if (
- // we actually mean to check `Object.prototype` here
- // eslint-disable-next-line no-prototype-builtins
- !Object.prototype.hasOwnProperty(prop) && builtins.indexOf(prop) === -1
- ) {
- let dist = stringDistanceCapped(property, prop, suggestionDistance);
- dist < suggestionDistance && (suggestion = prop, suggestionDistance = dist);
- }
- }), Error(
- suggestion !== null ? "Invalid Chai property: " + property + '. Did you mean "' + suggestion + '"?' : "Invalid Chai property: " + property
- );
- }
- return builtins.indexOf(property) === -1 && !flag(target, "lockSsfi") && flag(target, "ssfi", proxyGetter), Reflect.get(target, property);
- }, "proxyGetter")
- }) : obj;
- }
- __name(proxify, "proxify");
- function stringDistanceCapped(strA, strB, cap) {
- if (Math.abs(strA.length - strB.length) >= cap)
- return cap;
- let memo2 = [];
- for (let i = 0; i <= strA.length; i++)
- memo2[i] = Array(strB.length + 1).fill(0), memo2[i][0] = i;
- for (let j = 0; j < strB.length; j++)
- memo2[0][j] = j;
- for (let i = 1; i <= strA.length; i++) {
- let ch = strA.charCodeAt(i - 1);
- for (let j = 1; j <= strB.length; j++) {
- if (Math.abs(i - j) >= cap) {
- memo2[i][j] = cap;
- continue;
- }
- memo2[i][j] = Math.min(
- memo2[i - 1][j] + 1,
- memo2[i][j - 1] + 1,
- memo2[i - 1][j - 1] + (ch === strB.charCodeAt(j - 1) ? 0 : 1)
- );
- }
- }
- return memo2[strA.length][strB.length];
- }
- __name(stringDistanceCapped, "stringDistanceCapped");
- function addMethod(ctx, name, method) {
- let methodWrapper = __name(function() {
- flag(this, "lockSsfi") || flag(this, "ssfi", methodWrapper);
- let result = method.apply(this, arguments);
- if (result !== void 0) return result;
- let newAssertion = new Assertion();
- return transferFlags(this, newAssertion), newAssertion;
- }, "methodWrapper");
- addLengthGuard(methodWrapper, name, !1), ctx[name] = proxify(methodWrapper, name);
- }
- __name(addMethod, "addMethod");
- function overwriteProperty(ctx, name, getter) {
- let _get = Object.getOwnPropertyDescriptor(ctx, name), _super = __name(function() {
- }, "_super");
- _get && typeof _get.get == "function" && (_super = _get.get), Object.defineProperty(ctx, name, {
- get: __name(function overwritingPropertyGetter() {
- !isProxyEnabled() && !flag(this, "lockSsfi") && flag(this, "ssfi", overwritingPropertyGetter);
- let origLockSsfi = flag(this, "lockSsfi");
- flag(this, "lockSsfi", !0);
- let result = getter(_super).call(this);
- if (flag(this, "lockSsfi", origLockSsfi), result !== void 0)
- return result;
- let newAssertion = new Assertion();
- return transferFlags(this, newAssertion), newAssertion;
- }, "overwritingPropertyGetter"),
- configurable: !0
- });
- }
- __name(overwriteProperty, "overwriteProperty");
- function overwriteMethod(ctx, name, method) {
- let _method = ctx[name], _super = __name(function() {
- throw new Error(name + " is not a function");
- }, "_super");
- _method && typeof _method == "function" && (_super = _method);
- let overwritingMethodWrapper = __name(function() {
- flag(this, "lockSsfi") || flag(this, "ssfi", overwritingMethodWrapper);
- let origLockSsfi = flag(this, "lockSsfi");
- flag(this, "lockSsfi", !0);
- let result = method(_super).apply(this, arguments);
- if (flag(this, "lockSsfi", origLockSsfi), result !== void 0)
- return result;
- let newAssertion = new Assertion();
- return transferFlags(this, newAssertion), newAssertion;
- }, "overwritingMethodWrapper");
- addLengthGuard(overwritingMethodWrapper, name, !1), ctx[name] = proxify(overwritingMethodWrapper, name);
- }
- __name(overwriteMethod, "overwriteMethod");
- var canSetPrototype = typeof Object.setPrototypeOf == "function", testFn = __name(function() {
- }, "testFn"), excludeNames = Object.getOwnPropertyNames(testFn).filter(function(name) {
- let propDesc = Object.getOwnPropertyDescriptor(testFn, name);
- return typeof propDesc != "object" ? !0 : !propDesc.configurable;
- }), call = Function.prototype.call, apply = Function.prototype.apply;
- function addChainableMethod(ctx, name, method, chainingBehavior) {
- typeof chainingBehavior != "function" && (chainingBehavior = __name(function() {
- }, "chainingBehavior"));
- let chainableBehavior = {
- method,
- chainingBehavior
- };
- ctx.__methods || (ctx.__methods = {}), ctx.__methods[name] = chainableBehavior, Object.defineProperty(ctx, name, {
- get: __name(function() {
- chainableBehavior.chainingBehavior.call(this);
- let chainableMethodWrapper = __name(function() {
- flag(this, "lockSsfi") || flag(this, "ssfi", chainableMethodWrapper);
- let result = chainableBehavior.method.apply(this, arguments);
- if (result !== void 0)
- return result;
- let newAssertion = new Assertion();
- return transferFlags(this, newAssertion), newAssertion;
- }, "chainableMethodWrapper");
- if (addLengthGuard(chainableMethodWrapper, name, !0), canSetPrototype) {
- let prototype = Object.create(this);
- prototype.call = call, prototype.apply = apply, Object.setPrototypeOf(chainableMethodWrapper, prototype);
- } else
- Object.getOwnPropertyNames(ctx).forEach(function(asserterName) {
- if (excludeNames.indexOf(asserterName) !== -1)
- return;
- let pd = Object.getOwnPropertyDescriptor(ctx, asserterName);
- Object.defineProperty(chainableMethodWrapper, asserterName, pd);
- });
- return transferFlags(this, chainableMethodWrapper), proxify(chainableMethodWrapper);
- }, "chainableMethodGetter"),
- configurable: !0
- });
- }
- __name(addChainableMethod, "addChainableMethod");
- function overwriteChainableMethod(ctx, name, method, chainingBehavior) {
- let chainableBehavior = ctx.__methods[name], _chainingBehavior = chainableBehavior.chainingBehavior;
- chainableBehavior.chainingBehavior = __name(function() {
- let result = chainingBehavior(_chainingBehavior).call(this);
- if (result !== void 0)
- return result;
- let newAssertion = new Assertion();
- return transferFlags(this, newAssertion), newAssertion;
- }, "overwritingChainableMethodGetter");
- let _method = chainableBehavior.method;
- chainableBehavior.method = __name(function() {
- let result = method(_method).apply(this, arguments);
- if (result !== void 0)
- return result;
- let newAssertion = new Assertion();
- return transferFlags(this, newAssertion), newAssertion;
- }, "overwritingChainableMethodWrapper");
- }
- __name(overwriteChainableMethod, "overwriteChainableMethod");
- function compareByInspect(a3, b) {
- return inspect22(a3) < inspect22(b) ? -1 : 1;
- }
- __name(compareByInspect, "compareByInspect");
- function getOwnEnumerablePropertySymbols(obj) {
- return typeof Object.getOwnPropertySymbols != "function" ? [] : Object.getOwnPropertySymbols(obj).filter(function(sym) {
- return Object.getOwnPropertyDescriptor(obj, sym).enumerable;
- });
- }
- __name(getOwnEnumerablePropertySymbols, "getOwnEnumerablePropertySymbols");
- function getOwnEnumerableProperties(obj) {
- return Object.keys(obj).concat(getOwnEnumerablePropertySymbols(obj));
- }
- __name(getOwnEnumerableProperties, "getOwnEnumerableProperties");
- var isNaN22 = Number.isNaN;
- function isObjectType(obj) {
- let objectType = type(obj);
- return ["Array", "Object", "Function"].indexOf(objectType) !== -1;
- }
- __name(isObjectType, "isObjectType");
- function getOperator(obj, args) {
- let operator = flag(obj, "operator"), negate = flag(obj, "negate"), expected = args[3], msg = negate ? args[2] : args[1];
- if (operator)
- return operator;
- if (typeof msg == "function" && (msg = msg()), msg = msg || "", !msg || /\shave\s/.test(msg))
- return;
- let isObject7 = isObjectType(expected);
- return /\snot\s/.test(msg) ? isObject7 ? "notDeepStrictEqual" : "notStrictEqual" : isObject7 ? "deepStrictEqual" : "strictEqual";
- }
- __name(getOperator, "getOperator");
- function getName(fn4) {
- return fn4.name;
- }
- __name(getName, "getName");
- function isRegExp22(obj) {
- return Object.prototype.toString.call(obj) === "[object RegExp]";
- }
- __name(isRegExp22, "isRegExp");
- function isNumeric(obj) {
- return ["Number", "BigInt"].includes(type(obj));
- }
- __name(isNumeric, "isNumeric");
- var { flag: flag2 } = utils_exports;
- [
- "to",
- "be",
- "been",
- "is",
- "and",
- "has",
- "have",
- "with",
- "that",
- "which",
- "at",
- "of",
- "same",
- "but",
- "does",
- "still",
- "also"
- ].forEach(function(chain) {
- Assertion.addProperty(chain);
- });
- Assertion.addProperty("not", function() {
- flag2(this, "negate", !0);
- });
- Assertion.addProperty("deep", function() {
- flag2(this, "deep", !0);
- });
- Assertion.addProperty("nested", function() {
- flag2(this, "nested", !0);
- });
- Assertion.addProperty("own", function() {
- flag2(this, "own", !0);
- });
- Assertion.addProperty("ordered", function() {
- flag2(this, "ordered", !0);
- });
- Assertion.addProperty("any", function() {
- flag2(this, "any", !0), flag2(this, "all", !1);
- });
- Assertion.addProperty("all", function() {
- flag2(this, "all", !0), flag2(this, "any", !1);
- });
- var functionTypes = {
- function: [
- "function",
- "asyncfunction",
- "generatorfunction",
- "asyncgeneratorfunction"
- ],
- asyncfunction: ["asyncfunction", "asyncgeneratorfunction"],
- generatorfunction: ["generatorfunction", "asyncgeneratorfunction"],
- asyncgeneratorfunction: ["asyncgeneratorfunction"]
- };
- function an(type32, msg) {
- msg && flag2(this, "message", msg), type32 = type32.toLowerCase();
- let obj = flag2(this, "object"), article = ~["a", "e", "i", "o", "u"].indexOf(type32.charAt(0)) ? "an " : "a ", detectedType = type(obj).toLowerCase();
- functionTypes.function.includes(type32) ? this.assert(
- functionTypes[type32].includes(detectedType),
- "expected #{this} to be " + article + type32,
- "expected #{this} not to be " + article + type32
- ) : this.assert(
- type32 === detectedType,
- "expected #{this} to be " + article + type32,
- "expected #{this} not to be " + article + type32
- );
- }
- __name(an, "an");
- Assertion.addChainableMethod("an", an);
- Assertion.addChainableMethod("a", an);
- function SameValueZero(a3, b) {
- return isNaN22(a3) && isNaN22(b) || a3 === b;
- }
- __name(SameValueZero, "SameValueZero");
- function includeChainingBehavior() {
- flag2(this, "contains", !0);
- }
- __name(includeChainingBehavior, "includeChainingBehavior");
- function include(val, msg) {
- msg && flag2(this, "message", msg);
- let obj = flag2(this, "object"), objType = type(obj).toLowerCase(), flagMsg = flag2(this, "message"), negate = flag2(this, "negate"), ssfi = flag2(this, "ssfi"), isDeep = flag2(this, "deep"), descriptor = isDeep ? "deep " : "", isEql = isDeep ? flag2(this, "eql") : SameValueZero;
- flagMsg = flagMsg ? flagMsg + ": " : "";
- let included = !1;
- switch (objType) {
- case "string":
- included = obj.indexOf(val) !== -1;
- break;
- case "weakset":
- if (isDeep)
- throw new AssertionError(
- flagMsg + "unable to use .deep.include with WeakSet",
- void 0,
- ssfi
- );
- included = obj.has(val);
- break;
- case "map":
- obj.forEach(function(item) {
- included = included || isEql(item, val);
- });
- break;
- case "set":
- isDeep ? obj.forEach(function(item) {
- included = included || isEql(item, val);
- }) : included = obj.has(val);
- break;
- case "array":
- isDeep ? included = obj.some(function(item) {
- return isEql(item, val);
- }) : included = obj.indexOf(val) !== -1;
- break;
- default: {
- if (val !== Object(val))
- throw new AssertionError(
- flagMsg + "the given combination of arguments (" + objType + " and " + type(val).toLowerCase() + ") is invalid for this assertion. You can use an array, a map, an object, a set, a string, or a weakset instead of a " + type(val).toLowerCase(),
- void 0,
- ssfi
- );
- let props = Object.keys(val), firstErr = null, numErrs = 0;
- if (props.forEach(function(prop) {
- let propAssertion = new Assertion(obj);
- if (transferFlags(this, propAssertion, !0), flag2(propAssertion, "lockSsfi", !0), !negate || props.length === 1) {
- propAssertion.property(prop, val[prop]);
- return;
- }
- try {
- propAssertion.property(prop, val[prop]);
- } catch (err) {
- if (!check_error_exports.compatibleConstructor(err, AssertionError))
- throw err;
- firstErr === null && (firstErr = err), numErrs++;
- }
- }, this), negate && props.length > 1 && numErrs === props.length)
- throw firstErr;
- return;
- }
- }
- this.assert(
- included,
- "expected #{this} to " + descriptor + "include " + inspect22(val),
- "expected #{this} to not " + descriptor + "include " + inspect22(val)
- );
- }
- __name(include, "include");
- Assertion.addChainableMethod("include", include, includeChainingBehavior);
- Assertion.addChainableMethod("contain", include, includeChainingBehavior);
- Assertion.addChainableMethod("contains", include, includeChainingBehavior);
- Assertion.addChainableMethod("includes", include, includeChainingBehavior);
- Assertion.addProperty("ok", function() {
- this.assert(
- flag2(this, "object"),
- "expected #{this} to be truthy",
- "expected #{this} to be falsy"
- );
- });
- Assertion.addProperty("true", function() {
- this.assert(
- flag2(this, "object") === !0,
- "expected #{this} to be true",
- "expected #{this} to be false",
- !flag2(this, "negate")
- );
- });
- Assertion.addProperty("numeric", function() {
- let object = flag2(this, "object");
- this.assert(
- ["Number", "BigInt"].includes(type(object)),
- "expected #{this} to be numeric",
- "expected #{this} to not be numeric",
- !flag2(this, "negate")
- );
- });
- Assertion.addProperty("callable", function() {
- let val = flag2(this, "object"), ssfi = flag2(this, "ssfi"), message = flag2(this, "message"), msg = message ? `${message}: ` : "", negate = flag2(this, "negate"), assertionMessage = negate ? `${msg}expected ${inspect22(val)} not to be a callable function` : `${msg}expected ${inspect22(val)} to be a callable function`, isCallable3 = [
- "Function",
- "AsyncFunction",
- "GeneratorFunction",
- "AsyncGeneratorFunction"
- ].includes(type(val));
- if (isCallable3 && negate || !isCallable3 && !negate)
- throw new AssertionError(assertionMessage, void 0, ssfi);
- });
- Assertion.addProperty("false", function() {
- this.assert(
- flag2(this, "object") === !1,
- "expected #{this} to be false",
- "expected #{this} to be true",
- !!flag2(this, "negate")
- );
- });
- Assertion.addProperty("null", function() {
- this.assert(
- flag2(this, "object") === null,
- "expected #{this} to be null",
- "expected #{this} not to be null"
- );
- });
- Assertion.addProperty("undefined", function() {
- this.assert(
- flag2(this, "object") === void 0,
- "expected #{this} to be undefined",
- "expected #{this} not to be undefined"
- );
- });
- Assertion.addProperty("NaN", function() {
- this.assert(
- isNaN22(flag2(this, "object")),
- "expected #{this} to be NaN",
- "expected #{this} not to be NaN"
- );
- });
- function assertExist() {
- let val = flag2(this, "object");
- this.assert(
- val != null,
- "expected #{this} to exist",
- "expected #{this} to not exist"
- );
- }
- __name(assertExist, "assertExist");
- Assertion.addProperty("exist", assertExist);
- Assertion.addProperty("exists", assertExist);
- Assertion.addProperty("empty", function() {
- let val = flag2(this, "object"), ssfi = flag2(this, "ssfi"), flagMsg = flag2(this, "message"), itemsCount;
- switch (flagMsg = flagMsg ? flagMsg + ": " : "", type(val).toLowerCase()) {
- case "array":
- case "string":
- itemsCount = val.length;
- break;
- case "map":
- case "set":
- itemsCount = val.size;
- break;
- case "weakmap":
- case "weakset":
- throw new AssertionError(
- flagMsg + ".empty was passed a weak collection",
- void 0,
- ssfi
- );
- case "function": {
- let msg = flagMsg + ".empty was passed a function " + getName(val);
- throw new AssertionError(msg.trim(), void 0, ssfi);
- }
- default:
- if (val !== Object(val))
- throw new AssertionError(
- flagMsg + ".empty was passed non-string primitive " + inspect22(val),
- void 0,
- ssfi
- );
- itemsCount = Object.keys(val).length;
- }
- this.assert(
- itemsCount === 0,
- "expected #{this} to be empty",
- "expected #{this} not to be empty"
- );
- });
- function checkArguments() {
- let obj = flag2(this, "object"), type32 = type(obj);
- this.assert(
- type32 === "Arguments",
- "expected #{this} to be arguments but got " + type32,
- "expected #{this} to not be arguments"
- );
- }
- __name(checkArguments, "checkArguments");
- Assertion.addProperty("arguments", checkArguments);
- Assertion.addProperty("Arguments", checkArguments);
- function assertEqual(val, msg) {
- msg && flag2(this, "message", msg);
- let obj = flag2(this, "object");
- if (flag2(this, "deep")) {
- let prevLockSsfi = flag2(this, "lockSsfi");
- flag2(this, "lockSsfi", !0), this.eql(val), flag2(this, "lockSsfi", prevLockSsfi);
- } else
- this.assert(
- val === obj,
- "expected #{this} to equal #{exp}",
- "expected #{this} to not equal #{exp}",
- val,
- this._obj,
- !0
- );
- }
- __name(assertEqual, "assertEqual");
- Assertion.addMethod("equal", assertEqual);
- Assertion.addMethod("equals", assertEqual);
- Assertion.addMethod("eq", assertEqual);
- function assertEql(obj, msg) {
- msg && flag2(this, "message", msg);
- let eql = flag2(this, "eql");
- this.assert(
- eql(obj, flag2(this, "object")),
- "expected #{this} to deeply equal #{exp}",
- "expected #{this} to not deeply equal #{exp}",
- obj,
- this._obj,
- !0
- );
- }
- __name(assertEql, "assertEql");
- Assertion.addMethod("eql", assertEql);
- Assertion.addMethod("eqls", assertEql);
- function assertAbove(n, msg) {
- msg && flag2(this, "message", msg);
- let obj = flag2(this, "object"), doLength = flag2(this, "doLength"), flagMsg = flag2(this, "message"), msgPrefix = flagMsg ? flagMsg + ": " : "", ssfi = flag2(this, "ssfi"), objType = type(obj).toLowerCase(), nType = type(n).toLowerCase();
- if (doLength && objType !== "map" && objType !== "set" && new Assertion(obj, flagMsg, ssfi, !0).to.have.property("length"), !doLength && objType === "date" && nType !== "date")
- throw new AssertionError(
- msgPrefix + "the argument to above must be a date",
- void 0,
- ssfi
- );
- if (!isNumeric(n) && (doLength || isNumeric(obj)))
- throw new AssertionError(
- msgPrefix + "the argument to above must be a number",
- void 0,
- ssfi
- );
- if (!doLength && objType !== "date" && !isNumeric(obj)) {
- let printObj = objType === "string" ? "'" + obj + "'" : obj;
- throw new AssertionError(
- msgPrefix + "expected " + printObj + " to be a number or a date",
- void 0,
- ssfi
- );
- }
- if (doLength) {
- let descriptor = "length", itemsCount;
- objType === "map" || objType === "set" ? (descriptor = "size", itemsCount = obj.size) : itemsCount = obj.length, this.assert(
- itemsCount > n,
- "expected #{this} to have a " + descriptor + " above #{exp} but got #{act}",
- "expected #{this} to not have a " + descriptor + " above #{exp}",
- n,
- itemsCount
- );
- } else
- this.assert(
- obj > n,
- "expected #{this} to be above #{exp}",
- "expected #{this} to be at most #{exp}",
- n
- );
- }
- __name(assertAbove, "assertAbove");
- Assertion.addMethod("above", assertAbove);
- Assertion.addMethod("gt", assertAbove);
- Assertion.addMethod("greaterThan", assertAbove);
- function assertLeast(n, msg) {
- msg && flag2(this, "message", msg);
- let obj = flag2(this, "object"), doLength = flag2(this, "doLength"), flagMsg = flag2(this, "message"), msgPrefix = flagMsg ? flagMsg + ": " : "", ssfi = flag2(this, "ssfi"), objType = type(obj).toLowerCase(), nType = type(n).toLowerCase(), errorMessage, shouldThrow = !0;
- if (doLength && objType !== "map" && objType !== "set" && new Assertion(obj, flagMsg, ssfi, !0).to.have.property("length"), !doLength && objType === "date" && nType !== "date")
- errorMessage = msgPrefix + "the argument to least must be a date";
- else if (!isNumeric(n) && (doLength || isNumeric(obj)))
- errorMessage = msgPrefix + "the argument to least must be a number";
- else if (!doLength && objType !== "date" && !isNumeric(obj)) {
- let printObj = objType === "string" ? "'" + obj + "'" : obj;
- errorMessage = msgPrefix + "expected " + printObj + " to be a number or a date";
- } else
- shouldThrow = !1;
- if (shouldThrow)
- throw new AssertionError(errorMessage, void 0, ssfi);
- if (doLength) {
- let descriptor = "length", itemsCount;
- objType === "map" || objType === "set" ? (descriptor = "size", itemsCount = obj.size) : itemsCount = obj.length, this.assert(
- itemsCount >= n,
- "expected #{this} to have a " + descriptor + " at least #{exp} but got #{act}",
- "expected #{this} to have a " + descriptor + " below #{exp}",
- n,
- itemsCount
- );
- } else
- this.assert(
- obj >= n,
- "expected #{this} to be at least #{exp}",
- "expected #{this} to be below #{exp}",
- n
- );
- }
- __name(assertLeast, "assertLeast");
- Assertion.addMethod("least", assertLeast);
- Assertion.addMethod("gte", assertLeast);
- Assertion.addMethod("greaterThanOrEqual", assertLeast);
- function assertBelow(n, msg) {
- msg && flag2(this, "message", msg);
- let obj = flag2(this, "object"), doLength = flag2(this, "doLength"), flagMsg = flag2(this, "message"), msgPrefix = flagMsg ? flagMsg + ": " : "", ssfi = flag2(this, "ssfi"), objType = type(obj).toLowerCase(), nType = type(n).toLowerCase(), errorMessage, shouldThrow = !0;
- if (doLength && objType !== "map" && objType !== "set" && new Assertion(obj, flagMsg, ssfi, !0).to.have.property("length"), !doLength && objType === "date" && nType !== "date")
- errorMessage = msgPrefix + "the argument to below must be a date";
- else if (!isNumeric(n) && (doLength || isNumeric(obj)))
- errorMessage = msgPrefix + "the argument to below must be a number";
- else if (!doLength && objType !== "date" && !isNumeric(obj)) {
- let printObj = objType === "string" ? "'" + obj + "'" : obj;
- errorMessage = msgPrefix + "expected " + printObj + " to be a number or a date";
- } else
- shouldThrow = !1;
- if (shouldThrow)
- throw new AssertionError(errorMessage, void 0, ssfi);
- if (doLength) {
- let descriptor = "length", itemsCount;
- objType === "map" || objType === "set" ? (descriptor = "size", itemsCount = obj.size) : itemsCount = obj.length, this.assert(
- itemsCount < n,
- "expected #{this} to have a " + descriptor + " below #{exp} but got #{act}",
- "expected #{this} to not have a " + descriptor + " below #{exp}",
- n,
- itemsCount
- );
- } else
- this.assert(
- obj < n,
- "expected #{this} to be below #{exp}",
- "expected #{this} to be at least #{exp}",
- n
- );
- }
- __name(assertBelow, "assertBelow");
- Assertion.addMethod("below", assertBelow);
- Assertion.addMethod("lt", assertBelow);
- Assertion.addMethod("lessThan", assertBelow);
- function assertMost(n, msg) {
- msg && flag2(this, "message", msg);
- let obj = flag2(this, "object"), doLength = flag2(this, "doLength"), flagMsg = flag2(this, "message"), msgPrefix = flagMsg ? flagMsg + ": " : "", ssfi = flag2(this, "ssfi"), objType = type(obj).toLowerCase(), nType = type(n).toLowerCase(), errorMessage, shouldThrow = !0;
- if (doLength && objType !== "map" && objType !== "set" && new Assertion(obj, flagMsg, ssfi, !0).to.have.property("length"), !doLength && objType === "date" && nType !== "date")
- errorMessage = msgPrefix + "the argument to most must be a date";
- else if (!isNumeric(n) && (doLength || isNumeric(obj)))
- errorMessage = msgPrefix + "the argument to most must be a number";
- else if (!doLength && objType !== "date" && !isNumeric(obj)) {
- let printObj = objType === "string" ? "'" + obj + "'" : obj;
- errorMessage = msgPrefix + "expected " + printObj + " to be a number or a date";
- } else
- shouldThrow = !1;
- if (shouldThrow)
- throw new AssertionError(errorMessage, void 0, ssfi);
- if (doLength) {
- let descriptor = "length", itemsCount;
- objType === "map" || objType === "set" ? (descriptor = "size", itemsCount = obj.size) : itemsCount = obj.length, this.assert(
- itemsCount <= n,
- "expected #{this} to have a " + descriptor + " at most #{exp} but got #{act}",
- "expected #{this} to have a " + descriptor + " above #{exp}",
- n,
- itemsCount
- );
- } else
- this.assert(
- obj <= n,
- "expected #{this} to be at most #{exp}",
- "expected #{this} to be above #{exp}",
- n
- );
- }
- __name(assertMost, "assertMost");
- Assertion.addMethod("most", assertMost);
- Assertion.addMethod("lte", assertMost);
- Assertion.addMethod("lessThanOrEqual", assertMost);
- Assertion.addMethod("within", function(start2, finish, msg) {
- msg && flag2(this, "message", msg);
- let obj = flag2(this, "object"), doLength = flag2(this, "doLength"), flagMsg = flag2(this, "message"), msgPrefix = flagMsg ? flagMsg + ": " : "", ssfi = flag2(this, "ssfi"), objType = type(obj).toLowerCase(), startType = type(start2).toLowerCase(), finishType = type(finish).toLowerCase(), errorMessage, shouldThrow = !0, range = startType === "date" && finishType === "date" ? start2.toISOString() + ".." + finish.toISOString() : start2 + ".." + finish;
- if (doLength && objType !== "map" && objType !== "set" && new Assertion(obj, flagMsg, ssfi, !0).to.have.property("length"), !doLength && objType === "date" && (startType !== "date" || finishType !== "date"))
- errorMessage = msgPrefix + "the arguments to within must be dates";
- else if ((!isNumeric(start2) || !isNumeric(finish)) && (doLength || isNumeric(obj)))
- errorMessage = msgPrefix + "the arguments to within must be numbers";
- else if (!doLength && objType !== "date" && !isNumeric(obj)) {
- let printObj = objType === "string" ? "'" + obj + "'" : obj;
- errorMessage = msgPrefix + "expected " + printObj + " to be a number or a date";
- } else
- shouldThrow = !1;
- if (shouldThrow)
- throw new AssertionError(errorMessage, void 0, ssfi);
- if (doLength) {
- let descriptor = "length", itemsCount;
- objType === "map" || objType === "set" ? (descriptor = "size", itemsCount = obj.size) : itemsCount = obj.length, this.assert(
- itemsCount >= start2 && itemsCount <= finish,
- "expected #{this} to have a " + descriptor + " within " + range,
- "expected #{this} to not have a " + descriptor + " within " + range
- );
- } else
- this.assert(
- obj >= start2 && obj <= finish,
- "expected #{this} to be within " + range,
- "expected #{this} to not be within " + range
- );
- });
- function assertInstanceOf(constructor, msg) {
- msg && flag2(this, "message", msg);
- let target = flag2(this, "object"), ssfi = flag2(this, "ssfi"), flagMsg = flag2(this, "message"), isInstanceOf;
- try {
- isInstanceOf = target instanceof constructor;
- } catch (err) {
- throw err instanceof TypeError ? (flagMsg = flagMsg ? flagMsg + ": " : "", new AssertionError(
- flagMsg + "The instanceof assertion needs a constructor but " + type(constructor) + " was given.",
- void 0,
- ssfi
- )) : err;
- }
- let name = getName(constructor);
- name == null && (name = "an unnamed constructor"), this.assert(
- isInstanceOf,
- "expected #{this} to be an instance of " + name,
- "expected #{this} to not be an instance of " + name
- );
- }
- __name(assertInstanceOf, "assertInstanceOf");
- Assertion.addMethod("instanceof", assertInstanceOf);
- Assertion.addMethod("instanceOf", assertInstanceOf);
- function assertProperty(name, val, msg) {
- msg && flag2(this, "message", msg);
- let isNested = flag2(this, "nested"), isOwn = flag2(this, "own"), flagMsg = flag2(this, "message"), obj = flag2(this, "object"), ssfi = flag2(this, "ssfi"), nameType = typeof name;
- if (flagMsg = flagMsg ? flagMsg + ": " : "", isNested) {
- if (nameType !== "string")
- throw new AssertionError(
- flagMsg + "the argument to property must be a string when using nested syntax",
- void 0,
- ssfi
- );
- } else if (nameType !== "string" && nameType !== "number" && nameType !== "symbol")
- throw new AssertionError(
- flagMsg + "the argument to property must be a string, number, or symbol",
- void 0,
- ssfi
- );
- if (isNested && isOwn)
- throw new AssertionError(
- flagMsg + 'The "nested" and "own" flags cannot be combined.',
- void 0,
- ssfi
- );
- if (obj == null)
- throw new AssertionError(
- flagMsg + "Target cannot be null or undefined.",
- void 0,
- ssfi
- );
- let isDeep = flag2(this, "deep"), negate = flag2(this, "negate"), pathInfo = isNested ? getPathInfo(obj, name) : null, value = isNested ? pathInfo.value : obj[name], isEql = isDeep ? flag2(this, "eql") : (val1, val2) => val1 === val2, descriptor = "";
- isDeep && (descriptor += "deep "), isOwn && (descriptor += "own "), isNested && (descriptor += "nested "), descriptor += "property ";
- let hasProperty2;
- isOwn ? hasProperty2 = Object.prototype.hasOwnProperty.call(obj, name) : isNested ? hasProperty2 = pathInfo.exists : hasProperty2 = hasProperty(obj, name), (!negate || arguments.length === 1) && this.assert(
- hasProperty2,
- "expected #{this} to have " + descriptor + inspect22(name),
- "expected #{this} to not have " + descriptor + inspect22(name)
- ), arguments.length > 1 && this.assert(
- hasProperty2 && isEql(val, value),
- "expected #{this} to have " + descriptor + inspect22(name) + " of #{exp}, but got #{act}",
- "expected #{this} to not have " + descriptor + inspect22(name) + " of #{act}",
- val,
- value
- ), flag2(this, "object", value);
- }
- __name(assertProperty, "assertProperty");
- Assertion.addMethod("property", assertProperty);
- function assertOwnProperty(_name, _value, _msg) {
- flag2(this, "own", !0), assertProperty.apply(this, arguments);
- }
- __name(assertOwnProperty, "assertOwnProperty");
- Assertion.addMethod("ownProperty", assertOwnProperty);
- Assertion.addMethod("haveOwnProperty", assertOwnProperty);
- function assertOwnPropertyDescriptor(name, descriptor, msg) {
- typeof descriptor == "string" && (msg = descriptor, descriptor = null), msg && flag2(this, "message", msg);
- let obj = flag2(this, "object"), actualDescriptor = Object.getOwnPropertyDescriptor(Object(obj), name), eql = flag2(this, "eql");
- actualDescriptor && descriptor ? this.assert(
- eql(descriptor, actualDescriptor),
- "expected the own property descriptor for " + inspect22(name) + " on #{this} to match " + inspect22(descriptor) + ", got " + inspect22(actualDescriptor),
- "expected the own property descriptor for " + inspect22(name) + " on #{this} to not match " + inspect22(descriptor),
- descriptor,
- actualDescriptor,
- !0
- ) : this.assert(
- actualDescriptor,
- "expected #{this} to have an own property descriptor for " + inspect22(name),
- "expected #{this} to not have an own property descriptor for " + inspect22(name)
- ), flag2(this, "object", actualDescriptor);
- }
- __name(assertOwnPropertyDescriptor, "assertOwnPropertyDescriptor");
- Assertion.addMethod("ownPropertyDescriptor", assertOwnPropertyDescriptor);
- Assertion.addMethod("haveOwnPropertyDescriptor", assertOwnPropertyDescriptor);
- function assertLengthChain() {
- flag2(this, "doLength", !0);
- }
- __name(assertLengthChain, "assertLengthChain");
- function assertLength(n, msg) {
- msg && flag2(this, "message", msg);
- let obj = flag2(this, "object"), objType = type(obj).toLowerCase(), flagMsg = flag2(this, "message"), ssfi = flag2(this, "ssfi"), descriptor = "length", itemsCount;
- switch (objType) {
- case "map":
- case "set":
- descriptor = "size", itemsCount = obj.size;
- break;
- default:
- new Assertion(obj, flagMsg, ssfi, !0).to.have.property("length"), itemsCount = obj.length;
- }
- this.assert(
- itemsCount == n,
- "expected #{this} to have a " + descriptor + " of #{exp} but got #{act}",
- "expected #{this} to not have a " + descriptor + " of #{act}",
- n,
- itemsCount
- );
- }
- __name(assertLength, "assertLength");
- Assertion.addChainableMethod("length", assertLength, assertLengthChain);
- Assertion.addChainableMethod("lengthOf", assertLength, assertLengthChain);
- function assertMatch(re, msg) {
- msg && flag2(this, "message", msg);
- let obj = flag2(this, "object");
- this.assert(
- re.exec(obj),
- "expected #{this} to match " + re,
- "expected #{this} not to match " + re
- );
- }
- __name(assertMatch, "assertMatch");
- Assertion.addMethod("match", assertMatch);
- Assertion.addMethod("matches", assertMatch);
- Assertion.addMethod("string", function(str2, msg) {
- msg && flag2(this, "message", msg);
- let obj = flag2(this, "object"), flagMsg = flag2(this, "message"), ssfi = flag2(this, "ssfi");
- new Assertion(obj, flagMsg, ssfi, !0).is.a("string"), this.assert(
- ~obj.indexOf(str2),
- "expected #{this} to contain " + inspect22(str2),
- "expected #{this} to not contain " + inspect22(str2)
- );
- });
- function assertKeys(keys3) {
- let obj = flag2(this, "object"), objType = type(obj), keysType = type(keys3), ssfi = flag2(this, "ssfi"), isDeep = flag2(this, "deep"), str2, deepStr = "", actual, ok = !0, flagMsg = flag2(this, "message");
- flagMsg = flagMsg ? flagMsg + ": " : "";
- let mixedArgsMsg = flagMsg + "when testing keys against an object or an array you must give a single Array|Object|String argument or multiple String arguments";
- if (objType === "Map" || objType === "Set")
- deepStr = isDeep ? "deeply " : "", actual = [], obj.forEach(function(val, key) {
- actual.push(key);
- }), keysType !== "Array" && (keys3 = Array.prototype.slice.call(arguments));
- else {
- switch (actual = getOwnEnumerableProperties(obj), keysType) {
- case "Array":
- if (arguments.length > 1)
- throw new AssertionError(mixedArgsMsg, void 0, ssfi);
- break;
- case "Object":
- if (arguments.length > 1)
- throw new AssertionError(mixedArgsMsg, void 0, ssfi);
- keys3 = Object.keys(keys3);
- break;
- default:
- keys3 = Array.prototype.slice.call(arguments);
- }
- keys3 = keys3.map(function(val) {
- return typeof val == "symbol" ? val : String(val);
- });
- }
- if (!keys3.length)
- throw new AssertionError(flagMsg + "keys required", void 0, ssfi);
- let len = keys3.length, any = flag2(this, "any"), all = flag2(this, "all"), expected = keys3, isEql = isDeep ? flag2(this, "eql") : (val1, val2) => val1 === val2;
- if (!any && !all && (all = !0), any && (ok = expected.some(function(expectedKey) {
- return actual.some(function(actualKey) {
- return isEql(expectedKey, actualKey);
- });
- })), all && (ok = expected.every(function(expectedKey) {
- return actual.some(function(actualKey) {
- return isEql(expectedKey, actualKey);
- });
- }), flag2(this, "contains") || (ok = ok && keys3.length == actual.length)), len > 1) {
- keys3 = keys3.map(function(key) {
- return inspect22(key);
- });
- let last2 = keys3.pop();
- all && (str2 = keys3.join(", ") + ", and " + last2), any && (str2 = keys3.join(", ") + ", or " + last2);
- } else
- str2 = inspect22(keys3[0]);
- str2 = (len > 1 ? "keys " : "key ") + str2, str2 = (flag2(this, "contains") ? "contain " : "have ") + str2, this.assert(
- ok,
- "expected #{this} to " + deepStr + str2,
- "expected #{this} to not " + deepStr + str2,
- expected.slice(0).sort(compareByInspect),
- actual.sort(compareByInspect),
- !0
- );
- }
- __name(assertKeys, "assertKeys");
- Assertion.addMethod("keys", assertKeys);
- Assertion.addMethod("key", assertKeys);
- function assertThrows(errorLike, errMsgMatcher, msg) {
- msg && flag2(this, "message", msg);
- let obj = flag2(this, "object"), ssfi = flag2(this, "ssfi"), flagMsg = flag2(this, "message"), negate = flag2(this, "negate") || !1;
- new Assertion(obj, flagMsg, ssfi, !0).is.a("function"), (isRegExp22(errorLike) || typeof errorLike == "string") && (errMsgMatcher = errorLike, errorLike = null);
- let caughtErr, errorWasThrown = !1;
- try {
- obj();
- } catch (err) {
- errorWasThrown = !0, caughtErr = err;
- }
- let everyArgIsUndefined = errorLike === void 0 && errMsgMatcher === void 0, everyArgIsDefined = !!(errorLike && errMsgMatcher), errorLikeFail = !1, errMsgMatcherFail = !1;
- if (everyArgIsUndefined || !everyArgIsUndefined && !negate) {
- let errorLikeString = "an error";
- errorLike instanceof Error ? errorLikeString = "#{exp}" : errorLike && (errorLikeString = check_error_exports.getConstructorName(errorLike));
- let actual = caughtErr;
- if (caughtErr instanceof Error)
- actual = caughtErr.toString();
- else if (typeof caughtErr == "string")
- actual = caughtErr;
- else if (caughtErr && (typeof caughtErr == "object" || typeof caughtErr == "function"))
- try {
- actual = check_error_exports.getConstructorName(caughtErr);
- } catch {
- }
- this.assert(
- errorWasThrown,
- "expected #{this} to throw " + errorLikeString,
- "expected #{this} to not throw an error but #{act} was thrown",
- errorLike && errorLike.toString(),
- actual
- );
- }
- if (errorLike && caughtErr && (errorLike instanceof Error && check_error_exports.compatibleInstance(
- caughtErr,
- errorLike
- ) === negate && (everyArgIsDefined && negate ? errorLikeFail = !0 : this.assert(
- negate,
- "expected #{this} to throw #{exp} but #{act} was thrown",
- "expected #{this} to not throw #{exp}" + (caughtErr && !negate ? " but #{act} was thrown" : ""),
- errorLike.toString(),
- caughtErr.toString()
- )), check_error_exports.compatibleConstructor(
- caughtErr,
- errorLike
- ) === negate && (everyArgIsDefined && negate ? errorLikeFail = !0 : this.assert(
- negate,
- "expected #{this} to throw #{exp} but #{act} was thrown",
- "expected #{this} to not throw #{exp}" + (caughtErr ? " but #{act} was thrown" : ""),
- errorLike instanceof Error ? errorLike.toString() : errorLike && check_error_exports.getConstructorName(errorLike),
- caughtErr instanceof Error ? caughtErr.toString() : caughtErr && check_error_exports.getConstructorName(caughtErr)
- ))), caughtErr && errMsgMatcher !== void 0 && errMsgMatcher !== null) {
- let placeholder = "including";
- isRegExp22(errMsgMatcher) && (placeholder = "matching"), check_error_exports.compatibleMessage(
- caughtErr,
- errMsgMatcher
- ) === negate && (everyArgIsDefined && negate ? errMsgMatcherFail = !0 : this.assert(
- negate,
- "expected #{this} to throw error " + placeholder + " #{exp} but got #{act}",
- "expected #{this} to throw error not " + placeholder + " #{exp}",
- errMsgMatcher,
- check_error_exports.getMessage(caughtErr)
- ));
- }
- errorLikeFail && errMsgMatcherFail && this.assert(
- negate,
- "expected #{this} to throw #{exp} but #{act} was thrown",
- "expected #{this} to not throw #{exp}" + (caughtErr ? " but #{act} was thrown" : ""),
- errorLike instanceof Error ? errorLike.toString() : errorLike && check_error_exports.getConstructorName(errorLike),
- caughtErr instanceof Error ? caughtErr.toString() : caughtErr && check_error_exports.getConstructorName(caughtErr)
- ), flag2(this, "object", caughtErr);
- }
- __name(assertThrows, "assertThrows");
- Assertion.addMethod("throw", assertThrows);
- Assertion.addMethod("throws", assertThrows);
- Assertion.addMethod("Throw", assertThrows);
- function respondTo(method, msg) {
- msg && flag2(this, "message", msg);
- let obj = flag2(this, "object"), itself = flag2(this, "itself"), context = typeof obj == "function" && !itself ? obj.prototype[method] : obj[method];
- this.assert(
- typeof context == "function",
- "expected #{this} to respond to " + inspect22(method),
- "expected #{this} to not respond to " + inspect22(method)
- );
- }
- __name(respondTo, "respondTo");
- Assertion.addMethod("respondTo", respondTo);
- Assertion.addMethod("respondsTo", respondTo);
- Assertion.addProperty("itself", function() {
- flag2(this, "itself", !0);
- });
- function satisfy(matcher, msg) {
- msg && flag2(this, "message", msg);
- let obj = flag2(this, "object"), result = matcher(obj);
- this.assert(
- result,
- "expected #{this} to satisfy " + objDisplay(matcher),
- "expected #{this} to not satisfy" + objDisplay(matcher),
- !flag2(this, "negate"),
- result
- );
- }
- __name(satisfy, "satisfy");
- Assertion.addMethod("satisfy", satisfy);
- Assertion.addMethod("satisfies", satisfy);
- function closeTo(expected, delta, msg) {
- msg && flag2(this, "message", msg);
- let obj = flag2(this, "object"), flagMsg = flag2(this, "message"), ssfi = flag2(this, "ssfi");
- new Assertion(obj, flagMsg, ssfi, !0).is.numeric;
- let message = "A `delta` value is required for `closeTo`";
- if (delta == null)
- throw new AssertionError(
- flagMsg ? `${flagMsg}: ${message}` : message,
- void 0,
- ssfi
- );
- if (new Assertion(delta, flagMsg, ssfi, !0).is.numeric, message = "A `expected` value is required for `closeTo`", expected == null)
- throw new AssertionError(
- flagMsg ? `${flagMsg}: ${message}` : message,
- void 0,
- ssfi
- );
- new Assertion(expected, flagMsg, ssfi, !0).is.numeric;
- let abs2 = __name((x) => x < 0n ? -x : x, "abs"), strip = __name((number) => parseFloat(parseFloat(number).toPrecision(12)), "strip");
- this.assert(
- strip(abs2(obj - expected)) <= delta,
- "expected #{this} to be close to " + expected + " +/- " + delta,
- "expected #{this} not to be close to " + expected + " +/- " + delta
- );
- }
- __name(closeTo, "closeTo");
- Assertion.addMethod("closeTo", closeTo);
- Assertion.addMethod("approximately", closeTo);
- function isSubsetOf(_subset, _superset, cmp, contains2, ordered) {
- let superset = Array.from(_superset), subset = Array.from(_subset);
- if (!contains2) {
- if (subset.length !== superset.length) return !1;
- superset = superset.slice();
- }
- return subset.every(function(elem, idx) {
- if (ordered) return cmp ? cmp(elem, superset[idx]) : elem === superset[idx];
- if (!cmp) {
- let matchIdx = superset.indexOf(elem);
- return matchIdx === -1 ? !1 : (contains2 || superset.splice(matchIdx, 1), !0);
- }
- return superset.some(function(elem2, matchIdx) {
- return cmp(elem, elem2) ? (contains2 || superset.splice(matchIdx, 1), !0) : !1;
- });
- });
- }
- __name(isSubsetOf, "isSubsetOf");
- Assertion.addMethod("members", function(subset, msg) {
- msg && flag2(this, "message", msg);
- let obj = flag2(this, "object"), flagMsg = flag2(this, "message"), ssfi = flag2(this, "ssfi");
- new Assertion(obj, flagMsg, ssfi, !0).to.be.iterable, new Assertion(subset, flagMsg, ssfi, !0).to.be.iterable;
- let contains2 = flag2(this, "contains"), ordered = flag2(this, "ordered"), subject, failMsg, failNegateMsg;
- contains2 ? (subject = ordered ? "an ordered superset" : "a superset", failMsg = "expected #{this} to be " + subject + " of #{exp}", failNegateMsg = "expected #{this} to not be " + subject + " of #{exp}") : (subject = ordered ? "ordered members" : "members", failMsg = "expected #{this} to have the same " + subject + " as #{exp}", failNegateMsg = "expected #{this} to not have the same " + subject + " as #{exp}");
- let cmp = flag2(this, "deep") ? flag2(this, "eql") : void 0;
- this.assert(
- isSubsetOf(subset, obj, cmp, contains2, ordered),
- failMsg,
- failNegateMsg,
- subset,
- obj,
- !0
- );
- });
- Assertion.addProperty("iterable", function(msg) {
- msg && flag2(this, "message", msg);
- let obj = flag2(this, "object");
- this.assert(
- obj != null && obj[Symbol.iterator],
- "expected #{this} to be an iterable",
- "expected #{this} to not be an iterable",
- obj
- );
- });
- function oneOf(list, msg) {
- msg && flag2(this, "message", msg);
- let expected = flag2(this, "object"), flagMsg = flag2(this, "message"), ssfi = flag2(this, "ssfi"), contains2 = flag2(this, "contains"), isDeep = flag2(this, "deep"), eql = flag2(this, "eql");
- new Assertion(list, flagMsg, ssfi, !0).to.be.an("array"), contains2 ? this.assert(
- list.some(function(possibility) {
- return expected.indexOf(possibility) > -1;
- }),
- "expected #{this} to contain one of #{exp}",
- "expected #{this} to not contain one of #{exp}",
- list,
- expected
- ) : isDeep ? this.assert(
- list.some(function(possibility) {
- return eql(expected, possibility);
- }),
- "expected #{this} to deeply equal one of #{exp}",
- "expected #{this} to deeply equal one of #{exp}",
- list,
- expected
- ) : this.assert(
- list.indexOf(expected) > -1,
- "expected #{this} to be one of #{exp}",
- "expected #{this} to not be one of #{exp}",
- list,
- expected
- );
- }
- __name(oneOf, "oneOf");
- Assertion.addMethod("oneOf", oneOf);
- function assertChanges(subject, prop, msg) {
- msg && flag2(this, "message", msg);
- let fn4 = flag2(this, "object"), flagMsg = flag2(this, "message"), ssfi = flag2(this, "ssfi");
- new Assertion(fn4, flagMsg, ssfi, !0).is.a("function");
- let initial2;
- prop ? (new Assertion(subject, flagMsg, ssfi, !0).to.have.property(prop), initial2 = subject[prop]) : (new Assertion(subject, flagMsg, ssfi, !0).is.a("function"), initial2 = subject()), fn4();
- let final = prop == null ? subject() : subject[prop], msgObj = prop == null ? initial2 : "." + prop;
- flag2(this, "deltaMsgObj", msgObj), flag2(this, "initialDeltaValue", initial2), flag2(this, "finalDeltaValue", final), flag2(this, "deltaBehavior", "change"), flag2(this, "realDelta", final !== initial2), this.assert(
- initial2 !== final,
- "expected " + msgObj + " to change",
- "expected " + msgObj + " to not change"
- );
- }
- __name(assertChanges, "assertChanges");
- Assertion.addMethod("change", assertChanges);
- Assertion.addMethod("changes", assertChanges);
- function assertIncreases(subject, prop, msg) {
- msg && flag2(this, "message", msg);
- let fn4 = flag2(this, "object"), flagMsg = flag2(this, "message"), ssfi = flag2(this, "ssfi");
- new Assertion(fn4, flagMsg, ssfi, !0).is.a("function");
- let initial2;
- prop ? (new Assertion(subject, flagMsg, ssfi, !0).to.have.property(prop), initial2 = subject[prop]) : (new Assertion(subject, flagMsg, ssfi, !0).is.a("function"), initial2 = subject()), new Assertion(initial2, flagMsg, ssfi, !0).is.a("number"), fn4();
- let final = prop == null ? subject() : subject[prop], msgObj = prop == null ? initial2 : "." + prop;
- flag2(this, "deltaMsgObj", msgObj), flag2(this, "initialDeltaValue", initial2), flag2(this, "finalDeltaValue", final), flag2(this, "deltaBehavior", "increase"), flag2(this, "realDelta", final - initial2), this.assert(
- final - initial2 > 0,
- "expected " + msgObj + " to increase",
- "expected " + msgObj + " to not increase"
- );
- }
- __name(assertIncreases, "assertIncreases");
- Assertion.addMethod("increase", assertIncreases);
- Assertion.addMethod("increases", assertIncreases);
- function assertDecreases(subject, prop, msg) {
- msg && flag2(this, "message", msg);
- let fn4 = flag2(this, "object"), flagMsg = flag2(this, "message"), ssfi = flag2(this, "ssfi");
- new Assertion(fn4, flagMsg, ssfi, !0).is.a("function");
- let initial2;
- prop ? (new Assertion(subject, flagMsg, ssfi, !0).to.have.property(prop), initial2 = subject[prop]) : (new Assertion(subject, flagMsg, ssfi, !0).is.a("function"), initial2 = subject()), new Assertion(initial2, flagMsg, ssfi, !0).is.a("number"), fn4();
- let final = prop == null ? subject() : subject[prop], msgObj = prop == null ? initial2 : "." + prop;
- flag2(this, "deltaMsgObj", msgObj), flag2(this, "initialDeltaValue", initial2), flag2(this, "finalDeltaValue", final), flag2(this, "deltaBehavior", "decrease"), flag2(this, "realDelta", initial2 - final), this.assert(
- final - initial2 < 0,
- "expected " + msgObj + " to decrease",
- "expected " + msgObj + " to not decrease"
- );
- }
- __name(assertDecreases, "assertDecreases");
- Assertion.addMethod("decrease", assertDecreases);
- Assertion.addMethod("decreases", assertDecreases);
- function assertDelta(delta, msg) {
- msg && flag2(this, "message", msg);
- let msgObj = flag2(this, "deltaMsgObj"), initial2 = flag2(this, "initialDeltaValue"), final = flag2(this, "finalDeltaValue"), behavior2 = flag2(this, "deltaBehavior"), realDelta = flag2(this, "realDelta"), expression;
- behavior2 === "change" ? expression = Math.abs(final - initial2) === Math.abs(delta) : expression = realDelta === Math.abs(delta), this.assert(
- expression,
- "expected " + msgObj + " to " + behavior2 + " by " + delta,
- "expected " + msgObj + " to not " + behavior2 + " by " + delta
- );
- }
- __name(assertDelta, "assertDelta");
- Assertion.addMethod("by", assertDelta);
- Assertion.addProperty("extensible", function() {
- let obj = flag2(this, "object"), isExtensible = obj === Object(obj) && Object.isExtensible(obj);
- this.assert(
- isExtensible,
- "expected #{this} to be extensible",
- "expected #{this} to not be extensible"
- );
- });
- Assertion.addProperty("sealed", function() {
- let obj = flag2(this, "object"), isSealed = obj === Object(obj) ? Object.isSealed(obj) : !0;
- this.assert(
- isSealed,
- "expected #{this} to be sealed",
- "expected #{this} to not be sealed"
- );
- });
- Assertion.addProperty("frozen", function() {
- let obj = flag2(this, "object"), isFrozen = obj === Object(obj) ? Object.isFrozen(obj) : !0;
- this.assert(
- isFrozen,
- "expected #{this} to be frozen",
- "expected #{this} to not be frozen"
- );
- });
- Assertion.addProperty("finite", function(_msg) {
- let obj = flag2(this, "object");
- this.assert(
- typeof obj == "number" && isFinite(obj),
- "expected #{this} to be a finite number",
- "expected #{this} to not be a finite number"
- );
- });
- function compareSubset(expected, actual) {
- return expected === actual ? !0 : typeof actual != typeof expected ? !1 : typeof expected != "object" || expected === null ? expected === actual : actual ? Array.isArray(expected) ? Array.isArray(actual) ? expected.every(function(exp) {
- return actual.some(function(act) {
- return compareSubset(exp, act);
- });
- }) : !1 : expected instanceof Date ? actual instanceof Date ? expected.getTime() === actual.getTime() : !1 : Object.keys(expected).every(function(key) {
- let expectedValue = expected[key], actualValue = actual[key];
- return typeof expectedValue == "object" && expectedValue !== null && actualValue !== null ? compareSubset(expectedValue, actualValue) : typeof expectedValue == "function" ? expectedValue(actualValue) : actualValue === expectedValue;
- }) : !1;
- }
- __name(compareSubset, "compareSubset");
- Assertion.addMethod("containSubset", function(expected) {
- let actual = flag(this, "object"), showDiff = config2.showDiff;
- this.assert(
- compareSubset(expected, actual),
- "expected #{act} to contain subset #{exp}",
- "expected #{act} to not contain subset #{exp}",
- expected,
- actual,
- showDiff
- );
- });
- function expect(val, message) {
- return new Assertion(val, message);
- }
- __name(expect, "expect");
- expect.fail = function(actual, expected, message, operator) {
- throw arguments.length < 2 && (message = actual, actual = void 0), message = message || "expect.fail()", new AssertionError(
- message,
- {
- actual,
- expected,
- operator
- },
- expect.fail
- );
- };
- var should_exports = {};
- __export2(should_exports, {
- Should: () => Should,
- should: () => should
- });
- function loadShould() {
- function shouldGetter() {
- return this instanceof String || this instanceof Number || this instanceof Boolean || typeof Symbol == "function" && this instanceof Symbol || typeof BigInt == "function" && this instanceof BigInt ? new Assertion(this.valueOf(), null, shouldGetter) : new Assertion(this, null, shouldGetter);
- }
- __name(shouldGetter, "shouldGetter");
- function shouldSetter(value) {
- Object.defineProperty(this, "should", {
- value,
- enumerable: !0,
- configurable: !0,
- writable: !0
- });
- }
- __name(shouldSetter, "shouldSetter"), Object.defineProperty(Object.prototype, "should", {
- set: shouldSetter,
- get: shouldGetter,
- configurable: !0
- });
- let should2 = {};
- return should2.fail = function(actual, expected, message, operator) {
- throw arguments.length < 2 && (message = actual, actual = void 0), message = message || "should.fail()", new AssertionError(
- message,
- {
- actual,
- expected,
- operator
- },
- should2.fail
- );
- }, should2.equal = function(actual, expected, message) {
- new Assertion(actual, message).to.equal(expected);
- }, should2.Throw = function(fn4, errt, errs, msg) {
- new Assertion(fn4, msg).to.Throw(errt, errs);
- }, should2.exist = function(val, msg) {
- new Assertion(val, msg).to.exist;
- }, should2.not = {}, should2.not.equal = function(actual, expected, msg) {
- new Assertion(actual, msg).to.not.equal(expected);
- }, should2.not.Throw = function(fn4, errt, errs, msg) {
- new Assertion(fn4, msg).to.not.Throw(errt, errs);
- }, should2.not.exist = function(val, msg) {
- new Assertion(val, msg).to.not.exist;
- }, should2.throw = should2.Throw, should2.not.throw = should2.not.Throw, should2;
- }
- __name(loadShould, "loadShould");
- var should = loadShould, Should = loadShould;
- function assert(express, errmsg) {
- new Assertion(null, null, assert, !0).assert(express, errmsg, "[ negation message unavailable ]");
- }
- __name(assert, "assert");
- assert.fail = function(actual, expected, message, operator) {
- throw arguments.length < 2 && (message = actual, actual = void 0), message = message || "assert.fail()", new AssertionError(
- message,
- {
- actual,
- expected,
- operator
- },
- assert.fail
- );
- };
- assert.isOk = function(val, msg) {
- new Assertion(val, msg, assert.isOk, !0).is.ok;
- };
- assert.isNotOk = function(val, msg) {
- new Assertion(val, msg, assert.isNotOk, !0).is.not.ok;
- };
- assert.equal = function(act, exp, msg) {
- let test22 = new Assertion(act, msg, assert.equal, !0);
- test22.assert(
- exp == flag(test22, "object"),
- "expected #{this} to equal #{exp}",
- "expected #{this} to not equal #{act}",
- exp,
- act,
- !0
- );
- };
- assert.notEqual = function(act, exp, msg) {
- let test22 = new Assertion(act, msg, assert.notEqual, !0);
- test22.assert(
- exp != flag(test22, "object"),
- "expected #{this} to not equal #{exp}",
- "expected #{this} to equal #{act}",
- exp,
- act,
- !0
- );
- };
- assert.strictEqual = function(act, exp, msg) {
- new Assertion(act, msg, assert.strictEqual, !0).to.equal(exp);
- };
- assert.notStrictEqual = function(act, exp, msg) {
- new Assertion(act, msg, assert.notStrictEqual, !0).to.not.equal(exp);
- };
- assert.deepEqual = assert.deepStrictEqual = function(act, exp, msg) {
- new Assertion(act, msg, assert.deepEqual, !0).to.eql(exp);
- };
- assert.notDeepEqual = function(act, exp, msg) {
- new Assertion(act, msg, assert.notDeepEqual, !0).to.not.eql(exp);
- };
- assert.isAbove = function(val, abv, msg) {
- new Assertion(val, msg, assert.isAbove, !0).to.be.above(abv);
- };
- assert.isAtLeast = function(val, atlst, msg) {
- new Assertion(val, msg, assert.isAtLeast, !0).to.be.least(atlst);
- };
- assert.isBelow = function(val, blw, msg) {
- new Assertion(val, msg, assert.isBelow, !0).to.be.below(blw);
- };
- assert.isAtMost = function(val, atmst, msg) {
- new Assertion(val, msg, assert.isAtMost, !0).to.be.most(atmst);
- };
- assert.isTrue = function(val, msg) {
- new Assertion(val, msg, assert.isTrue, !0).is.true;
- };
- assert.isNotTrue = function(val, msg) {
- new Assertion(val, msg, assert.isNotTrue, !0).to.not.equal(!0);
- };
- assert.isFalse = function(val, msg) {
- new Assertion(val, msg, assert.isFalse, !0).is.false;
- };
- assert.isNotFalse = function(val, msg) {
- new Assertion(val, msg, assert.isNotFalse, !0).to.not.equal(!1);
- };
- assert.isNull = function(val, msg) {
- new Assertion(val, msg, assert.isNull, !0).to.equal(null);
- };
- assert.isNotNull = function(val, msg) {
- new Assertion(val, msg, assert.isNotNull, !0).to.not.equal(null);
- };
- assert.isNaN = function(val, msg) {
- new Assertion(val, msg, assert.isNaN, !0).to.be.NaN;
- };
- assert.isNotNaN = function(value, message) {
- new Assertion(value, message, assert.isNotNaN, !0).not.to.be.NaN;
- };
- assert.exists = function(val, msg) {
- new Assertion(val, msg, assert.exists, !0).to.exist;
- };
- assert.notExists = function(val, msg) {
- new Assertion(val, msg, assert.notExists, !0).to.not.exist;
- };
- assert.isUndefined = function(val, msg) {
- new Assertion(val, msg, assert.isUndefined, !0).to.equal(void 0);
- };
- assert.isDefined = function(val, msg) {
- new Assertion(val, msg, assert.isDefined, !0).to.not.equal(void 0);
- };
- assert.isCallable = function(value, message) {
- new Assertion(value, message, assert.isCallable, !0).is.callable;
- };
- assert.isNotCallable = function(value, message) {
- new Assertion(value, message, assert.isNotCallable, !0).is.not.callable;
- };
- assert.isObject = function(val, msg) {
- new Assertion(val, msg, assert.isObject, !0).to.be.a("object");
- };
- assert.isNotObject = function(val, msg) {
- new Assertion(val, msg, assert.isNotObject, !0).to.not.be.a("object");
- };
- assert.isArray = function(val, msg) {
- new Assertion(val, msg, assert.isArray, !0).to.be.an("array");
- };
- assert.isNotArray = function(val, msg) {
- new Assertion(val, msg, assert.isNotArray, !0).to.not.be.an("array");
- };
- assert.isString = function(val, msg) {
- new Assertion(val, msg, assert.isString, !0).to.be.a("string");
- };
- assert.isNotString = function(val, msg) {
- new Assertion(val, msg, assert.isNotString, !0).to.not.be.a("string");
- };
- assert.isNumber = function(val, msg) {
- new Assertion(val, msg, assert.isNumber, !0).to.be.a("number");
- };
- assert.isNotNumber = function(val, msg) {
- new Assertion(val, msg, assert.isNotNumber, !0).to.not.be.a("number");
- };
- assert.isNumeric = function(val, msg) {
- new Assertion(val, msg, assert.isNumeric, !0).is.numeric;
- };
- assert.isNotNumeric = function(val, msg) {
- new Assertion(val, msg, assert.isNotNumeric, !0).is.not.numeric;
- };
- assert.isFinite = function(val, msg) {
- new Assertion(val, msg, assert.isFinite, !0).to.be.finite;
- };
- assert.isBoolean = function(val, msg) {
- new Assertion(val, msg, assert.isBoolean, !0).to.be.a("boolean");
- };
- assert.isNotBoolean = function(val, msg) {
- new Assertion(val, msg, assert.isNotBoolean, !0).to.not.be.a("boolean");
- };
- assert.typeOf = function(val, type32, msg) {
- new Assertion(val, msg, assert.typeOf, !0).to.be.a(type32);
- };
- assert.notTypeOf = function(value, type32, message) {
- new Assertion(value, message, assert.notTypeOf, !0).to.not.be.a(type32);
- };
- assert.instanceOf = function(val, type32, msg) {
- new Assertion(val, msg, assert.instanceOf, !0).to.be.instanceOf(type32);
- };
- assert.notInstanceOf = function(val, type32, msg) {
- new Assertion(val, msg, assert.notInstanceOf, !0).to.not.be.instanceOf(
- type32
- );
- };
- assert.include = function(exp, inc, msg) {
- new Assertion(exp, msg, assert.include, !0).include(inc);
- };
- assert.notInclude = function(exp, inc, msg) {
- new Assertion(exp, msg, assert.notInclude, !0).not.include(inc);
- };
- assert.deepInclude = function(exp, inc, msg) {
- new Assertion(exp, msg, assert.deepInclude, !0).deep.include(inc);
- };
- assert.notDeepInclude = function(exp, inc, msg) {
- new Assertion(exp, msg, assert.notDeepInclude, !0).not.deep.include(inc);
- };
- assert.nestedInclude = function(exp, inc, msg) {
- new Assertion(exp, msg, assert.nestedInclude, !0).nested.include(inc);
- };
- assert.notNestedInclude = function(exp, inc, msg) {
- new Assertion(exp, msg, assert.notNestedInclude, !0).not.nested.include(
- inc
- );
- };
- assert.deepNestedInclude = function(exp, inc, msg) {
- new Assertion(exp, msg, assert.deepNestedInclude, !0).deep.nested.include(
- inc
- );
- };
- assert.notDeepNestedInclude = function(exp, inc, msg) {
- new Assertion(
- exp,
- msg,
- assert.notDeepNestedInclude,
- !0
- ).not.deep.nested.include(inc);
- };
- assert.ownInclude = function(exp, inc, msg) {
- new Assertion(exp, msg, assert.ownInclude, !0).own.include(inc);
- };
- assert.notOwnInclude = function(exp, inc, msg) {
- new Assertion(exp, msg, assert.notOwnInclude, !0).not.own.include(inc);
- };
- assert.deepOwnInclude = function(exp, inc, msg) {
- new Assertion(exp, msg, assert.deepOwnInclude, !0).deep.own.include(inc);
- };
- assert.notDeepOwnInclude = function(exp, inc, msg) {
- new Assertion(exp, msg, assert.notDeepOwnInclude, !0).not.deep.own.include(
- inc
- );
- };
- assert.match = function(exp, re, msg) {
- new Assertion(exp, msg, assert.match, !0).to.match(re);
- };
- assert.notMatch = function(exp, re, msg) {
- new Assertion(exp, msg, assert.notMatch, !0).to.not.match(re);
- };
- assert.property = function(obj, prop, msg) {
- new Assertion(obj, msg, assert.property, !0).to.have.property(prop);
- };
- assert.notProperty = function(obj, prop, msg) {
- new Assertion(obj, msg, assert.notProperty, !0).to.not.have.property(prop);
- };
- assert.propertyVal = function(obj, prop, val, msg) {
- new Assertion(obj, msg, assert.propertyVal, !0).to.have.property(prop, val);
- };
- assert.notPropertyVal = function(obj, prop, val, msg) {
- new Assertion(obj, msg, assert.notPropertyVal, !0).to.not.have.property(
- prop,
- val
- );
- };
- assert.deepPropertyVal = function(obj, prop, val, msg) {
- new Assertion(obj, msg, assert.deepPropertyVal, !0).to.have.deep.property(
- prop,
- val
- );
- };
- assert.notDeepPropertyVal = function(obj, prop, val, msg) {
- new Assertion(
- obj,
- msg,
- assert.notDeepPropertyVal,
- !0
- ).to.not.have.deep.property(prop, val);
- };
- assert.ownProperty = function(obj, prop, msg) {
- new Assertion(obj, msg, assert.ownProperty, !0).to.have.own.property(prop);
- };
- assert.notOwnProperty = function(obj, prop, msg) {
- new Assertion(obj, msg, assert.notOwnProperty, !0).to.not.have.own.property(
- prop
- );
- };
- assert.ownPropertyVal = function(obj, prop, value, msg) {
- new Assertion(obj, msg, assert.ownPropertyVal, !0).to.have.own.property(
- prop,
- value
- );
- };
- assert.notOwnPropertyVal = function(obj, prop, value, msg) {
- new Assertion(
- obj,
- msg,
- assert.notOwnPropertyVal,
- !0
- ).to.not.have.own.property(prop, value);
- };
- assert.deepOwnPropertyVal = function(obj, prop, value, msg) {
- new Assertion(
- obj,
- msg,
- assert.deepOwnPropertyVal,
- !0
- ).to.have.deep.own.property(prop, value);
- };
- assert.notDeepOwnPropertyVal = function(obj, prop, value, msg) {
- new Assertion(
- obj,
- msg,
- assert.notDeepOwnPropertyVal,
- !0
- ).to.not.have.deep.own.property(prop, value);
- };
- assert.nestedProperty = function(obj, prop, msg) {
- new Assertion(obj, msg, assert.nestedProperty, !0).to.have.nested.property(
- prop
- );
- };
- assert.notNestedProperty = function(obj, prop, msg) {
- new Assertion(
- obj,
- msg,
- assert.notNestedProperty,
- !0
- ).to.not.have.nested.property(prop);
- };
- assert.nestedPropertyVal = function(obj, prop, val, msg) {
- new Assertion(
- obj,
- msg,
- assert.nestedPropertyVal,
- !0
- ).to.have.nested.property(prop, val);
- };
- assert.notNestedPropertyVal = function(obj, prop, val, msg) {
- new Assertion(
- obj,
- msg,
- assert.notNestedPropertyVal,
- !0
- ).to.not.have.nested.property(prop, val);
- };
- assert.deepNestedPropertyVal = function(obj, prop, val, msg) {
- new Assertion(
- obj,
- msg,
- assert.deepNestedPropertyVal,
- !0
- ).to.have.deep.nested.property(prop, val);
- };
- assert.notDeepNestedPropertyVal = function(obj, prop, val, msg) {
- new Assertion(
- obj,
- msg,
- assert.notDeepNestedPropertyVal,
- !0
- ).to.not.have.deep.nested.property(prop, val);
- };
- assert.lengthOf = function(exp, len, msg) {
- new Assertion(exp, msg, assert.lengthOf, !0).to.have.lengthOf(len);
- };
- assert.hasAnyKeys = function(obj, keys3, msg) {
- new Assertion(obj, msg, assert.hasAnyKeys, !0).to.have.any.keys(keys3);
- };
- assert.hasAllKeys = function(obj, keys3, msg) {
- new Assertion(obj, msg, assert.hasAllKeys, !0).to.have.all.keys(keys3);
- };
- assert.containsAllKeys = function(obj, keys3, msg) {
- new Assertion(obj, msg, assert.containsAllKeys, !0).to.contain.all.keys(
- keys3
- );
- };
- assert.doesNotHaveAnyKeys = function(obj, keys3, msg) {
- new Assertion(obj, msg, assert.doesNotHaveAnyKeys, !0).to.not.have.any.keys(
- keys3
- );
- };
- assert.doesNotHaveAllKeys = function(obj, keys3, msg) {
- new Assertion(obj, msg, assert.doesNotHaveAllKeys, !0).to.not.have.all.keys(
- keys3
- );
- };
- assert.hasAnyDeepKeys = function(obj, keys3, msg) {
- new Assertion(obj, msg, assert.hasAnyDeepKeys, !0).to.have.any.deep.keys(
- keys3
- );
- };
- assert.hasAllDeepKeys = function(obj, keys3, msg) {
- new Assertion(obj, msg, assert.hasAllDeepKeys, !0).to.have.all.deep.keys(
- keys3
- );
- };
- assert.containsAllDeepKeys = function(obj, keys3, msg) {
- new Assertion(
- obj,
- msg,
- assert.containsAllDeepKeys,
- !0
- ).to.contain.all.deep.keys(keys3);
- };
- assert.doesNotHaveAnyDeepKeys = function(obj, keys3, msg) {
- new Assertion(
- obj,
- msg,
- assert.doesNotHaveAnyDeepKeys,
- !0
- ).to.not.have.any.deep.keys(keys3);
- };
- assert.doesNotHaveAllDeepKeys = function(obj, keys3, msg) {
- new Assertion(
- obj,
- msg,
- assert.doesNotHaveAllDeepKeys,
- !0
- ).to.not.have.all.deep.keys(keys3);
- };
- assert.throws = function(fn4, errorLike, errMsgMatcher, msg) {
- (typeof errorLike == "string" || errorLike instanceof RegExp) && (errMsgMatcher = errorLike, errorLike = null);
- let assertErr = new Assertion(fn4, msg, assert.throws, !0).to.throw(
- errorLike,
- errMsgMatcher
- );
- return flag(assertErr, "object");
- };
- assert.doesNotThrow = function(fn4, errorLike, errMsgMatcher, message) {
- (typeof errorLike == "string" || errorLike instanceof RegExp) && (errMsgMatcher = errorLike, errorLike = null), new Assertion(fn4, message, assert.doesNotThrow, !0).to.not.throw(
- errorLike,
- errMsgMatcher
- );
- };
- assert.operator = function(val, operator, val2, msg) {
- let ok;
- switch (operator) {
- case "==":
- ok = val == val2;
- break;
- case "===":
- ok = val === val2;
- break;
- case ">":
- ok = val > val2;
- break;
- case ">=":
- ok = val >= val2;
- break;
- case "<":
- ok = val < val2;
- break;
- case "<=":
- ok = val <= val2;
- break;
- case "!=":
- ok = val != val2;
- break;
- case "!==":
- ok = val !== val2;
- break;
- default:
- throw msg = msg && msg + ": ", new AssertionError(
- msg + 'Invalid operator "' + operator + '"',
- void 0,
- assert.operator
- );
- }
- let test22 = new Assertion(ok, msg, assert.operator, !0);
- test22.assert(
- flag(test22, "object") === !0,
- "expected " + inspect22(val) + " to be " + operator + " " + inspect22(val2),
- "expected " + inspect22(val) + " to not be " + operator + " " + inspect22(val2)
- );
- };
- assert.closeTo = function(act, exp, delta, msg) {
- new Assertion(act, msg, assert.closeTo, !0).to.be.closeTo(exp, delta);
- };
- assert.approximately = function(act, exp, delta, msg) {
- new Assertion(act, msg, assert.approximately, !0).to.be.approximately(
- exp,
- delta
- );
- };
- assert.sameMembers = function(set1, set22, msg) {
- new Assertion(set1, msg, assert.sameMembers, !0).to.have.same.members(set22);
- };
- assert.notSameMembers = function(set1, set22, msg) {
- new Assertion(
- set1,
- msg,
- assert.notSameMembers,
- !0
- ).to.not.have.same.members(set22);
- };
- assert.sameDeepMembers = function(set1, set22, msg) {
- new Assertion(
- set1,
- msg,
- assert.sameDeepMembers,
- !0
- ).to.have.same.deep.members(set22);
- };
- assert.notSameDeepMembers = function(set1, set22, msg) {
- new Assertion(
- set1,
- msg,
- assert.notSameDeepMembers,
- !0
- ).to.not.have.same.deep.members(set22);
- };
- assert.sameOrderedMembers = function(set1, set22, msg) {
- new Assertion(
- set1,
- msg,
- assert.sameOrderedMembers,
- !0
- ).to.have.same.ordered.members(set22);
- };
- assert.notSameOrderedMembers = function(set1, set22, msg) {
- new Assertion(
- set1,
- msg,
- assert.notSameOrderedMembers,
- !0
- ).to.not.have.same.ordered.members(set22);
- };
- assert.sameDeepOrderedMembers = function(set1, set22, msg) {
- new Assertion(
- set1,
- msg,
- assert.sameDeepOrderedMembers,
- !0
- ).to.have.same.deep.ordered.members(set22);
- };
- assert.notSameDeepOrderedMembers = function(set1, set22, msg) {
- new Assertion(
- set1,
- msg,
- assert.notSameDeepOrderedMembers,
- !0
- ).to.not.have.same.deep.ordered.members(set22);
- };
- assert.includeMembers = function(superset, subset, msg) {
- new Assertion(superset, msg, assert.includeMembers, !0).to.include.members(
- subset
- );
- };
- assert.notIncludeMembers = function(superset, subset, msg) {
- new Assertion(
- superset,
- msg,
- assert.notIncludeMembers,
- !0
- ).to.not.include.members(subset);
- };
- assert.includeDeepMembers = function(superset, subset, msg) {
- new Assertion(
- superset,
- msg,
- assert.includeDeepMembers,
- !0
- ).to.include.deep.members(subset);
- };
- assert.notIncludeDeepMembers = function(superset, subset, msg) {
- new Assertion(
- superset,
- msg,
- assert.notIncludeDeepMembers,
- !0
- ).to.not.include.deep.members(subset);
- };
- assert.includeOrderedMembers = function(superset, subset, msg) {
- new Assertion(
- superset,
- msg,
- assert.includeOrderedMembers,
- !0
- ).to.include.ordered.members(subset);
- };
- assert.notIncludeOrderedMembers = function(superset, subset, msg) {
- new Assertion(
- superset,
- msg,
- assert.notIncludeOrderedMembers,
- !0
- ).to.not.include.ordered.members(subset);
- };
- assert.includeDeepOrderedMembers = function(superset, subset, msg) {
- new Assertion(
- superset,
- msg,
- assert.includeDeepOrderedMembers,
- !0
- ).to.include.deep.ordered.members(subset);
- };
- assert.notIncludeDeepOrderedMembers = function(superset, subset, msg) {
- new Assertion(
- superset,
- msg,
- assert.notIncludeDeepOrderedMembers,
- !0
- ).to.not.include.deep.ordered.members(subset);
- };
- assert.oneOf = function(inList, list, msg) {
- new Assertion(inList, msg, assert.oneOf, !0).to.be.oneOf(list);
- };
- assert.isIterable = function(obj, msg) {
- if (obj == null || !obj[Symbol.iterator])
- throw msg = msg ? `${msg} expected ${inspect22(obj)} to be an iterable` : `expected ${inspect22(obj)} to be an iterable`, new AssertionError(msg, void 0, assert.isIterable);
- };
- assert.changes = function(fn4, obj, prop, msg) {
- arguments.length === 3 && typeof obj == "function" && (msg = prop, prop = null), new Assertion(fn4, msg, assert.changes, !0).to.change(obj, prop);
- };
- assert.changesBy = function(fn4, obj, prop, delta, msg) {
- if (arguments.length === 4 && typeof obj == "function") {
- let tmpMsg = delta;
- delta = prop, msg = tmpMsg;
- } else arguments.length === 3 && (delta = prop, prop = null);
- new Assertion(fn4, msg, assert.changesBy, !0).to.change(obj, prop).by(delta);
- };
- assert.doesNotChange = function(fn4, obj, prop, msg) {
- return arguments.length === 3 && typeof obj == "function" && (msg = prop, prop = null), new Assertion(fn4, msg, assert.doesNotChange, !0).to.not.change(
- obj,
- prop
- );
- };
- assert.changesButNotBy = function(fn4, obj, prop, delta, msg) {
- if (arguments.length === 4 && typeof obj == "function") {
- let tmpMsg = delta;
- delta = prop, msg = tmpMsg;
- } else arguments.length === 3 && (delta = prop, prop = null);
- new Assertion(fn4, msg, assert.changesButNotBy, !0).to.change(obj, prop).but.not.by(delta);
- };
- assert.increases = function(fn4, obj, prop, msg) {
- return arguments.length === 3 && typeof obj == "function" && (msg = prop, prop = null), new Assertion(fn4, msg, assert.increases, !0).to.increase(obj, prop);
- };
- assert.increasesBy = function(fn4, obj, prop, delta, msg) {
- if (arguments.length === 4 && typeof obj == "function") {
- let tmpMsg = delta;
- delta = prop, msg = tmpMsg;
- } else arguments.length === 3 && (delta = prop, prop = null);
- new Assertion(fn4, msg, assert.increasesBy, !0).to.increase(obj, prop).by(delta);
- };
- assert.doesNotIncrease = function(fn4, obj, prop, msg) {
- return arguments.length === 3 && typeof obj == "function" && (msg = prop, prop = null), new Assertion(fn4, msg, assert.doesNotIncrease, !0).to.not.increase(
- obj,
- prop
- );
- };
- assert.increasesButNotBy = function(fn4, obj, prop, delta, msg) {
- if (arguments.length === 4 && typeof obj == "function") {
- let tmpMsg = delta;
- delta = prop, msg = tmpMsg;
- } else arguments.length === 3 && (delta = prop, prop = null);
- new Assertion(fn4, msg, assert.increasesButNotBy, !0).to.increase(obj, prop).but.not.by(delta);
- };
- assert.decreases = function(fn4, obj, prop, msg) {
- return arguments.length === 3 && typeof obj == "function" && (msg = prop, prop = null), new Assertion(fn4, msg, assert.decreases, !0).to.decrease(obj, prop);
- };
- assert.decreasesBy = function(fn4, obj, prop, delta, msg) {
- if (arguments.length === 4 && typeof obj == "function") {
- let tmpMsg = delta;
- delta = prop, msg = tmpMsg;
- } else arguments.length === 3 && (delta = prop, prop = null);
- new Assertion(fn4, msg, assert.decreasesBy, !0).to.decrease(obj, prop).by(delta);
- };
- assert.doesNotDecrease = function(fn4, obj, prop, msg) {
- return arguments.length === 3 && typeof obj == "function" && (msg = prop, prop = null), new Assertion(fn4, msg, assert.doesNotDecrease, !0).to.not.decrease(
- obj,
- prop
- );
- };
- assert.doesNotDecreaseBy = function(fn4, obj, prop, delta, msg) {
- if (arguments.length === 4 && typeof obj == "function") {
- let tmpMsg = delta;
- delta = prop, msg = tmpMsg;
- } else arguments.length === 3 && (delta = prop, prop = null);
- return new Assertion(fn4, msg, assert.doesNotDecreaseBy, !0).to.not.decrease(obj, prop).by(delta);
- };
- assert.decreasesButNotBy = function(fn4, obj, prop, delta, msg) {
- if (arguments.length === 4 && typeof obj == "function") {
- let tmpMsg = delta;
- delta = prop, msg = tmpMsg;
- } else arguments.length === 3 && (delta = prop, prop = null);
- new Assertion(fn4, msg, assert.decreasesButNotBy, !0).to.decrease(obj, prop).but.not.by(delta);
- };
- assert.ifError = function(val) {
- if (val)
- throw val;
- };
- assert.isExtensible = function(obj, msg) {
- new Assertion(obj, msg, assert.isExtensible, !0).to.be.extensible;
- };
- assert.isNotExtensible = function(obj, msg) {
- new Assertion(obj, msg, assert.isNotExtensible, !0).to.not.be.extensible;
- };
- assert.isSealed = function(obj, msg) {
- new Assertion(obj, msg, assert.isSealed, !0).to.be.sealed;
- };
- assert.isNotSealed = function(obj, msg) {
- new Assertion(obj, msg, assert.isNotSealed, !0).to.not.be.sealed;
- };
- assert.isFrozen = function(obj, msg) {
- new Assertion(obj, msg, assert.isFrozen, !0).to.be.frozen;
- };
- assert.isNotFrozen = function(obj, msg) {
- new Assertion(obj, msg, assert.isNotFrozen, !0).to.not.be.frozen;
- };
- assert.isEmpty = function(val, msg) {
- new Assertion(val, msg, assert.isEmpty, !0).to.be.empty;
- };
- assert.isNotEmpty = function(val, msg) {
- new Assertion(val, msg, assert.isNotEmpty, !0).to.not.be.empty;
- };
- assert.containsSubset = function(val, exp, msg) {
- new Assertion(val, msg).to.containSubset(exp);
- };
- assert.doesNotContainSubset = function(val, exp, msg) {
- new Assertion(val, msg).to.not.containSubset(exp);
- };
- var aliases = [
- ["isOk", "ok"],
- ["isNotOk", "notOk"],
- ["throws", "throw"],
- ["throws", "Throw"],
- ["isExtensible", "extensible"],
- ["isNotExtensible", "notExtensible"],
- ["isSealed", "sealed"],
- ["isNotSealed", "notSealed"],
- ["isFrozen", "frozen"],
- ["isNotFrozen", "notFrozen"],
- ["isEmpty", "empty"],
- ["isNotEmpty", "notEmpty"],
- ["isCallable", "isFunction"],
- ["isNotCallable", "isNotFunction"],
- ["containsSubset", "containSubset"]
- ];
- for (let [name, as] of aliases)
- assert[as] = assert[name];
- var used = [];
- function use2(fn4) {
- let exports = {
- use: use2,
- AssertionError,
- util: utils_exports,
- config: config2,
- expect,
- assert,
- Assertion,
- ...should_exports
- };
- return ~used.indexOf(fn4) || (fn4(exports, utils_exports), used.push(fn4)), exports;
- }
- __name(use2, "use");
-
- // ../../node_modules/@testing-library/jest-dom/dist/matchers.mjs
- var matchers_exports = {};
- __export(matchers_exports, {
- toAppearAfter: () => toAppearAfter,
- toAppearBefore: () => toAppearBefore,
- toBeChecked: () => toBeChecked,
- toBeDisabled: () => toBeDisabled,
- toBeEmpty: () => toBeEmpty,
- toBeEmptyDOMElement: () => toBeEmptyDOMElement,
- toBeEnabled: () => toBeEnabled,
- toBeInTheDOM: () => toBeInTheDOM,
- toBeInTheDocument: () => toBeInTheDocument,
- toBeInvalid: () => toBeInvalid,
- toBePartiallyChecked: () => toBePartiallyChecked,
- toBePartiallyPressed: () => toBePartiallyPressed,
- toBePressed: () => toBePressed,
- toBeRequired: () => toBeRequired,
- toBeValid: () => toBeValid,
- toBeVisible: () => toBeVisible,
- toContainElement: () => toContainElement,
- toContainHTML: () => toContainHTML,
- toHaveAccessibleDescription: () => toHaveAccessibleDescription,
- toHaveAccessibleErrorMessage: () => toHaveAccessibleErrorMessage,
- toHaveAccessibleName: () => toHaveAccessibleName,
- toHaveAttribute: () => toHaveAttribute,
- toHaveClass: () => toHaveClass,
- toHaveDescription: () => toHaveDescription,
- toHaveDisplayValue: () => toHaveDisplayValue,
- toHaveErrorMessage: () => toHaveErrorMessage,
- toHaveFocus: () => toHaveFocus,
- toHaveFormValues: () => toHaveFormValues,
- toHaveRole: () => toHaveRole,
- toHaveSelection: () => toHaveSelection,
- toHaveStyle: () => toHaveStyle,
- toHaveTextContent: () => toHaveTextContent,
- toHaveValue: () => toHaveValue
- });
-
- // ../../node_modules/@testing-library/jest-dom/dist/matchers-35e4d3bd.mjs
- var import_redent = __toESM(require_redent(), 1);
-
- // ../../node_modules/@adobe/css-tools/dist/index.mjs
- function $parcel$defineInteropFlag(a3) {
- Object.defineProperty(a3, "__esModule", { value: !0, configurable: !0 });
- }
- function $parcel$export(e, n, v, s3) {
- Object.defineProperty(e, n, { get: v, set: s3, enumerable: !0, configurable: !0 });
- }
- var $009ddb00d3ec72b8$exports = {};
- $parcel$defineInteropFlag($009ddb00d3ec72b8$exports);
- $parcel$export($009ddb00d3ec72b8$exports, "default", () => $009ddb00d3ec72b8$export$2e2bcd8739ae039);
- var $009ddb00d3ec72b8$export$2e2bcd8739ae039 = class extends Error {
- constructor(filename, msg, lineno, column2, css3) {
- super(filename + ":" + lineno + ":" + column2 + ": " + msg), this.reason = msg, this.filename = filename, this.line = lineno, this.column = column2, this.source = css3;
- }
- }, $0865a9fb4cc365fe$exports = {};
- $parcel$defineInteropFlag($0865a9fb4cc365fe$exports);
- $parcel$export($0865a9fb4cc365fe$exports, "default", () => $0865a9fb4cc365fe$export$2e2bcd8739ae039);
- var $0865a9fb4cc365fe$export$2e2bcd8739ae039 = class {
- constructor(start2, end2, source) {
- this.start = start2, this.end = end2, this.source = source;
- }
- }, $b2e137848b48cf4f$exports = {};
- $parcel$export($b2e137848b48cf4f$exports, "CssTypes", () => $b2e137848b48cf4f$export$9be5dd6e61d5d73a);
- var $b2e137848b48cf4f$export$9be5dd6e61d5d73a;
- (function(CssTypes) {
- CssTypes.stylesheet = "stylesheet", CssTypes.rule = "rule", CssTypes.declaration = "declaration", CssTypes.comment = "comment", CssTypes.container = "container", CssTypes.charset = "charset", CssTypes.document = "document", CssTypes.customMedia = "custom-media", CssTypes.fontFace = "font-face", CssTypes.host = "host", CssTypes.import = "import", CssTypes.keyframes = "keyframes", CssTypes.keyframe = "keyframe", CssTypes.layer = "layer", CssTypes.media = "media", CssTypes.namespace = "namespace", CssTypes.page = "page", CssTypes.startingStyle = "starting-style", CssTypes.supports = "supports";
- })($b2e137848b48cf4f$export$9be5dd6e61d5d73a || ($b2e137848b48cf4f$export$9be5dd6e61d5d73a = {}));
- var $d708735ed1303b43$var$commentre = /\/\*[^]*?(?:\*\/|$)/g, $d708735ed1303b43$export$98e6a39c04603d36 = (css3, options) => {
- options = options || {};
- let lineno = 1, column2 = 1;
- function updatePosition(str2) {
- let lines = str2.match(/\n/g);
- lines && (lineno += lines.length);
- let i = str2.lastIndexOf(`
- `);
- column2 = ~i ? str2.length - i : column2 + str2.length;
- }
- function position2() {
- let start2 = {
- line: lineno,
- column: column2
- };
- return function(node2) {
- return node2.position = new $0865a9fb4cc365fe$export$2e2bcd8739ae039(start2, {
- line: lineno,
- column: column2
- }, options?.source || ""), whitespace2(), node2;
- };
- }
- let errorsList = [];
- function error(msg) {
- let err = new $009ddb00d3ec72b8$export$2e2bcd8739ae039(options?.source || "", msg, lineno, column2, css3);
- if (options?.silent) errorsList.push(err);
- else throw err;
- }
- function stylesheet() {
- let rulesList = rules();
- return {
- type: $b2e137848b48cf4f$export$9be5dd6e61d5d73a.stylesheet,
- stylesheet: {
- source: options?.source,
- rules: rulesList,
- parsingErrors: errorsList
- }
- };
- }
- function open() {
- return match3(/^{\s*/);
- }
- function close() {
- return match3(/^}/);
- }
- function rules() {
- let node2, rules2 = [];
- for (whitespace2(), comments(rules2); css3.length && css3.charAt(0) !== "}" && (node2 = atrule() || rule()); ) node2 && (rules2.push(node2), comments(rules2));
- return rules2;
- }
- function match3(re) {
- let m3 = re.exec(css3);
- if (!m3) return;
- let str2 = m3[0];
- return updatePosition(str2), css3 = css3.slice(str2.length), m3;
- }
- function whitespace2() {
- match3(/^\s*/);
- }
- function comments(rules2) {
- let c;
- for (rules2 = rules2 || []; c = comment2(); ) c && rules2.push(c);
- return rules2;
- }
- function comment2() {
- let pos = position2();
- if (css3.charAt(0) !== "/" || css3.charAt(1) !== "*") return;
- let m3 = match3(/^\/\*[^]*?\*\//);
- return m3 ? pos({
- type: $b2e137848b48cf4f$export$9be5dd6e61d5d73a.comment,
- comment: m3[0].slice(2, -2)
- }) : error("End of comment missing");
- }
- function findClosingParenthese(str2, start2, depth) {
- let ptr = start2 + 1, found = !1, closeParentheses = str2.indexOf(")", ptr);
- for (; !found && closeParentheses !== -1; ) {
- let nextParentheses = str2.indexOf("(", ptr);
- nextParentheses !== -1 && nextParentheses < closeParentheses ? (ptr = findClosingParenthese(str2, nextParentheses + 1, depth + 1) + 1, closeParentheses = str2.indexOf(")", ptr)) : found = !0;
- }
- return found && closeParentheses !== -1 ? closeParentheses : -1;
- }
- function selector() {
- let m3 = match3(/^([^{]+)/);
- if (!m3) return;
- let res = $d708735ed1303b43$var$trim(m3[0]).replace($d708735ed1303b43$var$commentre, "");
- if (res.indexOf(",") === -1) return [
- res
- ];
- let ptr = 0, startParentheses = res.indexOf("(", ptr);
- for (; startParentheses !== -1; ) {
- let closeParentheses = findClosingParenthese(res, startParentheses, 0);
- if (closeParentheses === -1) break;
- ptr = closeParentheses + 1, res = res.substring(0, startParentheses) + res.substring(startParentheses, closeParentheses).replace(/,/g, "\u200C") + res.substring(closeParentheses), startParentheses = res.indexOf("(", ptr);
- }
- return res = res.replace(/("|')(?:\\\1|.)*?\1/g, (m4) => m4.replace(/,/g, "\u200C")), res.split(",").map((s3) => $d708735ed1303b43$var$trim(s3.replace(/\u200C/g, ",")));
- }
- function declaration2() {
- let pos = position2(), propMatch = match3(/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);
- if (!propMatch) return;
- let propValue = $d708735ed1303b43$var$trim(propMatch[0]);
- if (!match3(/^:\s*/)) return error("property missing ':'");
- let val = match3(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/), ret = pos({
- type: $b2e137848b48cf4f$export$9be5dd6e61d5d73a.declaration,
- property: propValue.replace($d708735ed1303b43$var$commentre, ""),
- value: val ? $d708735ed1303b43$var$trim(val[0]).replace($d708735ed1303b43$var$commentre, "") : ""
- });
- return match3(/^[;\s]*/), ret;
- }
- function declarations() {
- let decls = [];
- if (!open()) return error("missing '{'");
- comments(decls);
- let decl;
- for (; decl = declaration2(); ) decl && (decls.push(decl), comments(decls));
- return close() ? decls : error("missing '}'");
- }
- function keyframe() {
- let m3, vals = [], pos = position2();
- for (; m3 = match3(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/); )
- vals.push(m3[1]), match3(/^,\s*/);
- if (vals.length)
- return pos({
- type: $b2e137848b48cf4f$export$9be5dd6e61d5d73a.keyframe,
- values: vals,
- declarations: declarations() || []
- });
- }
- function atkeyframes() {
- let pos = position2(), m1 = match3(/^@([-\w]+)?keyframes\s*/);
- if (!m1) return;
- let vendor = m1[1], m22 = match3(/^([-\w]+)\s*/);
- if (!m22) return error("@keyframes missing name");
- let name = m22[1];
- if (!open()) return error("@keyframes missing '{'");
- let frame, frames = comments();
- for (; frame = keyframe(); )
- frames.push(frame), frames = frames.concat(comments());
- return close() ? pos({
- type: $b2e137848b48cf4f$export$9be5dd6e61d5d73a.keyframes,
- name,
- vendor,
- keyframes: frames
- }) : error("@keyframes missing '}'");
- }
- function atsupports() {
- let pos = position2(), m3 = match3(/^@supports *([^{]+)/);
- if (!m3) return;
- let supports = $d708735ed1303b43$var$trim(m3[1]);
- if (!open()) return error("@supports missing '{'");
- let style = comments().concat(rules());
- return close() ? pos({
- type: $b2e137848b48cf4f$export$9be5dd6e61d5d73a.supports,
- supports,
- rules: style
- }) : error("@supports missing '}'");
- }
- function athost() {
- let pos = position2();
- if (!match3(/^@host\s*/)) return;
- if (!open()) return error("@host missing '{'");
- let style = comments().concat(rules());
- return close() ? pos({
- type: $b2e137848b48cf4f$export$9be5dd6e61d5d73a.host,
- rules: style
- }) : error("@host missing '}'");
- }
- function atcontainer() {
- let pos = position2(), m3 = match3(/^@container *([^{]+)/);
- if (!m3) return;
- let container = $d708735ed1303b43$var$trim(m3[1]);
- if (!open()) return error("@container missing '{'");
- let style = comments().concat(rules());
- return close() ? pos({
- type: $b2e137848b48cf4f$export$9be5dd6e61d5d73a.container,
- container,
- rules: style
- }) : error("@container missing '}'");
- }
- function atlayer() {
- let pos = position2(), m3 = match3(/^@layer *([^{;@]+)/);
- if (!m3) return;
- let layer = $d708735ed1303b43$var$trim(m3[1]);
- if (!open())
- return match3(/^[;\s]*/), pos({
- type: $b2e137848b48cf4f$export$9be5dd6e61d5d73a.layer,
- layer
- });
- let style = comments().concat(rules());
- return close() ? pos({
- type: $b2e137848b48cf4f$export$9be5dd6e61d5d73a.layer,
- layer,
- rules: style
- }) : error("@layer missing '}'");
- }
- function atmedia() {
- let pos = position2(), m3 = match3(/^@media *([^{]+)/);
- if (!m3) return;
- let media = $d708735ed1303b43$var$trim(m3[1]);
- if (!open()) return error("@media missing '{'");
- let style = comments().concat(rules());
- return close() ? pos({
- type: $b2e137848b48cf4f$export$9be5dd6e61d5d73a.media,
- media,
- rules: style
- }) : error("@media missing '}'");
- }
- function atcustommedia() {
- let pos = position2(), m3 = match3(/^@custom-media\s+(--\S+)\s*([^{;\s][^{;]*);/);
- if (m3)
- return pos({
- type: $b2e137848b48cf4f$export$9be5dd6e61d5d73a.customMedia,
- name: $d708735ed1303b43$var$trim(m3[1]),
- media: $d708735ed1303b43$var$trim(m3[2])
- });
- }
- function atpage() {
- let pos = position2();
- if (!match3(/^@page */)) return;
- let sel = selector() || [];
- if (!open()) return error("@page missing '{'");
- let decls = comments(), decl;
- for (; decl = declaration2(); )
- decls.push(decl), decls = decls.concat(comments());
- return close() ? pos({
- type: $b2e137848b48cf4f$export$9be5dd6e61d5d73a.page,
- selectors: sel,
- declarations: decls
- }) : error("@page missing '}'");
- }
- function atdocument() {
- let pos = position2(), m3 = match3(/^@([-\w]+)?document *([^{]+)/);
- if (!m3) return;
- let vendor = $d708735ed1303b43$var$trim(m3[1]), doc = $d708735ed1303b43$var$trim(m3[2]);
- if (!open()) return error("@document missing '{'");
- let style = comments().concat(rules());
- return close() ? pos({
- type: $b2e137848b48cf4f$export$9be5dd6e61d5d73a.document,
- document: doc,
- vendor,
- rules: style
- }) : error("@document missing '}'");
- }
- function atfontface() {
- let pos = position2();
- if (!match3(/^@font-face\s*/)) return;
- if (!open()) return error("@font-face missing '{'");
- let decls = comments(), decl;
- for (; decl = declaration2(); )
- decls.push(decl), decls = decls.concat(comments());
- return close() ? pos({
- type: $b2e137848b48cf4f$export$9be5dd6e61d5d73a.fontFace,
- declarations: decls
- }) : error("@font-face missing '}'");
- }
- function atstartingstyle() {
- let pos = position2();
- if (!match3(/^@starting-style\s*/)) return;
- if (!open()) return error("@starting-style missing '{'");
- let style = comments().concat(rules());
- return close() ? pos({
- type: $b2e137848b48cf4f$export$9be5dd6e61d5d73a.startingStyle,
- rules: style
- }) : error("@starting-style missing '}'");
- }
- let atimport = _compileAtrule("import"), atcharset = _compileAtrule("charset"), atnamespace = _compileAtrule("namespace");
- function _compileAtrule(name) {
- let re = new RegExp("^@" + name + `\\s*((?::?[^;'"]|"(?:\\\\"|[^"])*?"|'(?:\\\\'|[^'])*?')+)(?:;|$)`);
- return function() {
- let pos = position2(), m3 = match3(re);
- if (!m3) return;
- let ret = {
- type: name
- };
- return ret[name] = m3[1].trim(), pos(ret);
- };
- }
- function atrule() {
- if (css3[0] === "@")
- return atkeyframes() || atmedia() || atcustommedia() || atsupports() || atimport() || atcharset() || atnamespace() || atdocument() || atpage() || athost() || atfontface() || atcontainer() || atstartingstyle() || atlayer();
- }
- function rule() {
- let pos = position2(), sel = selector();
- return sel ? (comments(), pos({
- type: $b2e137848b48cf4f$export$9be5dd6e61d5d73a.rule,
- selectors: sel,
- declarations: declarations() || []
- })) : error("selector missing");
- }
- return $d708735ed1303b43$var$addParent(stylesheet());
- };
- function $d708735ed1303b43$var$trim(str2) {
- return str2 ? str2.trim() : "";
- }
- function $d708735ed1303b43$var$addParent(obj, parent) {
- let isNode2 = obj && typeof obj.type == "string", childParent = isNode2 ? obj : parent;
- for (let k in obj) {
- let value = obj[k];
- Array.isArray(value) ? value.forEach((v) => {
- $d708735ed1303b43$var$addParent(v, childParent);
- }) : value && typeof value == "object" && $d708735ed1303b43$var$addParent(value, childParent);
- }
- return isNode2 && Object.defineProperty(obj, "parent", {
- configurable: !0,
- writable: !0,
- enumerable: !1,
- value: parent || null
- }), obj;
- }
- var $d708735ed1303b43$export$2e2bcd8739ae039 = $d708735ed1303b43$export$98e6a39c04603d36;
- var $149c1bd638913645$export$98e6a39c04603d36 = $d708735ed1303b43$export$2e2bcd8739ae039;
-
- // ../../node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/polyfills/array.from.mjs
- var toStr = Object.prototype.toString;
- function isCallable(fn4) {
- return typeof fn4 == "function" || toStr.call(fn4) === "[object Function]";
- }
- function toInteger(value) {
- var number = Number(value);
- return isNaN(number) ? 0 : number === 0 || !isFinite(number) ? number : (number > 0 ? 1 : -1) * Math.floor(Math.abs(number));
- }
- var maxSafeInteger = Math.pow(2, 53) - 1;
- function toLength(value) {
- var len = toInteger(value);
- return Math.min(Math.max(len, 0), maxSafeInteger);
- }
- function arrayFrom(arrayLike, mapFn) {
- var C3 = Array, items = Object(arrayLike);
- if (arrayLike == null)
- throw new TypeError("Array.from requires an array-like object - not null or undefined");
- if (typeof mapFn < "u" && !isCallable(mapFn))
- throw new TypeError("Array.from: when provided, the second argument must be a function");
- for (var len = toLength(items.length), A3 = isCallable(C3) ? Object(new C3(len)) : new Array(len), k = 0, kValue; k < len; )
- kValue = items[k], mapFn ? A3[k] = mapFn(kValue, k) : A3[k] = kValue, k += 1;
- return A3.length = len, A3;
- }
-
- // ../../node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/polyfills/SetLike.mjs
- function _typeof2(o) {
- "@babel/helpers - typeof";
- return _typeof2 = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(o2) {
- return typeof o2;
- } : function(o2) {
- return o2 && typeof Symbol == "function" && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2;
- }, _typeof2(o);
- }
- function _classCallCheck(instance, Constructor) {
- if (!(instance instanceof Constructor))
- throw new TypeError("Cannot call a class as a function");
- }
- function _defineProperties(target, props) {
- for (var i = 0; i < props.length; i++) {
- var descriptor = props[i];
- descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0, "value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
- }
- }
- function _createClass(Constructor, protoProps, staticProps) {
- return protoProps && _defineProperties(Constructor.prototype, protoProps), staticProps && _defineProperties(Constructor, staticProps), Object.defineProperty(Constructor, "prototype", { writable: !1 }), Constructor;
- }
- function _defineProperty2(obj, key, value) {
- return key = _toPropertyKey(key), key in obj ? Object.defineProperty(obj, key, { value, enumerable: !0, configurable: !0, writable: !0 }) : obj[key] = value, obj;
- }
- function _toPropertyKey(arg) {
- var key = _toPrimitive(arg, "string");
- return _typeof2(key) === "symbol" ? key : String(key);
- }
- function _toPrimitive(input2, hint) {
- if (_typeof2(input2) !== "object" || input2 === null) return input2;
- var prim = input2[Symbol.toPrimitive];
- if (prim !== void 0) {
- var res = prim.call(input2, hint || "default");
- if (_typeof2(res) !== "object") return res;
- throw new TypeError("@@toPrimitive must return a primitive value.");
- }
- return (hint === "string" ? String : Number)(input2);
- }
- var SetLike = (function() {
- function SetLike3() {
- var items = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
- _classCallCheck(this, SetLike3), _defineProperty2(this, "items", void 0), this.items = items;
- }
- return _createClass(SetLike3, [{
- key: "add",
- value: function(value) {
- return this.has(value) === !1 && this.items.push(value), this;
- }
- }, {
- key: "clear",
- value: function() {
- this.items = [];
- }
- }, {
- key: "delete",
- value: function(value) {
- var previousLength = this.items.length;
- return this.items = this.items.filter(function(item) {
- return item !== value;
- }), previousLength !== this.items.length;
- }
- }, {
- key: "forEach",
- value: function(callbackfn) {
- var _this = this;
- this.items.forEach(function(item) {
- callbackfn(item, item, _this);
- });
- }
- }, {
- key: "has",
- value: function(value) {
- return this.items.indexOf(value) !== -1;
- }
- }, {
- key: "size",
- get: function() {
- return this.items.length;
- }
- }]), SetLike3;
- })(), SetLike_default = typeof Set > "u" ? Set : SetLike;
-
- // ../../node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/getRole.mjs
- function getLocalName(element) {
- var _element$localName;
- return (
- // eslint-disable-next-line no-restricted-properties -- actual guard for environments without localName
- (_element$localName = element.localName) !== null && _element$localName !== void 0 ? _element$localName : (
- // eslint-disable-next-line no-restricted-properties -- required for the fallback
- element.tagName.toLowerCase()
- )
- );
- }
- var localNameToRoleMappings = {
- article: "article",
- aside: "complementary",
- button: "button",
- datalist: "listbox",
- dd: "definition",
- details: "group",
- dialog: "dialog",
- dt: "term",
- fieldset: "group",
- figure: "figure",
- // WARNING: Only with an accessible name
- form: "form",
- footer: "contentinfo",
- h1: "heading",
- h2: "heading",
- h3: "heading",
- h4: "heading",
- h5: "heading",
- h6: "heading",
- header: "banner",
- hr: "separator",
- html: "document",
- legend: "legend",
- li: "listitem",
- math: "math",
- main: "main",
- menu: "list",
- nav: "navigation",
- ol: "list",
- optgroup: "group",
- // WARNING: Only in certain context
- option: "option",
- output: "status",
- progress: "progressbar",
- // WARNING: Only with an accessible name
- section: "region",
- summary: "button",
- table: "table",
- tbody: "rowgroup",
- textarea: "textbox",
- tfoot: "rowgroup",
- // WARNING: Only in certain context
- td: "cell",
- th: "columnheader",
- thead: "rowgroup",
- tr: "row",
- ul: "list"
- }, prohibitedAttributes = {
- caption: /* @__PURE__ */ new Set(["aria-label", "aria-labelledby"]),
- code: /* @__PURE__ */ new Set(["aria-label", "aria-labelledby"]),
- deletion: /* @__PURE__ */ new Set(["aria-label", "aria-labelledby"]),
- emphasis: /* @__PURE__ */ new Set(["aria-label", "aria-labelledby"]),
- generic: /* @__PURE__ */ new Set(["aria-label", "aria-labelledby", "aria-roledescription"]),
- insertion: /* @__PURE__ */ new Set(["aria-label", "aria-labelledby"]),
- none: /* @__PURE__ */ new Set(["aria-label", "aria-labelledby"]),
- paragraph: /* @__PURE__ */ new Set(["aria-label", "aria-labelledby"]),
- presentation: /* @__PURE__ */ new Set(["aria-label", "aria-labelledby"]),
- strong: /* @__PURE__ */ new Set(["aria-label", "aria-labelledby"]),
- subscript: /* @__PURE__ */ new Set(["aria-label", "aria-labelledby"]),
- superscript: /* @__PURE__ */ new Set(["aria-label", "aria-labelledby"])
- };
- function hasGlobalAriaAttributes(element, role) {
- return [
- "aria-atomic",
- "aria-busy",
- "aria-controls",
- "aria-current",
- "aria-description",
- "aria-describedby",
- "aria-details",
- // "disabled",
- "aria-dropeffect",
- // "errormessage",
- "aria-flowto",
- "aria-grabbed",
- // "haspopup",
- "aria-hidden",
- // "invalid",
- "aria-keyshortcuts",
- "aria-label",
- "aria-labelledby",
- "aria-live",
- "aria-owns",
- "aria-relevant",
- "aria-roledescription"
- ].some(function(attributeName) {
- var _prohibitedAttributes;
- return element.hasAttribute(attributeName) && !((_prohibitedAttributes = prohibitedAttributes[role]) !== null && _prohibitedAttributes !== void 0 && _prohibitedAttributes.has(attributeName));
- });
- }
- function ignorePresentationalRole(element, implicitRole) {
- return hasGlobalAriaAttributes(element, implicitRole);
- }
- function getRole(element) {
- var explicitRole = getExplicitRole(element);
- if (explicitRole === null || presentationRoles.indexOf(explicitRole) !== -1) {
- var implicitRole = getImplicitRole(element);
- if (presentationRoles.indexOf(explicitRole || "") === -1 || ignorePresentationalRole(element, implicitRole || ""))
- return implicitRole;
- }
- return explicitRole;
- }
- function getImplicitRole(element) {
- var mappedByTag = localNameToRoleMappings[getLocalName(element)];
- if (mappedByTag !== void 0)
- return mappedByTag;
- switch (getLocalName(element)) {
- case "a":
- case "area":
- case "link":
- if (element.hasAttribute("href"))
- return "link";
- break;
- case "img":
- return element.getAttribute("alt") === "" && !ignorePresentationalRole(element, "img") ? "presentation" : "img";
- case "input": {
- var _ref = element, type5 = _ref.type;
- switch (type5) {
- case "button":
- case "image":
- case "reset":
- case "submit":
- return "button";
- case "checkbox":
- case "radio":
- return type5;
- case "range":
- return "slider";
- case "email":
- case "tel":
- case "text":
- case "url":
- return element.hasAttribute("list") ? "combobox" : "textbox";
- case "search":
- return element.hasAttribute("list") ? "combobox" : "searchbox";
- case "number":
- return "spinbutton";
- default:
- return null;
- }
- }
- case "select":
- return element.hasAttribute("multiple") || element.size > 1 ? "listbox" : "combobox";
- }
- return null;
- }
- function getExplicitRole(element) {
- var role = element.getAttribute("role");
- if (role !== null) {
- var explicitRole = role.trim().split(" ")[0];
- if (explicitRole.length > 0)
- return explicitRole;
- }
- return null;
- }
-
- // ../../node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/util.mjs
- var presentationRoles = ["presentation", "none"];
- function isElement(node2) {
- return node2 !== null && node2.nodeType === node2.ELEMENT_NODE;
- }
- function isHTMLTableCaptionElement(node2) {
- return isElement(node2) && getLocalName(node2) === "caption";
- }
- function isHTMLInputElement(node2) {
- return isElement(node2) && getLocalName(node2) === "input";
- }
- function isHTMLOptGroupElement(node2) {
- return isElement(node2) && getLocalName(node2) === "optgroup";
- }
- function isHTMLSelectElement(node2) {
- return isElement(node2) && getLocalName(node2) === "select";
- }
- function isHTMLTableElement(node2) {
- return isElement(node2) && getLocalName(node2) === "table";
- }
- function isHTMLTextAreaElement(node2) {
- return isElement(node2) && getLocalName(node2) === "textarea";
- }
- function safeWindow(node2) {
- var _ref = node2.ownerDocument === null ? node2 : node2.ownerDocument, defaultView = _ref.defaultView;
- if (defaultView === null)
- throw new TypeError("no window available");
- return defaultView;
- }
- function isHTMLFieldSetElement(node2) {
- return isElement(node2) && getLocalName(node2) === "fieldset";
- }
- function isHTMLLegendElement(node2) {
- return isElement(node2) && getLocalName(node2) === "legend";
- }
- function isHTMLSlotElement(node2) {
- return isElement(node2) && getLocalName(node2) === "slot";
- }
- function isSVGElement(node2) {
- return isElement(node2) && node2.ownerSVGElement !== void 0;
- }
- function isSVGSVGElement(node2) {
- return isElement(node2) && getLocalName(node2) === "svg";
- }
- function isSVGTitleElement(node2) {
- return isSVGElement(node2) && getLocalName(node2) === "title";
- }
- function queryIdRefs(node2, attributeName) {
- if (isElement(node2) && node2.hasAttribute(attributeName)) {
- var ids = node2.getAttribute(attributeName).split(" "), root2 = node2.getRootNode ? node2.getRootNode() : node2.ownerDocument;
- return ids.map(function(id) {
- return root2.getElementById(id);
- }).filter(
- function(element) {
- return element !== null;
- }
- // TODO: why does this not narrow?
- );
- }
- return [];
- }
- function hasAnyConcreteRoles(node2, roles3) {
- return isElement(node2) ? roles3.indexOf(getRole(node2)) !== -1 : !1;
- }
-
- // ../../node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/accessible-name-and-description.mjs
- function asFlatString(s3) {
- return s3.trim().replace(/\s\s+/g, " ");
- }
- function isHidden(node2, getComputedStyleImplementation) {
- if (!isElement(node2))
- return !1;
- if (node2.hasAttribute("hidden") || node2.getAttribute("aria-hidden") === "true")
- return !0;
- var style = getComputedStyleImplementation(node2);
- return style.getPropertyValue("display") === "none" || style.getPropertyValue("visibility") === "hidden";
- }
- function isControl(node2) {
- return hasAnyConcreteRoles(node2, ["button", "combobox", "listbox", "textbox"]) || hasAbstractRole(node2, "range");
- }
- function hasAbstractRole(node2, role) {
- if (!isElement(node2))
- return !1;
- switch (role) {
- case "range":
- return hasAnyConcreteRoles(node2, ["meter", "progressbar", "scrollbar", "slider", "spinbutton"]);
- default:
- throw new TypeError("No knowledge about abstract role '".concat(role, "'. This is likely a bug :("));
- }
- }
- function querySelectorAllSubtree(element, selectors) {
- var elements = arrayFrom(element.querySelectorAll(selectors));
- return queryIdRefs(element, "aria-owns").forEach(function(root2) {
- elements.push.apply(elements, arrayFrom(root2.querySelectorAll(selectors)));
- }), elements;
- }
- function querySelectedOptions(listbox) {
- return isHTMLSelectElement(listbox) ? listbox.selectedOptions || querySelectorAllSubtree(listbox, "[selected]") : querySelectorAllSubtree(listbox, '[aria-selected="true"]');
- }
- function isMarkedPresentational(node2) {
- return hasAnyConcreteRoles(node2, presentationRoles);
- }
- function isNativeHostLanguageTextAlternativeElement(node2) {
- return isHTMLTableCaptionElement(node2);
- }
- function allowsNameFromContent(node2) {
- return hasAnyConcreteRoles(node2, ["button", "cell", "checkbox", "columnheader", "gridcell", "heading", "label", "legend", "link", "menuitem", "menuitemcheckbox", "menuitemradio", "option", "radio", "row", "rowheader", "switch", "tab", "tooltip", "treeitem"]);
- }
- function isDescendantOfNativeHostLanguageTextAlternativeElement(node2) {
- return !1;
- }
- function getValueOfTextbox(element) {
- return isHTMLInputElement(element) || isHTMLTextAreaElement(element) ? element.value : element.textContent || "";
- }
- function getTextualContent(declaration2) {
- var content = declaration2.getPropertyValue("content");
- return /^["'].*["']$/.test(content) ? content.slice(1, -1) : "";
- }
- function isLabelableElement(element) {
- var localName = getLocalName(element);
- return localName === "button" || localName === "input" && element.getAttribute("type") !== "hidden" || localName === "meter" || localName === "output" || localName === "progress" || localName === "select" || localName === "textarea";
- }
- function findLabelableElement(element) {
- if (isLabelableElement(element))
- return element;
- var labelableElement = null;
- return element.childNodes.forEach(function(childNode) {
- if (labelableElement === null && isElement(childNode)) {
- var descendantLabelableElement = findLabelableElement(childNode);
- descendantLabelableElement !== null && (labelableElement = descendantLabelableElement);
- }
- }), labelableElement;
- }
- function getControlOfLabel(label) {
- if (label.control !== void 0)
- return label.control;
- var htmlFor = label.getAttribute("for");
- return htmlFor !== null ? label.ownerDocument.getElementById(htmlFor) : findLabelableElement(label);
- }
- function getLabels(element) {
- var labelsProperty = element.labels;
- if (labelsProperty === null)
- return labelsProperty;
- if (labelsProperty !== void 0)
- return arrayFrom(labelsProperty);
- if (!isLabelableElement(element))
- return null;
- var document13 = element.ownerDocument;
- return arrayFrom(document13.querySelectorAll("label")).filter(function(label) {
- return getControlOfLabel(label) === element;
- });
- }
- function getSlotContents(slot) {
- var assignedNodes = slot.assignedNodes();
- return assignedNodes.length === 0 ? arrayFrom(slot.childNodes) : assignedNodes;
- }
- function computeTextAlternative(root2) {
- var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, consultedNodes = new SetLike_default(), window2 = safeWindow(root2), _options$compute = options.compute, compute = _options$compute === void 0 ? "name" : _options$compute, _options$computedStyl = options.computedStyleSupportsPseudoElements, computedStyleSupportsPseudoElements = _options$computedStyl === void 0 ? options.getComputedStyle !== void 0 : _options$computedStyl, _options$getComputedS = options.getComputedStyle, getComputedStyle3 = _options$getComputedS === void 0 ? window2.getComputedStyle.bind(window2) : _options$getComputedS, _options$hidden = options.hidden, hidden = _options$hidden === void 0 ? !1 : _options$hidden;
- function computeMiscTextAlternative(node2, context) {
- var accumulatedText = "";
- if (isElement(node2) && computedStyleSupportsPseudoElements) {
- var pseudoBefore = getComputedStyle3(node2, "::before"), beforeContent = getTextualContent(pseudoBefore);
- accumulatedText = "".concat(beforeContent, " ").concat(accumulatedText);
- }
- var childNodes = isHTMLSlotElement(node2) ? getSlotContents(node2) : arrayFrom(node2.childNodes).concat(queryIdRefs(node2, "aria-owns"));
- if (childNodes.forEach(function(child) {
- var result = computeTextAlternative3(child, {
- isEmbeddedInLabel: context.isEmbeddedInLabel,
- isReferenced: !1,
- recursion: !0
- }), display2 = isElement(child) ? getComputedStyle3(child).getPropertyValue("display") : "inline", separator = display2 !== "inline" ? " " : "";
- accumulatedText += "".concat(separator).concat(result).concat(separator);
- }), isElement(node2) && computedStyleSupportsPseudoElements) {
- var pseudoAfter = getComputedStyle3(node2, "::after"), afterContent = getTextualContent(pseudoAfter);
- accumulatedText = "".concat(accumulatedText, " ").concat(afterContent);
- }
- return accumulatedText.trim();
- }
- function useAttribute(element, attributeName) {
- var attribute = element.getAttributeNode(attributeName);
- return attribute !== null && !consultedNodes.has(attribute) && attribute.value.trim() !== "" ? (consultedNodes.add(attribute), attribute.value) : null;
- }
- function computeTooltipAttributeValue(node2) {
- return isElement(node2) ? useAttribute(node2, "title") : null;
- }
- function computeElementTextAlternative(node2) {
- if (!isElement(node2))
- return null;
- if (isHTMLFieldSetElement(node2)) {
- consultedNodes.add(node2);
- for (var children = arrayFrom(node2.childNodes), i = 0; i < children.length; i += 1) {
- var child = children[i];
- if (isHTMLLegendElement(child))
- return computeTextAlternative3(child, {
- isEmbeddedInLabel: !1,
- isReferenced: !1,
- recursion: !1
- });
- }
- } else if (isHTMLTableElement(node2)) {
- consultedNodes.add(node2);
- for (var _children = arrayFrom(node2.childNodes), _i = 0; _i < _children.length; _i += 1) {
- var _child = _children[_i];
- if (isHTMLTableCaptionElement(_child))
- return computeTextAlternative3(_child, {
- isEmbeddedInLabel: !1,
- isReferenced: !1,
- recursion: !1
- });
- }
- } else if (isSVGSVGElement(node2)) {
- consultedNodes.add(node2);
- for (var _children2 = arrayFrom(node2.childNodes), _i2 = 0; _i2 < _children2.length; _i2 += 1) {
- var _child2 = _children2[_i2];
- if (isSVGTitleElement(_child2))
- return _child2.textContent;
- }
- return null;
- } else if (getLocalName(node2) === "img" || getLocalName(node2) === "area") {
- var nameFromAlt = useAttribute(node2, "alt");
- if (nameFromAlt !== null)
- return nameFromAlt;
- } else if (isHTMLOptGroupElement(node2)) {
- var nameFromLabel = useAttribute(node2, "label");
- if (nameFromLabel !== null)
- return nameFromLabel;
- }
- if (isHTMLInputElement(node2) && (node2.type === "button" || node2.type === "submit" || node2.type === "reset")) {
- var nameFromValue = useAttribute(node2, "value");
- if (nameFromValue !== null)
- return nameFromValue;
- if (node2.type === "submit")
- return "Submit";
- if (node2.type === "reset")
- return "Reset";
- }
- var labels = getLabels(node2);
- if (labels !== null && labels.length !== 0)
- return consultedNodes.add(node2), arrayFrom(labels).map(function(element) {
- return computeTextAlternative3(element, {
- isEmbeddedInLabel: !0,
- isReferenced: !1,
- recursion: !0
- });
- }).filter(function(label) {
- return label.length > 0;
- }).join(" ");
- if (isHTMLInputElement(node2) && node2.type === "image") {
- var _nameFromAlt = useAttribute(node2, "alt");
- if (_nameFromAlt !== null)
- return _nameFromAlt;
- var nameFromTitle = useAttribute(node2, "title");
- return nameFromTitle !== null ? nameFromTitle : "Submit Query";
- }
- if (hasAnyConcreteRoles(node2, ["button"])) {
- var nameFromSubTree = computeMiscTextAlternative(node2, {
- isEmbeddedInLabel: !1,
- isReferenced: !1
- });
- if (nameFromSubTree !== "")
- return nameFromSubTree;
- }
- return null;
- }
- function computeTextAlternative3(current, context) {
- if (consultedNodes.has(current))
- return "";
- if (!hidden && isHidden(current, getComputedStyle3) && !context.isReferenced)
- return consultedNodes.add(current), "";
- var labelAttributeNode = isElement(current) ? current.getAttributeNode("aria-labelledby") : null, labelElements = labelAttributeNode !== null && !consultedNodes.has(labelAttributeNode) ? queryIdRefs(current, "aria-labelledby") : [];
- if (compute === "name" && !context.isReferenced && labelElements.length > 0)
- return consultedNodes.add(labelAttributeNode), labelElements.map(function(element) {
- return computeTextAlternative3(element, {
- isEmbeddedInLabel: context.isEmbeddedInLabel,
- isReferenced: !0,
- // this isn't recursion as specified, otherwise we would skip
- // `aria-label` in
- // <input id="myself" aria-label="foo" aria-labelledby="myself"
- recursion: !1
- });
- }).join(" ");
- var skipToStep2E = context.recursion && isControl(current) && compute === "name";
- if (!skipToStep2E) {
- var ariaLabel = (isElement(current) && current.getAttribute("aria-label") || "").trim();
- if (ariaLabel !== "" && compute === "name")
- return consultedNodes.add(current), ariaLabel;
- if (!isMarkedPresentational(current)) {
- var elementTextAlternative = computeElementTextAlternative(current);
- if (elementTextAlternative !== null)
- return consultedNodes.add(current), elementTextAlternative;
- }
- }
- if (hasAnyConcreteRoles(current, ["menu"]))
- return consultedNodes.add(current), "";
- if (skipToStep2E || context.isEmbeddedInLabel || context.isReferenced) {
- if (hasAnyConcreteRoles(current, ["combobox", "listbox"])) {
- consultedNodes.add(current);
- var selectedOptions = querySelectedOptions(current);
- return selectedOptions.length === 0 ? isHTMLInputElement(current) ? current.value : "" : arrayFrom(selectedOptions).map(function(selectedOption) {
- return computeTextAlternative3(selectedOption, {
- isEmbeddedInLabel: context.isEmbeddedInLabel,
- isReferenced: !1,
- recursion: !0
- });
- }).join(" ");
- }
- if (hasAbstractRole(current, "range"))
- return consultedNodes.add(current), current.hasAttribute("aria-valuetext") ? current.getAttribute("aria-valuetext") : current.hasAttribute("aria-valuenow") ? current.getAttribute("aria-valuenow") : current.getAttribute("value") || "";
- if (hasAnyConcreteRoles(current, ["textbox"]))
- return consultedNodes.add(current), getValueOfTextbox(current);
- }
- if (allowsNameFromContent(current) || isElement(current) && context.isReferenced || isNativeHostLanguageTextAlternativeElement(current) || isDescendantOfNativeHostLanguageTextAlternativeElement(current)) {
- var accumulatedText2F = computeMiscTextAlternative(current, {
- isEmbeddedInLabel: context.isEmbeddedInLabel,
- isReferenced: !1
- });
- if (accumulatedText2F !== "")
- return consultedNodes.add(current), accumulatedText2F;
- }
- if (current.nodeType === current.TEXT_NODE)
- return consultedNodes.add(current), current.textContent || "";
- if (context.recursion)
- return consultedNodes.add(current), computeMiscTextAlternative(current, {
- isEmbeddedInLabel: context.isEmbeddedInLabel,
- isReferenced: !1
- });
- var tooltipAttributeValue = computeTooltipAttributeValue(current);
- return tooltipAttributeValue !== null ? (consultedNodes.add(current), tooltipAttributeValue) : (consultedNodes.add(current), "");
- }
- return asFlatString(computeTextAlternative3(root2, {
- isEmbeddedInLabel: !1,
- // by spec computeAccessibleDescription starts with the referenced elements as roots
- isReferenced: compute === "description",
- recursion: !1
- }));
- }
-
- // ../../node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/accessible-description.mjs
- function _typeof3(o) {
- "@babel/helpers - typeof";
- return _typeof3 = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(o2) {
- return typeof o2;
- } : function(o2) {
- return o2 && typeof Symbol == "function" && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2;
- }, _typeof3(o);
- }
- function ownKeys3(e, r2) {
- var t = Object.keys(e);
- if (Object.getOwnPropertySymbols) {
- var o = Object.getOwnPropertySymbols(e);
- r2 && (o = o.filter(function(r3) {
- return Object.getOwnPropertyDescriptor(e, r3).enumerable;
- })), t.push.apply(t, o);
- }
- return t;
- }
- function _objectSpread3(e) {
- for (var r2 = 1; r2 < arguments.length; r2++) {
- var t = arguments[r2] != null ? arguments[r2] : {};
- r2 % 2 ? ownKeys3(Object(t), !0).forEach(function(r3) {
- _defineProperty3(e, r3, t[r3]);
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys3(Object(t)).forEach(function(r3) {
- Object.defineProperty(e, r3, Object.getOwnPropertyDescriptor(t, r3));
- });
- }
- return e;
- }
- function _defineProperty3(obj, key, value) {
- return key = _toPropertyKey2(key), key in obj ? Object.defineProperty(obj, key, { value, enumerable: !0, configurable: !0, writable: !0 }) : obj[key] = value, obj;
- }
- function _toPropertyKey2(arg) {
- var key = _toPrimitive2(arg, "string");
- return _typeof3(key) === "symbol" ? key : String(key);
- }
- function _toPrimitive2(input2, hint) {
- if (_typeof3(input2) !== "object" || input2 === null) return input2;
- var prim = input2[Symbol.toPrimitive];
- if (prim !== void 0) {
- var res = prim.call(input2, hint || "default");
- if (_typeof3(res) !== "object") return res;
- throw new TypeError("@@toPrimitive must return a primitive value.");
- }
- return (hint === "string" ? String : Number)(input2);
- }
- function computeAccessibleDescription(root2) {
- var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, description = queryIdRefs(root2, "aria-describedby").map(function(element) {
- return computeTextAlternative(element, _objectSpread3(_objectSpread3({}, options), {}, {
- compute: "description"
- }));
- }).join(" ");
- if (description === "") {
- var ariaDescription = root2.getAttribute("aria-description");
- description = ariaDescription === null ? "" : ariaDescription;
- }
- if (description === "") {
- var title = root2.getAttribute("title");
- description = title === null ? "" : title;
- }
- return description;
- }
-
- // ../../node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/accessible-name.mjs
- function prohibitsNaming(node2) {
- return hasAnyConcreteRoles(node2, ["caption", "code", "deletion", "emphasis", "generic", "insertion", "none", "paragraph", "presentation", "strong", "subscript", "superscript"]);
- }
- function computeAccessibleName(root2) {
- var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
- return prohibitsNaming(root2) ? "" : computeTextAlternative(root2, options);
- }
-
- // ../../node_modules/@testing-library/jest-dom/dist/matchers-35e4d3bd.mjs
- var import_aria_query = __toESM(require_lib2(), 1), import_picocolors2 = __toESM(require_picocolors_browser(), 1), import_css3 = __toESM(require_css_escape(), 1), GenericTypeError = class extends Error {
- constructor(expectedString, received, matcherFn, context) {
- super(), Error.captureStackTrace && Error.captureStackTrace(this, matcherFn);
- let withType = "";
- try {
- withType = context.utils.printWithType(
- "Received",
- received,
- context.utils.printReceived
- );
- } catch {
- }
- this.message = [
- context.utils.matcherHint(
- `${context.isNot ? ".not" : ""}.${matcherFn.name}`,
- "received",
- ""
- ),
- "",
- // eslint-disable-next-line new-cap
- `${context.utils.RECEIVED_COLOR(
- "received"
- )} value must ${expectedString}.`,
- withType
- ].join(`
- `);
- }
- }, HtmlElementTypeError = class extends GenericTypeError {
- constructor(...args) {
- super("be an HTMLElement or an SVGElement", ...args);
- }
- }, NodeTypeError = class extends GenericTypeError {
- constructor(...args) {
- super("be a Node", ...args);
- }
- };
- function checkHasWindow(htmlElement, ErrorClass, ...args) {
- if (!htmlElement || !htmlElement.ownerDocument || !htmlElement.ownerDocument.defaultView)
- throw new ErrorClass(htmlElement, ...args);
- }
- function checkNode(node2, ...args) {
- checkHasWindow(node2, NodeTypeError, ...args);
- let window2 = node2.ownerDocument.defaultView;
- if (!(node2 instanceof window2.Node))
- throw new NodeTypeError(node2, ...args);
- }
- function checkHtmlElement(htmlElement, ...args) {
- checkHasWindow(htmlElement, HtmlElementTypeError, ...args);
- let window2 = htmlElement.ownerDocument.defaultView;
- if (!(htmlElement instanceof window2.HTMLElement) && !(htmlElement instanceof window2.SVGElement))
- throw new HtmlElementTypeError(htmlElement, ...args);
- }
- var InvalidCSSError = class extends Error {
- constructor(received, matcherFn, context) {
- super(), Error.captureStackTrace && Error.captureStackTrace(this, matcherFn), this.message = [
- received.message,
- "",
- // eslint-disable-next-line new-cap
- context.utils.RECEIVED_COLOR("Failing css:"),
- // eslint-disable-next-line new-cap
- context.utils.RECEIVED_COLOR(`${received.css}`)
- ].join(`
- `);
- }
- };
- function parseCSS(css3, ...args) {
- let ast = $149c1bd638913645$export$98e6a39c04603d36(`selector { ${css3} }`, { silent: !0 }).stylesheet;
- if (ast.parsingErrors && ast.parsingErrors.length > 0) {
- let { reason, line: line2 } = ast.parsingErrors[0];
- throw new InvalidCSSError(
- {
- css: css3,
- message: `Syntax error parsing expected css: ${reason} on line: ${line2}`
- },
- ...args
- );
- }
- return ast.rules[0].declarations.filter((d) => d.type === "declaration").reduce(
- (obj, { property, value }) => Object.assign(obj, { [property]: value }),
- {}
- );
- }
- function display(context, value) {
- return typeof value == "string" ? value : context.utils.stringify(value);
- }
- function getMessage3(context, matcher, expectedLabel, expectedValue, receivedLabel, receivedValue) {
- return [
- `${matcher}
- `,
- // eslint-disable-next-line new-cap
- `${expectedLabel}:
- ${context.utils.EXPECTED_COLOR(
- (0, import_redent.default)(display(context, expectedValue), 2)
- )}`,
- // eslint-disable-next-line new-cap
- `${receivedLabel}:
- ${context.utils.RECEIVED_COLOR(
- (0, import_redent.default)(display(context, receivedValue), 2)
- )}`
- ].join(`
- `);
- }
- function matches2(textToMatch, matcher) {
- return matcher instanceof RegExp ? matcher.test(textToMatch) : textToMatch.includes(String(matcher));
- }
- function deprecate2(name, replacementText) {
- console.warn(
- `Warning: ${name} has been deprecated and will be removed in future updates.`,
- replacementText
- );
- }
- function normalize(text) {
- return text.replace(/\s+/g, " ").trim();
- }
- function getTag2(element) {
- return element.tagName && element.tagName.toLowerCase();
- }
- function getSelectValue({ multiple, options }) {
- let selectedOptions = [...options].filter((option) => option.selected);
- if (multiple)
- return [...selectedOptions].map((opt) => opt.value);
- if (selectedOptions.length !== 0)
- return selectedOptions[0].value;
- }
- function getInputValue(inputElement) {
- switch (inputElement.type) {
- case "number":
- return inputElement.value === "" ? null : Number(inputElement.value);
- case "checkbox":
- return inputElement.checked;
- default:
- return inputElement.value;
- }
- }
- var rolesSupportingValues = ["meter", "progressbar", "slider", "spinbutton"];
- function getAccessibleValue(element) {
- if (rolesSupportingValues.includes(element.getAttribute("role")))
- return Number(element.getAttribute("aria-valuenow"));
- }
- function getSingleElementValue(element) {
- if (element)
- switch (element.tagName.toLowerCase()) {
- case "input":
- return getInputValue(element);
- case "select":
- return getSelectValue(element);
- default:
- return element.value ?? getAccessibleValue(element);
- }
- }
- function toSentence(array, { wordConnector = ", ", lastWordConnector = " and " } = {}) {
- return [array.slice(0, -1).join(wordConnector), array[array.length - 1]].join(
- array.length > 1 ? lastWordConnector : ""
- );
- }
- function compareAsSet(val1, val2) {
- return Array.isArray(val1) && Array.isArray(val2) ? [...new Set(val1)].every((v) => new Set(val2).has(v)) : val1 === val2;
- }
- function toBeInTheDOM(element, container) {
- return deprecate2(
- "toBeInTheDOM",
- "Please use toBeInTheDocument for searching the entire document and toContainElement for searching a specific container."
- ), element && checkHtmlElement(element, toBeInTheDOM, this), container && checkHtmlElement(container, toBeInTheDOM, this), {
- pass: container ? container.contains(element) : !!element,
- message: () => [
- this.utils.matcherHint(
- `${this.isNot ? ".not" : ""}.toBeInTheDOM`,
- "element",
- ""
- ),
- "",
- "Received:",
- ` ${this.utils.printReceived(
- element && element.cloneNode(!1)
- )}`
- ].join(`
- `)
- };
- }
- function toBeInTheDocument(element) {
- (element !== null || !this.isNot) && checkHtmlElement(element, toBeInTheDocument, this);
- let pass = element === null ? !1 : element.ownerDocument === element.getRootNode({ composed: !0 }), errorFound = () => `expected document not to contain element, found ${this.utils.stringify(
- element.cloneNode(!0)
- )} instead`, errorNotFound = () => "element could not be found in the document";
- return {
- pass,
- message: () => [
- this.utils.matcherHint(
- `${this.isNot ? ".not" : ""}.toBeInTheDocument`,
- "element",
- ""
- ),
- "",
- // eslint-disable-next-line new-cap
- this.utils.RECEIVED_COLOR(this.isNot ? errorFound() : errorNotFound())
- ].join(`
- `)
- };
- }
- function toBeEmpty(element) {
- return deprecate2(
- "toBeEmpty",
- "Please use instead toBeEmptyDOMElement for finding empty nodes in the DOM."
- ), checkHtmlElement(element, toBeEmpty, this), {
- pass: element.innerHTML === "",
- message: () => [
- this.utils.matcherHint(
- `${this.isNot ? ".not" : ""}.toBeEmpty`,
- "element",
- ""
- ),
- "",
- "Received:",
- ` ${this.utils.printReceived(element.innerHTML)}`
- ].join(`
- `)
- };
- }
- function toBeEmptyDOMElement(element) {
- return checkHtmlElement(element, toBeEmptyDOMElement, this), {
- pass: isEmptyElement(element),
- message: () => [
- this.utils.matcherHint(
- `${this.isNot ? ".not" : ""}.toBeEmptyDOMElement`,
- "element",
- ""
- ),
- "",
- "Received:",
- ` ${this.utils.printReceived(element.innerHTML)}`
- ].join(`
- `)
- };
- }
- function isEmptyElement(element) {
- return [...element.childNodes].filter((node2) => node2.nodeType !== 8).length === 0;
- }
- function toContainElement(container, element) {
- return checkHtmlElement(container, toContainElement, this), element !== null && checkHtmlElement(element, toContainElement, this), {
- pass: container.contains(element),
- message: () => [
- this.utils.matcherHint(
- `${this.isNot ? ".not" : ""}.toContainElement`,
- "element",
- "element"
- ),
- "",
- // eslint-disable-next-line new-cap
- this.utils.RECEIVED_COLOR(`${this.utils.stringify(
- container.cloneNode(!1)
- )} ${this.isNot ? "contains:" : "does not contain:"} ${this.utils.stringify(element && element.cloneNode(!1))}
- `)
- ].join(`
- `)
- };
- }
- function getNormalizedHtml(container, htmlText) {
- let div = container.ownerDocument.createElement("div");
- return div.innerHTML = htmlText, div.innerHTML;
- }
- function toContainHTML(container, htmlText) {
- if (checkHtmlElement(container, toContainHTML, this), typeof htmlText != "string")
- throw new Error(`.toContainHTML() expects a string value, got ${htmlText}`);
- return {
- pass: container.outerHTML.includes(getNormalizedHtml(container, htmlText)),
- message: () => [
- this.utils.matcherHint(
- `${this.isNot ? ".not" : ""}.toContainHTML`,
- "element",
- ""
- ),
- "Expected:",
- // eslint-disable-next-line new-cap
- ` ${this.utils.EXPECTED_COLOR(htmlText)}`,
- "Received:",
- ` ${this.utils.printReceived(container.cloneNode(!0))}`
- ].join(`
- `)
- };
- }
- function toHaveTextContent(node2, checkWith, options = { normalizeWhitespace: !0 }) {
- checkNode(node2, toHaveTextContent, this);
- let textContent = options.normalizeWhitespace ? normalize(node2.textContent) : node2.textContent.replace(/\u00a0/g, " "), checkingWithEmptyString = textContent !== "" && checkWith === "";
- return {
- pass: !checkingWithEmptyString && matches2(textContent, checkWith),
- message: () => {
- let to = this.isNot ? "not to" : "to";
- return getMessage3(
- this,
- this.utils.matcherHint(
- `${this.isNot ? ".not" : ""}.toHaveTextContent`,
- "element",
- ""
- ),
- checkingWithEmptyString ? "Checking with empty string will always match, use .toBeEmptyDOMElement() instead" : `Expected element ${to} have text content`,
- checkWith,
- "Received",
- textContent
- );
- }
- };
- }
- function toHaveAccessibleDescription(htmlElement, expectedAccessibleDescription) {
- checkHtmlElement(htmlElement, toHaveAccessibleDescription, this);
- let actualAccessibleDescription = computeAccessibleDescription(htmlElement), missingExpectedValue = arguments.length === 1, pass = !1;
- return missingExpectedValue ? pass = actualAccessibleDescription !== "" : pass = expectedAccessibleDescription instanceof RegExp ? expectedAccessibleDescription.test(actualAccessibleDescription) : this.equals(
- actualAccessibleDescription,
- expectedAccessibleDescription
- ), {
- pass,
- message: () => {
- let to = this.isNot ? "not to" : "to";
- return getMessage3(
- this,
- this.utils.matcherHint(
- `${this.isNot ? ".not" : ""}.${toHaveAccessibleDescription.name}`,
- "element",
- ""
- ),
- `Expected element ${to} have accessible description`,
- expectedAccessibleDescription,
- "Received",
- actualAccessibleDescription
- );
- }
- };
- }
- var ariaInvalidName = "aria-invalid", validStates = ["false"];
- function toHaveAccessibleErrorMessage(htmlElement, expectedAccessibleErrorMessage) {
- checkHtmlElement(htmlElement, toHaveAccessibleErrorMessage, this);
- let to = this.isNot ? "not to" : "to", method = this.isNot ? ".not.toHaveAccessibleErrorMessage" : ".toHaveAccessibleErrorMessage", errormessageId = htmlElement.getAttribute("aria-errormessage");
- if (!!errormessageId && /\s+/.test(errormessageId))
- return {
- pass: !1,
- message: () => getMessage3(
- this,
- this.utils.matcherHint(method, "element"),
- "Expected element's `aria-errormessage` attribute to be empty or a single, valid ID",
- "",
- "Received",
- `aria-errormessage="${errormessageId}"`
- )
- };
- let ariaInvalidVal = htmlElement.getAttribute(ariaInvalidName);
- if (!htmlElement.hasAttribute(ariaInvalidName) || validStates.includes(ariaInvalidVal))
- return {
- pass: !1,
- message: () => getMessage3(
- this,
- this.utils.matcherHint(method, "element"),
- "Expected element to be marked as invalid with attribute",
- `${ariaInvalidName}="${String(!0)}"`,
- "Received",
- htmlElement.hasAttribute("aria-invalid") ? `${ariaInvalidName}="${htmlElement.getAttribute(ariaInvalidName)}` : null
- )
- };
- let error = normalize(
- htmlElement.ownerDocument.getElementById(errormessageId)?.textContent ?? ""
- );
- return {
- pass: expectedAccessibleErrorMessage === void 0 ? !!error : expectedAccessibleErrorMessage instanceof RegExp ? expectedAccessibleErrorMessage.test(error) : this.equals(error, expectedAccessibleErrorMessage),
- message: () => getMessage3(
- this,
- this.utils.matcherHint(method, "element"),
- `Expected element ${to} have accessible error message`,
- expectedAccessibleErrorMessage ?? "",
- "Received",
- error
- )
- };
- }
- var elementRoleList = buildElementRoleList(import_aria_query.elementRoles);
- function toHaveRole(htmlElement, expectedRole) {
- checkHtmlElement(htmlElement, toHaveRole, this);
- let actualRoles = getExplicitOrImplicitRoles(htmlElement);
- return {
- pass: actualRoles.some((el) => el === expectedRole),
- message: () => {
- let to = this.isNot ? "not to" : "to";
- return getMessage3(
- this,
- this.utils.matcherHint(
- `${this.isNot ? ".not" : ""}.${toHaveRole.name}`,
- "element",
- ""
- ),
- `Expected element ${to} have role`,
- expectedRole,
- "Received",
- actualRoles.join(", ")
- );
- }
- };
- }
- function getExplicitOrImplicitRoles(htmlElement) {
- return htmlElement.hasAttribute("role") ? htmlElement.getAttribute("role").split(" ").filter(Boolean) : getImplicitAriaRoles(htmlElement);
- }
- function getImplicitAriaRoles(currentNode) {
- for (let { match: match3, roles: roles3 } of elementRoleList)
- if (match3(currentNode))
- return [...roles3];
- return [];
- }
- function buildElementRoleList(elementRolesMap) {
- function makeElementSelector({ name, attributes }) {
- return `${name}${attributes.map(({ name: attributeName, value, constraints = [] }) => constraints.indexOf("undefined") !== -1 ? `:not([${attributeName}])` : value ? `[${attributeName}="${value}"]` : `[${attributeName}]`).join("")}`;
- }
- function getSelectorSpecificity({ attributes = [] }) {
- return attributes.length;
- }
- function bySelectorSpecificity({ specificity: leftSpecificity }, { specificity: rightSpecificity }) {
- return rightSpecificity - leftSpecificity;
- }
- function match3(element) {
- let { attributes = [] } = element, typeTextIndex = attributes.findIndex(
- (attribute) => attribute.value && attribute.name === "type" && attribute.value === "text"
- );
- typeTextIndex >= 0 && (attributes = [
- ...attributes.slice(0, typeTextIndex),
- ...attributes.slice(typeTextIndex + 1)
- ]);
- let selector = makeElementSelector({ ...element, attributes });
- return (node2) => typeTextIndex >= 0 && node2.type !== "text" ? !1 : node2.matches(selector);
- }
- let result = [];
- for (let [element, roles3] of elementRolesMap.entries())
- result = [
- ...result,
- {
- match: match3(element),
- roles: Array.from(roles3),
- specificity: getSelectorSpecificity(element)
- }
- ];
- return result.sort(bySelectorSpecificity);
- }
- function toHaveAccessibleName(htmlElement, expectedAccessibleName) {
- checkHtmlElement(htmlElement, toHaveAccessibleName, this);
- let actualAccessibleName = computeAccessibleName(htmlElement), missingExpectedValue = arguments.length === 1, pass = !1;
- return missingExpectedValue ? pass = actualAccessibleName !== "" : pass = expectedAccessibleName instanceof RegExp ? expectedAccessibleName.test(actualAccessibleName) : this.equals(actualAccessibleName, expectedAccessibleName), {
- pass,
- message: () => {
- let to = this.isNot ? "not to" : "to";
- return getMessage3(
- this,
- this.utils.matcherHint(
- `${this.isNot ? ".not" : ""}.${toHaveAccessibleName.name}`,
- "element",
- ""
- ),
- `Expected element ${to} have accessible name`,
- expectedAccessibleName,
- "Received",
- actualAccessibleName
- );
- }
- };
- }
- function printAttribute(stringify8, name, value) {
- return value === void 0 ? name : `${name}=${stringify8(value)}`;
- }
- function getAttributeComment(stringify8, name, value) {
- return value === void 0 ? `element.hasAttribute(${stringify8(name)})` : `element.getAttribute(${stringify8(name)}) === ${stringify8(value)}`;
- }
- function toHaveAttribute(htmlElement, name, expectedValue) {
- checkHtmlElement(htmlElement, toHaveAttribute, this);
- let isExpectedValuePresent = expectedValue !== void 0, hasAttribute = htmlElement.hasAttribute(name), receivedValue = htmlElement.getAttribute(name);
- return {
- pass: isExpectedValuePresent ? hasAttribute && this.equals(receivedValue, expectedValue) : hasAttribute,
- message: () => {
- let to = this.isNot ? "not to" : "to", receivedAttribute = hasAttribute ? printAttribute(this.utils.stringify, name, receivedValue) : null, matcher = this.utils.matcherHint(
- `${this.isNot ? ".not" : ""}.toHaveAttribute`,
- "element",
- this.utils.printExpected(name),
- {
- secondArgument: isExpectedValuePresent ? this.utils.printExpected(expectedValue) : void 0,
- comment: getAttributeComment(
- this.utils.stringify,
- name,
- expectedValue
- )
- }
- );
- return getMessage3(
- this,
- matcher,
- `Expected the element ${to} have attribute`,
- printAttribute(this.utils.stringify, name, expectedValue),
- "Received",
- receivedAttribute
- );
- }
- };
- }
- function getExpectedClassNamesAndOptions(params) {
- let lastParam = params.pop(), expectedClassNames, options;
- return typeof lastParam == "object" && !(lastParam instanceof RegExp) ? (expectedClassNames = params, options = lastParam) : (expectedClassNames = params.concat(lastParam), options = { exact: !1 }), { expectedClassNames, options };
- }
- function splitClassNames(str2) {
- return str2 ? str2.split(/\s+/).filter((s3) => s3.length > 0) : [];
- }
- function isSubset$1(subset, superset) {
- return subset.every(
- (strOrRegexp) => typeof strOrRegexp == "string" ? superset.includes(strOrRegexp) : superset.some((className) => strOrRegexp.test(className))
- );
- }
- function toHaveClass(htmlElement, ...params) {
- checkHtmlElement(htmlElement, toHaveClass, this);
- let { expectedClassNames, options } = getExpectedClassNamesAndOptions(params), received = splitClassNames(htmlElement.getAttribute("class")), expected = expectedClassNames.reduce(
- (acc, className) => acc.concat(
- typeof className == "string" || !className ? splitClassNames(className) : className
- ),
- []
- ), hasRegExp = expected.some((className) => className instanceof RegExp);
- if (options.exact && hasRegExp)
- throw new Error("Exact option does not support RegExp expected class names");
- return options.exact ? {
- pass: isSubset$1(expected, received) && expected.length === received.length,
- message: () => {
- let to = this.isNot ? "not to" : "to";
- return getMessage3(
- this,
- this.utils.matcherHint(
- `${this.isNot ? ".not" : ""}.toHaveClass`,
- "element",
- this.utils.printExpected(expected.join(" "))
- ),
- `Expected the element ${to} have EXACTLY defined classes`,
- expected.join(" "),
- "Received",
- received.join(" ")
- );
- }
- } : expected.length > 0 ? {
- pass: isSubset$1(expected, received),
- message: () => {
- let to = this.isNot ? "not to" : "to";
- return getMessage3(
- this,
- this.utils.matcherHint(
- `${this.isNot ? ".not" : ""}.toHaveClass`,
- "element",
- this.utils.printExpected(expected.join(" "))
- ),
- `Expected the element ${to} have class`,
- expected.join(" "),
- "Received",
- received.join(" ")
- );
- }
- } : {
- pass: this.isNot ? received.length > 0 : !1,
- message: () => this.isNot ? getMessage3(
- this,
- this.utils.matcherHint(".not.toHaveClass", "element", ""),
- "Expected the element to have classes",
- "(none)",
- "Received",
- received.join(" ")
- ) : [
- this.utils.matcherHint(".toHaveClass", "element"),
- "At least one expected class must be provided."
- ].join(`
- `)
- };
- }
- function getStyleDeclaration(document13, css3) {
- let styles4 = {}, copy5 = document13.createElement("div");
- return Object.keys(css3).forEach((property) => {
- copy5.style[property] = css3[property], styles4[property] = copy5.style[property];
- }), styles4;
- }
- function isSubset(styles4, computedStyle) {
- return !!Object.keys(styles4).length && Object.entries(styles4).every(([prop, value]) => {
- let isCustomProperty3 = prop.startsWith("--"), spellingVariants = [prop];
- return isCustomProperty3 || spellingVariants.push(prop.toLowerCase()), spellingVariants.some(
- (name) => computedStyle[name] === value || computedStyle.getPropertyValue(name) === value
- );
- });
- }
- function printoutStyles(styles4) {
- return Object.keys(styles4).sort().map((prop) => `${prop}: ${styles4[prop]};`).join(`
- `);
- }
- function expectedDiff(diffFn, expected, computedStyles) {
- let received = Array.from(computedStyles).filter((prop) => expected[prop] !== void 0).reduce(
- (obj, prop) => Object.assign(obj, { [prop]: computedStyles.getPropertyValue(prop) }),
- {}
- );
- return diffFn(printoutStyles(expected), printoutStyles(received)).replace(`${import_picocolors2.default.red("+ Received")}
- `, "");
- }
- function toHaveStyle(htmlElement, css3) {
- checkHtmlElement(htmlElement, toHaveStyle, this);
- let parsedCSS = typeof css3 == "object" ? css3 : parseCSS(css3, toHaveStyle, this), { getComputedStyle: getComputedStyle3 } = htmlElement.ownerDocument.defaultView, expected = getStyleDeclaration(htmlElement.ownerDocument, parsedCSS), received = getComputedStyle3(htmlElement);
- return {
- pass: isSubset(expected, received),
- message: () => {
- let matcher = `${this.isNot ? ".not" : ""}.toHaveStyle`;
- return [
- this.utils.matcherHint(matcher, "element", ""),
- expectedDiff(this.utils.diff, expected, received)
- ].join(`
-
- `);
- }
- };
- }
- function toHaveFocus(element) {
- return checkHtmlElement(element, toHaveFocus, this), {
- pass: element.ownerDocument.activeElement === element,
- message: () => [
- this.utils.matcherHint(
- `${this.isNot ? ".not" : ""}.toHaveFocus`,
- "element",
- ""
- ),
- "",
- ...this.isNot ? [
- "Received element is focused:",
- ` ${this.utils.printReceived(element)}`
- ] : [
- "Expected element with focus:",
- ` ${this.utils.printExpected(element)}`,
- "Received element with focus:",
- ` ${this.utils.printReceived(
- element.ownerDocument.activeElement
- )}`
- ]
- ].join(`
- `)
- };
- }
- function getMultiElementValue(elements) {
- let types = [...new Set(elements.map((element) => element.type))];
- if (types.length !== 1)
- throw new Error(
- "Multiple form elements with the same name must be of the same type"
- );
- switch (types[0]) {
- case "radio": {
- let theChosenOne = elements.find((radio) => radio.checked);
- return theChosenOne ? theChosenOne.value : void 0;
- }
- case "checkbox":
- return elements.filter((checkbox) => checkbox.checked).map((checkbox) => checkbox.value);
- default:
- return elements.map((element) => element.value);
- }
- }
- function getFormValue(container, name) {
- let elements = [...container.querySelectorAll(`[name="${(0, import_css3.default)(name)}"]`)];
- if (elements.length !== 0)
- switch (elements.length) {
- case 1:
- return getSingleElementValue(elements[0]);
- default:
- return getMultiElementValue(elements);
- }
- }
- function getPureName(name) {
- return /\[\]$/.test(name) ? name.slice(0, -2) : name;
- }
- function getAllFormValues(container) {
- return Array.from(container.elements).map((element) => element.name).reduce(
- (obj, name) => ({
- ...obj,
- [getPureName(name)]: getFormValue(container, name)
- }),
- {}
- );
- }
- function toHaveFormValues(formElement, expectedValues) {
- if (checkHtmlElement(formElement, toHaveFormValues, this), !formElement.elements)
- throw new Error("toHaveFormValues must be called on a form or a fieldset");
- let formValues = getAllFormValues(formElement);
- return {
- pass: Object.entries(expectedValues).every(
- ([name, expectedValue]) => compareAsSet(formValues[name], expectedValue)
- ),
- message: () => {
- let to = this.isNot ? "not to" : "to", matcher = `${this.isNot ? ".not" : ""}.toHaveFormValues`, commonKeyValues = Object.keys(formValues).filter((key) => expectedValues.hasOwnProperty(key)).reduce((obj, key) => ({ ...obj, [key]: formValues[key] }), {});
- return [
- this.utils.matcherHint(matcher, "element", ""),
- `Expected the element ${to} have form values`,
- this.utils.diff(expectedValues, commonKeyValues)
- ].join(`
-
- `);
- }
- };
- }
- function isStyleVisible(element) {
- let { getComputedStyle: getComputedStyle3 } = element.ownerDocument.defaultView, { display: display2, visibility, opacity } = getComputedStyle3(element);
- return display2 !== "none" && visibility !== "hidden" && visibility !== "collapse" && opacity !== "0" && opacity !== 0;
- }
- function isAttributeVisible(element, previousElement) {
- let detailsVisibility;
- return previousElement ? detailsVisibility = element.nodeName === "DETAILS" && previousElement.nodeName !== "SUMMARY" ? element.hasAttribute("open") : !0 : detailsVisibility = element.nodeName === "DETAILS" ? element.hasAttribute("open") : !0, !element.hasAttribute("hidden") && detailsVisibility;
- }
- function isElementVisible(element, previousElement) {
- return isStyleVisible(element) && isAttributeVisible(element, previousElement) && (!element.parentElement || isElementVisible(element.parentElement, element));
- }
- function toBeVisible(element) {
- checkHtmlElement(element, toBeVisible, this);
- let isInDocument = element.ownerDocument === element.getRootNode({ composed: !0 }), isVisible2 = isInDocument && isElementVisible(element);
- return {
- pass: isVisible2,
- message: () => {
- let is = isVisible2 ? "is" : "is not";
- return [
- this.utils.matcherHint(
- `${this.isNot ? ".not" : ""}.toBeVisible`,
- "element",
- ""
- ),
- "",
- `Received element ${is} visible${isInDocument ? "" : " (element is not in the document)"}:`,
- ` ${this.utils.printReceived(element.cloneNode(!1))}`
- ].join(`
- `);
- }
- };
- }
- var FORM_TAGS$2 = [
- "fieldset",
- "input",
- "select",
- "optgroup",
- "option",
- "button",
- "textarea"
- ];
- function isFirstLegendChildOfFieldset(element, parent) {
- return getTag2(element) === "legend" && getTag2(parent) === "fieldset" && element.isSameNode(
- Array.from(parent.children).find((child) => getTag2(child) === "legend")
- );
- }
- function isElementDisabledByParent(element, parent) {
- return isElementDisabled(parent) && !isFirstLegendChildOfFieldset(element, parent);
- }
- function isCustomElement(tag) {
- return tag.includes("-");
- }
- function canElementBeDisabled(element) {
- let tag = getTag2(element);
- return FORM_TAGS$2.includes(tag) || isCustomElement(tag);
- }
- function isElementDisabled(element) {
- return canElementBeDisabled(element) && element.hasAttribute("disabled");
- }
- function isAncestorDisabled(element) {
- let parent = element.parentElement;
- return !!parent && (isElementDisabledByParent(element, parent) || isAncestorDisabled(parent));
- }
- function isElementOrAncestorDisabled(element) {
- return canElementBeDisabled(element) && (isElementDisabled(element) || isAncestorDisabled(element));
- }
- function toBeDisabled(element) {
- checkHtmlElement(element, toBeDisabled, this);
- let isDisabled3 = isElementOrAncestorDisabled(element);
- return {
- pass: isDisabled3,
- message: () => {
- let is = isDisabled3 ? "is" : "is not";
- return [
- this.utils.matcherHint(
- `${this.isNot ? ".not" : ""}.toBeDisabled`,
- "element",
- ""
- ),
- "",
- `Received element ${is} disabled:`,
- ` ${this.utils.printReceived(element.cloneNode(!1))}`
- ].join(`
- `);
- }
- };
- }
- function toBeEnabled(element) {
- checkHtmlElement(element, toBeEnabled, this);
- let isEnabled = !isElementOrAncestorDisabled(element);
- return {
- pass: isEnabled,
- message: () => {
- let is = isEnabled ? "is" : "is not";
- return [
- this.utils.matcherHint(
- `${this.isNot ? ".not" : ""}.toBeEnabled`,
- "element",
- ""
- ),
- "",
- `Received element ${is} enabled:`,
- ` ${this.utils.printReceived(element.cloneNode(!1))}`
- ].join(`
- `);
- }
- };
- }
- var FORM_TAGS$1 = ["select", "textarea"], ARIA_FORM_TAGS = ["input", "select", "textarea"], UNSUPPORTED_INPUT_TYPES = [
- "color",
- "hidden",
- "range",
- "submit",
- "image",
- "reset"
- ], SUPPORTED_ARIA_ROLES = [
- "checkbox",
- "combobox",
- "gridcell",
- "listbox",
- "radiogroup",
- "spinbutton",
- "textbox",
- "tree"
- ];
- function isRequiredOnFormTagsExceptInput(element) {
- return FORM_TAGS$1.includes(getTag2(element)) && element.hasAttribute("required");
- }
- function isRequiredOnSupportedInput(element) {
- return getTag2(element) === "input" && element.hasAttribute("required") && (element.hasAttribute("type") && !UNSUPPORTED_INPUT_TYPES.includes(element.getAttribute("type")) || !element.hasAttribute("type"));
- }
- function isElementRequiredByARIA(element) {
- return element.hasAttribute("aria-required") && element.getAttribute("aria-required") === "true" && (ARIA_FORM_TAGS.includes(getTag2(element)) || element.hasAttribute("role") && SUPPORTED_ARIA_ROLES.includes(element.getAttribute("role")));
- }
- function toBeRequired(element) {
- checkHtmlElement(element, toBeRequired, this);
- let isRequired = isRequiredOnFormTagsExceptInput(element) || isRequiredOnSupportedInput(element) || isElementRequiredByARIA(element);
- return {
- pass: isRequired,
- message: () => {
- let is = isRequired ? "is" : "is not";
- return [
- this.utils.matcherHint(
- `${this.isNot ? ".not" : ""}.toBeRequired`,
- "element",
- ""
- ),
- "",
- `Received element ${is} required:`,
- ` ${this.utils.printReceived(element.cloneNode(!1))}`
- ].join(`
- `);
- }
- };
- }
- var FORM_TAGS = ["form", "input", "select", "textarea"];
- function isElementHavingAriaInvalid(element) {
- return element.hasAttribute("aria-invalid") && element.getAttribute("aria-invalid") !== "false";
- }
- function isSupportsValidityMethod(element) {
- return FORM_TAGS.includes(getTag2(element));
- }
- function isElementInvalid(element) {
- let isHaveAriaInvalid = isElementHavingAriaInvalid(element);
- return isSupportsValidityMethod(element) ? isHaveAriaInvalid || !element.checkValidity() : isHaveAriaInvalid;
- }
- function toBeInvalid(element) {
- checkHtmlElement(element, toBeInvalid, this);
- let isInvalid = isElementInvalid(element);
- return {
- pass: isInvalid,
- message: () => {
- let is = isInvalid ? "is" : "is not";
- return [
- this.utils.matcherHint(
- `${this.isNot ? ".not" : ""}.toBeInvalid`,
- "element",
- ""
- ),
- "",
- `Received element ${is} currently invalid:`,
- ` ${this.utils.printReceived(element.cloneNode(!1))}`
- ].join(`
- `);
- }
- };
- }
- function toBeValid(element) {
- checkHtmlElement(element, toBeValid, this);
- let isValid = !isElementInvalid(element);
- return {
- pass: isValid,
- message: () => {
- let is = isValid ? "is" : "is not";
- return [
- this.utils.matcherHint(
- `${this.isNot ? ".not" : ""}.toBeValid`,
- "element",
- ""
- ),
- "",
- `Received element ${is} currently valid:`,
- ` ${this.utils.printReceived(element.cloneNode(!1))}`
- ].join(`
- `);
- }
- };
- }
- function toHaveValue(htmlElement, expectedValue) {
- if (checkHtmlElement(htmlElement, toHaveValue, this), htmlElement.tagName.toLowerCase() === "input" && ["checkbox", "radio"].includes(htmlElement.type))
- throw new Error(
- "input with type=checkbox or type=radio cannot be used with .toHaveValue(). Use .toBeChecked() for type=checkbox or .toHaveFormValues() instead"
- );
- let receivedValue = getSingleElementValue(htmlElement), expectsValue = expectedValue !== void 0, expectedTypedValue = expectedValue, receivedTypedValue = receivedValue;
- return expectedValue == receivedValue && expectedValue !== receivedValue && (expectedTypedValue = `${expectedValue} (${typeof expectedValue})`, receivedTypedValue = `${receivedValue} (${typeof receivedValue})`), {
- pass: expectsValue ? compareAsSet(receivedValue, expectedValue) : !!receivedValue,
- message: () => {
- let to = this.isNot ? "not to" : "to", matcher = this.utils.matcherHint(
- `${this.isNot ? ".not" : ""}.toHaveValue`,
- "element",
- expectedValue
- );
- return getMessage3(
- this,
- matcher,
- `Expected the element ${to} have value`,
- expectsValue ? expectedTypedValue : "(any)",
- "Received",
- receivedTypedValue
- );
- }
- };
- }
- function toHaveDisplayValue(htmlElement, expectedValue) {
- checkHtmlElement(htmlElement, toHaveDisplayValue, this);
- let tagName = htmlElement.tagName.toLowerCase();
- if (!["select", "input", "textarea"].includes(tagName))
- throw new Error(
- ".toHaveDisplayValue() currently supports only input, textarea or select elements, try with another matcher instead."
- );
- if (tagName === "input" && ["radio", "checkbox"].includes(htmlElement.type))
- throw new Error(
- `.toHaveDisplayValue() currently does not support input[type="${htmlElement.type}"], try with another matcher instead.`
- );
- let values = getValues(tagName, htmlElement), expectedValues = getExpectedValues(expectedValue), numberOfMatchesWithValues = expectedValues.filter(
- (expected) => values.some(
- (value) => expected instanceof RegExp ? expected.test(value) : this.equals(value, String(expected))
- )
- ).length, matchedWithAllValues = numberOfMatchesWithValues === values.length, matchedWithAllExpectedValues = numberOfMatchesWithValues === expectedValues.length;
- return {
- pass: matchedWithAllValues && matchedWithAllExpectedValues,
- message: () => getMessage3(
- this,
- this.utils.matcherHint(
- `${this.isNot ? ".not" : ""}.toHaveDisplayValue`,
- "element",
- ""
- ),
- `Expected element ${this.isNot ? "not " : ""}to have display value`,
- expectedValue,
- "Received",
- values
- )
- };
- }
- function getValues(tagName, htmlElement) {
- return tagName === "select" ? Array.from(htmlElement).filter((option) => option.selected).map((option) => option.textContent) : [htmlElement.value];
- }
- function getExpectedValues(expectedValue) {
- return expectedValue instanceof Array ? expectedValue : [expectedValue];
- }
- function toBeChecked(element) {
- checkHtmlElement(element, toBeChecked, this);
- let isValidInput = () => element.tagName.toLowerCase() === "input" && ["checkbox", "radio"].includes(element.type), isValidAriaElement = () => roleSupportsChecked(element.getAttribute("role")) && ["true", "false"].includes(element.getAttribute("aria-checked"));
- if (!isValidInput() && !isValidAriaElement())
- return {
- pass: !1,
- message: () => `only inputs with type="checkbox" or type="radio" or elements with ${supportedRolesSentence()} and a valid aria-checked attribute can be used with .toBeChecked(). Use .toHaveValue() instead`
- };
- let isChecked = () => isValidInput() ? element.checked : element.getAttribute("aria-checked") === "true";
- return {
- pass: isChecked(),
- message: () => {
- let is = isChecked() ? "is" : "is not";
- return [
- this.utils.matcherHint(
- `${this.isNot ? ".not" : ""}.toBeChecked`,
- "element",
- ""
- ),
- "",
- `Received element ${is} checked:`,
- ` ${this.utils.printReceived(element.cloneNode(!1))}`
- ].join(`
- `);
- }
- };
- }
- function supportedRolesSentence() {
- return toSentence(
- supportedRoles().map((role) => `role="${role}"`),
- { lastWordConnector: " or " }
- );
- }
- function supportedRoles() {
- return import_aria_query.roles.keys().filter(roleSupportsChecked);
- }
- function roleSupportsChecked(role) {
- return import_aria_query.roles.get(role)?.props["aria-checked"] !== void 0;
- }
- function toBePartiallyChecked(element) {
- checkHtmlElement(element, toBePartiallyChecked, this);
- let isValidInput = () => element.tagName.toLowerCase() === "input" && element.type === "checkbox", isValidAriaElement = () => element.getAttribute("role") === "checkbox";
- if (!isValidInput() && !isValidAriaElement())
- return {
- pass: !1,
- message: () => 'only inputs with type="checkbox" or elements with role="checkbox" and a valid aria-checked attribute can be used with .toBePartiallyChecked(). Use .toHaveValue() instead'
- };
- let isPartiallyChecked = () => {
- let isAriaMixed = element.getAttribute("aria-checked") === "mixed";
- return isValidInput() && element.indeterminate || isAriaMixed;
- };
- return {
- pass: isPartiallyChecked(),
- message: () => {
- let is = isPartiallyChecked() ? "is" : "is not";
- return [
- this.utils.matcherHint(
- `${this.isNot ? ".not" : ""}.toBePartiallyChecked`,
- "element",
- ""
- ),
- "",
- `Received element ${is} partially checked:`,
- ` ${this.utils.printReceived(element.cloneNode(!1))}`
- ].join(`
- `);
- }
- };
- }
- function toHaveDescription(htmlElement, checkWith) {
- deprecate2(
- "toHaveDescription",
- "Please use toHaveAccessibleDescription."
- ), checkHtmlElement(htmlElement, toHaveDescription, this);
- let expectsDescription = checkWith !== void 0, descriptionIDs = (htmlElement.getAttribute("aria-describedby") || "").split(/\s+/).filter(Boolean), description = "";
- if (descriptionIDs.length > 0) {
- let document13 = htmlElement.ownerDocument, descriptionEls = descriptionIDs.map((descriptionID) => document13.getElementById(descriptionID)).filter(Boolean);
- description = normalize(descriptionEls.map((el) => el.textContent).join(" "));
- }
- return {
- pass: expectsDescription ? checkWith instanceof RegExp ? checkWith.test(description) : this.equals(description, checkWith) : !!description,
- message: () => {
- let to = this.isNot ? "not to" : "to";
- return getMessage3(
- this,
- this.utils.matcherHint(
- `${this.isNot ? ".not" : ""}.toHaveDescription`,
- "element",
- ""
- ),
- `Expected the element ${to} have description`,
- this.utils.printExpected(checkWith),
- "Received",
- this.utils.printReceived(description)
- );
- }
- };
- }
- function toHaveErrorMessage(htmlElement, checkWith) {
- if (deprecate2("toHaveErrorMessage", "Please use toHaveAccessibleErrorMessage."), checkHtmlElement(htmlElement, toHaveErrorMessage, this), !htmlElement.hasAttribute("aria-invalid") || htmlElement.getAttribute("aria-invalid") === "false") {
- let not = this.isNot ? ".not" : "";
- return {
- pass: !1,
- message: () => getMessage3(
- this,
- this.utils.matcherHint(`${not}.toHaveErrorMessage`, "element", ""),
- "Expected the element to have invalid state indicated by",
- 'aria-invalid="true"',
- "Received",
- htmlElement.hasAttribute("aria-invalid") ? `aria-invalid="${htmlElement.getAttribute("aria-invalid")}"` : this.utils.printReceived("")
- )
- };
- }
- let expectsErrorMessage = checkWith !== void 0, errormessageIDs = (htmlElement.getAttribute("aria-errormessage") || "").split(/\s+/).filter(Boolean), errormessage = "";
- if (errormessageIDs.length > 0) {
- let document13 = htmlElement.ownerDocument, errormessageEls = errormessageIDs.map((errormessageID) => document13.getElementById(errormessageID)).filter(Boolean);
- errormessage = normalize(
- errormessageEls.map((el) => el.textContent).join(" ")
- );
- }
- return {
- pass: expectsErrorMessage ? checkWith instanceof RegExp ? checkWith.test(errormessage) : this.equals(errormessage, checkWith) : !!errormessage,
- message: () => {
- let to = this.isNot ? "not to" : "to";
- return getMessage3(
- this,
- this.utils.matcherHint(
- `${this.isNot ? ".not" : ""}.toHaveErrorMessage`,
- "element",
- ""
- ),
- `Expected the element ${to} have error message`,
- this.utils.printExpected(checkWith),
- "Received",
- this.utils.printReceived(errormessage)
- );
- }
- };
- }
- function getSelection(element) {
- let selection = element.ownerDocument.getSelection();
- if (["input", "textarea"].includes(element.tagName.toLowerCase()))
- return ["radio", "checkbox"].includes(element.type) ? "" : element.value.toString().substring(element.selectionStart, element.selectionEnd);
- if (selection.anchorNode === null || selection.focusNode === null)
- return "";
- let originalRange = selection.getRangeAt(0), temporaryRange = element.ownerDocument.createRange();
- if (selection.containsNode(element, !1))
- temporaryRange.selectNodeContents(element), selection.removeAllRanges(), selection.addRange(temporaryRange);
- else if (!(element.contains(selection.anchorNode) && element.contains(selection.focusNode))) {
- let selectionStartsWithinElement = element === originalRange.startContainer || element.contains(originalRange.startContainer), selectionEndsWithinElement = element === originalRange.endContainer || element.contains(originalRange.endContainer);
- selection.removeAllRanges(), (selectionStartsWithinElement || selectionEndsWithinElement) && (temporaryRange.selectNodeContents(element), selectionStartsWithinElement && temporaryRange.setStart(
- originalRange.startContainer,
- originalRange.startOffset
- ), selectionEndsWithinElement && temporaryRange.setEnd(
- originalRange.endContainer,
- originalRange.endOffset
- ), selection.addRange(temporaryRange));
- }
- let result = selection.toString();
- return selection.removeAllRanges(), selection.addRange(originalRange), result;
- }
- function toHaveSelection(htmlElement, expectedSelection) {
- checkHtmlElement(htmlElement, toHaveSelection, this);
- let expectsSelection = expectedSelection !== void 0;
- if (expectsSelection && typeof expectedSelection != "string")
- throw new Error("expected selection must be a string or undefined");
- let receivedSelection = getSelection(htmlElement);
- return {
- pass: expectsSelection ? compareAsSet(receivedSelection, expectedSelection) : !!receivedSelection,
- message: () => {
- let to = this.isNot ? "not to" : "to", matcher = this.utils.matcherHint(
- `${this.isNot ? ".not" : ""}.toHaveSelection`,
- "element",
- expectedSelection
- );
- return getMessage3(
- this,
- matcher,
- `Expected the element ${to} have selection`,
- expectsSelection ? expectedSelection : "(any)",
- "Received",
- receivedSelection
- );
- }
- };
- }
- function toBePressed(element) {
- checkHtmlElement(element, toBePressed, this);
- let roles3 = (element.getAttribute("role") || "").split(" ").map((role) => role.trim()), isButton2 = element.tagName.toLowerCase() === "button" || element.tagName.toLowerCase() === "input" && element.type === "button" || roles3.includes("button"), pressedAttribute = element.getAttribute("aria-pressed");
- return !isButton2 || !(pressedAttribute === "true" || pressedAttribute === "false") ? {
- pass: !1,
- message: () => 'Only button or input with type="button" or element with role="button" and a valid aria-pressed attribute can be used with .toBePressed()'
- } : {
- pass: isButton2 && pressedAttribute === "true",
- message: () => {
- let matcher = this.utils.matcherHint(
- `${this.isNot ? ".not" : ""}.toBePressed`,
- "element",
- ""
- );
- return getMessage3(
- this,
- matcher,
- "Expected element to have",
- `aria-pressed="${this.isNot ? "false" : "true"}"`,
- "Received",
- `aria-pressed="${pressedAttribute}"`
- );
- }
- };
- }
- function toBePartiallyPressed(element) {
- checkHtmlElement(element, toBePartiallyPressed, this);
- let roles3 = (element.getAttribute("role") || "").split(" ").map((role) => role.trim()), isButton2 = element.tagName.toLowerCase() === "button" || element.tagName.toLowerCase() === "input" && element.type === "button" || roles3.includes("button"), pressedAttribute = element.getAttribute("aria-pressed");
- return !isButton2 || !(pressedAttribute === "true" || pressedAttribute === "false" || pressedAttribute === "mixed") ? {
- pass: !1,
- message: () => 'Only button or input with type="button" or element with role="button" and a valid aria-pressed attribute can be used with .toBePartiallyPressed()'
- } : {
- pass: isButton2 && pressedAttribute === "mixed",
- message: () => {
- let to = this.isNot ? "not to" : "to", matcher = this.utils.matcherHint(
- `${this.isNot ? ".not" : ""}.toBePartiallyPressed`,
- "element",
- ""
- );
- return getMessage3(
- this,
- matcher,
- `Expected element ${to} have`,
- 'aria-pressed="mixed"',
- "Received",
- `aria-pressed="${pressedAttribute}"`
- );
- }
- };
- }
- var DOCUMENT_POSITION_DISCONNECTED = 1, DOCUMENT_POSITION_PRECEDING = 2, DOCUMENT_POSITION_FOLLOWING = 4, DOCUMENT_POSITION_CONTAINS = 8, DOCUMENT_POSITION_CONTAINED_BY = 16, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = 32, DOCUMENT_POSITIONS_STRINGS = {
- [DOCUMENT_POSITION_DISCONNECTED]: "Node.DOCUMENT_POSITION_DISCONNECTED",
- [DOCUMENT_POSITION_PRECEDING]: "Node.DOCUMENT_POSITION_PRECEDING",
- [DOCUMENT_POSITION_FOLLOWING]: "Node.DOCUMENT_POSITION_FOLLOWING",
- [DOCUMENT_POSITION_CONTAINS]: "Node.DOCUMENT_POSITION_CONTAINS",
- [DOCUMENT_POSITION_CONTAINED_BY]: "Node.DOCUMENT_POSITION_CONTAINED_BY",
- [DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC]: "Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC"
- };
- function makeDocumentPositionErrorString(documentPosition) {
- return documentPosition in DOCUMENT_POSITIONS_STRINGS ? `${DOCUMENT_POSITIONS_STRINGS[documentPosition]} (${documentPosition})` : `Unknown document position (${documentPosition})`;
- }
- function checkToAppear(methodName, targetDocumentPosition) {
- return function(element, secondElement) {
- checkHtmlElement(element, toAppearBefore, this), checkHtmlElement(secondElement, toAppearBefore, this);
- let documentPosition = element.compareDocumentPosition(secondElement);
- return {
- pass: documentPosition === targetDocumentPosition,
- message: () => [
- this.utils.matcherHint(
- `${this.isNot ? ".not" : ""}.${methodName}`,
- "element",
- "secondElement"
- ),
- "",
- `Received: ${makeDocumentPositionErrorString(documentPosition)}`
- ].join(`
- `)
- };
- };
- }
- function toAppearBefore(element, secondElement) {
- return checkToAppear("toAppearBefore", DOCUMENT_POSITION_FOLLOWING).apply(
- this,
- [element, secondElement]
- );
- }
- function toAppearAfter(element, secondElement) {
- return checkToAppear("toAppearAfter", DOCUMENT_POSITION_PRECEDING).apply(
- this,
- [element, secondElement]
- );
- }
- var extensions = Object.freeze({
- __proto__: null,
- toAppearAfter,
- toAppearBefore,
- toBeChecked,
- toBeDisabled,
- toBeEmpty,
- toBeEmptyDOMElement,
- toBeEnabled,
- toBeInTheDOM,
- toBeInTheDocument,
- toBeInvalid,
- toBePartiallyChecked,
- toBePartiallyPressed,
- toBePressed,
- toBeRequired,
- toBeValid,
- toBeVisible,
- toContainElement,
- toContainHTML,
- toHaveAccessibleDescription,
- toHaveAccessibleErrorMessage,
- toHaveAccessibleName,
- toHaveAttribute,
- toHaveClass,
- toHaveDescription,
- toHaveDisplayValue,
- toHaveErrorMessage,
- toHaveFocus,
- toHaveFormValues,
- toHaveRole,
- toHaveSelection,
- toHaveStyle,
- toHaveTextContent,
- toHaveValue
- });
-
- // ../../node_modules/@testing-library/jest-dom/dist/matchers.mjs
- var import_redent2 = __toESM(require_redent(), 1);
- var import_aria_query2 = __toESM(require_lib2(), 1), import_picocolors3 = __toESM(require_picocolors_browser(), 1), import_css4 = __toESM(require_css_escape(), 1);
-
- // ../../node_modules/@vitest/utils/dist/index.js
- var jsTokens_1, hasRequiredJsTokens;
- function requireJsTokens() {
- if (hasRequiredJsTokens) return jsTokens_1;
- hasRequiredJsTokens = 1;
- var Identifier, JSXIdentifier, JSXPunctuator, JSXString, JSXText, KeywordsWithExpressionAfter, KeywordsWithNoLineTerminatorAfter, LineTerminatorSequence, MultiLineComment, Newline, NumericLiteral, Punctuator, RegularExpressionLiteral, SingleLineComment, StringLiteral, Template, TokensNotPrecedingObjectLiteral, TokensPrecedingExpression, WhiteSpace;
- return RegularExpressionLiteral = /\/(?![*\/])(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\\]).|\\.)*(\/[$_\u200C\u200D\p{ID_Continue}]*|\\)?/yu, Punctuator = /--|\+\+|=>|\.{3}|\??\.(?!\d)|(?:&&|\|\||\?\?|[+\-%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2}|\/(?![\/*]))=?|[?~,:;[\](){}]/y, Identifier = /(\x23?)(?=[$_\p{ID_Start}\\])(?:[$_\u200C\u200D\p{ID_Continue}]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+/yu, StringLiteral = /(['"])(?:(?!\1)[^\\\n\r]|\\(?:\r\n|[^]))*(\1)?/y, NumericLiteral = /(?:0[xX][\da-fA-F](?:_?[\da-fA-F])*|0[oO][0-7](?:_?[0-7])*|0[bB][01](?:_?[01])*)n?|0n|[1-9](?:_?\d)*n|(?:(?:0(?!\d)|0\d*[89]\d*|[1-9](?:_?\d)*)(?:\.(?:\d(?:_?\d)*)?)?|\.\d(?:_?\d)*)(?:[eE][+-]?\d(?:_?\d)*)?|0[0-7]+/y, Template = /[`}](?:[^`\\$]|\\[^]|\$(?!\{))*(`|\$\{)?/y, WhiteSpace = /[\t\v\f\ufeff\p{Zs}]+/yu, LineTerminatorSequence = /\r?\n|[\r\u2028\u2029]/y, MultiLineComment = /\/\*(?:[^*]|\*(?!\/))*(\*\/)?/y, SingleLineComment = /\/\/.*/y, JSXPunctuator = /[<>.:={}]|\/(?![\/*])/y, JSXIdentifier = /[$_\p{ID_Start}][$_\u200C\u200D\p{ID_Continue}-]*/yu, JSXString = /(['"])(?:(?!\1)[^])*(\1)?/y, JSXText = /[^<>{}]+/y, TokensPrecedingExpression = /^(?:[\/+-]|\.{3}|\?(?:InterpolationIn(?:JSX|Template)|NoLineTerminatorHere|NonExpressionParenEnd|UnaryIncDec))?$|[{}([,;<>=*%&|^!~?:]$/, TokensNotPrecedingObjectLiteral = /^(?:=>|[;\]){}]|else|\?(?:NoLineTerminatorHere|NonExpressionParenEnd))?$/, KeywordsWithExpressionAfter = /^(?:await|case|default|delete|do|else|instanceof|new|return|throw|typeof|void|yield)$/, KeywordsWithNoLineTerminatorAfter = /^(?:return|throw|yield)$/, Newline = RegExp(LineTerminatorSequence.source), jsTokens_1 = function* (input2, { jsx: jsx10 = !1 } = {}) {
- var braces, firstCodePoint, isExpression, lastIndex, lastSignificantToken, length2, match3, mode, nextLastIndex, nextLastSignificantToken, parenNesting, postfixIncDec, punctuator, stack;
- for ({ length: length2 } = input2, lastIndex = 0, lastSignificantToken = "", stack = [
- { tag: "JS" }
- ], braces = [], parenNesting = 0, postfixIncDec = !1; lastIndex < length2; ) {
- switch (mode = stack[stack.length - 1], mode.tag) {
- case "JS":
- case "JSNonExpressionParen":
- case "InterpolationInTemplate":
- case "InterpolationInJSX":
- if (input2[lastIndex] === "/" && (TokensPrecedingExpression.test(lastSignificantToken) || KeywordsWithExpressionAfter.test(lastSignificantToken)) && (RegularExpressionLiteral.lastIndex = lastIndex, match3 = RegularExpressionLiteral.exec(input2))) {
- lastIndex = RegularExpressionLiteral.lastIndex, lastSignificantToken = match3[0], postfixIncDec = !0, yield {
- type: "RegularExpressionLiteral",
- value: match3[0],
- closed: match3[1] !== void 0 && match3[1] !== "\\"
- };
- continue;
- }
- if (Punctuator.lastIndex = lastIndex, match3 = Punctuator.exec(input2)) {
- switch (punctuator = match3[0], nextLastIndex = Punctuator.lastIndex, nextLastSignificantToken = punctuator, punctuator) {
- case "(":
- lastSignificantToken === "?NonExpressionParenKeyword" && stack.push({
- tag: "JSNonExpressionParen",
- nesting: parenNesting
- }), parenNesting++, postfixIncDec = !1;
- break;
- case ")":
- parenNesting--, postfixIncDec = !0, mode.tag === "JSNonExpressionParen" && parenNesting === mode.nesting && (stack.pop(), nextLastSignificantToken = "?NonExpressionParenEnd", postfixIncDec = !1);
- break;
- case "{":
- Punctuator.lastIndex = 0, isExpression = !TokensNotPrecedingObjectLiteral.test(lastSignificantToken) && (TokensPrecedingExpression.test(lastSignificantToken) || KeywordsWithExpressionAfter.test(lastSignificantToken)), braces.push(isExpression), postfixIncDec = !1;
- break;
- case "}":
- switch (mode.tag) {
- case "InterpolationInTemplate":
- if (braces.length === mode.nesting) {
- Template.lastIndex = lastIndex, match3 = Template.exec(input2), lastIndex = Template.lastIndex, lastSignificantToken = match3[0], match3[1] === "${" ? (lastSignificantToken = "?InterpolationInTemplate", postfixIncDec = !1, yield {
- type: "TemplateMiddle",
- value: match3[0]
- }) : (stack.pop(), postfixIncDec = !0, yield {
- type: "TemplateTail",
- value: match3[0],
- closed: match3[1] === "`"
- });
- continue;
- }
- break;
- case "InterpolationInJSX":
- if (braces.length === mode.nesting) {
- stack.pop(), lastIndex += 1, lastSignificantToken = "}", yield {
- type: "JSXPunctuator",
- value: "}"
- };
- continue;
- }
- }
- postfixIncDec = braces.pop(), nextLastSignificantToken = postfixIncDec ? "?ExpressionBraceEnd" : "}";
- break;
- case "]":
- postfixIncDec = !0;
- break;
- case "++":
- case "--":
- nextLastSignificantToken = postfixIncDec ? "?PostfixIncDec" : "?UnaryIncDec";
- break;
- case "<":
- if (jsx10 && (TokensPrecedingExpression.test(lastSignificantToken) || KeywordsWithExpressionAfter.test(lastSignificantToken))) {
- stack.push({ tag: "JSXTag" }), lastIndex += 1, lastSignificantToken = "<", yield {
- type: "JSXPunctuator",
- value: punctuator
- };
- continue;
- }
- postfixIncDec = !1;
- break;
- default:
- postfixIncDec = !1;
- }
- lastIndex = nextLastIndex, lastSignificantToken = nextLastSignificantToken, yield {
- type: "Punctuator",
- value: punctuator
- };
- continue;
- }
- if (Identifier.lastIndex = lastIndex, match3 = Identifier.exec(input2)) {
- switch (lastIndex = Identifier.lastIndex, nextLastSignificantToken = match3[0], match3[0]) {
- case "for":
- case "if":
- case "while":
- case "with":
- lastSignificantToken !== "." && lastSignificantToken !== "?." && (nextLastSignificantToken = "?NonExpressionParenKeyword");
- }
- lastSignificantToken = nextLastSignificantToken, postfixIncDec = !KeywordsWithExpressionAfter.test(match3[0]), yield {
- type: match3[1] === "#" ? "PrivateIdentifier" : "IdentifierName",
- value: match3[0]
- };
- continue;
- }
- if (StringLiteral.lastIndex = lastIndex, match3 = StringLiteral.exec(input2)) {
- lastIndex = StringLiteral.lastIndex, lastSignificantToken = match3[0], postfixIncDec = !0, yield {
- type: "StringLiteral",
- value: match3[0],
- closed: match3[2] !== void 0
- };
- continue;
- }
- if (NumericLiteral.lastIndex = lastIndex, match3 = NumericLiteral.exec(input2)) {
- lastIndex = NumericLiteral.lastIndex, lastSignificantToken = match3[0], postfixIncDec = !0, yield {
- type: "NumericLiteral",
- value: match3[0]
- };
- continue;
- }
- if (Template.lastIndex = lastIndex, match3 = Template.exec(input2)) {
- lastIndex = Template.lastIndex, lastSignificantToken = match3[0], match3[1] === "${" ? (lastSignificantToken = "?InterpolationInTemplate", stack.push({
- tag: "InterpolationInTemplate",
- nesting: braces.length
- }), postfixIncDec = !1, yield {
- type: "TemplateHead",
- value: match3[0]
- }) : (postfixIncDec = !0, yield {
- type: "NoSubstitutionTemplate",
- value: match3[0],
- closed: match3[1] === "`"
- });
- continue;
- }
- break;
- case "JSXTag":
- case "JSXTagEnd":
- if (JSXPunctuator.lastIndex = lastIndex, match3 = JSXPunctuator.exec(input2)) {
- switch (lastIndex = JSXPunctuator.lastIndex, nextLastSignificantToken = match3[0], match3[0]) {
- case "<":
- stack.push({ tag: "JSXTag" });
- break;
- case ">":
- stack.pop(), lastSignificantToken === "/" || mode.tag === "JSXTagEnd" ? (nextLastSignificantToken = "?JSX", postfixIncDec = !0) : stack.push({ tag: "JSXChildren" });
- break;
- case "{":
- stack.push({
- tag: "InterpolationInJSX",
- nesting: braces.length
- }), nextLastSignificantToken = "?InterpolationInJSX", postfixIncDec = !1;
- break;
- case "/":
- lastSignificantToken === "<" && (stack.pop(), stack[stack.length - 1].tag === "JSXChildren" && stack.pop(), stack.push({ tag: "JSXTagEnd" }));
- }
- lastSignificantToken = nextLastSignificantToken, yield {
- type: "JSXPunctuator",
- value: match3[0]
- };
- continue;
- }
- if (JSXIdentifier.lastIndex = lastIndex, match3 = JSXIdentifier.exec(input2)) {
- lastIndex = JSXIdentifier.lastIndex, lastSignificantToken = match3[0], yield {
- type: "JSXIdentifier",
- value: match3[0]
- };
- continue;
- }
- if (JSXString.lastIndex = lastIndex, match3 = JSXString.exec(input2)) {
- lastIndex = JSXString.lastIndex, lastSignificantToken = match3[0], yield {
- type: "JSXString",
- value: match3[0],
- closed: match3[2] !== void 0
- };
- continue;
- }
- break;
- case "JSXChildren":
- if (JSXText.lastIndex = lastIndex, match3 = JSXText.exec(input2)) {
- lastIndex = JSXText.lastIndex, lastSignificantToken = match3[0], yield {
- type: "JSXText",
- value: match3[0]
- };
- continue;
- }
- switch (input2[lastIndex]) {
- case "<":
- stack.push({ tag: "JSXTag" }), lastIndex++, lastSignificantToken = "<", yield {
- type: "JSXPunctuator",
- value: "<"
- };
- continue;
- case "{":
- stack.push({
- tag: "InterpolationInJSX",
- nesting: braces.length
- }), lastIndex++, lastSignificantToken = "?InterpolationInJSX", postfixIncDec = !1, yield {
- type: "JSXPunctuator",
- value: "{"
- };
- continue;
- }
- }
- if (WhiteSpace.lastIndex = lastIndex, match3 = WhiteSpace.exec(input2)) {
- lastIndex = WhiteSpace.lastIndex, yield {
- type: "WhiteSpace",
- value: match3[0]
- };
- continue;
- }
- if (LineTerminatorSequence.lastIndex = lastIndex, match3 = LineTerminatorSequence.exec(input2)) {
- lastIndex = LineTerminatorSequence.lastIndex, postfixIncDec = !1, KeywordsWithNoLineTerminatorAfter.test(lastSignificantToken) && (lastSignificantToken = "?NoLineTerminatorHere"), yield {
- type: "LineTerminatorSequence",
- value: match3[0]
- };
- continue;
- }
- if (MultiLineComment.lastIndex = lastIndex, match3 = MultiLineComment.exec(input2)) {
- lastIndex = MultiLineComment.lastIndex, Newline.test(match3[0]) && (postfixIncDec = !1, KeywordsWithNoLineTerminatorAfter.test(lastSignificantToken) && (lastSignificantToken = "?NoLineTerminatorHere")), yield {
- type: "MultiLineComment",
- value: match3[0],
- closed: match3[1] !== void 0
- };
- continue;
- }
- if (SingleLineComment.lastIndex = lastIndex, match3 = SingleLineComment.exec(input2)) {
- lastIndex = SingleLineComment.lastIndex, postfixIncDec = !1, yield {
- type: "SingleLineComment",
- value: match3[0]
- };
- continue;
- }
- firstCodePoint = String.fromCodePoint(input2.codePointAt(lastIndex)), lastIndex += firstCodePoint.length, lastSignificantToken = firstCodePoint, postfixIncDec = !1, yield {
- type: mode.tag.startsWith("JSX") ? "JSXInvalid" : "Invalid",
- value: firstCodePoint
- };
- }
- }, jsTokens_1;
- }
- var jsTokensExports = requireJsTokens(), jsTokens = getDefaultExportFromCjs2(jsTokensExports), reservedWords = {
- keyword: [
- "break",
- "case",
- "catch",
- "continue",
- "debugger",
- "default",
- "do",
- "else",
- "finally",
- "for",
- "function",
- "if",
- "return",
- "switch",
- "throw",
- "try",
- "var",
- "const",
- "while",
- "with",
- "new",
- "this",
- "super",
- "class",
- "extends",
- "export",
- "import",
- "null",
- "true",
- "false",
- "in",
- "instanceof",
- "typeof",
- "void",
- "delete"
- ],
- strict: [
- "implements",
- "interface",
- "let",
- "package",
- "private",
- "protected",
- "public",
- "static",
- "yield"
- ]
- }, keywords = new Set(reservedWords.keyword), reservedWordsStrictSet = new Set(reservedWords.strict);
- var SAFE_TIMERS_SYMBOL = Symbol("vitest:SAFE_TIMERS");
-
- // ../../node_modules/@vitest/expect/node_modules/tinyrainbow/dist/chunk-BVHSVHOK.js
- var f2 = {
- reset: [0, 0],
- bold: [1, 22, "\x1B[22m\x1B[1m"],
- dim: [2, 22, "\x1B[22m\x1B[2m"],
- italic: [3, 23],
- underline: [4, 24],
- inverse: [7, 27],
- hidden: [8, 28],
- strikethrough: [9, 29],
- black: [30, 39],
- red: [31, 39],
- green: [32, 39],
- yellow: [33, 39],
- blue: [34, 39],
- magenta: [35, 39],
- cyan: [36, 39],
- white: [37, 39],
- gray: [90, 39],
- bgBlack: [40, 49],
- bgRed: [41, 49],
- bgGreen: [42, 49],
- bgYellow: [43, 49],
- bgBlue: [44, 49],
- bgMagenta: [45, 49],
- bgCyan: [46, 49],
- bgWhite: [47, 49],
- blackBright: [90, 39],
- redBright: [91, 39],
- greenBright: [92, 39],
- yellowBright: [93, 39],
- blueBright: [94, 39],
- magentaBright: [95, 39],
- cyanBright: [96, 39],
- whiteBright: [97, 39],
- bgBlackBright: [100, 49],
- bgRedBright: [101, 49],
- bgGreenBright: [102, 49],
- bgYellowBright: [103, 49],
- bgBlueBright: [104, 49],
- bgMagentaBright: [105, 49],
- bgCyanBright: [106, 49],
- bgWhiteBright: [107, 49]
- }, h2 = Object.entries(f2);
- function a2(n) {
- return String(n);
- }
- a2.open = "";
- a2.close = "";
- var B2 = h2.reduce(
- (n, [e]) => (n[e] = a2, n),
- { isColorSupported: !1 }
- );
- function C2(n = !1) {
- let e = typeof process < "u" ? process : void 0, i = e?.env || {}, g2 = e?.argv || [];
- return !("NO_COLOR" in i || g2.includes("--no-color")) && ("FORCE_COLOR" in i || g2.includes("--color") || e?.platform === "win32" || n && i.TERM !== "dumb" || "CI" in i) || typeof window < "u" && !!window.chrome;
- }
- function p2(n = !1) {
- let e = C2(n), i = (r2, t, c, o) => {
- let l = "", s3 = 0;
- do
- l += r2.substring(s3, o) + c, s3 = o + t.length, o = r2.indexOf(t, s3);
- while (~o);
- return l + r2.substring(s3);
- }, g2 = (r2, t, c = r2) => {
- let o = (l) => {
- let s3 = String(l), b = s3.indexOf(t, r2.length);
- return ~b ? r2 + i(s3, t, c, b) + t : r2 + s3 + t;
- };
- return o.open = r2, o.close = t, o;
- }, u2 = {
- isColorSupported: e
- }, d = (r2) => `\x1B[${r2}m`;
- for (let [r2, t] of h2)
- u2[r2] = e ? g2(
- d(t[0]),
- d(t[1]),
- t[2]
- ) : a2;
- return u2;
- }
-
- // ../../node_modules/@vitest/expect/node_modules/tinyrainbow/dist/browser.js
- var s2 = p2();
-
- // ../../node_modules/@vitest/spy/node_modules/tinyspy/dist/index.js
- function assert2(condition, message) {
- if (!condition)
- throw new Error(message);
- }
- function isType(type5, value) {
- return typeof value === type5;
- }
- function isPromise2(value) {
- return value instanceof Promise;
- }
- function define2(obj, key, descriptor) {
- Object.defineProperty(obj, key, descriptor);
- }
- function defineValue(obj, key, value) {
- define2(obj, key, { value, configurable: !0, writable: !0 });
- }
- var SYMBOL_STATE = Symbol.for("tinyspy:spy"), spies = /* @__PURE__ */ new Set(), reset = (state3) => {
- state3.called = !1, state3.callCount = 0, state3.calls = [], state3.results = [], state3.resolves = [], state3.next = [];
- }, defineState = (spy2) => (define2(spy2, SYMBOL_STATE, {
- value: { reset: () => reset(spy2[SYMBOL_STATE]) }
- }), spy2[SYMBOL_STATE]), getInternalState = (spy2) => spy2[SYMBOL_STATE] || defineState(spy2);
- function createInternalSpy(cb) {
- assert2(
- isType("function", cb) || isType("undefined", cb),
- "cannot spy on a non-function value"
- );
- let fn4 = function(...args) {
- let state22 = getInternalState(fn4);
- state22.called = !0, state22.callCount++, state22.calls.push(args);
- let next2 = state22.next.shift();
- if (next2) {
- state22.results.push(next2);
- let [type22, result2] = next2;
- if (type22 === "ok")
- return result2;
- throw result2;
- }
- let result, type5 = "ok", resultIndex = state22.results.length;
- if (state22.impl)
- try {
- new.target ? result = Reflect.construct(state22.impl, args, new.target) : result = state22.impl.apply(this, args), type5 = "ok";
- } catch (err) {
- throw result = err, type5 = "error", state22.results.push([type5, err]), err;
- }
- let resultTuple = [type5, result];
- return isPromise2(result) && result.then(
- (r2) => state22.resolves[resultIndex] = ["ok", r2],
- (e) => state22.resolves[resultIndex] = ["error", e]
- ), state22.results.push(resultTuple), result;
- };
- defineValue(fn4, "_isMockFunction", !0), defineValue(fn4, "length", cb ? cb.length : 0), defineValue(fn4, "name", cb && cb.name || "spy");
- let state3 = getInternalState(fn4);
- return state3.reset(), state3.impl = cb, fn4;
- }
- function isMockFunction(obj) {
- return !!obj && obj._isMockFunction === !0;
- }
- var getDescriptor = (obj, method) => {
- let objDescriptor = Object.getOwnPropertyDescriptor(obj, method);
- if (objDescriptor)
- return [obj, objDescriptor];
- let currentProto = Object.getPrototypeOf(obj);
- for (; currentProto !== null; ) {
- let descriptor = Object.getOwnPropertyDescriptor(currentProto, method);
- if (descriptor)
- return [currentProto, descriptor];
- currentProto = Object.getPrototypeOf(currentProto);
- }
- }, setPototype = (fn4, val) => {
- val != null && typeof val == "function" && val.prototype != null && Object.setPrototypeOf(fn4.prototype, val.prototype);
- };
- function internalSpyOn(obj, methodName, mock) {
- assert2(
- !isType("undefined", obj),
- "spyOn could not find an object to spy upon"
- ), assert2(
- isType("object", obj) || isType("function", obj),
- "cannot spyOn on a primitive value"
- );
- let [accessName, accessType] = (() => {
- if (!isType("object", methodName))
- return [methodName, "value"];
- if ("getter" in methodName && "setter" in methodName)
- throw new Error("cannot spy on both getter and setter");
- if ("getter" in methodName)
- return [methodName.getter, "get"];
- if ("setter" in methodName)
- return [methodName.setter, "set"];
- throw new Error("specify getter or setter to spy on");
- })(), [originalDescriptorObject, originalDescriptor] = getDescriptor(obj, accessName) || [];
- assert2(
- originalDescriptor || accessName in obj,
- `${String(accessName)} does not exist`
- );
- let ssr = !1;
- accessType === "value" && originalDescriptor && !originalDescriptor.value && originalDescriptor.get && (accessType = "get", ssr = !0, mock = originalDescriptor.get());
- let original;
- originalDescriptor ? original = originalDescriptor[accessType] : accessType !== "value" ? original = () => obj[accessName] : original = obj[accessName], original && isSpyFunction(original) && (original = original[SYMBOL_STATE].getOriginal());
- let reassign = (cb) => {
- let { value, ...desc } = originalDescriptor || {
- configurable: !0,
- writable: !0
- };
- accessType !== "value" && delete desc.writable, desc[accessType] = cb, define2(obj, accessName, desc);
- }, restore = () => {
- originalDescriptorObject !== obj ? Reflect.deleteProperty(obj, accessName) : originalDescriptor && !original ? define2(obj, accessName, originalDescriptor) : reassign(original);
- };
- mock || (mock = original);
- let spy2 = wrap(createInternalSpy(mock), mock);
- accessType === "value" && setPototype(spy2, original);
- let state3 = spy2[SYMBOL_STATE];
- return defineValue(state3, "restore", restore), defineValue(state3, "getOriginal", () => ssr ? original() : original), defineValue(state3, "willCall", (newCb) => (state3.impl = newCb, spy2)), reassign(
- ssr ? () => (setPototype(spy2, mock), spy2) : spy2
- ), spies.add(spy2), spy2;
- }
- var ignoreProperties = /* @__PURE__ */ new Set([
- "length",
- "name",
- "prototype"
- ]);
- function getAllProperties(original) {
- let properties = /* @__PURE__ */ new Set(), descriptors2 = {};
- for (; original && original !== Object.prototype && original !== Function.prototype; ) {
- let ownProperties = [
- ...Object.getOwnPropertyNames(original),
- ...Object.getOwnPropertySymbols(original)
- ];
- for (let prop of ownProperties)
- descriptors2[prop] || ignoreProperties.has(prop) || (properties.add(prop), descriptors2[prop] = Object.getOwnPropertyDescriptor(original, prop));
- original = Object.getPrototypeOf(original);
- }
- return {
- properties,
- descriptors: descriptors2
- };
- }
- function wrap(mock, original) {
- if (!original || // the original is already a spy, so it has all the properties
- SYMBOL_STATE in original)
- return mock;
- let { properties, descriptors: descriptors2 } = getAllProperties(original);
- for (let key of properties) {
- let descriptor = descriptors2[key];
- getDescriptor(mock, key) || define2(mock, key, descriptor);
- }
- return mock;
- }
- function isSpyFunction(obj) {
- return isMockFunction(obj) && "getOriginal" in obj[SYMBOL_STATE];
- }
-
- // ../../node_modules/@vitest/spy/dist/index.js
- var mocks = /* @__PURE__ */ new Set();
- function isMockFunction2(fn4) {
- return typeof fn4 == "function" && "_isMockFunction" in fn4 && fn4._isMockFunction;
- }
- function spyOn(obj, method, accessType) {
- let objMethod = accessType ? { [{
- get: "getter",
- set: "setter"
- }[accessType]]: method } : method, state3, descriptor = getDescriptor2(obj, method), fn4 = descriptor && descriptor[accessType || "value"];
- isMockFunction2(fn4) && (state3 = fn4.mock._state());
- try {
- let stub = internalSpyOn(obj, objMethod), spy = enhanceSpy(stub);
- return state3 && spy.mock._state(state3), spy;
- } catch (error) {
- throw error instanceof TypeError && Symbol.toStringTag && obj[Symbol.toStringTag] === "Module" && (error.message.includes("Cannot redefine property") || error.message.includes("Cannot replace module namespace") || error.message.includes("can't redefine non-configurable property")) ? new TypeError(`Cannot spy on export "${String(objMethod)}". Module namespace is not configurable in ESM. See: https://vitest.dev/guide/browser/#limitations`, { cause: error }) : error;
- }
- }
- var callOrder = 0;
- function enhanceSpy(spy) {
- let stub = spy, implementation, onceImplementations = [], implementationChangedTemporarily = !1, instances2 = [], contexts = [], invocations = [], state3 = getInternalState(spy), mockContext = {
- get calls() {
- return state3.calls;
- },
- get contexts() {
- return contexts;
- },
- get instances() {
- return instances2;
- },
- get invocationCallOrder() {
- return invocations;
- },
- get results() {
- return state3.results.map(([callType, value]) => ({
- type: callType === "error" ? "throw" : "return",
- value
- }));
- },
- get settledResults() {
- return state3.resolves.map(([callType, value]) => ({
- type: callType === "error" ? "rejected" : "fulfilled",
- value
- }));
- },
- get lastCall() {
- return state3.calls[state3.calls.length - 1];
- },
- _state(state4) {
- return state4 && (implementation = state4.implementation, onceImplementations = state4.onceImplementations, implementationChangedTemporarily = state4.implementationChangedTemporarily), {
- implementation,
- onceImplementations,
- implementationChangedTemporarily
- };
- }
- };
- function mockCall(...args) {
- return instances2.push(this), contexts.push(this), invocations.push(++callOrder), (implementationChangedTemporarily ? implementation : onceImplementations.shift() || implementation || state3.getOriginal() || (() => {
- })).apply(this, args);
- }
- let name = stub.name;
- stub.getMockName = () => name || "vi.fn()", stub.mockName = (n) => (name = n, stub), stub.mockClear = () => (state3.reset(), instances2 = [], contexts = [], invocations = [], stub), stub.mockReset = () => (stub.mockClear(), implementation = void 0, onceImplementations = [], stub), stub.mockRestore = () => (stub.mockReset(), state3.restore(), stub), Symbol.dispose && (stub[Symbol.dispose] = () => stub.mockRestore()), stub.getMockImplementation = () => implementationChangedTemporarily ? implementation : onceImplementations.at(0) || implementation, stub.mockImplementation = (fn4) => (implementation = fn4, state3.willCall(mockCall), stub), stub.mockImplementationOnce = (fn4) => (onceImplementations.push(fn4), stub);
- function withImplementation(fn4, cb) {
- let originalImplementation = implementation;
- implementation = fn4, state3.willCall(mockCall), implementationChangedTemporarily = !0;
- let reset2 = () => {
- implementation = originalImplementation, implementationChangedTemporarily = !1;
- }, result = cb();
- return typeof result == "object" && result && typeof result.then == "function" ? result.then(() => (reset2(), stub)) : (reset2(), stub);
- }
- return stub.withImplementation = withImplementation, stub.mockReturnThis = () => stub.mockImplementation(function() {
- return this;
- }), stub.mockReturnValue = (val) => stub.mockImplementation(() => val), stub.mockReturnValueOnce = (val) => stub.mockImplementationOnce(() => val), stub.mockResolvedValue = (val) => stub.mockImplementation(() => Promise.resolve(val)), stub.mockResolvedValueOnce = (val) => stub.mockImplementationOnce(() => Promise.resolve(val)), stub.mockRejectedValue = (val) => stub.mockImplementation(() => Promise.reject(val)), stub.mockRejectedValueOnce = (val) => stub.mockImplementationOnce(() => Promise.reject(val)), Object.defineProperty(stub, "mock", { get: () => mockContext }), state3.willCall(mockCall), mocks.add(stub), stub;
- }
- function fn(implementation) {
- let enhancedSpy = enhanceSpy(internalSpyOn({ spy: implementation || function() {
- } }, "spy"));
- return implementation && enhancedSpy.mockImplementation(implementation), enhancedSpy;
- }
- function getDescriptor2(obj, method) {
- let objDescriptor = Object.getOwnPropertyDescriptor(obj, method);
- if (objDescriptor)
- return objDescriptor;
- let currentProto = Object.getPrototypeOf(obj);
- for (; currentProto !== null; ) {
- let descriptor = Object.getOwnPropertyDescriptor(currentProto, method);
- if (descriptor)
- return descriptor;
- currentProto = Object.getPrototypeOf(currentProto);
- }
- }
-
- // ../../node_modules/@vitest/expect/dist/index.js
- var MATCHERS_OBJECT = Symbol.for("matchers-object"), JEST_MATCHERS_OBJECT = Symbol.for("$$jest-matchers-object-storybook"), GLOBAL_EXPECT = Symbol.for("expect-global"), ASYMMETRIC_MATCHERS_OBJECT = Symbol.for("asymmetric-matchers-object"), customMatchers = {
- toSatisfy(actual, expected, message) {
- let { printReceived: printReceived3, printExpected: printExpected3, matcherHint: matcherHint2 } = this.utils, pass = expected(actual);
- return {
- pass,
- message: () => pass ? `${matcherHint2(".not.toSatisfy", "received", "")}
-
- Expected value to not satisfy:
- ${message || printExpected3(expected)}
- Received:
- ${printReceived3(actual)}` : `${matcherHint2(".toSatisfy", "received", "")}
-
- Expected value to satisfy:
- ${message || printExpected3(expected)}
-
- Received:
- ${printReceived3(actual)}`
- };
- },
- toBeOneOf(actual, expected) {
- let { equals: equals2, customTesters } = this, { printReceived: printReceived3, printExpected: printExpected3, matcherHint: matcherHint2 } = this.utils;
- if (!Array.isArray(expected))
- throw new TypeError(`You must provide an array to ${matcherHint2(".toBeOneOf")}, not '${typeof expected}'.`);
- let pass = expected.length === 0 || expected.some((item) => equals2(item, actual, customTesters));
- return {
- pass,
- message: () => pass ? `${matcherHint2(".not.toBeOneOf", "received", "")}
-
- Expected value to not be one of:
- ${printExpected3(expected)}
- Received:
- ${printReceived3(actual)}` : `${matcherHint2(".toBeOneOf", "received", "")}
-
- Expected value to be one of:
- ${printExpected3(expected)}
-
- Received:
- ${printReceived3(actual)}`
- };
- }
- }, EXPECTED_COLOR = s2.green, RECEIVED_COLOR = s2.red, INVERTED_COLOR = s2.inverse, BOLD_WEIGHT = s2.bold, DIM_COLOR = s2.dim;
- function matcherHint(matcherName, received = "received", expected = "expected", options = {}) {
- let { comment: comment2 = "", isDirectExpectCall = !1, isNot = !1, promise = "", secondArgument = "", expectedColor = EXPECTED_COLOR, receivedColor = RECEIVED_COLOR, secondArgumentColor = EXPECTED_COLOR } = options, hint = "", dimString = "expect";
- return !isDirectExpectCall && received !== "" && (hint += DIM_COLOR(`${dimString}(`) + receivedColor(received), dimString = ")"), promise !== "" && (hint += DIM_COLOR(`${dimString}.`) + promise, dimString = ""), isNot && (hint += `${DIM_COLOR(`${dimString}.`)}not`, dimString = ""), matcherName.includes(".") ? dimString += matcherName : (hint += DIM_COLOR(`${dimString}.`) + matcherName, dimString = ""), expected === "" ? dimString += "()" : (hint += DIM_COLOR(`${dimString}(`) + expectedColor(expected), secondArgument && (hint += DIM_COLOR(", ") + secondArgumentColor(secondArgument)), dimString = ")"), comment2 !== "" && (dimString += ` // ${comment2}`), dimString !== "" && (hint += DIM_COLOR(dimString)), hint;
- }
- var SPACE_SYMBOL2 = "\xB7";
- function replaceTrailingSpaces2(text) {
- return text.replace(/\s+$/gm, (spaces) => SPACE_SYMBOL2.repeat(spaces.length));
- }
- function printReceived2(object) {
- return RECEIVED_COLOR(replaceTrailingSpaces2(stringify5(object)));
- }
- function printExpected2(value) {
- return EXPECTED_COLOR(replaceTrailingSpaces2(stringify5(value)));
- }
- function getMatcherUtils() {
- return {
- EXPECTED_COLOR,
- RECEIVED_COLOR,
- INVERTED_COLOR,
- BOLD_WEIGHT,
- DIM_COLOR,
- diff,
- matcherHint,
- printReceived: printReceived2,
- printExpected: printExpected2,
- printDiffOrStringify,
- printWithType
- };
- }
- function printWithType(name, value, print) {
- let type5 = getType2(value), hasType = type5 !== "null" && type5 !== "undefined" ? `${name} has type: ${type5}
- ` : "", hasValue = `${name} has value: ${print(value)}`;
- return hasType + hasValue;
- }
- function getCustomEqualityTesters() {
- return globalThis[JEST_MATCHERS_OBJECT].customEqualityTesters;
- }
- function equals(a3, b, customTesters, strictCheck) {
- return customTesters = customTesters || [], eq3(a3, b, [], [], customTesters, strictCheck ? hasKey : hasDefinedKey);
- }
- var functionToString = Function.prototype.toString;
- function isAsymmetric(obj) {
- return !!obj && typeof obj == "object" && "asymmetricMatch" in obj && isA("Function", obj.asymmetricMatch);
- }
- function asymmetricMatch(a3, b) {
- let asymmetricA = isAsymmetric(a3), asymmetricB = isAsymmetric(b);
- if (!(asymmetricA && asymmetricB)) {
- if (asymmetricA)
- return a3.asymmetricMatch(b);
- if (asymmetricB)
- return b.asymmetricMatch(a3);
- }
- }
- function eq3(a3, b, aStack, bStack, customTesters, hasKey2) {
- let result = !0, asymmetricResult = asymmetricMatch(a3, b);
- if (asymmetricResult !== void 0)
- return asymmetricResult;
- let testerContext = { equals };
- for (let i = 0; i < customTesters.length; i++) {
- let customTesterResult = customTesters[i].call(testerContext, a3, b, customTesters);
- if (customTesterResult !== void 0)
- return customTesterResult;
- }
- if (typeof URL == "function" && a3 instanceof URL && b instanceof URL)
- return a3.href === b.href;
- if (Object.is(a3, b))
- return !0;
- if (a3 === null || b === null)
- return a3 === b;
- let className = Object.prototype.toString.call(a3);
- if (className !== Object.prototype.toString.call(b))
- return !1;
- switch (className) {
- case "[object Boolean]":
- case "[object String]":
- case "[object Number]":
- return typeof a3 != typeof b ? !1 : typeof a3 != "object" && typeof b != "object" ? Object.is(a3, b) : Object.is(a3.valueOf(), b.valueOf());
- case "[object Date]": {
- let numA = +a3, numB = +b;
- return numA === numB || Number.isNaN(numA) && Number.isNaN(numB);
- }
- case "[object RegExp]":
- return a3.source === b.source && a3.flags === b.flags;
- case "[object Temporal.Instant]":
- case "[object Temporal.ZonedDateTime]":
- case "[object Temporal.PlainDateTime]":
- case "[object Temporal.PlainDate]":
- case "[object Temporal.PlainTime]":
- case "[object Temporal.PlainYearMonth]":
- case "[object Temporal.PlainMonthDay]":
- return a3.equals(b);
- case "[object Temporal.Duration]":
- return a3.toString() === b.toString();
- }
- if (typeof a3 != "object" || typeof b != "object")
- return !1;
- if (isDomNode(a3) && isDomNode(b))
- return a3.isEqualNode(b);
- let length2 = aStack.length;
- for (; length2--; ) {
- if (aStack[length2] === a3)
- return bStack[length2] === b;
- if (bStack[length2] === b)
- return !1;
- }
- if (aStack.push(a3), bStack.push(b), className === "[object Array]" && a3.length !== b.length)
- return !1;
- if (a3 instanceof Error && b instanceof Error)
- try {
- return isErrorEqual(a3, b, aStack, bStack, customTesters, hasKey2);
- } finally {
- aStack.pop(), bStack.pop();
- }
- let aKeys = keys(a3, hasKey2), key, size = aKeys.length;
- if (keys(b, hasKey2).length !== size)
- return !1;
- for (; size--; )
- if (key = aKeys[size], result = hasKey2(b, key) && eq3(a3[key], b[key], aStack, bStack, customTesters, hasKey2), !result)
- return !1;
- return aStack.pop(), bStack.pop(), result;
- }
- function isErrorEqual(a3, b, aStack, bStack, customTesters, hasKey2) {
- let result = Object.getPrototypeOf(a3) === Object.getPrototypeOf(b) && a3.name === b.name && a3.message === b.message;
- return typeof b.cause < "u" && result && (result = eq3(a3.cause, b.cause, aStack, bStack, customTesters, hasKey2)), a3 instanceof AggregateError && b instanceof AggregateError && result && (result = eq3(a3.errors, b.errors, aStack, bStack, customTesters, hasKey2)), result && (result = eq3({ ...a3 }, { ...b }, aStack, bStack, customTesters, hasKey2)), result;
- }
- function keys(obj, hasKey2) {
- let keys3 = [];
- for (let key in obj)
- hasKey2(obj, key) && keys3.push(key);
- return keys3.concat(Object.getOwnPropertySymbols(obj).filter((symbol) => Object.getOwnPropertyDescriptor(obj, symbol).enumerable));
- }
- function hasDefinedKey(obj, key) {
- return hasKey(obj, key) && obj[key] !== void 0;
- }
- function hasKey(obj, key) {
- return Object.prototype.hasOwnProperty.call(obj, key);
- }
- function isA(typeName, value) {
- return Object.prototype.toString.apply(value) === `[object ${typeName}]`;
- }
- function isDomNode(obj) {
- return obj !== null && typeof obj == "object" && "nodeType" in obj && typeof obj.nodeType == "number" && "nodeName" in obj && typeof obj.nodeName == "string" && "isEqualNode" in obj && typeof obj.isEqualNode == "function";
- }
- var IS_KEYED_SENTINEL2 = "@@__IMMUTABLE_KEYED__@@", IS_SET_SENTINEL2 = "@@__IMMUTABLE_SET__@@", IS_LIST_SENTINEL2 = "@@__IMMUTABLE_LIST__@@", IS_ORDERED_SENTINEL2 = "@@__IMMUTABLE_ORDERED__@@", IS_RECORD_SYMBOL2 = "@@__IMMUTABLE_RECORD__@@";
- function isImmutableUnorderedKeyed(maybeKeyed) {
- return !!(maybeKeyed && maybeKeyed[IS_KEYED_SENTINEL2] && !maybeKeyed[IS_ORDERED_SENTINEL2]);
- }
- function isImmutableUnorderedSet(maybeSet) {
- return !!(maybeSet && maybeSet[IS_SET_SENTINEL2] && !maybeSet[IS_ORDERED_SENTINEL2]);
- }
- function isObjectLiteral(source) {
- return source != null && typeof source == "object" && !Array.isArray(source);
- }
- function isImmutableList(source) {
- return !!(source && isObjectLiteral(source) && source[IS_LIST_SENTINEL2]);
- }
- function isImmutableOrderedKeyed(source) {
- return !!(source && isObjectLiteral(source) && source[IS_KEYED_SENTINEL2] && source[IS_ORDERED_SENTINEL2]);
- }
- function isImmutableOrderedSet(source) {
- return !!(source && isObjectLiteral(source) && source[IS_SET_SENTINEL2] && source[IS_ORDERED_SENTINEL2]);
- }
- function isImmutableRecord(source) {
- return !!(source && isObjectLiteral(source) && source[IS_RECORD_SYMBOL2]);
- }
- var IteratorSymbol = Symbol.iterator;
- function hasIterator(object) {
- return !!(object != null && object[IteratorSymbol]);
- }
- function iterableEquality(a3, b, customTesters = [], aStack = [], bStack = []) {
- if (typeof a3 != "object" || typeof b != "object" || Array.isArray(a3) || Array.isArray(b) || !hasIterator(a3) || !hasIterator(b))
- return;
- if (a3.constructor !== b.constructor)
- return !1;
- let length2 = aStack.length;
- for (; length2--; )
- if (aStack[length2] === a3)
- return bStack[length2] === b;
- aStack.push(a3), bStack.push(b);
- let filteredCustomTesters = [...customTesters.filter((t) => t !== iterableEquality), iterableEqualityWithStack];
- function iterableEqualityWithStack(a4, b2) {
- return iterableEquality(a4, b2, [...customTesters], [...aStack], [...bStack]);
- }
- if (a3.size !== void 0) {
- if (a3.size !== b.size)
- return !1;
- if (isA("Set", a3) || isImmutableUnorderedSet(a3)) {
- let allFound = !0;
- for (let aValue of a3)
- if (!b.has(aValue)) {
- let has2 = !1;
- for (let bValue of b)
- equals(aValue, bValue, filteredCustomTesters) === !0 && (has2 = !0);
- if (has2 === !1) {
- allFound = !1;
- break;
- }
- }
- return aStack.pop(), bStack.pop(), allFound;
- } else if (isA("Map", a3) || isImmutableUnorderedKeyed(a3)) {
- let allFound = !0;
- for (let aEntry of a3)
- if (!b.has(aEntry[0]) || !equals(aEntry[1], b.get(aEntry[0]), filteredCustomTesters)) {
- let has2 = !1;
- for (let bEntry of b) {
- let matchedKey = equals(aEntry[0], bEntry[0], filteredCustomTesters), matchedValue = !1;
- matchedKey === !0 && (matchedValue = equals(aEntry[1], bEntry[1], filteredCustomTesters)), matchedValue === !0 && (has2 = !0);
- }
- if (has2 === !1) {
- allFound = !1;
- break;
- }
- }
- return aStack.pop(), bStack.pop(), allFound;
- }
- }
- let bIterator = b[IteratorSymbol]();
- for (let aValue of a3) {
- let nextB = bIterator.next();
- if (nextB.done || !equals(aValue, nextB.value, filteredCustomTesters))
- return !1;
- }
- if (!bIterator.next().done)
- return !1;
- if (!isImmutableList(a3) && !isImmutableOrderedKeyed(a3) && !isImmutableOrderedSet(a3) && !isImmutableRecord(a3)) {
- let aEntries = Object.entries(a3), bEntries = Object.entries(b);
- if (!equals(aEntries, bEntries, filteredCustomTesters))
- return !1;
- }
- return aStack.pop(), bStack.pop(), !0;
- }
- function hasPropertyInObject(object, key) {
- return !object || typeof object != "object" || object === Object.prototype ? !1 : Object.prototype.hasOwnProperty.call(object, key) || hasPropertyInObject(Object.getPrototypeOf(object), key);
- }
- function isObjectWithKeys(a3) {
- return isObject5(a3) && !(a3 instanceof Error) && !Array.isArray(a3) && !(a3 instanceof Date);
- }
- function subsetEquality(object, subset, customTesters = []) {
- let filteredCustomTesters = customTesters.filter((t) => t !== subsetEquality), subsetEqualityWithContext = (seenReferences = /* @__PURE__ */ new WeakMap()) => (object2, subset2) => {
- if (isObjectWithKeys(subset2))
- return Object.keys(subset2).every((key) => {
- if (subset2[key] != null && typeof subset2[key] == "object") {
- if (seenReferences.has(subset2[key]))
- return equals(object2[key], subset2[key], filteredCustomTesters);
- seenReferences.set(subset2[key], !0);
- }
- let result = object2 != null && hasPropertyInObject(object2, key) && equals(object2[key], subset2[key], [...filteredCustomTesters, subsetEqualityWithContext(seenReferences)]);
- return seenReferences.delete(subset2[key]), result;
- });
- };
- return subsetEqualityWithContext()(object, subset);
- }
- function typeEquality(a3, b) {
- if (!(a3 == null || b == null || a3.constructor === b.constructor))
- return !1;
- }
- function arrayBufferEquality(a3, b) {
- let dataViewA = a3, dataViewB = b;
- if (!(a3 instanceof DataView && b instanceof DataView)) {
- if (!(a3 instanceof ArrayBuffer) || !(b instanceof ArrayBuffer))
- return;
- try {
- dataViewA = new DataView(a3), dataViewB = new DataView(b);
- } catch {
- return;
- }
- }
- if (dataViewA.byteLength !== dataViewB.byteLength)
- return !1;
- for (let i = 0; i < dataViewA.byteLength; i++)
- if (dataViewA.getUint8(i) !== dataViewB.getUint8(i))
- return !1;
- return !0;
- }
- function sparseArrayEquality(a3, b, customTesters = []) {
- if (!Array.isArray(a3) || !Array.isArray(b))
- return;
- let aKeys = Object.keys(a3), bKeys = Object.keys(b), filteredCustomTesters = customTesters.filter((t) => t !== sparseArrayEquality);
- return equals(a3, b, filteredCustomTesters, !0) && equals(aKeys, bKeys);
- }
- function generateToBeMessage(deepEqualityName, expected = "#{this}", actual = "#{exp}") {
- let toBeMessage = `expected ${expected} to be ${actual} // Object.is equality`;
- return ["toStrictEqual", "toEqual"].includes(deepEqualityName) ? `${toBeMessage}
-
- If it should pass with deep equality, replace "toBe" with "${deepEqualityName}"
-
- Expected: ${expected}
- Received: serializes to the same string
- ` : toBeMessage;
- }
- function pluralize(word, count) {
- return `${count} ${word}${count === 1 ? "" : "s"}`;
- }
- function getObjectKeys(object) {
- return [...Object.keys(object), ...Object.getOwnPropertySymbols(object).filter((s3) => {
- var _Object$getOwnPropert;
- return (_Object$getOwnPropert = Object.getOwnPropertyDescriptor(object, s3)) === null || _Object$getOwnPropert === void 0 ? void 0 : _Object$getOwnPropert.enumerable;
- })];
- }
- function getObjectSubset(object, subset, customTesters) {
- let stripped = 0, getObjectSubsetWithContext = (seenReferences = /* @__PURE__ */ new WeakMap()) => (object2, subset2) => {
- if (Array.isArray(object2)) {
- if (Array.isArray(subset2) && subset2.length === object2.length)
- return subset2.map((sub, i) => getObjectSubsetWithContext(seenReferences)(object2[i], sub));
- } else {
- if (object2 instanceof Date)
- return object2;
- if (isObject5(object2) && isObject5(subset2)) {
- if (equals(object2, subset2, [
- ...customTesters,
- iterableEquality,
- subsetEquality
- ]))
- return subset2;
- let trimmed = {};
- seenReferences.set(object2, trimmed), typeof object2.constructor == "function" && typeof object2.constructor.name == "string" && Object.defineProperty(trimmed, "constructor", {
- enumerable: !1,
- value: object2.constructor
- });
- for (let key of getObjectKeys(object2))
- hasPropertyInObject(subset2, key) ? trimmed[key] = seenReferences.has(object2[key]) ? seenReferences.get(object2[key]) : getObjectSubsetWithContext(seenReferences)(object2[key], subset2[key]) : seenReferences.has(object2[key]) || (stripped += 1, isObject5(object2[key]) && (stripped += getObjectKeys(object2[key]).length), getObjectSubsetWithContext(seenReferences)(object2[key], subset2[key]));
- if (getObjectKeys(trimmed).length > 0)
- return trimmed;
- }
- }
- return object2;
- };
- return {
- subset: getObjectSubsetWithContext()(object, subset),
- stripped
- };
- }
- if (!Object.prototype.hasOwnProperty.call(globalThis, MATCHERS_OBJECT)) {
- let globalState = /* @__PURE__ */ new WeakMap();
- Object.defineProperty(globalThis, MATCHERS_OBJECT, { get: () => globalState });
- }
- if (!Object.prototype.hasOwnProperty.call(globalThis, JEST_MATCHERS_OBJECT)) {
- let matchers = /* @__PURE__ */ Object.create(null), customEqualityTesters = [];
- Object.defineProperty(globalThis, JEST_MATCHERS_OBJECT, {
- configurable: !0,
- get: () => ({
- state: globalThis[MATCHERS_OBJECT].get(globalThis[GLOBAL_EXPECT]),
- matchers,
- customEqualityTesters
- })
- });
- }
- if (!Object.prototype.hasOwnProperty.call(globalThis, ASYMMETRIC_MATCHERS_OBJECT)) {
- let asymmetricMatchers = /* @__PURE__ */ Object.create(null);
- Object.defineProperty(globalThis, ASYMMETRIC_MATCHERS_OBJECT, { get: () => asymmetricMatchers });
- }
- function getState(expect4) {
- return globalThis[MATCHERS_OBJECT].get(expect4);
- }
- function setState(state3, expect4) {
- let map2 = globalThis[MATCHERS_OBJECT], current = map2.get(expect4) || {}, results = Object.defineProperties(current, {
- ...Object.getOwnPropertyDescriptors(current),
- ...Object.getOwnPropertyDescriptors(state3)
- });
- map2.set(expect4, results);
- }
- var AsymmetricMatcher3 = class {
- // should have "jest" to be compatible with its ecosystem
- $$typeof = Symbol.for("jest.asymmetricMatcher");
- constructor(sample2, inverse = !1) {
- this.sample = sample2, this.inverse = inverse;
- }
- getMatcherContext(expect4) {
- return {
- ...getState(expect4 || globalThis[GLOBAL_EXPECT]),
- equals,
- isNot: this.inverse,
- customTesters: getCustomEqualityTesters(),
- utils: {
- ...getMatcherUtils(),
- diff,
- stringify: stringify5,
- iterableEquality,
- subsetEquality
- }
- };
- }
- };
- AsymmetricMatcher3.prototype[Symbol.for("chai/inspect")] = function(options) {
- let result = stringify5(this, options.depth, { min: !0 });
- return result.length <= options.truncate ? result : `${this.toString()}{\u2026}`;
- };
- var StringContaining = class extends AsymmetricMatcher3 {
- constructor(sample2, inverse = !1) {
- if (!isA("String", sample2))
- throw new Error("Expected is not a string");
- super(sample2, inverse);
- }
- asymmetricMatch(other) {
- let result = isA("String", other) && other.includes(this.sample);
- return this.inverse ? !result : result;
- }
- toString() {
- return `String${this.inverse ? "Not" : ""}Containing`;
- }
- getExpectedType() {
- return "string";
- }
- }, Anything = class extends AsymmetricMatcher3 {
- asymmetricMatch(other) {
- return other != null;
- }
- toString() {
- return "Anything";
- }
- toAsymmetricMatcher() {
- return "Anything";
- }
- }, ObjectContaining = class extends AsymmetricMatcher3 {
- constructor(sample2, inverse = !1) {
- super(sample2, inverse);
- }
- getPrototype(obj) {
- return Object.getPrototypeOf ? Object.getPrototypeOf(obj) : obj.constructor.prototype === obj ? null : obj.constructor.prototype;
- }
- hasProperty(obj, property) {
- return obj ? Object.prototype.hasOwnProperty.call(obj, property) ? !0 : this.hasProperty(this.getPrototype(obj), property) : !1;
- }
- asymmetricMatch(other) {
- if (typeof this.sample != "object")
- throw new TypeError(`You must provide an object to ${this.toString()}, not '${typeof this.sample}'.`);
- let result = !0, matcherContext = this.getMatcherContext();
- for (let property in this.sample)
- if (!this.hasProperty(other, property) || !equals(this.sample[property], other[property], matcherContext.customTesters)) {
- result = !1;
- break;
- }
- return this.inverse ? !result : result;
- }
- toString() {
- return `Object${this.inverse ? "Not" : ""}Containing`;
- }
- getExpectedType() {
- return "object";
- }
- }, ArrayContaining = class extends AsymmetricMatcher3 {
- constructor(sample2, inverse = !1) {
- super(sample2, inverse);
- }
- asymmetricMatch(other) {
- if (!Array.isArray(this.sample))
- throw new TypeError(`You must provide an array to ${this.toString()}, not '${typeof this.sample}'.`);
- let matcherContext = this.getMatcherContext(), result = this.sample.length === 0 || Array.isArray(other) && this.sample.every((item) => other.some((another) => equals(item, another, matcherContext.customTesters)));
- return this.inverse ? !result : result;
- }
- toString() {
- return `Array${this.inverse ? "Not" : ""}Containing`;
- }
- getExpectedType() {
- return "array";
- }
- }, Any = class extends AsymmetricMatcher3 {
- constructor(sample2) {
- if (typeof sample2 > "u")
- throw new TypeError("any() expects to be passed a constructor function. Please pass one or use anything() to match any object.");
- super(sample2);
- }
- fnNameFor(func) {
- if (func.name)
- return func.name;
- let matches4 = Function.prototype.toString.call(func).match(/^(?:async)?\s*function\s*(?:\*\s*)?([\w$]+)\s*\(/);
- return matches4 ? matches4[1] : "<anonymous>";
- }
- asymmetricMatch(other) {
- return this.sample === String ? typeof other == "string" || other instanceof String : this.sample === Number ? typeof other == "number" || other instanceof Number : this.sample === Function ? typeof other == "function" || typeof other == "function" : this.sample === Boolean ? typeof other == "boolean" || other instanceof Boolean : this.sample === BigInt ? typeof other == "bigint" || other instanceof BigInt : this.sample === Symbol ? typeof other == "symbol" || other instanceof Symbol : this.sample === Object ? typeof other == "object" : other instanceof this.sample;
- }
- toString() {
- return "Any";
- }
- getExpectedType() {
- return this.sample === String ? "string" : this.sample === Number ? "number" : this.sample === Function ? "function" : this.sample === Object ? "object" : this.sample === Boolean ? "boolean" : this.fnNameFor(this.sample);
- }
- toAsymmetricMatcher() {
- return `Any<${this.fnNameFor(this.sample)}>`;
- }
- }, StringMatching = class extends AsymmetricMatcher3 {
- constructor(sample2, inverse = !1) {
- if (!isA("String", sample2) && !isA("RegExp", sample2))
- throw new Error("Expected is not a String or a RegExp");
- super(new RegExp(sample2), inverse);
- }
- asymmetricMatch(other) {
- let result = isA("String", other) && this.sample.test(other);
- return this.inverse ? !result : result;
- }
- toString() {
- return `String${this.inverse ? "Not" : ""}Matching`;
- }
- getExpectedType() {
- return "string";
- }
- }, CloseTo = class extends AsymmetricMatcher3 {
- precision;
- constructor(sample2, precision = 2, inverse = !1) {
- if (!isA("Number", sample2))
- throw new Error("Expected is not a Number");
- if (!isA("Number", precision))
- throw new Error("Precision is not a Number");
- super(sample2), this.inverse = inverse, this.precision = precision;
- }
- asymmetricMatch(other) {
- if (!isA("Number", other))
- return !1;
- let result = !1;
- return other === Number.POSITIVE_INFINITY && this.sample === Number.POSITIVE_INFINITY || other === Number.NEGATIVE_INFINITY && this.sample === Number.NEGATIVE_INFINITY ? result = !0 : result = Math.abs(this.sample - other) < 10 ** -this.precision / 2, this.inverse ? !result : result;
- }
- toString() {
- return `Number${this.inverse ? "Not" : ""}CloseTo`;
- }
- getExpectedType() {
- return "number";
- }
- toAsymmetricMatcher() {
- return [
- this.toString(),
- this.sample,
- `(${pluralize("digit", this.precision)})`
- ].join(" ");
- }
- }, JestAsymmetricMatchers = (chai, utils) => {
- utils.addMethod(chai.expect, "anything", () => new Anything()), utils.addMethod(chai.expect, "any", (expected) => new Any(expected)), utils.addMethod(chai.expect, "stringContaining", (expected) => new StringContaining(expected)), utils.addMethod(chai.expect, "objectContaining", (expected) => new ObjectContaining(expected)), utils.addMethod(chai.expect, "arrayContaining", (expected) => new ArrayContaining(expected)), utils.addMethod(chai.expect, "stringMatching", (expected) => new StringMatching(expected)), utils.addMethod(chai.expect, "closeTo", (expected, precision) => new CloseTo(expected, precision)), chai.expect.not = {
- stringContaining: (expected) => new StringContaining(expected, !0),
- objectContaining: (expected) => new ObjectContaining(expected, !0),
- arrayContaining: (expected) => new ArrayContaining(expected, !0),
- stringMatching: (expected) => new StringMatching(expected, !0),
- closeTo: (expected, precision) => new CloseTo(expected, precision, !0)
- };
- };
- function createAssertionMessage(util, assertion, hasArgs) {
- let not = util.flag(assertion, "negate") ? "not." : "", name = `${util.flag(assertion, "_name")}(${hasArgs ? "expected" : ""})`, promiseName = util.flag(assertion, "promise");
- return `expect(actual)${promiseName ? `.${promiseName}` : ""}.${not}${name}`;
- }
- function recordAsyncExpect(_test, promise, assertion, error) {
- let test3 = _test;
- if (test3 && promise instanceof Promise) {
- promise = promise.finally(() => {
- if (!test3.promises)
- return;
- let index4 = test3.promises.indexOf(promise);
- index4 !== -1 && test3.promises.splice(index4, 1);
- }), test3.promises || (test3.promises = []), test3.promises.push(promise);
- let resolved = !1;
- return test3.onFinished ?? (test3.onFinished = []), test3.onFinished.push(() => {
- if (!resolved) {
- var _vitest_worker__;
- let stack = (((_vitest_worker__ = globalThis.__vitest_worker__) === null || _vitest_worker__ === void 0 ? void 0 : _vitest_worker__.onFilterStackTrace) || ((s3) => s3 || ""))(error.stack);
- console.warn([
- `Promise returned by \`${assertion}\` was not awaited. `,
- "Vitest currently auto-awaits hanging assertions at the end of the test, but this will cause the test to fail in Vitest 3. ",
- `Please remember to await the assertion.
- `,
- stack
- ].join(""));
- }
- }), {
- then(onFulfilled, onRejected) {
- return resolved = !0, promise.then(onFulfilled, onRejected);
- },
- catch(onRejected) {
- return promise.catch(onRejected);
- },
- finally(onFinally) {
- return promise.finally(onFinally);
- },
- [Symbol.toStringTag]: "Promise"
- };
- }
- return promise;
- }
- function handleTestError(test3, err) {
- var _test$result;
- test3.result || (test3.result = { state: "fail" }), test3.result.state = "fail", (_test$result = test3.result).errors || (_test$result.errors = []), test3.result.errors.push(processError(err));
- }
- function wrapAssertion(utils, name, fn4) {
- return function(...args) {
- if (name !== "withTest" && utils.flag(this, "_name", name), !utils.flag(this, "soft"))
- return fn4.apply(this, args);
- let test3 = utils.flag(this, "vitest-test");
- if (!test3)
- throw new Error("expect.soft() can only be used inside a test");
- try {
- let result = fn4.apply(this, args);
- return result && typeof result == "object" && typeof result.then == "function" ? result.then(noop2, (err) => {
- handleTestError(test3, err);
- }) : result;
- } catch (err) {
- handleTestError(test3, err);
- }
- };
- }
- var JestChaiExpect = (chai, utils) => {
- let { AssertionError: AssertionError2 } = chai, customTesters = getCustomEqualityTesters();
- function def(name, fn4) {
- let addMethod2 = (n) => {
- let softWrapper = wrapAssertion(utils, n, fn4);
- utils.addMethod(chai.Assertion.prototype, n, softWrapper), utils.addMethod(globalThis[JEST_MATCHERS_OBJECT].matchers, n, softWrapper);
- };
- Array.isArray(name) ? name.forEach((n) => addMethod2(n)) : addMethod2(name);
- }
- [
- "throw",
- "throws",
- "Throw"
- ].forEach((m3) => {
- utils.overwriteMethod(chai.Assertion.prototype, m3, (_super) => function(...args) {
- let promise = utils.flag(this, "promise"), object = utils.flag(this, "object"), isNot = utils.flag(this, "negate");
- if (promise === "rejects")
- utils.flag(this, "object", () => {
- throw object;
- });
- else if (promise === "resolves" && typeof object != "function") {
- if (isNot)
- return;
- {
- let message = utils.flag(this, "message") || "expected promise to throw an error, but it didn't", error = { showDiff: !1 };
- throw new AssertionError2(message, error, utils.flag(this, "ssfi"));
- }
- }
- _super.apply(this, args);
- });
- }), def("withTest", function(test3) {
- return utils.flag(this, "vitest-test", test3), this;
- }), def("toEqual", function(expected) {
- let actual = utils.flag(this, "object"), equal = equals(actual, expected, [...customTesters, iterableEquality]);
- return this.assert(equal, "expected #{this} to deeply equal #{exp}", "expected #{this} to not deeply equal #{exp}", expected, actual);
- }), def("toStrictEqual", function(expected) {
- let obj = utils.flag(this, "object"), equal = equals(obj, expected, [
- ...customTesters,
- iterableEquality,
- typeEquality,
- sparseArrayEquality,
- arrayBufferEquality
- ], !0);
- return this.assert(equal, "expected #{this} to strictly equal #{exp}", "expected #{this} to not strictly equal #{exp}", expected, obj);
- }), def("toBe", function(expected) {
- let actual = this._obj, pass = Object.is(actual, expected), deepEqualityName = "";
- return pass || (equals(actual, expected, [
- ...customTesters,
- iterableEquality,
- typeEquality,
- sparseArrayEquality,
- arrayBufferEquality
- ], !0) ? deepEqualityName = "toStrictEqual" : equals(actual, expected, [...customTesters, iterableEquality]) && (deepEqualityName = "toEqual")), this.assert(pass, generateToBeMessage(deepEqualityName), "expected #{this} not to be #{exp} // Object.is equality", expected, actual);
- }), def("toMatchObject", function(expected) {
- let actual = this._obj, pass = equals(actual, expected, [
- ...customTesters,
- iterableEquality,
- subsetEquality
- ]), isNot = utils.flag(this, "negate"), { subset: actualSubset, stripped } = getObjectSubset(actual, expected, customTesters);
- if (pass && isNot || !pass && !isNot) {
- let msg = utils.getMessage(this, [
- pass,
- "expected #{this} to match object #{exp}",
- "expected #{this} to not match object #{exp}",
- expected,
- actualSubset,
- !1
- ]), message = stripped === 0 ? msg : `${msg}
- (${stripped} matching ${stripped === 1 ? "property" : "properties"} omitted from actual)`;
- throw new AssertionError2(message, {
- showDiff: !0,
- expected,
- actual: actualSubset
- });
- }
- }), def("toMatch", function(expected) {
- let actual = this._obj;
- if (typeof actual != "string")
- throw new TypeError(`.toMatch() expects to receive a string, but got ${typeof actual}`);
- return this.assert(typeof expected == "string" ? actual.includes(expected) : actual.match(expected), "expected #{this} to match #{exp}", "expected #{this} not to match #{exp}", expected, actual);
- }), def("toContain", function(item) {
- let actual = this._obj;
- if (typeof Node < "u" && actual instanceof Node) {
- if (!(item instanceof Node))
- throw new TypeError(`toContain() expected a DOM node as the argument, but got ${typeof item}`);
- return this.assert(actual.contains(item), "expected #{this} to contain element #{exp}", "expected #{this} not to contain element #{exp}", item, actual);
- }
- if (typeof DOMTokenList < "u" && actual instanceof DOMTokenList) {
- assertTypes(item, "class name", ["string"]);
- let expectedClassList = utils.flag(this, "negate") ? actual.value.replace(item, "").trim() : `${actual.value} ${item}`;
- return this.assert(actual.contains(item), `expected "${actual.value}" to contain "${item}"`, `expected "${actual.value}" not to contain "${item}"`, expectedClassList, actual.value);
- }
- return typeof actual == "string" && typeof item == "string" ? this.assert(actual.includes(item), "expected #{this} to contain #{exp}", "expected #{this} not to contain #{exp}", item, actual) : (actual != null && typeof actual != "string" && utils.flag(this, "object", Array.from(actual)), this.contain(item));
- }), def("toContainEqual", function(expected) {
- let obj = utils.flag(this, "object"), index4 = Array.from(obj).findIndex((item) => equals(item, expected, customTesters));
- this.assert(index4 !== -1, "expected #{this} to deep equally contain #{exp}", "expected #{this} to not deep equally contain #{exp}", expected);
- }), def("toBeTruthy", function() {
- let obj = utils.flag(this, "object");
- this.assert(!!obj, "expected #{this} to be truthy", "expected #{this} to not be truthy", !0, obj);
- }), def("toBeFalsy", function() {
- let obj = utils.flag(this, "object");
- this.assert(!obj, "expected #{this} to be falsy", "expected #{this} to not be falsy", !1, obj);
- }), def("toBeGreaterThan", function(expected) {
- let actual = this._obj;
- return assertTypes(actual, "actual", ["number", "bigint"]), assertTypes(expected, "expected", ["number", "bigint"]), this.assert(actual > expected, `expected ${actual} to be greater than ${expected}`, `expected ${actual} to be not greater than ${expected}`, expected, actual, !1);
- }), def("toBeGreaterThanOrEqual", function(expected) {
- let actual = this._obj;
- return assertTypes(actual, "actual", ["number", "bigint"]), assertTypes(expected, "expected", ["number", "bigint"]), this.assert(actual >= expected, `expected ${actual} to be greater than or equal to ${expected}`, `expected ${actual} to be not greater than or equal to ${expected}`, expected, actual, !1);
- }), def("toBeLessThan", function(expected) {
- let actual = this._obj;
- return assertTypes(actual, "actual", ["number", "bigint"]), assertTypes(expected, "expected", ["number", "bigint"]), this.assert(actual < expected, `expected ${actual} to be less than ${expected}`, `expected ${actual} to be not less than ${expected}`, expected, actual, !1);
- }), def("toBeLessThanOrEqual", function(expected) {
- let actual = this._obj;
- return assertTypes(actual, "actual", ["number", "bigint"]), assertTypes(expected, "expected", ["number", "bigint"]), this.assert(actual <= expected, `expected ${actual} to be less than or equal to ${expected}`, `expected ${actual} to be not less than or equal to ${expected}`, expected, actual, !1);
- }), def("toBeNaN", function() {
- let obj = utils.flag(this, "object");
- this.assert(Number.isNaN(obj), "expected #{this} to be NaN", "expected #{this} not to be NaN", Number.NaN, obj);
- }), def("toBeUndefined", function() {
- let obj = utils.flag(this, "object");
- this.assert(obj === void 0, "expected #{this} to be undefined", "expected #{this} not to be undefined", void 0, obj);
- }), def("toBeNull", function() {
- let obj = utils.flag(this, "object");
- this.assert(obj === null, "expected #{this} to be null", "expected #{this} not to be null", null, obj);
- }), def("toBeDefined", function() {
- let obj = utils.flag(this, "object");
- this.assert(typeof obj < "u", "expected #{this} to be defined", "expected #{this} to be undefined", obj);
- }), def("toBeTypeOf", function(expected) {
- let actual = typeof this._obj, equal = expected === actual;
- return this.assert(equal, "expected #{this} to be type of #{exp}", "expected #{this} not to be type of #{exp}", expected, actual);
- }), def("toBeInstanceOf", function(obj) {
- return this.instanceOf(obj);
- }), def("toHaveLength", function(length2) {
- return this.have.length(length2);
- }), def("toHaveProperty", function(...args) {
- Array.isArray(args[0]) && (args[0] = args[0].map((key) => String(key).replace(/([.[\]])/g, "\\$1")).join("."));
- let actual = this._obj, [propertyName, expected] = args, getValue2 = () => Object.prototype.hasOwnProperty.call(actual, propertyName) ? {
- value: actual[propertyName],
- exists: !0
- } : utils.getPathInfo(actual, propertyName), { value, exists } = getValue2(), pass = exists && (args.length === 1 || equals(expected, value, customTesters)), valueString = args.length === 1 ? "" : ` with value ${utils.objDisplay(expected)}`;
- return this.assert(pass, `expected #{this} to have property "${propertyName}"${valueString}`, `expected #{this} to not have property "${propertyName}"${valueString}`, expected, exists ? value : void 0);
- }), def("toBeCloseTo", function(received, precision = 2) {
- let expected = this._obj, pass = !1, expectedDiff2 = 0, receivedDiff = 0;
- return received === Number.POSITIVE_INFINITY && expected === Number.POSITIVE_INFINITY || received === Number.NEGATIVE_INFINITY && expected === Number.NEGATIVE_INFINITY ? pass = !0 : (expectedDiff2 = 10 ** -precision / 2, receivedDiff = Math.abs(expected - received), pass = receivedDiff < expectedDiff2), this.assert(pass, `expected #{this} to be close to #{exp}, received difference is ${receivedDiff}, but expected ${expectedDiff2}`, `expected #{this} to not be close to #{exp}, received difference is ${receivedDiff}, but expected ${expectedDiff2}`, received, expected, !1);
- });
- function assertIsMock(assertion) {
- if (!isMockFunction2(assertion._obj))
- throw new TypeError(`${utils.inspect(assertion._obj)} is not a spy or a call to a spy!`);
- }
- function getSpy(assertion) {
- return assertIsMock(assertion), assertion._obj;
- }
- def(["toHaveBeenCalledTimes", "toBeCalledTimes"], function(number) {
- let spy = getSpy(this), spyName = spy.getMockName(), callCount = spy.mock.calls.length;
- return this.assert(callCount === number, `expected "${spyName}" to be called #{exp} times, but got ${callCount} times`, `expected "${spyName}" to not be called #{exp} times`, number, callCount, !1);
- }), def("toHaveBeenCalledOnce", function() {
- let spy = getSpy(this), spyName = spy.getMockName(), callCount = spy.mock.calls.length;
- return this.assert(callCount === 1, `expected "${spyName}" to be called once, but got ${callCount} times`, `expected "${spyName}" to not be called once`, 1, callCount, !1);
- }), def(["toHaveBeenCalled", "toBeCalled"], function() {
- let spy = getSpy(this), spyName = spy.getMockName(), callCount = spy.mock.calls.length, called = callCount > 0, isNot = utils.flag(this, "negate"), msg = utils.getMessage(this, [
- called,
- `expected "${spyName}" to be called at least once`,
- `expected "${spyName}" to not be called at all, but actually been called ${callCount} times`,
- !0,
- called
- ]);
- if (called && isNot && (msg = formatCalls(spy, msg)), called && isNot || !called && !isNot)
- throw new AssertionError2(msg);
- });
- function equalsArgumentArray(a3, b) {
- return a3.length === b.length && a3.every((aItem, i) => equals(aItem, b[i], [...customTesters, iterableEquality]));
- }
- def(["toHaveBeenCalledWith", "toBeCalledWith"], function(...args) {
- let spy = getSpy(this), spyName = spy.getMockName(), pass = spy.mock.calls.some((callArg) => equalsArgumentArray(callArg, args)), isNot = utils.flag(this, "negate"), msg = utils.getMessage(this, [
- pass,
- `expected "${spyName}" to be called with arguments: #{exp}`,
- `expected "${spyName}" to not be called with arguments: #{exp}`,
- args
- ]);
- if (pass && isNot || !pass && !isNot)
- throw new AssertionError2(formatCalls(spy, msg, args));
- }), def("toHaveBeenCalledExactlyOnceWith", function(...args) {
- let spy = getSpy(this), spyName = spy.getMockName(), callCount = spy.mock.calls.length, pass = spy.mock.calls.some((callArg) => equalsArgumentArray(callArg, args)) && callCount === 1, isNot = utils.flag(this, "negate"), msg = utils.getMessage(this, [
- pass,
- `expected "${spyName}" to be called once with arguments: #{exp}`,
- `expected "${spyName}" to not be called once with arguments: #{exp}`,
- args
- ]);
- if (pass && isNot || !pass && !isNot)
- throw new AssertionError2(formatCalls(spy, msg, args));
- }), def(["toHaveBeenNthCalledWith", "nthCalledWith"], function(times, ...args) {
- let spy = getSpy(this), spyName = spy.getMockName(), nthCall = spy.mock.calls[times - 1], callCount = spy.mock.calls.length, isCalled = times <= callCount;
- this.assert(nthCall && equalsArgumentArray(nthCall, args), `expected ${ordinalOf(times)} "${spyName}" call to have been called with #{exp}${isCalled ? "" : `, but called only ${callCount} times`}`, `expected ${ordinalOf(times)} "${spyName}" call to not have been called with #{exp}`, args, nthCall, isCalled);
- }), def(["toHaveBeenLastCalledWith", "lastCalledWith"], function(...args) {
- let spy = getSpy(this), spyName = spy.getMockName(), lastCall = spy.mock.calls[spy.mock.calls.length - 1];
- this.assert(lastCall && equalsArgumentArray(lastCall, args), `expected last "${spyName}" call to have been called with #{exp}`, `expected last "${spyName}" call to not have been called with #{exp}`, args, lastCall);
- });
- function isSpyCalledBeforeAnotherSpy(beforeSpy, afterSpy, failIfNoFirstInvocation) {
- let beforeInvocationCallOrder = beforeSpy.mock.invocationCallOrder, afterInvocationCallOrder = afterSpy.mock.invocationCallOrder;
- return beforeInvocationCallOrder.length === 0 ? !failIfNoFirstInvocation : afterInvocationCallOrder.length === 0 ? !1 : beforeInvocationCallOrder[0] < afterInvocationCallOrder[0];
- }
- def(["toHaveBeenCalledBefore"], function(resultSpy, failIfNoFirstInvocation = !0) {
- let expectSpy = getSpy(this);
- if (!isMockFunction2(resultSpy))
- throw new TypeError(`${utils.inspect(resultSpy)} is not a spy or a call to a spy`);
- this.assert(isSpyCalledBeforeAnotherSpy(expectSpy, resultSpy, failIfNoFirstInvocation), `expected "${expectSpy.getMockName()}" to have been called before "${resultSpy.getMockName()}"`, `expected "${expectSpy.getMockName()}" to not have been called before "${resultSpy.getMockName()}"`, resultSpy, expectSpy);
- }), def(["toHaveBeenCalledAfter"], function(resultSpy, failIfNoFirstInvocation = !0) {
- let expectSpy = getSpy(this);
- if (!isMockFunction2(resultSpy))
- throw new TypeError(`${utils.inspect(resultSpy)} is not a spy or a call to a spy`);
- this.assert(isSpyCalledBeforeAnotherSpy(resultSpy, expectSpy, failIfNoFirstInvocation), `expected "${expectSpy.getMockName()}" to have been called after "${resultSpy.getMockName()}"`, `expected "${expectSpy.getMockName()}" to not have been called after "${resultSpy.getMockName()}"`, resultSpy, expectSpy);
- }), def(["toThrow", "toThrowError"], function(expected) {
- if (typeof expected == "string" || typeof expected > "u" || expected instanceof RegExp)
- return this.throws(expected === "" ? /^$/ : expected);
- let obj = this._obj, promise = utils.flag(this, "promise"), isNot = utils.flag(this, "negate"), thrown = null;
- if (promise === "rejects")
- thrown = obj;
- else if (promise === "resolves" && typeof obj != "function") {
- if (isNot)
- return;
- {
- let message = utils.flag(this, "message") || "expected promise to throw an error, but it didn't", error = { showDiff: !1 };
- throw new AssertionError2(message, error, utils.flag(this, "ssfi"));
- }
- } else {
- let isThrow = !1;
- try {
- obj();
- } catch (err) {
- isThrow = !0, thrown = err;
- }
- if (!isThrow && !isNot) {
- let message = utils.flag(this, "message") || "expected function to throw an error, but it didn't", error = { showDiff: !1 };
- throw new AssertionError2(message, error, utils.flag(this, "ssfi"));
- }
- }
- if (typeof expected == "function") {
- let name = expected.name || expected.prototype.constructor.name;
- return this.assert(thrown && thrown instanceof expected, `expected error to be instance of ${name}`, `expected error not to be instance of ${name}`, expected, thrown);
- }
- if (expected instanceof Error) {
- let equal = equals(thrown, expected, [...customTesters, iterableEquality]);
- return this.assert(equal, "expected a thrown error to be #{exp}", "expected a thrown error not to be #{exp}", expected, thrown);
- }
- if (typeof expected == "object" && "asymmetricMatch" in expected && typeof expected.asymmetricMatch == "function") {
- let matcher = expected;
- return this.assert(thrown && matcher.asymmetricMatch(thrown), "expected error to match asymmetric matcher", "expected error not to match asymmetric matcher", matcher, thrown);
- }
- throw new Error(`"toThrow" expects string, RegExp, function, Error instance or asymmetric matcher, got "${typeof expected}"`);
- }), [{
- name: "toHaveResolved",
- condition: (spy) => spy.mock.settledResults.length > 0 && spy.mock.settledResults.some(({ type: type5 }) => type5 === "fulfilled"),
- action: "resolved"
- }, {
- name: ["toHaveReturned", "toReturn"],
- condition: (spy) => spy.mock.calls.length > 0 && spy.mock.results.some(({ type: type5 }) => type5 !== "throw"),
- action: "called"
- }].forEach(({ name, condition, action: action2 }) => {
- def(name, function() {
- let spy = getSpy(this), spyName = spy.getMockName(), pass = condition(spy);
- this.assert(pass, `expected "${spyName}" to be successfully ${action2} at least once`, `expected "${spyName}" to not be successfully ${action2}`, pass, !pass, !1);
- });
- }), [{
- name: "toHaveResolvedTimes",
- condition: (spy, times) => spy.mock.settledResults.reduce((s3, { type: type5 }) => type5 === "fulfilled" ? ++s3 : s3, 0) === times,
- action: "resolved"
- }, {
- name: ["toHaveReturnedTimes", "toReturnTimes"],
- condition: (spy, times) => spy.mock.results.reduce((s3, { type: type5 }) => type5 === "throw" ? s3 : ++s3, 0) === times,
- action: "called"
- }].forEach(({ name, condition, action: action2 }) => {
- def(name, function(times) {
- let spy = getSpy(this), spyName = spy.getMockName(), pass = condition(spy, times);
- this.assert(pass, `expected "${spyName}" to be successfully ${action2} ${times} times`, `expected "${spyName}" to not be successfully ${action2} ${times} times`, `expected resolved times: ${times}`, `received resolved times: ${pass}`, !1);
- });
- }), [{
- name: "toHaveResolvedWith",
- condition: (spy, value) => spy.mock.settledResults.some(({ type: type5, value: result }) => type5 === "fulfilled" && equals(value, result)),
- action: "resolve"
- }, {
- name: ["toHaveReturnedWith", "toReturnWith"],
- condition: (spy, value) => spy.mock.results.some(({ type: type5, value: result }) => type5 === "return" && equals(value, result)),
- action: "return"
- }].forEach(({ name, condition, action: action2 }) => {
- def(name, function(value) {
- let spy = getSpy(this), pass = condition(spy, value), isNot = utils.flag(this, "negate");
- if (pass && isNot || !pass && !isNot) {
- let spyName = spy.getMockName(), msg = utils.getMessage(this, [
- pass,
- `expected "${spyName}" to ${action2} with: #{exp} at least once`,
- `expected "${spyName}" to not ${action2} with: #{exp}`,
- value
- ]), results = action2 === "return" ? spy.mock.results : spy.mock.settledResults;
- throw new AssertionError2(formatReturns(spy, results, msg, value));
- }
- });
- }), [{
- name: "toHaveLastResolvedWith",
- condition: (spy, value) => {
- let result = spy.mock.settledResults[spy.mock.settledResults.length - 1];
- return result && result.type === "fulfilled" && equals(result.value, value);
- },
- action: "resolve"
- }, {
- name: ["toHaveLastReturnedWith", "lastReturnedWith"],
- condition: (spy, value) => {
- let result = spy.mock.results[spy.mock.results.length - 1];
- return result && result.type === "return" && equals(result.value, value);
- },
- action: "return"
- }].forEach(({ name, condition, action: action2 }) => {
- def(name, function(value) {
- let spy = getSpy(this), results = action2 === "return" ? spy.mock.results : spy.mock.settledResults, result = results[results.length - 1], spyName = spy.getMockName();
- this.assert(condition(spy, value), `expected last "${spyName}" call to ${action2} #{exp}`, `expected last "${spyName}" call to not ${action2} #{exp}`, value, result?.value);
- });
- }), [{
- name: "toHaveNthResolvedWith",
- condition: (spy, index4, value) => {
- let result = spy.mock.settledResults[index4 - 1];
- return result && result.type === "fulfilled" && equals(result.value, value);
- },
- action: "resolve"
- }, {
- name: ["toHaveNthReturnedWith", "nthReturnedWith"],
- condition: (spy, index4, value) => {
- let result = spy.mock.results[index4 - 1];
- return result && result.type === "return" && equals(result.value, value);
- },
- action: "return"
- }].forEach(({ name, condition, action: action2 }) => {
- def(name, function(nthCall, value) {
- let spy = getSpy(this), spyName = spy.getMockName(), result = (action2 === "return" ? spy.mock.results : spy.mock.settledResults)[nthCall - 1], ordinalCall = `${ordinalOf(nthCall)} call`;
- this.assert(condition(spy, nthCall, value), `expected ${ordinalCall} "${spyName}" call to ${action2} #{exp}`, `expected ${ordinalCall} "${spyName}" call to not ${action2} #{exp}`, value, result?.value);
- });
- }), def("withContext", function(context) {
- for (let key in context)
- utils.flag(this, key, context[key]);
- return this;
- }), utils.addProperty(chai.Assertion.prototype, "resolves", function() {
- let error = new Error("resolves");
- utils.flag(this, "promise", "resolves"), utils.flag(this, "error", error);
- let test3 = utils.flag(this, "vitest-test"), obj = utils.flag(this, "object");
- if (utils.flag(this, "poll"))
- throw new SyntaxError("expect.poll() is not supported in combination with .resolves");
- if (typeof obj?.then != "function")
- throw new TypeError(`You must provide a Promise to expect() when using .resolves, not '${typeof obj}'.`);
- let proxy = new Proxy(this, { get: (target, key, receiver) => {
- let result = Reflect.get(target, key, receiver);
- return typeof result != "function" ? result instanceof chai.Assertion ? proxy : result : (...args) => {
- utils.flag(this, "_name", key);
- let promise = obj.then((value) => (utils.flag(this, "object", value), result.call(this, ...args)), (err) => {
- let _error = new AssertionError2(`promise rejected "${utils.inspect(err)}" instead of resolving`, { showDiff: !1 });
- throw _error.cause = err, _error.stack = error.stack.replace(error.message, _error.message), _error;
- });
- return recordAsyncExpect(test3, promise, createAssertionMessage(utils, this, !!args.length), error);
- };
- } });
- return proxy;
- }), utils.addProperty(chai.Assertion.prototype, "rejects", function() {
- let error = new Error("rejects");
- utils.flag(this, "promise", "rejects"), utils.flag(this, "error", error);
- let test3 = utils.flag(this, "vitest-test"), obj = utils.flag(this, "object"), wrapper = typeof obj == "function" ? obj() : obj;
- if (utils.flag(this, "poll"))
- throw new SyntaxError("expect.poll() is not supported in combination with .rejects");
- if (typeof wrapper?.then != "function")
- throw new TypeError(`You must provide a Promise to expect() when using .rejects, not '${typeof wrapper}'.`);
- let proxy = new Proxy(this, { get: (target, key, receiver) => {
- let result = Reflect.get(target, key, receiver);
- return typeof result != "function" ? result instanceof chai.Assertion ? proxy : result : (...args) => {
- utils.flag(this, "_name", key);
- let promise = wrapper.then((value) => {
- let _error = new AssertionError2(`promise resolved "${utils.inspect(value)}" instead of rejecting`, {
- showDiff: !0,
- expected: new Error("rejected promise"),
- actual: value
- });
- throw _error.stack = error.stack.replace(error.message, _error.message), _error;
- }, (err) => (utils.flag(this, "object", err), result.call(this, ...args)));
- return recordAsyncExpect(test3, promise, createAssertionMessage(utils, this, !!args.length), error);
- };
- } });
- return proxy;
- });
- };
- function ordinalOf(i) {
- let j = i % 10, k = i % 100;
- return j === 1 && k !== 11 ? `${i}st` : j === 2 && k !== 12 ? `${i}nd` : j === 3 && k !== 13 ? `${i}rd` : `${i}th`;
- }
- function formatCalls(spy, msg, showActualCall) {
- return spy.mock.calls.length && (msg += s2.gray(`
-
- Received:
-
- ${spy.mock.calls.map((callArg, i) => {
- let methodCall = s2.bold(` ${ordinalOf(i + 1)} ${spy.getMockName()} call:
-
- `);
- return showActualCall ? methodCall += diff(showActualCall, callArg, { omitAnnotationLines: !0 }) : methodCall += stringify5(callArg).split(`
- `).map((line2) => ` ${line2}`).join(`
- `), methodCall += `
- `, methodCall;
- }).join(`
- `)}`)), msg += s2.gray(`
-
- Number of calls: ${s2.bold(spy.mock.calls.length)}
- `), msg;
- }
- function formatReturns(spy, results, msg, showActualReturn) {
- return results.length && (msg += s2.gray(`
-
- Received:
-
- ${results.map((callReturn, i) => {
- let methodCall = s2.bold(` ${ordinalOf(i + 1)} ${spy.getMockName()} call return:
-
- `);
- return showActualReturn ? methodCall += diff(showActualReturn, callReturn.value, { omitAnnotationLines: !0 }) : methodCall += stringify5(callReturn).split(`
- `).map((line2) => ` ${line2}`).join(`
- `), methodCall += `
- `, methodCall;
- }).join(`
- `)}`)), msg += s2.gray(`
-
- Number of calls: ${s2.bold(spy.mock.calls.length)}
- `), msg;
- }
- function getMatcherState(assertion, expect4) {
- let obj = assertion._obj, isNot = utils_exports.flag(assertion, "negate"), promise = utils_exports.flag(assertion, "promise") || "", jestUtils = {
- ...getMatcherUtils(),
- diff,
- stringify: stringify5,
- iterableEquality,
- subsetEquality
- };
- return {
- state: {
- ...getState(expect4),
- customTesters: getCustomEqualityTesters(),
- isNot,
- utils: jestUtils,
- promise,
- equals,
- suppressedErrors: [],
- soft: utils_exports.flag(assertion, "soft"),
- poll: utils_exports.flag(assertion, "poll")
- },
- isNot,
- obj
- };
- }
- var JestExtendError = class extends Error {
- constructor(message, actual, expected) {
- super(message), this.actual = actual, this.expected = expected;
- }
- };
- function JestExtendPlugin(c, expect4, matchers) {
- return (_, utils) => {
- Object.entries(matchers).forEach(([expectAssertionName, expectAssertion]) => {
- function expectWrapper(...args) {
- let { state: state3, isNot, obj } = getMatcherState(this, expect4), result = expectAssertion.call(state3, obj, ...args);
- if (result && typeof result == "object" && typeof result.then == "function")
- return result.then(({ pass: pass2, message: message2, actual: actual2, expected: expected2 }) => {
- if (pass2 && isNot || !pass2 && !isNot)
- throw new JestExtendError(message2(), actual2, expected2);
- });
- let { pass, message, actual, expected } = result;
- if (pass && isNot || !pass && !isNot)
- throw new JestExtendError(message(), actual, expected);
- }
- let softWrapper = wrapAssertion(utils, expectAssertionName, expectWrapper);
- utils.addMethod(globalThis[JEST_MATCHERS_OBJECT].matchers, expectAssertionName, softWrapper), utils.addMethod(c.Assertion.prototype, expectAssertionName, softWrapper);
- class CustomMatcher extends AsymmetricMatcher3 {
- constructor(inverse = !1, ...sample2) {
- super(sample2, inverse);
- }
- asymmetricMatch(other) {
- let { pass } = expectAssertion.call(this.getMatcherContext(expect4), other, ...this.sample);
- return this.inverse ? !pass : pass;
- }
- toString() {
- return `${this.inverse ? "not." : ""}${expectAssertionName}`;
- }
- getExpectedType() {
- return "any";
- }
- toAsymmetricMatcher() {
- return `${this.toString()}<${this.sample.map((item) => stringify5(item)).join(", ")}>`;
- }
- }
- let customMatcher = (...sample2) => new CustomMatcher(!1, ...sample2);
- Object.defineProperty(expect4, expectAssertionName, {
- configurable: !0,
- enumerable: !0,
- value: customMatcher,
- writable: !0
- }), Object.defineProperty(expect4.not, expectAssertionName, {
- configurable: !0,
- enumerable: !0,
- value: (...sample2) => new CustomMatcher(!0, ...sample2),
- writable: !0
- }), Object.defineProperty(globalThis[ASYMMETRIC_MATCHERS_OBJECT], expectAssertionName, {
- configurable: !0,
- enumerable: !0,
- value: customMatcher,
- writable: !0
- });
- });
- };
- }
- var JestExtend = (chai, utils) => {
- utils.addMethod(chai.expect, "extend", (expect4, expects) => {
- use2(JestExtendPlugin(chai, expect4, expects));
- });
- };
-
- // src/test/expect.ts
- function createExpect() {
- use2(JestExtend), use2(JestChaiExpect), use2(JestAsymmetricMatchers);
- let expect4 = ((value, message) => {
- let { assertionCalls } = getState(expect4);
- return setState({ assertionCalls: assertionCalls + 1, soft: !1 }, expect4), expect(value, message);
- });
- Object.assign(expect4, expect), expect4.getState = () => getState(expect4), expect4.setState = (state3) => setState(state3, expect4), expect4.extend = (expects) => expect.extend(expect4, expects), expect4.soft = (...args) => {
- let assert3 = expect4(...args);
- return expect4.setState({
- soft: !0
- }), assert3;
- }, expect4.extend(customMatchers), expect4.unreachable = (message) => {
- assert.fail(`expected${message ? ` "${message}" ` : " "}not to be reached`);
- };
- function assertions(expected) {
- let errorGen = () => new Error(
- `expected number of assertions to be ${expected}, but got ${expect4.getState().assertionCalls}`
- );
- "captureStackTrace" in Error && typeof Error.captureStackTrace == "function" && Error.captureStackTrace(errorGen(), assertions), expect4.setState({
- expectedAssertionsNumber: expected,
- expectedAssertionsNumberErrorGen: errorGen
- });
- }
- function hasAssertions() {
- let error = new Error("expected any number of assertion, but got none");
- "captureStackTrace" in Error && typeof Error.captureStackTrace == "function" && Error.captureStackTrace(error, hasAssertions), expect4.setState({
- isExpectingAssertions: !0,
- isExpectingAssertionsError: error
- });
- }
- return setState(
- {
- // this should also add "snapshotState" that is added conditionally
- assertionCalls: 0,
- isExpectingAssertions: !1,
- isExpectingAssertionsError: null,
- expectedAssertionsNumber: null,
- expectedAssertionsNumberErrorGen: null
- },
- expect4
- ), utils_exports.addMethod(expect4, "assertions", assertions), utils_exports.addMethod(expect4, "hasAssertions", hasAssertions), expect4.extend(matchers_exports), expect4;
- }
- var expect2 = createExpect();
- Object.defineProperty(globalThis, GLOBAL_EXPECT, {
- value: expect2,
- writable: !0,
- configurable: !0
- });
-
- // ../../node_modules/tinyspy/dist/index.js
- function f3(e, t, n) {
- Object.defineProperty(e, t, n);
- }
- var u = Symbol.for("tinyspy:spy");
- var P2 = (e) => {
- e.called = !1, e.callCount = 0, e.calls = [], e.results = [], e.resolves = [], e.next = [];
- }, K = (e) => (f3(e, u, { value: { reset: () => P2(e[u]) } }), e[u]), T = (e) => e[u] || K(e);
-
- // src/test/spy.ts
- var moduleMockSpies = globalThis.__STORYBOOK_MODULE_MOCK_SPIES__ ??= /* @__PURE__ */ new Set(), listeners = /* @__PURE__ */ new Set();
- function onMockCall(callback) {
- return listeners.add(callback), () => void listeners.delete(callback);
- }
- var spyOn2 = (...args) => {
- let mock = spyOn(...args);
- return reactiveMock(mock);
- };
- function fn2(implementation) {
- let mock = implementation ? fn(implementation) : fn();
- return reactiveMock(mock);
- }
- function reactiveMock(mock) {
- let reactive = listenWhenCalled(mock), originalMockImplementation = reactive.mockImplementation.bind(null);
- return reactive.mockImplementation = (fn4) => listenWhenCalled(originalMockImplementation(fn4)), reactive;
- }
- function listenWhenCalled(mock) {
- let state3 = T(mock), impl = state3.impl;
- return state3.willCall(function(...args) {
- return listeners.forEach((listener) => listener(mock, args)), impl?.apply(this, args);
- }), mock;
- }
- function clearAllMocks() {
- mocks.forEach((spy) => spy.mockClear()), moduleMockSpies.forEach((spy) => spy.mockClear());
- }
- function resetAllMocks() {
- mocks.forEach((spy) => spy.mockReset()), moduleMockSpies.forEach((spy) => spy.mockReset());
- }
- function restoreAllMocks() {
- mocks.forEach((spy) => spy.mockRestore()), moduleMockSpies.forEach((spy) => spy.mockClear());
- }
- function mocked(item, _options = {}) {
- return item;
- }
-
- // ../../node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js
- var dom_esm_exports = {};
- __export(dom_esm_exports, {
- buildQueries: () => buildQueries,
- configure: () => configure,
- createEvent: () => createEvent,
- findAllByAltText: () => findAllByAltText,
- findAllByDisplayValue: () => findAllByDisplayValue,
- findAllByLabelText: () => findAllByLabelText,
- findAllByPlaceholderText: () => findAllByPlaceholderText,
- findAllByRole: () => findAllByRole,
- findAllByTestId: () => findAllByTestId,
- findAllByText: () => findAllByText,
- findAllByTitle: () => findAllByTitle,
- findByAltText: () => findByAltText,
- findByDisplayValue: () => findByDisplayValue,
- findByLabelText: () => findByLabelText,
- findByPlaceholderText: () => findByPlaceholderText,
- findByRole: () => findByRole,
- findByTestId: () => findByTestId,
- findByText: () => findByText,
- findByTitle: () => findByTitle,
- fireEvent: () => fireEvent,
- getAllByAltText: () => getAllByAltText,
- getAllByDisplayValue: () => getAllByDisplayValue,
- getAllByLabelText: () => getAllByLabelTextWithSuggestions,
- getAllByPlaceholderText: () => getAllByPlaceholderText,
- getAllByRole: () => getAllByRole,
- getAllByTestId: () => getAllByTestId,
- getAllByText: () => getAllByText,
- getAllByTitle: () => getAllByTitle,
- getByAltText: () => getByAltText,
- getByDisplayValue: () => getByDisplayValue,
- getByLabelText: () => getByLabelTextWithSuggestions,
- getByPlaceholderText: () => getByPlaceholderText,
- getByRole: () => getByRole,
- getByTestId: () => getByTestId,
- getByText: () => getByText,
- getByTitle: () => getByTitle,
- getConfig: () => getConfig2,
- getDefaultNormalizer: () => getDefaultNormalizer,
- getElementError: () => getElementError,
- getMultipleElementsFoundError: () => getMultipleElementsFoundError,
- getNodeText: () => getNodeText,
- getQueriesForElement: () => getQueriesForElement,
- getRoles: () => getRoles,
- getSuggestedQuery: () => getSuggestedQuery,
- isInaccessible: () => isInaccessible,
- logDOM: () => logDOM,
- logRoles: () => logRoles,
- makeFindQuery: () => makeFindQuery,
- makeGetAllQuery: () => makeGetAllQuery,
- makeSingleQuery: () => makeSingleQuery,
- prettyDOM: () => prettyDOM,
- prettyFormat: () => prettyFormat,
- queries: () => queries,
- queryAllByAltText: () => queryAllByAltTextWithSuggestions,
- queryAllByAttribute: () => queryAllByAttribute,
- queryAllByDisplayValue: () => queryAllByDisplayValueWithSuggestions,
- queryAllByLabelText: () => queryAllByLabelTextWithSuggestions,
- queryAllByPlaceholderText: () => queryAllByPlaceholderTextWithSuggestions,
- queryAllByRole: () => queryAllByRoleWithSuggestions,
- queryAllByTestId: () => queryAllByTestIdWithSuggestions,
- queryAllByText: () => queryAllByTextWithSuggestions,
- queryAllByTitle: () => queryAllByTitleWithSuggestions,
- queryByAltText: () => queryByAltText,
- queryByAttribute: () => queryByAttribute,
- queryByDisplayValue: () => queryByDisplayValue,
- queryByLabelText: () => queryByLabelText,
- queryByPlaceholderText: () => queryByPlaceholderText,
- queryByRole: () => queryByRole,
- queryByTestId: () => queryByTestId,
- queryByText: () => queryByText,
- queryByTitle: () => queryByTitle,
- queryHelpers: () => queryHelpers,
- screen: () => screen,
- waitFor: () => waitForWrapper,
- waitForElementToBeRemoved: () => waitForElementToBeRemoved,
- within: () => getQueriesForElement,
- wrapAllByQueryWithSuggestion: () => wrapAllByQueryWithSuggestion,
- wrapSingleQueryWithSuggestion: () => wrapSingleQueryWithSuggestion
- });
- var prettyFormat = __toESM(require_build());
-
- // ../../node_modules/dom-accessibility-api/dist/polyfills/array.from.mjs
- var toStr2 = Object.prototype.toString;
- function isCallable2(fn4) {
- return typeof fn4 == "function" || toStr2.call(fn4) === "[object Function]";
- }
- function toInteger2(value) {
- var number = Number(value);
- return isNaN(number) ? 0 : number === 0 || !isFinite(number) ? number : (number > 0 ? 1 : -1) * Math.floor(Math.abs(number));
- }
- var maxSafeInteger2 = Math.pow(2, 53) - 1;
- function toLength2(value) {
- var len = toInteger2(value);
- return Math.min(Math.max(len, 0), maxSafeInteger2);
- }
- function arrayFrom2(arrayLike, mapFn) {
- var C3 = Array, items = Object(arrayLike);
- if (arrayLike == null)
- throw new TypeError("Array.from requires an array-like object - not null or undefined");
- if (typeof mapFn < "u" && !isCallable2(mapFn))
- throw new TypeError("Array.from: when provided, the second argument must be a function");
- for (var len = toLength2(items.length), A3 = isCallable2(C3) ? Object(new C3(len)) : new Array(len), k = 0, kValue; k < len; )
- kValue = items[k], mapFn ? A3[k] = mapFn(kValue, k) : A3[k] = kValue, k += 1;
- return A3.length = len, A3;
- }
-
- // ../../node_modules/dom-accessibility-api/dist/polyfills/SetLike.mjs
- function _typeof4(obj) {
- "@babel/helpers - typeof";
- return _typeof4 = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(obj2) {
- return typeof obj2;
- } : function(obj2) {
- return obj2 && typeof Symbol == "function" && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2;
- }, _typeof4(obj);
- }
- function _classCallCheck2(instance, Constructor) {
- if (!(instance instanceof Constructor))
- throw new TypeError("Cannot call a class as a function");
- }
- function _defineProperties2(target, props) {
- for (var i = 0; i < props.length; i++) {
- var descriptor = props[i];
- descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0, "value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, _toPropertyKey3(descriptor.key), descriptor);
- }
- }
- function _createClass2(Constructor, protoProps, staticProps) {
- return protoProps && _defineProperties2(Constructor.prototype, protoProps), staticProps && _defineProperties2(Constructor, staticProps), Object.defineProperty(Constructor, "prototype", { writable: !1 }), Constructor;
- }
- function _defineProperty4(obj, key, value) {
- return key = _toPropertyKey3(key), key in obj ? Object.defineProperty(obj, key, { value, enumerable: !0, configurable: !0, writable: !0 }) : obj[key] = value, obj;
- }
- function _toPropertyKey3(arg) {
- var key = _toPrimitive3(arg, "string");
- return _typeof4(key) === "symbol" ? key : String(key);
- }
- function _toPrimitive3(input2, hint) {
- if (_typeof4(input2) !== "object" || input2 === null) return input2;
- var prim = input2[Symbol.toPrimitive];
- if (prim !== void 0) {
- var res = prim.call(input2, hint || "default");
- if (_typeof4(res) !== "object") return res;
- throw new TypeError("@@toPrimitive must return a primitive value.");
- }
- return (hint === "string" ? String : Number)(input2);
- }
- var SetLike2 = (function() {
- function SetLike3() {
- var items = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
- _classCallCheck2(this, SetLike3), _defineProperty4(this, "items", void 0), this.items = items;
- }
- return _createClass2(SetLike3, [{
- key: "add",
- value: function(value) {
- return this.has(value) === !1 && this.items.push(value), this;
- }
- }, {
- key: "clear",
- value: function() {
- this.items = [];
- }
- }, {
- key: "delete",
- value: function(value) {
- var previousLength = this.items.length;
- return this.items = this.items.filter(function(item) {
- return item !== value;
- }), previousLength !== this.items.length;
- }
- }, {
- key: "forEach",
- value: function(callbackfn) {
- var _this = this;
- this.items.forEach(function(item) {
- callbackfn(item, item, _this);
- });
- }
- }, {
- key: "has",
- value: function(value) {
- return this.items.indexOf(value) !== -1;
- }
- }, {
- key: "size",
- get: function() {
- return this.items.length;
- }
- }]), SetLike3;
- })(), SetLike_default2 = typeof Set > "u" ? Set : SetLike2;
-
- // ../../node_modules/dom-accessibility-api/dist/getRole.mjs
- function getLocalName2(element) {
- var _element$localName;
- return (
- // eslint-disable-next-line no-restricted-properties -- actual guard for environments without localName
- (_element$localName = element.localName) !== null && _element$localName !== void 0 ? _element$localName : (
- // eslint-disable-next-line no-restricted-properties -- required for the fallback
- element.tagName.toLowerCase()
- )
- );
- }
- var localNameToRoleMappings2 = {
- article: "article",
- aside: "complementary",
- button: "button",
- datalist: "listbox",
- dd: "definition",
- details: "group",
- dialog: "dialog",
- dt: "term",
- fieldset: "group",
- figure: "figure",
- // WARNING: Only with an accessible name
- form: "form",
- footer: "contentinfo",
- h1: "heading",
- h2: "heading",
- h3: "heading",
- h4: "heading",
- h5: "heading",
- h6: "heading",
- header: "banner",
- hr: "separator",
- html: "document",
- legend: "legend",
- li: "listitem",
- math: "math",
- main: "main",
- menu: "list",
- nav: "navigation",
- ol: "list",
- optgroup: "group",
- // WARNING: Only in certain context
- option: "option",
- output: "status",
- progress: "progressbar",
- // WARNING: Only with an accessible name
- section: "region",
- summary: "button",
- table: "table",
- tbody: "rowgroup",
- textarea: "textbox",
- tfoot: "rowgroup",
- // WARNING: Only in certain context
- td: "cell",
- th: "columnheader",
- thead: "rowgroup",
- tr: "row",
- ul: "list"
- }, prohibitedAttributes2 = {
- caption: /* @__PURE__ */ new Set(["aria-label", "aria-labelledby"]),
- code: /* @__PURE__ */ new Set(["aria-label", "aria-labelledby"]),
- deletion: /* @__PURE__ */ new Set(["aria-label", "aria-labelledby"]),
- emphasis: /* @__PURE__ */ new Set(["aria-label", "aria-labelledby"]),
- generic: /* @__PURE__ */ new Set(["aria-label", "aria-labelledby", "aria-roledescription"]),
- insertion: /* @__PURE__ */ new Set(["aria-label", "aria-labelledby"]),
- paragraph: /* @__PURE__ */ new Set(["aria-label", "aria-labelledby"]),
- presentation: /* @__PURE__ */ new Set(["aria-label", "aria-labelledby"]),
- strong: /* @__PURE__ */ new Set(["aria-label", "aria-labelledby"]),
- subscript: /* @__PURE__ */ new Set(["aria-label", "aria-labelledby"]),
- superscript: /* @__PURE__ */ new Set(["aria-label", "aria-labelledby"])
- };
- function hasGlobalAriaAttributes2(element, role) {
- return [
- "aria-atomic",
- "aria-busy",
- "aria-controls",
- "aria-current",
- "aria-describedby",
- "aria-details",
- // "disabled",
- "aria-dropeffect",
- // "errormessage",
- "aria-flowto",
- "aria-grabbed",
- // "haspopup",
- "aria-hidden",
- // "invalid",
- "aria-keyshortcuts",
- "aria-label",
- "aria-labelledby",
- "aria-live",
- "aria-owns",
- "aria-relevant",
- "aria-roledescription"
- ].some(function(attributeName) {
- var _prohibitedAttributes;
- return element.hasAttribute(attributeName) && !((_prohibitedAttributes = prohibitedAttributes2[role]) !== null && _prohibitedAttributes !== void 0 && _prohibitedAttributes.has(attributeName));
- });
- }
- function ignorePresentationalRole2(element, implicitRole) {
- return hasGlobalAriaAttributes2(element, implicitRole);
- }
- function getRole2(element) {
- var explicitRole = getExplicitRole2(element);
- if (explicitRole === null || explicitRole === "presentation") {
- var implicitRole = getImplicitRole2(element);
- if (explicitRole !== "presentation" || ignorePresentationalRole2(element, implicitRole || ""))
- return implicitRole;
- }
- return explicitRole;
- }
- function getImplicitRole2(element) {
- var mappedByTag = localNameToRoleMappings2[getLocalName2(element)];
- if (mappedByTag !== void 0)
- return mappedByTag;
- switch (getLocalName2(element)) {
- case "a":
- case "area":
- case "link":
- if (element.hasAttribute("href"))
- return "link";
- break;
- case "img":
- return element.getAttribute("alt") === "" && !ignorePresentationalRole2(element, "img") ? "presentation" : "img";
- case "input": {
- var _ref = element, type5 = _ref.type;
- switch (type5) {
- case "button":
- case "image":
- case "reset":
- case "submit":
- return "button";
- case "checkbox":
- case "radio":
- return type5;
- case "range":
- return "slider";
- case "email":
- case "tel":
- case "text":
- case "url":
- return element.hasAttribute("list") ? "combobox" : "textbox";
- case "search":
- return element.hasAttribute("list") ? "combobox" : "searchbox";
- case "number":
- return "spinbutton";
- default:
- return null;
- }
- }
- case "select":
- return element.hasAttribute("multiple") || element.size > 1 ? "listbox" : "combobox";
- }
- return null;
- }
- function getExplicitRole2(element) {
- var role = element.getAttribute("role");
- if (role !== null) {
- var explicitRole = role.trim().split(" ")[0];
- if (explicitRole.length > 0)
- return explicitRole;
- }
- return null;
- }
-
- // ../../node_modules/dom-accessibility-api/dist/util.mjs
- function isElement2(node2) {
- return node2 !== null && node2.nodeType === node2.ELEMENT_NODE;
- }
- function isHTMLTableCaptionElement2(node2) {
- return isElement2(node2) && getLocalName2(node2) === "caption";
- }
- function isHTMLInputElement2(node2) {
- return isElement2(node2) && getLocalName2(node2) === "input";
- }
- function isHTMLOptGroupElement2(node2) {
- return isElement2(node2) && getLocalName2(node2) === "optgroup";
- }
- function isHTMLSelectElement2(node2) {
- return isElement2(node2) && getLocalName2(node2) === "select";
- }
- function isHTMLTableElement2(node2) {
- return isElement2(node2) && getLocalName2(node2) === "table";
- }
- function isHTMLTextAreaElement2(node2) {
- return isElement2(node2) && getLocalName2(node2) === "textarea";
- }
- function safeWindow2(node2) {
- var _ref = node2.ownerDocument === null ? node2 : node2.ownerDocument, defaultView = _ref.defaultView;
- if (defaultView === null)
- throw new TypeError("no window available");
- return defaultView;
- }
- function isHTMLFieldSetElement2(node2) {
- return isElement2(node2) && getLocalName2(node2) === "fieldset";
- }
- function isHTMLLegendElement2(node2) {
- return isElement2(node2) && getLocalName2(node2) === "legend";
- }
- function isHTMLSlotElement2(node2) {
- return isElement2(node2) && getLocalName2(node2) === "slot";
- }
- function isSVGElement2(node2) {
- return isElement2(node2) && node2.ownerSVGElement !== void 0;
- }
- function isSVGSVGElement2(node2) {
- return isElement2(node2) && getLocalName2(node2) === "svg";
- }
- function isSVGTitleElement2(node2) {
- return isSVGElement2(node2) && getLocalName2(node2) === "title";
- }
- function queryIdRefs2(node2, attributeName) {
- if (isElement2(node2) && node2.hasAttribute(attributeName)) {
- var ids = node2.getAttribute(attributeName).split(" "), root2 = node2.getRootNode ? node2.getRootNode() : node2.ownerDocument;
- return ids.map(function(id) {
- return root2.getElementById(id);
- }).filter(
- function(element) {
- return element !== null;
- }
- // TODO: why does this not narrow?
- );
- }
- return [];
- }
- function hasAnyConcreteRoles2(node2, roles3) {
- return isElement2(node2) ? roles3.indexOf(getRole2(node2)) !== -1 : !1;
- }
-
- // ../../node_modules/dom-accessibility-api/dist/accessible-name-and-description.mjs
- function asFlatString2(s3) {
- return s3.trim().replace(/\s\s+/g, " ");
- }
- function isHidden2(node2, getComputedStyleImplementation) {
- if (!isElement2(node2))
- return !1;
- if (node2.hasAttribute("hidden") || node2.getAttribute("aria-hidden") === "true")
- return !0;
- var style = getComputedStyleImplementation(node2);
- return style.getPropertyValue("display") === "none" || style.getPropertyValue("visibility") === "hidden";
- }
- function isControl2(node2) {
- return hasAnyConcreteRoles2(node2, ["button", "combobox", "listbox", "textbox"]) || hasAbstractRole2(node2, "range");
- }
- function hasAbstractRole2(node2, role) {
- if (!isElement2(node2))
- return !1;
- switch (role) {
- case "range":
- return hasAnyConcreteRoles2(node2, ["meter", "progressbar", "scrollbar", "slider", "spinbutton"]);
- default:
- throw new TypeError("No knowledge about abstract role '".concat(role, "'. This is likely a bug :("));
- }
- }
- function querySelectorAllSubtree2(element, selectors) {
- var elements = arrayFrom2(element.querySelectorAll(selectors));
- return queryIdRefs2(element, "aria-owns").forEach(function(root2) {
- elements.push.apply(elements, arrayFrom2(root2.querySelectorAll(selectors)));
- }), elements;
- }
- function querySelectedOptions2(listbox) {
- return isHTMLSelectElement2(listbox) ? listbox.selectedOptions || querySelectorAllSubtree2(listbox, "[selected]") : querySelectorAllSubtree2(listbox, '[aria-selected="true"]');
- }
- function isMarkedPresentational2(node2) {
- return hasAnyConcreteRoles2(node2, ["none", "presentation"]);
- }
- function isNativeHostLanguageTextAlternativeElement2(node2) {
- return isHTMLTableCaptionElement2(node2);
- }
- function allowsNameFromContent2(node2) {
- return hasAnyConcreteRoles2(node2, ["button", "cell", "checkbox", "columnheader", "gridcell", "heading", "label", "legend", "link", "menuitem", "menuitemcheckbox", "menuitemradio", "option", "radio", "row", "rowheader", "switch", "tab", "tooltip", "treeitem"]);
- }
- function isDescendantOfNativeHostLanguageTextAlternativeElement2(node2) {
- return !1;
- }
- function getValueOfTextbox2(element) {
- return isHTMLInputElement2(element) || isHTMLTextAreaElement2(element) ? element.value : element.textContent || "";
- }
- function getTextualContent2(declaration2) {
- var content = declaration2.getPropertyValue("content");
- return /^["'].*["']$/.test(content) ? content.slice(1, -1) : "";
- }
- function isLabelableElement2(element) {
- var localName = getLocalName2(element);
- return localName === "button" || localName === "input" && element.getAttribute("type") !== "hidden" || localName === "meter" || localName === "output" || localName === "progress" || localName === "select" || localName === "textarea";
- }
- function findLabelableElement2(element) {
- if (isLabelableElement2(element))
- return element;
- var labelableElement = null;
- return element.childNodes.forEach(function(childNode) {
- if (labelableElement === null && isElement2(childNode)) {
- var descendantLabelableElement = findLabelableElement2(childNode);
- descendantLabelableElement !== null && (labelableElement = descendantLabelableElement);
- }
- }), labelableElement;
- }
- function getControlOfLabel2(label) {
- if (label.control !== void 0)
- return label.control;
- var htmlFor = label.getAttribute("for");
- return htmlFor !== null ? label.ownerDocument.getElementById(htmlFor) : findLabelableElement2(label);
- }
- function getLabels2(element) {
- var labelsProperty = element.labels;
- if (labelsProperty === null)
- return labelsProperty;
- if (labelsProperty !== void 0)
- return arrayFrom2(labelsProperty);
- if (!isLabelableElement2(element))
- return null;
- var document13 = element.ownerDocument;
- return arrayFrom2(document13.querySelectorAll("label")).filter(function(label) {
- return getControlOfLabel2(label) === element;
- });
- }
- function getSlotContents2(slot) {
- var assignedNodes = slot.assignedNodes();
- return assignedNodes.length === 0 ? arrayFrom2(slot.childNodes) : assignedNodes;
- }
- function computeTextAlternative2(root2) {
- var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, consultedNodes = new SetLike_default2(), window2 = safeWindow2(root2), _options$compute = options.compute, compute = _options$compute === void 0 ? "name" : _options$compute, _options$computedStyl = options.computedStyleSupportsPseudoElements, computedStyleSupportsPseudoElements = _options$computedStyl === void 0 ? options.getComputedStyle !== void 0 : _options$computedStyl, _options$getComputedS = options.getComputedStyle, getComputedStyle3 = _options$getComputedS === void 0 ? window2.getComputedStyle.bind(window2) : _options$getComputedS, _options$hidden = options.hidden, hidden = _options$hidden === void 0 ? !1 : _options$hidden;
- function computeMiscTextAlternative(node2, context) {
- var accumulatedText = "";
- if (isElement2(node2) && computedStyleSupportsPseudoElements) {
- var pseudoBefore = getComputedStyle3(node2, "::before"), beforeContent = getTextualContent2(pseudoBefore);
- accumulatedText = "".concat(beforeContent, " ").concat(accumulatedText);
- }
- var childNodes = isHTMLSlotElement2(node2) ? getSlotContents2(node2) : arrayFrom2(node2.childNodes).concat(queryIdRefs2(node2, "aria-owns"));
- if (childNodes.forEach(function(child) {
- var result = computeTextAlternative3(child, {
- isEmbeddedInLabel: context.isEmbeddedInLabel,
- isReferenced: !1,
- recursion: !0
- }), display2 = isElement2(child) ? getComputedStyle3(child).getPropertyValue("display") : "inline", separator = display2 !== "inline" ? " " : "";
- accumulatedText += "".concat(separator).concat(result).concat(separator);
- }), isElement2(node2) && computedStyleSupportsPseudoElements) {
- var pseudoAfter = getComputedStyle3(node2, "::after"), afterContent = getTextualContent2(pseudoAfter);
- accumulatedText = "".concat(accumulatedText, " ").concat(afterContent);
- }
- return accumulatedText.trim();
- }
- function useAttribute(element, attributeName) {
- var attribute = element.getAttributeNode(attributeName);
- return attribute !== null && !consultedNodes.has(attribute) && attribute.value.trim() !== "" ? (consultedNodes.add(attribute), attribute.value) : null;
- }
- function computeTooltipAttributeValue(node2) {
- return isElement2(node2) ? useAttribute(node2, "title") : null;
- }
- function computeElementTextAlternative(node2) {
- if (!isElement2(node2))
- return null;
- if (isHTMLFieldSetElement2(node2)) {
- consultedNodes.add(node2);
- for (var children = arrayFrom2(node2.childNodes), i = 0; i < children.length; i += 1) {
- var child = children[i];
- if (isHTMLLegendElement2(child))
- return computeTextAlternative3(child, {
- isEmbeddedInLabel: !1,
- isReferenced: !1,
- recursion: !1
- });
- }
- } else if (isHTMLTableElement2(node2)) {
- consultedNodes.add(node2);
- for (var _children = arrayFrom2(node2.childNodes), _i = 0; _i < _children.length; _i += 1) {
- var _child = _children[_i];
- if (isHTMLTableCaptionElement2(_child))
- return computeTextAlternative3(_child, {
- isEmbeddedInLabel: !1,
- isReferenced: !1,
- recursion: !1
- });
- }
- } else if (isSVGSVGElement2(node2)) {
- consultedNodes.add(node2);
- for (var _children2 = arrayFrom2(node2.childNodes), _i2 = 0; _i2 < _children2.length; _i2 += 1) {
- var _child2 = _children2[_i2];
- if (isSVGTitleElement2(_child2))
- return _child2.textContent;
- }
- return null;
- } else if (getLocalName2(node2) === "img" || getLocalName2(node2) === "area") {
- var nameFromAlt = useAttribute(node2, "alt");
- if (nameFromAlt !== null)
- return nameFromAlt;
- } else if (isHTMLOptGroupElement2(node2)) {
- var nameFromLabel = useAttribute(node2, "label");
- if (nameFromLabel !== null)
- return nameFromLabel;
- }
- if (isHTMLInputElement2(node2) && (node2.type === "button" || node2.type === "submit" || node2.type === "reset")) {
- var nameFromValue = useAttribute(node2, "value");
- if (nameFromValue !== null)
- return nameFromValue;
- if (node2.type === "submit")
- return "Submit";
- if (node2.type === "reset")
- return "Reset";
- }
- var labels = getLabels2(node2);
- if (labels !== null && labels.length !== 0)
- return consultedNodes.add(node2), arrayFrom2(labels).map(function(element) {
- return computeTextAlternative3(element, {
- isEmbeddedInLabel: !0,
- isReferenced: !1,
- recursion: !0
- });
- }).filter(function(label) {
- return label.length > 0;
- }).join(" ");
- if (isHTMLInputElement2(node2) && node2.type === "image") {
- var _nameFromAlt = useAttribute(node2, "alt");
- if (_nameFromAlt !== null)
- return _nameFromAlt;
- var nameFromTitle = useAttribute(node2, "title");
- return nameFromTitle !== null ? nameFromTitle : "Submit Query";
- }
- if (hasAnyConcreteRoles2(node2, ["button"])) {
- var nameFromSubTree = computeMiscTextAlternative(node2, {
- isEmbeddedInLabel: !1,
- isReferenced: !1
- });
- if (nameFromSubTree !== "")
- return nameFromSubTree;
- }
- return null;
- }
- function computeTextAlternative3(current, context) {
- if (consultedNodes.has(current))
- return "";
- if (!hidden && isHidden2(current, getComputedStyle3) && !context.isReferenced)
- return consultedNodes.add(current), "";
- var labelAttributeNode = isElement2(current) ? current.getAttributeNode("aria-labelledby") : null, labelElements = labelAttributeNode !== null && !consultedNodes.has(labelAttributeNode) ? queryIdRefs2(current, "aria-labelledby") : [];
- if (compute === "name" && !context.isReferenced && labelElements.length > 0)
- return consultedNodes.add(labelAttributeNode), labelElements.map(function(element) {
- return computeTextAlternative3(element, {
- isEmbeddedInLabel: context.isEmbeddedInLabel,
- isReferenced: !0,
- // this isn't recursion as specified, otherwise we would skip
- // `aria-label` in
- // <input id="myself" aria-label="foo" aria-labelledby="myself"
- recursion: !1
- });
- }).join(" ");
- var skipToStep2E = context.recursion && isControl2(current) && compute === "name";
- if (!skipToStep2E) {
- var ariaLabel = (isElement2(current) && current.getAttribute("aria-label") || "").trim();
- if (ariaLabel !== "" && compute === "name")
- return consultedNodes.add(current), ariaLabel;
- if (!isMarkedPresentational2(current)) {
- var elementTextAlternative = computeElementTextAlternative(current);
- if (elementTextAlternative !== null)
- return consultedNodes.add(current), elementTextAlternative;
- }
- }
- if (hasAnyConcreteRoles2(current, ["menu"]))
- return consultedNodes.add(current), "";
- if (skipToStep2E || context.isEmbeddedInLabel || context.isReferenced) {
- if (hasAnyConcreteRoles2(current, ["combobox", "listbox"])) {
- consultedNodes.add(current);
- var selectedOptions = querySelectedOptions2(current);
- return selectedOptions.length === 0 ? isHTMLInputElement2(current) ? current.value : "" : arrayFrom2(selectedOptions).map(function(selectedOption) {
- return computeTextAlternative3(selectedOption, {
- isEmbeddedInLabel: context.isEmbeddedInLabel,
- isReferenced: !1,
- recursion: !0
- });
- }).join(" ");
- }
- if (hasAbstractRole2(current, "range"))
- return consultedNodes.add(current), current.hasAttribute("aria-valuetext") ? current.getAttribute("aria-valuetext") : current.hasAttribute("aria-valuenow") ? current.getAttribute("aria-valuenow") : current.getAttribute("value") || "";
- if (hasAnyConcreteRoles2(current, ["textbox"]))
- return consultedNodes.add(current), getValueOfTextbox2(current);
- }
- if (allowsNameFromContent2(current) || isElement2(current) && context.isReferenced || isNativeHostLanguageTextAlternativeElement2(current) || isDescendantOfNativeHostLanguageTextAlternativeElement2(current)) {
- var accumulatedText2F = computeMiscTextAlternative(current, {
- isEmbeddedInLabel: context.isEmbeddedInLabel,
- isReferenced: !1
- });
- if (accumulatedText2F !== "")
- return consultedNodes.add(current), accumulatedText2F;
- }
- if (current.nodeType === current.TEXT_NODE)
- return consultedNodes.add(current), current.textContent || "";
- if (context.recursion)
- return consultedNodes.add(current), computeMiscTextAlternative(current, {
- isEmbeddedInLabel: context.isEmbeddedInLabel,
- isReferenced: !1
- });
- var tooltipAttributeValue = computeTooltipAttributeValue(current);
- return tooltipAttributeValue !== null ? (consultedNodes.add(current), tooltipAttributeValue) : (consultedNodes.add(current), "");
- }
- return asFlatString2(computeTextAlternative3(root2, {
- isEmbeddedInLabel: !1,
- // by spec computeAccessibleDescription starts with the referenced elements as roots
- isReferenced: compute === "description",
- recursion: !1
- }));
- }
-
- // ../../node_modules/dom-accessibility-api/dist/accessible-description.mjs
- function _typeof5(obj) {
- "@babel/helpers - typeof";
- return _typeof5 = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(obj2) {
- return typeof obj2;
- } : function(obj2) {
- return obj2 && typeof Symbol == "function" && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2;
- }, _typeof5(obj);
- }
- function ownKeys4(object, enumerableOnly) {
- var keys3 = Object.keys(object);
- if (Object.getOwnPropertySymbols) {
- var symbols = Object.getOwnPropertySymbols(object);
- enumerableOnly && (symbols = symbols.filter(function(sym) {
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
- })), keys3.push.apply(keys3, symbols);
- }
- return keys3;
- }
- function _objectSpread4(target) {
- for (var i = 1; i < arguments.length; i++) {
- var source = arguments[i] != null ? arguments[i] : {};
- i % 2 ? ownKeys4(Object(source), !0).forEach(function(key) {
- _defineProperty5(target, key, source[key]);
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys4(Object(source)).forEach(function(key) {
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
- });
- }
- return target;
- }
- function _defineProperty5(obj, key, value) {
- return key = _toPropertyKey4(key), key in obj ? Object.defineProperty(obj, key, { value, enumerable: !0, configurable: !0, writable: !0 }) : obj[key] = value, obj;
- }
- function _toPropertyKey4(arg) {
- var key = _toPrimitive4(arg, "string");
- return _typeof5(key) === "symbol" ? key : String(key);
- }
- function _toPrimitive4(input2, hint) {
- if (_typeof5(input2) !== "object" || input2 === null) return input2;
- var prim = input2[Symbol.toPrimitive];
- if (prim !== void 0) {
- var res = prim.call(input2, hint || "default");
- if (_typeof5(res) !== "object") return res;
- throw new TypeError("@@toPrimitive must return a primitive value.");
- }
- return (hint === "string" ? String : Number)(input2);
- }
- function computeAccessibleDescription2(root2) {
- var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, description = queryIdRefs2(root2, "aria-describedby").map(function(element) {
- return computeTextAlternative2(element, _objectSpread4(_objectSpread4({}, options), {}, {
- compute: "description"
- }));
- }).join(" ");
- if (description === "") {
- var title = root2.getAttribute("title");
- description = title === null ? "" : title;
- }
- return description;
- }
-
- // ../../node_modules/dom-accessibility-api/dist/accessible-name.mjs
- function prohibitsNaming2(node2) {
- return hasAnyConcreteRoles2(node2, ["caption", "code", "deletion", "emphasis", "generic", "insertion", "paragraph", "presentation", "strong", "subscript", "superscript"]);
- }
- function computeAccessibleName2(root2) {
- var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
- return prohibitsNaming2(root2) ? "" : computeTextAlternative2(root2, options);
- }
-
- // ../../node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js
- var import_aria_query3 = __toESM(require_lib2()), import_lz_string = __toESM(require_lz_string());
- function escapeHTML2(str2) {
- return str2.replace(/</g, "<").replace(/>/g, ">");
- }
- var printProps2 = (keys3, props, config4, indentation, depth, refs, printer2) => {
- let indentationNext = indentation + config4.indent, colors3 = config4.colors;
- return keys3.map((key) => {
- let value = props[key], printed = printer2(value, config4, indentationNext, depth, refs);
- return typeof value != "string" && (printed.indexOf(`
- `) !== -1 && (printed = config4.spacingOuter + indentationNext + printed + config4.spacingOuter + indentation), printed = "{" + printed + "}"), config4.spacingInner + indentation + colors3.prop.open + key + colors3.prop.close + "=" + colors3.value.open + printed + colors3.value.close;
- }).join("");
- }, NodeTypeTextNode = 3, printChildren2 = (children, config4, indentation, depth, refs, printer2) => children.map((child) => {
- let printedChild = typeof child == "string" ? printText2(child, config4) : printer2(child, config4, indentation, depth, refs);
- return printedChild === "" && typeof child == "object" && child !== null && child.nodeType !== NodeTypeTextNode ? "" : config4.spacingOuter + indentation + printedChild;
- }).join(""), printText2 = (text, config4) => {
- let contentColor = config4.colors.content;
- return contentColor.open + escapeHTML2(text) + contentColor.close;
- }, printComment2 = (comment2, config4) => {
- let commentColor = config4.colors.comment;
- return commentColor.open + "<!--" + escapeHTML2(comment2) + "-->" + commentColor.close;
- }, printElement2 = (type5, printedProps, printedChildren, config4, indentation) => {
- let tagColor = config4.colors.tag;
- return tagColor.open + "<" + type5 + (printedProps && tagColor.close + printedProps + config4.spacingOuter + indentation + tagColor.open) + (printedChildren ? ">" + tagColor.close + printedChildren + config4.spacingOuter + indentation + tagColor.open + "</" + type5 : (printedProps && !config4.min ? "" : " ") + "/") + ">" + tagColor.close;
- }, printElementAsLeaf2 = (type5, config4) => {
- let tagColor = config4.colors.tag;
- return tagColor.open + "<" + type5 + tagColor.close + " \u2026" + tagColor.open + " />" + tagColor.close;
- }, ELEMENT_NODE$1 = 1, TEXT_NODE$1 = 3, COMMENT_NODE$1 = 8, FRAGMENT_NODE2 = 11, ELEMENT_REGEXP2 = /^((HTML|SVG)\w*)?Element$/, isCustomElement2 = (val) => {
- let {
- tagName
- } = val;
- return !!(typeof tagName == "string" && tagName.includes("-") || typeof val.hasAttribute == "function" && val.hasAttribute("is"));
- }, testNode2 = (val) => {
- let constructorName = val.constructor.name, {
- nodeType
- } = val;
- return nodeType === ELEMENT_NODE$1 && (ELEMENT_REGEXP2.test(constructorName) || isCustomElement2(val)) || nodeType === TEXT_NODE$1 && constructorName === "Text" || nodeType === COMMENT_NODE$1 && constructorName === "Comment" || nodeType === FRAGMENT_NODE2 && constructorName === "DocumentFragment";
- };
- function nodeIsText2(node2) {
- return node2.nodeType === TEXT_NODE$1;
- }
- function nodeIsComment2(node2) {
- return node2.nodeType === COMMENT_NODE$1;
- }
- function nodeIsFragment2(node2) {
- return node2.nodeType === FRAGMENT_NODE2;
- }
- function createDOMElementFilter(filterNode) {
- return {
- test: (val) => {
- var _val$constructor2;
- return ((val == null || (_val$constructor2 = val.constructor) == null ? void 0 : _val$constructor2.name) || isCustomElement2(val)) && testNode2(val);
- },
- serialize: (node2, config4, indentation, depth, refs, printer2) => {
- if (nodeIsText2(node2))
- return printText2(node2.data, config4);
- if (nodeIsComment2(node2))
- return printComment2(node2.data, config4);
- let type5 = nodeIsFragment2(node2) ? "DocumentFragment" : node2.tagName.toLowerCase();
- return ++depth > config4.maxDepth ? printElementAsLeaf2(type5, config4) : printElement2(type5, printProps2(nodeIsFragment2(node2) ? [] : Array.from(node2.attributes).map((attr) => attr.name).sort(), nodeIsFragment2(node2) ? {} : Array.from(node2.attributes).reduce((props, attribute) => (props[attribute.name] = attribute.value, props), {}), config4, indentation + config4.indent, depth, refs, printer2), printChildren2(Array.prototype.slice.call(node2.childNodes || node2.children).filter(filterNode), config4, indentation + config4.indent, depth, refs, printer2), config4, indentation);
- }
- };
- }
- var picocolors2 = null, readFileSync = null, codeFrameColumns = null;
- try {
- let nodeRequire = module && module.require;
- readFileSync = nodeRequire.call(module, "fs").readFileSync, codeFrameColumns = nodeRequire.call(module, "@babel/code-frame").codeFrameColumns, picocolors2 = nodeRequire.call(module, "picocolors");
- } catch {
- }
- function getCodeFrame(frame) {
- let locationStart = frame.indexOf("(") + 1, locationEnd = frame.indexOf(")"), frameLocation = frame.slice(locationStart, locationEnd), frameLocationElements = frameLocation.split(":"), [filename, line2, column2] = [frameLocationElements[0], parseInt(frameLocationElements[1], 10), parseInt(frameLocationElements[2], 10)], rawFileContents = "";
- try {
- rawFileContents = readFileSync(filename, "utf-8");
- } catch {
- return "";
- }
- let codeFrame = codeFrameColumns(rawFileContents, {
- start: {
- line: line2,
- column: column2
- }
- }, {
- highlightCode: !0,
- linesBelow: 0
- });
- return picocolors2.dim(frameLocation) + `
- ` + codeFrame + `
- `;
- }
- function getUserCodeFrame() {
- if (!readFileSync || !codeFrameColumns)
- return "";
- let firstClientCodeFrame = new Error().stack.split(`
- `).slice(1).find((frame) => !frame.includes("node_modules/"));
- return getCodeFrame(firstClientCodeFrame);
- }
- var TEXT_NODE2 = 3;
- function jestFakeTimersAreEnabled() {
- return typeof jest < "u" && jest !== null ? (
- // legacy timers
- setTimeout._isMockFunction === !0 || // modern timers
- // eslint-disable-next-line prefer-object-has-own -- not supported by our support matrix
- Object.prototype.hasOwnProperty.call(setTimeout, "clock")
- ) : !1;
- }
- function getDocument() {
- if (typeof window > "u")
- throw new Error("Could not find default container");
- return window.document;
- }
- function getWindowFromNode(node2) {
- if (node2.defaultView)
- return node2.defaultView;
- if (node2.ownerDocument && node2.ownerDocument.defaultView)
- return node2.ownerDocument.defaultView;
- if (node2.window)
- return node2.window;
- throw node2.ownerDocument && node2.ownerDocument.defaultView === null ? new Error("It looks like the window object is not available for the provided node.") : node2.then instanceof Function ? new Error("It looks like you passed a Promise object instead of a DOM node. Did you do something like `fireEvent.click(screen.findBy...` when you meant to use a `getBy` query `fireEvent.click(screen.getBy...`, or await the findBy query `fireEvent.click(await screen.findBy...`?") : Array.isArray(node2) ? new Error("It looks like you passed an Array instead of a DOM node. Did you do something like `fireEvent.click(screen.getAllBy...` when you meant to use a `getBy` query `fireEvent.click(screen.getBy...`?") : typeof node2.debug == "function" && typeof node2.logTestingPlaygroundURL == "function" ? new Error("It looks like you passed a `screen` object. Did you do something like `fireEvent.click(screen, ...` when you meant to use a query, e.g. `fireEvent.click(screen.getBy..., `?") : new Error("The given node is not an Element, the node type is: " + typeof node2 + ".");
- }
- function checkContainerType(container) {
- if (!container || typeof container.querySelector != "function" || typeof container.querySelectorAll != "function")
- throw new TypeError("Expected container to be an Element, a Document or a DocumentFragment but got " + getTypeName(container) + ".");
- function getTypeName(object) {
- return typeof object == "object" ? object === null ? "null" : object.constructor.name : typeof object;
- }
- }
- var shouldHighlight = () => {
- if (typeof process > "u")
- return !1;
- let colors3;
- try {
- var _process$env;
- let colorsJSON = (_process$env = process.env) == null ? void 0 : _process$env.COLORS;
- colorsJSON && (colors3 = JSON.parse(colorsJSON));
- } catch {
- }
- return typeof colors3 == "boolean" ? colors3 : process.versions !== void 0 && process.versions.node !== void 0;
- }, {
- DOMCollection: DOMCollection3
- } = prettyFormat.plugins, ELEMENT_NODE2 = 1, COMMENT_NODE2 = 8;
- function filterCommentsAndDefaultIgnoreTagsTags(value) {
- return value.nodeType !== COMMENT_NODE2 && (value.nodeType !== ELEMENT_NODE2 || !value.matches(getConfig2().defaultIgnore));
- }
- function prettyDOM(dom, maxLength, options) {
- if (options === void 0 && (options = {}), dom || (dom = getDocument().body), typeof maxLength != "number" && (maxLength = typeof process < "u" && typeof process.env < "u" && process.env.DEBUG_PRINT_LIMIT || 7e3), maxLength === 0)
- return "";
- dom.documentElement && (dom = dom.documentElement);
- let domTypeName = typeof dom;
- if (domTypeName === "object" ? domTypeName = dom.constructor.name : dom = {}, !("outerHTML" in dom))
- throw new TypeError("Expected an element or document but got " + domTypeName);
- let {
- filterNode = filterCommentsAndDefaultIgnoreTagsTags,
- ...prettyFormatOptions
- } = options, debugContent = prettyFormat.format(dom, {
- plugins: [createDOMElementFilter(filterNode), DOMCollection3],
- printFunctionName: !1,
- highlight: shouldHighlight(),
- ...prettyFormatOptions
- });
- return maxLength !== void 0 && dom.outerHTML.length > maxLength ? debugContent.slice(0, maxLength) + "..." : debugContent;
- }
- var logDOM = function() {
- let userCodeFrame = getUserCodeFrame();
- console.log(userCodeFrame ? prettyDOM(...arguments) + `
-
- ` + userCodeFrame : prettyDOM(...arguments));
- }, config3 = {
- testIdAttribute: "data-testid",
- asyncUtilTimeout: 1e3,
- // asyncWrapper and advanceTimersWrapper is to support React's async `act` function.
- // forcing react-testing-library to wrap all async functions would've been
- // a total nightmare (consider wrapping every findBy* query and then also
- // updating `within` so those would be wrapped too. Total nightmare).
- // so we have this config option that's really only intended for
- // react-testing-library to use. For that reason, this feature will remain
- // undocumented.
- asyncWrapper: (cb) => cb(),
- unstable_advanceTimersWrapper: (cb) => cb(),
- eventWrapper: (cb) => cb(),
- // default value for the `hidden` option in `ByRole` queries
- defaultHidden: !1,
- // default value for the `ignore` option in `ByText` queries
- defaultIgnore: "script, style",
- // showOriginalStackTrace flag to show the full error stack traces for async errors
- showOriginalStackTrace: !1,
- // throw errors w/ suggestions for better queries. Opt in so off by default.
- throwSuggestions: !1,
- // called when getBy* queries fail. (message, container) => Error
- getElementError(message, container) {
- let prettifiedDOM = prettyDOM(container), error = new Error([message, "Ignored nodes: comments, " + config3.defaultIgnore + `
- ` + prettifiedDOM].filter(Boolean).join(`
-
- `));
- return error.name = "TestingLibraryElementError", error;
- },
- _disableExpensiveErrorDiagnostics: !1,
- computedStyleSupportsPseudoElements: !1
- };
- function runWithExpensiveErrorDiagnosticsDisabled(callback) {
- try {
- return config3._disableExpensiveErrorDiagnostics = !0, callback();
- } finally {
- config3._disableExpensiveErrorDiagnostics = !1;
- }
- }
- function configure(newConfig) {
- typeof newConfig == "function" && (newConfig = newConfig(config3)), config3 = {
- ...config3,
- ...newConfig
- };
- }
- function getConfig2() {
- return config3;
- }
- var labelledNodeNames = ["button", "meter", "output", "progress", "select", "textarea", "input"];
- function getTextContent(node2) {
- return labelledNodeNames.includes(node2.nodeName.toLowerCase()) ? "" : node2.nodeType === TEXT_NODE2 ? node2.textContent : Array.from(node2.childNodes).map((childNode) => getTextContent(childNode)).join("");
- }
- function getLabelContent(element) {
- let textContent;
- return element.tagName.toLowerCase() === "label" ? textContent = getTextContent(element) : textContent = element.value || element.textContent, textContent;
- }
- function getRealLabels(element) {
- if (element.labels !== void 0) {
- var _labels;
- return (_labels = element.labels) != null ? _labels : [];
- }
- if (!isLabelable(element)) return [];
- let labels = element.ownerDocument.querySelectorAll("label");
- return Array.from(labels).filter((label) => label.control === element);
- }
- function isLabelable(element) {
- return /BUTTON|METER|OUTPUT|PROGRESS|SELECT|TEXTAREA/.test(element.tagName) || element.tagName === "INPUT" && element.getAttribute("type") !== "hidden";
- }
- function getLabels3(container, element, _temp) {
- let {
- selector = "*"
- } = _temp === void 0 ? {} : _temp, ariaLabelledBy = element.getAttribute("aria-labelledby"), labelsId = ariaLabelledBy ? ariaLabelledBy.split(" ") : [];
- return labelsId.length ? labelsId.map((labelId) => {
- let labellingElement = container.querySelector('[id="' + labelId + '"]');
- return labellingElement ? {
- content: getLabelContent(labellingElement),
- formControl: null
- } : {
- content: "",
- formControl: null
- };
- }) : Array.from(getRealLabels(element)).map((label) => {
- let textToMatch = getLabelContent(label), labelledFormControl = Array.from(label.querySelectorAll("button, input, meter, output, progress, select, textarea")).filter((formControlElement) => formControlElement.matches(selector))[0];
- return {
- content: textToMatch,
- formControl: labelledFormControl
- };
- });
- }
- function assertNotNullOrUndefined(matcher) {
- if (matcher == null)
- throw new Error(
- // eslint-disable-next-line @typescript-eslint/restrict-template-expressions -- implicitly converting `T` to `string`
- "It looks like " + matcher + " was passed instead of a matcher. Did you do something like getByText(" + matcher + ")?"
- );
- }
- function fuzzyMatches(textToMatch, node2, matcher, normalizer) {
- if (typeof textToMatch != "string")
- return !1;
- assertNotNullOrUndefined(matcher);
- let normalizedText = normalizer(textToMatch);
- return typeof matcher == "string" || typeof matcher == "number" ? normalizedText.toLowerCase().includes(matcher.toString().toLowerCase()) : typeof matcher == "function" ? matcher(normalizedText, node2) : matchRegExp(matcher, normalizedText);
- }
- function matches3(textToMatch, node2, matcher, normalizer) {
- if (typeof textToMatch != "string")
- return !1;
- assertNotNullOrUndefined(matcher);
- let normalizedText = normalizer(textToMatch);
- return matcher instanceof Function ? matcher(normalizedText, node2) : matcher instanceof RegExp ? matchRegExp(matcher, normalizedText) : normalizedText === String(matcher);
- }
- function getDefaultNormalizer(_temp) {
- let {
- trim: trim2 = !0,
- collapseWhitespace = !0
- } = _temp === void 0 ? {} : _temp;
- return (text) => {
- let normalizedText = text;
- return normalizedText = trim2 ? normalizedText.trim() : normalizedText, normalizedText = collapseWhitespace ? normalizedText.replace(/\s+/g, " ") : normalizedText, normalizedText;
- };
- }
- function makeNormalizer(_ref) {
- let {
- trim: trim2,
- collapseWhitespace,
- normalizer
- } = _ref;
- if (!normalizer)
- return getDefaultNormalizer({
- trim: trim2,
- collapseWhitespace
- });
- if (typeof trim2 < "u" || typeof collapseWhitespace < "u")
- throw new Error('trim and collapseWhitespace are not supported with a normalizer. If you want to use the default trim and collapseWhitespace logic in your normalizer, use "getDefaultNormalizer({trim, collapseWhitespace})" and compose that into your normalizer');
- return normalizer;
- }
- function matchRegExp(matcher, text) {
- let match3 = matcher.test(text);
- return matcher.global && matcher.lastIndex !== 0 && (console.warn("To match all elements we had to reset the lastIndex of the RegExp because the global flag is enabled. We encourage to remove the global flag from the RegExp."), matcher.lastIndex = 0), match3;
- }
- function getNodeText(node2) {
- return node2.matches("input[type=submit], input[type=button], input[type=reset]") ? node2.value : Array.from(node2.childNodes).filter((child) => child.nodeType === TEXT_NODE2 && !!child.textContent).map((c) => c.textContent).join("");
- }
- var elementRoleList2 = buildElementRoleList2(import_aria_query3.elementRoles);
- function isSubtreeInaccessible(element) {
- return element.hidden === !0 || element.getAttribute("aria-hidden") === "true" || element.ownerDocument.defaultView.getComputedStyle(element).display === "none";
- }
- function isInaccessible(element, options) {
- options === void 0 && (options = {});
- let {
- isSubtreeInaccessible: isSubtreeInaccessibleImpl = isSubtreeInaccessible
- } = options;
- if (element.ownerDocument.defaultView.getComputedStyle(element).visibility === "hidden")
- return !0;
- let currentElement = element;
- for (; currentElement; ) {
- if (isSubtreeInaccessibleImpl(currentElement))
- return !0;
- currentElement = currentElement.parentElement;
- }
- return !1;
- }
- function getImplicitAriaRoles2(currentNode) {
- for (let {
- match: match3,
- roles: roles3
- } of elementRoleList2)
- if (match3(currentNode))
- return [...roles3];
- return [];
- }
- function buildElementRoleList2(elementRolesMap) {
- function makeElementSelector(_ref) {
- let {
- name,
- attributes
- } = _ref;
- return "" + name + attributes.map((_ref2) => {
- let {
- name: attributeName,
- value,
- constraints = []
- } = _ref2, shouldNotExist = constraints.indexOf("undefined") !== -1, shouldBeNonEmpty = constraints.indexOf("set") !== -1;
- return typeof value < "u" ? "[" + attributeName + '="' + value + '"]' : shouldNotExist ? ":not([" + attributeName + "])" : shouldBeNonEmpty ? "[" + attributeName + "]:not([" + attributeName + '=""])' : "[" + attributeName + "]";
- }).join("");
- }
- function getSelectorSpecificity(_ref3) {
- let {
- attributes = []
- } = _ref3;
- return attributes.length;
- }
- function bySelectorSpecificity(_ref4, _ref5) {
- let {
- specificity: leftSpecificity
- } = _ref4, {
- specificity: rightSpecificity
- } = _ref5;
- return rightSpecificity - leftSpecificity;
- }
- function match3(element) {
- let {
- attributes = []
- } = element, typeTextIndex = attributes.findIndex((attribute) => attribute.value && attribute.name === "type" && attribute.value === "text");
- typeTextIndex >= 0 && (attributes = [...attributes.slice(0, typeTextIndex), ...attributes.slice(typeTextIndex + 1)]);
- let selector = makeElementSelector({
- ...element,
- attributes
- });
- return (node2) => typeTextIndex >= 0 && node2.type !== "text" ? !1 : node2.matches(selector);
- }
- let result = [];
- for (let [element, roles3] of elementRolesMap.entries())
- result = [...result, {
- match: match3(element),
- roles: Array.from(roles3),
- specificity: getSelectorSpecificity(element)
- }];
- return result.sort(bySelectorSpecificity);
- }
- function getRoles(container, _temp) {
- let {
- hidden = !1
- } = _temp === void 0 ? {} : _temp;
- function flattenDOM(node2) {
- return [node2, ...Array.from(node2.children).reduce((acc, child) => [...acc, ...flattenDOM(child)], [])];
- }
- return flattenDOM(container).filter((element) => hidden === !1 ? isInaccessible(element) === !1 : !0).reduce((acc, node2) => {
- let roles3 = [];
- return node2.hasAttribute("role") ? roles3 = node2.getAttribute("role").split(" ").slice(0, 1) : roles3 = getImplicitAriaRoles2(node2), roles3.reduce((rolesAcc, role) => Array.isArray(rolesAcc[role]) ? {
- ...rolesAcc,
- [role]: [...rolesAcc[role], node2]
- } : {
- ...rolesAcc,
- [role]: [node2]
- }, acc);
- }, {});
- }
- function prettyRoles(dom, _ref6) {
- let {
- hidden,
- includeDescription
- } = _ref6, roles3 = getRoles(dom, {
- hidden
- });
- return Object.entries(roles3).filter((_ref7) => {
- let [role] = _ref7;
- return role !== "generic";
- }).map((_ref8) => {
- let [role, elements] = _ref8, delimiterBar = "-".repeat(50), elementsString = elements.map((el) => {
- let nameString = 'Name "' + computeAccessibleName2(el, {
- computedStyleSupportsPseudoElements: getConfig2().computedStyleSupportsPseudoElements
- }) + `":
- `, domString = prettyDOM(el.cloneNode(!1));
- if (includeDescription) {
- let descriptionString = 'Description "' + computeAccessibleDescription2(el, {
- computedStyleSupportsPseudoElements: getConfig2().computedStyleSupportsPseudoElements
- }) + `":
- `;
- return "" + nameString + descriptionString + domString;
- }
- return "" + nameString + domString;
- }).join(`
-
- `);
- return role + `:
-
- ` + elementsString + `
-
- ` + delimiterBar;
- }).join(`
- `);
- }
- var logRoles = function(dom, _temp2) {
- let {
- hidden = !1
- } = _temp2 === void 0 ? {} : _temp2;
- return console.log(prettyRoles(dom, {
- hidden
- }));
- };
- function computeAriaSelected(element) {
- return element.tagName === "OPTION" ? element.selected : checkBooleanAttribute(element, "aria-selected");
- }
- function computeAriaBusy(element) {
- return element.getAttribute("aria-busy") === "true";
- }
- function computeAriaChecked(element) {
- if (!("indeterminate" in element && element.indeterminate))
- return "checked" in element ? element.checked : checkBooleanAttribute(element, "aria-checked");
- }
- function computeAriaPressed(element) {
- return checkBooleanAttribute(element, "aria-pressed");
- }
- function computeAriaCurrent(element) {
- var _ref9, _checkBooleanAttribut;
- return (_ref9 = (_checkBooleanAttribut = checkBooleanAttribute(element, "aria-current")) != null ? _checkBooleanAttribut : element.getAttribute("aria-current")) != null ? _ref9 : !1;
- }
- function computeAriaExpanded(element) {
- return checkBooleanAttribute(element, "aria-expanded");
- }
- function checkBooleanAttribute(element, attribute) {
- let attributeValue = element.getAttribute(attribute);
- if (attributeValue === "true")
- return !0;
- if (attributeValue === "false")
- return !1;
- }
- function computeHeadingLevel(element) {
- let implicitHeadingLevels = {
- H1: 1,
- H2: 2,
- H3: 3,
- H4: 4,
- H5: 5,
- H6: 6
- };
- return element.getAttribute("aria-level") && Number(element.getAttribute("aria-level")) || implicitHeadingLevels[element.tagName];
- }
- function computeAriaValueNow(element) {
- let valueNow = element.getAttribute("aria-valuenow");
- return valueNow === null ? void 0 : +valueNow;
- }
- function computeAriaValueMax(element) {
- let valueMax = element.getAttribute("aria-valuemax");
- return valueMax === null ? void 0 : +valueMax;
- }
- function computeAriaValueMin(element) {
- let valueMin = element.getAttribute("aria-valuemin");
- return valueMin === null ? void 0 : +valueMin;
- }
- function computeAriaValueText(element) {
- let valueText = element.getAttribute("aria-valuetext");
- return valueText === null ? void 0 : valueText;
- }
- var normalize2 = getDefaultNormalizer();
- function escapeRegExp(string) {
- return string.replace(/[.*+\-?^${}()|[\]\\]/g, "\\$&");
- }
- function getRegExpMatcher(string) {
- return new RegExp(escapeRegExp(string.toLowerCase()), "i");
- }
- function makeSuggestion(queryName, element, content, _ref) {
- let {
- variant,
- name
- } = _ref, warning3 = "", queryOptions = {}, queryArgs = [["Role", "TestId"].includes(queryName) ? content : getRegExpMatcher(content)];
- name && (queryOptions.name = getRegExpMatcher(name)), queryName === "Role" && isInaccessible(element) && (queryOptions.hidden = !0, warning3 = `Element is inaccessible. This means that the element and all its children are invisible to screen readers.
- If you are using the aria-hidden prop, make sure this is the right choice for your case.
- `), Object.keys(queryOptions).length > 0 && queryArgs.push(queryOptions);
- let queryMethod = variant + "By" + queryName;
- return {
- queryName,
- queryMethod,
- queryArgs,
- variant,
- warning: warning3,
- toString() {
- warning3 && console.warn(warning3);
- let [text, options] = queryArgs;
- return text = typeof text == "string" ? "'" + text + "'" : text, options = options ? ", { " + Object.entries(options).map((_ref2) => {
- let [k, v] = _ref2;
- return k + ": " + v;
- }).join(", ") + " }" : "", queryMethod + "(" + text + options + ")";
- }
- };
- }
- function canSuggest(currentMethod, requestedMethod, data) {
- return data && (!requestedMethod || requestedMethod.toLowerCase() === currentMethod.toLowerCase());
- }
- function getSuggestedQuery(element, variant, method) {
- var _element$getAttribute, _getImplicitAriaRoles;
- if (variant === void 0 && (variant = "get"), element.matches(getConfig2().defaultIgnore))
- return;
- let role = (_element$getAttribute = element.getAttribute("role")) != null ? _element$getAttribute : (_getImplicitAriaRoles = getImplicitAriaRoles2(element)) == null ? void 0 : _getImplicitAriaRoles[0];
- if (role !== "generic" && canSuggest("Role", method, role))
- return makeSuggestion("Role", element, role, {
- variant,
- name: computeAccessibleName2(element, {
- computedStyleSupportsPseudoElements: getConfig2().computedStyleSupportsPseudoElements
- })
- });
- let labelText = getLabels3(document, element).map((label) => label.content).join(" ");
- if (canSuggest("LabelText", method, labelText))
- return makeSuggestion("LabelText", element, labelText, {
- variant
- });
- let placeholderText = element.getAttribute("placeholder");
- if (canSuggest("PlaceholderText", method, placeholderText))
- return makeSuggestion("PlaceholderText", element, placeholderText, {
- variant
- });
- let textContent = normalize2(getNodeText(element));
- if (canSuggest("Text", method, textContent))
- return makeSuggestion("Text", element, textContent, {
- variant
- });
- if (canSuggest("DisplayValue", method, element.value))
- return makeSuggestion("DisplayValue", element, normalize2(element.value), {
- variant
- });
- let alt = element.getAttribute("alt");
- if (canSuggest("AltText", method, alt))
- return makeSuggestion("AltText", element, alt, {
- variant
- });
- let title = element.getAttribute("title");
- if (canSuggest("Title", method, title))
- return makeSuggestion("Title", element, title, {
- variant
- });
- let testId = element.getAttribute(getConfig2().testIdAttribute);
- if (canSuggest("TestId", method, testId))
- return makeSuggestion("TestId", element, testId, {
- variant
- });
- }
- function copyStackTrace(target, source) {
- target.stack = source.stack.replace(source.message, target.message);
- }
- function waitFor(callback, _ref) {
- let {
- container = getDocument(),
- timeout = getConfig2().asyncUtilTimeout,
- showOriginalStackTrace = getConfig2().showOriginalStackTrace,
- stackTraceError,
- interval = 50,
- onTimeout = (error) => (Object.defineProperty(error, "message", {
- value: getConfig2().getElementError(error.message, container).message
- }), error),
- mutationObserverOptions = {
- subtree: !0,
- childList: !0,
- attributes: !0,
- characterData: !0
- }
- } = _ref;
- if (typeof callback != "function")
- throw new TypeError("Received `callback` arg must be a function");
- return new Promise(async (resolve, reject) => {
- let lastError, intervalId, observer, finished = !1, promiseStatus = "idle", overallTimeoutTimer = setTimeout(handleTimeout, timeout), usingJestFakeTimers = jestFakeTimersAreEnabled();
- if (usingJestFakeTimers) {
- let {
- unstable_advanceTimersWrapper: advanceTimersWrapper
- } = getConfig2();
- for (checkCallback(); !finished; ) {
- if (!jestFakeTimersAreEnabled()) {
- let error = new Error("Changed from using fake timers to real timers while using waitFor. This is not allowed and will result in very strange behavior. Please ensure you're awaiting all async things your test is doing before changing to real timers. For more info, please go to https://github.com/testing-library/dom-testing-library/issues/830");
- showOriginalStackTrace || copyStackTrace(error, stackTraceError), reject(error);
- return;
- }
- if (await advanceTimersWrapper(async () => {
- jest.advanceTimersByTime(interval);
- }), finished)
- break;
- checkCallback();
- }
- } else {
- try {
- checkContainerType(container);
- } catch (e) {
- reject(e);
- return;
- }
- intervalId = setInterval(checkRealTimersCallback, interval);
- let {
- MutationObserver: MutationObserver2
- } = getWindowFromNode(container);
- observer = new MutationObserver2(checkRealTimersCallback), observer.observe(container, mutationObserverOptions), checkCallback();
- }
- function onDone(error, result) {
- finished = !0, clearTimeout(overallTimeoutTimer), usingJestFakeTimers || (clearInterval(intervalId), observer.disconnect()), error ? reject(error) : resolve(result);
- }
- function checkRealTimersCallback() {
- if (jestFakeTimersAreEnabled()) {
- let error = new Error("Changed from using real timers to fake timers while using waitFor. This is not allowed and will result in very strange behavior. Please ensure you're awaiting all async things your test is doing before changing to fake timers. For more info, please go to https://github.com/testing-library/dom-testing-library/issues/830");
- return showOriginalStackTrace || copyStackTrace(error, stackTraceError), reject(error);
- } else
- return checkCallback();
- }
- function checkCallback() {
- if (promiseStatus !== "pending")
- try {
- let result = runWithExpensiveErrorDiagnosticsDisabled(callback);
- typeof result?.then == "function" ? (promiseStatus = "pending", result.then((resolvedValue) => {
- promiseStatus = "resolved", onDone(null, resolvedValue);
- }, (rejectedValue) => {
- promiseStatus = "rejected", lastError = rejectedValue;
- })) : onDone(null, result);
- } catch (error) {
- lastError = error;
- }
- }
- function handleTimeout() {
- let error;
- lastError ? (error = lastError, !showOriginalStackTrace && error.name === "TestingLibraryElementError" && copyStackTrace(error, stackTraceError)) : (error = new Error("Timed out in waitFor."), showOriginalStackTrace || copyStackTrace(error, stackTraceError)), onDone(onTimeout(error), null);
- }
- });
- }
- function waitForWrapper(callback, options) {
- let stackTraceError = new Error("STACK_TRACE_MESSAGE");
- return getConfig2().asyncWrapper(() => waitFor(callback, {
- stackTraceError,
- ...options
- }));
- }
- function getElementError(message, container) {
- return getConfig2().getElementError(message, container);
- }
- function getMultipleElementsFoundError(message, container) {
- return getElementError(message + "\n\n(If this is intentional, then use the `*AllBy*` variant of the query (like `queryAllByText`, `getAllByText`, or `findAllByText`)).", container);
- }
- function queryAllByAttribute(attribute, container, text, _temp) {
- let {
- exact = !0,
- collapseWhitespace,
- trim: trim2,
- normalizer
- } = _temp === void 0 ? {} : _temp, matcher = exact ? matches3 : fuzzyMatches, matchNormalizer = makeNormalizer({
- collapseWhitespace,
- trim: trim2,
- normalizer
- });
- return Array.from(container.querySelectorAll("[" + attribute + "]")).filter((node2) => matcher(node2.getAttribute(attribute), node2, text, matchNormalizer));
- }
- function queryByAttribute(attribute, container, text, options) {
- let els = queryAllByAttribute(attribute, container, text, options);
- if (els.length > 1)
- throw getMultipleElementsFoundError("Found multiple elements by [" + attribute + "=" + text + "]", container);
- return els[0] || null;
- }
- function makeSingleQuery(allQuery, getMultipleError2) {
- return function(container) {
- for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++)
- args[_key - 1] = arguments[_key];
- let els = allQuery(container, ...args);
- if (els.length > 1) {
- let elementStrings = els.map((element) => getElementError(null, element).message).join(`
-
- `);
- throw getMultipleElementsFoundError(getMultipleError2(container, ...args) + `
-
- Here are the matching elements:
-
- ` + elementStrings, container);
- }
- return els[0] || null;
- };
- }
- function getSuggestionError(suggestion, container) {
- return getConfig2().getElementError(`A better query is available, try this:
- ` + suggestion.toString() + `
- `, container);
- }
- function makeGetAllQuery(allQuery, getMissingError2) {
- return function(container) {
- for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++)
- args[_key2 - 1] = arguments[_key2];
- let els = allQuery(container, ...args);
- if (!els.length)
- throw getConfig2().getElementError(getMissingError2(container, ...args), container);
- return els;
- };
- }
- function makeFindQuery(getter) {
- return (container, text, options, waitForOptions) => waitForWrapper(() => getter(container, text, options), {
- container,
- ...waitForOptions
- });
- }
- var wrapSingleQueryWithSuggestion = (query, queryAllByName, variant) => function(container) {
- for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++)
- args[_key3 - 1] = arguments[_key3];
- let element = query(container, ...args), [{
- suggest = getConfig2().throwSuggestions
- } = {}] = args.slice(-1);
- if (element && suggest) {
- let suggestion = getSuggestedQuery(element, variant);
- if (suggestion && !queryAllByName.endsWith(suggestion.queryName))
- throw getSuggestionError(suggestion.toString(), container);
- }
- return element;
- }, wrapAllByQueryWithSuggestion = (query, queryAllByName, variant) => function(container) {
- for (var _len4 = arguments.length, args = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++)
- args[_key4 - 1] = arguments[_key4];
- let els = query(container, ...args), [{
- suggest = getConfig2().throwSuggestions
- } = {}] = args.slice(-1);
- if (els.length && suggest) {
- let uniqueSuggestionMessages = [...new Set(els.map((element) => {
- var _getSuggestedQuery;
- return (_getSuggestedQuery = getSuggestedQuery(element, variant)) == null ? void 0 : _getSuggestedQuery.toString();
- }))];
- if (
- // only want to suggest if all the els have the same suggestion.
- uniqueSuggestionMessages.length === 1 && !queryAllByName.endsWith(
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- TODO: Can this be null at runtime?
- getSuggestedQuery(els[0], variant).queryName
- )
- )
- throw getSuggestionError(uniqueSuggestionMessages[0], container);
- }
- return els;
- };
- function buildQueries(queryAllBy, getMultipleError2, getMissingError2) {
- let queryBy = wrapSingleQueryWithSuggestion(makeSingleQuery(queryAllBy, getMultipleError2), queryAllBy.name, "query"), getAllBy = makeGetAllQuery(queryAllBy, getMissingError2), getBy = makeSingleQuery(getAllBy, getMultipleError2), getByWithSuggestions = wrapSingleQueryWithSuggestion(getBy, queryAllBy.name, "get"), getAllWithSuggestions = wrapAllByQueryWithSuggestion(getAllBy, queryAllBy.name.replace("query", "get"), "getAll"), findAllBy = makeFindQuery(wrapAllByQueryWithSuggestion(getAllBy, queryAllBy.name, "findAll")), findBy = makeFindQuery(wrapSingleQueryWithSuggestion(getBy, queryAllBy.name, "find"));
- return [queryBy, getAllWithSuggestions, getByWithSuggestions, findAllBy, findBy];
- }
- var queryHelpers = Object.freeze({
- __proto__: null,
- getElementError,
- wrapAllByQueryWithSuggestion,
- wrapSingleQueryWithSuggestion,
- getMultipleElementsFoundError,
- queryAllByAttribute,
- queryByAttribute,
- makeSingleQuery,
- makeGetAllQuery,
- makeFindQuery,
- buildQueries
- });
- function queryAllLabels(container) {
- return Array.from(container.querySelectorAll("label,input")).map((node2) => ({
- node: node2,
- textToMatch: getLabelContent(node2)
- })).filter((_ref) => {
- let {
- textToMatch
- } = _ref;
- return textToMatch !== null;
- });
- }
- var queryAllLabelsByText = function(container, text, _temp) {
- let {
- exact = !0,
- trim: trim2,
- collapseWhitespace,
- normalizer
- } = _temp === void 0 ? {} : _temp, matcher = exact ? matches3 : fuzzyMatches, matchNormalizer = makeNormalizer({
- collapseWhitespace,
- trim: trim2,
- normalizer
- });
- return queryAllLabels(container).filter((_ref2) => {
- let {
- node: node2,
- textToMatch
- } = _ref2;
- return matcher(textToMatch, node2, text, matchNormalizer);
- }).map((_ref3) => {
- let {
- node: node2
- } = _ref3;
- return node2;
- });
- }, queryAllByLabelText = function(container, text, _temp2) {
- let {
- selector = "*",
- exact = !0,
- collapseWhitespace,
- trim: trim2,
- normalizer
- } = _temp2 === void 0 ? {} : _temp2;
- checkContainerType(container);
- let matcher = exact ? matches3 : fuzzyMatches, matchNormalizer = makeNormalizer({
- collapseWhitespace,
- trim: trim2,
- normalizer
- }), matchingLabelledElements = Array.from(container.querySelectorAll("*")).filter((element) => getRealLabels(element).length || element.hasAttribute("aria-labelledby")).reduce((labelledElements, labelledElement) => {
- let labelList = getLabels3(container, labelledElement, {
- selector
- });
- labelList.filter((label) => !!label.formControl).forEach((label) => {
- matcher(label.content, label.formControl, text, matchNormalizer) && label.formControl && labelledElements.push(label.formControl);
- });
- let labelsValue = labelList.filter((label) => !!label.content).map((label) => label.content);
- return matcher(labelsValue.join(" "), labelledElement, text, matchNormalizer) && labelledElements.push(labelledElement), labelsValue.length > 1 && labelsValue.forEach((labelValue, index4) => {
- matcher(labelValue, labelledElement, text, matchNormalizer) && labelledElements.push(labelledElement);
- let labelsFiltered = [...labelsValue];
- labelsFiltered.splice(index4, 1), labelsFiltered.length > 1 && matcher(labelsFiltered.join(" "), labelledElement, text, matchNormalizer) && labelledElements.push(labelledElement);
- }), labelledElements;
- }, []).concat(queryAllByAttribute("aria-label", container, text, {
- exact,
- normalizer: matchNormalizer
- }));
- return Array.from(new Set(matchingLabelledElements)).filter((element) => element.matches(selector));
- }, getAllByLabelText = function(container, text) {
- for (var _len = arguments.length, rest = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++)
- rest[_key - 2] = arguments[_key];
- let els = queryAllByLabelText(container, text, ...rest);
- if (!els.length) {
- let labels = queryAllLabelsByText(container, text, ...rest);
- if (labels.length) {
- let tagNames = labels.map((label) => getTagNameOfElementAssociatedWithLabelViaFor(container, label)).filter((tagName) => !!tagName);
- throw tagNames.length ? getConfig2().getElementError(tagNames.map((tagName) => "Found a label with the text of: " + text + ", however the element associated with this label (<" + tagName + " />) is non-labellable [https://html.spec.whatwg.org/multipage/forms.html#category-label]. If you really need to label a <" + tagName + " />, you can use aria-label or aria-labelledby instead.").join(`
-
- `), container) : getConfig2().getElementError("Found a label with the text of: " + text + `, however no form control was found associated to that label. Make sure you're using the "for" attribute or "aria-labelledby" attribute correctly.`, container);
- } else
- throw getConfig2().getElementError("Unable to find a label with the text of: " + text, container);
- }
- return els;
- };
- function getTagNameOfElementAssociatedWithLabelViaFor(container, label) {
- let htmlFor = label.getAttribute("for");
- if (!htmlFor)
- return null;
- let element = container.querySelector('[id="' + htmlFor + '"]');
- return element ? element.tagName.toLowerCase() : null;
- }
- var getMultipleError$7 = (c, text) => "Found multiple elements with the text of: " + text, queryByLabelText = wrapSingleQueryWithSuggestion(makeSingleQuery(queryAllByLabelText, getMultipleError$7), queryAllByLabelText.name, "query"), getByLabelText = makeSingleQuery(getAllByLabelText, getMultipleError$7), findAllByLabelText = makeFindQuery(wrapAllByQueryWithSuggestion(getAllByLabelText, getAllByLabelText.name, "findAll")), findByLabelText = makeFindQuery(wrapSingleQueryWithSuggestion(getByLabelText, getAllByLabelText.name, "find")), getAllByLabelTextWithSuggestions = wrapAllByQueryWithSuggestion(getAllByLabelText, getAllByLabelText.name, "getAll"), getByLabelTextWithSuggestions = wrapSingleQueryWithSuggestion(getByLabelText, getAllByLabelText.name, "get"), queryAllByLabelTextWithSuggestions = wrapAllByQueryWithSuggestion(queryAllByLabelText, queryAllByLabelText.name, "queryAll"), queryAllByPlaceholderText = function() {
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++)
- args[_key] = arguments[_key];
- return checkContainerType(args[0]), queryAllByAttribute("placeholder", ...args);
- }, getMultipleError$6 = (c, text) => "Found multiple elements with the placeholder text of: " + text, getMissingError$6 = (c, text) => "Unable to find an element with the placeholder text of: " + text, queryAllByPlaceholderTextWithSuggestions = wrapAllByQueryWithSuggestion(queryAllByPlaceholderText, queryAllByPlaceholderText.name, "queryAll"), [queryByPlaceholderText, getAllByPlaceholderText, getByPlaceholderText, findAllByPlaceholderText, findByPlaceholderText] = buildQueries(queryAllByPlaceholderText, getMultipleError$6, getMissingError$6), queryAllByText = function(container, text, _temp) {
- let {
- selector = "*",
- exact = !0,
- collapseWhitespace,
- trim: trim2,
- ignore = getConfig2().defaultIgnore,
- normalizer
- } = _temp === void 0 ? {} : _temp;
- checkContainerType(container);
- let matcher = exact ? matches3 : fuzzyMatches, matchNormalizer = makeNormalizer({
- collapseWhitespace,
- trim: trim2,
- normalizer
- }), baseArray = [];
- return typeof container.matches == "function" && container.matches(selector) && (baseArray = [container]), [...baseArray, ...Array.from(container.querySelectorAll(selector))].filter((node2) => !ignore || !node2.matches(ignore)).filter((node2) => matcher(getNodeText(node2), node2, text, matchNormalizer));
- }, getMultipleError$5 = (c, text) => "Found multiple elements with the text: " + text, getMissingError$5 = function(c, text, options) {
- options === void 0 && (options = {});
- let {
- collapseWhitespace,
- trim: trim2,
- normalizer,
- selector
- } = options, normalizedText = makeNormalizer({
- collapseWhitespace,
- trim: trim2,
- normalizer
- })(text.toString()), isNormalizedDifferent = normalizedText !== text.toString(), isCustomSelector = (selector ?? "*") !== "*";
- return "Unable to find an element with the text: " + (isNormalizedDifferent ? normalizedText + " (normalized from '" + text + "')" : text) + (isCustomSelector ? ", which matches selector '" + selector + "'" : "") + ". This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible.";
- }, queryAllByTextWithSuggestions = wrapAllByQueryWithSuggestion(queryAllByText, queryAllByText.name, "queryAll"), [queryByText, getAllByText, getByText, findAllByText, findByText] = buildQueries(queryAllByText, getMultipleError$5, getMissingError$5), queryAllByDisplayValue = function(container, value, _temp) {
- let {
- exact = !0,
- collapseWhitespace,
- trim: trim2,
- normalizer
- } = _temp === void 0 ? {} : _temp;
- checkContainerType(container);
- let matcher = exact ? matches3 : fuzzyMatches, matchNormalizer = makeNormalizer({
- collapseWhitespace,
- trim: trim2,
- normalizer
- });
- return Array.from(container.querySelectorAll("input,textarea,select")).filter((node2) => node2.tagName === "SELECT" ? Array.from(node2.options).filter((option) => option.selected).some((optionNode) => matcher(getNodeText(optionNode), optionNode, value, matchNormalizer)) : matcher(node2.value, node2, value, matchNormalizer));
- }, getMultipleError$4 = (c, value) => "Found multiple elements with the display value: " + value + ".", getMissingError$4 = (c, value) => "Unable to find an element with the display value: " + value + ".", queryAllByDisplayValueWithSuggestions = wrapAllByQueryWithSuggestion(queryAllByDisplayValue, queryAllByDisplayValue.name, "queryAll"), [queryByDisplayValue, getAllByDisplayValue, getByDisplayValue, findAllByDisplayValue, findByDisplayValue] = buildQueries(queryAllByDisplayValue, getMultipleError$4, getMissingError$4), VALID_TAG_REGEXP = /^(img|input|area|.+-.+)$/i, queryAllByAltText = function(container, alt, options) {
- return options === void 0 && (options = {}), checkContainerType(container), queryAllByAttribute("alt", container, alt, options).filter((node2) => VALID_TAG_REGEXP.test(node2.tagName));
- }, getMultipleError$3 = (c, alt) => "Found multiple elements with the alt text: " + alt, getMissingError$3 = (c, alt) => "Unable to find an element with the alt text: " + alt, queryAllByAltTextWithSuggestions = wrapAllByQueryWithSuggestion(queryAllByAltText, queryAllByAltText.name, "queryAll"), [queryByAltText, getAllByAltText, getByAltText, findAllByAltText, findByAltText] = buildQueries(queryAllByAltText, getMultipleError$3, getMissingError$3), isSvgTitle = (node2) => {
- var _node$parentElement;
- return node2.tagName.toLowerCase() === "title" && ((_node$parentElement = node2.parentElement) == null ? void 0 : _node$parentElement.tagName.toLowerCase()) === "svg";
- }, queryAllByTitle = function(container, text, _temp) {
- let {
- exact = !0,
- collapseWhitespace,
- trim: trim2,
- normalizer
- } = _temp === void 0 ? {} : _temp;
- checkContainerType(container);
- let matcher = exact ? matches3 : fuzzyMatches, matchNormalizer = makeNormalizer({
- collapseWhitespace,
- trim: trim2,
- normalizer
- });
- return Array.from(container.querySelectorAll("[title], svg > title")).filter((node2) => matcher(node2.getAttribute("title"), node2, text, matchNormalizer) || isSvgTitle(node2) && matcher(getNodeText(node2), node2, text, matchNormalizer));
- }, getMultipleError$2 = (c, title) => "Found multiple elements with the title: " + title + ".", getMissingError$2 = (c, title) => "Unable to find an element with the title: " + title + ".", queryAllByTitleWithSuggestions = wrapAllByQueryWithSuggestion(queryAllByTitle, queryAllByTitle.name, "queryAll"), [queryByTitle, getAllByTitle, getByTitle, findAllByTitle, findByTitle] = buildQueries(queryAllByTitle, getMultipleError$2, getMissingError$2), queryAllByRole = function(container, role, _temp) {
- let {
- hidden = getConfig2().defaultHidden,
- name,
- description,
- queryFallbacks = !1,
- selected,
- busy,
- checked,
- pressed,
- current,
- level,
- expanded,
- value: {
- now: valueNow,
- min: valueMin,
- max: valueMax,
- text: valueText
- } = {}
- } = _temp === void 0 ? {} : _temp;
- if (checkContainerType(container), selected !== void 0) {
- var _allRoles$get;
- if (((_allRoles$get = import_aria_query3.roles.get(role)) == null ? void 0 : _allRoles$get.props["aria-selected"]) === void 0)
- throw new Error('"aria-selected" is not supported on role "' + role + '".');
- }
- if (busy !== void 0) {
- var _allRoles$get2;
- if (((_allRoles$get2 = import_aria_query3.roles.get(role)) == null ? void 0 : _allRoles$get2.props["aria-busy"]) === void 0)
- throw new Error('"aria-busy" is not supported on role "' + role + '".');
- }
- if (checked !== void 0) {
- var _allRoles$get3;
- if (((_allRoles$get3 = import_aria_query3.roles.get(role)) == null ? void 0 : _allRoles$get3.props["aria-checked"]) === void 0)
- throw new Error('"aria-checked" is not supported on role "' + role + '".');
- }
- if (pressed !== void 0) {
- var _allRoles$get4;
- if (((_allRoles$get4 = import_aria_query3.roles.get(role)) == null ? void 0 : _allRoles$get4.props["aria-pressed"]) === void 0)
- throw new Error('"aria-pressed" is not supported on role "' + role + '".');
- }
- if (current !== void 0) {
- var _allRoles$get5;
- if (((_allRoles$get5 = import_aria_query3.roles.get(role)) == null ? void 0 : _allRoles$get5.props["aria-current"]) === void 0)
- throw new Error('"aria-current" is not supported on role "' + role + '".');
- }
- if (level !== void 0 && role !== "heading")
- throw new Error('Role "' + role + '" cannot have "level" property.');
- if (valueNow !== void 0) {
- var _allRoles$get6;
- if (((_allRoles$get6 = import_aria_query3.roles.get(role)) == null ? void 0 : _allRoles$get6.props["aria-valuenow"]) === void 0)
- throw new Error('"aria-valuenow" is not supported on role "' + role + '".');
- }
- if (valueMax !== void 0) {
- var _allRoles$get7;
- if (((_allRoles$get7 = import_aria_query3.roles.get(role)) == null ? void 0 : _allRoles$get7.props["aria-valuemax"]) === void 0)
- throw new Error('"aria-valuemax" is not supported on role "' + role + '".');
- }
- if (valueMin !== void 0) {
- var _allRoles$get8;
- if (((_allRoles$get8 = import_aria_query3.roles.get(role)) == null ? void 0 : _allRoles$get8.props["aria-valuemin"]) === void 0)
- throw new Error('"aria-valuemin" is not supported on role "' + role + '".');
- }
- if (valueText !== void 0) {
- var _allRoles$get9;
- if (((_allRoles$get9 = import_aria_query3.roles.get(role)) == null ? void 0 : _allRoles$get9.props["aria-valuetext"]) === void 0)
- throw new Error('"aria-valuetext" is not supported on role "' + role + '".');
- }
- if (expanded !== void 0) {
- var _allRoles$get0;
- if (((_allRoles$get0 = import_aria_query3.roles.get(role)) == null ? void 0 : _allRoles$get0.props["aria-expanded"]) === void 0)
- throw new Error('"aria-expanded" is not supported on role "' + role + '".');
- }
- let subtreeIsInaccessibleCache = /* @__PURE__ */ new WeakMap();
- function cachedIsSubtreeInaccessible(element) {
- return subtreeIsInaccessibleCache.has(element) || subtreeIsInaccessibleCache.set(element, isSubtreeInaccessible(element)), subtreeIsInaccessibleCache.get(element);
- }
- return Array.from(container.querySelectorAll(
- // Only query elements that can be matched by the following filters
- makeRoleSelector(role)
- )).filter((node2) => {
- if (node2.hasAttribute("role")) {
- let roleValue = node2.getAttribute("role");
- if (queryFallbacks)
- return roleValue.split(" ").filter(Boolean).some((roleAttributeToken) => roleAttributeToken === role);
- let [firstRoleAttributeToken] = roleValue.split(" ");
- return firstRoleAttributeToken === role;
- }
- return getImplicitAriaRoles2(node2).some((implicitRole) => implicitRole === role);
- }).filter((element) => {
- if (selected !== void 0)
- return selected === computeAriaSelected(element);
- if (busy !== void 0)
- return busy === computeAriaBusy(element);
- if (checked !== void 0)
- return checked === computeAriaChecked(element);
- if (pressed !== void 0)
- return pressed === computeAriaPressed(element);
- if (current !== void 0)
- return current === computeAriaCurrent(element);
- if (expanded !== void 0)
- return expanded === computeAriaExpanded(element);
- if (level !== void 0)
- return level === computeHeadingLevel(element);
- if (valueNow !== void 0 || valueMax !== void 0 || valueMin !== void 0 || valueText !== void 0) {
- let valueMatches = !0;
- if (valueNow !== void 0 && valueMatches && (valueMatches = valueNow === computeAriaValueNow(element)), valueMax !== void 0 && valueMatches && (valueMatches = valueMax === computeAriaValueMax(element)), valueMin !== void 0 && valueMatches && (valueMatches = valueMin === computeAriaValueMin(element)), valueText !== void 0) {
- var _computeAriaValueText;
- valueMatches && (valueMatches = matches3((_computeAriaValueText = computeAriaValueText(element)) != null ? _computeAriaValueText : null, element, valueText, (text) => text));
- }
- return valueMatches;
- }
- return !0;
- }).filter((element) => name === void 0 ? !0 : matches3(computeAccessibleName2(element, {
- computedStyleSupportsPseudoElements: getConfig2().computedStyleSupportsPseudoElements
- }), element, name, (text) => text)).filter((element) => description === void 0 ? !0 : matches3(computeAccessibleDescription2(element, {
- computedStyleSupportsPseudoElements: getConfig2().computedStyleSupportsPseudoElements
- }), element, description, (text) => text)).filter((element) => hidden === !1 ? isInaccessible(element, {
- isSubtreeInaccessible: cachedIsSubtreeInaccessible
- }) === !1 : !0);
- };
- function makeRoleSelector(role) {
- var _roleElements$get;
- let explicitRoleSelector = '*[role~="' + role + '"]', roleRelations = (_roleElements$get = import_aria_query3.roleElements.get(role)) != null ? _roleElements$get : /* @__PURE__ */ new Set(), implicitRoleSelectors = new Set(Array.from(roleRelations).map((_ref) => {
- let {
- name
- } = _ref;
- return name;
- }));
- return [explicitRoleSelector].concat(Array.from(implicitRoleSelectors)).join(",");
- }
- var getNameHint = (name) => {
- let nameHint = "";
- return name === void 0 ? nameHint = "" : typeof name == "string" ? nameHint = ' and name "' + name + '"' : nameHint = " and name `" + name + "`", nameHint;
- }, getMultipleError$1 = function(c, role, _temp2) {
- let {
- name
- } = _temp2 === void 0 ? {} : _temp2;
- return 'Found multiple elements with the role "' + role + '"' + getNameHint(name);
- }, getMissingError$1 = function(container, role, _temp3) {
- let {
- hidden = getConfig2().defaultHidden,
- name,
- description
- } = _temp3 === void 0 ? {} : _temp3;
- if (getConfig2()._disableExpensiveErrorDiagnostics)
- return 'Unable to find role="' + role + '"' + getNameHint(name);
- let roles3 = "";
- Array.from(container.children).forEach((childElement) => {
- roles3 += prettyRoles(childElement, {
- hidden,
- includeDescription: description !== void 0
- });
- });
- let roleMessage;
- roles3.length === 0 ? hidden === !1 ? roleMessage = "There are no accessible roles. But there might be some inaccessible roles. If you wish to access them, then set the `hidden` option to `true`. Learn more about this here: https://testing-library.com/docs/dom-testing-library/api-queries#byrole" : roleMessage = "There are no available roles." : roleMessage = (`
- Here are the ` + (hidden === !1 ? "accessible" : "available") + ` roles:
-
- ` + roles3.replace(/\n/g, `
- `).replace(/\n\s\s\n/g, `
-
- `) + `
- `).trim();
- let nameHint = "";
- name === void 0 ? nameHint = "" : typeof name == "string" ? nameHint = ' and name "' + name + '"' : nameHint = " and name `" + name + "`";
- let descriptionHint = "";
- return description === void 0 ? descriptionHint = "" : typeof description == "string" ? descriptionHint = ' and description "' + description + '"' : descriptionHint = " and description `" + description + "`", (`
- Unable to find an ` + (hidden === !1 ? "accessible " : "") + 'element with the role "' + role + '"' + nameHint + descriptionHint + `
-
- ` + roleMessage).trim();
- }, queryAllByRoleWithSuggestions = wrapAllByQueryWithSuggestion(queryAllByRole, queryAllByRole.name, "queryAll"), [queryByRole, getAllByRole, getByRole, findAllByRole, findByRole] = buildQueries(queryAllByRole, getMultipleError$1, getMissingError$1), getTestIdAttribute = () => getConfig2().testIdAttribute, queryAllByTestId = function() {
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++)
- args[_key] = arguments[_key];
- return checkContainerType(args[0]), queryAllByAttribute(getTestIdAttribute(), ...args);
- }, getMultipleError = (c, id) => "Found multiple elements by: [" + getTestIdAttribute() + '="' + id + '"]', getMissingError = (c, id) => "Unable to find an element by: [" + getTestIdAttribute() + '="' + id + '"]', queryAllByTestIdWithSuggestions = wrapAllByQueryWithSuggestion(queryAllByTestId, queryAllByTestId.name, "queryAll"), [queryByTestId, getAllByTestId, getByTestId, findAllByTestId, findByTestId] = buildQueries(queryAllByTestId, getMultipleError, getMissingError), queries = Object.freeze({
- __proto__: null,
- queryAllByLabelText: queryAllByLabelTextWithSuggestions,
- queryByLabelText,
- getAllByLabelText: getAllByLabelTextWithSuggestions,
- getByLabelText: getByLabelTextWithSuggestions,
- findAllByLabelText,
- findByLabelText,
- queryByPlaceholderText,
- queryAllByPlaceholderText: queryAllByPlaceholderTextWithSuggestions,
- getByPlaceholderText,
- getAllByPlaceholderText,
- findAllByPlaceholderText,
- findByPlaceholderText,
- queryByText,
- queryAllByText: queryAllByTextWithSuggestions,
- getByText,
- getAllByText,
- findAllByText,
- findByText,
- queryByDisplayValue,
- queryAllByDisplayValue: queryAllByDisplayValueWithSuggestions,
- getByDisplayValue,
- getAllByDisplayValue,
- findAllByDisplayValue,
- findByDisplayValue,
- queryByAltText,
- queryAllByAltText: queryAllByAltTextWithSuggestions,
- getByAltText,
- getAllByAltText,
- findAllByAltText,
- findByAltText,
- queryByTitle,
- queryAllByTitle: queryAllByTitleWithSuggestions,
- getByTitle,
- getAllByTitle,
- findAllByTitle,
- findByTitle,
- queryByRole,
- queryAllByRole: queryAllByRoleWithSuggestions,
- getAllByRole,
- getByRole,
- findAllByRole,
- findByRole,
- queryByTestId,
- queryAllByTestId: queryAllByTestIdWithSuggestions,
- getByTestId,
- getAllByTestId,
- findAllByTestId,
- findByTestId
- });
- function getQueriesForElement(element, queries$1, initialValue2) {
- return queries$1 === void 0 && (queries$1 = queries), initialValue2 === void 0 && (initialValue2 = {}), Object.keys(queries$1).reduce((helpers, key) => {
- let fn4 = queries$1[key];
- return helpers[key] = fn4.bind(null, element), helpers;
- }, initialValue2);
- }
- var isRemoved = (result) => !result || Array.isArray(result) && !result.length;
- function initialCheck(elements) {
- if (isRemoved(elements))
- throw new Error("The element(s) given to waitForElementToBeRemoved are already removed. waitForElementToBeRemoved requires that the element(s) exist(s) before waiting for removal.");
- }
- async function waitForElementToBeRemoved(callback, options) {
- let timeoutError = new Error("Timed out in waitForElementToBeRemoved.");
- if (typeof callback != "function") {
- initialCheck(callback);
- let getRemainingElements = (Array.isArray(callback) ? callback : [callback]).map((element) => {
- let parent = element.parentElement;
- if (parent === null) return () => null;
- for (; parent.parentElement; ) parent = parent.parentElement;
- return () => parent.contains(element) ? element : null;
- });
- callback = () => getRemainingElements.map((c) => c()).filter(Boolean);
- }
- return initialCheck(callback()), waitForWrapper(() => {
- let result;
- try {
- result = callback();
- } catch (error) {
- if (error.name === "TestingLibraryElementError")
- return;
- throw error;
- }
- if (!isRemoved(result))
- throw timeoutError;
- }, options);
- }
- var eventMap = {
- // Clipboard Events
- copy: {
- EventType: "ClipboardEvent",
- defaultInit: {
- bubbles: !0,
- cancelable: !0,
- composed: !0
- }
- },
- cut: {
- EventType: "ClipboardEvent",
- defaultInit: {
- bubbles: !0,
- cancelable: !0,
- composed: !0
- }
- },
- paste: {
- EventType: "ClipboardEvent",
- defaultInit: {
- bubbles: !0,
- cancelable: !0,
- composed: !0
- }
- },
- // Composition Events
- compositionEnd: {
- EventType: "CompositionEvent",
- defaultInit: {
- bubbles: !0,
- cancelable: !0,
- composed: !0
- }
- },
- compositionStart: {
- EventType: "CompositionEvent",
- defaultInit: {
- bubbles: !0,
- cancelable: !0,
- composed: !0
- }
- },
- compositionUpdate: {
- EventType: "CompositionEvent",
- defaultInit: {
- bubbles: !0,
- cancelable: !0,
- composed: !0
- }
- },
- // Keyboard Events
- keyDown: {
- EventType: "KeyboardEvent",
- defaultInit: {
- bubbles: !0,
- cancelable: !0,
- charCode: 0,
- composed: !0
- }
- },
- keyPress: {
- EventType: "KeyboardEvent",
- defaultInit: {
- bubbles: !0,
- cancelable: !0,
- charCode: 0,
- composed: !0
- }
- },
- keyUp: {
- EventType: "KeyboardEvent",
- defaultInit: {
- bubbles: !0,
- cancelable: !0,
- charCode: 0,
- composed: !0
- }
- },
- // Focus Events
- focus: {
- EventType: "FocusEvent",
- defaultInit: {
- bubbles: !1,
- cancelable: !1,
- composed: !0
- }
- },
- blur: {
- EventType: "FocusEvent",
- defaultInit: {
- bubbles: !1,
- cancelable: !1,
- composed: !0
- }
- },
- focusIn: {
- EventType: "FocusEvent",
- defaultInit: {
- bubbles: !0,
- cancelable: !1,
- composed: !0
- }
- },
- focusOut: {
- EventType: "FocusEvent",
- defaultInit: {
- bubbles: !0,
- cancelable: !1,
- composed: !0
- }
- },
- // Form Events
- change: {
- EventType: "Event",
- defaultInit: {
- bubbles: !0,
- cancelable: !1
- }
- },
- input: {
- EventType: "InputEvent",
- defaultInit: {
- bubbles: !0,
- cancelable: !1,
- composed: !0
- }
- },
- invalid: {
- EventType: "Event",
- defaultInit: {
- bubbles: !1,
- cancelable: !0
- }
- },
- submit: {
- EventType: "Event",
- defaultInit: {
- bubbles: !0,
- cancelable: !0
- }
- },
- reset: {
- EventType: "Event",
- defaultInit: {
- bubbles: !0,
- cancelable: !0
- }
- },
- // Mouse Events
- click: {
- EventType: "MouseEvent",
- defaultInit: {
- bubbles: !0,
- cancelable: !0,
- button: 0,
- composed: !0
- }
- },
- contextMenu: {
- EventType: "MouseEvent",
- defaultInit: {
- bubbles: !0,
- cancelable: !0,
- composed: !0
- }
- },
- dblClick: {
- EventType: "MouseEvent",
- defaultInit: {
- bubbles: !0,
- cancelable: !0,
- composed: !0
- }
- },
- drag: {
- EventType: "DragEvent",
- defaultInit: {
- bubbles: !0,
- cancelable: !0,
- composed: !0
- }
- },
- dragEnd: {
- EventType: "DragEvent",
- defaultInit: {
- bubbles: !0,
- cancelable: !1,
- composed: !0
- }
- },
- dragEnter: {
- EventType: "DragEvent",
- defaultInit: {
- bubbles: !0,
- cancelable: !0,
- composed: !0
- }
- },
- dragExit: {
- EventType: "DragEvent",
- defaultInit: {
- bubbles: !0,
- cancelable: !1,
- composed: !0
- }
- },
- dragLeave: {
- EventType: "DragEvent",
- defaultInit: {
- bubbles: !0,
- cancelable: !1,
- composed: !0
- }
- },
- dragOver: {
- EventType: "DragEvent",
- defaultInit: {
- bubbles: !0,
- cancelable: !0,
- composed: !0
- }
- },
- dragStart: {
- EventType: "DragEvent",
- defaultInit: {
- bubbles: !0,
- cancelable: !0,
- composed: !0
- }
- },
- drop: {
- EventType: "DragEvent",
- defaultInit: {
- bubbles: !0,
- cancelable: !0,
- composed: !0
- }
- },
- mouseDown: {
- EventType: "MouseEvent",
- defaultInit: {
- bubbles: !0,
- cancelable: !0,
- composed: !0
- }
- },
- mouseEnter: {
- EventType: "MouseEvent",
- defaultInit: {
- bubbles: !1,
- cancelable: !1,
- composed: !0
- }
- },
- mouseLeave: {
- EventType: "MouseEvent",
- defaultInit: {
- bubbles: !1,
- cancelable: !1,
- composed: !0
- }
- },
- mouseMove: {
- EventType: "MouseEvent",
- defaultInit: {
- bubbles: !0,
- cancelable: !0,
- composed: !0
- }
- },
- mouseOut: {
- EventType: "MouseEvent",
- defaultInit: {
- bubbles: !0,
- cancelable: !0,
- composed: !0
- }
- },
- mouseOver: {
- EventType: "MouseEvent",
- defaultInit: {
- bubbles: !0,
- cancelable: !0,
- composed: !0
- }
- },
- mouseUp: {
- EventType: "MouseEvent",
- defaultInit: {
- bubbles: !0,
- cancelable: !0,
- composed: !0
- }
- },
- // Selection Events
- select: {
- EventType: "Event",
- defaultInit: {
- bubbles: !0,
- cancelable: !1
- }
- },
- // Touch Events
- touchCancel: {
- EventType: "TouchEvent",
- defaultInit: {
- bubbles: !0,
- cancelable: !1,
- composed: !0
- }
- },
- touchEnd: {
- EventType: "TouchEvent",
- defaultInit: {
- bubbles: !0,
- cancelable: !0,
- composed: !0
- }
- },
- touchMove: {
- EventType: "TouchEvent",
- defaultInit: {
- bubbles: !0,
- cancelable: !0,
- composed: !0
- }
- },
- touchStart: {
- EventType: "TouchEvent",
- defaultInit: {
- bubbles: !0,
- cancelable: !0,
- composed: !0
- }
- },
- // UI Events
- resize: {
- EventType: "UIEvent",
- defaultInit: {
- bubbles: !1,
- cancelable: !1
- }
- },
- scroll: {
- EventType: "UIEvent",
- defaultInit: {
- bubbles: !1,
- cancelable: !1
- }
- },
- // Wheel Events
- wheel: {
- EventType: "WheelEvent",
- defaultInit: {
- bubbles: !0,
- cancelable: !0,
- composed: !0
- }
- },
- // Media Events
- abort: {
- EventType: "Event",
- defaultInit: {
- bubbles: !1,
- cancelable: !1
- }
- },
- canPlay: {
- EventType: "Event",
- defaultInit: {
- bubbles: !1,
- cancelable: !1
- }
- },
- canPlayThrough: {
- EventType: "Event",
- defaultInit: {
- bubbles: !1,
- cancelable: !1
- }
- },
- durationChange: {
- EventType: "Event",
- defaultInit: {
- bubbles: !1,
- cancelable: !1
- }
- },
- emptied: {
- EventType: "Event",
- defaultInit: {
- bubbles: !1,
- cancelable: !1
- }
- },
- encrypted: {
- EventType: "Event",
- defaultInit: {
- bubbles: !1,
- cancelable: !1
- }
- },
- ended: {
- EventType: "Event",
- defaultInit: {
- bubbles: !1,
- cancelable: !1
- }
- },
- loadedData: {
- EventType: "Event",
- defaultInit: {
- bubbles: !1,
- cancelable: !1
- }
- },
- loadedMetadata: {
- EventType: "Event",
- defaultInit: {
- bubbles: !1,
- cancelable: !1
- }
- },
- loadStart: {
- EventType: "ProgressEvent",
- defaultInit: {
- bubbles: !1,
- cancelable: !1
- }
- },
- pause: {
- EventType: "Event",
- defaultInit: {
- bubbles: !1,
- cancelable: !1
- }
- },
- play: {
- EventType: "Event",
- defaultInit: {
- bubbles: !1,
- cancelable: !1
- }
- },
- playing: {
- EventType: "Event",
- defaultInit: {
- bubbles: !1,
- cancelable: !1
- }
- },
- progress: {
- EventType: "ProgressEvent",
- defaultInit: {
- bubbles: !1,
- cancelable: !1
- }
- },
- rateChange: {
- EventType: "Event",
- defaultInit: {
- bubbles: !1,
- cancelable: !1
- }
- },
- seeked: {
- EventType: "Event",
- defaultInit: {
- bubbles: !1,
- cancelable: !1
- }
- },
- seeking: {
- EventType: "Event",
- defaultInit: {
- bubbles: !1,
- cancelable: !1
- }
- },
- stalled: {
- EventType: "Event",
- defaultInit: {
- bubbles: !1,
- cancelable: !1
- }
- },
- suspend: {
- EventType: "Event",
- defaultInit: {
- bubbles: !1,
- cancelable: !1
- }
- },
- timeUpdate: {
- EventType: "Event",
- defaultInit: {
- bubbles: !1,
- cancelable: !1
- }
- },
- volumeChange: {
- EventType: "Event",
- defaultInit: {
- bubbles: !1,
- cancelable: !1
- }
- },
- waiting: {
- EventType: "Event",
- defaultInit: {
- bubbles: !1,
- cancelable: !1
- }
- },
- // Events
- load: {
- // TODO: load events can be UIEvent or Event depending on what generated them
- // This is where this abstraction breaks down.
- // But the common targets are <img />, <script /> and window.
- // Neither of these targets receive a UIEvent
- EventType: "Event",
- defaultInit: {
- bubbles: !1,
- cancelable: !1
- }
- },
- error: {
- EventType: "Event",
- defaultInit: {
- bubbles: !1,
- cancelable: !1
- }
- },
- // Animation Events
- animationStart: {
- EventType: "AnimationEvent",
- defaultInit: {
- bubbles: !0,
- cancelable: !1
- }
- },
- animationEnd: {
- EventType: "AnimationEvent",
- defaultInit: {
- bubbles: !0,
- cancelable: !1
- }
- },
- animationIteration: {
- EventType: "AnimationEvent",
- defaultInit: {
- bubbles: !0,
- cancelable: !1
- }
- },
- // Transition Events
- transitionCancel: {
- EventType: "TransitionEvent",
- defaultInit: {
- bubbles: !0,
- cancelable: !1
- }
- },
- transitionEnd: {
- EventType: "TransitionEvent",
- defaultInit: {
- bubbles: !0,
- cancelable: !0
- }
- },
- transitionRun: {
- EventType: "TransitionEvent",
- defaultInit: {
- bubbles: !0,
- cancelable: !1
- }
- },
- transitionStart: {
- EventType: "TransitionEvent",
- defaultInit: {
- bubbles: !0,
- cancelable: !1
- }
- },
- // pointer events
- pointerOver: {
- EventType: "PointerEvent",
- defaultInit: {
- bubbles: !0,
- cancelable: !0,
- composed: !0
- }
- },
- pointerEnter: {
- EventType: "PointerEvent",
- defaultInit: {
- bubbles: !1,
- cancelable: !1
- }
- },
- pointerDown: {
- EventType: "PointerEvent",
- defaultInit: {
- bubbles: !0,
- cancelable: !0,
- composed: !0
- }
- },
- pointerMove: {
- EventType: "PointerEvent",
- defaultInit: {
- bubbles: !0,
- cancelable: !0,
- composed: !0
- }
- },
- pointerUp: {
- EventType: "PointerEvent",
- defaultInit: {
- bubbles: !0,
- cancelable: !0,
- composed: !0
- }
- },
- pointerCancel: {
- EventType: "PointerEvent",
- defaultInit: {
- bubbles: !0,
- cancelable: !1,
- composed: !0
- }
- },
- pointerOut: {
- EventType: "PointerEvent",
- defaultInit: {
- bubbles: !0,
- cancelable: !0,
- composed: !0
- }
- },
- pointerLeave: {
- EventType: "PointerEvent",
- defaultInit: {
- bubbles: !1,
- cancelable: !1
- }
- },
- gotPointerCapture: {
- EventType: "PointerEvent",
- defaultInit: {
- bubbles: !0,
- cancelable: !1,
- composed: !0
- }
- },
- lostPointerCapture: {
- EventType: "PointerEvent",
- defaultInit: {
- bubbles: !0,
- cancelable: !1,
- composed: !0
- }
- },
- // history events
- popState: {
- EventType: "PopStateEvent",
- defaultInit: {
- bubbles: !0,
- cancelable: !1
- }
- },
- // window events
- offline: {
- EventType: "Event",
- defaultInit: {
- bubbles: !1,
- cancelable: !1
- }
- },
- online: {
- EventType: "Event",
- defaultInit: {
- bubbles: !1,
- cancelable: !1
- }
- },
- pageHide: {
- EventType: "PageTransitionEvent",
- defaultInit: {
- bubbles: !0,
- cancelable: !0
- }
- },
- pageShow: {
- EventType: "PageTransitionEvent",
- defaultInit: {
- bubbles: !0,
- cancelable: !0
- }
- }
- }, eventAliasMap = {
- doubleClick: "dblClick"
- };
- function fireEvent(element, event) {
- return getConfig2().eventWrapper(() => {
- if (!event)
- throw new Error("Unable to fire an event - please provide an event object.");
- if (!element)
- throw new Error('Unable to fire a "' + event.type + '" event - please provide a DOM element.');
- return element.dispatchEvent(event);
- });
- }
- function createEvent(eventName, node2, init16, _temp) {
- let {
- EventType = "Event",
- defaultInit = {}
- } = _temp === void 0 ? {} : _temp;
- if (!node2)
- throw new Error('Unable to fire a "' + eventName + '" event - please provide a DOM element.');
- let eventInit = {
- ...defaultInit,
- ...init16
- }, {
- target: {
- value,
- files,
- ...targetProperties
- } = {}
- } = eventInit;
- value !== void 0 && setNativeValue(node2, value), files !== void 0 && Object.defineProperty(node2, "files", {
- configurable: !0,
- enumerable: !0,
- writable: !0,
- value: files
- }), Object.assign(node2, targetProperties);
- let window2 = getWindowFromNode(node2), EventConstructor = window2[EventType] || window2.Event, event;
- if (typeof EventConstructor == "function")
- event = new EventConstructor(eventName, eventInit);
- else {
- event = window2.document.createEvent(EventType);
- let {
- bubbles,
- cancelable,
- detail,
- ...otherInit
- } = eventInit;
- event.initEvent(eventName, bubbles, cancelable, detail), Object.keys(otherInit).forEach((eventKey) => {
- event[eventKey] = otherInit[eventKey];
- });
- }
- return ["dataTransfer", "clipboardData"].forEach((dataTransferKey) => {
- let dataTransferValue = eventInit[dataTransferKey];
- typeof dataTransferValue == "object" && (typeof window2.DataTransfer == "function" ? Object.defineProperty(event, dataTransferKey, {
- value: Object.getOwnPropertyNames(dataTransferValue).reduce((acc, propName) => (Object.defineProperty(acc, propName, {
- value: dataTransferValue[propName]
- }), acc), new window2.DataTransfer())
- }) : Object.defineProperty(event, dataTransferKey, {
- value: dataTransferValue
- }));
- }), event;
- }
- Object.keys(eventMap).forEach((key) => {
- let {
- EventType,
- defaultInit
- } = eventMap[key], eventName = key.toLowerCase();
- createEvent[key] = (node2, init16) => createEvent(eventName, node2, init16, {
- EventType,
- defaultInit
- }), fireEvent[key] = (node2, init16) => fireEvent(node2, createEvent[key](node2, init16));
- });
- function setNativeValue(element, value) {
- let {
- set: valueSetter
- } = Object.getOwnPropertyDescriptor(element, "value") || {}, prototype = Object.getPrototypeOf(element), {
- set: prototypeValueSetter
- } = Object.getOwnPropertyDescriptor(prototype, "value") || {};
- if (prototypeValueSetter && valueSetter !== prototypeValueSetter)
- prototypeValueSetter.call(element, value);
- else if (valueSetter)
- valueSetter.call(element, value);
- else
- throw new Error("The given element does not have a value setter");
- }
- Object.keys(eventAliasMap).forEach((aliasKey) => {
- let key = eventAliasMap[aliasKey];
- fireEvent[aliasKey] = function() {
- return fireEvent[key](...arguments);
- };
- });
- function unindent(string) {
- return string.replace(/[ \t]*[\n][ \t]*/g, `
- `);
- }
- function encode(value) {
- return import_lz_string.default.compressToEncodedURIComponent(unindent(value));
- }
- function getPlaygroundUrl(markup2) {
- return "https://testing-playground.com/#markup=" + encode(markup2);
- }
- var debug = (element, maxLength, options) => Array.isArray(element) ? element.forEach((el) => logDOM(el, maxLength, options)) : logDOM(element, maxLength, options), logTestingPlaygroundURL = function(element) {
- if (element === void 0 && (element = getDocument().body), !element || !("innerHTML" in element)) {
- console.log("The element you're providing isn't a valid DOM element.");
- return;
- }
- if (!element.innerHTML) {
- console.log("The provided element doesn't have any children.");
- return;
- }
- let playgroundUrl = getPlaygroundUrl(element.innerHTML);
- return console.log(`Open this URL in your browser
-
- ` + playgroundUrl), playgroundUrl;
- }, initialValue = {
- debug,
- logTestingPlaygroundURL
- }, screen = typeof document < "u" && document.body ? getQueriesForElement(document.body, queries, initialValue) : Object.keys(queries).reduce((helpers, key) => (helpers[key] = () => {
- throw new TypeError("For queries bound to document.body a global document has to be available... Learn more: https://testing-library.com/s/screen-global-error");
- }, helpers), initialValue);
-
- // ../../node_modules/@testing-library/user-event/dist/esm/utils/misc/isElementType.js
- function isElementType(element, tag, props) {
- return element.namespaceURI && element.namespaceURI !== "http://www.w3.org/1999/xhtml" || (tag = Array.isArray(tag) ? tag : [
- tag
- ], !tag.includes(element.tagName.toLowerCase())) ? !1 : props ? Object.entries(props).every(([k, v]) => element[k] === v) : !0;
- }
-
- // ../../node_modules/@testing-library/user-event/dist/esm/utils/misc/getWindow.js
- function getWindow(node2) {
- var _node_ownerDocument;
- if (isDocument(node2) && node2.defaultView)
- return node2.defaultView;
- if (!((_node_ownerDocument = node2.ownerDocument) === null || _node_ownerDocument === void 0) && _node_ownerDocument.defaultView)
- return node2.ownerDocument.defaultView;
- throw new Error(`Could not determine window of node. Node was ${describe(node2)}`);
- }
- function isDocument(node2) {
- return node2.nodeType === 9;
- }
- function describe(val) {
- return typeof val == "function" ? `function ${val.name}` : val === null ? "null" : String(val);
- }
-
- // ../../node_modules/@testing-library/user-event/dist/esm/utils/dataTransfer/Blob.js
- function readBlobText(blob, FileReader) {
- return new Promise((res, rej) => {
- let fr = new FileReader();
- fr.onerror = rej, fr.onabort = rej, fr.onload = () => {
- res(String(fr.result));
- }, fr.readAsText(blob);
- });
- }
-
- // ../../node_modules/@testing-library/user-event/dist/esm/utils/dataTransfer/FileList.js
- function createFileList(window2, files) {
- let list = {
- ...files,
- length: files.length,
- item: (index4) => list[index4],
- [Symbol.iterator]: function* () {
- for (let i = 0; i < list.length; i++)
- yield list[i];
- }
- };
- return list.constructor = window2.FileList, window2.FileList && Object.setPrototypeOf(list, window2.FileList.prototype), Object.freeze(list), list;
- }
-
- // ../../node_modules/@testing-library/user-event/dist/esm/utils/dataTransfer/DataTransfer.js
- function _define_property(obj, key, value) {
- return key in obj ? Object.defineProperty(obj, key, {
- value,
- enumerable: !0,
- configurable: !0,
- writable: !0
- }) : obj[key] = value, obj;
- }
- var DataTransferItemStub = class {
- getAsFile() {
- return this.file;
- }
- getAsString(callback) {
- typeof this.data == "string" && callback(this.data);
- }
- /* istanbul ignore next */
- webkitGetAsEntry() {
- throw new Error("not implemented");
- }
- constructor(dataOrFile, type5) {
- _define_property(this, "kind", void 0), _define_property(this, "type", void 0), _define_property(this, "file", null), _define_property(this, "data", void 0), typeof dataOrFile == "string" ? (this.kind = "string", this.type = String(type5), this.data = dataOrFile) : (this.kind = "file", this.type = dataOrFile.type, this.file = dataOrFile);
- }
- }, DataTransferItemListStub = class extends Array {
- add(...args) {
- let item = new DataTransferItemStub(args[0], args[1]);
- return this.push(item), item;
- }
- clear() {
- this.splice(0, this.length);
- }
- remove(index4) {
- this.splice(index4, 1);
- }
- };
- function getTypeMatcher(type5, exact) {
- let [group, sub] = type5.split("/"), isGroup = !sub || sub === "*";
- return (item) => exact ? item.type === (isGroup ? group : type5) : isGroup ? item.type.startsWith(`${group}/`) : item.type === group;
- }
- function createDataTransferStub(window2) {
- return new class {
- getData(format4) {
- var _this_items_find;
- let match3 = (_this_items_find = this.items.find(getTypeMatcher(format4, !0))) !== null && _this_items_find !== void 0 ? _this_items_find : this.items.find(getTypeMatcher(format4, !1)), text = "";
- return match3?.getAsString((t) => {
- text = t;
- }), text;
- }
- setData(format4, data) {
- let matchIndex = this.items.findIndex(getTypeMatcher(format4, !0)), item = new DataTransferItemStub(data, format4);
- matchIndex >= 0 ? this.items.splice(matchIndex, 1, item) : this.items.push(item);
- }
- clearData(format4) {
- if (format4) {
- let matchIndex = this.items.findIndex(getTypeMatcher(format4, !0));
- matchIndex >= 0 && this.items.remove(matchIndex);
- } else
- this.items.clear();
- }
- get types() {
- let t = [];
- return this.files.length && t.push("Files"), this.items.forEach((i) => t.push(i.type)), Object.freeze(t), t;
- }
- /* istanbul ignore next */
- setDragImage() {
- }
- constructor() {
- _define_property(this, "dropEffect", "none"), _define_property(this, "effectAllowed", "uninitialized"), _define_property(this, "items", new DataTransferItemListStub()), _define_property(this, "files", createFileList(window2, []));
- }
- }();
- }
- function createDataTransfer(window2, files = []) {
- let dt = typeof window2.DataTransfer > "u" ? createDataTransferStub(window2) : (
- /* istanbul ignore next */
- new window2.DataTransfer()
- );
- return Object.defineProperty(dt, "files", {
- get: () => createFileList(window2, files)
- }), dt;
- }
- async function getBlobFromDataTransferItem(window2, item) {
- return item.kind === "file" ? item.getAsFile() : new window2.Blob([
- await new Promise((r2) => item.getAsString(r2))
- ], {
- type: item.type
- });
- }
-
- // ../../node_modules/@testing-library/user-event/dist/esm/utils/dataTransfer/Clipboard.js
- function _define_property2(obj, key, value) {
- return key in obj ? Object.defineProperty(obj, key, {
- value,
- enumerable: !0,
- configurable: !0,
- writable: !0
- }) : obj[key] = value, obj;
- }
- function createClipboardItem(window2, ...blobs) {
- let dataMap = Object.fromEntries(blobs.map((b) => [
- typeof b == "string" ? "text/plain" : b.type,
- Promise.resolve(b)
- ]));
- return typeof window2.ClipboardItem < "u" ? new window2.ClipboardItem(dataMap) : new class {
- get types() {
- return Array.from(Object.keys(this.data));
- }
- async getType(type5) {
- let value = await this.data[type5];
- if (!value)
- throw new Error(`${type5} is not one of the available MIME types on this item.`);
- return value instanceof window2.Blob ? value : new window2.Blob([
- value
- ], {
- type: type5
- });
- }
- constructor(d) {
- _define_property2(this, "data", void 0), this.data = d;
- }
- }(dataMap);
- }
- var ClipboardStubControl = Symbol("Manage ClipboardSub");
- function createClipboardStub(window2, control) {
- return Object.assign(new class extends window2.EventTarget {
- async read() {
- return Array.from(this.items);
- }
- async readText() {
- let text = "";
- for (let item of this.items) {
- let type5 = item.types.includes("text/plain") ? "text/plain" : item.types.find((t) => t.startsWith("text/"));
- type5 && (text += await item.getType(type5).then((b) => readBlobText(b, window2.FileReader)));
- }
- return text;
- }
- async write(data) {
- this.items = data;
- }
- async writeText(text) {
- this.items = [
- createClipboardItem(window2, text)
- ];
- }
- constructor(...args) {
- super(...args), _define_property2(this, "items", []);
- }
- }(), {
- [ClipboardStubControl]: control
- });
- }
- function isClipboardStub(clipboard) {
- return !!clipboard?.[ClipboardStubControl];
- }
- function attachClipboardStubToView(window2) {
- if (isClipboardStub(window2.navigator.clipboard))
- return window2.navigator.clipboard[ClipboardStubControl];
- let realClipboard = Object.getOwnPropertyDescriptor(window2.navigator, "clipboard"), stub, control = {
- resetClipboardStub: () => {
- stub = createClipboardStub(window2, control);
- },
- detachClipboardStub: () => {
- realClipboard ? Object.defineProperty(window2.navigator, "clipboard", realClipboard) : Object.defineProperty(window2.navigator, "clipboard", {
- value: void 0,
- configurable: !0
- });
- }
- };
- return stub = createClipboardStub(window2, control), Object.defineProperty(window2.navigator, "clipboard", {
- get: () => stub,
- configurable: !0
- }), stub[ClipboardStubControl];
- }
- function resetClipboardStubOnView(window2) {
- isClipboardStub(window2.navigator.clipboard) && window2.navigator.clipboard[ClipboardStubControl].resetClipboardStub();
- }
- function detachClipboardStubFromView(window2) {
- isClipboardStub(window2.navigator.clipboard) && window2.navigator.clipboard[ClipboardStubControl].detachClipboardStub();
- }
- async function readDataTransferFromClipboard(document13) {
- let window2 = document13.defaultView, clipboard = window2?.navigator.clipboard, items = clipboard && await clipboard.read();
- if (!items)
- throw new Error("The Clipboard API is unavailable.");
- let dt = createDataTransfer(window2);
- for (let item of items)
- for (let type5 of item.types)
- dt.setData(type5, await item.getType(type5).then((b) => readBlobText(b, window2.FileReader)));
- return dt;
- }
- async function writeDataTransferToClipboard(document13, clipboardData) {
- let window2 = getWindow(document13), clipboard = window2.navigator.clipboard, items = [];
- for (let i = 0; i < clipboardData.items.length; i++) {
- let dtItem = clipboardData.items[i], blob = await getBlobFromDataTransferItem(window2, dtItem);
- items.push(createClipboardItem(window2, blob));
- }
- if (!(clipboard && await clipboard.write(items).then(
- () => !0,
- // Can happen with other implementations that e.g. require permissions
- /* istanbul ignore next */
- () => !1
- )))
- throw new Error("The Clipboard API is unavailable.");
- }
- var g = globalThis;
- typeof g.afterEach == "function" && g.afterEach(() => {
- typeof globalThis.window < "u" && resetClipboardStubOnView(globalThis.window);
- });
- typeof g.afterAll == "function" && g.afterAll(() => {
- typeof globalThis.window < "u" && detachClipboardStubFromView(globalThis.window);
- });
-
- // ../../node_modules/@testing-library/user-event/dist/esm/utils/focus/selector.js
- var FOCUSABLE_SELECTOR = [
- "input:not([type=hidden]):not([disabled])",
- "button:not([disabled])",
- "select:not([disabled])",
- "textarea:not([disabled])",
- '[contenteditable=""]',
- '[contenteditable="true"]',
- "a[href]",
- "[tabindex]:not([disabled])"
- ].join(", ");
-
- // ../../node_modules/@testing-library/user-event/dist/esm/utils/focus/isFocusable.js
- function isFocusable(element) {
- return element.matches(FOCUSABLE_SELECTOR);
- }
-
- // ../../node_modules/@testing-library/user-event/dist/esm/utils/misc/cloneEvent.js
- function cloneEvent(event) {
- return new event.constructor(event.type, event);
- }
-
- // ../../node_modules/@testing-library/user-event/dist/esm/utils/misc/isDisabled.js
- function isDisabled2(element) {
- for (let el = element; el; el = el.parentElement)
- if (isElementType(el, [
- "button",
- "input",
- "select",
- "textarea",
- "optgroup",
- "option"
- ])) {
- if (el.hasAttribute("disabled"))
- return !0;
- } else if (isElementType(el, "fieldset")) {
- var _el_querySelector;
- if (el.hasAttribute("disabled") && !(!((_el_querySelector = el.querySelector(":scope > legend")) === null || _el_querySelector === void 0) && _el_querySelector.contains(element)))
- return !0;
- } else if (el.tagName.includes("-") && el.constructor.formAssociated && el.hasAttribute("disabled"))
- return !0;
- return !1;
- }
-
- // ../../node_modules/@testing-library/user-event/dist/esm/utils/focus/getActiveElement.js
- function getActiveElement(document13) {
- let activeElement = document13.activeElement;
- return activeElement?.shadowRoot ? getActiveElement(activeElement.shadowRoot) : isDisabled2(activeElement) ? document13.ownerDocument ? (
- /* istanbul ignore next */
- document13.ownerDocument.body
- ) : document13.body : activeElement;
- }
- function getActiveElementOrBody(document13) {
- var _getActiveElement;
- return (_getActiveElement = getActiveElement(document13)) !== null && _getActiveElement !== void 0 ? _getActiveElement : (
- /* istanbul ignore next */
- document13.body
- );
- }
-
- // ../../node_modules/@testing-library/user-event/dist/esm/utils/misc/findClosest.js
- function findClosest(element, callback) {
- let el = element;
- do {
- if (callback(el))
- return el;
- el = el.parentElement;
- } while (el && el !== element.ownerDocument.body);
- }
-
- // ../../node_modules/@testing-library/user-event/dist/esm/utils/edit/isContentEditable.js
- function isContentEditable(element) {
- return element.hasAttribute("contenteditable") && (element.getAttribute("contenteditable") == "true" || element.getAttribute("contenteditable") == "");
- }
- function getContentEditable(node2) {
- let element = getElement(node2);
- return element && (element.closest('[contenteditable=""]') || element.closest('[contenteditable="true"]'));
- }
- function getElement(node2) {
- return node2.nodeType === 1 ? node2 : node2.parentElement;
- }
-
- // ../../node_modules/@testing-library/user-event/dist/esm/utils/click/isClickableInput.js
- var clickableInputTypes = (function(clickableInputTypes2) {
- return clickableInputTypes2.button = "button", clickableInputTypes2.color = "color", clickableInputTypes2.file = "file", clickableInputTypes2.image = "image", clickableInputTypes2.reset = "reset", clickableInputTypes2.submit = "submit", clickableInputTypes2.checkbox = "checkbox", clickableInputTypes2.radio = "radio", clickableInputTypes2;
- })(clickableInputTypes || {});
- function isClickableInput(element) {
- return isElementType(element, "button") || isElementType(element, "input") && element.type in clickableInputTypes;
- }
-
- // ../../node_modules/@testing-library/user-event/dist/esm/utils/edit/isEditable.js
- function isEditable(element) {
- return isEditableInputOrTextArea(element) && !element.readOnly || isContentEditable(element);
- }
- var editableInputTypes = (function(editableInputTypes2) {
- return editableInputTypes2.text = "text", editableInputTypes2.date = "date", editableInputTypes2["datetime-local"] = "datetime-local", editableInputTypes2.email = "email", editableInputTypes2.month = "month", editableInputTypes2.number = "number", editableInputTypes2.password = "password", editableInputTypes2.search = "search", editableInputTypes2.tel = "tel", editableInputTypes2.time = "time", editableInputTypes2.url = "url", editableInputTypes2.week = "week", editableInputTypes2;
- })(editableInputTypes || {});
- function isEditableInputOrTextArea(element) {
- return isElementType(element, "textarea") || isElementType(element, "input") && element.type in editableInputTypes;
- }
-
- // ../../node_modules/@testing-library/user-event/dist/esm/utils/focus/selection.js
- function hasOwnSelection(node2) {
- return isElement3(node2) && isEditableInputOrTextArea(node2);
- }
- function hasNoSelection(node2) {
- return isElement3(node2) && isClickableInput(node2);
- }
- function isElement3(node2) {
- return node2.nodeType === 1;
- }
-
- // ../../node_modules/@testing-library/user-event/dist/esm/event/selection/updateSelectionOnFocus.js
- function updateSelectionOnFocus(element) {
- let selection = element.ownerDocument.getSelection();
- if (selection?.focusNode && hasOwnSelection(element)) {
- let contenteditable = getContentEditable(selection.focusNode);
- if (contenteditable) {
- if (!selection.isCollapsed) {
- var _contenteditable_firstChild;
- let focusNode = ((_contenteditable_firstChild = contenteditable.firstChild) === null || _contenteditable_firstChild === void 0 ? void 0 : _contenteditable_firstChild.nodeType) === 3 ? contenteditable.firstChild : contenteditable;
- selection.setBaseAndExtent(focusNode, 0, focusNode, 0);
- }
- } else
- selection.setBaseAndExtent(element, 0, element, 0);
- }
- }
-
- // ../../node_modules/@testing-library/user-event/dist/esm/event/wrapEvent.js
- function wrapEvent(cb, _element) {
- return getConfig2().eventWrapper(cb);
- }
-
- // ../../node_modules/@testing-library/user-event/dist/esm/event/focus.js
- function focusElement(element) {
- let target = findClosest(element, isFocusable), activeElement = getActiveElement(element.ownerDocument);
- (target ?? element.ownerDocument.body) !== activeElement && (target ? wrapEvent(() => target.focus()) : wrapEvent(() => activeElement?.blur()), updateSelectionOnFocus(target ?? element.ownerDocument.body));
- }
- function blurElement(element) {
- !isFocusable(element) || !(getActiveElement(element.ownerDocument) === element) || wrapEvent(() => element.blur());
- }
-
- // ../../node_modules/@testing-library/user-event/dist/esm/event/behavior/registry.js
- var behavior = {};
-
- // ../../node_modules/@testing-library/user-event/dist/esm/event/behavior/click.js
- behavior.click = (event, target, instance) => {
- let context = target.closest("button,input,label,select,textarea"), control = context && isElementType(context, "label") && context.control;
- if (control && control !== target)
- return () => {
- isFocusable(control) && (focusElement(control), instance.dispatchEvent(control, cloneEvent(event)));
- };
- if (isElementType(target, "input", {
- type: "file"
- }))
- return () => {
- blurElement(target), target.dispatchEvent(new (getWindow(target)).Event("fileDialog")), focusElement(target);
- };
- };
-
- // ../../node_modules/@testing-library/user-event/dist/esm/document/UI.js
- var UIValue = Symbol("Displayed value in UI"), UISelection = Symbol("Displayed selection in UI"), InitialValue = Symbol("Initial value to compare on blur");
- function isUIValue(value) {
- return typeof value == "object" && UIValue in value;
- }
- function isUISelectionStart(start2) {
- return !!start2 && typeof start2 == "object" && UISelection in start2;
- }
- function setUIValue(element, value) {
- element[InitialValue] === void 0 && (element[InitialValue] = element.value), element[UIValue] = value, element.value = Object.assign(new String(value), {
- [UIValue]: !0
- });
- }
- function getUIValue(element) {
- return element[UIValue] === void 0 ? element.value : String(element[UIValue]);
- }
- function setUIValueClean(element) {
- element[UIValue] = void 0;
- }
- function clearInitialValue(element) {
- element[InitialValue] = void 0;
- }
- function getInitialValue(element) {
- return element[InitialValue];
- }
- function setUISelectionRaw(element, selection) {
- element[UISelection] = selection;
- }
- function setUISelection(element, { focusOffset: focusOffsetParam, anchorOffset: anchorOffsetParam = focusOffsetParam }, mode = "replace") {
- let valueLength = getUIValue(element).length, sanitizeOffset = (o) => Math.max(0, Math.min(valueLength, o)), anchorOffset = mode === "replace" || element[UISelection] === void 0 ? sanitizeOffset(anchorOffsetParam) : element[UISelection].anchorOffset, focusOffset = sanitizeOffset(focusOffsetParam), startOffset = Math.min(anchorOffset, focusOffset), endOffset = Math.max(anchorOffset, focusOffset);
- if (element[UISelection] = {
- anchorOffset,
- focusOffset
- }, element.selectionStart === startOffset && element.selectionEnd === endOffset)
- return;
- let startObj = Object.assign(new Number(startOffset), {
- [UISelection]: !0
- });
- try {
- element.setSelectionRange(startObj, endOffset);
- } catch {
- }
- }
- function getUISelection(element) {
- var _element_selectionStart, _element_selectionEnd, _element_UISelection;
- let sel = (_element_UISelection = element[UISelection]) !== null && _element_UISelection !== void 0 ? _element_UISelection : {
- anchorOffset: (_element_selectionStart = element.selectionStart) !== null && _element_selectionStart !== void 0 ? _element_selectionStart : 0,
- focusOffset: (_element_selectionEnd = element.selectionEnd) !== null && _element_selectionEnd !== void 0 ? _element_selectionEnd : 0
- };
- return {
- ...sel,
- startOffset: Math.min(sel.anchorOffset, sel.focusOffset),
- endOffset: Math.max(sel.anchorOffset, sel.focusOffset)
- };
- }
- function hasUISelection(element) {
- return !!element[UISelection];
- }
- function setUISelectionClean(element) {
- element[UISelection] = void 0;
- }
-
- // ../../node_modules/@testing-library/user-event/dist/esm/utils/edit/timeValue.js
- var parseInt2 = globalThis.parseInt;
- function buildTimeValue(value) {
- let onlyDigitsValue = value.replace(/\D/g, "");
- if (onlyDigitsValue.length < 2)
- return value;
- let firstDigit = parseInt2(onlyDigitsValue[0], 10), secondDigit = parseInt2(onlyDigitsValue[1], 10);
- if (firstDigit >= 3 || firstDigit === 2 && secondDigit >= 4) {
- let index4;
- return firstDigit >= 3 ? index4 = 1 : index4 = 2, build2(onlyDigitsValue, index4);
- }
- return value.length === 2 ? value : build2(onlyDigitsValue, 2);
- }
- function build2(onlyDigitsValue, index4) {
- let hours = onlyDigitsValue.slice(0, index4), validHours = Math.min(parseInt2(hours, 10), 23), minuteCharacters = onlyDigitsValue.slice(index4), parsedMinutes = parseInt2(minuteCharacters, 10), validMinutes = Math.min(parsedMinutes, 59);
- return `${validHours.toString().padStart(2, "0")}:${validMinutes.toString().padStart(2, "0")}`;
- }
- function isValidDateOrTimeValue(element, value) {
- let clone3 = element.cloneNode();
- return clone3.value = value, clone3.value === value;
- }
-
- // ../../node_modules/@testing-library/user-event/dist/esm/utils/edit/maxLength.js
- var maxLengthSupportedTypes = (function(maxLengthSupportedTypes2) {
- return maxLengthSupportedTypes2.email = "email", maxLengthSupportedTypes2.password = "password", maxLengthSupportedTypes2.search = "search", maxLengthSupportedTypes2.telephone = "telephone", maxLengthSupportedTypes2.text = "text", maxLengthSupportedTypes2.url = "url", maxLengthSupportedTypes2;
- })(maxLengthSupportedTypes || {});
- function getMaxLength(element) {
- var _element_getAttribute;
- let attr = (_element_getAttribute = element.getAttribute("maxlength")) !== null && _element_getAttribute !== void 0 ? _element_getAttribute : "";
- return /^\d+$/.test(attr) && Number(attr) >= 0 ? Number(attr) : void 0;
- }
- function supportsMaxLength(element) {
- return isElementType(element, "textarea") || isElementType(element, "input") && element.type in maxLengthSupportedTypes;
- }
-
- // ../../node_modules/@testing-library/user-event/dist/esm/utils/focus/cursor.js
- function getNextCursorPosition(node2, offset3, direction, inputType) {
- if (isTextNode(node2) && offset3 + direction >= 0 && offset3 + direction <= node2.nodeValue.length)
- return {
- node: node2,
- offset: offset3 + direction
- };
- let nextNode = getNextCharacterContentNode(node2, offset3, direction);
- if (nextNode) {
- if (isTextNode(nextNode))
- return {
- node: nextNode,
- offset: direction > 0 ? Math.min(1, nextNode.nodeValue.length) : Math.max(nextNode.nodeValue.length - 1, 0)
- };
- if (isElementType(nextNode, "br")) {
- let nextPlusOne = getNextCharacterContentNode(nextNode, void 0, direction);
- return nextPlusOne ? isTextNode(nextPlusOne) ? {
- node: nextPlusOne,
- offset: direction > 0 ? 0 : nextPlusOne.nodeValue.length
- } : direction < 0 && isElementType(nextPlusOne, "br") ? {
- node: nextNode.parentNode,
- offset: getOffset(nextNode)
- } : {
- node: nextPlusOne.parentNode,
- offset: getOffset(nextPlusOne) + (direction > 0 ? 0 : 1)
- } : direction < 0 && inputType === "deleteContentBackward" ? {
- node: nextNode.parentNode,
- offset: getOffset(nextNode)
- } : void 0;
- } else
- return {
- node: nextNode.parentNode,
- offset: getOffset(nextNode) + (direction > 0 ? 1 : 0)
- };
- }
- }
- function getNextCharacterContentNode(node2, offset3, direction) {
- let nextOffset = Number(offset3) + (direction < 0 ? -1 : 0);
- return offset3 !== void 0 && isElement4(node2) && nextOffset >= 0 && nextOffset < node2.children.length && (node2 = node2.children[nextOffset]), walkNodes(node2, direction === 1 ? "next" : "previous", isTreatedAsCharacterContent);
- }
- function isTreatedAsCharacterContent(node2) {
- if (isTextNode(node2))
- return !0;
- if (isElement4(node2)) {
- if (isElementType(node2, [
- "input",
- "textarea"
- ]))
- return node2.type !== "hidden";
- if (isElementType(node2, "br"))
- return !0;
- }
- return !1;
- }
- function getOffset(node2) {
- let i = 0;
- for (; node2.previousSibling; )
- i++, node2 = node2.previousSibling;
- return i;
- }
- function isElement4(node2) {
- return node2.nodeType === 1;
- }
- function isTextNode(node2) {
- return node2.nodeType === 3;
- }
- function walkNodes(node2, direction, callback) {
- for (; ; ) {
- var _node_ownerDocument;
- let sibling = node2[`${direction}Sibling`];
- if (sibling) {
- if (node2 = getDescendant(sibling, direction === "next" ? "first" : "last"), callback(node2))
- return node2;
- } else if (node2.parentNode && (!isElement4(node2.parentNode) || !isContentEditable(node2.parentNode) && node2.parentNode !== ((_node_ownerDocument = node2.ownerDocument) === null || _node_ownerDocument === void 0 ? void 0 : _node_ownerDocument.body)))
- node2 = node2.parentNode;
- else
- break;
- }
- }
- function getDescendant(node2, direction) {
- for (; node2.hasChildNodes(); )
- node2 = node2[`${direction}Child`];
- return node2;
- }
-
- // ../../node_modules/@testing-library/user-event/dist/esm/document/trackValue.js
- var TrackChanges = Symbol("Track programmatic changes for React workaround");
- function isReact17Element(element) {
- return Object.getOwnPropertyNames(element).some((k) => k.startsWith("__react")) && getWindow(element).REACT_VERSION === 17;
- }
- function startTrackValue(element) {
- isReact17Element(element) && (element[TrackChanges] = {
- previousValue: String(element.value),
- tracked: []
- });
- }
- function trackOrSetValue(element, v) {
- var _element_TrackChanges_tracked, _element_TrackChanges;
- (_element_TrackChanges = element[TrackChanges]) === null || _element_TrackChanges === void 0 || (_element_TrackChanges_tracked = _element_TrackChanges.tracked) === null || _element_TrackChanges_tracked === void 0 || _element_TrackChanges_tracked.push(v), element[TrackChanges] || (setUIValueClean(element), setUISelection(element, {
- focusOffset: v.length
- }));
- }
- function commitValueAfterInput(element, cursorOffset) {
- var _changes_tracked;
- let changes = element[TrackChanges];
- if (element[TrackChanges] = void 0, !(!(changes == null || (_changes_tracked = changes.tracked) === null || _changes_tracked === void 0) && _changes_tracked.length))
- return;
- let isJustReactStateUpdate = changes.tracked.length === 2 && changes.tracked[0] === changes.previousValue && changes.tracked[1] === element.value;
- isJustReactStateUpdate || setUIValueClean(element), hasUISelection(element) && setUISelection(element, {
- focusOffset: isJustReactStateUpdate ? cursorOffset : element.value.length
- });
- }
-
- // ../../node_modules/@testing-library/user-event/dist/esm/event/selection/getTargetTypeAndSelection.js
- function getTargetTypeAndSelection(node2) {
- let element = getElement2(node2);
- if (element && hasOwnSelection(element))
- return {
- type: "input",
- selection: getUISelection(element)
- };
- let selection = element?.ownerDocument.getSelection();
- return {
- type: getContentEditable(node2) && selection?.anchorNode && getContentEditable(selection.anchorNode) ? "contenteditable" : "default",
- selection
- };
- }
- function getElement2(node2) {
- return node2.nodeType === 1 ? node2 : node2.parentElement;
- }
-
- // ../../node_modules/@testing-library/user-event/dist/esm/event/selection/getInputRange.js
- function getInputRange(focusNode) {
- let typeAndSelection = getTargetTypeAndSelection(focusNode);
- if (typeAndSelection.type === "input")
- return typeAndSelection.selection;
- if (typeAndSelection.type === "contenteditable") {
- var _typeAndSelection_selection;
- return (_typeAndSelection_selection = typeAndSelection.selection) === null || _typeAndSelection_selection === void 0 ? void 0 : _typeAndSelection_selection.getRangeAt(0);
- }
- }
-
- // ../../node_modules/@testing-library/user-event/dist/esm/event/selection/setSelection.js
- function setSelection({ focusNode, focusOffset, anchorNode = focusNode, anchorOffset = focusOffset }) {
- var _anchorNode_ownerDocument_getSelection, _anchorNode_ownerDocument;
- if (getTargetTypeAndSelection(focusNode).type === "input")
- return setUISelection(focusNode, {
- anchorOffset,
- focusOffset
- });
- (_anchorNode_ownerDocument = anchorNode.ownerDocument) === null || _anchorNode_ownerDocument === void 0 || (_anchorNode_ownerDocument_getSelection = _anchorNode_ownerDocument.getSelection()) === null || _anchorNode_ownerDocument_getSelection === void 0 || _anchorNode_ownerDocument_getSelection.setBaseAndExtent(anchorNode, anchorOffset, focusNode, focusOffset);
- }
-
- // ../../node_modules/@testing-library/user-event/dist/esm/event/input.js
- function isDateOrTime(element) {
- return isElementType(element, "input") && [
- "date",
- "time"
- ].includes(element.type);
- }
- function input(instance, element, data, inputType = "insertText") {
- let inputRange = getInputRange(element);
- inputRange && (!isDateOrTime(element) && !instance.dispatchUIEvent(element, "beforeinput", {
- inputType,
- data
- }) || ("startContainer" in inputRange ? editContenteditable(instance, element, inputRange, data, inputType) : editInputElement(instance, element, inputRange, data, inputType)));
- }
- function editContenteditable(instance, element, inputRange, data, inputType) {
- let del = !1;
- if (!inputRange.collapsed)
- del = !0, inputRange.deleteContents();
- else if ([
- "deleteContentBackward",
- "deleteContentForward"
- ].includes(inputType)) {
- let nextPosition = getNextCursorPosition(inputRange.startContainer, inputRange.startOffset, inputType === "deleteContentBackward" ? -1 : 1, inputType);
- if (nextPosition) {
- del = !0;
- let delRange = inputRange.cloneRange();
- delRange.comparePoint(nextPosition.node, nextPosition.offset) < 0 ? delRange.setStart(nextPosition.node, nextPosition.offset) : delRange.setEnd(nextPosition.node, nextPosition.offset), delRange.deleteContents();
- }
- }
- if (data)
- if (inputRange.endContainer.nodeType === 3) {
- let offset3 = inputRange.endOffset;
- inputRange.endContainer.insertData(offset3, data), inputRange.setStart(inputRange.endContainer, offset3 + data.length), inputRange.setEnd(inputRange.endContainer, offset3 + data.length);
- } else {
- let text = element.ownerDocument.createTextNode(data);
- inputRange.insertNode(text), inputRange.setStart(text, data.length), inputRange.setEnd(text, data.length);
- }
- (del || data) && instance.dispatchUIEvent(element, "input", {
- inputType
- });
- }
- function editInputElement(instance, element, inputRange, data, inputType) {
- let dataToInsert = data;
- if (supportsMaxLength(element)) {
- let maxLength = getMaxLength(element);
- if (maxLength !== void 0 && data.length > 0) {
- let spaceUntilMaxLength = maxLength - element.value.length;
- if (spaceUntilMaxLength > 0)
- dataToInsert = data.substring(0, spaceUntilMaxLength);
- else
- return;
- }
- }
- let { newValue, newOffset, oldValue } = calculateNewValue(dataToInsert, element, inputRange, inputType);
- newValue === oldValue && newOffset === inputRange.startOffset && newOffset === inputRange.endOffset || isElementType(element, "input", {
- type: "number"
- }) && !isValidNumberInput(newValue) || (setUIValue(element, newValue), setSelection({
- focusNode: element,
- anchorOffset: newOffset,
- focusOffset: newOffset
- }), isDateOrTime(element) ? isValidDateOrTimeValue(element, newValue) && (commitInput(instance, element, newOffset, {}), instance.dispatchUIEvent(element, "change"), clearInitialValue(element)) : commitInput(instance, element, newOffset, {
- data,
- inputType
- }));
- }
- function calculateNewValue(inputData, node2, { startOffset, endOffset }, inputType) {
- let value = getUIValue(node2), prologEnd = Math.max(0, startOffset === endOffset && inputType === "deleteContentBackward" ? startOffset - 1 : startOffset), prolog = value.substring(0, prologEnd), epilogStart = Math.min(value.length, startOffset === endOffset && inputType === "deleteContentForward" ? startOffset + 1 : endOffset), epilog = value.substring(epilogStart, value.length), newValue = `${prolog}${inputData}${epilog}`, newOffset = prologEnd + inputData.length;
- if (isElementType(node2, "input", {
- type: "time"
- })) {
- let builtValue = buildTimeValue(newValue);
- builtValue !== "" && isValidDateOrTimeValue(node2, builtValue) && (newValue = builtValue, newOffset = builtValue.length);
- }
- return {
- oldValue: value,
- newValue,
- newOffset
- };
- }
- function commitInput(instance, element, newOffset, inputInit) {
- instance.dispatchUIEvent(element, "input", inputInit), commitValueAfterInput(element, newOffset);
- }
- function isValidNumberInput(value) {
- var _value_match, _value_match1;
- let valueParts = value.split("e", 2);
- return !(/[^\d.\-e]/.test(value) || Number((_value_match = value.match(/-/g)) === null || _value_match === void 0 ? void 0 : _value_match.length) > 2 || Number((_value_match1 = value.match(/\./g)) === null || _value_match1 === void 0 ? void 0 : _value_match1.length) > 1 || valueParts[1] && !/^-?\d*$/.test(valueParts[1]));
- }
-
- // ../../node_modules/@testing-library/user-event/dist/esm/event/behavior/cut.js
- behavior.cut = (event, target, instance) => () => {
- isEditable(target) && input(instance, target, "", "deleteByCut");
- };
-
- // ../../node_modules/@testing-library/user-event/dist/esm/document/getValueOrTextContent.js
- function getValueOrTextContent(element) {
- return element ? isContentEditable(element) ? element.textContent : getUIValue(element) : null;
- }
-
- // ../../node_modules/@testing-library/user-event/dist/esm/utils/misc/isVisible.js
- function isVisible(element) {
- let window2 = getWindow(element);
- for (let el = element; el?.ownerDocument; el = el.parentElement) {
- let { display: display2, visibility } = window2.getComputedStyle(el);
- if (display2 === "none" || visibility === "hidden")
- return !1;
- }
- return !0;
- }
-
- // ../../node_modules/@testing-library/user-event/dist/esm/utils/focus/getTabDestination.js
- function getTabDestination(activeElement, shift) {
- let document13 = activeElement.ownerDocument, focusableElements = document13.querySelectorAll(FOCUSABLE_SELECTOR), enabledElements = Array.from(focusableElements).filter((el) => el === activeElement || !(Number(el.getAttribute("tabindex")) < 0 || isDisabled2(el)));
- Number(activeElement.getAttribute("tabindex")) >= 0 && enabledElements.sort((a3, b) => {
- let i = Number(a3.getAttribute("tabindex")), j = Number(b.getAttribute("tabindex"));
- return i === j ? 0 : i === 0 ? 1 : j === 0 ? -1 : i - j;
- });
- let checkedRadio = {}, prunedElements = [
- document13.body
- ], activeRadioGroup = isElementType(activeElement, "input", {
- type: "radio"
- }) ? activeElement.name : void 0;
- enabledElements.forEach((currentElement) => {
- let el = currentElement;
- if (isElementType(el, "input", {
- type: "radio"
- }) && el.name) {
- if (el === activeElement) {
- prunedElements.push(el);
- return;
- } else if (el.name === activeRadioGroup)
- return;
- if (el.checked) {
- prunedElements = prunedElements.filter((e) => !isElementType(e, "input", {
- type: "radio",
- name: el.name
- })), prunedElements.push(el), checkedRadio[el.name] = el;
- return;
- }
- if (typeof checkedRadio[el.name] < "u")
- return;
- }
- prunedElements.push(el);
- });
- for (let index4 = prunedElements.findIndex((el) => el === activeElement); ; )
- if (index4 += shift ? -1 : 1, index4 === prunedElements.length ? index4 = 0 : index4 === -1 && (index4 = prunedElements.length - 1), prunedElements[index4] === activeElement || prunedElements[index4] === document13.body || isVisible(prunedElements[index4]))
- return prunedElements[index4];
- }
-
- // ../../node_modules/@testing-library/user-event/dist/esm/event/selection/moveSelection.js
- function moveSelection(node2, direction) {
- if (hasOwnSelection(node2)) {
- let selection = getUISelection(node2);
- setSelection({
- focusNode: node2,
- focusOffset: selection.startOffset === selection.endOffset ? selection.focusOffset + direction : direction < 0 ? selection.startOffset : selection.endOffset
- });
- } else {
- let selection = node2.ownerDocument.getSelection();
- if (!selection?.focusNode)
- return;
- if (selection.isCollapsed) {
- let nextPosition = getNextCursorPosition(selection.focusNode, selection.focusOffset, direction);
- nextPosition && setSelection({
- focusNode: nextPosition.node,
- focusOffset: nextPosition.offset
- });
- } else
- selection[direction < 0 ? "collapseToStart" : "collapseToEnd"]();
- }
- }
-
- // ../../node_modules/@testing-library/user-event/dist/esm/event/selection/selectAll.js
- function selectAll(target) {
- if (hasOwnSelection(target))
- return setSelection({
- focusNode: target,
- anchorOffset: 0,
- focusOffset: getUIValue(target).length
- });
- var _getContentEditable;
- let focusNode = (_getContentEditable = getContentEditable(target)) !== null && _getContentEditable !== void 0 ? _getContentEditable : target.ownerDocument.body;
- setSelection({
- focusNode,
- anchorOffset: 0,
- focusOffset: focusNode.childNodes.length
- });
- }
- function isAllSelected(target) {
- if (hasOwnSelection(target))
- return getUISelection(target).startOffset === 0 && getUISelection(target).endOffset === getUIValue(target).length;
- var _getContentEditable;
- let focusNode = (_getContentEditable = getContentEditable(target)) !== null && _getContentEditable !== void 0 ? _getContentEditable : target.ownerDocument.body, selection = target.ownerDocument.getSelection();
- return selection?.anchorNode === focusNode && selection.focusNode === focusNode && selection.anchorOffset === 0 && selection.focusOffset === focusNode.childNodes.length;
- }
-
- // ../../node_modules/@testing-library/user-event/dist/esm/event/selection/setSelectionRange.js
- function setSelectionRange(element, anchorOffset, focusOffset) {
- var _element_firstChild;
- if (hasOwnSelection(element))
- return setSelection({
- focusNode: element,
- anchorOffset,
- focusOffset
- });
- if (isContentEditable(element) && ((_element_firstChild = element.firstChild) === null || _element_firstChild === void 0 ? void 0 : _element_firstChild.nodeType) === 3)
- return setSelection({
- focusNode: element.firstChild,
- anchorOffset,
- focusOffset
- });
- throw new Error("Not implemented. The result of this interaction is unreliable.");
- }
-
- // ../../node_modules/@testing-library/user-event/dist/esm/event/radio.js
- function walkRadio(instance, el, direction) {
- let window2 = getWindow(el), group = Array.from(el.ownerDocument.querySelectorAll(el.name ? `input[type="radio"][name="${window2.CSS.escape(el.name)}"]` : 'input[type="radio"][name=""], input[type="radio"]:not([name])'));
- for (let i = group.findIndex((e) => e === el) + direction; ; i += direction) {
- if (group[i] || (i = direction > 0 ? 0 : group.length - 1), group[i] === el)
- return;
- if (!isDisabled2(group[i])) {
- focusElement(group[i]), instance.dispatchUIEvent(group[i], "click");
- return;
- }
- }
- }
-
- // ../../node_modules/@testing-library/user-event/dist/esm/event/behavior/keydown.js
- behavior.keydown = (event, target, instance) => {
- var _keydownBehavior_event_key, _keydownBehavior_event_key1;
- return (_keydownBehavior_event_key1 = (_keydownBehavior_event_key = keydownBehavior[event.key]) === null || _keydownBehavior_event_key === void 0 ? void 0 : _keydownBehavior_event_key.call(keydownBehavior, event, target, instance)) !== null && _keydownBehavior_event_key1 !== void 0 ? _keydownBehavior_event_key1 : combinationBehavior(event, target, instance);
- };
- var keydownBehavior = {
- ArrowDown: (event, target, instance) => {
- if (isElementType(target, "input", {
- type: "radio"
- }))
- return () => walkRadio(instance, target, 1);
- },
- ArrowLeft: (event, target, instance) => isElementType(target, "input", {
- type: "radio"
- }) ? () => walkRadio(instance, target, -1) : () => moveSelection(target, -1),
- ArrowRight: (event, target, instance) => isElementType(target, "input", {
- type: "radio"
- }) ? () => walkRadio(instance, target, 1) : () => moveSelection(target, 1),
- ArrowUp: (event, target, instance) => {
- if (isElementType(target, "input", {
- type: "radio"
- }))
- return () => walkRadio(instance, target, -1);
- },
- Backspace: (event, target, instance) => {
- if (isEditable(target))
- return () => {
- input(instance, target, "", "deleteContentBackward");
- };
- },
- Delete: (event, target, instance) => {
- if (isEditable(target))
- return () => {
- input(instance, target, "", "deleteContentForward");
- };
- },
- End: (event, target) => {
- if (isElementType(target, [
- "input",
- "textarea"
- ]) || isContentEditable(target))
- return () => {
- var _getValueOrTextContent, _getValueOrTextContent_length;
- let newPos = (_getValueOrTextContent_length = (_getValueOrTextContent = getValueOrTextContent(target)) === null || _getValueOrTextContent === void 0 ? void 0 : _getValueOrTextContent.length) !== null && _getValueOrTextContent_length !== void 0 ? _getValueOrTextContent_length : (
- /* istanbul ignore next */
- 0
- );
- setSelectionRange(target, newPos, newPos);
- };
- },
- Home: (event, target) => {
- if (isElementType(target, [
- "input",
- "textarea"
- ]) || isContentEditable(target))
- return () => {
- setSelectionRange(target, 0, 0);
- };
- },
- PageDown: (event, target) => {
- if (isElementType(target, [
- "input"
- ]))
- return () => {
- let newPos = getUIValue(target).length;
- setSelectionRange(target, newPos, newPos);
- };
- },
- PageUp: (event, target) => {
- if (isElementType(target, [
- "input"
- ]))
- return () => {
- setSelectionRange(target, 0, 0);
- };
- },
- Tab: (event, target, instance) => () => {
- let dest = getTabDestination(target, instance.system.keyboard.modifiers.Shift);
- focusElement(dest), hasOwnSelection(dest) && setUISelection(dest, {
- anchorOffset: 0,
- focusOffset: dest.value.length
- });
- }
- }, combinationBehavior = (event, target, instance) => {
- if (event.code === "KeyA" && instance.system.keyboard.modifiers.Control)
- return () => selectAll(target);
- };
-
- // ../../node_modules/@testing-library/user-event/dist/esm/event/behavior/keypress.js
- behavior.keypress = (event, target, instance) => {
- if (event.key === "Enter") {
- if (isElementType(target, "button") || isElementType(target, "input") && ClickInputOnEnter.includes(target.type) || isElementType(target, "a") && target.href)
- return () => {
- instance.dispatchUIEvent(target, "click");
- };
- if (isElementType(target, "input")) {
- let form = target.form, submit = form?.querySelector('input[type="submit"], button:not([type]), button[type="submit"]');
- return submit ? () => instance.dispatchUIEvent(submit, "click") : form && SubmitSingleInputOnEnter.includes(target.type) && form.querySelectorAll("input").length === 1 ? () => instance.dispatchUIEvent(form, "submit") : void 0;
- }
- }
- if (isEditable(target)) {
- let inputType = event.key === "Enter" ? isContentEditable(target) && !instance.system.keyboard.modifiers.Shift ? "insertParagraph" : "insertLineBreak" : "insertText", inputData = event.key === "Enter" ? `
- ` : event.key;
- return () => input(instance, target, inputData, inputType);
- }
- };
- var ClickInputOnEnter = [
- "button",
- "color",
- "file",
- "image",
- "reset",
- "submit"
- ], SubmitSingleInputOnEnter = [
- "email",
- "month",
- "password",
- "search",
- "tel",
- "text",
- "url",
- "week"
- ];
-
- // ../../node_modules/@testing-library/user-event/dist/esm/event/behavior/keyup.js
- behavior.keyup = (event, target, instance) => {
- var _keyupBehavior_event_key;
- return (_keyupBehavior_event_key = keyupBehavior[event.key]) === null || _keyupBehavior_event_key === void 0 ? void 0 : _keyupBehavior_event_key.call(keyupBehavior, event, target, instance);
- };
- var keyupBehavior = {
- " ": (event, target, instance) => {
- if (isClickableInput(target))
- return () => instance.dispatchUIEvent(target, "click");
- }
- };
-
- // ../../node_modules/@testing-library/user-event/dist/esm/event/behavior/paste.js
- behavior.paste = (event, target, instance) => {
- if (isEditable(target))
- return () => {
- var _event_clipboardData;
- let insertData = (_event_clipboardData = event.clipboardData) === null || _event_clipboardData === void 0 ? void 0 : _event_clipboardData.getData("text");
- insertData && input(instance, target, insertData, "insertFromPaste");
- };
- };
-
- // ../../node_modules/@testing-library/user-event/dist/esm/event/eventMap.js
- var eventMap2 = {
- auxclick: {
- EventType: "PointerEvent",
- defaultInit: {
- bubbles: !0,
- cancelable: !0,
- composed: !0
- }
- },
- beforeinput: {
- EventType: "InputEvent",
- defaultInit: {
- bubbles: !0,
- cancelable: !0,
- composed: !0
- }
- },
- blur: {
- EventType: "FocusEvent",
- defaultInit: {
- bubbles: !1,
- cancelable: !1,
- composed: !0
- }
- },
- click: {
- EventType: "PointerEvent",
- defaultInit: {
- bubbles: !0,
- cancelable: !0,
- composed: !0
- }
- },
- contextmenu: {
- EventType: "PointerEvent",
- defaultInit: {
- bubbles: !0,
- cancelable: !0,
- composed: !0
- }
- },
- copy: {
- EventType: "ClipboardEvent",
- defaultInit: {
- bubbles: !0,
- cancelable: !0,
- composed: !0
- }
- },
- change: {
- EventType: "Event",
- defaultInit: {
- bubbles: !0,
- cancelable: !1
- }
- },
- cut: {
- EventType: "ClipboardEvent",
- defaultInit: {
- bubbles: !0,
- cancelable: !0,
- composed: !0
- }
- },
- dblclick: {
- EventType: "MouseEvent",
- defaultInit: {
- bubbles: !0,
- cancelable: !0,
- composed: !0
- }
- },
- focus: {
- EventType: "FocusEvent",
- defaultInit: {
- bubbles: !1,
- cancelable: !1,
- composed: !0
- }
- },
- focusin: {
- EventType: "FocusEvent",
- defaultInit: {
- bubbles: !0,
- cancelable: !1,
- composed: !0
- }
- },
- focusout: {
- EventType: "FocusEvent",
- defaultInit: {
- bubbles: !0,
- cancelable: !1,
- composed: !0
- }
- },
- keydown: {
- EventType: "KeyboardEvent",
- defaultInit: {
- bubbles: !0,
- cancelable: !0,
- composed: !0
- }
- },
- keypress: {
- EventType: "KeyboardEvent",
- defaultInit: {
- bubbles: !0,
- cancelable: !0,
- composed: !0
- }
- },
- keyup: {
- EventType: "KeyboardEvent",
- defaultInit: {
- bubbles: !0,
- cancelable: !0,
- composed: !0
- }
- },
- paste: {
- EventType: "ClipboardEvent",
- defaultInit: {
- bubbles: !0,
- cancelable: !0,
- composed: !0
- }
- },
- input: {
- EventType: "InputEvent",
- defaultInit: {
- bubbles: !0,
- cancelable: !1,
- composed: !0
- }
- },
- mousedown: {
- EventType: "MouseEvent",
- defaultInit: {
- bubbles: !0,
- cancelable: !0,
- composed: !0
- }
- },
- mouseenter: {
- EventType: "MouseEvent",
- defaultInit: {
- bubbles: !1,
- cancelable: !1,
- composed: !0
- }
- },
- mouseleave: {
- EventType: "MouseEvent",
- defaultInit: {
- bubbles: !1,
- cancelable: !1,
- composed: !0
- }
- },
- mousemove: {
- EventType: "MouseEvent",
- defaultInit: {
- bubbles: !0,
- cancelable: !0,
- composed: !0
- }
- },
- mouseout: {
- EventType: "MouseEvent",
- defaultInit: {
- bubbles: !0,
- cancelable: !0,
- composed: !0
- }
- },
- mouseover: {
- EventType: "MouseEvent",
- defaultInit: {
- bubbles: !0,
- cancelable: !0,
- composed: !0
- }
- },
- mouseup: {
- EventType: "MouseEvent",
- defaultInit: {
- bubbles: !0,
- cancelable: !0,
- composed: !0
- }
- },
- pointerover: {
- EventType: "PointerEvent",
- defaultInit: {
- bubbles: !0,
- cancelable: !0,
- composed: !0
- }
- },
- pointerenter: {
- EventType: "PointerEvent",
- defaultInit: {
- bubbles: !1,
- cancelable: !1
- }
- },
- pointerdown: {
- EventType: "PointerEvent",
- defaultInit: {
- bubbles: !0,
- cancelable: !0,
- composed: !0
- }
- },
- pointermove: {
- EventType: "PointerEvent",
- defaultInit: {
- bubbles: !0,
- cancelable: !0,
- composed: !0
- }
- },
- pointerup: {
- EventType: "PointerEvent",
- defaultInit: {
- bubbles: !0,
- cancelable: !0,
- composed: !0
- }
- },
- pointercancel: {
- EventType: "PointerEvent",
- defaultInit: {
- bubbles: !0,
- cancelable: !1,
- composed: !0
- }
- },
- pointerout: {
- EventType: "PointerEvent",
- defaultInit: {
- bubbles: !0,
- cancelable: !0,
- composed: !0
- }
- },
- pointerleave: {
- EventType: "PointerEvent",
- defaultInit: {
- bubbles: !1,
- cancelable: !1
- }
- },
- submit: {
- EventType: "Event",
- defaultInit: {
- bubbles: !0,
- cancelable: !0
- }
- }
- };
- function getEventClass(type5) {
- return eventMap2[type5].EventType;
- }
- var mouseEvents = [
- "MouseEvent",
- "PointerEvent"
- ];
- function isMouseEvent(type5) {
- return mouseEvents.includes(getEventClass(type5));
- }
- function isKeyboardEvent(type5) {
- return getEventClass(type5) === "KeyboardEvent";
- }
-
- // ../../node_modules/@testing-library/user-event/dist/esm/event/createEvent.js
- var eventInitializer = {
- ClipboardEvent: [
- initClipboardEvent
- ],
- Event: [],
- FocusEvent: [
- initUIEvent,
- initFocusEvent
- ],
- InputEvent: [
- initUIEvent,
- initInputEvent
- ],
- MouseEvent: [
- initUIEvent,
- initUIEventModifiers,
- initMouseEvent
- ],
- PointerEvent: [
- initUIEvent,
- initUIEventModifiers,
- initMouseEvent,
- initPointerEvent
- ],
- KeyboardEvent: [
- initUIEvent,
- initUIEventModifiers,
- initKeyboardEvent
- ]
- };
- function createEvent2(type5, target, init16) {
- let window2 = getWindow(target), { EventType, defaultInit } = eventMap2[type5], event = new (getEventConstructors(window2))[EventType](type5, defaultInit);
- var eventInit = {};
- for (var key in init16)
- Object.prototype.hasOwnProperty.call(init16, key) && (eventInit[key] = init16[key]);
- return eventInit.view = window2, eventInitializer[EventType].forEach(function(f4) {
- f4(event, eventInit);
- }), event;
- }
- function getEventConstructors(window2) {
- var _window_Event;
- let Event2 = (_window_Event = window2.Event) !== null && _window_Event !== void 0 ? _window_Event : class {
- };
- var _window_AnimationEvent;
- let AnimationEvent = (_window_AnimationEvent = window2.AnimationEvent) !== null && _window_AnimationEvent !== void 0 ? _window_AnimationEvent : class extends Event2 {
- };
- var _window_ClipboardEvent;
- let ClipboardEvent = (_window_ClipboardEvent = window2.ClipboardEvent) !== null && _window_ClipboardEvent !== void 0 ? _window_ClipboardEvent : class extends Event2 {
- };
- var _window_PopStateEvent;
- let PopStateEvent = (_window_PopStateEvent = window2.PopStateEvent) !== null && _window_PopStateEvent !== void 0 ? _window_PopStateEvent : class extends Event2 {
- };
- var _window_ProgressEvent;
- let ProgressEvent = (_window_ProgressEvent = window2.ProgressEvent) !== null && _window_ProgressEvent !== void 0 ? _window_ProgressEvent : class extends Event2 {
- };
- var _window_TransitionEvent;
- let TransitionEvent = (_window_TransitionEvent = window2.TransitionEvent) !== null && _window_TransitionEvent !== void 0 ? _window_TransitionEvent : class extends Event2 {
- };
- var _window_UIEvent;
- let UIEvent = (_window_UIEvent = window2.UIEvent) !== null && _window_UIEvent !== void 0 ? _window_UIEvent : class extends Event2 {
- };
- var _window_CompositionEvent;
- let CompositionEvent = (_window_CompositionEvent = window2.CompositionEvent) !== null && _window_CompositionEvent !== void 0 ? _window_CompositionEvent : class extends UIEvent {
- };
- var _window_FocusEvent;
- let FocusEvent2 = (_window_FocusEvent = window2.FocusEvent) !== null && _window_FocusEvent !== void 0 ? _window_FocusEvent : class extends UIEvent {
- };
- var _window_InputEvent;
- let InputEvent = (_window_InputEvent = window2.InputEvent) !== null && _window_InputEvent !== void 0 ? _window_InputEvent : class extends UIEvent {
- };
- var _window_KeyboardEvent;
- let KeyboardEvent2 = (_window_KeyboardEvent = window2.KeyboardEvent) !== null && _window_KeyboardEvent !== void 0 ? _window_KeyboardEvent : class extends UIEvent {
- };
- var _window_MouseEvent;
- let MouseEvent2 = (_window_MouseEvent = window2.MouseEvent) !== null && _window_MouseEvent !== void 0 ? _window_MouseEvent : class extends UIEvent {
- };
- var _window_DragEvent;
- let DragEvent = (_window_DragEvent = window2.DragEvent) !== null && _window_DragEvent !== void 0 ? _window_DragEvent : class extends MouseEvent2 {
- };
- var _window_PointerEvent;
- let PointerEvent2 = (_window_PointerEvent = window2.PointerEvent) !== null && _window_PointerEvent !== void 0 ? _window_PointerEvent : class extends MouseEvent2 {
- };
- var _window_TouchEvent;
- let TouchEvent = (_window_TouchEvent = window2.TouchEvent) !== null && _window_TouchEvent !== void 0 ? _window_TouchEvent : class extends UIEvent {
- };
- return {
- Event: Event2,
- AnimationEvent,
- ClipboardEvent,
- PopStateEvent,
- ProgressEvent,
- TransitionEvent,
- UIEvent,
- CompositionEvent,
- FocusEvent: FocusEvent2,
- InputEvent,
- KeyboardEvent: KeyboardEvent2,
- MouseEvent: MouseEvent2,
- DragEvent,
- PointerEvent: PointerEvent2,
- TouchEvent
- };
- }
- function assignProps(obj, props) {
- for (let [key, value] of Object.entries(props))
- Object.defineProperty(obj, key, {
- get: () => value ?? null
- });
- }
- function sanitizeNumber(n) {
- return Number(n ?? 0);
- }
- function initClipboardEvent(event, { clipboardData }) {
- assignProps(event, {
- clipboardData
- });
- }
- function initFocusEvent(event, { relatedTarget }) {
- assignProps(event, {
- relatedTarget
- });
- }
- function initInputEvent(event, { data, inputType, isComposing }) {
- assignProps(event, {
- data,
- isComposing: !!isComposing,
- inputType: String(inputType)
- });
- }
- function initUIEvent(event, { view, detail }) {
- assignProps(event, {
- view,
- detail: sanitizeNumber(detail ?? 0)
- });
- }
- function initUIEventModifiers(event, { altKey, ctrlKey, metaKey, shiftKey, modifierAltGraph, modifierCapsLock, modifierFn, modifierFnLock, modifierNumLock, modifierScrollLock, modifierSymbol, modifierSymbolLock }) {
- assignProps(event, {
- altKey: !!altKey,
- ctrlKey: !!ctrlKey,
- metaKey: !!metaKey,
- shiftKey: !!shiftKey,
- getModifierState(k) {
- return !!{
- Alt: altKey,
- AltGraph: modifierAltGraph,
- CapsLock: modifierCapsLock,
- Control: ctrlKey,
- Fn: modifierFn,
- FnLock: modifierFnLock,
- Meta: metaKey,
- NumLock: modifierNumLock,
- ScrollLock: modifierScrollLock,
- Shift: shiftKey,
- Symbol: modifierSymbol,
- SymbolLock: modifierSymbolLock
- }[k];
- }
- });
- }
- function initKeyboardEvent(event, { key, code, location: location4, repeat, isComposing, charCode }) {
- assignProps(event, {
- key: String(key),
- code: String(code),
- location: sanitizeNumber(location4),
- repeat: !!repeat,
- isComposing: !!isComposing,
- charCode
- });
- }
- function initMouseEvent(event, { x, y, screenX, screenY, clientX = x, clientY = y, button, buttons, relatedTarget, offsetX, offsetY, pageX, pageY }) {
- assignProps(event, {
- screenX: sanitizeNumber(screenX),
- screenY: sanitizeNumber(screenY),
- clientX: sanitizeNumber(clientX),
- x: sanitizeNumber(clientX),
- clientY: sanitizeNumber(clientY),
- y: sanitizeNumber(clientY),
- button: sanitizeNumber(button),
- buttons: sanitizeNumber(buttons),
- relatedTarget,
- offsetX: sanitizeNumber(offsetX),
- offsetY: sanitizeNumber(offsetY),
- pageX: sanitizeNumber(pageX),
- pageY: sanitizeNumber(pageY)
- });
- }
- function initPointerEvent(event, { pointerId, width, height, pressure, tangentialPressure, tiltX, tiltY, twist, pointerType, isPrimary }) {
- assignProps(event, {
- pointerId: sanitizeNumber(pointerId),
- width: sanitizeNumber(width ?? 1),
- height: sanitizeNumber(height ?? 1),
- pressure: sanitizeNumber(pressure),
- tangentialPressure: sanitizeNumber(tangentialPressure),
- tiltX: sanitizeNumber(tiltX),
- tiltY: sanitizeNumber(tiltY),
- twist: sanitizeNumber(twist),
- pointerType: String(pointerType),
- isPrimary: !!isPrimary
- });
- }
-
- // ../../node_modules/@testing-library/user-event/dist/esm/event/dispatchEvent.js
- function dispatchUIEvent(target, type5, init16, preventDefault = !1) {
- (isMouseEvent(type5) || isKeyboardEvent(type5)) && (init16 = {
- ...init16,
- ...this.system.getUIEventModifiers()
- });
- let event = createEvent2(type5, target, init16);
- return dispatchEvent.call(this, target, event, preventDefault);
- }
- function dispatchEvent(target, event, preventDefault = !1) {
- var _behavior_type;
- let type5 = event.type, behaviorImplementation = preventDefault ? () => {
- } : (_behavior_type = behavior[type5]) === null || _behavior_type === void 0 ? void 0 : _behavior_type.call(behavior, event, target, this);
- if (behaviorImplementation) {
- event.preventDefault();
- let defaultPrevented = !1;
- return Object.defineProperty(event, "defaultPrevented", {
- get: () => defaultPrevented
- }), Object.defineProperty(event, "preventDefault", {
- value: () => {
- defaultPrevented = event.cancelable;
- }
- }), wrapEvent(() => target.dispatchEvent(event)), defaultPrevented || behaviorImplementation(), !defaultPrevented;
- }
- return wrapEvent(() => target.dispatchEvent(event));
- }
- function dispatchDOMEvent(target, type5, init16) {
- let event = createEvent2(type5, target, init16);
- wrapEvent(() => target.dispatchEvent(event));
- }
-
- // ../../node_modules/@testing-library/user-event/dist/esm/document/patchFocus.js
- var patched = Symbol("patched focus/blur methods");
- function patchFocus(HTMLElement2) {
- if (HTMLElement2.prototype[patched])
- return;
- let { focus, blur } = HTMLElement2.prototype;
- Object.defineProperties(HTMLElement2.prototype, {
- focus: {
- configurable: !0,
- get: () => patchedFocus
- },
- blur: {
- configurable: !0,
- get: () => patchedBlur
- },
- [patched]: {
- configurable: !0,
- get: () => ({
- focus,
- blur
- })
- }
- });
- let activeCall;
- function patchedFocus(options) {
- if (this.ownerDocument.visibilityState !== "hidden")
- return focus.call(this, options);
- let blurred = getActiveTarget(this.ownerDocument);
- if (blurred === this)
- return;
- let thisCall = Symbol("focus call");
- activeCall = thisCall, blurred && (blur.call(blurred), dispatchDOMEvent(blurred, "blur", {
- relatedTarget: this
- }), dispatchDOMEvent(blurred, "focusout", {
- relatedTarget: activeCall === thisCall ? this : null
- })), activeCall === thisCall && (focus.call(this, options), dispatchDOMEvent(this, "focus", {
- relatedTarget: blurred
- })), activeCall === thisCall && dispatchDOMEvent(this, "focusin", {
- relatedTarget: blurred
- });
- }
- function patchedBlur() {
- if (this.ownerDocument.visibilityState !== "hidden")
- return blur.call(this);
- let blurred = getActiveTarget(this.ownerDocument);
- if (blurred !== this)
- return;
- activeCall = Symbol("blur call"), blur.call(this), dispatchDOMEvent(blurred, "blur", {
- relatedTarget: null
- }), dispatchDOMEvent(blurred, "focusout", {
- relatedTarget: null
- });
- }
- }
- function getActiveTarget(document13) {
- let active = getActiveElement(document13);
- return active?.tagName === "BODY" ? null : active;
- }
-
- // ../../node_modules/@testing-library/user-event/dist/esm/document/interceptor.js
- var Interceptor = Symbol("Interceptor for programmatical calls");
- function prepareInterceptor(element, propName, interceptorImpl) {
- let prototypeDescriptor = Object.getOwnPropertyDescriptor(element.constructor.prototype, propName), objectDescriptor = Object.getOwnPropertyDescriptor(element, propName), target = prototypeDescriptor?.set ? "set" : "value";
- if (typeof prototypeDescriptor?.[target] != "function" || prototypeDescriptor[target][Interceptor])
- throw new Error(`Element ${element.tagName} does not implement "${String(propName)}".`);
- function intercept(...args) {
- let { applyNative = !1, realArgs, then } = interceptorImpl.call(this, ...args), realFunc = (!applyNative && objectDescriptor || prototypeDescriptor)[target];
- target === "set" ? realFunc.call(this, realArgs) : realFunc.call(this, ...realArgs), then?.();
- }
- intercept[Interceptor] = Interceptor, Object.defineProperty(element, propName, {
- ...objectDescriptor ?? prototypeDescriptor,
- [target]: intercept
- });
- }
- function prepareValueInterceptor(element) {
- prepareInterceptor(element, "value", function(v) {
- let isUI = isUIValue(v);
- return isUI && startTrackValue(this), {
- applyNative: !!isUI,
- realArgs: sanitizeValue(this, v),
- then: isUI ? void 0 : () => trackOrSetValue(this, String(v))
- };
- });
- }
- function sanitizeValue(element, v) {
- return isElementType(element, "input", {
- type: "number"
- }) && String(v) !== "" && !Number.isNaN(Number(v)) ? String(Number(v)) : String(v);
- }
- function prepareSelectionInterceptor(element) {
- prepareInterceptor(element, "setSelectionRange", function(start2, ...others) {
- let isUI = isUISelectionStart(start2);
- return {
- applyNative: !!isUI,
- realArgs: [
- Number(start2),
- ...others
- ],
- then: () => isUI ? void 0 : setUISelectionClean(element)
- };
- }), prepareInterceptor(element, "selectionStart", function(v) {
- return {
- realArgs: v,
- then: () => setUISelectionClean(element)
- };
- }), prepareInterceptor(element, "selectionEnd", function(v) {
- return {
- realArgs: v,
- then: () => setUISelectionClean(element)
- };
- }), prepareInterceptor(element, "select", function() {
- return {
- realArgs: [],
- then: () => setUISelectionRaw(element, {
- anchorOffset: 0,
- focusOffset: getUIValue(element).length
- })
- };
- });
- }
- function prepareRangeTextInterceptor(element) {
- prepareInterceptor(element, "setRangeText", function(...realArgs) {
- return {
- realArgs,
- then: () => {
- setUIValueClean(element), setUISelectionClean(element);
- }
- };
- });
- }
-
- // ../../node_modules/@testing-library/user-event/dist/esm/document/prepareDocument.js
- var isPrepared = Symbol("Node prepared with document state workarounds");
- function prepareDocument(document13) {
- document13[isPrepared] || (document13.addEventListener("focus", (e) => {
- let el = e.target;
- prepareElement(el);
- }, {
- capture: !0,
- passive: !0
- }), document13.activeElement && prepareElement(document13.activeElement), document13.addEventListener("blur", (e) => {
- let el = e.target, initialValue2 = getInitialValue(el);
- initialValue2 !== void 0 && (el.value !== initialValue2 && dispatchDOMEvent(el, "change"), clearInitialValue(el));
- }, {
- capture: !0,
- passive: !0
- }), document13[isPrepared] = isPrepared);
- }
- function prepareElement(el) {
- el[isPrepared] || (isElementType(el, [
- "input",
- "textarea"
- ]) && (prepareValueInterceptor(el), prepareSelectionInterceptor(el), prepareRangeTextInterceptor(el)), el[isPrepared] = isPrepared);
- }
-
- // ../../node_modules/@testing-library/user-event/dist/esm/utils/misc/getDocumentFromNode.js
- function getDocumentFromNode(el) {
- return isDocument2(el) ? el : el.ownerDocument;
- }
- function isDocument2(node2) {
- return node2.nodeType === 9;
- }
-
- // ../../node_modules/@testing-library/user-event/dist/esm/utils/misc/level.js
- var ApiLevel = (function(ApiLevel2) {
- return ApiLevel2[ApiLevel2.Trigger = 2] = "Trigger", ApiLevel2[ApiLevel2.Call = 1] = "Call", ApiLevel2;
- })({});
- function setLevelRef(instance, level) {
- instance.levelRefs[level] = {};
- }
- function getLevelRef(instance, level) {
- return instance.levelRefs[level];
- }
-
- // ../../node_modules/@testing-library/user-event/dist/esm/utils/misc/wait.js
- function wait(config4) {
- let delay = config4.delay;
- if (typeof delay == "number")
- return Promise.all([
- new Promise((resolve) => globalThis.setTimeout(() => resolve(), delay)),
- config4.advanceTimers(delay)
- ]);
- }
-
- // ../../node_modules/@testing-library/user-event/dist/esm/options.js
- var PointerEventsCheckLevel = (function(PointerEventsCheckLevel2) {
- return PointerEventsCheckLevel2[PointerEventsCheckLevel2.EachTrigger = 4] = "EachTrigger", PointerEventsCheckLevel2[PointerEventsCheckLevel2.EachApiCall = 2] = "EachApiCall", PointerEventsCheckLevel2[PointerEventsCheckLevel2.EachTarget = 1] = "EachTarget", PointerEventsCheckLevel2[PointerEventsCheckLevel2.Never = 0] = "Never", PointerEventsCheckLevel2;
- })({});
-
- // ../../node_modules/@testing-library/user-event/dist/esm/system/keyboard.js
- function _define_property3(obj, key, value) {
- return key in obj ? Object.defineProperty(obj, key, {
- value,
- enumerable: !0,
- configurable: !0,
- writable: !0
- }) : obj[key] = value, obj;
- }
- var DOM_KEY_LOCATION = (function(DOM_KEY_LOCATION2) {
- return DOM_KEY_LOCATION2[DOM_KEY_LOCATION2.STANDARD = 0] = "STANDARD", DOM_KEY_LOCATION2[DOM_KEY_LOCATION2.LEFT = 1] = "LEFT", DOM_KEY_LOCATION2[DOM_KEY_LOCATION2.RIGHT = 2] = "RIGHT", DOM_KEY_LOCATION2[DOM_KEY_LOCATION2.NUMPAD = 3] = "NUMPAD", DOM_KEY_LOCATION2;
- })({}), modifierKeys = [
- "Alt",
- "AltGraph",
- "Control",
- "Fn",
- "Meta",
- "Shift",
- "Symbol"
- ];
- function isModifierKey(key) {
- return modifierKeys.includes(key);
- }
- var modifierLocks = [
- "CapsLock",
- "FnLock",
- "NumLock",
- "ScrollLock",
- "SymbolLock"
- ];
- function isModifierLock(key) {
- return modifierLocks.includes(key);
- }
- var KeyboardHost = class {
- isKeyPressed(keyDef) {
- return this.pressed.has(String(keyDef.code));
- }
- getPressedKeys() {
- return this.pressed.values().map((p3) => p3.keyDef);
- }
- /** Press a key */
- async keydown(instance, keyDef) {
- let key = String(keyDef.key), code = String(keyDef.code), target = getActiveElementOrBody(instance.config.document);
- this.setKeydownTarget(target), this.pressed.add(code, keyDef), isModifierKey(key) && (this.modifiers[key] = !0);
- let unprevented = instance.dispatchUIEvent(target, "keydown", {
- key,
- code
- });
- isModifierLock(key) && !this.modifiers[key] && (this.modifiers[key] = !0, this.modifierLockStart[key] = !0), unprevented && this.pressed.setUnprevented(code), unprevented && this.hasKeyPress(key) && instance.dispatchUIEvent(getActiveElementOrBody(instance.config.document), "keypress", {
- key,
- code,
- charCode: keyDef.key === "Enter" ? 13 : String(keyDef.key).charCodeAt(0)
- });
- }
- /** Release a key */
- async keyup(instance, keyDef) {
- let key = String(keyDef.key), code = String(keyDef.code), unprevented = this.pressed.isUnprevented(code);
- this.pressed.delete(code), isModifierKey(key) && !this.pressed.values().find((p3) => p3.keyDef.key === key) && (this.modifiers[key] = !1), instance.dispatchUIEvent(getActiveElementOrBody(instance.config.document), "keyup", {
- key,
- code
- }, !unprevented), isModifierLock(key) && this.modifiers[key] && (this.modifierLockStart[key] ? this.modifierLockStart[key] = !1 : this.modifiers[key] = !1);
- }
- setKeydownTarget(target) {
- target !== this.lastKeydownTarget && (this.carryChar = ""), this.lastKeydownTarget = target;
- }
- hasKeyPress(key) {
- return (key.length === 1 || key === "Enter") && !this.modifiers.Control && !this.modifiers.Alt;
- }
- constructor(system) {
- _define_property3(this, "system", void 0), _define_property3(this, "modifiers", {
- Alt: !1,
- AltGraph: !1,
- CapsLock: !1,
- Control: !1,
- Fn: !1,
- FnLock: !1,
- Meta: !1,
- NumLock: !1,
- ScrollLock: !1,
- Shift: !1,
- Symbol: !1,
- SymbolLock: !1
- }), _define_property3(this, "pressed", new class {
- add(code, keyDef) {
- var _this_registry, _code, _;
- (_ = (_this_registry = this.registry)[_code = code]) !== null && _ !== void 0 || (_this_registry[_code] = {
- keyDef,
- unpreventedDefault: !1
- });
- }
- has(code) {
- return !!this.registry[code];
- }
- setUnprevented(code) {
- let o = this.registry[code];
- o && (o.unpreventedDefault = !0);
- }
- isUnprevented(code) {
- var _this_registry_code;
- return !!(!((_this_registry_code = this.registry[code]) === null || _this_registry_code === void 0) && _this_registry_code.unpreventedDefault);
- }
- delete(code) {
- delete this.registry[code];
- }
- values() {
- return Object.values(this.registry);
- }
- constructor() {
- _define_property3(this, "registry", {});
- }
- }()), _define_property3(this, "carryChar", ""), _define_property3(this, "lastKeydownTarget", void 0), _define_property3(this, "modifierLockStart", {}), this.system = system;
- }
- };
-
- // ../../node_modules/@testing-library/user-event/dist/esm/keyboard/keyMap.js
- var defaultKeyMap = [
- // alphanumeric block - writing system
- ..."0123456789".split("").map((c) => ({
- code: `Digit${c}`,
- key: c
- })),
- ...")!@#$%^&*(".split("").map((c, i) => ({
- code: `Digit${i}`,
- key: c,
- shiftKey: !0
- })),
- ..."abcdefghijklmnopqrstuvwxyz".split("").map((c) => ({
- code: `Key${c.toUpperCase()}`,
- key: c
- })),
- ..."ABCDEFGHIJKLMNOPQRSTUVWXYZ".split("").map((c) => ({
- code: `Key${c}`,
- key: c,
- shiftKey: !0
- })),
- {
- code: "BracketLeft",
- key: "["
- },
- {
- code: "BracketLeft",
- key: "{",
- shiftKey: !0
- },
- {
- code: "BracketRight",
- key: "]"
- },
- {
- code: "BracketRight",
- key: "}",
- shiftKey: !0
- },
- // alphanumeric block - functional
- {
- code: "Space",
- key: " "
- },
- {
- code: "AltLeft",
- key: "Alt",
- location: DOM_KEY_LOCATION.LEFT
- },
- {
- code: "AltRight",
- key: "Alt",
- location: DOM_KEY_LOCATION.RIGHT
- },
- {
- code: "ShiftLeft",
- key: "Shift",
- location: DOM_KEY_LOCATION.LEFT
- },
- {
- code: "ShiftRight",
- key: "Shift",
- location: DOM_KEY_LOCATION.RIGHT
- },
- {
- code: "ControlLeft",
- key: "Control",
- location: DOM_KEY_LOCATION.LEFT
- },
- {
- code: "ControlRight",
- key: "Control",
- location: DOM_KEY_LOCATION.RIGHT
- },
- {
- code: "MetaLeft",
- key: "Meta",
- location: DOM_KEY_LOCATION.LEFT
- },
- {
- code: "MetaRight",
- key: "Meta",
- location: DOM_KEY_LOCATION.RIGHT
- },
- {
- code: "OSLeft",
- key: "OS",
- location: DOM_KEY_LOCATION.LEFT
- },
- {
- code: "OSRight",
- key: "OS",
- location: DOM_KEY_LOCATION.RIGHT
- },
- {
- code: "ContextMenu",
- key: "ContextMenu"
- },
- {
- code: "Tab",
- key: "Tab"
- },
- {
- code: "CapsLock",
- key: "CapsLock"
- },
- {
- code: "Backspace",
- key: "Backspace"
- },
- {
- code: "Enter",
- key: "Enter"
- },
- // function
- {
- code: "Escape",
- key: "Escape"
- },
- // arrows
- {
- code: "ArrowUp",
- key: "ArrowUp"
- },
- {
- code: "ArrowDown",
- key: "ArrowDown"
- },
- {
- code: "ArrowLeft",
- key: "ArrowLeft"
- },
- {
- code: "ArrowRight",
- key: "ArrowRight"
- },
- // control pad
- {
- code: "Home",
- key: "Home"
- },
- {
- code: "End",
- key: "End"
- },
- {
- code: "Delete",
- key: "Delete"
- },
- {
- code: "PageUp",
- key: "PageUp"
- },
- {
- code: "PageDown",
- key: "PageDown"
- },
- // Special keys that are not part of a default US-layout but included for specific behavior
- {
- code: "Fn",
- key: "Fn"
- },
- {
- code: "Symbol",
- key: "Symbol"
- },
- {
- code: "AltRight",
- key: "AltGraph"
- }
- ];
-
- // ../../node_modules/@testing-library/user-event/dist/esm/pointer/keyMap.js
- var defaultKeyMap2 = [
- {
- name: "MouseLeft",
- pointerType: "mouse",
- button: "primary"
- },
- {
- name: "MouseRight",
- pointerType: "mouse",
- button: "secondary"
- },
- {
- name: "MouseMiddle",
- pointerType: "mouse",
- button: "auxiliary"
- },
- {
- name: "TouchA",
- pointerType: "touch"
- },
- {
- name: "TouchB",
- pointerType: "touch"
- },
- {
- name: "TouchC",
- pointerType: "touch"
- }
- ];
-
- // ../../node_modules/@testing-library/user-event/dist/esm/system/pointer/buttons.js
- function _define_property4(obj, key, value) {
- return key in obj ? Object.defineProperty(obj, key, {
- value,
- enumerable: !0,
- configurable: !0,
- writable: !0
- }) : obj[key] = value, obj;
- }
- var Buttons = class {
- getButtons() {
- let v = 0;
- for (let button of Object.keys(this.pressed))
- v |= 2 ** Number(button);
- return v;
- }
- down(keyDef) {
- let button = getMouseButtonId(keyDef.button);
- if (button in this.pressed) {
- this.pressed[button].push(keyDef);
- return;
- }
- return this.pressed[button] = [
- keyDef
- ], button;
- }
- up(keyDef) {
- let button = getMouseButtonId(keyDef.button);
- if (button in this.pressed && (this.pressed[button] = this.pressed[button].filter((k) => k.name !== keyDef.name), this.pressed[button].length === 0))
- return delete this.pressed[button], button;
- }
- constructor() {
- _define_property4(this, "pressed", {});
- }
- }, MouseButton = {
- primary: 0,
- secondary: 1,
- auxiliary: 2,
- back: 3,
- X1: 3,
- forward: 4,
- X2: 4
- };
- function getMouseButtonId(button = 0) {
- return button in MouseButton ? MouseButton[button] : Number(button);
- }
- var MouseButtonFlip = {
- 1: 2,
- 2: 1
- };
- function getMouseEventButton(button) {
- return button = getMouseButtonId(button), button in MouseButtonFlip ? MouseButtonFlip[button] : button;
- }
-
- // ../../node_modules/@testing-library/user-event/dist/esm/system/pointer/device.js
- function _define_property5(obj, key, value) {
- return key in obj ? Object.defineProperty(obj, key, {
- value,
- enumerable: !0,
- configurable: !0,
- writable: !0
- }) : obj[key] = value, obj;
- }
- var Device = class {
- get countPressed() {
- return this.pressedKeys.size;
- }
- isPressed(keyDef) {
- return this.pressedKeys.has(keyDef.name);
- }
- addPressed(keyDef) {
- return this.pressedKeys.add(keyDef.name);
- }
- removePressed(keyDef) {
- return this.pressedKeys.delete(keyDef.name);
- }
- constructor() {
- _define_property5(this, "pressedKeys", /* @__PURE__ */ new Set());
- }
- };
-
- // ../../node_modules/@testing-library/user-event/dist/esm/utils/misc/getTreeDiff.js
- function getTreeDiff(a3, b) {
- let treeA = [];
- for (let el = a3; el; el = el.parentElement)
- treeA.push(el);
- let treeB = [];
- for (let el = b; el; el = el.parentElement)
- treeB.push(el);
- let i = 0;
- for (; !(i >= treeA.length || i >= treeB.length || treeA[treeA.length - 1 - i] !== treeB[treeB.length - 1 - i]); i++)
- ;
- return [
- treeA.slice(0, treeA.length - i),
- treeB.slice(0, treeB.length - i),
- treeB.slice(treeB.length - i)
- ];
- }
-
- // ../../node_modules/@testing-library/user-event/dist/esm/event/selection/resolveCaretPosition.js
- function resolveCaretPosition({ target, node: node2, offset: offset3 }) {
- return hasOwnSelection(target) ? {
- node: target,
- offset: offset3 ?? getUIValue(target).length
- } : node2 ? {
- node: node2,
- offset: offset3 ?? (node2.nodeType === 3 ? node2.nodeValue.length : node2.childNodes.length)
- } : findNodeAtTextOffset(target, offset3);
- }
- function findNodeAtTextOffset(node2, offset3, isRoot = !0) {
- let i = offset3 === void 0 ? node2.childNodes.length - 1 : 0, step2 = offset3 === void 0 ? -1 : 1;
- for (; offset3 === void 0 ? i >= (isRoot ? Math.max(node2.childNodes.length - 1, 0) : 0) : i <= node2.childNodes.length; ) {
- if (offset3 && i === node2.childNodes.length)
- throw new Error("The given offset is out of bounds.");
- let c = node2.childNodes.item(i), text = String(c.textContent);
- if (text.length)
- if (offset3 !== void 0 && text.length < offset3)
- offset3 -= text.length;
- else {
- if (c.nodeType === 1)
- return findNodeAtTextOffset(c, offset3, !1);
- if (c.nodeType === 3)
- return {
- node: c,
- offset: offset3 ?? c.nodeValue.length
- };
- }
- i += step2;
- }
- return {
- node: node2,
- offset: node2.childNodes.length
- };
- }
-
- // ../../node_modules/@testing-library/user-event/dist/esm/event/selection/setSelectionPerMouse.js
- function setSelectionPerMouseDown({ document: document13, target, clickCount, node: node2, offset: offset3 }) {
- if (hasNoSelection(target))
- return;
- let targetHasOwnSelection = hasOwnSelection(target), text = String(targetHasOwnSelection ? getUIValue(target) : target.textContent), [start2, end2] = node2 ? (
- // which elements might be considered in the same line of text.
- // TODO: support expanding initial range on multiple clicks if node is given
- [
- offset3,
- offset3
- ]
- ) : getTextRange(text, offset3, clickCount);
- if (targetHasOwnSelection)
- return setUISelection(target, {
- anchorOffset: start2 ?? text.length,
- focusOffset: end2 ?? text.length
- }), {
- node: target,
- start: start2 ?? 0,
- end: end2 ?? text.length
- };
- {
- let { node: startNode, offset: startOffset } = resolveCaretPosition({
- target,
- node: node2,
- offset: start2
- }), { node: endNode, offset: endOffset } = resolveCaretPosition({
- target,
- node: node2,
- offset: end2
- }), range = target.ownerDocument.createRange();
- try {
- range.setStart(startNode, startOffset), range.setEnd(endNode, endOffset);
- } catch {
- throw new Error("The given offset is out of bounds.");
- }
- let selection = document13.getSelection();
- return selection?.removeAllRanges(), selection?.addRange(range.cloneRange()), range;
- }
- }
- function getTextRange(text, pos, clickCount) {
- if (clickCount % 3 === 1 || text.length === 0)
- return [
- pos,
- pos
- ];
- let textPos = pos ?? text.length;
- return clickCount % 3 === 2 ? [
- textPos - text.substr(0, pos).match(/(\w+|\s+|\W)?$/)[0].length,
- pos === void 0 ? pos : pos + text.substr(pos).match(/^(\w+|\s+|\W)?/)[0].length
- ] : [
- textPos - text.substr(0, pos).match(/[^\r\n]*$/)[0].length,
- pos === void 0 ? pos : pos + text.substr(pos).match(/^[^\r\n]*/)[0].length
- ];
- }
-
- // ../../node_modules/@testing-library/user-event/dist/esm/event/selection/modifySelectionPerMouse.js
- function modifySelectionPerMouseMove(selectionRange, { document: document13, target, node: node2, offset: offset3 }) {
- let selectionFocus = resolveCaretPosition({
- target,
- node: node2,
- offset: offset3
- });
- if ("node" in selectionRange) {
- if (selectionFocus.node === selectionRange.node) {
- let anchorOffset = selectionFocus.offset < selectionRange.start ? selectionRange.end : selectionRange.start, focusOffset = selectionFocus.offset > selectionRange.end || selectionFocus.offset < selectionRange.start ? selectionFocus.offset : selectionRange.end;
- setUISelection(selectionRange.node, {
- anchorOffset,
- focusOffset
- });
- }
- } else {
- let range = selectionRange.cloneRange(), cmp = range.comparePoint(selectionFocus.node, selectionFocus.offset);
- cmp < 0 ? range.setStart(selectionFocus.node, selectionFocus.offset) : cmp > 0 && range.setEnd(selectionFocus.node, selectionFocus.offset);
- let selection = document13.getSelection();
- selection?.removeAllRanges(), selection?.addRange(range.cloneRange());
- }
- }
-
- // ../../node_modules/@testing-library/user-event/dist/esm/system/pointer/shared.js
- function isDifferentPointerPosition(positionA, positionB) {
- var _positionA_coords, _positionB_coords, _positionA_coords1, _positionB_coords1, _positionA_coords2, _positionB_coords2, _positionA_coords3, _positionB_coords3, _positionA_coords4, _positionB_coords4, _positionA_coords5, _positionB_coords5, _positionA_coords6, _positionB_coords6, _positionA_coords7, _positionB_coords7, _positionA_coords8, _positionB_coords8, _positionA_coords9, _positionB_coords9, _positionA_caret, _positionB_caret, _positionA_caret1, _positionB_caret1;
- return positionA.target !== positionB.target || ((_positionA_coords = positionA.coords) === null || _positionA_coords === void 0 ? void 0 : _positionA_coords.x) !== ((_positionB_coords = positionB.coords) === null || _positionB_coords === void 0 ? void 0 : _positionB_coords.x) || ((_positionA_coords1 = positionA.coords) === null || _positionA_coords1 === void 0 ? void 0 : _positionA_coords1.y) !== ((_positionB_coords1 = positionB.coords) === null || _positionB_coords1 === void 0 ? void 0 : _positionB_coords1.y) || ((_positionA_coords2 = positionA.coords) === null || _positionA_coords2 === void 0 ? void 0 : _positionA_coords2.clientX) !== ((_positionB_coords2 = positionB.coords) === null || _positionB_coords2 === void 0 ? void 0 : _positionB_coords2.clientX) || ((_positionA_coords3 = positionA.coords) === null || _positionA_coords3 === void 0 ? void 0 : _positionA_coords3.clientY) !== ((_positionB_coords3 = positionB.coords) === null || _positionB_coords3 === void 0 ? void 0 : _positionB_coords3.clientY) || ((_positionA_coords4 = positionA.coords) === null || _positionA_coords4 === void 0 ? void 0 : _positionA_coords4.offsetX) !== ((_positionB_coords4 = positionB.coords) === null || _positionB_coords4 === void 0 ? void 0 : _positionB_coords4.offsetX) || ((_positionA_coords5 = positionA.coords) === null || _positionA_coords5 === void 0 ? void 0 : _positionA_coords5.offsetY) !== ((_positionB_coords5 = positionB.coords) === null || _positionB_coords5 === void 0 ? void 0 : _positionB_coords5.offsetY) || ((_positionA_coords6 = positionA.coords) === null || _positionA_coords6 === void 0 ? void 0 : _positionA_coords6.pageX) !== ((_positionB_coords6 = positionB.coords) === null || _positionB_coords6 === void 0 ? void 0 : _positionB_coords6.pageX) || ((_positionA_coords7 = positionA.coords) === null || _positionA_coords7 === void 0 ? void 0 : _positionA_coords7.pageY) !== ((_positionB_coords7 = positionB.coords) === null || _positionB_coords7 === void 0 ? void 0 : _positionB_coords7.pageY) || ((_positionA_coords8 = positionA.coords) === null || _positionA_coords8 === void 0 ? void 0 : _positionA_coords8.screenX) !== ((_positionB_coords8 = positionB.coords) === null || _positionB_coords8 === void 0 ? void 0 : _positionB_coords8.screenX) || ((_positionA_coords9 = positionA.coords) === null || _positionA_coords9 === void 0 ? void 0 : _positionA_coords9.screenY) !== ((_positionB_coords9 = positionB.coords) === null || _positionB_coords9 === void 0 ? void 0 : _positionB_coords9.screenY) || ((_positionA_caret = positionA.caret) === null || _positionA_caret === void 0 ? void 0 : _positionA_caret.node) !== ((_positionB_caret = positionB.caret) === null || _positionB_caret === void 0 ? void 0 : _positionB_caret.node) || ((_positionA_caret1 = positionA.caret) === null || _positionA_caret1 === void 0 ? void 0 : _positionA_caret1.offset) !== ((_positionB_caret1 = positionB.caret) === null || _positionB_caret1 === void 0 ? void 0 : _positionB_caret1.offset);
- }
-
- // ../../node_modules/@testing-library/user-event/dist/esm/system/pointer/mouse.js
- function _define_property6(obj, key, value) {
- return key in obj ? Object.defineProperty(obj, key, {
- value,
- enumerable: !0,
- configurable: !0,
- writable: !0
- }) : obj[key] = value, obj;
- }
- var Mouse = class {
- move(instance, position2, isPrevented) {
- let prevPosition = this.position, prevTarget = this.getTarget(instance);
- if (this.position = position2, !isDifferentPointerPosition(prevPosition, position2))
- return;
- let nextTarget = this.getTarget(instance), init16 = this.getEventInit("mousemove"), [leave, enter] = getTreeDiff(prevTarget, nextTarget);
- return {
- leave: () => {
- prevTarget !== nextTarget && (instance.dispatchUIEvent(prevTarget, "mouseout", init16), leave.forEach((el) => instance.dispatchUIEvent(el, "mouseleave", init16)));
- },
- enter: () => {
- prevTarget !== nextTarget && (instance.dispatchUIEvent(nextTarget, "mouseover", init16), enter.forEach((el) => instance.dispatchUIEvent(el, "mouseenter", init16)));
- },
- move: () => {
- isPrevented || (instance.dispatchUIEvent(nextTarget, "mousemove", init16), this.modifySelecting(instance));
- }
- };
- }
- down(instance, keyDef, isPrevented) {
- let button = this.buttons.down(keyDef);
- if (button === void 0)
- return;
- let target = this.getTarget(instance);
- this.buttonDownTarget[button] = target;
- let init16 = this.getEventInit("mousedown", keyDef.button), disabled = isDisabled2(target);
- !isPrevented && (disabled || instance.dispatchUIEvent(target, "mousedown", init16)) && (this.startSelecting(instance, init16.detail), focusElement(target)), !disabled && getMouseEventButton(keyDef.button) === 2 && instance.dispatchUIEvent(target, "contextmenu", this.getEventInit("contextmenu", keyDef.button));
- }
- up(instance, keyDef, isPrevented) {
- let button = this.buttons.up(keyDef);
- if (button === void 0)
- return;
- let target = this.getTarget(instance);
- if (!isDisabled2(target)) {
- if (!isPrevented) {
- let mouseUpInit = this.getEventInit("mouseup", keyDef.button);
- instance.dispatchUIEvent(target, "mouseup", mouseUpInit), this.endSelecting();
- }
- let clickTarget = getTreeDiff(this.buttonDownTarget[button], target)[2][0];
- if (clickTarget) {
- let init16 = this.getEventInit("click", keyDef.button);
- init16.detail && (instance.dispatchUIEvent(clickTarget, init16.button === 0 ? "click" : "auxclick", init16), init16.button === 0 && init16.detail === 2 && instance.dispatchUIEvent(clickTarget, "dblclick", {
- ...this.getEventInit("dblclick", keyDef.button),
- detail: init16.detail
- }));
- }
- }
- }
- resetClickCount() {
- this.clickCount.reset();
- }
- getEventInit(type5, button) {
- let init16 = {
- ...this.position.coords
- };
- return init16.button = getMouseEventButton(button), init16.buttons = this.buttons.getButtons(), type5 === "mousedown" ? init16.detail = this.clickCount.getOnDown(init16.button) : type5 === "mouseup" ? init16.detail = this.clickCount.getOnUp(init16.button) : (type5 === "click" || type5 === "auxclick") && (init16.detail = this.clickCount.incOnClick(init16.button)), init16;
- }
- getTarget(instance) {
- var _this_position_target;
- return (_this_position_target = this.position.target) !== null && _this_position_target !== void 0 ? _this_position_target : instance.config.document.body;
- }
- startSelecting(instance, clickCount) {
- var _this_position_caret, _this_position_caret1;
- this.selecting = setSelectionPerMouseDown({
- document: instance.config.document,
- target: this.getTarget(instance),
- node: (_this_position_caret = this.position.caret) === null || _this_position_caret === void 0 ? void 0 : _this_position_caret.node,
- offset: (_this_position_caret1 = this.position.caret) === null || _this_position_caret1 === void 0 ? void 0 : _this_position_caret1.offset,
- clickCount
- });
- }
- modifySelecting(instance) {
- var _this_position_caret, _this_position_caret1;
- this.selecting && modifySelectionPerMouseMove(this.selecting, {
- document: instance.config.document,
- target: this.getTarget(instance),
- node: (_this_position_caret = this.position.caret) === null || _this_position_caret === void 0 ? void 0 : _this_position_caret.node,
- offset: (_this_position_caret1 = this.position.caret) === null || _this_position_caret1 === void 0 ? void 0 : _this_position_caret1.offset
- });
- }
- endSelecting() {
- this.selecting = void 0;
- }
- constructor() {
- _define_property6(this, "position", {}), _define_property6(this, "buttons", new Buttons()), _define_property6(this, "selecting", void 0), _define_property6(this, "buttonDownTarget", {}), _define_property6(this, "clickCount", new class {
- incOnClick(button) {
- let current = this.down[button] === void 0 ? void 0 : Number(this.down[button]) + 1;
- return this.count = this.count[button] === void 0 ? {} : {
- [button]: Number(this.count[button]) + 1
- }, current;
- }
- getOnDown(button) {
- var _this_count_button;
- this.down = {
- [button]: (_this_count_button = this.count[button]) !== null && _this_count_button !== void 0 ? _this_count_button : 0
- };
- var _this_count_button1;
- return this.count = {
- [button]: (_this_count_button1 = this.count[button]) !== null && _this_count_button1 !== void 0 ? _this_count_button1 : 0
- }, Number(this.count[button]) + 1;
- }
- getOnUp(button) {
- return this.down[button] === void 0 ? void 0 : Number(this.down[button]) + 1;
- }
- reset() {
- this.count = {};
- }
- constructor() {
- _define_property6(this, "down", {}), _define_property6(this, "count", {});
- }
- }());
- }
- };
-
- // ../../node_modules/@testing-library/user-event/dist/esm/utils/pointer/cssPointerEvents.js
- function hasPointerEvents(instance, element) {
- var _checkPointerEvents;
- return ((_checkPointerEvents = checkPointerEvents(instance, element)) === null || _checkPointerEvents === void 0 ? void 0 : _checkPointerEvents.pointerEvents) !== "none";
- }
- function closestPointerEventsDeclaration(element) {
- let window2 = getWindow(element);
- for (let el = element, tree = []; el?.ownerDocument; el = el.parentElement) {
- tree.push(el);
- let pointerEvents = window2.getComputedStyle(el).pointerEvents;
- if (pointerEvents && ![
- "inherit",
- "unset"
- ].includes(pointerEvents))
- return {
- pointerEvents,
- tree
- };
- }
- }
- var PointerEventsCheck = Symbol("Last check for pointer-events");
- function checkPointerEvents(instance, element) {
- let lastCheck = element[PointerEventsCheck];
- if (!(instance.config.pointerEventsCheck !== PointerEventsCheckLevel.Never && (!lastCheck || hasBitFlag(instance.config.pointerEventsCheck, PointerEventsCheckLevel.EachApiCall) && lastCheck[ApiLevel.Call] !== getLevelRef(instance, ApiLevel.Call) || hasBitFlag(instance.config.pointerEventsCheck, PointerEventsCheckLevel.EachTrigger) && lastCheck[ApiLevel.Trigger] !== getLevelRef(instance, ApiLevel.Trigger))))
- return lastCheck?.result;
- let declaration2 = closestPointerEventsDeclaration(element);
- return element[PointerEventsCheck] = {
- [ApiLevel.Call]: getLevelRef(instance, ApiLevel.Call),
- [ApiLevel.Trigger]: getLevelRef(instance, ApiLevel.Trigger),
- result: declaration2
- }, declaration2;
- }
- function assertPointerEvents(instance, element) {
- let declaration2 = checkPointerEvents(instance, element);
- if (declaration2?.pointerEvents === "none")
- throw new Error([
- `Unable to perform pointer interaction as the element ${declaration2.tree.length > 1 ? "inherits" : "has"} \`pointer-events: none\`:`,
- "",
- printTree(declaration2.tree)
- ].join(`
- `));
- }
- function printTree(tree) {
- return tree.reverse().map((el, i) => [
- "".padEnd(i),
- el.tagName,
- el.id && `#${el.id}`,
- el.hasAttribute("data-testid") && `(testId=${el.getAttribute("data-testid")})`,
- getLabelDescr(el),
- tree.length > 1 && i === 0 && " <-- This element declared `pointer-events: none`",
- tree.length > 1 && i === tree.length - 1 && " <-- Asserted pointer events here"
- ].filter(Boolean).join("")).join(`
- `);
- }
- function getLabelDescr(element) {
- var _element_labels;
- let label;
- if (element.hasAttribute("aria-label"))
- label = element.getAttribute("aria-label");
- else if (element.hasAttribute("aria-labelledby")) {
- var _element_ownerDocument_getElementById_textContent, _element_ownerDocument_getElementById;
- label = (_element_ownerDocument_getElementById = element.ownerDocument.getElementById(element.getAttribute("aria-labelledby"))) === null || _element_ownerDocument_getElementById === void 0 || (_element_ownerDocument_getElementById_textContent = _element_ownerDocument_getElementById.textContent) === null || _element_ownerDocument_getElementById_textContent === void 0 ? void 0 : _element_ownerDocument_getElementById_textContent.trim();
- } else if (isElementType(element, [
- "button",
- "input",
- "meter",
- "output",
- "progress",
- "select",
- "textarea"
- ]) && (!((_element_labels = element.labels) === null || _element_labels === void 0) && _element_labels.length))
- label = Array.from(element.labels).map((el) => {
- var _el_textContent;
- return (_el_textContent = el.textContent) === null || _el_textContent === void 0 ? void 0 : _el_textContent.trim();
- }).join("|");
- else if (isElementType(element, "button")) {
- var _element_textContent;
- label = (_element_textContent = element.textContent) === null || _element_textContent === void 0 ? void 0 : _element_textContent.trim();
- }
- return label = label?.replace(/\n/g, " "), Number(label?.length) > 30 && (label = `${label?.substring(0, 29)}\u2026`), label ? `(label=${label})` : "";
- }
- function hasBitFlag(conf, flag3) {
- return (conf & flag3) > 0;
- }
-
- // ../../node_modules/@testing-library/user-event/dist/esm/system/pointer/pointer.js
- function _define_property7(obj, key, value) {
- return key in obj ? Object.defineProperty(obj, key, {
- value,
- enumerable: !0,
- configurable: !0,
- writable: !0
- }) : obj[key] = value, obj;
- }
- var Pointer = class {
- init(instance) {
- let target = this.getTarget(instance), [, enter] = getTreeDiff(null, target), init16 = this.getEventInit();
- return assertPointerEvents(instance, target), instance.dispatchUIEvent(target, "pointerover", init16), enter.forEach((el) => instance.dispatchUIEvent(el, "pointerenter", init16)), this;
- }
- move(instance, position2) {
- let prevPosition = this.position, prevTarget = this.getTarget(instance);
- if (this.position = position2, !isDifferentPointerPosition(prevPosition, position2))
- return;
- let nextTarget = this.getTarget(instance), init16 = this.getEventInit(-1), [leave, enter] = getTreeDiff(prevTarget, nextTarget);
- return {
- leave: () => {
- hasPointerEvents(instance, prevTarget) && prevTarget !== nextTarget && (instance.dispatchUIEvent(prevTarget, "pointerout", init16), leave.forEach((el) => instance.dispatchUIEvent(el, "pointerleave", init16)));
- },
- enter: () => {
- assertPointerEvents(instance, nextTarget), prevTarget !== nextTarget && (instance.dispatchUIEvent(nextTarget, "pointerover", init16), enter.forEach((el) => instance.dispatchUIEvent(el, "pointerenter", init16)));
- },
- move: () => {
- instance.dispatchUIEvent(nextTarget, "pointermove", init16);
- }
- };
- }
- down(instance, button = 0) {
- if (this.isDown)
- return;
- let target = this.getTarget(instance);
- assertPointerEvents(instance, target), this.isDown = !0, this.isPrevented = !instance.dispatchUIEvent(target, "pointerdown", this.getEventInit(button));
- }
- up(instance, button = 0) {
- if (!this.isDown)
- return;
- let target = this.getTarget(instance);
- assertPointerEvents(instance, target), this.isPrevented = !1, this.isDown = !1, instance.dispatchUIEvent(target, "pointerup", this.getEventInit(button));
- }
- release(instance) {
- let target = this.getTarget(instance), [leave] = getTreeDiff(target, null), init16 = this.getEventInit();
- hasPointerEvents(instance, target) && (instance.dispatchUIEvent(target, "pointerout", init16), leave.forEach((el) => instance.dispatchUIEvent(el, "pointerleave", init16))), this.isCancelled = !0;
- }
- getTarget(instance) {
- var _this_position_target;
- return (_this_position_target = this.position.target) !== null && _this_position_target !== void 0 ? _this_position_target : instance.config.document.body;
- }
- getEventInit(button) {
- return {
- ...this.position.coords,
- pointerId: this.pointerId,
- pointerType: this.pointerType,
- isPrimary: this.isPrimary,
- button: getMouseEventButton(button),
- buttons: this.buttons.getButtons()
- };
- }
- constructor({ pointerId, pointerType, isPrimary }, buttons) {
- _define_property7(this, "pointerId", void 0), _define_property7(this, "pointerType", void 0), _define_property7(this, "isPrimary", void 0), _define_property7(this, "buttons", void 0), _define_property7(this, "isMultitouch", !1), _define_property7(this, "isCancelled", !1), _define_property7(this, "isDown", !1), _define_property7(this, "isPrevented", !1), _define_property7(this, "position", {}), this.pointerId = pointerId, this.pointerType = pointerType, this.isPrimary = isPrimary, this.isMultitouch = !isPrimary, this.buttons = buttons;
- }
- };
-
- // ../../node_modules/@testing-library/user-event/dist/esm/system/pointer/index.js
- function _define_property8(obj, key, value) {
- return key in obj ? Object.defineProperty(obj, key, {
- value,
- enumerable: !0,
- configurable: !0,
- writable: !0
- }) : obj[key] = value, obj;
- }
- var PointerHost = class {
- isKeyPressed(keyDef) {
- return this.devices.get(keyDef.pointerType).isPressed(keyDef);
- }
- async press(instance, keyDef, position2) {
- this.devices.get(keyDef.pointerType).addPressed(keyDef), this.buttons.down(keyDef);
- let pointerName = this.getPointerName(keyDef), pointer4 = keyDef.pointerType === "touch" ? this.pointers.new(pointerName, keyDef.pointerType, this.buttons) : this.pointers.get(pointerName);
- pointer4.position = position2, pointer4.pointerType !== "touch" && (this.mouse.position = position2), pointer4.pointerType === "touch" && pointer4.init(instance), pointer4.down(instance, keyDef.button), pointer4.pointerType !== "touch" && this.mouse.down(instance, keyDef, pointer4.isPrevented);
- }
- async move(instance, pointerName, position2) {
- let pointer4 = this.pointers.get(pointerName), pointermove = pointer4.move(instance, position2), mousemove = pointer4.pointerType === "touch" ? void 0 : this.mouse.move(instance, position2, pointer4.isPrevented);
- pointermove?.leave(), mousemove?.leave(), pointermove?.enter(), mousemove?.enter(), pointermove?.move(), mousemove?.move();
- }
- async release(instance, keyDef, position2) {
- let device = this.devices.get(keyDef.pointerType);
- device.removePressed(keyDef), this.buttons.up(keyDef);
- let pointer4 = this.pointers.get(this.getPointerName(keyDef)), isPrevented = pointer4.isPrevented;
- if (pointer4.position = position2, pointer4.pointerType !== "touch" && (this.mouse.position = position2), device.countPressed === 0 && pointer4.up(instance, keyDef.button), pointer4.pointerType === "touch" && pointer4.release(instance), pointer4.pointerType === "touch" && !pointer4.isMultitouch) {
- let mousemove = this.mouse.move(instance, position2, isPrevented);
- mousemove?.leave(), mousemove?.enter(), mousemove?.move(), this.mouse.down(instance, keyDef, isPrevented);
- }
- if (!pointer4.isMultitouch) {
- let mousemove = this.mouse.move(instance, position2, isPrevented);
- mousemove?.leave(), mousemove?.enter(), mousemove?.move(), this.mouse.up(instance, keyDef, isPrevented);
- }
- }
- getPointerName(keyDef) {
- return keyDef.pointerType === "touch" ? keyDef.name : keyDef.pointerType;
- }
- getPreviousPosition(pointerName) {
- return this.pointers.has(pointerName) ? this.pointers.get(pointerName).position : void 0;
- }
- resetClickCount() {
- this.mouse.resetClickCount();
- }
- getMouseTarget(instance) {
- var _this_mouse_position_target;
- return (_this_mouse_position_target = this.mouse.position.target) !== null && _this_mouse_position_target !== void 0 ? _this_mouse_position_target : instance.config.document.body;
- }
- setMousePosition(position2) {
- this.mouse.position = position2, this.pointers.get("mouse").position = position2;
- }
- constructor(system) {
- _define_property8(this, "system", void 0), _define_property8(this, "mouse", void 0), _define_property8(this, "buttons", void 0), _define_property8(this, "devices", new class {
- get(k) {
- var _this_registry, _k, _;
- return (_ = (_this_registry = this.registry)[_k = k]) !== null && _ !== void 0 ? _ : _this_registry[_k] = new Device();
- }
- constructor() {
- _define_property8(this, "registry", {});
- }
- }()), _define_property8(this, "pointers", new class {
- new(pointerName, pointerType, buttons) {
- let isPrimary = pointerType !== "touch" || !Object.values(this.registry).some((p3) => p3.pointerType === "touch" && !p3.isCancelled);
- return isPrimary || Object.values(this.registry).forEach((p3) => {
- p3.pointerType === pointerType && !p3.isCancelled && (p3.isMultitouch = !0);
- }), this.registry[pointerName] = new Pointer({
- pointerId: this.nextId++,
- pointerType,
- isPrimary
- }, buttons), this.registry[pointerName];
- }
- get(pointerName) {
- if (!this.has(pointerName))
- throw new Error(`Trying to access pointer "${pointerName}" which does not exist.`);
- return this.registry[pointerName];
- }
- has(pointerName) {
- return pointerName in this.registry;
- }
- constructor() {
- _define_property8(this, "registry", {}), _define_property8(this, "nextId", 1);
- }
- }()), this.system = system, this.buttons = new Buttons(), this.mouse = new Mouse(), this.pointers.new("mouse", "mouse", this.buttons);
- }
- };
-
- // ../../node_modules/@testing-library/user-event/dist/esm/system/index.js
- function _define_property9(obj, key, value) {
- return key in obj ? Object.defineProperty(obj, key, {
- value,
- enumerable: !0,
- configurable: !0,
- writable: !0
- }) : obj[key] = value, obj;
- }
- var System = class {
- getUIEventModifiers() {
- return {
- altKey: this.keyboard.modifiers.Alt,
- ctrlKey: this.keyboard.modifiers.Control,
- metaKey: this.keyboard.modifiers.Meta,
- shiftKey: this.keyboard.modifiers.Shift,
- modifierAltGraph: this.keyboard.modifiers.AltGraph,
- modifierCapsLock: this.keyboard.modifiers.CapsLock,
- modifierFn: this.keyboard.modifiers.Fn,
- modifierFnLock: this.keyboard.modifiers.FnLock,
- modifierNumLock: this.keyboard.modifiers.NumLock,
- modifierScrollLock: this.keyboard.modifiers.ScrollLock,
- modifierSymbol: this.keyboard.modifiers.Symbol,
- modifierSymbolLock: this.keyboard.modifiers.SymbolLock
- };
- }
- constructor() {
- _define_property9(this, "keyboard", new KeyboardHost(this)), _define_property9(this, "pointer", new PointerHost(this));
- }
- };
-
- // ../../node_modules/@testing-library/user-event/dist/esm/convenience/click.js
- async function click(element) {
- let pointerIn = [];
- return this.config.skipHover || pointerIn.push({
- target: element
- }), pointerIn.push({
- keys: "[MouseLeft]",
- target: element
- }), this.pointer(pointerIn);
- }
- async function dblClick(element) {
- return this.pointer([
- {
- target: element
- },
- "[MouseLeft][MouseLeft]"
- ]);
- }
- async function tripleClick(element) {
- return this.pointer([
- {
- target: element
- },
- "[MouseLeft][MouseLeft][MouseLeft]"
- ]);
- }
-
- // ../../node_modules/@testing-library/user-event/dist/esm/convenience/hover.js
- async function hover(element) {
- return this.pointer({
- target: element
- });
- }
- async function unhover(element) {
- return assertPointerEvents(this, this.system.pointer.getMouseTarget(this)), this.pointer({
- target: element.ownerDocument.body
- });
- }
-
- // ../../node_modules/@testing-library/user-event/dist/esm/convenience/tab.js
- async function tab({ shift } = {}) {
- return this.keyboard(shift === !0 ? "{Shift>}{Tab}{/Shift}" : shift === !1 ? "[/ShiftLeft][/ShiftRight]{Tab}" : "{Tab}");
- }
-
- // ../../node_modules/@testing-library/user-event/dist/esm/utils/keyDef/readNextDescriptor.js
- var bracketDict = (function(bracketDict2) {
- return bracketDict2["{"] = "}", bracketDict2["["] = "]", bracketDict2;
- })(bracketDict || {});
- function readNextDescriptor(text, context) {
- let pos = 0, startBracket = text[pos] in bracketDict ? text[pos] : "";
- pos += startBracket.length;
- let type5 = new RegExp(`^\\${startBracket}{2}`).test(text) ? "" : startBracket;
- return {
- type: type5,
- ...type5 === "" ? readPrintableChar(text, pos, context) : readTag(text, pos, type5, context)
- };
- }
- function readPrintableChar(text, pos, context) {
- let descriptor = text[pos];
- return assertDescriptor(descriptor, text, pos, context), pos += descriptor.length, {
- consumedLength: pos,
- descriptor,
- releasePrevious: !1,
- releaseSelf: !0,
- repeat: 1
- };
- }
- function readTag(text, pos, startBracket, context) {
- var _text_slice_match, _text_slice_match1;
- let releasePreviousModifier = text[pos] === "/" ? "/" : "";
- pos += releasePreviousModifier.length;
- let escapedDescriptor = startBracket === "{" && text[pos] === "\\";
- pos += Number(escapedDescriptor);
- let descriptor = escapedDescriptor ? text[pos] : (_text_slice_match = text.slice(pos).match(startBracket === "{" ? /^\w+|^[^}>/]/ : /^\w+/)) === null || _text_slice_match === void 0 ? void 0 : _text_slice_match[0];
- assertDescriptor(descriptor, text, pos, context), pos += descriptor.length;
- var _text_slice_match_;
- let repeatModifier = (_text_slice_match_ = (_text_slice_match1 = text.slice(pos).match(/^>\d+/)) === null || _text_slice_match1 === void 0 ? void 0 : _text_slice_match1[0]) !== null && _text_slice_match_ !== void 0 ? _text_slice_match_ : "";
- pos += repeatModifier.length;
- let releaseSelfModifier = text[pos] === "/" || !repeatModifier && text[pos] === ">" ? text[pos] : "";
- pos += releaseSelfModifier.length;
- let expectedEndBracket = bracketDict[startBracket], endBracket = text[pos] === expectedEndBracket ? expectedEndBracket : "";
- if (!endBracket)
- throw new Error(getErrorMessage([
- !repeatModifier && "repeat modifier",
- !releaseSelfModifier && "release modifier",
- `"${expectedEndBracket}"`
- ].filter(Boolean).join(" or "), text[pos], text, context));
- return pos += endBracket.length, {
- consumedLength: pos,
- descriptor,
- releasePrevious: !!releasePreviousModifier,
- repeat: repeatModifier ? Math.max(Number(repeatModifier.substr(1)), 1) : 1,
- releaseSelf: hasReleaseSelf(releaseSelfModifier, repeatModifier)
- };
- }
- function assertDescriptor(descriptor, text, pos, context) {
- if (!descriptor)
- throw new Error(getErrorMessage("key descriptor", text[pos], text, context));
- }
- function hasReleaseSelf(releaseSelfModifier, repeatModifier) {
- if (releaseSelfModifier)
- return releaseSelfModifier === "/";
- if (repeatModifier)
- return !1;
- }
- function getErrorMessage(expected, found, text, context) {
- return `Expected ${expected} but found "${found ?? ""}" in "${text}"
- See ${context === "pointer" ? "https://testing-library.com/docs/user-event/pointer#pressing-a-button-or-touching-the-screen" : "https://testing-library.com/docs/user-event/keyboard"}
- for more information about how userEvent parses your input.`;
- }
-
- // ../../node_modules/@testing-library/user-event/dist/esm/keyboard/parseKeyDef.js
- function parseKeyDef(keyboardMap, text) {
- let defs = [];
- do {
- let { type: type5, descriptor, consumedLength, releasePrevious, releaseSelf = !0, repeat } = readNextDescriptor(text, "keyboard");
- var _keyboardMap_find;
- let keyDef = (_keyboardMap_find = keyboardMap.find((def) => {
- if (type5 === "[") {
- var _def_code;
- return ((_def_code = def.code) === null || _def_code === void 0 ? void 0 : _def_code.toLowerCase()) === descriptor.toLowerCase();
- } else if (type5 === "{") {
- var _def_key;
- return ((_def_key = def.key) === null || _def_key === void 0 ? void 0 : _def_key.toLowerCase()) === descriptor.toLowerCase();
- }
- return def.key === descriptor;
- })) !== null && _keyboardMap_find !== void 0 ? _keyboardMap_find : {
- key: "Unknown",
- code: "Unknown",
- [type5 === "[" ? "code" : "key"]: descriptor
- };
- defs.push({
- keyDef,
- releasePrevious,
- releaseSelf,
- repeat
- }), text = text.slice(consumedLength);
- } while (text);
- return defs;
- }
-
- // ../../node_modules/@testing-library/user-event/dist/esm/keyboard/index.js
- async function keyboard(text) {
- let actions = parseKeyDef(this.config.keyboardMap, text);
- for (let i = 0; i < actions.length; i++)
- await wait(this.config), await keyboardAction(this, actions[i]);
- }
- async function keyboardAction(instance, { keyDef, releasePrevious, releaseSelf, repeat }) {
- let { system } = instance;
- if (system.keyboard.isKeyPressed(keyDef) && await system.keyboard.keyup(instance, keyDef), !releasePrevious) {
- for (let i = 1; i <= repeat; i++)
- await system.keyboard.keydown(instance, keyDef), i < repeat && await wait(instance.config);
- releaseSelf && await system.keyboard.keyup(instance, keyDef);
- }
- }
- async function releaseAllKeys(instance) {
- for (let k of instance.system.keyboard.getPressedKeys())
- await instance.system.keyboard.keyup(instance, k);
- }
-
- // ../../node_modules/@testing-library/user-event/dist/esm/document/copySelection.js
- function copySelection(target) {
- let data = hasOwnSelection(target) ? {
- "text/plain": readSelectedValueFromInput(target)
- } : {
- "text/plain": String(target.ownerDocument.getSelection())
- }, dt = createDataTransfer(getWindow(target));
- for (let type5 in data)
- data[type5] && dt.setData(type5, data[type5]);
- return dt;
- }
- function readSelectedValueFromInput(target) {
- let sel = getUISelection(target);
- return getUIValue(target).substring(sel.startOffset, sel.endOffset);
- }
-
- // ../../node_modules/@testing-library/user-event/dist/esm/clipboard/copy.js
- async function copy2() {
- let doc = this.config.document;
- var _doc_activeElement;
- let target = (_doc_activeElement = doc.activeElement) !== null && _doc_activeElement !== void 0 ? _doc_activeElement : (
- /* istanbul ignore next */
- doc.body
- ), clipboardData = copySelection(target);
- if (clipboardData.items.length !== 0)
- return this.dispatchUIEvent(target, "copy", {
- clipboardData
- }) && this.config.writeToClipboard && await writeDataTransferToClipboard(doc, clipboardData), clipboardData;
- }
-
- // ../../node_modules/@testing-library/user-event/dist/esm/clipboard/cut.js
- async function cut() {
- let doc = this.config.document;
- var _doc_activeElement;
- let target = (_doc_activeElement = doc.activeElement) !== null && _doc_activeElement !== void 0 ? _doc_activeElement : (
- /* istanbul ignore next */
- doc.body
- ), clipboardData = copySelection(target);
- if (clipboardData.items.length !== 0)
- return this.dispatchUIEvent(target, "cut", {
- clipboardData
- }) && this.config.writeToClipboard && await writeDataTransferToClipboard(target.ownerDocument, clipboardData), clipboardData;
- }
-
- // ../../node_modules/@testing-library/user-event/dist/esm/clipboard/paste.js
- async function paste(clipboardData) {
- let doc = this.config.document;
- var _doc_activeElement;
- let target = (_doc_activeElement = doc.activeElement) !== null && _doc_activeElement !== void 0 ? _doc_activeElement : (
- /* istanbul ignore next */
- doc.body
- );
- var _ref;
- let dataTransfer = (_ref = typeof clipboardData == "string" ? getClipboardDataFromString(doc, clipboardData) : clipboardData) !== null && _ref !== void 0 ? _ref : await readDataTransferFromClipboard(doc).catch(() => {
- throw new Error("`userEvent.paste()` without `clipboardData` requires the `ClipboardAPI` to be available.");
- });
- this.dispatchUIEvent(target, "paste", {
- clipboardData: dataTransfer
- });
- }
- function getClipboardDataFromString(doc, text) {
- let dt = createDataTransfer(getWindow(doc));
- return dt.setData("text", text), dt;
- }
-
- // ../../node_modules/@testing-library/user-event/dist/esm/pointer/parseKeyDef.js
- function parseKeyDef2(pointerMap, keys3) {
- let defs = [];
- do {
- let { descriptor, consumedLength, releasePrevious, releaseSelf = !0 } = readNextDescriptor(keys3, "pointer"), keyDef = pointerMap.find((p3) => p3.name === descriptor);
- keyDef && defs.push({
- keyDef,
- releasePrevious,
- releaseSelf
- }), keys3 = keys3.slice(consumedLength);
- } while (keys3);
- return defs;
- }
-
- // ../../node_modules/@testing-library/user-event/dist/esm/pointer/index.js
- async function pointer(input2) {
- let { pointerMap } = this.config, actions = [];
- (Array.isArray(input2) ? input2 : [
- input2
- ]).forEach((actionInput) => {
- typeof actionInput == "string" ? actions.push(...parseKeyDef2(pointerMap, actionInput)) : "keys" in actionInput ? actions.push(...parseKeyDef2(pointerMap, actionInput.keys).map((i) => ({
- ...actionInput,
- ...i
- }))) : actions.push(actionInput);
- });
- for (let i = 0; i < actions.length; i++)
- await wait(this.config), await pointerAction(this, actions[i]);
- this.system.pointer.resetClickCount();
- }
- async function pointerAction(instance, action2) {
- var _previousPosition_caret, _previousPosition_caret1;
- let pointerName = "pointerName" in action2 && action2.pointerName ? action2.pointerName : "keyDef" in action2 ? instance.system.pointer.getPointerName(action2.keyDef) : "mouse", previousPosition = instance.system.pointer.getPreviousPosition(pointerName);
- var _action_target, _action_coords, _action_node, _action_offset;
- let position2 = {
- target: (_action_target = action2.target) !== null && _action_target !== void 0 ? _action_target : getPrevTarget(instance, previousPosition),
- coords: (_action_coords = action2.coords) !== null && _action_coords !== void 0 ? _action_coords : previousPosition?.coords,
- caret: {
- node: (_action_node = action2.node) !== null && _action_node !== void 0 ? _action_node : hasCaretPosition(action2) || previousPosition == null || (_previousPosition_caret = previousPosition.caret) === null || _previousPosition_caret === void 0 ? void 0 : _previousPosition_caret.node,
- offset: (_action_offset = action2.offset) !== null && _action_offset !== void 0 ? _action_offset : hasCaretPosition(action2) || previousPosition == null || (_previousPosition_caret1 = previousPosition.caret) === null || _previousPosition_caret1 === void 0 ? void 0 : _previousPosition_caret1.offset
- }
- };
- "keyDef" in action2 ? (instance.system.pointer.isKeyPressed(action2.keyDef) && (setLevelRef(instance, ApiLevel.Trigger), await instance.system.pointer.release(instance, action2.keyDef, position2)), action2.releasePrevious || (setLevelRef(instance, ApiLevel.Trigger), await instance.system.pointer.press(instance, action2.keyDef, position2), action2.releaseSelf && (setLevelRef(instance, ApiLevel.Trigger), await instance.system.pointer.release(instance, action2.keyDef, position2)))) : (setLevelRef(instance, ApiLevel.Trigger), await instance.system.pointer.move(instance, pointerName, position2));
- }
- function hasCaretPosition(action2) {
- var _action_target, _ref;
- return !!((_ref = (_action_target = action2.target) !== null && _action_target !== void 0 ? _action_target : action2.node) !== null && _ref !== void 0 ? _ref : action2.offset !== void 0);
- }
- function getPrevTarget(instance, position2) {
- if (!position2)
- throw new Error("This pointer has no previous position. Provide a target property!");
- var _position_target;
- return (_position_target = position2.target) !== null && _position_target !== void 0 ? _position_target : instance.config.document.body;
- }
-
- // ../../node_modules/@testing-library/user-event/dist/esm/utility/clear.js
- async function clear(element) {
- if (!isEditable(element) || isDisabled2(element))
- throw new Error("clear()` is only supported on editable elements.");
- if (focusElement(element), element.ownerDocument.activeElement !== element)
- throw new Error("The element to be cleared could not be focused.");
- if (selectAll(element), !isAllSelected(element))
- throw new Error("The element content to be cleared could not be selected.");
- input(this, element, "", "deleteContentBackward");
- }
-
- // ../../node_modules/@testing-library/user-event/dist/esm/utility/selectOptions.js
- async function selectOptions(select, values) {
- return selectOptionsBase.call(this, !0, select, values);
- }
- async function deselectOptions(select, values) {
- return selectOptionsBase.call(this, !1, select, values);
- }
- async function selectOptionsBase(newValue, select, values) {
- if (!newValue && !select.multiple)
- throw getConfig2().getElementError("Unable to deselect an option in a non-multiple select. Use selectOptions to change the selection instead.", select);
- let valArray = Array.isArray(values) ? values : [
- values
- ], allOptions = Array.from(select.querySelectorAll('option, [role="option"]')), selectedOptions = valArray.map((val) => {
- if (typeof val != "string" && allOptions.includes(val))
- return val;
- {
- let matchingOption = allOptions.find((o) => o.value === val || o.innerHTML === val);
- if (matchingOption)
- return matchingOption;
- throw getConfig2().getElementError(`Value "${String(val)}" not found in options`, select);
- }
- }).filter((option) => !isDisabled2(option));
- if (isDisabled2(select) || !selectedOptions.length) return;
- let selectOption = (option) => {
- option.selected = newValue, this.dispatchUIEvent(select, "input", {
- bubbles: !0,
- cancelable: !1,
- composed: !0
- }), this.dispatchUIEvent(select, "change");
- };
- if (isElementType(select, "select"))
- if (select.multiple)
- for (let option of selectedOptions) {
- let withPointerEvents = this.config.pointerEventsCheck === 0 ? !0 : hasPointerEvents(this, option);
- withPointerEvents && (this.dispatchUIEvent(option, "pointerover"), this.dispatchUIEvent(select, "pointerenter"), this.dispatchUIEvent(option, "mouseover"), this.dispatchUIEvent(select, "mouseenter"), this.dispatchUIEvent(option, "pointermove"), this.dispatchUIEvent(option, "mousemove"), this.dispatchUIEvent(option, "pointerdown"), this.dispatchUIEvent(option, "mousedown")), focusElement(select), withPointerEvents && (this.dispatchUIEvent(option, "pointerup"), this.dispatchUIEvent(option, "mouseup")), selectOption(option), withPointerEvents && this.dispatchUIEvent(option, "click"), await wait(this.config);
- }
- else if (selectedOptions.length === 1) {
- let withPointerEvents = this.config.pointerEventsCheck === 0 ? !0 : hasPointerEvents(this, select);
- withPointerEvents ? await this.click(select) : focusElement(select), selectOption(selectedOptions[0]), withPointerEvents && (this.dispatchUIEvent(select, "pointerover"), this.dispatchUIEvent(select, "pointerenter"), this.dispatchUIEvent(select, "mouseover"), this.dispatchUIEvent(select, "mouseenter"), this.dispatchUIEvent(select, "pointerup"), this.dispatchUIEvent(select, "mouseup"), this.dispatchUIEvent(select, "click")), await wait(this.config);
- } else
- throw getConfig2().getElementError("Cannot select multiple options on a non-multiple select", select);
- else if (select.getAttribute("role") === "listbox")
- for (let option of selectedOptions)
- await this.click(option), await this.unhover(option);
- else
- throw getConfig2().getElementError("Cannot select options on elements that are neither select nor listbox elements", select);
- }
-
- // ../../node_modules/@testing-library/user-event/dist/esm/utility/type.js
- async function type3(element, text, { skipClick = this.config.skipClick, skipAutoClose = this.config.skipAutoClose, initialSelectionStart, initialSelectionEnd } = {}) {
- element.disabled || (skipClick || await this.click(element), initialSelectionStart !== void 0 && setSelectionRange(element, initialSelectionStart, initialSelectionEnd ?? initialSelectionStart), await this.keyboard(text), skipAutoClose || await releaseAllKeys(this));
- }
-
- // ../../node_modules/@testing-library/user-event/dist/esm/utils/edit/setFiles.js
- var fakeFiles = Symbol("files and value properties are mocked");
- function restoreProperty(obj, prop, descriptor) {
- descriptor ? Object.defineProperty(obj, prop, descriptor) : delete obj[prop];
- }
- function setFiles(el, files) {
- var _el_fakeFiles;
- (_el_fakeFiles = el[fakeFiles]) === null || _el_fakeFiles === void 0 || _el_fakeFiles.restore();
- let typeDescr = Object.getOwnPropertyDescriptor(el, "type"), valueDescr = Object.getOwnPropertyDescriptor(el, "value"), filesDescr = Object.getOwnPropertyDescriptor(el, "files");
- function restore() {
- restoreProperty(el, "type", typeDescr), restoreProperty(el, "value", valueDescr), restoreProperty(el, "files", filesDescr);
- }
- el[fakeFiles] = {
- restore
- }, Object.defineProperties(el, {
- files: {
- configurable: !0,
- get: () => files
- },
- value: {
- configurable: !0,
- get: () => files.length ? `C:\\fakepath\\${files[0].name}` : "",
- set(v) {
- if (v === "")
- restore();
- else {
- var _valueDescr_set;
- valueDescr == null || (_valueDescr_set = valueDescr.set) === null || _valueDescr_set === void 0 || _valueDescr_set.call(el, v);
- }
- }
- },
- type: {
- configurable: !0,
- get: () => "file",
- set(v) {
- v !== "file" && (restore(), el.type = v);
- }
- }
- });
- }
-
- // ../../node_modules/@testing-library/user-event/dist/esm/utility/upload.js
- async function upload(element, fileOrFiles) {
- let input2 = isElementType(element, "label") ? element.control : element;
- if (!input2 || !isElementType(input2, "input", {
- type: "file"
- }))
- throw new TypeError(`The ${input2 === element ? "given" : "associated"} ${input2?.tagName} element does not accept file uploads`);
- if (isDisabled2(element)) return;
- let files = (Array.isArray(fileOrFiles) ? fileOrFiles : [
- fileOrFiles
- ]).filter((file) => !this.config.applyAccept || isAcceptableFile(file, input2.accept)).slice(0, input2.multiple ? void 0 : 1), fileDialog = () => {
- var _input_files;
- files.length === ((_input_files = input2.files) === null || _input_files === void 0 ? void 0 : _input_files.length) && files.every((f4, i) => {
- var _input_files2;
- return f4 === ((_input_files2 = input2.files) === null || _input_files2 === void 0 ? void 0 : _input_files2.item(i));
- }) || (setFiles(input2, createFileList(getWindow(element), files)), this.dispatchUIEvent(input2, "input"), this.dispatchUIEvent(input2, "change"));
- };
- input2.addEventListener("fileDialog", fileDialog), await this.click(element), input2.removeEventListener("fileDialog", fileDialog);
- }
- function normalize3(nameOrType) {
- return nameOrType.toLowerCase().replace(/(\.|\/)jpg\b/g, "$1jpeg");
- }
- function isAcceptableFile(file, accept) {
- if (!accept)
- return !0;
- let wildcards = [
- "audio/*",
- "image/*",
- "video/*"
- ];
- return normalize3(accept).trim().split(/\s*,\s*/).some((acceptToken) => acceptToken.startsWith(".") ? normalize3(file.name).endsWith(acceptToken) : wildcards.includes(acceptToken) ? normalize3(file.type).startsWith(acceptToken.replace("*", "")) : normalize3(file.type) === acceptToken);
- }
-
- // ../../node_modules/@testing-library/user-event/dist/esm/setup/api.js
- var userEventApi = {
- click,
- dblClick,
- tripleClick,
- hover,
- unhover,
- tab,
- keyboard,
- copy: copy2,
- cut,
- paste,
- pointer,
- clear,
- deselectOptions,
- selectOptions,
- type: type3,
- upload
- };
-
- // ../../node_modules/@testing-library/user-event/dist/esm/setup/wrapAsync.js
- function wrapAsync(implementation) {
- return getConfig2().asyncWrapper(implementation);
- }
-
- // ../../node_modules/@testing-library/user-event/dist/esm/setup/setup.js
- var defaultOptionsDirect = {
- applyAccept: !0,
- autoModify: !0,
- delay: 0,
- document: globalThis.document,
- keyboardMap: defaultKeyMap,
- pointerMap: defaultKeyMap2,
- pointerEventsCheck: PointerEventsCheckLevel.EachApiCall,
- skipAutoClose: !1,
- skipClick: !1,
- skipHover: !1,
- writeToClipboard: !1,
- advanceTimers: () => Promise.resolve()
- }, defaultOptionsSetup = {
- ...defaultOptionsDirect,
- writeToClipboard: !0
- };
- function createConfig(options = {}, defaults = defaultOptionsSetup, node2) {
- let document13 = getDocument2(options, node2, defaults);
- return {
- ...defaults,
- ...options,
- document: document13
- };
- }
- function setupMain(options = {}) {
- let config4 = createConfig(options);
- prepareDocument(config4.document), patchFocus(getWindow(config4.document).HTMLElement);
- var _config_document_defaultView;
- let view = (_config_document_defaultView = config4.document.defaultView) !== null && _config_document_defaultView !== void 0 ? _config_document_defaultView : (
- /* istanbul ignore next */
- globalThis.window
- );
- return attachClipboardStubToView(view), createInstance(config4).api;
- }
- function setupDirect({ keyboardState, pointerState, ...options } = {}, node2) {
- let config4 = createConfig(options, defaultOptionsDirect, node2);
- prepareDocument(config4.document), patchFocus(getWindow(config4.document).HTMLElement);
- var _ref;
- let system = (_ref = pointerState ?? keyboardState) !== null && _ref !== void 0 ? _ref : new System();
- return {
- api: createInstance(config4, system).api,
- system
- };
- }
- function setupSub(options) {
- return createInstance({
- ...this.config,
- ...options
- }, this.system).api;
- }
- function wrapAndBindImpl(instance, impl) {
- function method(...args) {
- return setLevelRef(instance, ApiLevel.Call), wrapAsync(() => impl.apply(instance, args).then(async (ret) => (await wait(instance.config), ret)));
- }
- return Object.defineProperty(method, "name", {
- get: () => impl.name
- }), method;
- }
- function createInstance(config4, system = new System()) {
- let instance = {};
- return Object.assign(instance, {
- config: config4,
- dispatchEvent: dispatchEvent.bind(instance),
- dispatchUIEvent: dispatchUIEvent.bind(instance),
- system,
- levelRefs: {},
- ...userEventApi
- }), {
- instance,
- api: {
- ...Object.fromEntries(Object.entries(userEventApi).map(([name, api]) => [
- name,
- wrapAndBindImpl(instance, api)
- ])),
- setup: setupSub.bind(instance)
- }
- };
- }
- function getDocument2(options, node2, defaults) {
- var _options_document, _ref;
- return (_ref = (_options_document = options.document) !== null && _options_document !== void 0 ? _options_document : node2 && getDocumentFromNode(node2)) !== null && _ref !== void 0 ? _ref : defaults.document;
- }
-
- // ../../node_modules/@testing-library/user-event/dist/esm/setup/directApi.js
- var directApi_exports = {};
- __export(directApi_exports, {
- clear: () => clear2,
- click: () => click2,
- copy: () => copy3,
- cut: () => cut2,
- dblClick: () => dblClick2,
- deselectOptions: () => deselectOptions2,
- hover: () => hover2,
- keyboard: () => keyboard2,
- paste: () => paste2,
- pointer: () => pointer2,
- selectOptions: () => selectOptions2,
- tab: () => tab2,
- tripleClick: () => tripleClick2,
- type: () => type4,
- unhover: () => unhover2,
- upload: () => upload2
- });
- function clear2(element) {
- return setupDirect().api.clear(element);
- }
- function click2(element, options = {}) {
- return setupDirect(options, element).api.click(element);
- }
- function copy3(options = {}) {
- return setupDirect(options).api.copy();
- }
- function cut2(options = {}) {
- return setupDirect(options).api.cut();
- }
- function dblClick2(element, options = {}) {
- return setupDirect(options).api.dblClick(element);
- }
- function deselectOptions2(select, values, options = {}) {
- return setupDirect(options).api.deselectOptions(select, values);
- }
- function hover2(element, options = {}) {
- return setupDirect(options).api.hover(element);
- }
- async function keyboard2(text, options = {}) {
- let { api, system } = setupDirect(options);
- return api.keyboard(text).then(() => system);
- }
- async function pointer2(input2, options = {}) {
- let { api, system } = setupDirect(options);
- return api.pointer(input2).then(() => system);
- }
- function paste2(clipboardData, options) {
- return setupDirect(options).api.paste(clipboardData);
- }
- function selectOptions2(select, values, options = {}) {
- return setupDirect(options).api.selectOptions(select, values);
- }
- function tripleClick2(element, options = {}) {
- return setupDirect(options).api.tripleClick(element);
- }
- function type4(element, text, options = {}) {
- return setupDirect(options, element).api.type(element, text, options);
- }
- function unhover2(element, options = {}) {
- let { api, system } = setupDirect(options);
- return system.pointer.setMousePosition({
- target: element
- }), api.unhover(element);
- }
- function upload2(element, fileOrFiles, options = {}) {
- return setupDirect(options).api.upload(element, fileOrFiles);
- }
- function tab2(options = {}) {
- return setupDirect().api.tab(options);
- }
-
- // ../../node_modules/@testing-library/user-event/dist/esm/setup/index.js
- var userEvent = {
- ...directApi_exports,
- setup: setupMain
- };
-
- // src/test/testing-library.ts
- init_client_logger();
- init_esm();
- var testingLibrary = instrument(
- { ...dom_esm_exports },
- {
- getKeys: (obj) => Object.keys(obj).filter((key) => key !== "eventWrapper"),
- intercept: (method, path) => path[0] === "fireEvent" || method.startsWith("find") || method.startsWith("waitFor")
- }
- );
- testingLibrary.screen = new Proxy(testingLibrary.screen, {
- get(target, prop, receiver) {
- return typeof window < "u" && globalThis.location?.href?.includes("viewMode=docs") && once.warn(dedent`
- You are using Testing Library's \`screen\` object while the story is rendered in docs mode. This will likely lead to issues, as multiple stories are rendered in the same page and therefore screen will potentially find multiple elements. Use the \`canvas\` utility from the story context instead, which will scope the queries to each story's canvas.
-
- More info: https://storybook.js.org/docs/writing-tests/interaction-testing?ref=error#querying-the-canvas
- `), Reflect.get(target, prop, receiver);
- }
- });
- var {
- buildQueries: buildQueries2,
- configure: configure2,
- createEvent: createEvent3,
- fireEvent: fireEvent2,
- findAllByAltText: findAllByAltText2,
- findAllByDisplayValue: findAllByDisplayValue2,
- findAllByLabelText: findAllByLabelText2,
- findAllByPlaceholderText: findAllByPlaceholderText2,
- findAllByRole: findAllByRole2,
- findAllByTestId: findAllByTestId2,
- findAllByText: findAllByText2,
- findAllByTitle: findAllByTitle2,
- findByAltText: findByAltText2,
- findByDisplayValue: findByDisplayValue2,
- findByLabelText: findByLabelText2,
- findByPlaceholderText: findByPlaceholderText2,
- findByRole: findByRole2,
- findByTestId: findByTestId2,
- findByText: findByText2,
- findByTitle: findByTitle2,
- getAllByAltText: getAllByAltText2,
- getAllByDisplayValue: getAllByDisplayValue2,
- getAllByLabelText: getAllByLabelText2,
- getAllByPlaceholderText: getAllByPlaceholderText2,
- getAllByRole: getAllByRole2,
- getAllByTestId: getAllByTestId2,
- getAllByText: getAllByText2,
- getAllByTitle: getAllByTitle2,
- getByAltText: getByAltText2,
- getByDisplayValue: getByDisplayValue2,
- getByLabelText: getByLabelText2,
- getByPlaceholderText: getByPlaceholderText2,
- getByRole: getByRole2,
- getByTestId: getByTestId2,
- getByText: getByText2,
- getByTitle: getByTitle2,
- getConfig: getConfig3,
- getDefaultNormalizer: getDefaultNormalizer2,
- getElementError: getElementError2,
- getNodeText: getNodeText2,
- getQueriesForElement: getQueriesForElement2,
- getRoles: getRoles2,
- getSuggestedQuery: getSuggestedQuery2,
- isInaccessible: isInaccessible2,
- logDOM: logDOM2,
- logRoles: logRoles2,
- prettyDOM: prettyDOM2,
- queries: queries2,
- queryAllByAltText: queryAllByAltText2,
- queryAllByAttribute: queryAllByAttribute2,
- queryAllByDisplayValue: queryAllByDisplayValue2,
- queryAllByLabelText: queryAllByLabelText2,
- queryAllByPlaceholderText: queryAllByPlaceholderText2,
- queryAllByRole: queryAllByRole2,
- queryAllByTestId: queryAllByTestId2,
- queryAllByText: queryAllByText2,
- queryAllByTitle: queryAllByTitle2,
- queryByAltText: queryByAltText2,
- queryByAttribute: queryByAttribute2,
- queryByDisplayValue: queryByDisplayValue2,
- queryByLabelText: queryByLabelText2,
- queryByPlaceholderText: queryByPlaceholderText2,
- queryByRole: queryByRole2,
- queryByTestId: queryByTestId2,
- queryByText: queryByText2,
- queryByTitle: queryByTitle2,
- queryHelpers: queryHelpers2,
- screen: screen2,
- waitFor: waitFor2,
- waitForElementToBeRemoved: waitForElementToBeRemoved2,
- within,
- prettyFormat: prettyFormat2
- } = testingLibrary, uninstrumentedUserEvent = userEvent, { userEvent: userEvent2 } = instrument(
- { userEvent },
- { intercept: !0, getKeys: (obj) => Object.keys(obj).filter((key) => key !== "eventWrapper") }
- );
-
- // src/test/index.ts
- var { expect: expect3 } = instrument(
- { expect: expect2 },
- {
- getKeys: (obj, depth) => {
- if ("constructor" in obj && obj.constructor === Assertion) {
- let privateApi = ["assert", "__methods", "__flags", "_obj"], keys3 = Object.keys(Object.getPrototypeOf(obj)).filter(
- (it) => !privateApi.includes(it)
- );
- return depth > 2 ? keys3 : [...keys3, "not"];
- }
- return "any" in obj ? Object.keys(obj).filter((it) => it !== "any") : Object.keys(obj);
- },
- mutate: !0,
- intercept: (method) => method !== "expect"
- }
- ), sb = {
- mock: () => {
- }
- };
-
- // src/backgrounds/constants.ts
- var ADDON_ID3 = "storybook/background", PARAM_KEY = "backgrounds";
- var EVENTS2 = {
- UPDATE: `${ADDON_ID3}/update`
- };
-
- // src/backgrounds/defaults.ts
- var DEFAULT_BACKGROUNDS = {
- light: { name: "light", value: "#F8F8F8" },
- dark: { name: "dark", value: "#333" }
- };
-
- // src/backgrounds/utils.ts
- var { document: document7 } = globalThis, isReduceMotionEnabled = () => globalThis?.matchMedia ? !!globalThis.matchMedia("(prefers-reduced-motion: reduce)")?.matches : !1, clearStyles = (selector) => {
- (Array.isArray(selector) ? selector : [selector]).forEach(clearStyle);
- }, clearStyle = (selector) => {
- if (!document7)
- return;
- let element = document7.getElementById(selector);
- element && element.parentElement && element.parentElement.removeChild(element);
- }, addGridStyle = (selector, css3) => {
- if (!document7)
- return;
- let existingStyle = document7.getElementById(selector);
- if (existingStyle)
- existingStyle.innerHTML !== css3 && (existingStyle.innerHTML = css3);
- else {
- let style = document7.createElement("style");
- style.setAttribute("id", selector), style.innerHTML = css3, document7.head.appendChild(style);
- }
- }, addBackgroundStyle = (selector, css3, storyId) => {
- if (!document7)
- return;
- let existingStyle = document7.getElementById(selector);
- if (existingStyle)
- existingStyle.innerHTML !== css3 && (existingStyle.innerHTML = css3);
- else {
- let style = document7.createElement("style");
- style.setAttribute("id", selector), style.innerHTML = css3;
- let gridStyleSelector = `addon-backgrounds-grid${storyId ? `-docs-${storyId}` : ""}`, existingGridStyle = document7.getElementById(gridStyleSelector);
- existingGridStyle ? existingGridStyle.parentElement?.insertBefore(style, existingGridStyle) : document7.head.appendChild(style);
- }
- };
-
- // src/backgrounds/decorator.ts
- var defaultGrid = {
- cellSize: 100,
- cellAmount: 10,
- opacity: 0.8
- }, BG_SELECTOR_BASE = "addon-backgrounds", GRID_SELECTOR_BASE = "addon-backgrounds-grid", transitionStyle = isReduceMotionEnabled() ? "" : "transition: background-color 0.3s;", withBackgroundAndGrid = (StoryFn, context) => {
- let { globals = {}, parameters: parameters2 = {}, viewMode, id } = context, {
- options = DEFAULT_BACKGROUNDS,
- disable,
- grid = defaultGrid
- } = parameters2[PARAM_KEY] || {}, data = globals[PARAM_KEY] || {}, backgroundName = typeof data == "string" ? data : data?.value, item = backgroundName ? options[backgroundName] : void 0, value = typeof item == "string" ? item : item?.value || "transparent", showGrid = typeof data == "string" ? !1 : data.grid || !1, shownBackground = !!item && !disable, backgroundSelector = viewMode === "docs" ? `#anchor--${id} .docs-story, #anchor--primary--${id} .docs-story` : ".sb-show-main", gridSelector = viewMode === "docs" ? `#anchor--${id} .docs-story, #anchor--primary--${id} .docs-story` : ".sb-show-main", isLayoutPadded = parameters2.layout === void 0 || parameters2.layout === "padded", defaultOffset = viewMode === "docs" ? 20 : isLayoutPadded ? 16 : 0, { cellAmount, cellSize, opacity, offsetX = defaultOffset, offsetY = defaultOffset } = grid, backgroundSelectorId = viewMode === "docs" ? `${BG_SELECTOR_BASE}-docs-${id}` : `${BG_SELECTOR_BASE}-color`, backgroundTarget = viewMode === "docs" ? id : null;
- useEffect6(() => {
- let backgroundStyles = `
- ${backgroundSelector} {
- background: ${value} !important;
- ${transitionStyle}
- }`;
- if (!shownBackground) {
- clearStyles(backgroundSelectorId);
- return;
- }
- addBackgroundStyle(backgroundSelectorId, backgroundStyles, backgroundTarget);
- }, [backgroundSelector, backgroundSelectorId, backgroundTarget, shownBackground, value]);
- let gridSelectorId = viewMode === "docs" ? `${GRID_SELECTOR_BASE}-docs-${id}` : `${GRID_SELECTOR_BASE}`;
- return useEffect6(() => {
- if (!showGrid) {
- clearStyles(gridSelectorId);
- return;
- }
- let gridSize = [
- `${cellSize * cellAmount}px ${cellSize * cellAmount}px`,
- `${cellSize * cellAmount}px ${cellSize * cellAmount}px`,
- `${cellSize}px ${cellSize}px`,
- `${cellSize}px ${cellSize}px`
- ].join(", "), gridStyles = `
- ${gridSelector} {
- background-size: ${gridSize} !important;
- background-position: ${offsetX}px ${offsetY}px, ${offsetX}px ${offsetY}px, ${offsetX}px ${offsetY}px, ${offsetX}px ${offsetY}px !important;
- background-blend-mode: difference !important;
- background-image: linear-gradient(rgba(130, 130, 130, ${opacity}) 1px, transparent 1px),
- linear-gradient(90deg, rgba(130, 130, 130, ${opacity}) 1px, transparent 1px),
- linear-gradient(rgba(130, 130, 130, ${opacity / 2}) 1px, transparent 1px),
- linear-gradient(90deg, rgba(130, 130, 130, ${opacity / 2}) 1px, transparent 1px) !important;
- }
- `;
- addGridStyle(gridSelectorId, gridStyles);
- }, [cellAmount, cellSize, gridSelector, gridSelectorId, showGrid, offsetX, offsetY, opacity]), StoryFn();
- };
-
- // src/backgrounds/preview.ts
- var decorators = globalThis.FEATURES?.backgrounds ? [withBackgroundAndGrid] : [], parameters = {
- [PARAM_KEY]: {
- grid: {
- cellSize: 20,
- opacity: 0.5,
- cellAmount: 5
- },
- disable: !1
- }
- }, initialGlobals = {
- [PARAM_KEY]: { value: void 0, grid: !1 }
- };
-
- // src/component-testing/preview.ts
- var { step } = instrument(
- {
- // It seems like the label is unused, but the instrumenter has access to it
- // The context will be bounded later in StoryRender, so that the user can write just:
- // await step("label", (context) => {
- // // labeled step
- // });
- step: async (label, play, context) => play(context)
- },
- { intercept: !0 }
- );
-
- // src/highlight/constants.ts
- var ADDON_ID4 = "storybook/highlight", HIGHLIGHT = `${ADDON_ID4}/add`, REMOVE_HIGHLIGHT = `${ADDON_ID4}/remove`, RESET_HIGHLIGHT = `${ADDON_ID4}/reset`, SCROLL_INTO_VIEW = `${ADDON_ID4}/scroll-into-view`, MAX_Z_INDEX = 2147483647, MIN_TOUCH_AREA_SIZE = 28;
-
- // src/highlight/icons.ts
- var iconPaths = {
- chevronLeft: [
- "M9.10355 10.1464C9.29882 10.3417 9.29882 10.6583 9.10355 10.8536C8.90829 11.0488 8.59171 11.0488 8.39645 10.8536L4.89645 7.35355C4.70118 7.15829 4.70118 6.84171 4.89645 6.64645L8.39645 3.14645C8.59171 2.95118 8.90829 2.95118 9.10355 3.14645C9.29882 3.34171 9.29882 3.65829 9.10355 3.85355L5.95711 7L9.10355 10.1464Z"
- ],
- chevronRight: [
- "M4.89645 10.1464C4.70118 10.3417 4.70118 10.6583 4.89645 10.8536C5.09171 11.0488 5.40829 11.0488 5.60355 10.8536L9.10355 7.35355C9.29882 7.15829 9.29882 6.84171 9.10355 6.64645L5.60355 3.14645C5.40829 2.95118 5.09171 2.95118 4.89645 3.14645C4.70118 3.34171 4.70118 3.65829 4.89645 3.85355L8.04289 7L4.89645 10.1464Z"
- ],
- info: [
- "M7 5.5a.5.5 0 01.5.5v4a.5.5 0 01-1 0V6a.5.5 0 01.5-.5zM7 4.5A.75.75 0 107 3a.75.75 0 000 1.5z",
- "M7 14A7 7 0 107 0a7 7 0 000 14zm0-1A6 6 0 107 1a6 6 0 000 12z"
- ],
- shareAlt: [
- "M2 1.004a1 1 0 00-1 1v10a1 1 0 001 1h10a1 1 0 001-1v-4.5a.5.5 0 00-1 0v4.5H2v-10h4.5a.5.5 0 000-1H2z",
- "M7.354 7.357L12 2.711v1.793a.5.5 0 001 0v-3a.5.5 0 00-.5-.5h-3a.5.5 0 100 1h1.793L6.646 6.65a.5.5 0 10.708.707z"
- ]
- };
-
- // src/highlight/utils.ts
- var svgElements = "svg,path,rect,circle,line,polyline,polygon,ellipse,text".split(","), createElement6 = (type5, props = {}, children) => {
- let element = svgElements.includes(type5) ? document.createElementNS("http://www.w3.org/2000/svg", type5) : document.createElement(type5);
- return Object.entries(props).forEach(([key, val]) => {
- /[A-Z]/.test(key) ? (key === "onClick" && (element.addEventListener("click", val), element.addEventListener("keydown", (e) => {
- (e.key === "Enter" || e.key === " ") && (e.preventDefault(), val());
- })), key === "onMouseEnter" && element.addEventListener("mouseenter", val), key === "onMouseLeave" && element.addEventListener("mouseleave", val)) : element.setAttribute(key, val);
- }), children?.forEach((child) => {
- if (!(child == null || child === !1))
- try {
- element.appendChild(child);
- } catch {
- element.appendChild(document.createTextNode(String(child)));
- }
- }), element;
- }, createIcon = (name) => iconPaths[name] && createElement6(
- "svg",
- { width: "14", height: "14", viewBox: "0 0 14 14", xmlns: "http://www.w3.org/2000/svg" },
- iconPaths[name].map(
- (d) => createElement6("path", {
- fill: "currentColor",
- "fill-rule": "evenodd",
- "clip-rule": "evenodd",
- d
- })
- )
- ), normalizeOptions = (options) => {
- if ("elements" in options) {
- let { elements, color: color2, style } = options;
- return {
- id: void 0,
- priority: 0,
- selectors: elements,
- styles: {
- outline: `2px ${style} ${color2}`,
- outlineOffset: "2px",
- boxShadow: "0 0 0 6px rgba(255,255,255,0.6)"
- },
- menu: void 0
- };
- }
- let { menu, ...rest } = options;
- return {
- id: void 0,
- priority: 0,
- styles: {
- outline: "2px dashed #029cfd"
- },
- ...rest,
- menu: Array.isArray(menu) ? menu.every(Array.isArray) ? menu : [menu] : void 0
- };
- }, isFunction3 = (obj) => obj instanceof Function, state = /* @__PURE__ */ new Map(), listeners2 = /* @__PURE__ */ new Map(), teardowns = /* @__PURE__ */ new Map(), useStore = (initialValue2) => {
- let key = Symbol();
- return listeners2.set(key, []), state.set(key, initialValue2), { get: () => state.get(key), set: (update2) => {
- let current = state.get(key), next2 = isFunction3(update2) ? update2(current) : update2;
- next2 !== current && (state.set(key, next2), listeners2.get(key)?.forEach((listener) => {
- teardowns.get(listener)?.(), teardowns.set(listener, listener(next2));
- }));
- }, subscribe: (listener) => (listeners2.get(key)?.push(listener), () => {
- let list = listeners2.get(key);
- list && listeners2.set(
- key,
- list.filter((l) => l !== listener)
- );
- }), teardown: () => {
- listeners2.get(key)?.forEach((listener) => {
- teardowns.get(listener)?.(), teardowns.delete(listener);
- }), listeners2.delete(key), state.delete(key);
- } };
- }, mapElements = (highlights) => {
- let root2 = document.getElementById("storybook-root"), map2 = /* @__PURE__ */ new Map();
- for (let highlight of highlights) {
- let { priority = 0 } = highlight;
- for (let selector of highlight.selectors) {
- let elements = [
- ...document.querySelectorAll(
- // Elements matching the selector, excluding storybook elements and their descendants.
- // Necessary to find portaled elements (e.g. children of `body`).
- `:is(${selector}):not([id^="storybook-"], [id^="storybook-"] *, [class^="sb-"], [class^="sb-"] *)`
- ),
- // Elements matching the selector inside the storybook root, as these were excluded above.
- ...root2?.querySelectorAll(selector) || []
- ];
- for (let element of elements) {
- let existing = map2.get(element);
- (!existing || existing.priority <= priority) && map2.set(element, {
- ...highlight,
- priority,
- selectors: Array.from(new Set((existing?.selectors || []).concat(selector)))
- });
- }
- }
- }
- return map2;
- }, mapBoxes = (elements) => Array.from(elements.entries()).map(([element, { selectors, styles: styles4, hoverStyles, focusStyles, menu }]) => {
- let { top: top2, left: left2, width, height } = element.getBoundingClientRect(), { position: position2 } = getComputedStyle(element);
- return {
- element,
- selectors,
- styles: styles4,
- hoverStyles,
- focusStyles,
- menu,
- top: position2 === "fixed" ? top2 : top2 + window.scrollY,
- left: position2 === "fixed" ? left2 : left2 + window.scrollX,
- width,
- height
- };
- }).sort((a3, b) => b.width * b.height - a3.width * a3.height), isOverMenu = (menuElement, coordinates) => {
- let menu = menuElement.getBoundingClientRect(), { x, y } = coordinates;
- return menu?.top && menu?.left && x >= menu.left && x <= menu.left + menu.width && y >= menu.top && y <= menu.top + menu.height;
- }, isTargeted = (box, boxElement, coordinates) => {
- if (!boxElement || !coordinates)
- return !1;
- let { left: left2, top: top2, width, height } = box;
- height < MIN_TOUCH_AREA_SIZE && (top2 = top2 - Math.round((MIN_TOUCH_AREA_SIZE - height) / 2), height = MIN_TOUCH_AREA_SIZE), width < MIN_TOUCH_AREA_SIZE && (left2 = left2 - Math.round((MIN_TOUCH_AREA_SIZE - width) / 2), width = MIN_TOUCH_AREA_SIZE), boxElement.style.position === "fixed" && (left2 += window.scrollX, top2 += window.scrollY);
- let { x, y } = coordinates;
- return x >= left2 && x <= left2 + width && y >= top2 && y <= top2 + height;
- }, keepInViewport = (element, targetCoordinates, options = {}) => {
- let { x, y } = targetCoordinates, { margin = 5, topOffset = 0, centered = !1 } = options, { scrollX, scrollY, innerHeight: windowHeight, innerWidth: windowWidth } = window, top2 = Math.min(
- element.style.position === "fixed" ? y - scrollY : y,
- windowHeight - element.clientHeight - margin - topOffset + scrollY
- ), leftOffset = centered ? element.clientWidth / 2 : 0, left2 = element.style.position === "fixed" ? Math.max(Math.min(x - scrollX, windowWidth - leftOffset - margin), leftOffset + margin) : Math.max(
- Math.min(x, windowWidth - leftOffset - margin + scrollX),
- leftOffset + margin + scrollX
- );
- Object.assign(element.style, {
- ...left2 !== x && { left: `${left2}px` },
- ...top2 !== y && { top: `${top2}px` }
- });
- }, showPopover = (element) => {
- window.HTMLElement.prototype.hasOwnProperty("showPopover") && element.showPopover();
- }, hidePopover = (element) => {
- window.HTMLElement.prototype.hasOwnProperty("showPopover") && element.hidePopover();
- }, getEventDetails = (target) => ({
- top: target.top,
- left: target.left,
- width: target.width,
- height: target.height,
- selectors: target.selectors,
- element: {
- attributes: Object.fromEntries(
- Array.from(target.element.attributes).map((attr) => [attr.name, attr.value])
- ),
- localName: target.element.localName,
- tagName: target.element.tagName,
- outerHTML: target.element.outerHTML
- }
- });
-
- // src/highlight/useHighlights.ts
- var menuId = "storybook-highlights-menu", rootId = "storybook-highlights-root", storybookRootId = "storybook-root", useHighlights = (channel) => {
- if (globalThis.__STORYBOOK_HIGHLIGHT_INITIALIZED)
- return;
- globalThis.__STORYBOOK_HIGHLIGHT_INITIALIZED = !0;
- let { document: document13 } = globalThis, highlights = useStore([]), elements = useStore(/* @__PURE__ */ new Map()), boxes = useStore([]), clickCoords = useStore(), hoverCoords = useStore(), targets = useStore([]), hovered = useStore([]), focused = useStore(), selected = useStore(), root2 = document13.getElementById(rootId);
- highlights.subscribe(() => {
- root2 || (root2 = createElement6("div", { id: rootId }), document13.body.appendChild(root2));
- }), highlights.subscribe((value) => {
- let storybookRoot = document13.getElementById(storybookRootId);
- if (!storybookRoot)
- return;
- elements.set(mapElements(value));
- let observer = new MutationObserver(() => elements.set(mapElements(value)));
- return observer.observe(storybookRoot, { subtree: !0, childList: !0 }), () => {
- observer.disconnect();
- };
- }), elements.subscribe((value) => {
- let updateBoxes = () => requestAnimationFrame(() => boxes.set(mapBoxes(value))), observer = new ResizeObserver(updateBoxes);
- observer.observe(document13.body), Array.from(value.keys()).forEach((element) => observer.observe(element));
- let scrollers = Array.from(document13.body.querySelectorAll("*")).filter((el) => {
- let { overflow, overflowX, overflowY } = window.getComputedStyle(el);
- return ["auto", "scroll"].some((o) => [overflow, overflowX, overflowY].includes(o));
- });
- return scrollers.forEach((element) => element.addEventListener("scroll", updateBoxes)), () => {
- observer.disconnect(), scrollers.forEach((element) => element.removeEventListener("scroll", updateBoxes));
- };
- }), elements.subscribe((value) => {
- let sticky = Array.from(value.keys()).filter(({ style }) => style.position === "sticky"), updateBoxes = () => requestAnimationFrame(() => {
- boxes.set(
- (current) => current.map((box) => {
- if (sticky.includes(box.element)) {
- let { top: top2, left: left2 } = box.element.getBoundingClientRect();
- return { ...box, top: top2 + window.scrollY, left: left2 + window.scrollX };
- }
- return box;
- })
- );
- });
- return document13.addEventListener("scroll", updateBoxes), () => document13.removeEventListener("scroll", updateBoxes);
- }), elements.subscribe((value) => {
- targets.set((t) => t.filter(({ element }) => value.has(element)));
- }), targets.subscribe((value) => {
- value.length ? (selected.set((s3) => value.some((t) => t.element === s3?.element) ? s3 : void 0), focused.set((s3) => value.some((t) => t.element === s3?.element) ? s3 : void 0)) : (selected.set(void 0), focused.set(void 0), clickCoords.set(void 0));
- });
- let styleElementByHighlight = new Map(/* @__PURE__ */ new Map());
- highlights.subscribe((value) => {
- value.forEach(({ keyframes: keyframes2 }) => {
- if (keyframes2) {
- let style = styleElementByHighlight.get(keyframes2);
- style || (style = document13.createElement("style"), style.setAttribute("data-highlight", "keyframes"), styleElementByHighlight.set(keyframes2, style), document13.head.appendChild(style)), style.innerHTML = keyframes2;
- }
- }), styleElementByHighlight.forEach((style, keyframes2) => {
- value.some((v) => v.keyframes === keyframes2) || (style.remove(), styleElementByHighlight.delete(keyframes2));
- });
- });
- let boxElementByTargetElement = new Map(/* @__PURE__ */ new Map());
- boxes.subscribe((value) => {
- value.forEach((box) => {
- let boxElement = boxElementByTargetElement.get(box.element);
- if (root2 && !boxElement) {
- let props = {
- popover: "manual",
- "data-highlight-dimensions": `w${box.width.toFixed(0)}h${box.height.toFixed(0)}`,
- "data-highlight-coordinates": `x${box.left.toFixed(0)}y${box.top.toFixed(0)}`
- };
- boxElement = root2.appendChild(
- createElement6("div", props, [createElement6("div")])
- ), boxElementByTargetElement.set(box.element, boxElement);
- }
- }), boxElementByTargetElement.forEach((box, element) => {
- value.some(({ element: e }) => e === element) || (box.remove(), boxElementByTargetElement.delete(element));
- });
- }), boxes.subscribe((value) => {
- let targetable = value.filter((box) => box.menu);
- if (!targetable.length)
- return;
- let onClick = (event) => {
- requestAnimationFrame(() => {
- let menu = document13.getElementById(menuId), coords = { x: event.pageX, y: event.pageY };
- if (menu && !isOverMenu(menu, coords)) {
- let results = targetable.filter((box) => {
- let boxElement = boxElementByTargetElement.get(box.element);
- return isTargeted(box, boxElement, coords);
- });
- clickCoords.set(results.length ? coords : void 0), targets.set(results);
- }
- });
- };
- return document13.addEventListener("click", onClick), () => document13.removeEventListener("click", onClick);
- });
- let updateHovered = () => {
- let menu = document13.getElementById(menuId), coords = hoverCoords.get();
- !coords || menu && isOverMenu(menu, coords) || hovered.set((current) => {
- let update2 = boxes.get().filter((box) => {
- let boxElement = boxElementByTargetElement.get(box.element);
- return isTargeted(box, boxElement, coords);
- }), existing = current.filter((box) => update2.includes(box)), additions = update2.filter((box) => !current.includes(box)), hasRemovals = current.length - existing.length;
- return additions.length || hasRemovals ? [...existing, ...additions] : current;
- });
- };
- hoverCoords.subscribe(updateHovered), boxes.subscribe(updateHovered);
- let updateBoxStyles = () => {
- let selectedElement = selected.get(), targetElements = selectedElement ? [selectedElement] : targets.get(), focusedElement = targetElements.length === 1 ? targetElements[0] : focused.get(), isMenuOpen = clickCoords.get() !== void 0;
- boxes.get().forEach((box) => {
- let boxElement = boxElementByTargetElement.get(box.element);
- if (boxElement) {
- let isFocused = focusedElement === box, isHovered = isMenuOpen ? focusedElement ? isFocused : targetElements.includes(box) : hovered.get()?.includes(box);
- Object.assign(boxElement.style, {
- animation: "none",
- background: "transparent",
- border: "none",
- boxSizing: "border-box",
- outline: "none",
- outlineOffset: "0px",
- ...box.styles,
- ...isHovered ? box.hoverStyles : {},
- ...isFocused ? box.focusStyles : {},
- position: getComputedStyle(box.element).position === "fixed" ? "fixed" : "absolute",
- zIndex: MAX_Z_INDEX - 10,
- top: `${box.top}px`,
- left: `${box.left}px`,
- width: `${box.width}px`,
- height: `${box.height}px`,
- margin: 0,
- padding: 0,
- cursor: box.menu && isHovered ? "pointer" : "default",
- pointerEvents: box.menu ? "auto" : "none",
- display: "flex",
- alignItems: "center",
- justifyContent: "center",
- overflow: "visible"
- }), Object.assign(boxElement.children[0].style, {
- width: "100%",
- height: "100%",
- minHeight: `${MIN_TOUCH_AREA_SIZE}px`,
- minWidth: `${MIN_TOUCH_AREA_SIZE}px`,
- boxSizing: "content-box",
- padding: boxElement.style.outlineWidth || "0px"
- }), showPopover(boxElement);
- }
- });
- };
- boxes.subscribe(updateBoxStyles), targets.subscribe(updateBoxStyles), hovered.subscribe(updateBoxStyles), focused.subscribe(updateBoxStyles), selected.subscribe(updateBoxStyles);
- let renderMenu = () => {
- if (!root2)
- return;
- let menu = document13.getElementById(menuId);
- if (menu)
- menu.innerHTML = "";
- else {
- let props = { id: menuId, popover: "manual" };
- menu = root2.appendChild(createElement6("div", props)), root2.appendChild(
- createElement6("style", {}, [
- `
- #${menuId} {
- position: absolute;
- z-index: ${MAX_Z_INDEX};
- width: 300px;
- padding: 0px;
- margin: 15px 0 0 0;
- transform: translateX(-50%);
- font-family: "Nunito Sans", -apple-system, ".SFNSText-Regular", "San Francisco", BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
- font-size: 12px;
- background: white;
- border: none;
- border-radius: 6px;
- box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.05), 0 5px 15px 0 rgba(0, 0, 0, 0.1);
- color: #2E3438;
- }
- #${menuId} ul {
- list-style: none;
- margin: 0;
- padding: 0;
- }
- #${menuId} > ul {
- max-height: 300px;
- overflow-y: auto;
- padding: 4px 0;
- }
- #${menuId} li {
- padding: 0 4px;
- margin: 0;
- }
- #${menuId} li > :not(ul) {
- display: flex;
- padding: 8px;
- margin: 0;
- align-items: center;
- gap: 8px;
- border-radius: 4px;
- }
- #${menuId} button {
- width: 100%;
- border: 0;
- background: transparent;
- color: inherit;
- text-align: left;
- font-family: inherit;
- font-size: inherit;
- }
- #${menuId} button:focus-visible {
- outline-color: #029CFD;
- }
- #${menuId} button:hover {
- background: rgba(2, 156, 253, 0.07);
- color: #029CFD;
- cursor: pointer;
- }
- #${menuId} li code {
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- line-height: 16px;
- font-size: 11px;
- }
- #${menuId} li svg {
- flex-shrink: 0;
- margin: 1px;
- color: #73828C;
- }
- #${menuId} li > button:hover svg, #${menuId} li > button:focus-visible svg {
- color: #029CFD;
- }
- #${menuId} .element-list li svg {
- display: none;
- }
- #${menuId} li.selectable svg, #${menuId} li.selected svg {
- display: block;
- }
- #${menuId} .menu-list {
- border-top: 1px solid rgba(38, 85, 115, 0.15);
- }
- #${menuId} .menu-list > li:not(:last-child) {
- padding-bottom: 4px;
- margin-bottom: 4px;
- border-bottom: 1px solid rgba(38, 85, 115, 0.15);
- }
- #${menuId} .menu-items, #${menuId} .menu-items li {
- padding: 0;
- }
- #${menuId} .menu-item {
- display: flex;
- }
- #${menuId} .menu-item-content {
- display: flex;
- flex-direction: column;
- flex-grow: 1;
- }
- `
- ])
- );
- }
- let selectedElement = selected.get(), elementList = selectedElement ? [selectedElement] : targets.get();
- if (elementList.length && (menu.style.position = getComputedStyle(elementList[0].element).position === "fixed" ? "fixed" : "absolute", menu.appendChild(
- createElement6(
- "ul",
- { class: "element-list" },
- elementList.map((target) => {
- let selectable = elementList.length > 1 && !!target.menu?.some(
- (group) => group.some(
- (item) => !item.selectors || item.selectors.some((s3) => target.selectors.includes(s3))
- )
- ), props = selectable ? {
- class: "selectable",
- onClick: () => selected.set(target),
- onMouseEnter: () => focused.set(target),
- onMouseLeave: () => focused.set(void 0)
- } : selectedElement ? { class: "selected", onClick: () => selected.set(void 0) } : {}, asButton = selectable || selectedElement;
- return createElement6("li", props, [
- createElement6(asButton ? "button" : "div", asButton ? { type: "button" } : {}, [
- selectedElement ? createIcon("chevronLeft") : null,
- createElement6("code", {}, [target.element.outerHTML]),
- selectable ? createIcon("chevronRight") : null
- ])
- ]);
- })
- )
- )), selected.get() || targets.get().length === 1) {
- let target = selected.get() || targets.get()[0], menuGroups = target.menu?.filter(
- (group) => group.some(
- (item) => !item.selectors || item.selectors.some((s3) => target.selectors.includes(s3))
- )
- );
- menuGroups?.length && menu.appendChild(
- createElement6(
- "ul",
- { class: "menu-list" },
- menuGroups.map(
- (menuItems) => createElement6("li", {}, [
- createElement6(
- "ul",
- { class: "menu-items" },
- menuItems.map(
- ({ id, title, description, iconLeft, iconRight, clickEvent: event }) => {
- let onClick = event && (() => channel.emit(event, id, getEventDetails(target)));
- return createElement6("li", {}, [
- createElement6(
- onClick ? "button" : "div",
- onClick ? { class: "menu-item", type: "button", onClick } : { class: "menu-item" },
- [
- iconLeft ? createIcon(iconLeft) : null,
- createElement6("div", { class: "menu-item-content" }, [
- createElement6(description ? "strong" : "span", {}, [title]),
- description && createElement6("span", {}, [description])
- ]),
- iconRight ? createIcon(iconRight) : null
- ]
- )
- ]);
- }
- )
- )
- ])
- )
- )
- );
- }
- let coords = clickCoords.get();
- coords ? (Object.assign(menu.style, {
- display: "block",
- left: `${menu.style.position === "fixed" ? coords.x - window.scrollX : coords.x}px`,
- top: `${menu.style.position === "fixed" ? coords.y - window.scrollY : coords.y}px`
- }), showPopover(menu), requestAnimationFrame(() => keepInViewport(menu, coords, { topOffset: 15, centered: !0 }))) : (hidePopover(menu), Object.assign(menu.style, { display: "none" }));
- };
- targets.subscribe(renderMenu), selected.subscribe(renderMenu);
- let addHighlight = (highlight) => {
- let info = normalizeOptions(highlight);
- highlights.set((value) => {
- let others = info.id ? value.filter((h3) => h3.id !== info.id) : value;
- return info.selectors?.length ? [...others, info] : others;
- });
- }, removeHighlight = (id) => {
- id && highlights.set((value) => value.filter((h3) => h3.id !== id));
- }, resetState = () => {
- highlights.set([]), elements.set(/* @__PURE__ */ new Map()), boxes.set([]), clickCoords.set(void 0), hoverCoords.set(void 0), targets.set([]), hovered.set([]), focused.set(void 0), selected.set(void 0);
- }, removeTimeout, scrollIntoView = (target, options) => {
- let id = "scrollIntoView-highlight";
- clearTimeout(removeTimeout), removeHighlight(id);
- let element = document13.querySelector(target);
- if (!element) {
- console.warn(`Cannot scroll into view: ${target} not found`);
- return;
- }
- element.scrollIntoView({ behavior: "smooth", block: "center", ...options });
- let keyframeName = `kf-${Math.random().toString(36).substring(2, 15)}`;
- highlights.set((value) => [
- ...value,
- {
- id,
- priority: 1e3,
- selectors: [target],
- styles: {
- outline: "2px solid #1EA7FD",
- outlineOffset: "-1px",
- animation: `${keyframeName} 3s linear forwards`
- },
- keyframes: `@keyframes ${keyframeName} {
- 0% { outline: 2px solid #1EA7FD; }
- 20% { outline: 2px solid #1EA7FD00; }
- 40% { outline: 2px solid #1EA7FD; }
- 60% { outline: 2px solid #1EA7FD00; }
- 80% { outline: 2px solid #1EA7FD; }
- 100% { outline: 2px solid #1EA7FD00; }
- }`
- }
- ]), removeTimeout = setTimeout(() => removeHighlight(id), 3500);
- }, onMouseMove = (event) => {
- requestAnimationFrame(() => hoverCoords.set({ x: event.pageX, y: event.pageY }));
- };
- document13.body.addEventListener("mousemove", onMouseMove), channel.on(HIGHLIGHT, addHighlight), channel.on(REMOVE_HIGHLIGHT, removeHighlight), channel.on(RESET_HIGHLIGHT, resetState), channel.on(SCROLL_INTO_VIEW, scrollIntoView), channel.on(STORY_RENDER_PHASE_CHANGED, ({ newPhase }) => {
- newPhase === "loading" && resetState();
- });
- };
-
- // src/highlight/preview.ts
- globalThis?.FEATURES?.highlight && addons2?.ready && addons2.ready().then(useHighlights);
-
- // src/measure/constants.ts
- var ADDON_ID5 = "storybook/measure-addon", TOOL_ID = `${ADDON_ID5}/tool`, PARAM_KEY2 = "measureEnabled", EVENTS3 = {
- RESULT: `${ADDON_ID5}/result`,
- REQUEST: `${ADDON_ID5}/request`,
- CLEAR: `${ADDON_ID5}/clear`
- };
-
- // src/measure/box-model/canvas.ts
- init_dist();
- function getDocumentWidthAndHeight() {
- let container = scope.document.documentElement, height = Math.max(container.scrollHeight, container.offsetHeight);
- return { width: Math.max(container.scrollWidth, container.offsetWidth), height };
- }
- function createCanvas() {
- let canvas = scope.document.createElement("canvas");
- canvas.id = "storybook-addon-measure";
- let context = canvas.getContext("2d");
- invariant(context != null);
- let { width, height } = getDocumentWidthAndHeight();
- return setCanvasWidthAndHeight(canvas, context, { width, height }), canvas.style.position = "absolute", canvas.style.left = "0", canvas.style.top = "0", canvas.style.zIndex = "2147483647", canvas.style.pointerEvents = "none", scope.document.body.appendChild(canvas), { canvas, context, width, height };
- }
- function setCanvasWidthAndHeight(canvas, context, { width, height }) {
- canvas.style.width = `${width}px`, canvas.style.height = `${height}px`;
- let scale = scope.window.devicePixelRatio;
- canvas.width = Math.floor(width * scale), canvas.height = Math.floor(height * scale), context.scale(scale, scale);
- }
- var state2 = {};
- function init3() {
- state2.canvas || (state2 = createCanvas());
- }
- function clear3() {
- state2.context && state2.context.clearRect(0, 0, state2.width ?? 0, state2.height ?? 0);
- }
- function draw(callback) {
- clear3(), callback(state2.context);
- }
- function rescale() {
- invariant(state2.canvas, "Canvas should exist in the state."), invariant(state2.context, "Context should exist in the state."), setCanvasWidthAndHeight(state2.canvas, state2.context, { width: 0, height: 0 });
- let { width, height } = getDocumentWidthAndHeight();
- setCanvasWidthAndHeight(state2.canvas, state2.context, { width, height }), state2.width = width, state2.height = height;
- }
- function destroy() {
- state2.canvas && (clear3(), state2.canvas.parentNode?.removeChild(state2.canvas), state2 = {});
- }
-
- // src/measure/box-model/visualizer.ts
- init_dist();
-
- // src/measure/box-model/labels.ts
- var colors = {
- margin: "#f6b26b",
- border: "#ffe599",
- padding: "#93c47d",
- content: "#6fa8dc",
- text: "#232020"
- }, labelPadding = 6;
- function roundedRect(context, { x, y, w, h: h3, r: r2 }) {
- x = x - w / 2, y = y - h3 / 2, w < 2 * r2 && (r2 = w / 2), h3 < 2 * r2 && (r2 = h3 / 2), context.beginPath(), context.moveTo(x + r2, y), context.arcTo(x + w, y, x + w, y + h3, r2), context.arcTo(x + w, y + h3, x, y + h3, r2), context.arcTo(x, y + h3, x, y, r2), context.arcTo(x, y, x + w, y, r2), context.closePath();
- }
- function positionCoordinate(position2, { padding, border, width, height, top: top2, left: left2 }) {
- let contentWidth = width - border.left - border.right - padding.left - padding.right, contentHeight = height - padding.top - padding.bottom - border.top - border.bottom, x = left2 + border.left + padding.left, y = top2 + border.top + padding.top;
- return position2 === "top" ? x += contentWidth / 2 : position2 === "right" ? (x += contentWidth, y += contentHeight / 2) : position2 === "bottom" ? (x += contentWidth / 2, y += contentHeight) : position2 === "left" ? y += contentHeight / 2 : position2 === "center" && (x += contentWidth / 2, y += contentHeight / 2), { x, y };
- }
- function offset(type5, position2, { margin, border, padding }, labelPaddingSize, external) {
- let shift = (dir) => 0, offsetX = 0, offsetY = 0, locationMultiplier = external ? 1 : 0.5, labelPaddingShift = external ? labelPaddingSize * 2 : 0;
- return type5 === "padding" ? shift = (dir) => padding[dir] * locationMultiplier + labelPaddingShift : type5 === "border" ? shift = (dir) => padding[dir] + border[dir] * locationMultiplier + labelPaddingShift : type5 === "margin" && (shift = (dir) => padding[dir] + border[dir] + margin[dir] * locationMultiplier + labelPaddingShift), position2 === "top" ? offsetY = -shift("top") : position2 === "right" ? offsetX = shift("right") : position2 === "bottom" ? offsetY = shift("bottom") : position2 === "left" && (offsetX = -shift("left")), { offsetX, offsetY };
- }
- function collide(a3, b) {
- return Math.abs(a3.x - b.x) < Math.abs(a3.w + b.w) / 2 && Math.abs(a3.y - b.y) < Math.abs(a3.h + b.h) / 2;
- }
- function overlapAdjustment(position2, currentRect, prevRect) {
- return position2 === "top" ? currentRect.y = prevRect.y - prevRect.h - labelPadding : position2 === "right" ? currentRect.x = prevRect.x + prevRect.w / 2 + labelPadding + currentRect.w / 2 : position2 === "bottom" ? currentRect.y = prevRect.y + prevRect.h + labelPadding : position2 === "left" && (currentRect.x = prevRect.x - prevRect.w / 2 - labelPadding - currentRect.w / 2), { x: currentRect.x, y: currentRect.y };
- }
- function textWithRect(context, type5, { x, y, w, h: h3 }, text) {
- return roundedRect(context, { x, y, w, h: h3, r: 3 }), context.fillStyle = `${colors[type5]}dd`, context.fill(), context.strokeStyle = colors[type5], context.stroke(), context.fillStyle = colors.text, context.fillText(text, x, y), roundedRect(context, { x, y, w, h: h3, r: 3 }), context.fillStyle = `${colors[type5]}dd`, context.fill(), context.strokeStyle = colors[type5], context.stroke(), context.fillStyle = colors.text, context.fillText(text, x, y), { x, y, w, h: h3 };
- }
- function configureText(context, text) {
- context.font = "600 12px monospace", context.textBaseline = "middle", context.textAlign = "center";
- let metrics = context.measureText(text), actualHeight = metrics.actualBoundingBoxAscent + metrics.actualBoundingBoxDescent, w = metrics.width + labelPadding * 2, h3 = actualHeight + labelPadding * 2;
- return { w, h: h3 };
- }
- function drawLabel(context, measurements, { type: type5, position: position2 = "center", text }, prevRect, external = !1) {
- let { x, y } = positionCoordinate(position2, measurements), { offsetX, offsetY } = offset(type5, position2, measurements, labelPadding + 1, external);
- x += offsetX, y += offsetY;
- let { w, h: h3 } = configureText(context, text);
- if (prevRect && collide({ x, y, w, h: h3 }, prevRect)) {
- let adjusted = overlapAdjustment(position2, { x, y, w, h: h3 }, prevRect);
- x = adjusted.x, y = adjusted.y;
- }
- return textWithRect(context, type5, { x, y, w, h: h3 }, text);
- }
- function floatingOffset(alignment2, { w, h: h3 }) {
- let deltaW = w * 0.5 + labelPadding, deltaH = h3 * 0.5 + labelPadding;
- return {
- offsetX: (alignment2.x === "left" ? -1 : 1) * deltaW,
- offsetY: (alignment2.y === "top" ? -1 : 1) * deltaH
- };
- }
- function drawFloatingLabel(context, measurements, { type: type5, text }) {
- let { floatingAlignment: floatingAlignment2, extremities } = measurements, x = extremities[floatingAlignment2.x], y = extremities[floatingAlignment2.y], { w, h: h3 } = configureText(context, text), { offsetX, offsetY } = floatingOffset(floatingAlignment2, {
- w,
- h: h3
- });
- return x += offsetX, y += offsetY, textWithRect(context, type5, { x, y, w, h: h3 }, text);
- }
- function drawStack(context, measurements, stack, external) {
- let rects = [];
- stack.forEach((l, idx) => {
- let rect = external && l.position === "center" ? drawFloatingLabel(context, measurements, l) : drawLabel(context, measurements, l, rects[idx - 1], external);
- rects[idx] = rect;
- });
- }
- function labelStacks(context, measurements, labels, externalLabels) {
- let stacks = labels.reduce((acc, l) => (Object.prototype.hasOwnProperty.call(acc, l.position) || (acc[l.position] = []), acc[l.position]?.push(l), acc), {});
- stacks.top && drawStack(context, measurements, stacks.top, externalLabels), stacks.right && drawStack(context, measurements, stacks.right, externalLabels), stacks.bottom && drawStack(context, measurements, stacks.bottom, externalLabels), stacks.left && drawStack(context, measurements, stacks.left, externalLabels), stacks.center && drawStack(context, measurements, stacks.center, externalLabels);
- }
-
- // src/measure/box-model/visualizer.ts
- var colors2 = {
- margin: "#f6b26ba8",
- border: "#ffe599a8",
- padding: "#93c47d8c",
- content: "#6fa8dca8"
- }, SMALL_NODE_SIZE = 30;
- function pxToNumber(px) {
- return parseInt(px.replace("px", ""), 10);
- }
- function round(value) {
- return Number.isInteger(value) ? value : value.toFixed(2);
- }
- function filterZeroValues(labels) {
- return labels.filter((l) => l.text !== 0 && l.text !== "0");
- }
- function floatingAlignment(extremities) {
- let windowExtremities = {
- top: scope.window.scrollY,
- bottom: scope.window.scrollY + scope.window.innerHeight,
- left: scope.window.scrollX,
- right: scope.window.scrollX + scope.window.innerWidth
- }, distances = {
- top: Math.abs(windowExtremities.top - extremities.top),
- bottom: Math.abs(windowExtremities.bottom - extremities.bottom),
- left: Math.abs(windowExtremities.left - extremities.left),
- right: Math.abs(windowExtremities.right - extremities.right)
- };
- return {
- x: distances.left > distances.right ? "left" : "right",
- y: distances.top > distances.bottom ? "top" : "bottom"
- };
- }
- function measureElement(element) {
- let style = scope.getComputedStyle(element), { top: top2, left: left2, right: right2, bottom: bottom2, width, height } = element.getBoundingClientRect(), {
- marginTop,
- marginBottom,
- marginLeft,
- marginRight,
- paddingTop,
- paddingBottom,
- paddingLeft,
- paddingRight,
- borderBottomWidth,
- borderTopWidth,
- borderLeftWidth,
- borderRightWidth
- } = style;
- top2 = top2 + scope.window.scrollY, left2 = left2 + scope.window.scrollX, bottom2 = bottom2 + scope.window.scrollY, right2 = right2 + scope.window.scrollX;
- let margin = {
- top: pxToNumber(marginTop),
- bottom: pxToNumber(marginBottom),
- left: pxToNumber(marginLeft),
- right: pxToNumber(marginRight)
- }, padding = {
- top: pxToNumber(paddingTop),
- bottom: pxToNumber(paddingBottom),
- left: pxToNumber(paddingLeft),
- right: pxToNumber(paddingRight)
- }, border = {
- top: pxToNumber(borderTopWidth),
- bottom: pxToNumber(borderBottomWidth),
- left: pxToNumber(borderLeftWidth),
- right: pxToNumber(borderRightWidth)
- }, extremities = {
- top: top2 - margin.top,
- bottom: bottom2 + margin.bottom,
- left: left2 - margin.left,
- right: right2 + margin.right
- };
- return {
- margin,
- padding,
- border,
- top: top2,
- left: left2,
- bottom: bottom2,
- right: right2,
- width,
- height,
- extremities,
- floatingAlignment: floatingAlignment(extremities)
- };
- }
- function drawMargin(context, { margin, width, height, top: top2, left: left2, bottom: bottom2, right: right2 }) {
- let marginHeight = height + margin.bottom + margin.top;
- context.fillStyle = colors2.margin, context.fillRect(left2, top2 - margin.top, width, margin.top), context.fillRect(right2, top2 - margin.top, margin.right, marginHeight), context.fillRect(left2, bottom2, width, margin.bottom), context.fillRect(left2 - margin.left, top2 - margin.top, margin.left, marginHeight);
- let marginLabels = [
- {
- type: "margin",
- text: round(margin.top),
- position: "top"
- },
- {
- type: "margin",
- text: round(margin.right),
- position: "right"
- },
- {
- type: "margin",
- text: round(margin.bottom),
- position: "bottom"
- },
- {
- type: "margin",
- text: round(margin.left),
- position: "left"
- }
- ];
- return filterZeroValues(marginLabels);
- }
- function drawPadding(context, { padding, border, width, height, top: top2, left: left2, bottom: bottom2, right: right2 }) {
- let paddingWidth = width - border.left - border.right, paddingHeight = height - padding.top - padding.bottom - border.top - border.bottom;
- context.fillStyle = colors2.padding, context.fillRect(left2 + border.left, top2 + border.top, paddingWidth, padding.top), context.fillRect(
- right2 - padding.right - border.right,
- top2 + padding.top + border.top,
- padding.right,
- paddingHeight
- ), context.fillRect(
- left2 + border.left,
- bottom2 - padding.bottom - border.bottom,
- paddingWidth,
- padding.bottom
- ), context.fillRect(left2 + border.left, top2 + padding.top + border.top, padding.left, paddingHeight);
- let paddingLabels = [
- {
- type: "padding",
- text: padding.top,
- position: "top"
- },
- {
- type: "padding",
- text: padding.right,
- position: "right"
- },
- {
- type: "padding",
- text: padding.bottom,
- position: "bottom"
- },
- {
- type: "padding",
- text: padding.left,
- position: "left"
- }
- ];
- return filterZeroValues(paddingLabels);
- }
- function drawBorder(context, { border, width, height, top: top2, left: left2, bottom: bottom2, right: right2 }) {
- let borderHeight = height - border.top - border.bottom;
- context.fillStyle = colors2.border, context.fillRect(left2, top2, width, border.top), context.fillRect(left2, bottom2 - border.bottom, width, border.bottom), context.fillRect(left2, top2 + border.top, border.left, borderHeight), context.fillRect(right2 - border.right, top2 + border.top, border.right, borderHeight);
- let borderLabels = [
- {
- type: "border",
- text: border.top,
- position: "top"
- },
- {
- type: "border",
- text: border.right,
- position: "right"
- },
- {
- type: "border",
- text: border.bottom,
- position: "bottom"
- },
- {
- type: "border",
- text: border.left,
- position: "left"
- }
- ];
- return filterZeroValues(borderLabels);
- }
- function drawContent(context, { padding, border, width, height, top: top2, left: left2 }) {
- let contentWidth = width - border.left - border.right - padding.left - padding.right, contentHeight = height - padding.top - padding.bottom - border.top - border.bottom;
- return context.fillStyle = colors2.content, context.fillRect(
- left2 + border.left + padding.left,
- top2 + border.top + padding.top,
- contentWidth,
- contentHeight
- ), [
- {
- type: "content",
- position: "center",
- text: `${round(contentWidth)} x ${round(contentHeight)}`
- }
- ];
- }
- function drawBoxModel(element) {
- return (context) => {
- if (element && context) {
- let measurements = measureElement(element), marginLabels = drawMargin(context, measurements), paddingLabels = drawPadding(context, measurements), borderLabels = drawBorder(context, measurements), contentLabels = drawContent(context, measurements), externalLabels = measurements.width <= SMALL_NODE_SIZE * 3 || measurements.height <= SMALL_NODE_SIZE;
- labelStacks(
- context,
- measurements,
- [...contentLabels, ...paddingLabels, ...borderLabels, ...marginLabels],
- externalLabels
- );
- }
- };
- }
- function drawSelectedElement(element) {
- draw(drawBoxModel(element));
- }
-
- // src/measure/util.ts
- init_dist();
- var deepElementFromPoint = (x, y) => {
- let element = scope.document.elementFromPoint(x, y), crawlShadows = (node2) => {
- if (node2 && node2.shadowRoot) {
- let nestedElement = node2.shadowRoot.elementFromPoint(x, y);
- return node2.isEqualNode(nestedElement) ? node2 : nestedElement.shadowRoot ? crawlShadows(nestedElement) : nestedElement;
- }
- return node2;
- };
- return crawlShadows(element) || element;
- };
-
- // src/measure/withMeasure.ts
- var nodeAtPointerRef, pointer3 = { x: 0, y: 0 };
- function findAndDrawElement(x, y) {
- nodeAtPointerRef = deepElementFromPoint(x, y), drawSelectedElement(nodeAtPointerRef);
- }
- var withMeasure = (StoryFn, context) => {
- let { measureEnabled } = context.globals || {};
- return useEffect6(() => {
- if (typeof globalThis.document > "u")
- return;
- let onPointerMove = (event) => {
- window.requestAnimationFrame(() => {
- event.stopPropagation(), pointer3.x = event.clientX, pointer3.y = event.clientY;
- });
- };
- return globalThis.document.addEventListener("pointermove", onPointerMove), () => {
- globalThis.document.removeEventListener("pointermove", onPointerMove);
- };
- }, []), useEffect6(() => {
- let onPointerOver = (event) => {
- window.requestAnimationFrame(() => {
- event.stopPropagation(), findAndDrawElement(event.clientX, event.clientY);
- });
- }, onResize = () => {
- window.requestAnimationFrame(() => {
- rescale();
- });
- };
- return context.viewMode === "story" && measureEnabled && (globalThis.document.addEventListener("pointerover", onPointerOver), init3(), globalThis.window.addEventListener("resize", onResize), findAndDrawElement(pointer3.x, pointer3.y)), () => {
- globalThis.window.removeEventListener("resize", onResize), destroy();
- };
- }, [measureEnabled, context.viewMode]), StoryFn();
- };
-
- // src/measure/preview.ts
- var decorators2 = globalThis.FEATURES?.measure ? [withMeasure] : [], initialGlobals2 = {
- [PARAM_KEY2]: !1
- };
-
- // src/outline/constants.ts
- var PARAM_KEY3 = "outline";
-
- // src/outline/helpers.ts
- init_dist();
- var clearStyles2 = (selector) => {
- (Array.isArray(selector) ? selector : [selector]).forEach(clearStyle2);
- }, clearStyle2 = (input2) => {
- let selector = typeof input2 == "string" ? input2 : input2.join(""), element = scope.document.getElementById(selector);
- element && element.parentElement && element.parentElement.removeChild(element);
- }, addOutlineStyles = (selector, css3) => {
- let existingStyle = scope.document.getElementById(selector);
- if (existingStyle)
- existingStyle.innerHTML !== css3 && (existingStyle.innerHTML = css3);
- else {
- let style = scope.document.createElement("style");
- style.setAttribute("id", selector), style.innerHTML = css3, scope.document.head.appendChild(style);
- }
- };
-
- // src/outline/outlineCSS.ts
- init_esm();
- function outlineCSS(selector) {
- return dedent`
- ${selector} body {
- outline: 1px solid #2980b9 !important;
- }
-
- ${selector} article {
- outline: 1px solid #3498db !important;
- }
-
- ${selector} nav {
- outline: 1px solid #0088c3 !important;
- }
-
- ${selector} aside {
- outline: 1px solid #33a0ce !important;
- }
-
- ${selector} section {
- outline: 1px solid #66b8da !important;
- }
-
- ${selector} header {
- outline: 1px solid #99cfe7 !important;
- }
-
- ${selector} footer {
- outline: 1px solid #cce7f3 !important;
- }
-
- ${selector} h1 {
- outline: 1px solid #162544 !important;
- }
-
- ${selector} h2 {
- outline: 1px solid #314e6e !important;
- }
-
- ${selector} h3 {
- outline: 1px solid #3e5e85 !important;
- }
-
- ${selector} h4 {
- outline: 1px solid #449baf !important;
- }
-
- ${selector} h5 {
- outline: 1px solid #c7d1cb !important;
- }
-
- ${selector} h6 {
- outline: 1px solid #4371d0 !important;
- }
-
- ${selector} main {
- outline: 1px solid #2f4f90 !important;
- }
-
- ${selector} address {
- outline: 1px solid #1a2c51 !important;
- }
-
- ${selector} div {
- outline: 1px solid #036cdb !important;
- }
-
- ${selector} p {
- outline: 1px solid #ac050b !important;
- }
-
- ${selector} hr {
- outline: 1px solid #ff063f !important;
- }
-
- ${selector} pre {
- outline: 1px solid #850440 !important;
- }
-
- ${selector} blockquote {
- outline: 1px solid #f1b8e7 !important;
- }
-
- ${selector} ol {
- outline: 1px solid #ff050c !important;
- }
-
- ${selector} ul {
- outline: 1px solid #d90416 !important;
- }
-
- ${selector} li {
- outline: 1px solid #d90416 !important;
- }
-
- ${selector} dl {
- outline: 1px solid #fd3427 !important;
- }
-
- ${selector} dt {
- outline: 1px solid #ff0043 !important;
- }
-
- ${selector} dd {
- outline: 1px solid #e80174 !important;
- }
-
- ${selector} figure {
- outline: 1px solid #ff00bb !important;
- }
-
- ${selector} figcaption {
- outline: 1px solid #bf0032 !important;
- }
-
- ${selector} table {
- outline: 1px solid #00cc99 !important;
- }
-
- ${selector} caption {
- outline: 1px solid #37ffc4 !important;
- }
-
- ${selector} thead {
- outline: 1px solid #98daca !important;
- }
-
- ${selector} tbody {
- outline: 1px solid #64a7a0 !important;
- }
-
- ${selector} tfoot {
- outline: 1px solid #22746b !important;
- }
-
- ${selector} tr {
- outline: 1px solid #86c0b2 !important;
- }
-
- ${selector} th {
- outline: 1px solid #a1e7d6 !important;
- }
-
- ${selector} td {
- outline: 1px solid #3f5a54 !important;
- }
-
- ${selector} col {
- outline: 1px solid #6c9a8f !important;
- }
-
- ${selector} colgroup {
- outline: 1px solid #6c9a9d !important;
- }
-
- ${selector} button {
- outline: 1px solid #da8301 !important;
- }
-
- ${selector} datalist {
- outline: 1px solid #c06000 !important;
- }
-
- ${selector} fieldset {
- outline: 1px solid #d95100 !important;
- }
-
- ${selector} form {
- outline: 1px solid #d23600 !important;
- }
-
- ${selector} input {
- outline: 1px solid #fca600 !important;
- }
-
- ${selector} keygen {
- outline: 1px solid #b31e00 !important;
- }
-
- ${selector} label {
- outline: 1px solid #ee8900 !important;
- }
-
- ${selector} legend {
- outline: 1px solid #de6d00 !important;
- }
-
- ${selector} meter {
- outline: 1px solid #e8630c !important;
- }
-
- ${selector} optgroup {
- outline: 1px solid #b33600 !important;
- }
-
- ${selector} option {
- outline: 1px solid #ff8a00 !important;
- }
-
- ${selector} output {
- outline: 1px solid #ff9619 !important;
- }
-
- ${selector} progress {
- outline: 1px solid #e57c00 !important;
- }
-
- ${selector} select {
- outline: 1px solid #e26e0f !important;
- }
-
- ${selector} textarea {
- outline: 1px solid #cc5400 !important;
- }
-
- ${selector} details {
- outline: 1px solid #33848f !important;
- }
-
- ${selector} summary {
- outline: 1px solid #60a1a6 !important;
- }
-
- ${selector} command {
- outline: 1px solid #438da1 !important;
- }
-
- ${selector} menu {
- outline: 1px solid #449da6 !important;
- }
-
- ${selector} del {
- outline: 1px solid #bf0000 !important;
- }
-
- ${selector} ins {
- outline: 1px solid #400000 !important;
- }
-
- ${selector} img {
- outline: 1px solid #22746b !important;
- }
-
- ${selector} iframe {
- outline: 1px solid #64a7a0 !important;
- }
-
- ${selector} embed {
- outline: 1px solid #98daca !important;
- }
-
- ${selector} object {
- outline: 1px solid #00cc99 !important;
- }
-
- ${selector} param {
- outline: 1px solid #37ffc4 !important;
- }
-
- ${selector} video {
- outline: 1px solid #6ee866 !important;
- }
-
- ${selector} audio {
- outline: 1px solid #027353 !important;
- }
-
- ${selector} source {
- outline: 1px solid #012426 !important;
- }
-
- ${selector} canvas {
- outline: 1px solid #a2f570 !important;
- }
-
- ${selector} track {
- outline: 1px solid #59a600 !important;
- }
-
- ${selector} map {
- outline: 1px solid #7be500 !important;
- }
-
- ${selector} area {
- outline: 1px solid #305900 !important;
- }
-
- ${selector} a {
- outline: 1px solid #ff62ab !important;
- }
-
- ${selector} em {
- outline: 1px solid #800b41 !important;
- }
-
- ${selector} strong {
- outline: 1px solid #ff1583 !important;
- }
-
- ${selector} i {
- outline: 1px solid #803156 !important;
- }
-
- ${selector} b {
- outline: 1px solid #cc1169 !important;
- }
-
- ${selector} u {
- outline: 1px solid #ff0430 !important;
- }
-
- ${selector} s {
- outline: 1px solid #f805e3 !important;
- }
-
- ${selector} small {
- outline: 1px solid #d107b2 !important;
- }
-
- ${selector} abbr {
- outline: 1px solid #4a0263 !important;
- }
-
- ${selector} q {
- outline: 1px solid #240018 !important;
- }
-
- ${selector} cite {
- outline: 1px solid #64003c !important;
- }
-
- ${selector} dfn {
- outline: 1px solid #b4005a !important;
- }
-
- ${selector} sub {
- outline: 1px solid #dba0c8 !important;
- }
-
- ${selector} sup {
- outline: 1px solid #cc0256 !important;
- }
-
- ${selector} time {
- outline: 1px solid #d6606d !important;
- }
-
- ${selector} code {
- outline: 1px solid #e04251 !important;
- }
-
- ${selector} kbd {
- outline: 1px solid #5e001f !important;
- }
-
- ${selector} samp {
- outline: 1px solid #9c0033 !important;
- }
-
- ${selector} var {
- outline: 1px solid #d90047 !important;
- }
-
- ${selector} mark {
- outline: 1px solid #ff0053 !important;
- }
-
- ${selector} bdi {
- outline: 1px solid #bf3668 !important;
- }
-
- ${selector} bdo {
- outline: 1px solid #6f1400 !important;
- }
-
- ${selector} ruby {
- outline: 1px solid #ff7b93 !important;
- }
-
- ${selector} rt {
- outline: 1px solid #ff2f54 !important;
- }
-
- ${selector} rp {
- outline: 1px solid #803e49 !important;
- }
-
- ${selector} span {
- outline: 1px solid #cc2643 !important;
- }
-
- ${selector} br {
- outline: 1px solid #db687d !important;
- }
-
- ${selector} wbr {
- outline: 1px solid #db175b !important;
- }`;
- }
-
- // src/outline/withOutline.ts
- var withOutline = (StoryFn, context) => {
- let globals = context.globals || {}, isActive = [!0, "true"].includes(globals[PARAM_KEY3]), isInDocs = context.viewMode === "docs", outlineStyles = useMemo4(() => outlineCSS(isInDocs ? '[data-story-block="true"]' : ".sb-show-main"), [context]);
- return useEffect6(() => {
- let selectorId = isInDocs ? `addon-outline-docs-${context.id}` : "addon-outline";
- return isActive ? addOutlineStyles(selectorId, outlineStyles) : clearStyles2(selectorId), () => {
- clearStyles2(selectorId);
- };
- }, [isActive, outlineStyles, context]), StoryFn();
- };
-
- // src/outline/preview.ts
- var decorators3 = globalThis.FEATURES?.outline ? [withOutline] : [], initialGlobals3 = {
- [PARAM_KEY3]: !1
- };
-
- // src/viewport/constants.ts
- var ADDON_ID6 = "storybook/viewport", PARAM_KEY4 = "viewport", PANEL_ID3 = `${ADDON_ID6}/panel`, TOOL_ID2 = `${ADDON_ID6}/tool`;
-
- // src/viewport/preview.ts
- var initialGlobals4 = {
- [PARAM_KEY4]: { value: void 0, isRotated: !1 }
- };
-
- // src/csf/index.ts
- var sanitize = (string) => string.toLowerCase().replace(/[ ’–—―′¿'`~!@#$%^&*()_|+\-=?;:'",.<>\{\}\[\]\\\/]/gi, "-").replace(/-+/g, "-").replace(/^-+/, "").replace(/-+$/, ""), sanitizeSafe = (string, part) => {
- let sanitized = sanitize(string);
- if (sanitized === "")
- throw new Error(`Invalid ${part} '${string}', must include alphanumeric characters`);
- return sanitized;
- }, toId = (kind, name) => `${sanitizeSafe(kind, "kind")}${name ? `--${sanitizeSafe(name, "name")}` : ""}`;
-
- // ../../node_modules/es-toolkit/dist/array/countBy.mjs
- function countBy(arr, mapper) {
- let result = {};
- for (let i = 0; i < arr.length; i++) {
- let item = arr[i], key = mapper(item);
- result[key] = (result[key] ?? 0) + 1;
- }
- return result;
- }
-
- // ../../node_modules/es-toolkit/dist/array/partition.mjs
- function partition(arr, isInTruthy) {
- let truthy = [], falsy = [];
- for (let i = 0; i < arr.length; i++) {
- let item = arr[i];
- isInTruthy(item) ? truthy.push(item) : falsy.push(item);
- }
- return [truthy, falsy];
- }
-
- // src/manager-api/lib/stories.ts
- var import_memoizerific6 = __toESM(require_memoizerific(), 1);
- init_esm();
-
- // src/manager-api/lib/intersect.ts
- var intersect_default = (a3, b) => !Array.isArray(a3) || !Array.isArray(b) || !a3.length || !b.length ? [] : a3.reduce((acc, aValue) => (b.includes(aValue) && acc.push(aValue), acc), []);
-
- // src/manager-api/lib/stories.ts
- var TITLE_PATH_SEPARATOR = /\s*\/\s*/, denormalizeStoryParameters = ({
- globalParameters,
- kindParameters,
- stories
- }) => mapValues(stories, (storyData) => ({
- ...storyData,
- parameters: combineParameters2(
- globalParameters,
- kindParameters[storyData.kind],
- storyData.parameters
- )
- })), transformSetStoriesStoryDataToPreparedStoryIndex = (stories) => ({ v: 5, entries: Object.entries(stories).reduce(
- (acc, [id, story]) => {
- if (!story)
- return acc;
- let { docsOnly, fileName, ...parameters2 } = story.parameters, base = {
- title: story.kind,
- id,
- name: story.name,
- importPath: fileName
- };
- if (docsOnly)
- acc[id] = {
- type: "docs",
- tags: ["stories-mdx"],
- storiesImports: [],
- ...base
- };
- else {
- let { argTypes, args, initialArgs } = story;
- acc[id] = {
- type: "story",
- subtype: "story",
- ...base,
- parameters: parameters2,
- argTypes,
- args,
- initialArgs
- };
- }
- return acc;
- },
- {}
- ) }), transformStoryIndexV2toV3 = (index4) => ({
- v: 3,
- stories: Object.values(index4.stories).reduce(
- (acc, entry) => (acc[entry.id] = {
- ...entry,
- title: entry.kind,
- name: entry.name || entry.story,
- importPath: entry.parameters.fileName || ""
- }, acc),
- {}
- )
- }), transformStoryIndexV3toV4 = (index4) => {
- let countByTitle = countBy(Object.values(index4.stories), (item) => item.title);
- return {
- v: 4,
- entries: Object.values(index4.stories).reduce(
- (acc, entry) => {
- let type5 = "story";
- return (entry.parameters?.docsOnly || entry.name === "Page" && countByTitle[entry.title] === 1) && (type5 = "docs"), acc[entry.id] = {
- type: type5,
- ...type5 === "docs" && { tags: ["stories-mdx"], storiesImports: [] },
- ...entry
- }, delete acc[entry.id].story, delete acc[entry.id].kind, acc;
- },
- {}
- )
- };
- }, transformStoryIndexV4toV5 = (index4) => ({
- v: 5,
- entries: Object.values(index4.entries).reduce(
- (acc, entry) => (acc[entry.id] = {
- ...entry,
- tags: entry.tags ? [Tag.DEV, Tag.TEST, ...entry.tags] : [Tag.DEV]
- }, acc),
- {}
- )
- }), transformStoryIndexToStoriesHash = (input2, { provider, docsOptions, filters, allStatuses, statusFilterKey }) => {
- if (!input2.v)
- throw new Error("Composition: Missing stories.json version");
- let index4 = input2;
- index4 = index4.v === 2 ? transformStoryIndexV2toV3(index4) : index4, index4 = index4.v === 3 ? transformStoryIndexV3toV4(index4) : index4, index4 = index4.v === 4 ? transformStoryIndexV4toV5(index4) : index4, index4 = index4;
- let indexEntries = Object.values(index4.entries), filterFunctions = Object.values(filters), statusFilterFn = statusFilterKey ? filters[statusFilterKey] : void 0, entryValues = indexEntries.filter((entry) => {
- let statuses = allStatuses[entry.id] ?? {};
- return statusFilterFn && !statusFilterFn({ ...entry, statuses }) && !indexEntries.filter((item) => "parent" in item && item.parent === entry.id).some(
- (child) => statusFilterFn({ ...child, statuses: allStatuses[child.id] ?? {} })
- ) ? !1 : Object.values(statuses).some(({ value }) => value === "status-value:error") || filterFunctions.every((fn4) => fn4({ ...entry, statuses })) ? !0 : indexEntries.filter((item) => "parent" in item && item.parent === entry.id).some((child) => filterFunctions.every((fn4) => fn4({ ...child, statuses })));
- }), { sidebar = {} } = provider.getConfig(), { showRoots, collapsedRoots = [], renderLabel } = sidebar, setShowRoots = typeof showRoots < "u", storiesHashOutOfOrder = entryValues.reduce((acc, item) => {
- if (docsOptions.docsMode && item.type !== "docs")
- return acc;
- let { title } = item, groups = title.trim().split(TITLE_PATH_SEPARATOR), root2 = (!setShowRoots || showRoots) && groups.length > 1 ? [groups.shift()] : [], names = [...root2, ...groups], paths = names.reduce((list, name, idx) => {
- let parent = idx > 0 && list[idx - 1], id = sanitize(parent ? `${parent}-${name}` : name);
- if (name.trim() === "")
- throw new Error(dedent`Invalid title ${title} ending in slash.`);
- if (parent === id)
- throw new Error(
- dedent`
- Invalid part '${name}', leading to id === parentId ('${id}'), inside title '${title}'
-
- Did you create a path that uses the separator char accidentally, such as 'Vue <docs/>' where '/' is a separator char? See https://github.com/storybookjs/storybook/issues/6128
- `
- );
- return list.push(id), list;
- }, []);
- return paths.forEach((id, idx) => {
- let childId = paths[idx + 1] || item.id;
- root2.length && idx === 0 ? acc[id] = merge_default(acc[id] || {}, {
- type: "root",
- id,
- name: names[idx],
- tags: [],
- depth: idx,
- renderLabel,
- startCollapsed: collapsedRoots.includes(id),
- // Note that this will later get appended to the previous list of children (see below)
- children: [childId]
- }) : (!acc[id] || acc[id].type === "component") && idx === paths.length - 1 ? acc[id] = merge_default(acc[id] || {}, {
- type: "component",
- id,
- name: names[idx],
- tags: [],
- parent: paths[idx - 1],
- depth: idx,
- renderLabel,
- ...childId && {
- children: [childId]
- }
- }) : acc[id] = merge_default(acc[id] || {}, {
- type: "group",
- id,
- name: names[idx],
- tags: [],
- parent: paths[idx - 1],
- depth: idx,
- renderLabel,
- ...childId && {
- children: [childId]
- }
- });
- }), acc[item.id] = {
- tags: [],
- ...item,
- depth: paths.length,
- parent: "parent" in item ? item.parent : paths[paths.length - 1],
- renderLabel,
- prepared: !!item.parameters
- }, acc;
- }, {});
- function addItem(acc, item) {
- if (acc[item.id] || (acc[item.id] = item, "children" in item && item.children && (item.children.forEach((childId) => addItem(acc, storiesHashOutOfOrder[childId])), item.tags = item.children.reduce((currentTags, childId) => currentTags === null ? acc[childId].tags : intersect_default(currentTags, acc[childId].tags), null) || [])), item.type === "component") {
- let firstChild = acc[item.children[0]];
- firstChild && "importPath" in firstChild && (item.importPath = firstChild.importPath);
- }
- return acc;
- }
- let storiesHash = Object.values(storiesHashOutOfOrder).filter((i) => i.type !== "root" && !i.parent).reduce((acc, item) => addItem(acc, item), {});
- return storiesHash = Object.values(storiesHashOutOfOrder).filter((i) => i.type === "root").reduce(addItem, storiesHash), storiesHash = Object.values(storiesHash).reduce((acc, item) => {
- if (item.type === "story" && item.subtype === "test") {
- let story = acc[item.parent], component = acc[story.parent];
- acc[component.id] = {
- ...component,
- // Remove test from the component node as it will be attached to the story node instead
- children: component.children && component.children.filter((id) => id !== item.id)
- }, acc[story.id] = {
- ...story,
- // Add test to the story node
- children: (story.children || []).concat(item.id)
- }, acc[item.id] = {
- ...item,
- depth: item.depth + 1
- };
- } else
- acc[item.id] = item;
- return acc;
- }, {}), storiesHash;
- }, addPreparedStories = (newHash, oldHash) => oldHash ? Object.fromEntries(
- Object.entries(newHash).map(([id, newEntry]) => {
- let oldEntry = oldHash[id];
- return newEntry.type === "story" && oldEntry?.type === "story" && oldEntry.prepared ? ("children" in oldEntry && delete oldEntry.children, [id, { ...oldEntry, ...newEntry, prepared: !0 }]) : [id, newEntry];
- })
- ) : newHash, getComponentLookupList = (0, import_memoizerific6.default)(1)((hash4) => Object.entries(hash4).reduce((acc, i) => {
- let value = i[1];
- return value.type === "component" && acc.push([...value.children]), acc;
- }, [])), getStoriesLookupList = (0, import_memoizerific6.default)(1)((hash4) => Object.keys(hash4).filter((k) => ["story", "docs"].includes(hash4[k].type)));
-
- // src/manager-api/modules/refs.ts
- var { location: location3, fetch: fetch2 } = scope, getSourceType = (source, refId) => {
- let { origin: localOrigin, pathname: localPathname } = location3, { origin: sourceOrigin, pathname: sourcePathname } = new URL(source), localFull = `${localOrigin + localPathname}`.replace(/\/[^\/]*$/, ""), sourceFull = `${sourceOrigin + sourcePathname}`.replace(/\/[^\/]*$/, "");
- return localFull === sourceFull ? ["local", sourceFull] : refId || source ? ["external", sourceFull] : [null, null];
- }, defaultStoryMapper = (b, a3) => ({ ...a3, kind: a3.kind.replace("|", "/") }), addRefIds = (input2, ref) => Object.entries(input2).reduce((acc, [id, item]) => ({ ...acc, [id]: { ...item, refId: ref.id } }), {});
- async function handleRequest(request) {
- if (!request)
- return {};
- try {
- let response = await request;
- if (response === !1 || response === !0)
- throw new Error("Unexpected boolean response");
- if (!response.ok) {
- if (response.status === 401)
- try {
- let json4 = await response.json();
- if (json4.loginUrl)
- return { loginUrl: json4.loginUrl };
- } catch {
- }
- throw new Error(`Unexpected response not OK: ${response.statusText}`);
- }
- let json3 = await response.json();
- return json3.entries || json3.stories ? { storyIndex: json3 } : json3;
- } catch (err) {
- return { indexError: err };
- }
- }
- var parseUrl = (url) => {
- let credentialsRegex = /https?:\/\/(.+:.+)@/, cleanUrl = url, authorization, [, credentials] = url.match(credentialsRegex) || [];
- return credentials && (cleanUrl = url.replace(`${credentials}@`, ""), authorization = btoa(`${credentials}`)), {
- url: cleanUrl,
- authorization
- };
- }, map = (input2, ref, options) => {
- let { storyMapper } = options;
- return storyMapper ? Object.entries(input2).reduce((acc, [id, item]) => ({ ...acc, [id]: storyMapper(ref, item) }), {}) : input2;
- }, init4 = ({ store: store2, provider, singleStory, docsOptions = {} }, { runCheck = !0 } = {}) => {
- let api = {
- findRef: (source) => {
- let refs2 = api.getRefs();
- return Object.values(refs2).find(({ url }) => url.match(source));
- },
- changeRefVersion: async (id, url) => {
- let { versions, title } = api.getRefs()[id], ref = {
- id,
- url,
- versions,
- title,
- index: {},
- filteredIndex: {},
- expanded: !0
- };
- await api.setRef(id, { ...ref, type: "unknown" }, !1), await api.checkRef(ref);
- },
- changeRefState: (id, previewInitialized) => {
- let { [id]: ref, ...updated } = api.getRefs();
- updated[id] = { ...ref, previewInitialized }, store2.setState({
- refs: updated
- });
- },
- checkRef: async (ref) => {
- let { id, url, version: version2, type: type5 } = ref, isPublic = type5 === "server-checked", loadedData = {}, query = version2 ? `?version=${version2}` : "", credentials = isPublic ? "omit" : "include", urlParseResult = parseUrl(url), headers = {
- Accept: "application/json"
- };
- urlParseResult.authorization && Object.assign(headers, {
- Authorization: `Basic ${urlParseResult.authorization}`
- });
- let [indexResult, storiesResult] = await Promise.all(
- ["index.json", "stories.json"].map(
- async (file) => handleRequest(
- fetch2(`${urlParseResult.url}/${file}${query}`, {
- headers,
- credentials
- })
- )
- )
- );
- if (!indexResult.indexError || !storiesResult.indexError) {
- let metadata = await handleRequest(
- fetch2(`${urlParseResult.url}/metadata.json${query}`, {
- headers,
- credentials,
- cache: "no-cache"
- }).catch(() => !1)
- );
- Object.assign(loadedData, {
- ...indexResult.indexError ? storiesResult : indexResult,
- ...!metadata.indexError && metadata
- });
- } else isPublic || (loadedData.indexError = {
- message: dedent`
- Error: Loading of ref failed
- at fetch (lib/api/src/modules/refs.ts)
-
- URL: ${urlParseResult.url}
-
- We weren't able to load the above URL,
- it's possible a CORS error happened.
-
- Please check your dev-tools network tab.
- `
- });
- let versions = ref.versions && Object.keys(ref.versions).length ? ref.versions : loadedData.versions;
- await api.setRef(id, {
- id,
- url: urlParseResult.url,
- ...loadedData,
- ...versions ? { versions } : {},
- type: loadedData.storyIndex ? "lazy" : "auto-inject"
- });
- },
- getRefs: () => {
- let { refs: refs2 = {} } = store2.getState();
- return refs2;
- },
- setRef: async (id, { storyIndex, setStoriesData, ...rest }, ready = !1) => {
- if (singleStory)
- return;
- let internal_index, index4, filteredIndex, { filters } = store2.getState(), { storyMapper = defaultStoryMapper } = provider.getConfig(), ref = api.getRefs()[id];
- (storyIndex || setStoriesData) && (internal_index = setStoriesData ? transformSetStoriesStoryDataToPreparedStoryIndex(
- map(setStoriesData, ref, { storyMapper })
- ) : storyIndex, filteredIndex = transformStoryIndexToStoriesHash(storyIndex, {
- provider,
- docsOptions,
- filters,
- allStatuses: {}
- }), index4 = transformStoryIndexToStoriesHash(storyIndex, {
- provider,
- docsOptions,
- filters: {},
- allStatuses: {}
- })), index4 && (index4 = addRefIds(index4, ref)), filteredIndex && (filteredIndex = addRefIds(filteredIndex, ref)), await api.updateRef(id, { ...ref, ...rest, index: index4, filteredIndex, internal_index });
- },
- updateRef: async (id, data) => {
- let { [id]: ref, ...updated } = api.getRefs();
- updated[id] = { ...ref, ...data };
- let ordered = Object.keys(initialState2).reduce((obj, key) => (obj[key] = updated[key], obj), {});
- await store2.setState({
- refs: ordered
- });
- }
- }, refs = !singleStory && scope.REFS || {}, initialState2 = refs;
- return runCheck && new Promise(async (resolve) => {
- for (let ref of Object.values(refs))
- await api.checkRef({ ...ref, stories: {} });
- resolve(void 0);
- }), {
- api,
- state: {
- refs: initialState2
- }
- };
- };
-
- // src/manager-api/lib/events.ts
- var getEventMetadata = (context, fullAPI) => {
- let { source, refId, type: type5 } = context, [sourceType, sourceLocation] = getSourceType(source, refId), ref;
- (refId || sourceType === "external") && (ref = refId && fullAPI.getRefs()[refId] ? fullAPI.getRefs()[refId] : fullAPI.findRef(sourceLocation));
- let meta = {
- source,
- sourceType,
- sourceLocation,
- refId,
- ref,
- type: type5
- };
- switch (!0) {
- case typeof refId == "string":
- case sourceType === "local":
- case sourceType === "external":
- return meta;
- // if we couldn't find the source, something risky happened, we ignore the input, and log a warning
- default:
- return logger.warn(`Received a ${type5} frame that was not configured as a ref`), null;
- }
- };
-
- // src/manager-api/modules/globals.ts
- var init5 = ({ store: store2, fullAPI, provider }) => {
- let api = {
- getGlobals() {
- return store2.getState().globals;
- },
- getUserGlobals() {
- return store2.getState().userGlobals;
- },
- getStoryGlobals() {
- return store2.getState().storyGlobals;
- },
- getGlobalTypes() {
- return store2.getState().globalTypes;
- },
- updateGlobals(newGlobals) {
- provider.channel?.emit(UPDATE_GLOBALS, {
- globals: newGlobals,
- options: {
- target: "storybook-preview-iframe"
- }
- });
- }
- }, state3 = {
- globals: {},
- userGlobals: {},
- storyGlobals: {},
- globalTypes: {}
- }, updateGlobals = ({
- globals,
- storyGlobals,
- userGlobals
- }) => {
- let {
- globals: currentGlobals,
- userGlobals: currentUserGlobals,
- storyGlobals: currentStoryGlobals
- } = store2.getState();
- dequal(globals, currentGlobals) || store2.setState({ globals }), dequal(userGlobals, currentUserGlobals) || store2.setState({ userGlobals }), dequal(storyGlobals, currentStoryGlobals) || store2.setState({ storyGlobals });
- };
- return provider.channel?.on(
- GLOBALS_UPDATED,
- function({ globals, storyGlobals, userGlobals }) {
- let { ref } = getEventMetadata(this, fullAPI);
- ref ? logger.warn(
- "received a GLOBALS_UPDATED from a non-local ref. This is not currently supported."
- ) : updateGlobals({ globals, storyGlobals, userGlobals });
- }
- ), provider.channel?.on(
- SET_GLOBALS,
- function({ globals, globalTypes }) {
- let { ref } = getEventMetadata(this, fullAPI), currentUserGlobals = store2.getState()?.userGlobals;
- ref ? Object.keys(globals).length > 0 && logger.warn("received globals from a non-local ref. This is not currently supported.") : store2.setState({ globals, userGlobals: globals, globalTypes }), currentUserGlobals && Object.keys(currentUserGlobals).length !== 0 && !dequal(globals, currentUserGlobals) && api.updateGlobals(currentUserGlobals);
- }
- ), {
- api,
- state: state3
- };
- };
-
- // src/manager-api/modules/layout.ts
- var layout_exports = {};
- __export(layout_exports, {
- ActiveTabs: () => ActiveTabs,
- DEFAULT_BOTTOM_PANEL_HEIGHT: () => DEFAULT_BOTTOM_PANEL_HEIGHT,
- DEFAULT_NAV_SIZE: () => DEFAULT_NAV_SIZE,
- DEFAULT_RIGHT_PANEL_WIDTH: () => DEFAULT_RIGHT_PANEL_WIDTH,
- focusableUIElements: () => focusableUIElements,
- getDefaultLayoutState: () => getDefaultLayoutState,
- init: () => init6
- });
- init_dist();
- init_create();
- var { document: document8 } = scope, isFunction4 = (val) => typeof val == "function", ActiveTabs = {
- SIDEBAR: "sidebar",
- CANVAS: "canvas",
- ADDONS: "addons"
- }, DEFAULT_NAV_SIZE = 300, DEFAULT_BOTTOM_PANEL_HEIGHT = 300, DEFAULT_RIGHT_PANEL_WIDTH = 400, getDefaultLayoutState = () => ({
- ui: {
- enableShortcuts: !0
- },
- layout: {
- initialActive: ActiveTabs.CANVAS,
- showToolbar: !0,
- navSize: DEFAULT_NAV_SIZE,
- bottomPanelHeight: DEFAULT_BOTTOM_PANEL_HEIGHT,
- rightPanelWidth: DEFAULT_RIGHT_PANEL_WIDTH,
- recentVisibleSizes: {
- navSize: DEFAULT_NAV_SIZE,
- bottomPanelHeight: DEFAULT_BOTTOM_PANEL_HEIGHT,
- rightPanelWidth: DEFAULT_RIGHT_PANEL_WIDTH
- },
- panelPosition: "bottom",
- showTabs: !0
- },
- layoutCustomisations: {
- showSidebar: void 0,
- showToolbar: void 0
- },
- selectedPanel: void 0,
- theme: create()
- }), focusableUIElements = {
- addonPanel: "storybook-panel-region",
- storySearchField: "storybook-explorer-searchfield",
- storyListMenu: "storybook-explorer-menu",
- storyPanelRoot: "storybook-panel-root",
- showAddonPanel: "storybook-show-addon-panel",
- sidebarRegion: "storybook-sidebar-region",
- showSidebar: "storybook-show-sidebar"
- }, getIsNavShown = (state3) => state3.layout.navSize > 0, getIsPanelShown = (state3) => {
- let { bottomPanelHeight, rightPanelWidth, panelPosition } = state3.layout;
- return panelPosition === "bottom" && bottomPanelHeight > 0 || panelPosition === "right" && rightPanelWidth > 0;
- }, getIsFullscreen = (state3) => !getIsNavShown(state3) && !getIsPanelShown(state3), getRecentVisibleSizes = (layoutState) => ({
- navSize: layoutState.navSize > 0 ? layoutState.navSize : layoutState.recentVisibleSizes.navSize,
- bottomPanelHeight: layoutState.bottomPanelHeight > 0 ? layoutState.bottomPanelHeight : layoutState.recentVisibleSizes.bottomPanelHeight,
- rightPanelWidth: layoutState.rightPanelWidth > 0 ? layoutState.rightPanelWidth : layoutState.recentVisibleSizes.rightPanelWidth
- }), init6 = ({ store: store2, provider, singleStory }) => {
- let api = {
- toggleFullscreen(nextState) {
- return store2.setState(
- (state3) => {
- let isFullscreen = getIsFullscreen(state3), shouldFullscreen = typeof nextState == "boolean" ? nextState : !isFullscreen;
- return shouldFullscreen === isFullscreen ? { layout: state3.layout } : shouldFullscreen ? {
- layout: {
- ...state3.layout,
- navSize: 0,
- bottomPanelHeight: 0,
- rightPanelWidth: 0,
- recentVisibleSizes: getRecentVisibleSizes(state3.layout)
- }
- } : {
- layout: {
- ...state3.layout,
- navSize: state3.singleStory ? 0 : state3.layout.recentVisibleSizes.navSize,
- bottomPanelHeight: state3.layout.recentVisibleSizes.bottomPanelHeight,
- rightPanelWidth: state3.layout.recentVisibleSizes.rightPanelWidth
- }
- };
- },
- { persistence: "session" }
- );
- },
- togglePanel(nextState) {
- return store2.setState(
- (state3) => {
- let isPanelShown = getIsPanelShown(state3), shouldShowPanel = typeof nextState == "boolean" ? nextState : !isPanelShown;
- return shouldShowPanel === isPanelShown ? { layout: state3.layout } : shouldShowPanel ? {
- layout: {
- ...state3.layout,
- bottomPanelHeight: state3.layout.recentVisibleSizes.bottomPanelHeight,
- rightPanelWidth: state3.layout.recentVisibleSizes.rightPanelWidth
- }
- } : {
- layout: {
- ...state3.layout,
- bottomPanelHeight: 0,
- rightPanelWidth: 0,
- recentVisibleSizes: getRecentVisibleSizes(state3.layout)
- }
- };
- },
- { persistence: "session" }
- );
- },
- togglePanelPosition(position2) {
- return store2.setState(
- (state3) => {
- let nextPosition = position2 || (state3.layout.panelPosition === "right" ? "bottom" : "right");
- return {
- layout: {
- ...state3.layout,
- panelPosition: nextPosition,
- bottomPanelHeight: state3.layout.recentVisibleSizes.bottomPanelHeight,
- rightPanelWidth: state3.layout.recentVisibleSizes.rightPanelWidth
- }
- };
- },
- { persistence: "permanent" }
- );
- },
- toggleNav(nextState) {
- return store2.setState(
- (state3) => {
- if (state3.singleStory)
- return { layout: state3.layout };
- let isNavShown = getIsNavShown(state3), shouldShowNav = typeof nextState == "boolean" ? nextState : !isNavShown;
- return shouldShowNav === isNavShown ? { layout: state3.layout } : shouldShowNav ? {
- layout: {
- ...state3.layout,
- navSize: state3.layout.recentVisibleSizes.navSize
- }
- } : {
- layout: {
- ...state3.layout,
- navSize: 0,
- recentVisibleSizes: getRecentVisibleSizes(state3.layout)
- }
- };
- },
- { persistence: "session" }
- );
- },
- toggleToolbar(toggled) {
- return store2.setState(
- (state3) => {
- let value = typeof toggled < "u" ? toggled : !state3.layout.showToolbar;
- return {
- layout: {
- ...state3.layout,
- showToolbar: value
- }
- };
- },
- { persistence: "session" }
- );
- },
- setSizes({
- navSize,
- bottomPanelHeight,
- rightPanelWidth
- }) {
- return store2.setState(
- (state3) => {
- let nextLayoutState = {
- ...state3.layout,
- navSize: navSize ?? state3.layout.navSize,
- bottomPanelHeight: bottomPanelHeight ?? state3.layout.bottomPanelHeight,
- rightPanelWidth: rightPanelWidth ?? state3.layout.rightPanelWidth
- };
- return {
- layout: {
- ...nextLayoutState,
- recentVisibleSizes: getRecentVisibleSizes(nextLayoutState)
- }
- };
- },
- { persistence: "session" }
- );
- },
- /**
- * Attempts to focus (and select) an element identified by its ID. It is the responsibility of
- * the callee to ensure that the element is present in the DOM and that no focus trap is
- * available. When polling is enabled, this API polls and attempts to perform the focus for a
- * set duration (max 500ms), so that race conditions can be avoided with the current API
- * design.
- *
- * @param elementId The id of the element to focus.
- * @param options When a boolean, treated as the `select` option for backwards compatibility.
- * When an object, may contain `select` and `poll` options.
- * @returns Whether the element was successfully focused. Returns a Promise when polling.
- */
- focusOnUIElement(elementId, options) {
- let {
- forceFocus = !1,
- select = !1,
- poll = !0
- } = typeof options == "boolean" ? { select: options } : options ?? {};
- if (!elementId)
- return !1;
- let attemptFocus = () => {
- let element = document8.getElementById(elementId);
- return !element || (element.focus(), element !== document8.activeElement && forceFocus && element.getAttribute("tabindex") === null && (element.setAttribute("tabindex", "-1"), element.focus()), element !== document8.activeElement && element.id !== document8.activeElement?.id) ? !1 : (select && element.select?.(), !0);
- };
- return attemptFocus() ? !0 : poll ? new Promise((resolve) => {
- let startTime = Date.now(), maxDuration = 500, intervalId = setInterval(() => {
- let elapsed = Date.now() - startTime;
- if (attemptFocus()) {
- clearInterval(intervalId), resolve(!0);
- return;
- }
- elapsed >= maxDuration && (clearInterval(intervalId), resolve(!1));
- }, 50);
- }) : !1;
- },
- getInitialOptions() {
- let { theme: theme3, selectedPanel, layoutCustomisations, ...options } = provider.getConfig(), defaultLayoutState = getDefaultLayoutState();
- return {
- ...defaultLayoutState,
- layout: {
- ...toMerged(
- defaultLayoutState.layout,
- pick(options, Object.keys(defaultLayoutState.layout))
- ),
- ...singleStory && { navSize: 0 }
- },
- layoutCustomisations: {
- ...defaultLayoutState.layoutCustomisations,
- ...layoutCustomisations ?? {}
- },
- ui: toMerged(defaultLayoutState.ui, pick(options, Object.keys(defaultLayoutState.ui))),
- selectedPanel: selectedPanel || defaultLayoutState.selectedPanel,
- theme: theme3 || defaultLayoutState.theme
- };
- },
- getIsFullscreen() {
- return getIsFullscreen(store2.getState());
- },
- getIsPanelShown() {
- return getIsPanelShown(store2.getState());
- },
- getIsNavShown() {
- return getIsNavShown(store2.getState());
- },
- getShowToolbarWithCustomisations(showToolbar) {
- let state3 = store2.getState();
- return isFunction4(state3.layoutCustomisations.showToolbar) ? state3.layoutCustomisations.showToolbar(state3, showToolbar) ?? showToolbar : showToolbar;
- },
- getShowPanelWithCustomisations(showPanel) {
- let state3 = store2.getState();
- return isFunction4(state3.layoutCustomisations.showPanel) ? state3.layoutCustomisations.showPanel(state3, showPanel) ?? showPanel : showPanel;
- },
- getNavSizeWithCustomisations(navSize) {
- let state3 = store2.getState();
- if (isFunction4(state3.layoutCustomisations.showSidebar)) {
- let shouldShowNav = state3.layoutCustomisations.showSidebar(state3, navSize !== 0);
- if (navSize === 0 && shouldShowNav === !0)
- return state3.layout.recentVisibleSizes.navSize;
- if (navSize !== 0 && shouldShowNav === !1)
- return 0;
- }
- return navSize;
- },
- setOptions: (options) => {
- let { layout, ui, selectedPanel, theme: theme3 } = store2.getState();
- if (!options)
- return;
- let updatedLayout = {
- ...layout,
- ...options.layout || {},
- ...pick(options, Object.keys(layout)),
- ...singleStory && { navSize: 0 }
- }, updatedUi = {
- ...ui,
- ...options.ui,
- ...toMerged(options.ui || {}, pick(options, Object.keys(ui)))
- }, updatedTheme = {
- ...theme3,
- ...options.theme
- }, modification = {};
- isEqual(ui, updatedUi) || (modification.ui = updatedUi), isEqual(layout, updatedLayout) || (modification.layout = updatedLayout), options.selectedPanel && !isEqual(selectedPanel, options.selectedPanel) && (modification.selectedPanel = options.selectedPanel), Object.keys(modification).length && store2.setState(modification, { persistence: "permanent" }), isEqual(theme3, updatedTheme) || store2.setState({ theme: updatedTheme });
- }
- }, persisted = pick(store2.getState(), ["layout", "selectedPanel"]);
- return provider.channel?.on(SET_CONFIG, () => {
- api.setOptions(merge_default(api.getInitialOptions(), persisted));
- }), {
- api,
- state: merge_default(api.getInitialOptions(), persisted)
- };
- };
-
- // src/manager-api/modules/notifications.ts
- var notifications_exports = {};
- __export(notifications_exports, {
- init: () => init7
- });
- var init7 = ({ store: store2 }) => ({
- api: {
- addNotification: (newNotification) => {
- store2.setState(({ notifications }) => {
- let [existing, others] = partition(notifications, (n) => n.id === newNotification.id);
- return existing.forEach((notification) => {
- notification.onClear && notification.onClear({ dismissed: !1, timeout: !1 });
- }), { notifications: [...others, newNotification] };
- });
- },
- clearNotification: (notificationId) => {
- store2.setState(({ notifications }) => {
- let [matching, others] = partition(notifications, (n) => n.id === notificationId);
- return matching.forEach((notification) => {
- notification.onClear && notification.onClear({ dismissed: !1, timeout: !1 });
- }), { notifications: others };
- });
- }
- },
- state: { notifications: [] }
- });
-
- // src/manager-api/modules/open-in-editor.tsx
- var open_in_editor_exports = {};
- __export(open_in_editor_exports, {
- init: () => init8
- });
- var import_react20 = __toESM(require_react(), 1);
- var init8 = ({ provider, fullAPI }) => ({
- api: {
- openInEditor(payload) {
- return new Promise((resolve) => {
- let { file, line: line2, column: column2 } = payload, handler = (res) => {
- res.file === file && res.line === line2 && res.column === column2 && (provider.channel?.off(OPEN_IN_EDITOR_RESPONSE, handler), resolve(res));
- };
- provider.channel?.on(OPEN_IN_EDITOR_RESPONSE, handler), provider.channel?.emit(OPEN_IN_EDITOR_REQUEST, payload);
- });
- }
- },
- state: { notifications: [] },
- init: async () => {
- let { color: color2 } = await Promise.resolve().then(() => (init_theming(), theming_exports));
- provider.channel?.on(OPEN_IN_EDITOR_RESPONSE, (payload) => {
- payload.error !== null && fullAPI.addNotification({
- id: "open-in-editor-error",
- content: {
- headline: "Failed to open in editor",
- subHeadline: payload.error || "Check the Storybook process on the command line for more details."
- },
- icon: import_react20.default.createElement(FailedIcon, { color: color2.negative }),
- duration: 8e3
- });
- });
- }
- });
-
- // src/manager-api/modules/provider.ts
- var provider_exports = {};
- __export(provider_exports, {
- init: () => init9
- });
- var init9 = ({ provider, fullAPI }) => ({
- api: provider.renderPreview ? { renderPreview: provider.renderPreview } : {},
- state: {},
- init: () => {
- provider.handleAPI(fullAPI);
- }
- });
-
- // src/manager-api/modules/settings.ts
- var settings_exports = {};
- __export(settings_exports, {
- init: () => init10
- });
- var init10 = ({ store: store2, navigate, fullAPI }) => ({
- state: { settings: { lastTrackedStoryId: null } },
- api: {
- closeSettings: () => {
- let {
- settings: { lastTrackedStoryId }
- } = store2.getState();
- lastTrackedStoryId ? fullAPI.selectStory(lastTrackedStoryId) : fullAPI.selectFirstStory();
- },
- changeSettingsTab: (path) => {
- navigate(`/settings/${path}`);
- },
- isSettingsScreenActive: () => {
- let { path } = fullAPI.getUrlState();
- return !!(path || "").match(/^\/settings/);
- },
- retrieveSelection() {
- let { settings } = store2.getState();
- return settings.lastTrackedStoryId;
- },
- storeSelection: async () => {
- let { storyId, settings } = store2.getState();
- await store2.setState({
- settings: { ...settings, lastTrackedStoryId: storyId }
- });
- }
- }
- });
-
- // src/manager-api/modules/shortcuts.ts
- var shortcuts_exports = {};
- __export(shortcuts_exports, {
- controlOrMetaKey: () => controlOrMetaKey2,
- defaultShortcuts: () => defaultShortcuts,
- init: () => init11,
- isMacLike: () => isMacLike2,
- keys: () => keys2
- });
- init_dist();
- var import_copy_to_clipboard = __toESM(require_copy_to_clipboard(), 1);
-
- // src/manager-api/lib/platform.ts
- init_dist();
- var { navigator: navigator2 } = scope, isMacLike = () => navigator2 && navigator2.platform ? !!navigator2.platform.match(/(Mac|iPhone|iPod|iPad)/i) : !1;
-
- // src/manager-api/lib/shortcut.ts
- var controlOrMetaSymbol = () => isMacLike() ? "\u2318" : "ctrl", controlOrMetaKey = () => isMacLike() ? "meta" : "control", optionOrAltSymbol = () => isMacLike() ? "\u2325" : "alt", isShortcutTaken = (arr1, arr2) => JSON.stringify(arr1) === JSON.stringify(arr2), eventToShortcut = (e) => {
- if (["Meta", "Alt", "Control", "Shift", "Tab"].includes(e.key))
- return null;
- let keys3 = [];
- e.altKey && keys3.push("alt"), e.ctrlKey && keys3.push("control"), e.metaKey && keys3.push("meta"), e.shiftKey && keys3.push("shift");
- let codeUpper = e.code?.toUpperCase(), codeToCharMap = {
- MINUS: "-",
- EQUAL: "=",
- BRACKETLEFT: "[",
- BRACKETRIGHT: "]",
- BACKSLASH: "\\",
- SEMICOLON: ";",
- QUOTE: "'",
- BACKQUOTE: "`",
- COMMA: ",",
- PERIOD: ".",
- SLASH: "/"
- }, codeChar = codeUpper ? codeUpper.startsWith("KEY") && codeUpper.length === 4 ? codeUpper.replace("KEY", "") : codeUpper.startsWith("DIGIT") ? codeUpper.replace("DIGIT", "") : codeToCharMap[codeUpper] : void 0;
- if (e.key && e.key.length === 1 && e.key !== " ") {
- let key = e.key.toUpperCase(), code = codeChar;
- code && code.length === 1 && code !== key ? keys3.push([key, code]) : keys3.push(key);
- } else e.key === "Dead" && codeChar && keys3.push(codeChar);
- return e.key === " " && keys3.push("space"), e.key === "Escape" && keys3.push("escape"), e.key === "ArrowRight" && keys3.push("ArrowRight"), e.key === "ArrowDown" && keys3.push("ArrowDown"), e.key === "ArrowUp" && keys3.push("ArrowUp"), e.key === "ArrowLeft" && keys3.push("ArrowLeft"), keys3.length > 0 ? keys3 : null;
- }, shortcutMatchesShortcut = (inputShortcut, shortcut) => !inputShortcut || !shortcut || (inputShortcut.join("").startsWith("shift/") && inputShortcut.shift(), inputShortcut.length !== shortcut.length) ? !1 : !inputShortcut.find(
- (input2, i) => Array.isArray(input2) ? !input2.includes(shortcut[i]) : input2 !== shortcut[i]
- ), eventMatchesShortcut = (e, shortcut) => shortcutMatchesShortcut(eventToShortcut(e), shortcut), keyToSymbol = (key) => key === "alt" ? optionOrAltSymbol() : key === "control" ? "\u2303" : key === "meta" ? "\u2318" : key === "shift" ? "\u21E7\u200B" : key === "Enter" || key === "Backspace" || key === "Esc" || key === "escape" ? "" : key === " " ? "SPACE" : key === "ArrowUp" ? "\u2191" : key === "ArrowDown" ? "\u2193" : key === "ArrowLeft" ? "\u2190" : key === "ArrowRight" ? "\u2192" : key?.toUpperCase(), shortcutToHumanString = (shortcut) => shortcut.map(keyToSymbol).join(" "), shortcutToAriaKeyshortcuts = (shortcut) => shortcut.map((shortcut2) => shortcut2 === "+" ? "plus" : shortcut2 === " " ? "space" : shortcut2).join("+");
-
- // src/manager-api/modules/shortcuts.ts
- var { navigator: navigator3, document: document9 } = scope;
- function wasFocusInElement(element) {
- return document9.activeElement && element?.contains(document9.activeElement);
- }
- var isMacLike2 = () => navigator3 && navigator3.platform ? !!navigator3.platform.match(/(Mac|iPhone|iPod|iPad)/i) : !1, controlOrMetaKey2 = () => isMacLike2() ? "meta" : "control";
- function keys2(o) {
- return Object.keys(o);
- }
- var defaultShortcuts = Object.freeze({
- fullScreen: ["alt", "F"],
- togglePanel: ["alt", "A"],
- panelPosition: ["alt", "D"],
- toggleNav: ["alt", "S"],
- toolbar: ["alt", "T"],
- search: [controlOrMetaKey2(), "K"],
- focusNav: ["1"],
- focusIframe: ["2"],
- focusPanel: ["3"],
- prevComponent: ["alt", "ArrowUp"],
- nextComponent: ["alt", "ArrowDown"],
- prevStory: ["alt", "ArrowLeft"],
- nextStory: ["alt", "ArrowRight"],
- shortcutsPage: [controlOrMetaKey2(), "shift", ","],
- aboutPage: [controlOrMetaKey2(), ","],
- escape: ["escape"],
- // This one is not customizable
- collapseAll: [controlOrMetaKey2(), "shift", "ArrowUp"],
- expandAll: [controlOrMetaKey2(), "shift", "ArrowDown"],
- remount: ["alt", "R"],
- openInEditor: ["alt", "shift", "E"],
- openInIsolation: ["alt", "shift", "I"],
- copyStoryLink: ["alt", "shift", "L"],
- goToPreviousLandmark: ["shift", "F6"],
- // hardcoded in react-aria
- goToNextLandmark: ["F6"]
- // hardcoded in react-aria
- // TODO: bring this back once we want to add shortcuts for this
- // copyStoryName: ['alt', 'shift', 'C'],
- }), addonsShortcuts = {};
- function shouldSkipShortcut(event) {
- let target = event.target;
- return !!(/input|textarea/i.test(target.tagName) || target.getAttribute("contenteditable") !== null || target.closest("dialog[open]"));
- }
- var init11 = ({ store: store2, fullAPI, provider }) => {
- let api = {
- // Getting and setting shortcuts
- getShortcutKeys() {
- return store2.getState().shortcuts;
- },
- getDefaultShortcuts() {
- return {
- ...defaultShortcuts,
- ...api.getAddonsShortcutDefaults()
- };
- },
- getAddonsShortcuts() {
- return addonsShortcuts;
- },
- getAddonsShortcutLabels() {
- let labels = {};
- return Object.entries(api.getAddonsShortcuts()).forEach(([actionName, { label }]) => {
- labels[actionName] = label;
- }), labels;
- },
- getAddonsShortcutDefaults() {
- let defaults = {};
- return Object.entries(api.getAddonsShortcuts()).forEach(([actionName, { defaultShortcut }]) => {
- defaults[actionName] = defaultShortcut;
- }), defaults;
- },
- async setShortcuts(update2) {
- let { shortcuts } = await store2.setState(
- (state4) => ({ shortcuts: typeof update2 == "function" ? update2(state4.shortcuts) : update2 }),
- { persistence: "permanent" }
- );
- return shortcuts;
- },
- async restoreAllDefaultShortcuts() {
- return api.setShortcuts(api.getDefaultShortcuts());
- },
- async setShortcut(action2, value) {
- return await api.setShortcuts((shortcuts) => ({ ...shortcuts, [action2]: value })), value;
- },
- async setAddonShortcut(addon, shortcut) {
- return await api.setShortcuts((shortcuts) => ({
- ...shortcuts,
- [`${addon}-${shortcut.actionName}`]: shortcut.defaultShortcut
- })), addonsShortcuts[`${addon}-${shortcut.actionName}`] = shortcut, shortcut;
- },
- async restoreDefaultShortcut(action2) {
- let defaultShortcut = api.getDefaultShortcuts()[action2];
- return api.setShortcut(action2, defaultShortcut);
- },
- // Listening to shortcut events
- handleKeydownEvent(event) {
- let shortcut = eventToShortcut(event), shortcuts = api.getShortcutKeys(), matchedFeature = keys2(shortcuts).find(
- (feature) => shortcutMatchesShortcut(shortcut, shortcuts[feature])
- );
- matchedFeature && api.handleShortcutFeature(matchedFeature, event);
- },
- // warning: event might not have a full prototype chain because it may originate from the channel
- handleShortcutFeature(feature, event) {
- let {
- ui: { enableShortcuts },
- storyId,
- refId,
- viewMode
- } = store2.getState();
- if (enableShortcuts)
- switch (event?.preventDefault && event.preventDefault(), feature) {
- case "escape": {
- fullAPI.getIsFullscreen() ? fullAPI.toggleFullscreen(!1) : fullAPI.getIsNavShown() && fullAPI.toggleNav(!0);
- break;
- }
- // Handled by @react-aria/interactions and useLandmarkIndicator
- case "goToNextLandmark":
- case "goToPreviousLandmark":
- break;
- case "focusNav": {
- fullAPI.getIsFullscreen() && fullAPI.toggleFullscreen(!1), fullAPI.getIsNavShown() || fullAPI.toggleNav(!0), fullAPI.focusOnUIElement(focusableUIElements.storyListMenu);
- break;
- }
- case "search": {
- fullAPI.getIsFullscreen() && fullAPI.toggleFullscreen(!1), fullAPI.getIsNavShown() || fullAPI.toggleNav(!0), setTimeout(() => {
- fullAPI.focusOnUIElement(focusableUIElements.storySearchField, !0);
- }, 0);
- break;
- }
- case "focusIframe": {
- let element = document9.getElementById("storybook-preview-iframe");
- if (element)
- try {
- element.contentWindow.focus();
- } catch {
- }
- break;
- }
- case "focusPanel": {
- fullAPI.getIsFullscreen() && fullAPI.toggleFullscreen(!1), fullAPI.getIsPanelShown() || fullAPI.togglePanel(!0), fullAPI.focusOnUIElement(focusableUIElements.storyPanelRoot);
- break;
- }
- case "nextStory": {
- fullAPI.jumpToStory(1);
- break;
- }
- case "prevStory": {
- fullAPI.jumpToStory(-1);
- break;
- }
- case "nextComponent": {
- fullAPI.jumpToComponent(1);
- break;
- }
- case "prevComponent": {
- fullAPI.jumpToComponent(-1);
- break;
- }
- case "fullScreen": {
- fullAPI.toggleFullscreen();
- break;
- }
- case "togglePanel": {
- let wasPanelShown = fullAPI.getIsPanelShown(), panelElement = document9.getElementById(focusableUIElements.addonPanel);
- fullAPI.togglePanel(), wasPanelShown && wasFocusInElement(panelElement) && fullAPI.focusOnUIElement(focusableUIElements.showAddonPanel, {
- poll: !0
- }).then((success) => {
- success === !1 && document9.body.focus();
- }), wasPanelShown || fullAPI.focusOnUIElement(focusableUIElements.addonPanel, {
- forceFocus: !0,
- poll: !0
- });
- break;
- }
- case "toggleNav": {
- let wasNavShown = fullAPI.getIsNavShown(), sidebarElement = document9.getElementById(focusableUIElements.sidebarRegion);
- fullAPI.toggleNav(), wasNavShown && wasFocusInElement(sidebarElement) && fullAPI.focusOnUIElement(focusableUIElements.showSidebar, {
- poll: !0
- }).then((success) => {
- success === !1 && document9.body.focus();
- }), wasNavShown || fullAPI.focusOnUIElement(focusableUIElements.sidebarRegion, {
- forceFocus: !0,
- poll: !0
- });
- break;
- }
- case "toolbar": {
- fullAPI.toggleToolbar();
- break;
- }
- case "panelPosition": {
- fullAPI.getIsFullscreen() && fullAPI.toggleFullscreen(!1), fullAPI.getIsPanelShown() || fullAPI.togglePanel(!0), fullAPI.togglePanelPosition();
- break;
- }
- case "aboutPage": {
- fullAPI.navigate("/settings/about");
- break;
- }
- case "shortcutsPage": {
- fullAPI.navigate("/settings/shortcuts");
- break;
- }
- case "collapseAll": {
- fullAPI.emit(STORIES_COLLAPSE_ALL);
- break;
- }
- case "expandAll": {
- fullAPI.emit(STORIES_EXPAND_ALL);
- break;
- }
- case "remount": {
- fullAPI.emit(FORCE_REMOUNT, { storyId });
- break;
- }
- case "openInEditor": {
- scope.CONFIG_TYPE === "DEVELOPMENT" && fullAPI.openInEditor({
- file: fullAPI.getCurrentStoryData().importPath
- });
- break;
- }
- case "openInIsolation": {
- if (storyId && viewMode === "story") {
- let { previewHref } = fullAPI.getStoryHrefs(storyId, { refId });
- window.open(previewHref, "_blank", "noopener,noreferrer");
- }
- break;
- }
- // TODO: bring this back once we want to add shortcuts for this
- // case 'copyStoryName': {
- // const storyData = fullAPI.getCurrentStoryData();
- // if (storyData.type === 'story') {
- // copy(storyData.exportName);
- // }
- // break;
- // }
- case "copyStoryLink": {
- if (storyId) {
- let { managerHref } = fullAPI.getStoryHrefs(storyId, { refId });
- (0, import_copy_to_clipboard.default)(managerHref);
- }
- break;
- }
- default:
- addonsShortcuts[feature].action();
- break;
- }
- }
- }, { shortcuts: persistedShortcuts = defaultShortcuts } = store2.getState(), state3 = {
- // Any saved shortcuts that are still in our set of defaults
- shortcuts: keys2(defaultShortcuts).reduce(
- (acc, key) => ({ ...acc, [key]: persistedShortcuts[key] || defaultShortcuts[key] }),
- defaultShortcuts
- )
- };
- return { api, state: state3, init: () => {
- document9.addEventListener("keydown", (event) => {
- shouldSkipShortcut(event) || api.handleKeydownEvent(event);
- }), provider.channel?.on(PREVIEW_KEYDOWN, (data) => {
- api.handleKeydownEvent(data.event);
- });
- } };
- };
-
- // src/manager-api/modules/stories.ts
- var stories_exports = {};
- __export(stories_exports, {
- init: () => init12
- });
- init_client_logger();
-
- // src/router/index.ts
- var router_exports = {};
- __export(router_exports, {
- BaseLocationProvider: () => BaseLocationProvider,
- DEEPLY_EQUAL: () => DEEPLY_EQUAL2,
- Link: () => Link4,
- Location: () => Location,
- LocationProvider: () => LocationProvider,
- Match: () => Match,
- MemoryRouter: () => MemoryRouter2,
- Route: () => Route2,
- buildArgsParam: () => buildArgsParam,
- deepDiff: () => deepDiff2,
- getMatch: () => getMatch,
- parsePath: () => parsePath2,
- queryFromLocation: () => queryFromLocation,
- stringifyQuery: () => stringifyQuery,
- useNavigate: () => useNavigate2
- });
-
- // src/router/utils.ts
- init_client_logger();
- var import_memoizerific7 = __toESM(require_memoizerific(), 1), import_picoquery4 = __toESM(require_main(), 1);
- init_esm();
- var splitPathRegex = /\/([^/]+)\/(?:(.*)_)?([^/]+)?/, parsePath2 = (0, import_memoizerific7.default)(1e3)((path) => {
- let result = {
- viewMode: void 0,
- storyId: void 0,
- refId: void 0
- };
- if (path) {
- let [, viewMode, refId, storyId] = path.toLowerCase().match(splitPathRegex) || [];
- viewMode && Object.assign(result, {
- viewMode,
- storyId,
- refId
- });
- }
- return result;
- }), DEEPLY_EQUAL2 = Symbol("Deeply equal"), deepDiff2 = (value, update2) => {
- if (typeof value != typeof update2)
- return update2;
- if (isEqual(value, update2))
- return DEEPLY_EQUAL2;
- if (Array.isArray(value) && Array.isArray(update2)) {
- let res = update2.reduce((acc, upd, index4) => {
- let diff2 = deepDiff2(value[index4], upd);
- return diff2 !== DEEPLY_EQUAL2 && (acc[index4] = diff2), acc;
- }, new Array(update2.length));
- return update2.length >= value.length ? res : res.concat(new Array(value.length - update2.length).fill(void 0));
- }
- return isPlainObject(value) && isPlainObject(update2) ? Object.keys({ ...value, ...update2 }).reduce((acc, key) => {
- let diff2 = deepDiff2(value?.[key], update2?.[key]);
- return diff2 === DEEPLY_EQUAL2 ? acc : Object.assign(acc, { [key]: diff2 });
- }, {}) : update2;
- }, VALIDATION_REGEXP = /^[a-zA-Z0-9 _-]*$/, NUMBER_REGEXP = /^-?[0-9]+(\.[0-9]+)?$/, HEX_REGEXP = /^#([a-f0-9]{3,4}|[a-f0-9]{6}|[a-f0-9]{8})$/i, COLOR_REGEXP = /^(rgba?|hsla?)\(([0-9]{1,3}),\s?([0-9]{1,3})%?,\s?([0-9]{1,3})%?,?\s?([0-9](\.[0-9]{1,2})?)?\)$/i, validateArgs = (key = "", value) => key === null || key === "" || !VALIDATION_REGEXP.test(key) ? !1 : value == null || value instanceof Date || typeof value == "number" || typeof value == "boolean" ? !0 : typeof value == "string" ? VALIDATION_REGEXP.test(value) || NUMBER_REGEXP.test(value) || HEX_REGEXP.test(value) || COLOR_REGEXP.test(value) : Array.isArray(value) ? value.every((v) => validateArgs(key, v)) : isPlainObject(value) ? Object.entries(value).every(([k, v]) => validateArgs(k, v)) : !1, encodeSpecialValues = (value) => value === void 0 ? "!undefined" : value === null ? "!null" : typeof value == "string" ? HEX_REGEXP.test(value) ? `!hex(${value.slice(1)})` : COLOR_REGEXP.test(value) ? `!${value.replace(/[\s%]/g, "")}` : value : typeof value == "boolean" ? `!${value}` : value instanceof Date ? `!date(${value.toISOString()})` : Array.isArray(value) ? value.map(encodeSpecialValues) : isPlainObject(value) ? Object.entries(value).reduce(
- (acc, [key, val]) => Object.assign(acc, { [key]: encodeSpecialValues(val) }),
- {}
- ) : value, decodeKnownQueryChar = (chr) => {
- switch (chr) {
- case "%20":
- return "+";
- case "%5B":
- return "[";
- case "%5D":
- return "]";
- case "%2C":
- return ",";
- case "%3A":
- return ":";
- }
- return chr;
- }, knownQueryChar = /%[0-9A-F]{2}/g, buildArgsParam = (initialArgs, args) => {
- let update2 = deepDiff2(initialArgs, args);
- if (!update2 || update2 === DEEPLY_EQUAL2)
- return "";
- let object = Object.entries(update2).reduce((acc, [key, value]) => validateArgs(key, value) ? Object.assign(acc, { [key]: value }) : (once.warn(dedent`
- Omitted potentially unsafe URL args.
-
- More info: https://storybook.js.org/docs/writing-stories/args?ref=error#setting-args-through-the-url
- `), acc), {});
- return (0, import_picoquery4.stringify)(encodeSpecialValues(object), {
- delimiter: ";",
- // we don't actually create multiple query params
- nesting: !0,
- nestingSyntax: "js"
- // encode objects using dot notation: obj.key=val
- }).replace(knownQueryChar, decodeKnownQueryChar).split(";").map((part) => part.replace("=", ":")).join(";");
- }, queryFromString = (0, import_memoizerific7.default)(1e3)((s3) => s3 !== void 0 ? (0, import_picoquery4.parse)(s3) : {}), queryFromLocation = (location4) => queryFromString(location4?.search ? location4.search.slice(1) : ""), stringifyQuery = (query) => {
- let queryStr = (0, import_picoquery4.stringify)(query);
- return queryStr ? "?" + queryStr : "";
- }, getMatch = (0, import_memoizerific7.default)(1e3)((current, target, startsWith4 = !0) => {
- if (startsWith4) {
- if (typeof target != "string")
- throw new Error("startsWith only works with string targets");
- return current && current.startsWith(target) ? { path: current } : null;
- }
- let currentIsTarget = typeof target == "string" && current === target, matchTarget = current && target && current.match(target);
- return currentIsTarget || matchTarget ? { path: current } : null;
- });
-
- // src/router/router.tsx
- var import_react21 = __toESM(require_react(), 1);
- init_dist();
-
- // ../../node_modules/react-router-dom/dist/index.js
- var React31 = __toESM(require_react());
-
- // ../../node_modules/react-router/dist/index.js
- var React30 = __toESM(require_react());
-
- // ../../node_modules/@remix-run/router/dist/router.js
- function _extends2() {
- return _extends2 = Object.assign ? Object.assign.bind() : function(target) {
- for (var i = 1; i < arguments.length; i++) {
- var source = arguments[i];
- for (var key in source)
- Object.prototype.hasOwnProperty.call(source, key) && (target[key] = source[key]);
- }
- return target;
- }, _extends2.apply(this, arguments);
- }
- var Action;
- (function(Action2) {
- Action2.Pop = "POP", Action2.Push = "PUSH", Action2.Replace = "REPLACE";
- })(Action || (Action = {}));
- var PopStateEventType = "popstate";
- function createMemoryHistory(options) {
- options === void 0 && (options = {});
- let {
- initialEntries = ["/"],
- initialIndex,
- v5Compat = !1
- } = options, entries;
- entries = initialEntries.map((entry, index5) => createMemoryLocation(entry, typeof entry == "string" ? null : entry.state, index5 === 0 ? "default" : void 0));
- let index4 = clampIndex(initialIndex ?? entries.length - 1), action2 = Action.Pop, listener = null;
- function clampIndex(n) {
- return Math.min(Math.max(n, 0), entries.length - 1);
- }
- function getCurrentLocation() {
- return entries[index4];
- }
- function createMemoryLocation(to, state3, key) {
- state3 === void 0 && (state3 = null);
- let location4 = createLocation(entries ? getCurrentLocation().pathname : "/", to, state3, key);
- return warning(location4.pathname.charAt(0) === "/", "relative pathnames are not supported in memory history: " + JSON.stringify(to)), location4;
- }
- function createHref(to) {
- return typeof to == "string" ? to : createPath(to);
- }
- return {
- get index() {
- return index4;
- },
- get action() {
- return action2;
- },
- get location() {
- return getCurrentLocation();
- },
- createHref,
- createURL(to) {
- return new URL(createHref(to), "http://localhost");
- },
- encodeLocation(to) {
- let path = typeof to == "string" ? parsePath3(to) : to;
- return {
- pathname: path.pathname || "",
- search: path.search || "",
- hash: path.hash || ""
- };
- },
- push(to, state3) {
- action2 = Action.Push;
- let nextLocation = createMemoryLocation(to, state3);
- index4 += 1, entries.splice(index4, entries.length, nextLocation), v5Compat && listener && listener({
- action: action2,
- location: nextLocation,
- delta: 1
- });
- },
- replace(to, state3) {
- action2 = Action.Replace;
- let nextLocation = createMemoryLocation(to, state3);
- entries[index4] = nextLocation, v5Compat && listener && listener({
- action: action2,
- location: nextLocation,
- delta: 0
- });
- },
- go(delta) {
- action2 = Action.Pop;
- let nextIndex = clampIndex(index4 + delta), nextLocation = entries[nextIndex];
- index4 = nextIndex, listener && listener({
- action: action2,
- location: nextLocation,
- delta
- });
- },
- listen(fn4) {
- return listener = fn4, () => {
- listener = null;
- };
- }
- };
- }
- function createBrowserHistory(options) {
- options === void 0 && (options = {});
- function createBrowserLocation(window2, globalHistory) {
- let {
- pathname,
- search,
- hash: hash4
- } = window2.location;
- return createLocation(
- "",
- {
- pathname,
- search,
- hash: hash4
- },
- // state defaults to `null` because `window.history.state` does
- globalHistory.state && globalHistory.state.usr || null,
- globalHistory.state && globalHistory.state.key || "default"
- );
- }
- function createBrowserHref(window2, to) {
- return typeof to == "string" ? to : createPath(to);
- }
- return getUrlBasedHistory(createBrowserLocation, createBrowserHref, null, options);
- }
- function invariant2(value, message) {
- if (value === !1 || value === null || typeof value > "u")
- throw new Error(message);
- }
- function warning(cond, message) {
- if (!cond) {
- typeof console < "u" && console.warn(message);
- try {
- throw new Error(message);
- } catch {
- }
- }
- }
- function createKey() {
- return Math.random().toString(36).substr(2, 8);
- }
- function getHistoryState(location4, index4) {
- return {
- usr: location4.state,
- key: location4.key,
- idx: index4
- };
- }
- function createLocation(current, to, state3, key) {
- return state3 === void 0 && (state3 = null), _extends2({
- pathname: typeof current == "string" ? current : current.pathname,
- search: "",
- hash: ""
- }, typeof to == "string" ? parsePath3(to) : to, {
- state: state3,
- // TODO: This could be cleaned up. push/replace should probably just take
- // full Locations now and avoid the need to run through this flow at all
- // But that's a pretty big refactor to the current test suite so going to
- // keep as is for the time being and just let any incoming keys take precedence
- key: to && to.key || key || createKey()
- });
- }
- function createPath(_ref) {
- let {
- pathname = "/",
- search = "",
- hash: hash4 = ""
- } = _ref;
- return search && search !== "?" && (pathname += search.charAt(0) === "?" ? search : "?" + search), hash4 && hash4 !== "#" && (pathname += hash4.charAt(0) === "#" ? hash4 : "#" + hash4), pathname;
- }
- function parsePath3(path) {
- let parsedPath = {};
- if (path) {
- let hashIndex = path.indexOf("#");
- hashIndex >= 0 && (parsedPath.hash = path.substr(hashIndex), path = path.substr(0, hashIndex));
- let searchIndex = path.indexOf("?");
- searchIndex >= 0 && (parsedPath.search = path.substr(searchIndex), path = path.substr(0, searchIndex)), path && (parsedPath.pathname = path);
- }
- return parsedPath;
- }
- function getUrlBasedHistory(getLocation, createHref, validateLocation, options) {
- options === void 0 && (options = {});
- let {
- window: window2 = document.defaultView,
- v5Compat = !1
- } = options, globalHistory = window2.history, action2 = Action.Pop, listener = null, index4 = getIndex();
- index4 == null && (index4 = 0, globalHistory.replaceState(_extends2({}, globalHistory.state, {
- idx: index4
- }), ""));
- function getIndex() {
- return (globalHistory.state || {
- idx: null
- }).idx;
- }
- function handlePop() {
- action2 = Action.Pop;
- let nextIndex = getIndex(), delta = nextIndex == null ? null : nextIndex - index4;
- index4 = nextIndex, listener && listener({
- action: action2,
- location: history2.location,
- delta
- });
- }
- function push(to, state3) {
- action2 = Action.Push;
- let location4 = createLocation(history2.location, to, state3);
- validateLocation && validateLocation(location4, to), index4 = getIndex() + 1;
- let historyState = getHistoryState(location4, index4), url = history2.createHref(location4);
- try {
- globalHistory.pushState(historyState, "", url);
- } catch (error) {
- if (error instanceof DOMException && error.name === "DataCloneError")
- throw error;
- window2.location.assign(url);
- }
- v5Compat && listener && listener({
- action: action2,
- location: history2.location,
- delta: 1
- });
- }
- function replace2(to, state3) {
- action2 = Action.Replace;
- let location4 = createLocation(history2.location, to, state3);
- validateLocation && validateLocation(location4, to), index4 = getIndex();
- let historyState = getHistoryState(location4, index4), url = history2.createHref(location4);
- globalHistory.replaceState(historyState, "", url), v5Compat && listener && listener({
- action: action2,
- location: history2.location,
- delta: 0
- });
- }
- function createURL(to) {
- let base = window2.location.origin !== "null" ? window2.location.origin : window2.location.href, href = typeof to == "string" ? to : createPath(to);
- return invariant2(base, "No window.location.(origin|href) available to create URL for href: " + href), new URL(href, base);
- }
- let history2 = {
- get action() {
- return action2;
- },
- get location() {
- return getLocation(window2, globalHistory);
- },
- listen(fn4) {
- if (listener)
- throw new Error("A history only accepts one active listener");
- return window2.addEventListener(PopStateEventType, handlePop), listener = fn4, () => {
- window2.removeEventListener(PopStateEventType, handlePop), listener = null;
- };
- },
- createHref(to) {
- return createHref(window2, to);
- },
- createURL,
- encodeLocation(to) {
- let url = createURL(to);
- return {
- pathname: url.pathname,
- search: url.search,
- hash: url.hash
- };
- },
- push,
- replace: replace2,
- go(n) {
- return globalHistory.go(n);
- }
- };
- return history2;
- }
- var ResultType;
- (function(ResultType2) {
- ResultType2.data = "data", ResultType2.deferred = "deferred", ResultType2.redirect = "redirect", ResultType2.error = "error";
- })(ResultType || (ResultType = {}));
- function stripBasename(pathname, basename) {
- if (basename === "/") return pathname;
- if (!pathname.toLowerCase().startsWith(basename.toLowerCase()))
- return null;
- let startIndex = basename.endsWith("/") ? basename.length - 1 : basename.length, nextChar = pathname.charAt(startIndex);
- return nextChar && nextChar !== "/" ? null : pathname.slice(startIndex) || "/";
- }
- function resolvePath(to, fromPathname) {
- fromPathname === void 0 && (fromPathname = "/");
- let {
- pathname: toPathname,
- search = "",
- hash: hash4 = ""
- } = typeof to == "string" ? parsePath3(to) : to;
- return {
- pathname: toPathname ? toPathname.startsWith("/") ? toPathname : resolvePathname(toPathname, fromPathname) : fromPathname,
- search: normalizeSearch(search),
- hash: normalizeHash(hash4)
- };
- }
- function resolvePathname(relativePath, fromPathname) {
- let segments = fromPathname.replace(/\/+$/, "").split("/");
- return relativePath.split("/").forEach((segment) => {
- segment === ".." ? segments.length > 1 && segments.pop() : segment !== "." && segments.push(segment);
- }), segments.length > 1 ? segments.join("/") : "/";
- }
- function getInvalidPathError(char2, field, dest, path) {
- return "Cannot include a '" + char2 + "' character in a manually specified " + ("`to." + field + "` field [" + JSON.stringify(path) + "]. Please separate it out to the ") + ("`to." + dest + "` field. Alternatively you may provide the full path as ") + 'a string in <Link to="..."> and the router will parse it for you.';
- }
- function getPathContributingMatches(matches4) {
- return matches4.filter((match3, index4) => index4 === 0 || match3.route.path && match3.route.path.length > 0);
- }
- function resolveTo(toArg, routePathnames, locationPathname, isPathRelative) {
- isPathRelative === void 0 && (isPathRelative = !1);
- let to;
- typeof toArg == "string" ? to = parsePath3(toArg) : (to = _extends2({}, toArg), invariant2(!to.pathname || !to.pathname.includes("?"), getInvalidPathError("?", "pathname", "search", to)), invariant2(!to.pathname || !to.pathname.includes("#"), getInvalidPathError("#", "pathname", "hash", to)), invariant2(!to.search || !to.search.includes("#"), getInvalidPathError("#", "search", "hash", to)));
- let isEmptyPath = toArg === "" || to.pathname === "", toPathname = isEmptyPath ? "/" : to.pathname, from2;
- if (isPathRelative || toPathname == null)
- from2 = locationPathname;
- else {
- let routePathnameIndex = routePathnames.length - 1;
- if (toPathname.startsWith("..")) {
- let toSegments = toPathname.split("/");
- for (; toSegments[0] === ".."; )
- toSegments.shift(), routePathnameIndex -= 1;
- to.pathname = toSegments.join("/");
- }
- from2 = routePathnameIndex >= 0 ? routePathnames[routePathnameIndex] : "/";
- }
- let path = resolvePath(to, from2), hasExplicitTrailingSlash = toPathname && toPathname !== "/" && toPathname.endsWith("/"), hasCurrentTrailingSlash = (isEmptyPath || toPathname === ".") && locationPathname.endsWith("/");
- return !path.pathname.endsWith("/") && (hasExplicitTrailingSlash || hasCurrentTrailingSlash) && (path.pathname += "/"), path;
- }
- var joinPaths = (paths) => paths.join("/").replace(/\/\/+/g, "/");
- var normalizeSearch = (search) => !search || search === "?" ? "" : search.startsWith("?") ? search : "?" + search, normalizeHash = (hash4) => !hash4 || hash4 === "#" ? "" : hash4.startsWith("#") ? hash4 : "#" + hash4;
- function isRouteErrorResponse(error) {
- return error != null && typeof error.status == "number" && typeof error.statusText == "string" && typeof error.internal == "boolean" && "data" in error;
- }
- var validMutationMethodsArr = ["post", "put", "patch", "delete"], validMutationMethods = new Set(validMutationMethodsArr), validRequestMethodsArr = ["get", ...validMutationMethodsArr], validRequestMethods = new Set(validRequestMethodsArr);
- var UNSAFE_DEFERRED_SYMBOL = Symbol("deferred");
-
- // ../../node_modules/react-router/dist/index.js
- function _extends3() {
- return _extends3 = Object.assign ? Object.assign.bind() : function(target) {
- for (var i = 1; i < arguments.length; i++) {
- var source = arguments[i];
- for (var key in source)
- Object.prototype.hasOwnProperty.call(source, key) && (target[key] = source[key]);
- }
- return target;
- }, _extends3.apply(this, arguments);
- }
- var DataRouterContext = React30.createContext(null), DataRouterStateContext = React30.createContext(null), AwaitContext = React30.createContext(null), NavigationContext = React30.createContext(null), LocationContext = React30.createContext(null), RouteContext = React30.createContext({
- outlet: null,
- matches: [],
- isDataRoute: !1
- }), RouteErrorContext = React30.createContext(null);
- function useHref(to, _temp) {
- let {
- relative
- } = _temp === void 0 ? {} : _temp;
- useInRouterContext() || invariant2(!1);
- let {
- basename,
- navigator: navigator4
- } = React30.useContext(NavigationContext), {
- hash: hash4,
- pathname,
- search
- } = useResolvedPath(to, {
- relative
- }), joinedPathname = pathname;
- return basename !== "/" && (joinedPathname = pathname === "/" ? basename : joinPaths([basename, pathname])), navigator4.createHref({
- pathname: joinedPathname,
- search,
- hash: hash4
- });
- }
- function useInRouterContext() {
- return React30.useContext(LocationContext) != null;
- }
- function useLocation() {
- return useInRouterContext() || invariant2(!1), React30.useContext(LocationContext).location;
- }
- function useIsomorphicLayoutEffect(cb) {
- React30.useContext(NavigationContext).static || React30.useLayoutEffect(cb);
- }
- function useNavigate() {
- let {
- isDataRoute
- } = React30.useContext(RouteContext);
- return isDataRoute ? useNavigateStable() : useNavigateUnstable();
- }
- function useNavigateUnstable() {
- useInRouterContext() || invariant2(!1);
- let dataRouterContext = React30.useContext(DataRouterContext), {
- basename,
- navigator: navigator4
- } = React30.useContext(NavigationContext), {
- matches: matches4
- } = React30.useContext(RouteContext), {
- pathname: locationPathname
- } = useLocation(), routePathnamesJson = JSON.stringify(getPathContributingMatches(matches4).map((match3) => match3.pathnameBase)), activeRef = React30.useRef(!1);
- return useIsomorphicLayoutEffect(() => {
- activeRef.current = !0;
- }), React30.useCallback(function(to, options) {
- if (options === void 0 && (options = {}), !activeRef.current) return;
- if (typeof to == "number") {
- navigator4.go(to);
- return;
- }
- let path = resolveTo(to, JSON.parse(routePathnamesJson), locationPathname, options.relative === "path");
- dataRouterContext == null && basename !== "/" && (path.pathname = path.pathname === "/" ? basename : joinPaths([basename, path.pathname])), (options.replace ? navigator4.replace : navigator4.push)(path, options.state, options);
- }, [basename, navigator4, routePathnamesJson, locationPathname, dataRouterContext]);
- }
- var OutletContext = React30.createContext(null);
- function useResolvedPath(to, _temp2) {
- let {
- relative
- } = _temp2 === void 0 ? {} : _temp2, {
- matches: matches4
- } = React30.useContext(RouteContext), {
- pathname: locationPathname
- } = useLocation(), routePathnamesJson = JSON.stringify(getPathContributingMatches(matches4).map((match3) => match3.pathnameBase));
- return React30.useMemo(() => resolveTo(to, JSON.parse(routePathnamesJson), locationPathname, relative === "path"), [to, routePathnamesJson, locationPathname, relative]);
- }
- function DefaultErrorComponent() {
- let error = useRouteError(), message = isRouteErrorResponse(error) ? error.status + " " + error.statusText : error instanceof Error ? error.message : JSON.stringify(error), stack = error instanceof Error ? error.stack : null, lightgrey = "rgba(200,200,200, 0.5)", preStyles = {
- padding: "0.5rem",
- backgroundColor: lightgrey
- }, codeStyles = {
- padding: "2px 4px",
- backgroundColor: lightgrey
- };
- return React30.createElement(React30.Fragment, null, React30.createElement("h2", null, "Unexpected Application Error!"), React30.createElement("h3", {
- style: {
- fontStyle: "italic"
- }
- }, message), stack ? React30.createElement("pre", {
- style: preStyles
- }, stack) : null, null);
- }
- var defaultErrorElement = React30.createElement(DefaultErrorComponent, null);
- var DataRouterHook = (function(DataRouterHook3) {
- return DataRouterHook3.UseBlocker = "useBlocker", DataRouterHook3.UseRevalidator = "useRevalidator", DataRouterHook3.UseNavigateStable = "useNavigate", DataRouterHook3;
- })(DataRouterHook || {}), DataRouterStateHook = (function(DataRouterStateHook3) {
- return DataRouterStateHook3.UseBlocker = "useBlocker", DataRouterStateHook3.UseLoaderData = "useLoaderData", DataRouterStateHook3.UseActionData = "useActionData", DataRouterStateHook3.UseRouteError = "useRouteError", DataRouterStateHook3.UseNavigation = "useNavigation", DataRouterStateHook3.UseRouteLoaderData = "useRouteLoaderData", DataRouterStateHook3.UseMatches = "useMatches", DataRouterStateHook3.UseRevalidator = "useRevalidator", DataRouterStateHook3.UseNavigateStable = "useNavigate", DataRouterStateHook3.UseRouteId = "useRouteId", DataRouterStateHook3;
- })(DataRouterStateHook || {});
- function useDataRouterContext(hookName) {
- let ctx = React30.useContext(DataRouterContext);
- return ctx || invariant2(!1), ctx;
- }
- function useDataRouterState(hookName) {
- let state3 = React30.useContext(DataRouterStateContext);
- return state3 || invariant2(!1), state3;
- }
- function useRouteContext(hookName) {
- let route = React30.useContext(RouteContext);
- return route || invariant2(!1), route;
- }
- function useCurrentRouteId(hookName) {
- let route = useRouteContext(hookName), thisRoute = route.matches[route.matches.length - 1];
- return thisRoute.route.id || invariant2(!1), thisRoute.route.id;
- }
- function useRouteId() {
- return useCurrentRouteId(DataRouterStateHook.UseRouteId);
- }
- function useRouteError() {
- var _state$errors;
- let error = React30.useContext(RouteErrorContext), state3 = useDataRouterState(DataRouterStateHook.UseRouteError), routeId = useCurrentRouteId(DataRouterStateHook.UseRouteError);
- return error || ((_state$errors = state3.errors) == null ? void 0 : _state$errors[routeId]);
- }
- function useNavigateStable() {
- let {
- router
- } = useDataRouterContext(DataRouterHook.UseNavigateStable), id = useCurrentRouteId(DataRouterStateHook.UseNavigateStable), activeRef = React30.useRef(!1);
- return useIsomorphicLayoutEffect(() => {
- activeRef.current = !0;
- }), React30.useCallback(function(to, options) {
- options === void 0 && (options = {}), activeRef.current && (typeof to == "number" ? router.navigate(to) : router.navigate(to, _extends3({
- fromRouteId: id
- }, options)));
- }, [router, id]);
- }
- var START_TRANSITION = "startTransition", startTransitionImpl = React30[START_TRANSITION];
- function MemoryRouter(_ref3) {
- let {
- basename,
- children,
- initialEntries,
- initialIndex,
- future
- } = _ref3, historyRef = React30.useRef();
- historyRef.current == null && (historyRef.current = createMemoryHistory({
- initialEntries,
- initialIndex,
- v5Compat: !0
- }));
- let history2 = historyRef.current, [state3, setStateImpl] = React30.useState({
- action: history2.action,
- location: history2.location
- }), {
- v7_startTransition
- } = future || {}, setState2 = React30.useCallback((newState) => {
- v7_startTransition && startTransitionImpl ? startTransitionImpl(() => setStateImpl(newState)) : setStateImpl(newState);
- }, [setStateImpl, v7_startTransition]);
- return React30.useLayoutEffect(() => history2.listen(setState2), [history2, setState2]), React30.createElement(Router, {
- basename,
- children,
- location: state3.location,
- navigationType: state3.action,
- navigator: history2
- });
- }
- function Router(_ref5) {
- let {
- basename: basenameProp = "/",
- children = null,
- location: locationProp,
- navigationType = Action.Pop,
- navigator: navigator4,
- static: staticProp = !1
- } = _ref5;
- useInRouterContext() && invariant2(!1);
- let basename = basenameProp.replace(/^\/*/, "/"), navigationContext = React30.useMemo(() => ({
- basename,
- navigator: navigator4,
- static: staticProp
- }), [basename, navigator4, staticProp]);
- typeof locationProp == "string" && (locationProp = parsePath3(locationProp));
- let {
- pathname = "/",
- search = "",
- hash: hash4 = "",
- state: state3 = null,
- key = "default"
- } = locationProp, locationContext = React30.useMemo(() => {
- let trailingPathname = stripBasename(pathname, basename);
- return trailingPathname == null ? null : {
- location: {
- pathname: trailingPathname,
- search,
- hash: hash4,
- state: state3,
- key
- },
- navigationType
- };
- }, [basename, pathname, search, hash4, state3, key, navigationType]);
- return locationContext == null ? null : React30.createElement(NavigationContext.Provider, {
- value: navigationContext
- }, React30.createElement(LocationContext.Provider, {
- children,
- value: locationContext
- }));
- }
- var AwaitRenderStatus = (function(AwaitRenderStatus2) {
- return AwaitRenderStatus2[AwaitRenderStatus2.pending = 0] = "pending", AwaitRenderStatus2[AwaitRenderStatus2.success = 1] = "success", AwaitRenderStatus2[AwaitRenderStatus2.error = 2] = "error", AwaitRenderStatus2;
- })(AwaitRenderStatus || {}), neverSettledPromise = new Promise(() => {
- });
-
- // ../../node_modules/react-router-dom/dist/index.js
- function _extends4() {
- return _extends4 = Object.assign ? Object.assign.bind() : function(target) {
- for (var i = 1; i < arguments.length; i++) {
- var source = arguments[i];
- for (var key in source)
- Object.prototype.hasOwnProperty.call(source, key) && (target[key] = source[key]);
- }
- return target;
- }, _extends4.apply(this, arguments);
- }
- function _objectWithoutPropertiesLoose2(source, excluded) {
- if (source == null) return {};
- var target = {}, sourceKeys = Object.keys(source), key, i;
- for (i = 0; i < sourceKeys.length; i++)
- key = sourceKeys[i], !(excluded.indexOf(key) >= 0) && (target[key] = source[key]);
- return target;
- }
- var defaultMethod = "get", defaultEncType = "application/x-www-form-urlencoded";
- function isHtmlElement(object) {
- return object != null && typeof object.tagName == "string";
- }
- function isButtonElement(object) {
- return isHtmlElement(object) && object.tagName.toLowerCase() === "button";
- }
- function isFormElement(object) {
- return isHtmlElement(object) && object.tagName.toLowerCase() === "form";
- }
- function isInputElement(object) {
- return isHtmlElement(object) && object.tagName.toLowerCase() === "input";
- }
- function isModifiedEvent(event) {
- return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);
- }
- function shouldProcessLinkClick(event, target) {
- return event.button === 0 && // Ignore everything but left clicks
- (!target || target === "_self") && // Let browser handle "target=_blank" etc.
- !isModifiedEvent(event);
- }
- var _formDataSupportsSubmitter = null;
- function isFormDataSubmitterSupported() {
- if (_formDataSupportsSubmitter === null)
- try {
- new FormData(
- document.createElement("form"),
- // @ts-expect-error if FormData supports the submitter parameter, this will throw
- 0
- ), _formDataSupportsSubmitter = !1;
- } catch {
- _formDataSupportsSubmitter = !0;
- }
- return _formDataSupportsSubmitter;
- }
- var supportedFormEncTypes = /* @__PURE__ */ new Set(["application/x-www-form-urlencoded", "multipart/form-data", "text/plain"]);
- function getFormEncType(encType) {
- return encType != null && !supportedFormEncTypes.has(encType) ? null : encType;
- }
- function getFormSubmissionInfo(target, basename) {
- let method, action2, encType, formData, body;
- if (isFormElement(target)) {
- let attr = target.getAttribute("action");
- action2 = attr ? stripBasename(attr, basename) : null, method = target.getAttribute("method") || defaultMethod, encType = getFormEncType(target.getAttribute("enctype")) || defaultEncType, formData = new FormData(target);
- } else if (isButtonElement(target) || isInputElement(target) && (target.type === "submit" || target.type === "image")) {
- let form = target.form;
- if (form == null)
- throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');
- let attr = target.getAttribute("formaction") || form.getAttribute("action");
- if (action2 = attr ? stripBasename(attr, basename) : null, method = target.getAttribute("formmethod") || form.getAttribute("method") || defaultMethod, encType = getFormEncType(target.getAttribute("formenctype")) || getFormEncType(form.getAttribute("enctype")) || defaultEncType, formData = new FormData(form, target), !isFormDataSubmitterSupported()) {
- let {
- name,
- type: type5,
- value
- } = target;
- if (type5 === "image") {
- let prefix4 = name ? name + "." : "";
- formData.append(prefix4 + "x", "0"), formData.append(prefix4 + "y", "0");
- } else name && formData.append(name, value);
- }
- } else {
- if (isHtmlElement(target))
- throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');
- method = defaultMethod, action2 = null, encType = defaultEncType, body = target;
- }
- return formData && encType === "text/plain" && (body = formData, formData = void 0), {
- action: action2,
- method: method.toLowerCase(),
- encType,
- formData,
- body
- };
- }
- var _excluded2 = ["onClick", "relative", "reloadDocument", "replace", "state", "target", "to", "preventScrollReset"], _excluded22 = ["aria-current", "caseSensitive", "className", "end", "style", "to", "children"], _excluded3 = ["reloadDocument", "replace", "state", "method", "action", "onSubmit", "submit", "relative", "preventScrollReset"];
- var START_TRANSITION2 = "startTransition", startTransitionImpl2 = React31[START_TRANSITION2];
- function BrowserRouter(_ref) {
- let {
- basename,
- children,
- future,
- window: window2
- } = _ref, historyRef = React31.useRef();
- historyRef.current == null && (historyRef.current = createBrowserHistory({
- window: window2,
- v5Compat: !0
- }));
- let history2 = historyRef.current, [state3, setStateImpl] = React31.useState({
- action: history2.action,
- location: history2.location
- }), {
- v7_startTransition
- } = future || {}, setState2 = React31.useCallback((newState) => {
- v7_startTransition && startTransitionImpl2 ? startTransitionImpl2(() => setStateImpl(newState)) : setStateImpl(newState);
- }, [setStateImpl, v7_startTransition]);
- return React31.useLayoutEffect(() => history2.listen(setState2), [history2, setState2]), React31.createElement(Router, {
- basename,
- children,
- location: state3.location,
- navigationType: state3.action,
- navigator: history2
- });
- }
- var isBrowser3 = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u", ABSOLUTE_URL_REGEX = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, Link3 = React31.forwardRef(function(_ref4, ref) {
- let {
- onClick,
- relative,
- reloadDocument,
- replace: replace2,
- state: state3,
- target,
- to,
- preventScrollReset
- } = _ref4, rest = _objectWithoutPropertiesLoose2(_ref4, _excluded2), {
- basename
- } = React31.useContext(NavigationContext), absoluteHref, isExternal = !1;
- if (typeof to == "string" && ABSOLUTE_URL_REGEX.test(to) && (absoluteHref = to, isBrowser3))
- try {
- let currentUrl = new URL(window.location.href), targetUrl = to.startsWith("//") ? new URL(currentUrl.protocol + to) : new URL(to), path = stripBasename(targetUrl.pathname, basename);
- targetUrl.origin === currentUrl.origin && path != null ? to = path + targetUrl.search + targetUrl.hash : isExternal = !0;
- } catch {
- }
- let href = useHref(to, {
- relative
- }), internalOnClick = useLinkClickHandler(to, {
- replace: replace2,
- state: state3,
- target,
- preventScrollReset,
- relative
- });
- function handleClick(event) {
- onClick && onClick(event), event.defaultPrevented || internalOnClick(event);
- }
- return (
- // eslint-disable-next-line jsx-a11y/anchor-has-content
- React31.createElement("a", _extends4({}, rest, {
- href: absoluteHref || href,
- onClick: isExternal || reloadDocument ? onClick : handleClick,
- ref,
- target
- }))
- );
- }), NavLink = React31.forwardRef(function(_ref5, ref) {
- let {
- "aria-current": ariaCurrentProp = "page",
- caseSensitive = !1,
- className: classNameProp = "",
- end: end2 = !1,
- style: styleProp,
- to,
- children
- } = _ref5, rest = _objectWithoutPropertiesLoose2(_ref5, _excluded22), path = useResolvedPath(to, {
- relative: rest.relative
- }), location4 = useLocation(), routerState = React31.useContext(DataRouterStateContext), {
- navigator: navigator4
- } = React31.useContext(NavigationContext), toPathname = navigator4.encodeLocation ? navigator4.encodeLocation(path).pathname : path.pathname, locationPathname = location4.pathname, nextLocationPathname = routerState && routerState.navigation && routerState.navigation.location ? routerState.navigation.location.pathname : null;
- caseSensitive || (locationPathname = locationPathname.toLowerCase(), nextLocationPathname = nextLocationPathname ? nextLocationPathname.toLowerCase() : null, toPathname = toPathname.toLowerCase());
- let isActive = locationPathname === toPathname || !end2 && locationPathname.startsWith(toPathname) && locationPathname.charAt(toPathname.length) === "/", isPending = nextLocationPathname != null && (nextLocationPathname === toPathname || !end2 && nextLocationPathname.startsWith(toPathname) && nextLocationPathname.charAt(toPathname.length) === "/"), ariaCurrent = isActive ? ariaCurrentProp : void 0, className;
- typeof classNameProp == "function" ? className = classNameProp({
- isActive,
- isPending
- }) : className = [classNameProp, isActive ? "active" : null, isPending ? "pending" : null].filter(Boolean).join(" ");
- let style = typeof styleProp == "function" ? styleProp({
- isActive,
- isPending
- }) : styleProp;
- return React31.createElement(Link3, _extends4({}, rest, {
- "aria-current": ariaCurrent,
- className,
- ref,
- style,
- to
- }), typeof children == "function" ? children({
- isActive,
- isPending
- }) : children);
- }), Form = React31.forwardRef((props, ref) => {
- let submit = useSubmit();
- return React31.createElement(FormImpl, _extends4({}, props, {
- submit,
- ref
- }));
- }), FormImpl = React31.forwardRef((_ref6, forwardedRef) => {
- let {
- reloadDocument,
- replace: replace2,
- state: state3,
- method = defaultMethod,
- action: action2,
- onSubmit,
- submit,
- relative,
- preventScrollReset
- } = _ref6, props = _objectWithoutPropertiesLoose2(_ref6, _excluded3), formMethod = method.toLowerCase() === "get" ? "get" : "post", formAction = useFormAction(action2, {
- relative
- });
- return React31.createElement("form", _extends4({
- ref: forwardedRef,
- method: formMethod,
- action: formAction,
- onSubmit: reloadDocument ? onSubmit : (event) => {
- if (onSubmit && onSubmit(event), event.defaultPrevented) return;
- event.preventDefault();
- let submitter = event.nativeEvent.submitter, submitMethod = submitter?.getAttribute("formmethod") || method;
- submit(submitter || event.currentTarget, {
- method: submitMethod,
- replace: replace2,
- state: state3,
- relative,
- preventScrollReset
- });
- }
- }, props));
- });
- var DataRouterHook2;
- (function(DataRouterHook3) {
- DataRouterHook3.UseScrollRestoration = "useScrollRestoration", DataRouterHook3.UseSubmit = "useSubmit", DataRouterHook3.UseSubmitFetcher = "useSubmitFetcher", DataRouterHook3.UseFetcher = "useFetcher";
- })(DataRouterHook2 || (DataRouterHook2 = {}));
- var DataRouterStateHook2;
- (function(DataRouterStateHook3) {
- DataRouterStateHook3.UseFetchers = "useFetchers", DataRouterStateHook3.UseScrollRestoration = "useScrollRestoration";
- })(DataRouterStateHook2 || (DataRouterStateHook2 = {}));
- function useDataRouterContext2(hookName) {
- let ctx = React31.useContext(DataRouterContext);
- return ctx || invariant2(!1), ctx;
- }
- function useLinkClickHandler(to, _temp) {
- let {
- target,
- replace: replaceProp,
- state: state3,
- preventScrollReset,
- relative
- } = _temp === void 0 ? {} : _temp, navigate = useNavigate(), location4 = useLocation(), path = useResolvedPath(to, {
- relative
- });
- return React31.useCallback((event) => {
- if (shouldProcessLinkClick(event, target)) {
- event.preventDefault();
- let replace2 = replaceProp !== void 0 ? replaceProp : createPath(location4) === createPath(path);
- navigate(to, {
- replace: replace2,
- state: state3,
- preventScrollReset,
- relative
- });
- }
- }, [location4, navigate, path, replaceProp, state3, target, to, preventScrollReset, relative]);
- }
- function validateClientSideSubmission() {
- if (typeof document > "u")
- throw new Error("You are calling submit during the server render. Try calling submit within a `useEffect` or callback instead.");
- }
- function useSubmit() {
- let {
- router
- } = useDataRouterContext2(DataRouterHook2.UseSubmit), {
- basename
- } = React31.useContext(NavigationContext), currentRouteId = useRouteId();
- return React31.useCallback(function(target, options) {
- options === void 0 && (options = {}), validateClientSideSubmission();
- let {
- action: action2,
- method,
- encType,
- formData,
- body
- } = getFormSubmissionInfo(target, basename);
- router.navigate(options.action || action2, {
- preventScrollReset: options.preventScrollReset,
- formData,
- body,
- formMethod: options.method || method,
- formEncType: options.encType || encType,
- replace: options.replace,
- state: options.state,
- fromRouteId: currentRouteId
- });
- }, [router, basename, currentRouteId]);
- }
- function useFormAction(action2, _temp2) {
- let {
- relative
- } = _temp2 === void 0 ? {} : _temp2, {
- basename
- } = React31.useContext(NavigationContext), routeContext = React31.useContext(RouteContext);
- routeContext || invariant2(!1);
- let [match3] = routeContext.matches.slice(-1), path = _extends4({}, useResolvedPath(action2 || ".", {
- relative
- })), location4 = useLocation();
- if (action2 == null && (path.search = location4.search, match3.route.index)) {
- let params = new URLSearchParams(path.search);
- params.delete("index"), path.search = params.toString() ? "?" + params.toString() : "";
- }
- return (!action2 || action2 === ".") && match3.route.index && (path.search = path.search ? path.search.replace(/^\?/, "?index&") : "?index"), basename !== "/" && (path.pathname = path.pathname === "/" ? basename : joinPaths([basename, path.pathname])), createPath(path);
- }
-
- // src/router/router.tsx
- var { document: document10 } = scope, getBase = () => `${document10.location.pathname}?`, useNavigate2 = () => {
- let navigate = useNavigate();
- return (0, import_react21.useCallback)((to, { plain, ...options } = {}) => {
- if (typeof to == "string" && to.startsWith("#")) {
- to === "#" ? navigate(document10.location.search) : document10.location.hash = to;
- return;
- }
- if (typeof to == "string") {
- let target = plain ? to : `?path=${to}`;
- return navigate(target, options);
- }
- if (typeof to == "number")
- return navigate(to);
- }, []);
- }, Link4 = ({ to, children, ...rest }) => import_react21.default.createElement(Link3, { to: `${getBase()}path=${to}`, ...rest }, children);
- Link4.displayName = "QueryLink";
- var Location = ({ children }) => {
- let location4 = useLocation(), { path, singleStory } = queryFromLocation(location4), { viewMode, storyId, refId } = parsePath2(path);
- return import_react21.default.createElement(import_react21.default.Fragment, null, children({
- path: path || "/",
- location: location4,
- viewMode,
- storyId,
- refId,
- singleStory: singleStory === "true"
- }));
- };
- Location.displayName = "QueryLocation";
- function Match({
- children,
- path: targetPath,
- startsWith: startsWith4 = !1
- }) {
- return import_react21.default.createElement(Location, null, ({ path: urlPath, ...rest }) => children({
- match: getMatch(urlPath, targetPath, startsWith4),
- ...rest
- }));
- }
- Match.displayName = "QueryMatch";
- function Route2(input2) {
- let { children, ...rest } = input2;
- return rest.startsWith === void 0 && (rest.startsWith = !1), import_react21.default.createElement(Match, { ...rest }, ({ match: match3 }) => match3 ? children : null);
- }
- Route2.displayName = "Route";
- var LocationProvider = (...args) => BrowserRouter(...args), BaseLocationProvider = (...args) => Router(...args), MemoryRouter2 = (...args) => MemoryRouter(...args);
-
- // src/manager-api/modules/stories.ts
- init_dist();
-
- // src/manager-api/lib/url.ts
- var buildNavigationUrl = (path, queryParams = {}) => {
- let params = Object.entries(queryParams).filter(([, v]) => v != null).sort(([a3], [b]) => a3 < b ? -1 : 1).map(([k, v]) => `${k}=${v}`);
- return [path, ...params].join("&");
- };
-
- // src/shared/utils/story-index-filters.ts
- var getActiveFilterCount = ({
- includedTagFilters,
- excludedTagFilters,
- includedStatusFilters,
- excludedStatusFilters
- }) => (includedTagFilters?.length ?? 0) + (excludedTagFilters?.length ?? 0) + (includedStatusFilters?.length ?? 0) + (excludedStatusFilters?.length ?? 0), hasActiveFilters = (filters) => getActiveFilterCount(filters) > 0;
-
- // src/shared/universal-store/use-universal-store-manager.ts
- var React33 = __toESM(require_react(), 1);
- var useUniversalStore = (universalStore, selector) => {
- let snapshotRef = React33.useRef(
- selector ? selector(universalStore.getState()) : universalStore.getState()
- ), subscribe = React33.useCallback(
- (listener) => universalStore.onStateChange((state4, previousState) => {
- if (!selector) {
- snapshotRef.current = state4, listener();
- return;
- }
- let selectedState = selector(state4), selectedPreviousState = selector(previousState);
- !isEqual(selectedState, selectedPreviousState) && (snapshotRef.current = selectedState, listener());
- }),
- [universalStore, selector]
- ), getSnapshot = React33.useCallback(() => {
- let currentState = universalStore.getState(), selectedState = selector ? selector(currentState) : currentState;
- return isEqual(selectedState, snapshotRef.current) || (snapshotRef.current = selectedState), snapshotRef.current;
- }, [universalStore, selector]);
- return [React33.useSyncExternalStore(subscribe, getSnapshot), universalStore.setState];
- };
-
- // src/manager-api/stores/status.ts
- var statusStore = createStatusStore({
- universalStatusStore: UniversalStore.create({
- ...UNIVERSAL_STATUS_STORE_OPTIONS,
- leader: globalThis.CONFIG_TYPE === "PRODUCTION"
- }),
- useUniversalStore,
- environment: "manager"
- }), { fullStatusStore, getStatusStoreByTypeId, useStatusStore, universalStatusStore } = statusStore;
-
- // src/manager-api/lib/filter-param.ts
- var parseFilterParam = (param, transform) => {
- if (!param)
- return { included: [], excluded: [] };
- let included = [], excluded = [];
- return param.split(";").forEach((raw) => {
- if (!raw)
- return;
- let isExcluded = raw.startsWith("!"), value = transform(isExcluded ? raw.slice(1) : raw);
- value != null && (isExcluded ? excluded.push(value) : included.push(value));
- }), { included, excluded };
- };
-
- // src/manager-api/modules/statuses.ts
- var parseStatusesParam = (statusesParam) => parseFilterParam(statusesParam, toStatusValue), serializeStatusesParam = (included, excluded) => {
- if (!included.length && !excluded.length)
- return;
- let serializedIncluded = included.map((v) => statusValueShortName(v)).sort(), serializedExcluded = excluded.map((v) => `!${statusValueShortName(v)}`).sort();
- return [...serializedIncluded, ...serializedExcluded].join(";");
- }, computeStatusFilterFn = (includedStatusFilters, excludedStatusFilters) => (entry) => {
- if (!includedStatusFilters.length && !excludedStatusFilters.length)
- return !0;
- let storyStatuses = (fullStatusStore.getAll() ?? {})[entry.id], storyStatusValues = storyStatuses ? Object.values(storyStatuses).map((s3) => s3.value) : [], passesInclude = !includedStatusFilters.length || includedStatusFilters.some((v) => storyStatusValues.includes(v)), passesExclude = !excludedStatusFilters.length || excludedStatusFilters.every((v) => !storyStatusValues.includes(v));
- return passesInclude && passesExclude;
- };
-
- // src/manager-api/modules/tags.ts
- var import_memoizerific8 = __toESM(require_memoizerific(), 1);
- var BUILT_IN_URL_TAG_MAP = {
- $docs: "_docs",
- $play: "_play",
- $test: "_test"
- }, parseTagsParam = (tagsParam) => parseFilterParam(tagsParam, (raw) => BUILT_IN_URL_TAG_MAP[raw] ?? raw), serializeTagsParam = (included, excluded) => {
- if (!included.length && !excluded.length)
- return "";
- let reverseBuiltInUrlTagMap = Object.fromEntries(
- Object.entries(BUILT_IN_URL_TAG_MAP).map(([urlTag, internalTag]) => [internalTag, urlTag])
- ), serializedIncluded = included.map((tag) => reverseBuiltInUrlTagMap[tag] ?? tag).sort(), serializedExcluded = excluded.map((tag) => `!${reverseBuiltInUrlTagMap[tag] ?? tag}`).sort();
- return [...serializedIncluded, ...serializedExcluded].join(";");
- }, getDefaultTagsFromPreset = (0, import_memoizerific8.default)(1)((presets) => {
- let presetEntries = Object.entries(presets);
- return {
- included: presetEntries.filter(([, option]) => option.defaultFilterSelection === "include").map(([tag]) => tag),
- excluded: presetEntries.filter(([, option]) => option.defaultFilterSelection === "exclude").map(([tag]) => tag)
- };
- }), computeStaticFilterFn = (tagPresets) => {
- let staticExcludeTags = Object.entries(tagPresets).reduce(
- (acc, entry) => {
- let [tag, option] = entry;
- return option.excludeFromSidebar && (acc[tag] = !0), acc;
- },
- {}
- );
- return (item) => {
- let tags2 = item.tags ?? [];
- return (tags2.includes(Tag.DEV) || item.type === "docs") && tags2.filter((tag) => staticExcludeTags[tag]).length === 0;
- };
- }, computeTagsFilterFn = (includedTagFilters, excludedTagFilters) => {
- let computeFilterFunctions = (set3) => Object.values(
- set3.reduce(
- (acc, tag) => (Object.hasOwn(BUILT_IN_FILTERS, tag) ? acc["built-in"].push(BUILT_IN_FILTERS[tag]) : acc.user.push(USER_TAG_FILTER(tag)), acc),
- { "built-in": [], user: [] }
- )
- ).filter((group) => group.length > 0);
- return (item) => {
- let included = computeFilterFunctions(includedTagFilters), excluded = computeFilterFunctions(excludedTagFilters);
- return (!included.length || included.every((group) => group.some((filterFn) => filterFn(item, !1)))) && (!excluded.length || excluded.every((group) => group.every((filterFn) => filterFn(item, !0))));
- };
- };
-
- // src/manager-api/modules/stories.ts
- var { fetch: fetch3 } = scope, STORY_INDEX_PATH = "./index.json", TAGS_FILTER = "tags-filter", STATIC_FILTER = "static-filter", STATUS_FILTER = "status-filter", BUILT_IN_TAG_IDS = new Set(Object.keys(BUILT_IN_FILTERS)), removedOptions = ["enableShortcuts", "theme", "showRoots"];
- function removeRemovedOptions(options) {
- if (!options || typeof options == "string")
- return options;
- let result = { ...options };
- return removedOptions.forEach((option) => {
- option in result && delete result[option];
- }), result;
- }
- var FILTER_KEYS = {
- tag: { included: "includedTagFilters", excluded: "excludedTagFilters" },
- status: { included: "includedStatusFilters", excluded: "excludedStatusFilters" }
- }, init12 = ({
- fullAPI,
- store: store2,
- navigate,
- provider,
- state: { location: location4 } = {},
- storyId: initialStoryId,
- viewMode: initialViewMode,
- docsOptions = {}
- }) => {
- let navigateWithQueryParams = (path, options) => {
- let { customQueryParams } = store2.getState();
- navigate(buildNavigationUrl(path, customQueryParams ?? {}), options);
- }, persistFilters = (inputPatch) => store2.setState(inputPatch, {
- persistence: "url",
- serialize: (s3) => {
- let tagsValue = serializeTagsParam(s3.includedTagFilters, s3.excludedTagFilters), statusesValue = serializeStatusesParam(
- s3.includedStatusFilters,
- s3.excludedStatusFilters
- );
- return { tags: tagsValue ?? null, statuses: statusesValue ?? null };
- }
- }), urlFilterTelemetryEmitted = !1, addFilters = async (type5, items, excluded) => {
- let { included, excluded: excludedKey } = FILTER_KEYS[type5], state3 = store2.getState(), newIncluded = new Set(state3[included]), newExcluded = new Set(state3[excludedKey]);
- for (let item of items) {
- let [target, other] = excluded ? [newExcluded, newIncluded] : [newIncluded, newExcluded];
- other.delete(item), target.add(item);
- }
- await persistFilters({
- [included]: Array.from(newIncluded),
- [excludedKey]: Array.from(newExcluded)
- });
- }, removeFilters = async (type5, items) => {
- let { included, excluded } = FILTER_KEYS[type5], state3 = store2.getState(), itemSet = new Set(items);
- await persistFilters({
- [included]: state3[included].filter((v) => !itemSet.has(v)),
- [excluded]: state3[excluded].filter((v) => !itemSet.has(v))
- });
- }, emitFilterTelemetry = (trigger, changed) => {
- let state3 = store2.getState(), includedTags = (state3.includedTagFilters ?? []).filter((id) => BUILT_IN_TAG_IDS.has(id)), excludedTags = (state3.excludedTagFilters ?? []).filter((id) => BUILT_IN_TAG_IDS.has(id)), changeDetectionEnabled = !!globalThis?.FEATURES?.changeDetection, includedStatuses = changeDetectionEnabled ? state3.includedStatusFilters ?? [] : [], excludedStatuses = changeDetectionEnabled ? state3.excludedStatusFilters ?? [] : [], storyCounts = {}, entries = state3.internal_index ? Object.values(state3.internal_index.entries) : [];
- for (let tagId of /* @__PURE__ */ new Set([...includedTags, ...excludedTags])) {
- let filterDef = BUILT_IN_FILTERS[tagId];
- storyCounts[tagId] = entries.filter((entry) => filterDef(entry)).length;
- }
- if (includedStatuses.length > 0 || excludedStatuses.length > 0) {
- let statusCounts = countStatusesByValue(fullStatusStore.getAll());
- for (let statusValue of /* @__PURE__ */ new Set([...includedStatuses, ...excludedStatuses]))
- statusCounts[statusValue] !== void 0 && (storyCounts[statusValue] = statusCounts[statusValue]);
- }
- provider.channel?.emit(SIDEBAR_FILTER_CHANGED, {
- trigger,
- changed,
- activeTagFilters: { included: includedTags, excluded: excludedTags },
- activeStatusFilters: { included: includedStatuses, excluded: excludedStatuses },
- storyCounts
- });
- }, api = {
- storyId: toId,
- getData: (storyId, refId) => {
- let result = api.resolveStory(storyId, refId);
- if (result?.type === "story" || result?.type === "docs")
- return result;
- },
- isPrepared: (storyId, refId) => {
- let data = api.getData(storyId, refId);
- return data ? data.type === "story" ? data.prepared : !0 : !1;
- },
- resolveStory: (storyId, refId) => {
- let { refs, index: index4 } = store2.getState();
- if (!(refId && !refs[refId]))
- return refId ? refs?.[refId]?.index?.[storyId] ?? void 0 : index4 ? index4[storyId] : void 0;
- },
- getCurrentStoryData: () => {
- let { storyId, refId } = store2.getState();
- return api.getData(storyId, refId);
- },
- getIndex: () => {
- let { internal_index } = store2.getState();
- return internal_index;
- },
- getParameters: (storyIdOrCombo, parameterName) => {
- let { storyId, refId } = typeof storyIdOrCombo == "string" ? { storyId: storyIdOrCombo, refId: void 0 } : storyIdOrCombo, data = api.getData(storyId, refId);
- if (["story", "docs"].includes(data?.type)) {
- let { parameters: parameters2 } = data;
- if (parameters2)
- return parameterName ? parameters2[parameterName] : parameters2;
- }
- return null;
- },
- getCurrentParameter: (parameterName) => {
- let { storyId, refId } = store2.getState();
- return api.getParameters({ storyId, refId }, parameterName) || void 0;
- },
- jumpToComponent: (direction) => {
- let { filteredIndex, storyId, refs, refId } = store2.getState();
- if (!api.getData(storyId, refId))
- return;
- let hash4 = refId ? refs[refId].filteredIndex || {} : filteredIndex;
- if (!hash4)
- return;
- let result = api.findSiblingStoryId(storyId, hash4, direction, !0);
- result && api.selectStory(result, void 0, { ref: refId });
- },
- jumpToStory: (direction) => {
- let { filteredIndex, storyId, refs, refId } = store2.getState(), story = api.getData(storyId, refId);
- if (!story)
- return;
- let hash4 = story.refId ? refs[story.refId].filteredIndex : filteredIndex;
- if (!hash4)
- return;
- let result = api.findSiblingStoryId(storyId, hash4, direction, !1);
- result && api.selectStory(result, void 0, { ref: refId });
- },
- selectFirstStory: () => {
- let state3 = store2.getState();
- if (hasActiveFilters(state3)) {
- let { filteredIndex } = state3;
- if (!filteredIndex)
- return;
- let firstStory2 = Object.keys(filteredIndex).find(
- (id) => filteredIndex[id].type === "story"
- );
- firstStory2 && api.selectStory(firstStory2);
- return;
- }
- let { index: index4 } = state3;
- if (!index4)
- return;
- let firstStory = Object.keys(index4).find((id) => index4[id].type === "story");
- if (firstStory) {
- api.selectStory(firstStory);
- return;
- }
- navigateWithQueryParams("/");
- },
- selectStory: (titleOrId = void 0, name = void 0, options = {}) => {
- let { ref } = options, { storyId, index: index4, filteredIndex, refs, settings } = store2.getState(), gotoStory = (entry) => entry?.type === "docs" || entry?.type === "story" ? (store2.setState({ settings: { ...settings, lastTrackedStoryId: entry.id } }), navigateWithQueryParams(
- `/${entry.type}/${entry.refId ? `${entry.refId}_${entry.id}` : entry.id}`
- ), !0) : !1, kindSlug = storyId?.split("--", 2)[0], hash4 = ref ? refs[ref].index : index4, filteredHash = ref ? refs[ref].filteredIndex : filteredIndex;
- if (!(!hash4 || !filteredHash))
- if (name)
- if (!titleOrId)
- gotoStory(hash4[toId(kindSlug, name)]);
- else {
- let id = ref ? `${ref}_${toId(titleOrId, name)}` : toId(titleOrId, name);
- if (hash4[id])
- gotoStory(hash4[id]);
- else {
- let entry = hash4[sanitize(titleOrId)];
- if (entry?.type === "component") {
- let foundId = entry.children.find((childId) => hash4[childId].name === name);
- gotoStory(foundId ? hash4[foundId] : void 0);
- }
- }
- }
- else {
- let entry = titleOrId ? hash4[titleOrId] || hash4[sanitize(titleOrId)] : hash4[kindSlug];
- if (!entry)
- throw new Error(`Unknown id or title: '${titleOrId}'`);
- gotoStory(entry) || gotoStory(api.findLeafEntry(filteredHash, entry.id));
- }
- },
- findLeafEntry(index4, storyId) {
- let entry = index4[storyId];
- if (!entry)
- return;
- if (entry.type === "docs" || entry.type === "story")
- return entry;
- let childStoryId = entry.children.find((childId) => index4[childId]);
- return childStoryId ? api.findLeafEntry(index4, childStoryId) : void 0;
- },
- findLeafStoryId(index4, storyId) {
- return api.findLeafEntry(index4, storyId)?.id;
- },
- findAllLeafStoryIds(entryId) {
- let { index: index4 } = store2.getState();
- if (!index4)
- return [];
- let findChildEntriesRecursively = (currentEntryId, results = []) => {
- let node2 = index4[currentEntryId];
- return node2 && (node2.type === "story" && results.push(node2.id), "children" in node2 && node2.children?.forEach((childId) => findChildEntriesRecursively(childId, results))), results;
- };
- return findChildEntriesRecursively(entryId, []);
- },
- findSiblingStoryId(storyId, index4, direction, toSiblingGroup) {
- if (toSiblingGroup) {
- let lookupList2 = getComponentLookupList(index4), position3 = lookupList2.findIndex((i) => i.includes(storyId));
- return position3 === lookupList2.length - 1 && direction > 0 || position3 === 0 && direction < 0 ? void 0 : lookupList2[position3 + direction] ? lookupList2[position3 + direction][0] : void 0;
- }
- let lookupList = getStoriesLookupList(index4), position2 = lookupList.indexOf(storyId);
- if (!(position2 === lookupList.length - 1 && direction > 0) && !(position2 === 0 && direction < 0))
- return lookupList[position2 + direction];
- },
- updateStoryArgs: (story, updatedArgs) => {
- let { id: storyId, refId } = story;
- provider.channel?.emit(UPDATE_STORY_ARGS, {
- storyId,
- updatedArgs,
- options: { target: refId }
- });
- },
- resetStoryArgs: (story, argNames) => {
- let { id: storyId, refId } = story;
- provider.channel?.emit(RESET_STORY_ARGS, {
- storyId,
- argNames,
- options: { target: refId }
- });
- },
- fetchIndex: async () => {
- try {
- let result = await fetch3(STORY_INDEX_PATH);
- if (result.status !== 200)
- throw new Error(await result.text());
- let storyIndex = await result.json();
- if (storyIndex.v < 3) {
- logger.warn(`Skipping story index with version v${storyIndex.v}, awaiting SET_STORIES.`);
- return;
- }
- await api.setIndex(storyIndex);
- } catch (err) {
- await store2.setState({ indexError: err });
- }
- },
- // The story index we receive on SET_INDEX is "prepared" in that it has parameters
- // The story index we receive on fetchStoryIndex is not, but all the prepared fields are optional
- // so we can cast one to the other easily enough
- setIndex: async (input2) => {
- let { filteredIndex: oldFilteredHash, index: oldHash, filters } = store2.getState(), allStatuses = fullStatusStore.getAll(), newFilteredHash = transformStoryIndexToStoriesHash(input2, {
- provider,
- docsOptions,
- filters,
- allStatuses,
- statusFilterKey: STATUS_FILTER
- }), newHash = transformStoryIndexToStoriesHash(input2, {
- provider,
- docsOptions,
- filters: {},
- allStatuses
- });
- await store2.setState({
- internal_index: input2,
- filteredIndex: addPreparedStories(newFilteredHash, oldFilteredHash),
- index: addPreparedStories(newHash, oldHash),
- indexError: void 0
- });
- },
- // FIXME: is there a bug where filtered stories get added back in on updateStory???
- updateStory: async (storyId, update2, ref) => {
- if (ref) {
- let { id: refId, index: index4, filteredIndex } = ref;
- index4 && index4[storyId] && (index4[storyId] = {
- ...index4[storyId],
- ...update2
- }), filteredIndex && filteredIndex[storyId] && (filteredIndex[storyId] = {
- ...filteredIndex[storyId],
- ...update2
- }), await fullAPI.updateRef(refId, { index: index4, filteredIndex });
- } else {
- let { index: index4, filteredIndex } = store2.getState();
- index4 && index4[storyId] && (index4[storyId] = {
- ...index4[storyId],
- ...update2
- }), filteredIndex && filteredIndex[storyId] && (filteredIndex[storyId] = {
- ...filteredIndex[storyId],
- ...update2
- }), (index4 || filteredIndex) && await store2.setState({ index: index4, filteredIndex });
- }
- },
- updateDocs: async (docsId, update2, ref) => {
- if (ref) {
- let { id: refId, index: index4, filteredIndex } = ref;
- index4[docsId] = {
- ...index4[docsId],
- ...update2
- }, filteredIndex[docsId] = {
- ...filteredIndex[docsId],
- ...update2
- }, await fullAPI.updateRef(refId, { index: index4, filteredIndex });
- } else {
- let { index: index4, filteredIndex } = store2.getState();
- index4 && (index4[docsId] = {
- ...index4[docsId],
- ...update2
- }), filteredIndex && (filteredIndex[docsId] = {
- ...filteredIndex[docsId],
- ...update2
- }), (index4 || filteredIndex) && await store2.setState({ index: index4, filteredIndex });
- }
- },
- setPreviewInitialized: async (ref) => {
- ref ? fullAPI.updateRef(ref.id, { previewInitialized: !0 }) : store2.setState({ previewInitialized: !0 });
- },
- experimental_setFilter: async (id, filterFunction) => {
- await store2.setState({ filters: { ...store2.getState().filters, [id]: filterFunction } });
- let { internal_index: index4 } = store2.getState();
- if (!index4)
- return;
- await api.setIndex(index4);
- let refs = await fullAPI.getRefs();
- for (let [refId, { internal_index, ...ref }] of Object.entries(refs))
- await fullAPI.setRef(refId, { ...ref, storyIndex: internal_index }, !0);
- provider.channel?.emit(SET_FILTER, { id });
- },
- resetTagFilters: async () => {
- await persistFilters((s3) => ({
- includedTagFilters: s3.defaultIncludedTagFilters,
- excludedTagFilters: s3.defaultExcludedTagFilters
- })), await recomputeTagsFilter();
- },
- setAllTagFilters: async (included, excluded) => {
- await persistFilters({ includedTagFilters: included, excludedTagFilters: excluded }), await recomputeTagsFilter();
- },
- addTagFilters: async (tags3, excluded) => {
- await addFilters("tag", tags3, excluded), await recomputeTagsFilter(), tags3.length === 1 && BUILT_IN_TAG_IDS.has(tags3[0]) && emitFilterTelemetry("interaction", {
- filterType: "tag",
- filterId: tags3[0],
- action: excluded ? "exclude" : "include"
- });
- },
- removeTagFilters: async (tags3) => {
- await removeFilters("tag", tags3), await recomputeTagsFilter(), tags3.length === 1 && BUILT_IN_TAG_IDS.has(tags3[0]) && emitFilterTelemetry("interaction", {
- filterType: "tag",
- filterId: tags3[0],
- action: "remove"
- });
- },
- resetStatusFilters: async () => {
- await persistFilters({ includedStatusFilters: [], excludedStatusFilters: [] }), await recomputeStatusFilter();
- },
- setAllStatusFilters: async (included, excluded) => {
- let prevState = store2.getState(), prevIncluded = new Set(prevState.includedStatusFilters ?? []), prevExcluded = new Set(prevState.excludedStatusFilters ?? []), nextIncluded = new Set(included), nextExcluded = new Set(excluded);
- await persistFilters({ includedStatusFilters: included, excludedStatusFilters: excluded }), await recomputeStatusFilter();
- let changedIds = /* @__PURE__ */ new Set([
- ...prevIncluded,
- ...prevExcluded,
- ...nextIncluded,
- ...nextExcluded
- ]);
- for (let id of changedIds) {
- let wasIncluded = prevIncluded.has(id), wasExcluded = prevExcluded.has(id), isIncluded = nextIncluded.has(id), isExcluded = nextExcluded.has(id);
- if (wasIncluded === isIncluded && wasExcluded === isExcluded)
- continue;
- let action2;
- isIncluded ? action2 = "include" : isExcluded ? action2 = "exclude" : action2 = "remove", emitFilterTelemetry("interaction", {
- filterType: "status",
- filterId: id,
- action: action2
- });
- }
- },
- addStatusFilters: async (statuses2, excluded) => {
- await addFilters("status", statuses2, excluded), await recomputeStatusFilter(), statuses2.length === 1 && emitFilterTelemetry("interaction", {
- filterType: "status",
- filterId: statuses2[0],
- action: excluded ? "exclude" : "include"
- });
- },
- removeStatusFilters: async (statuses2) => {
- await removeFilters("status", statuses2), await recomputeStatusFilter(), statuses2.length === 1 && emitFilterTelemetry("interaction", {
- filterType: "status",
- filterId: statuses2[0],
- action: "remove"
- });
- }
- }, recomputeTagsFilter = () => {
- let { includedTagFilters, excludedTagFilters } = store2.getState();
- return api.experimental_setFilter(
- TAGS_FILTER,
- computeTagsFilterFn(includedTagFilters, excludedTagFilters)
- );
- }, recomputeStatusFilter = () => {
- let { includedStatusFilters, excludedStatusFilters } = store2.getState();
- return api.experimental_setFilter(
- STATUS_FILTER,
- computeStatusFilterFn(includedStatusFilters ?? [], excludedStatusFilters ?? [])
- );
- };
- provider.channel?.on(
- STORY_SPECIFIED,
- function({
- storyId,
- viewMode
- }) {
- let { sourceType } = getEventMetadata(this, fullAPI);
- if (sourceType === "local") {
- let state3 = store2.getState(), isCanvasRoute = state3.path === "/" || state3.viewMode === "story" || state3.viewMode === "docs", stateHasSelection = state3.viewMode && state3.storyId, stateSelectionDifferent = state3.viewMode !== viewMode || state3.storyId !== storyId, { type: type5 } = state3.index?.[state3.storyId] || {}, isStory2 = !(type5 === "root" || type5 === "component" || type5 === "group");
- if (isCanvasRoute) {
- if (hasActiveFilters(state3) && !stateHasSelection) {
- let { filteredIndex } = state3;
- if (!(filteredIndex && filteredIndex[storyId]?.type === "story")) {
- let firstFiltered = filteredIndex ? Object.keys(filteredIndex).find((id) => {
- let entry = filteredIndex[id];
- return entry.type === "story" || entry.type === "docs";
- }) : void 0;
- firstFiltered && navigateWithQueryParams(`/${viewMode}/${firstFiltered}`);
- return;
- }
- }
- stateHasSelection && stateSelectionDifferent && isStory2 ? provider.channel?.emit(SET_CURRENT_STORY, {
- storyId: state3.storyId,
- viewMode: state3.viewMode
- }) : stateSelectionDifferent && navigateWithQueryParams(`/${viewMode}/${storyId}`);
- }
- }
- }
- ), provider.channel?.on(CURRENT_STORY_WAS_SET, function() {
- let { ref } = getEventMetadata(this, fullAPI);
- api.setPreviewInitialized(ref);
- }), provider.channel?.on(STORY_CHANGED, function() {
- let { sourceType } = getEventMetadata(this, fullAPI);
- if (sourceType === "local") {
- let options = api.getCurrentParameter("options");
- options && fullAPI.setOptions(removeRemovedOptions(options));
- }
- }), provider.channel?.on(
- STORY_PREPARED,
- function({ id, ...update2 }) {
- let { ref, sourceType } = getEventMetadata(this, fullAPI);
- if (api.updateStory(id, { ...update2, prepared: !0 }, ref), !ref && !store2.getState().hasCalledSetOptions) {
- let { options } = update2.parameters;
- fullAPI.setOptions(removeRemovedOptions(options)), store2.setState({ hasCalledSetOptions: !0 });
- }
- if (sourceType === "local") {
- let { storyId, index: index4, refId } = store2.getState();
- if (!index4)
- return;
- let toBePreloaded = Array.from(
- /* @__PURE__ */ new Set([
- api.findSiblingStoryId(storyId, index4, 1, !0),
- api.findSiblingStoryId(storyId, index4, -1, !0)
- ])
- ).filter(Boolean);
- provider.channel?.emit(PRELOAD_ENTRIES, {
- ids: toBePreloaded,
- options: { target: refId }
- });
- }
- }
- ), provider.channel?.on(
- DOCS_PREPARED,
- function({ id, ...update2 }) {
- let { ref } = getEventMetadata(this, fullAPI);
- api.updateStory(id, { ...update2, prepared: !0 }, ref);
- }
- ), provider.channel?.on(SET_INDEX, function(index4) {
- let { ref } = getEventMetadata(this, fullAPI);
- if (ref)
- fullAPI.setRef(ref.id, { ...ref, storyIndex: index4 }, !0);
- else {
- api.setIndex(index4);
- let options = api.getCurrentParameter("options");
- fullAPI.setOptions(removeRemovedOptions(options));
- }
- }), provider.channel?.on(SET_STORIES, function(data) {
- let { ref } = getEventMetadata(this, fullAPI), setStoriesData = data.v ? denormalizeStoryParameters(data) : data.stories;
- if (ref)
- fullAPI.setRef(ref.id, { ...ref, setStoriesData }, !0);
- else
- throw new Error("Cannot call SET_STORIES for local frame");
- }), provider.channel?.on(
- SELECT_STORY,
- function({
- kind,
- title = kind,
- story,
- name = story,
- storyId,
- ...rest
- }) {
- let { ref } = getEventMetadata(this, fullAPI);
- ref ? fullAPI.selectStory(storyId || title, name, { ...rest, ref: ref.id }) : fullAPI.selectStory(storyId || title, name, rest);
- }
- ), provider.channel?.on(
- STORY_ARGS_UPDATED,
- function({ storyId, args }) {
- let { ref } = getEventMetadata(this, fullAPI);
- api.updateStory(storyId, { args }, ref);
- }
- ), provider.channel?.on(CONFIG_ERROR, function(err) {
- let { ref } = getEventMetadata(this, fullAPI);
- api.setPreviewInitialized(ref);
- }), provider.channel?.on(STORY_MISSING, function(err) {
- let { ref } = getEventMetadata(this, fullAPI);
- api.setPreviewInitialized(ref);
- }), provider.channel?.on(SET_CONFIG, () => {
- let configFilters2 = provider.getConfig()?.sidebar?.filters || {}, {
- includedTagFilters,
- excludedTagFilters,
- includedStatusFilters,
- excludedStatusFilters,
- tagPresets: tagPresets2
- } = store2.getState();
- store2.setState({
- filters: {
- ...store2.getState().filters,
- ...configFilters2,
- [STATIC_FILTER]: computeStaticFilterFn(tagPresets2),
- [TAGS_FILTER]: computeTagsFilterFn(includedTagFilters, excludedTagFilters),
- [STATUS_FILTER]: computeStatusFilterFn(includedStatusFilters, excludedStatusFilters)
- }
- });
- }), fullStatusStore.onAllStatusChange(async () => {
- recomputeStatusFilter();
- let { internal_index: index4 } = store2.getState();
- if (!index4)
- return;
- await api.setIndex(index4);
- let refs = await fullAPI.getRefs();
- Object.entries(refs).forEach(([refId, { internal_index, ...ref }]) => {
- fullAPI.setRef(refId, { ...ref, storyIndex: internal_index }, !0);
- });
- });
- let configFilters = provider.getConfig()?.sidebar?.filters || {}, tagPresets = scope.TAGS_OPTIONS || {}, defaultTags = getDefaultTagsFromPreset(tagPresets), { tags: tags2, statuses } = queryFromLocation(location4 ?? { search: "" }), parsedTags = parseTagsParam(tags2), hasTagsParam = tags2 !== void 0, initialIncluded = hasTagsParam ? parsedTags.included : defaultTags.included, initialExcluded = hasTagsParam ? parsedTags.excluded : defaultTags.excluded, parsedStatuses = parseStatusesParam(statuses), initialIncludedStatuses = parsedStatuses.included, initialExcludedStatuses = parsedStatuses.excluded, initialFilters = {
- ...configFilters,
- [STATIC_FILTER]: computeStaticFilterFn(tagPresets),
- [TAGS_FILTER]: computeTagsFilterFn(initialIncluded, initialExcluded),
- [STATUS_FILTER]: computeStatusFilterFn(initialIncludedStatuses, initialExcludedStatuses)
- };
- return {
- api,
- state: {
- storyId: initialStoryId,
- viewMode: initialViewMode,
- hasCalledSetOptions: !1,
- previewInitialized: !1,
- filters: initialFilters,
- tagPresets,
- defaultIncludedTagFilters: defaultTags.included,
- defaultExcludedTagFilters: defaultTags.excluded,
- includedTagFilters: initialIncluded,
- excludedTagFilters: initialExcluded,
- includedStatusFilters: initialIncludedStatuses,
- excludedStatusFilters: initialExcludedStatuses
- },
- init: async () => {
- if (provider.channel?.on(STORY_INDEX_INVALIDATED, () => api.fetchIndex()), await api.fetchIndex(), urlFilterTelemetryEmitted)
- return;
- urlFilterTelemetryEmitted = !0;
- let hasBuiltInTagFilters = initialIncluded.some((id) => BUILT_IN_TAG_IDS.has(id)) || initialExcluded.some((id) => BUILT_IN_TAG_IDS.has(id)), hasStatusFilters = !!globalThis?.FEATURES?.changeDetection && (initialIncludedStatuses.length > 0 || initialExcludedStatuses.length > 0);
- (hasBuiltInTagFilters || hasStatusFilters) && emitFilterTelemetry("url");
- }
- };
- };
-
- // src/manager-api/modules/url.ts
- var url_exports = {};
- __export(url_exports, {
- init: () => init13
- });
- init_dist();
- var import_picoquery5 = __toESM(require_main(), 1);
- var parseBoolean = (value) => {
- if (value === "true" || value === "1")
- return !0;
- if (value === "false" || value === "0")
- return !1;
- }, parseSerializedParam = (param) => Object.fromEntries(
- param.split(";").map((pair) => pair.split(":")).map(([key, value]) => [key, encodeURIComponent(value)]).filter(([key, value]) => key && value)
- ), mergeSerializedParams = (params, extraParams) => {
- let pairs = parseSerializedParam(params), extra = parseSerializedParam(extraParams);
- return Object.entries({ ...pairs, ...extra }).map(([key, value]) => `${key}:${value}`).join(";");
- }, prevParams, initialUrlSupport = ({
- state: { location: location4, path, viewMode, storyId: storyIdFromUrl },
- singleStory
- }) => {
- let {
- full,
- panel,
- nav,
- shortcuts,
- addonPanel,
- tabs,
- path: queryPath,
- ...otherParams
- // the rest gets passed to the iframe
- } = queryFromLocation(location4), navSize, bottomPanelHeight, rightPanelWidth;
- parseBoolean(full) === !0 ? (navSize = 0, bottomPanelHeight = 0, rightPanelWidth = 0) : parseBoolean(full) === !1 && (navSize = DEFAULT_NAV_SIZE, bottomPanelHeight = DEFAULT_BOTTOM_PANEL_HEIGHT, rightPanelWidth = DEFAULT_RIGHT_PANEL_WIDTH), singleStory || (parseBoolean(nav) === !0 && (navSize = DEFAULT_NAV_SIZE), parseBoolean(nav) === !1 && (navSize = 0)), parseBoolean(panel) === !1 && (bottomPanelHeight = 0, rightPanelWidth = 0);
- let layout = {
- navSize,
- bottomPanelHeight,
- rightPanelWidth,
- panelPosition: ["right", "bottom"].includes(panel) ? panel : void 0,
- showTabs: parseBoolean(tabs)
- }, ui = {
- enableShortcuts: parseBoolean(shortcuts)
- }, selectedPanel = addonPanel || void 0, storyId = storyIdFromUrl, customQueryParams = dequal(prevParams, otherParams) ? prevParams : otherParams;
- return prevParams = customQueryParams, { viewMode, layout, ui, selectedPanel, location: location4, path, customQueryParams, storyId };
- }, init13 = (moduleArgs) => {
- let { store: store2, navigate, provider, fullAPI } = moduleArgs, navigateTo = (path, queryParams = {}, options = {}) => navigate(buildNavigationUrl(path, queryParams), options), api = {
- getStoryHrefs(storyId, options = {}) {
- let { id: currentStoryId, refId: currentRefId } = fullAPI.getCurrentStoryData() ?? {}, isCurrentStory = storyId === currentStoryId && options.refId === currentRefId, { customQueryParams, location: location4, refs } = store2.getState(), {
- base,
- inheritArgs = isCurrentStory,
- inheritGlobals = !0,
- queryParams = {},
- refId,
- viewMode = "story"
- } = options;
- if (refId && !refs[refId])
- throw new Error(`Invalid refId: ${refId}`);
- let pathname = location4.pathname || "/", originAddress = scope.window.location.origin + pathname, networkAddress = scope.STORYBOOK_NETWORK_ADDRESS ?? originAddress, managerBase = base === "origin" ? originAddress : base === "network" ? networkAddress : pathname, previewBase = refId ? refs[refId].url + "/iframe.html" : scope.PREVIEW_URL || `${managerBase.replace(/\/[^/]*\.html$/, "").replace(/\/?$/, "/")}iframe.html`, refParam = refId ? `&refId=${encodeURIComponent(refId)}` : "", { args = "", globals = "", ...otherParams } = queryParams, argsParam = inheritArgs ? mergeSerializedParams(customQueryParams?.args ?? "", args) : args, globalsParam = inheritGlobals ? mergeSerializedParams(customQueryParams?.globals ?? "", globals) : globals, customManagerParams = (0, import_picoquery5.stringify)(otherParams, {
- nesting: !0,
- nestingSyntax: "js"
- }), customPreviewParams = (0, import_picoquery5.stringify)(omit(otherParams, ["id", "viewMode"]), {
- nesting: !0,
- nestingSyntax: "js"
- });
- return argsParam = argsParam && `&args=${argsParam}`, globalsParam = globalsParam && `&globals=${globalsParam}`, customManagerParams = customManagerParams && `&${customManagerParams}`, customPreviewParams = customPreviewParams && `&${customPreviewParams}`, {
- managerHref: `${managerBase}?path=/${viewMode}/${refId ? `${refId}_` : ""}${storyId}${argsParam}${globalsParam}${customManagerParams}`,
- previewHref: `${previewBase}?id=${storyId}&viewMode=${viewMode}${refParam}${argsParam}${refId ? "" : globalsParam}${customPreviewParams}`
- };
- },
- getQueryParam(key) {
- let { customQueryParams } = store2.getState();
- return customQueryParams ? customQueryParams[key] : void 0;
- },
- getUrlState() {
- let { location: location4, path, customQueryParams, storyId, url, viewMode } = store2.getState();
- return {
- path,
- hash: location4?.hash ?? "",
- queryParams: customQueryParams,
- storyId,
- url,
- viewMode
- };
- },
- setQueryParams(input2) {
- let { customQueryParams } = store2.getState(), update2 = { ...customQueryParams };
- for (let [key, value] of Object.entries(input2))
- value == null ? delete update2[key] : update2[key] = value;
- dequal(customQueryParams, update2) || (store2.setState({ customQueryParams: update2 }), provider.channel?.emit(UPDATE_QUERY_PARAMS, update2));
- },
- applyQueryParams(input2, options) {
- let { path, hash: hash4 = "", queryParams } = api.getUrlState();
- navigateTo(`${path}${hash4}`, { ...queryParams, ...input2 }, options), api.setQueryParams(input2);
- },
- navigateUrl(url, options) {
- navigate(url, { plain: !0, ...options });
- }
- }, updateArgsParam = () => {
- let { path, hash: hash4 = "", queryParams, viewMode } = api.getUrlState();
- if (viewMode !== "story")
- return;
- let currentStory = fullAPI.getCurrentStoryData();
- if (currentStory?.type !== "story")
- return;
- let { args, initialArgs } = currentStory, argsString = buildArgsParam(initialArgs, args);
- navigateTo(`${path}${hash4}`, { ...queryParams, args: argsString || null }, { replace: !0 }), api.setQueryParams({ args: argsString || null });
- };
- provider.channel?.on(SET_CURRENT_STORY, () => updateArgsParam());
- let handleOrId;
- return provider.channel?.on(STORY_ARGS_UPDATED, () => {
- "requestIdleCallback" in scope.window ? (handleOrId && scope.window.cancelIdleCallback(handleOrId), handleOrId = scope.window.requestIdleCallback(updateArgsParam, { timeout: 1e3 })) : (handleOrId && clearTimeout(handleOrId), setTimeout(updateArgsParam, 100));
- }), provider.channel?.on(GLOBALS_UPDATED, ({ userGlobals, initialGlobals: initialGlobals5 }) => {
- let { path, hash: hash4 = "", queryParams } = api.getUrlState(), globalsString = buildArgsParam(initialGlobals5, merge_default(initialGlobals5, userGlobals));
- navigateTo(
- `${path}${hash4}`,
- { ...queryParams, globals: globalsString || null },
- { replace: !0 }
- ), api.setQueryParams({ globals: globalsString || null });
- }), provider.channel?.on(NAVIGATE_URL, (url, options) => {
- api.navigateUrl(url, options);
- }), {
- api,
- state: initialUrlSupport(moduleArgs),
- init: () => {
- store2.registerPersistenceHandler("url", (_patch, serialize3) => {
- if (serialize3) {
- let params = serialize3(store2.getState());
- api.applyQueryParams(params, { replace: !0 });
- }
- });
- }
- };
- };
-
- // src/manager-api/modules/versions.ts
- var versions_exports = {};
- __export(versions_exports, {
- init: () => init14
- });
- init_dist();
- var import_memoizerific9 = __toESM(require_memoizerific(), 1), import_semver = __toESM(require_semver2(), 1);
-
- // src/manager-api/version.ts
- var version = "10.4.1";
-
- // src/manager-api/modules/versions.ts
- var { VERSIONCHECK } = scope, getVersionCheckData = (0, import_memoizerific9.default)(1)(() => {
- try {
- return { ...JSON.parse(VERSIONCHECK).data || {} };
- } catch {
- return {};
- }
- }), normalizeRendererName = (renderer) => renderer.includes("vue") ? "vue" : renderer, init14 = ({ store: store2 }) => {
- let { dismissedVersionNotification } = store2.getState(), state3 = {
- versions: {
- current: {
- version
- },
- ...getVersionCheckData()
- },
- dismissedVersionNotification
- }, api = {
- getCurrentVersion: () => {
- let {
- versions: { current }
- } = store2.getState();
- return current;
- },
- getLatestVersion: () => {
- let {
- versions: { latest, next: next2, current }
- } = store2.getState();
- return current && import_semver.default.prerelease(current.version) && next2 ? latest && import_semver.default.gt(latest.version, next2.version) ? latest : next2 : latest;
- },
- // TODO: Move this to it's own "info" module later
- getDocsUrl: ({ asset, subpath = asset, versioned, renderer, ref = "ui" }) => {
- let { versions } = store2.getState(), latestVersion = versions.latest?.version, currentVersion = versions.current?.version, activeVersion = currentVersion?.startsWith("0.0.0") && latestVersion || currentVersion, url = `https://storybook.js.org/${asset ? "docs-assets" : "docs"}/`;
- if (asset && activeVersion)
- url += `${import_semver.default.major(activeVersion)}.${import_semver.default.minor(activeVersion)}/`;
- else if (versioned && activeVersion && latestVersion) {
- let versionDiff = import_semver.default.diff(latestVersion, activeVersion);
- versionDiff === "patch" || versionDiff === null || (url += `${import_semver.default.major(activeVersion)}.${import_semver.default.minor(activeVersion)}/`);
- }
- let [cleanedSubpath, hash4] = subpath?.split("#") || [];
- if (cleanedSubpath && (url += asset ? cleanedSubpath : `${cleanedSubpath}/`), renderer && typeof scope.STORYBOOK_RENDERER < "u") {
- let rendererName = scope.STORYBOOK_RENDERER;
- rendererName && (url += `?renderer=${normalizeRendererName(rendererName)}`);
- }
- return ref && (url += `${url.includes("?") ? "&" : "?"}ref=${ref}`), hash4 && (url += `#${hash4}`), url;
- },
- versionUpdateAvailable: () => {
- let latest = api.getLatestVersion(), current = api.getCurrentVersion();
- if (latest) {
- if (!latest.version || !current.version)
- return !0;
- let actualCurrent = !!import_semver.default.prerelease(current.version) ? `${import_semver.default.major(current.version)}.${import_semver.default.minor(current.version)}.${import_semver.default.patch(
- current.version
- )}` : current.version, diff2 = import_semver.default.diff(actualCurrent, latest.version);
- return import_semver.default.gt(latest.version, actualCurrent) && diff2 !== "patch" && !diff2.includes("pre");
- }
- return !1;
- }
- };
- return { init: async () => {
- let { versions = {} } = store2.getState(), { latest, next: next2 } = getVersionCheckData();
- await store2.setState({
- versions: { ...versions, latest, next: next2 }
- });
- }, state: state3, api };
- };
-
- // src/manager-api/modules/whatsnew.tsx
- var whatsnew_exports = {};
- __export(whatsnew_exports, {
- init: () => init15
- });
- var import_react22 = __toESM(require_react(), 1);
- init_dist();
- var WHATS_NEW_NOTIFICATION_ID = "whats-new", StorybookIcon2 = ({ color: color2 = "currentColor", size = 14 }) => import_react22.default.createElement(
- "svg",
- {
- width: size,
- height: size,
- viewBox: "0 0 14 14",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg"
- },
- import_react22.default.createElement(
- "path",
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M2.042.616a.704.704 0 00-.66.729L1.816 12.9c.014.367.306.66.672.677l9.395.422h.032a.704.704 0 00.704-.703V.704c0-.015 0-.03-.002-.044a.704.704 0 00-.746-.659l-.773.049.057 1.615a.105.105 0 01-.17.086l-.52-.41-.617.468a.105.105 0 01-.168-.088L9.746.134 2.042.616zm8.003 4.747c-.247.192-2.092.324-2.092.05.04-1.045-.429-1.091-.689-1.091-.247 0-.662.075-.662.634 0 .57.607.893 1.32 1.27 1.014.538 2.24 1.188 2.24 2.823 0 1.568-1.273 2.433-2.898 2.433-1.676 0-3.141-.678-2.976-3.03.065-.275 2.197-.21 2.197 0-.026.971.195 1.256.753 1.256.43 0 .624-.236.624-.634 0-.602-.633-.958-1.361-1.367-.987-.554-2.148-1.205-2.148-2.7 0-1.494 1.027-2.489 2.86-2.489 1.832 0 2.832.98 2.832 2.845z",
- fill: color2
- }
- )
- ), init15 = ({ fullAPI, store: store2, provider }) => {
- let state3 = {
- whatsNewData: void 0
- };
- function setWhatsNewState(newState) {
- store2.setState({ whatsNewData: newState }), state3.whatsNewData = newState;
- }
- let api = {
- isWhatsNewUnread() {
- return state3.whatsNewData?.status === "SUCCESS" && !state3.whatsNewData.postIsRead;
- },
- whatsNewHasBeenRead() {
- state3.whatsNewData?.status === "SUCCESS" && (setWhatsNewCache({ lastReadPost: state3.whatsNewData.url }), setWhatsNewState({ ...state3.whatsNewData, postIsRead: !0 }), fullAPI.clearNotification(WHATS_NEW_NOTIFICATION_ID));
- },
- toggleWhatsNewNotifications() {
- state3.whatsNewData?.status === "SUCCESS" && (setWhatsNewState({
- ...state3.whatsNewData,
- disableWhatsNewNotifications: !state3.whatsNewData.disableWhatsNewNotifications
- }), provider.channel?.emit(TOGGLE_WHATS_NEW_NOTIFICATIONS, {
- disableWhatsNewNotifications: state3.whatsNewData.disableWhatsNewNotifications
- }));
- }
- };
- function getLatestWhatsNewPost() {
- return provider.channel?.emit(REQUEST_WHATS_NEW_DATA), new Promise(
- (resolve) => provider.channel?.once(
- RESULT_WHATS_NEW_DATA,
- ({ data }) => resolve(data)
- )
- );
- }
- function setWhatsNewCache(cache) {
- provider.channel?.emit(SET_WHATS_NEW_CACHE, cache);
- }
- return { init: async () => {
- if (scope.CONFIG_TYPE !== "DEVELOPMENT")
- return;
- let whatsNewData = await getLatestWhatsNewPost();
- setWhatsNewState(whatsNewData);
- let urlState = fullAPI.getUrlState();
- !(urlState?.path === "/onboarding" || urlState.queryParams?.onboarding === "true") && whatsNewData.status === "SUCCESS" && !whatsNewData.disableWhatsNewNotifications && whatsNewData.showNotification && fullAPI.addNotification({
- id: WHATS_NEW_NOTIFICATION_ID,
- link: "/settings/whats-new",
- content: {
- headline: whatsNewData.title,
- subHeadline: "Learn what's new in Storybook"
- },
- icon: import_react22.default.createElement(StorybookIcon2, null),
- onClear({ dismissed }) {
- dismissed && setWhatsNewCache({ lastDismissedPost: whatsNewData.url });
- }
- });
- }, state: state3, api };
- };
-
- // src/manager-api/store.ts
- var import_store22 = __toESM(require_store2(), 1);
-
- // src/manager-api/lib/store-setup.ts
- var store_setup_default = (_) => {
- _.fn("set", function(key, data) {
- return _.set(
- // @ts-expect-error('this' implicitly has type 'any')
- this._area,
- // @ts-expect-error('this' implicitly has type 'any')
- this._in(key),
- stringify(data, { maxDepth: 50 })
- );
- }), _.fn("get", function(key, alt) {
- let value = _.get(this._area, this._in(key));
- return value !== null ? parse(value) : alt || value;
- });
- };
-
- // src/manager-api/store.ts
- store_setup_default(import_store22.default._);
- var STORAGE_KEY = "@storybook/manager/store";
- function get3(storage) {
- return storage.get(STORAGE_KEY) || {};
- }
- function set2(storage, value) {
- return storage.set(STORAGE_KEY, value);
- }
- function update(storage, patch) {
- let previous = get3(storage);
- return set2(storage, { ...previous, ...patch });
- }
- var Store = class {
- constructor({ allowPersistence, setState: setState2, getState: getState3 }) {
- this.persistenceHandlers = /* @__PURE__ */ new Map();
- this.upstreamPersistence = allowPersistence ?? !0, this.upstreamSetState = setState2, this.upstreamGetState = getState3;
- }
- registerPersistenceHandler(key, handler) {
- this.persistenceHandlers.set(key, handler);
- }
- // The assumption is that this will be called once, to initialize the React state
- // when the module is instantiated
- getInitialState(base) {
- for (let storage of [import_store22.default.local, import_store22.default.session]) {
- let persisted = get3(storage);
- if ("includedTagFilters" in persisted || "excludedTagFilters" in persisted) {
- let { includedTagFilters: _i, excludedTagFilters: _e, ...rest } = persisted;
- set2(storage, rest);
- }
- }
- let local = get3(import_store22.default.local), session = get3(import_store22.default.session);
- return { ...base, ...local, ...session };
- }
- getState() {
- return this.upstreamGetState();
- }
- async setState(inputPatch, cbOrOptions, inputOptions) {
- let callback, options;
- typeof cbOrOptions == "function" ? (callback = cbOrOptions, options = inputOptions) : options = cbOrOptions;
- let { persistence = "none" } = options || {}, patch = {}, delta = {};
- typeof inputPatch == "function" ? patch = (state3) => (delta = inputPatch(state3), delta) : (patch = inputPatch, delta = patch);
- let newState = await new Promise((resolve) => {
- this.upstreamSetState(patch, () => {
- resolve(this.getState());
- });
- });
- if (persistence !== "none" && this.upstreamPersistence)
- if (persistence === "url") {
- let handler = this.persistenceHandlers.get("url");
- handler && await handler(delta, options?.serialize);
- } else {
- let storage = persistence === "session" ? import_store22.default.session : import_store22.default.local;
- await update(storage, delta);
- }
- return callback && callback(newState), newState;
- }
- };
-
- // src/manager-api/lib/request-response.ts
- var RequestResponseError = class extends Error {
- constructor(message, payload) {
- super(message);
- this.payload = void 0;
- this.payload = payload;
- }
- }, experimental_requestResponse = (channel, requestEvent, responseEvent, payload, timeout = 5e3) => {
- let timeoutId;
- return new Promise((resolve, reject) => {
- let request = {
- id: Math.random().toString(16).slice(2),
- payload
- }, responseHandler = (response) => {
- response.id === request.id && (clearTimeout(timeoutId), channel.off(responseEvent, responseHandler), response.success ? resolve(response.payload) : reject(new RequestResponseError(response.error, response.payload)));
- };
- channel.emit(requestEvent, request), channel.on(responseEvent, responseHandler), timeoutId = setTimeout(() => {
- channel.off(responseEvent, responseHandler), reject(new RequestResponseError("Timed out waiting for response"));
- }, timeout);
- });
- };
-
- // src/manager-api/root.tsx
- var { ActiveTabs: ActiveTabs2 } = layout_exports;
- var ManagerContext = createContext4({ api: void 0, state: initial_state_default({}) }), combineParameters2 = (...parameterSets) => noArrayMerge({}, ...parameterSets), ManagerProvider = class extends import_react23.Component {
- constructor(props) {
- super(props);
- this.api = {};
- this.initModules = () => {
- this.modules.forEach((module2) => {
- "init" in module2 && module2.init();
- });
- };
- let {
- location: location4,
- path,
- refId,
- viewMode = props.docsOptions.docsMode ? "docs" : props.viewMode,
- singleStory,
- storyId,
- docsOptions,
- navigate
- } = props, store2 = new Store({
- getState: () => this.state,
- setState: (stateChange, callback) => (this.setState(stateChange, () => callback(this.state)), this.state)
- }), routeData = { location: location4, path, viewMode, singleStory, storyId, refId }, optionsData = { docsOptions };
- this.state = store2.getInitialState(initial_state_default({ ...routeData, ...optionsData }));
- let apiData = {
- navigate,
- store: store2,
- provider: props.provider
- };
- this.modules = [
- provider_exports,
- channel_exports,
- addons_exports,
- layout_exports,
- notifications_exports,
- settings_exports,
- shortcuts_exports,
- stories_exports,
- refs_exports,
- globals_exports,
- url_exports,
- versions_exports,
- whatsnew_exports,
- open_in_editor_exports
- ].map(
- (m3) => m3.init({ ...routeData, ...optionsData, ...apiData, state: this.state, fullAPI: this.api })
- );
- let state3 = initial_state_default(this.state, ...this.modules.map((m3) => m3.state)), api = Object.assign(this.api, { navigate }, ...this.modules.map((m3) => m3.api));
- this.state = state3, this.api = api;
- }
- static getDerivedStateFromProps(props, state3) {
- return state3.path !== props.path ? {
- ...state3,
- location: props.location,
- path: props.path,
- refId: props.refId,
- viewMode: props.viewMode,
- storyId: props.storyId
- } : null;
- }
- shouldComponentUpdate(nextProps, nextState) {
- let prevProps = this.props, prevState = this.state;
- return prevProps.path !== nextProps.path || !isEqual(prevState, nextState);
- }
- render() {
- let { children } = this.props, value = {
- state: this.state,
- api: this.api
- };
- return import_react23.default.createElement(EffectOnMount, { effect: this.initModules }, import_react23.default.createElement(ManagerContext.Provider, { value }, import_react23.default.createElement(ManagerConsumer, null, children)));
- }
- };
- ManagerProvider.displayName = "Manager";
- var EffectOnMount = ({ children, effect: effect4 }) => (import_react23.default.useEffect(effect4, []), children), defaultFilter = (c) => c;
- function ManagerConsumer({
- // @ts-expect-error (Converted from ts-ignore)
- filter = defaultFilter,
- children
- }) {
- let managerContext = (0, import_react23.useContext)(ManagerContext), renderer = (0, import_react23.useRef)(children), filterer = (0, import_react23.useRef)(filter);
- if (typeof renderer.current != "function")
- return import_react23.default.createElement(import_react23.Fragment, null, renderer.current);
- let comboData = filterer.current(managerContext), comboDataArray = (0, import_react23.useMemo)(() => [...Object.entries(comboData).reduce((acc, keyval) => acc.concat(keyval), [])], [managerContext.state]);
- return (0, import_react23.useMemo)(() => {
- let Child = renderer.current;
- return import_react23.default.createElement(Child, { ...comboData });
- }, comboDataArray);
- }
- function useStorybookState() {
- let { state: state3 } = (0, import_react23.useContext)(ManagerContext);
- return state3;
- }
- function useStorybookApi() {
- let { api } = (0, import_react23.useContext)(ManagerContext);
- return api;
- }
- function orDefault(fromStore, defaultState) {
- return typeof fromStore > "u" ? defaultState : fromStore;
- }
- var useChannel2 = (eventMap3, deps = []) => {
- let api = useStorybookApi();
- return (0, import_react23.useEffect)(() => (Object.entries(eventMap3).forEach(([type5, listener]) => api.on(type5, listener)), () => {
- Object.entries(eventMap3).forEach(([type5, listener]) => api.off(type5, listener));
- }), deps), api.emit;
- };
- function useStoryPrepared(storyId) {
- return useStorybookApi().isPrepared(storyId);
- }
- function useParameter2(parameterKey, defaultValue) {
- let api = useStorybookApi(), [parameter, setParameter] = (0, import_react23.useState)(api.getCurrentParameter(parameterKey)), handleParameterChange = (0, import_react23.useCallback)(() => {
- let newParameter = api.getCurrentParameter(parameterKey);
- setParameter(newParameter);
- }, [api, parameterKey]);
- return useChannel2(
- {
- [STORY_PREPARED]: handleParameterChange,
- [DOCS_PREPARED]: handleParameterChange
- },
- [handleParameterChange]
- ), orDefault(parameter, defaultValue);
- }
- globalThis.STORYBOOK_ADDON_STATE = {};
- var { STORYBOOK_ADDON_STATE } = globalThis;
- function useSharedState(stateId, defaultState) {
- let api = useStorybookApi(), existingState = api.getAddonState(stateId) || STORYBOOK_ADDON_STATE[stateId], state3 = orDefault(
- existingState,
- STORYBOOK_ADDON_STATE[stateId] ? STORYBOOK_ADDON_STATE[stateId] : defaultState
- ), quicksync = !1;
- state3 === defaultState && defaultState !== void 0 && (STORYBOOK_ADDON_STATE[stateId] = defaultState, quicksync = !0), (0, import_react23.useEffect)(() => {
- quicksync && api.setAddonState(stateId, defaultState);
- }, [quicksync]);
- let setState2 = (0, import_react23.useCallback)(
- async (s3, options) => {
- await api.setAddonState(stateId, s3, options);
- let result = api.getAddonState(stateId);
- return STORYBOOK_ADDON_STATE[stateId] = result, result;
- },
- [api, stateId]
- ), allListeners = (0, import_react23.useMemo)(() => {
- let stateChangeHandlers = {
- [`${SHARED_STATE_CHANGED}-client-${stateId}`]: setState2,
- [`${SHARED_STATE_SET}-client-${stateId}`]: setState2
- }, stateInitializationHandlers = {
- [SET_STORIES]: async () => {
- let currentState = api.getAddonState(stateId);
- currentState ? (STORYBOOK_ADDON_STATE[stateId] = currentState, api.emit(`${SHARED_STATE_SET}-manager-${stateId}`, currentState)) : STORYBOOK_ADDON_STATE[stateId] ? (await setState2(STORYBOOK_ADDON_STATE[stateId]), api.emit(`${SHARED_STATE_SET}-manager-${stateId}`, STORYBOOK_ADDON_STATE[stateId])) : defaultState !== void 0 && (await setState2(defaultState), STORYBOOK_ADDON_STATE[stateId] = defaultState, api.emit(`${SHARED_STATE_SET}-manager-${stateId}`, defaultState));
- },
- [STORY_CHANGED]: () => {
- let currentState = api.getAddonState(stateId);
- currentState !== void 0 && api.emit(`${SHARED_STATE_SET}-manager-${stateId}`, currentState);
- }
- };
- return {
- ...stateChangeHandlers,
- ...stateInitializationHandlers
- };
- }, [stateId]), emit = useChannel2(allListeners), stateSetter = (0, import_react23.useCallback)(
- async (newStateOrMerger, options) => {
- await setState2(newStateOrMerger, options);
- let result = api.getAddonState(stateId);
- emit(`${SHARED_STATE_CHANGED}-manager-${stateId}`, result);
- },
- [api, emit, setState2, stateId]
- );
- return [state3, stateSetter];
- }
- function useAddonState(addonId, defaultState) {
- return useSharedState(addonId, defaultState);
- }
- function useArgs2() {
- let { getCurrentStoryData, updateStoryArgs, resetStoryArgs } = useStorybookApi(), data = getCurrentStoryData(), args = data?.type === "story" ? data.args : {}, initialArgs = data?.type === "story" ? data.initialArgs : {}, updateArgs = (0, import_react23.useCallback)(
- (newArgs) => updateStoryArgs(data, newArgs),
- [data, updateStoryArgs]
- ), resetArgs = (0, import_react23.useCallback)(
- (argNames) => resetStoryArgs(data, argNames),
- [data, resetStoryArgs]
- );
- return [args, updateArgs, resetArgs, initialArgs];
- }
- function useGlobals2() {
- let api = useStorybookApi();
- return [api.getGlobals(), api.updateGlobals, api.getStoryGlobals(), api.getUserGlobals()];
- }
- function useGlobalTypes() {
- return useStorybookApi().getGlobalTypes();
- }
- function useCurrentStory() {
- let { getCurrentStoryData } = useStorybookApi();
- return getCurrentStoryData();
- }
- function useArgTypes() {
- let current = useCurrentStory();
- return current?.type === "story" && current.argTypes || {};
- }
- var typesX = Addon_TypesEnum;
-
- // src/shared/universal-store/mock.ts
- init_esm();
- var MockUniversalStore = class _MockUniversalStore extends UniversalStore {
- constructor(options, testUtils) {
- UniversalStore.isInternalConstructing = !0, super(
- { ...options, leader: !0 },
- { channel: new Channel({}), environment: UniversalStore.Environment.MOCK }
- ), UniversalStore.isInternalConstructing = !1, typeof testUtils?.fn == "function" && (this.testUtils = testUtils, this.getState = testUtils.fn(this.getState), this.setState = testUtils.fn(this.setState), this.subscribe = testUtils.fn(this.subscribe), this.onStateChange = testUtils.fn(this.onStateChange), this.send = testUtils.fn(this.send));
- }
- /** Create a mock universal store. This is just an alias for the constructor */
- static create(options, testUtils) {
- return new _MockUniversalStore(options, testUtils);
- }
- unsubscribeAll() {
- if (!this.testUtils)
- throw new Error(
- dedent`Cannot call unsubscribeAll on a store that does not have testUtils.
- Please provide testUtils as the second argument when creating the store.`
- );
- let callReturnedUnsubscribeFn = (result) => {
- try {
- result.value();
- } catch {
- }
- };
- this.subscribe.mock?.results.forEach(callReturnedUnsubscribeFn), this.onStateChange.mock?.results.forEach(callReturnedUnsubscribeFn);
- }
- };
-
- // src/shared/test-provider-store/index.ts
- var UNIVERSAL_TEST_PROVIDER_STORE_OPTIONS = {
- id: "storybook/test-provider",
- leader: !0,
- initialState: {}
- };
- function createTestProviderStore({
- universalTestProviderStore: universalTestProviderStore2,
- useUniversalStore: useUniversalStore2
- }) {
- let baseStore = {
- settingsChanged: () => {
- universalTestProviderStore2.untilReady().then(() => {
- universalTestProviderStore2.send({ type: "settings-changed" });
- });
- },
- onRunAll: (listener) => universalTestProviderStore2.subscribe("run-all", listener),
- onClearAll: (listener) => universalTestProviderStore2.subscribe("clear-all", listener)
- }, fullTestProviderStore2 = {
- ...baseStore,
- getFullState: universalTestProviderStore2.getState,
- setFullState: universalTestProviderStore2.setState,
- onSettingsChanged: (listener) => universalTestProviderStore2.subscribe("settings-changed", listener),
- runAll: async () => {
- await universalTestProviderStore2.untilReady(), universalTestProviderStore2.send({ type: "run-all" });
- },
- clearAll: async () => {
- await universalTestProviderStore2.untilReady(), universalTestProviderStore2.send({ type: "clear-all" });
- }
- }, getTestProviderStoreById2 = (testProviderId) => {
- let getStateForTestProvider = () => universalTestProviderStore2.getState()[testProviderId] ?? "test-provider-state:pending", setStateForTestProvider = (state3) => {
- universalTestProviderStore2.untilReady().then(() => {
- universalTestProviderStore2.setState((currentState) => ({
- ...currentState,
- [testProviderId]: state3
- }));
- });
- };
- return {
- ...baseStore,
- testProviderId,
- getState: getStateForTestProvider,
- setState: setStateForTestProvider,
- runWithState: async (callback) => {
- setStateForTestProvider("test-provider-state:running");
- try {
- await callback(), setStateForTestProvider("test-provider-state:succeeded");
- } catch {
- setStateForTestProvider("test-provider-state:crashed");
- }
- }
- };
- };
- return useUniversalStore2 ? {
- getTestProviderStoreById: getTestProviderStoreById2,
- fullTestProviderStore: fullTestProviderStore2,
- universalTestProviderStore: universalTestProviderStore2,
- useTestProviderStore: (selector) => useUniversalStore2(universalTestProviderStore2, selector)[0]
- } : {
- getTestProviderStoreById: getTestProviderStoreById2,
- fullTestProviderStore: fullTestProviderStore2,
- universalTestProviderStore: universalTestProviderStore2
- };
- }
-
- // src/manager-api/stores/test-provider.ts
- var testProviderStore = createTestProviderStore({
- universalTestProviderStore: UniversalStore.create({
- ...UNIVERSAL_TEST_PROVIDER_STORE_OPTIONS,
- leader: globalThis.CONFIG_TYPE === "PRODUCTION"
- }),
- useUniversalStore
- }), {
- fullTestProviderStore,
- getTestProviderStoreById,
- useTestProviderStore,
- universalTestProviderStore
- } = testProviderStore;
-
- // src/shared/checklist-store/checklistData.state.ts
- var initialState = {
- items: {
- accessibilityTests: { status: "open" },
- aiSetup: { status: "open" },
- autodocs: { status: "open" },
- ciTests: { status: "open" },
- controls: { status: "open" },
- coverage: { status: "open" },
- guidedTour: { status: "open" },
- installA11y: { status: "open" },
- installChromatic: { status: "open" },
- installDocs: { status: "open" },
- installVitest: { status: "open" },
- mdxDocs: { status: "open" },
- moreComponents: { status: "open" },
- moreStories: { status: "open" },
- onboardingSurvey: { status: "open" },
- organizeStories: { status: "open" },
- renderComponent: { status: "open" },
- runTests: { status: "open" },
- publishStorybook: { status: "open" },
- shareStorybook: { status: "open" },
- viewports: { status: "open" },
- visualTests: { status: "open" },
- whatsNewStorybook10: { status: "open" },
- writeInteractions: { status: "open" }
- },
- widget: {}
- };
-
- // src/shared/checklist-store/index.ts
- var UNIVERSAL_CHECKLIST_STORE_OPTIONS = {
- id: "storybook/checklist",
- initialState
- }, createChecklistStore = (universalChecklistStore2) => ({
- getValue: (id) => universalChecklistStore2.getState().items[id] ?? { status: "open", mutedAt: void 0 },
- accept: (id) => {
- universalChecklistStore2.setState((state3) => ({
- ...state3,
- items: { ...state3.items, [id]: { ...state3.items[id], status: "accepted" } }
- }));
- },
- done: (id) => {
- universalChecklistStore2.setState((state3) => ({
- ...state3,
- items: { ...state3.items, [id]: { ...state3.items[id], status: "done" } }
- }));
- },
- skip: (id) => {
- universalChecklistStore2.setState((state3) => ({
- ...state3,
- items: { ...state3.items, [id]: { ...state3.items[id], status: "skipped" } }
- }));
- },
- reset: (id) => {
- universalChecklistStore2.setState((state3) => ({
- ...state3,
- items: { ...state3.items, [id]: { ...state3.items[id], status: "open" } }
- }));
- },
- mute: (itemIds) => {
- universalChecklistStore2.setState((state3) => ({
- ...state3,
- items: itemIds.reduce(
- (acc, id) => ({ ...acc, [id]: { ...state3.items[id], mutedAt: Date.now() } }),
- state3.items
- )
- }));
- },
- disable: (value) => {
- universalChecklistStore2.setState((state3) => ({
- ...state3,
- widget: { ...state3.widget, disable: value },
- items: Object.entries(state3.items).reduce(
- (acc, [id, value2]) => ({ ...acc, [id]: { ...value2, mutedAt: void 0 } }),
- state3.items
- )
- }));
- }
- });
-
- // src/manager-api/stores/checklist.ts
- var universalChecklistStore = UniversalStore.create({
- ...UNIVERSAL_CHECKLIST_STORE_OPTIONS,
- leader: globalThis.CONFIG_TYPE === "PRODUCTION"
- }), checklistStore = createChecklistStore(universalChecklistStore);
-
- // src/components/components/Button/Button.tsx
- init_theming();
-
- // src/components/components/Button/helpers/InteractiveTooltipWrapper.tsx
- var import_react92 = __toESM(require_react(), 1);
-
- // src/components/components/tooltip/TooltipNote.tsx
- var import_react24 = __toESM(require_react(), 1);
- init_theming();
- var Note = styled.div(({ theme: theme3 }) => ({
- padding: "2px 6px",
- lineHeight: "16px",
- fontSize: 10,
- fontWeight: theme3.typography.weight.bold,
- color: theme3.color.lightest,
- boxShadow: "0 0 5px 0 rgba(0, 0, 0, 0.3)",
- borderRadius: 4,
- whiteSpace: "nowrap",
- pointerEvents: "none",
- zIndex: -1,
- background: theme3.base === "light" ? "rgba(60, 60, 60, 0.9)" : "rgba(0, 0, 0, 0.95)"
- })), TooltipNote = ({ note, ...props }) => import_react24.default.createElement(Note, { ...props }, note);
-
- // src/components/components/tooltip/TooltipProvider.tsx
- var import_react91 = __toESM(require_react(), 1);
- init_client_logger();
-
- // ../../node_modules/@react-aria/utils/dist/useLayoutEffect.mjs
- var import_react25 = __toESM(require_react(), 1), $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c = typeof document < "u" ? import_react25.default.useLayoutEffect : () => {
- };
-
- // ../../node_modules/@react-aria/utils/dist/useValueEffect.mjs
- var import_react26 = __toESM(require_react(), 1);
- function $1dbecbe27a04f9af$export$14d238f342723f25(defaultValue) {
- let [value, setValue] = (0, import_react26.useState)(defaultValue), currValue = (0, import_react26.useRef)(value), effect4 = (0, import_react26.useRef)(null), nextRef = (0, import_react26.useRef)(() => {
- if (!effect4.current) return;
- let newValue = effect4.current.next();
- if (newValue.done) {
- effect4.current = null;
- return;
- }
- currValue.current === newValue.value ? nextRef.current() : setValue(newValue.value);
- });
- $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
- currValue.current = value, effect4.current && nextRef.current();
- });
- let queue = (0, import_react26.useCallback)((fn4) => {
- effect4.current = fn4(currValue.current), nextRef.current();
- }, [
- nextRef
- ]);
- return [
- value,
- queue
- ];
- }
-
- // ../../node_modules/@react-aria/utils/dist/useId.mjs
- var import_react28 = __toESM(require_react(), 1);
-
- // ../../node_modules/@react-aria/ssr/dist/SSRProvider.mjs
- var import_react27 = __toESM(require_react(), 1), $b5e257d569688ac6$var$defaultContext = {
- prefix: String(Math.round(Math.random() * 1e10)),
- current: 0
- }, $b5e257d569688ac6$var$SSRContext = import_react27.default.createContext($b5e257d569688ac6$var$defaultContext), $b5e257d569688ac6$var$IsSSRContext = import_react27.default.createContext(!1);
- var $b5e257d569688ac6$var$canUseDOM = !!(typeof window < "u" && window.document && window.document.createElement), $b5e257d569688ac6$var$componentIds = /* @__PURE__ */ new WeakMap();
- function $b5e257d569688ac6$var$useCounter(isDisabled3 = !1) {
- let ctx = (0, import_react27.useContext)($b5e257d569688ac6$var$SSRContext), ref = (0, import_react27.useRef)(null);
- if (ref.current === null && !isDisabled3) {
- var _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner, _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
- let currentOwner = (_React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = import_react27.default.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED) === null || _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED === void 0 || (_React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner = _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner) === null || _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner === void 0 ? void 0 : _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner.current;
- if (currentOwner) {
- let prevComponentValue = $b5e257d569688ac6$var$componentIds.get(currentOwner);
- prevComponentValue == null ? $b5e257d569688ac6$var$componentIds.set(currentOwner, {
- id: ctx.current,
- state: currentOwner.memoizedState
- }) : currentOwner.memoizedState !== prevComponentValue.state && (ctx.current = prevComponentValue.id, $b5e257d569688ac6$var$componentIds.delete(currentOwner));
- }
- ref.current = ++ctx.current;
- }
- return ref.current;
- }
- function $b5e257d569688ac6$var$useLegacySSRSafeId(defaultId) {
- let ctx = (0, import_react27.useContext)($b5e257d569688ac6$var$SSRContext), counter = $b5e257d569688ac6$var$useCounter(!!defaultId), prefix4 = `react-aria${ctx.prefix}`;
- return defaultId || `${prefix4}-${counter}`;
- }
- function $b5e257d569688ac6$var$useModernSSRSafeId(defaultId) {
- let id = import_react27.default.useId(), [didSSR] = (0, import_react27.useState)($b5e257d569688ac6$export$535bd6ca7f90a273()), prefix4 = didSSR ? "react-aria" : `react-aria${$b5e257d569688ac6$var$defaultContext.prefix}`;
- return defaultId || `${prefix4}-${id}`;
- }
- var $b5e257d569688ac6$export$619500959fc48b26 = typeof import_react27.default.useId == "function" ? $b5e257d569688ac6$var$useModernSSRSafeId : $b5e257d569688ac6$var$useLegacySSRSafeId;
- function $b5e257d569688ac6$var$getSnapshot() {
- return !1;
- }
- function $b5e257d569688ac6$var$getServerSnapshot() {
- return !0;
- }
- function $b5e257d569688ac6$var$subscribe(onStoreChange) {
- return () => {
- };
- }
- function $b5e257d569688ac6$export$535bd6ca7f90a273() {
- return typeof import_react27.default.useSyncExternalStore == "function" ? import_react27.default.useSyncExternalStore($b5e257d569688ac6$var$subscribe, $b5e257d569688ac6$var$getSnapshot, $b5e257d569688ac6$var$getServerSnapshot) : (0, import_react27.useContext)($b5e257d569688ac6$var$IsSSRContext);
- }
-
- // ../../node_modules/@react-aria/utils/dist/useId.mjs
- var $bdb11010cef70236$var$canUseDOM = !!(typeof window < "u" && window.document && window.document.createElement), $bdb11010cef70236$export$d41a04c74483c6ef = /* @__PURE__ */ new Map(), $bdb11010cef70236$var$registry;
- typeof FinalizationRegistry < "u" && ($bdb11010cef70236$var$registry = new FinalizationRegistry((heldValue) => {
- $bdb11010cef70236$export$d41a04c74483c6ef.delete(heldValue);
- }));
- function $bdb11010cef70236$export$f680877a34711e37(defaultId) {
- let [value, setValue] = (0, import_react28.useState)(defaultId), nextId = (0, import_react28.useRef)(null), res = $b5e257d569688ac6$export$619500959fc48b26(value), cleanupRef = (0, import_react28.useRef)(null);
- if ($bdb11010cef70236$var$registry && $bdb11010cef70236$var$registry.register(cleanupRef, res), $bdb11010cef70236$var$canUseDOM) {
- let cacheIdRef = $bdb11010cef70236$export$d41a04c74483c6ef.get(res);
- cacheIdRef && !cacheIdRef.includes(nextId) ? cacheIdRef.push(nextId) : $bdb11010cef70236$export$d41a04c74483c6ef.set(res, [
- nextId
- ]);
- }
- return $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
- let r2 = res;
- return () => {
- $bdb11010cef70236$var$registry && $bdb11010cef70236$var$registry.unregister(cleanupRef), $bdb11010cef70236$export$d41a04c74483c6ef.delete(r2);
- };
- }, [
- res
- ]), (0, import_react28.useEffect)(() => {
- let newId = nextId.current;
- return newId && setValue(newId), () => {
- newId && (nextId.current = null);
- };
- }), res;
- }
- function $bdb11010cef70236$export$cd8c9cb68f842629(idA, idB) {
- if (idA === idB) return idA;
- let setIdsA = $bdb11010cef70236$export$d41a04c74483c6ef.get(idA);
- if (setIdsA)
- return setIdsA.forEach((ref) => ref.current = idB), idB;
- let setIdsB = $bdb11010cef70236$export$d41a04c74483c6ef.get(idB);
- return setIdsB ? (setIdsB.forEach((ref) => ref.current = idA), idA) : idB;
- }
- function $bdb11010cef70236$export$b4cc09c592e8fdb8(depArray = []) {
- let id = $bdb11010cef70236$export$f680877a34711e37(), [resolvedId, setResolvedId] = $1dbecbe27a04f9af$export$14d238f342723f25(id), updateId = (0, import_react28.useCallback)(() => {
- setResolvedId(function* () {
- yield id, yield document.getElementById(id) ? id : void 0;
- });
- }, [
- id,
- setResolvedId
- ]);
- return $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(updateId, [
- id,
- updateId,
- ...depArray
- ]), resolvedId;
- }
-
- // ../../node_modules/@react-aria/utils/dist/chain.mjs
- function $ff5963eb1fccf552$export$e08e3b67e392101e(...callbacks) {
- return (...args) => {
- for (let callback of callbacks) typeof callback == "function" && callback(...args);
- };
- }
-
- // ../../node_modules/@react-aria/utils/dist/domHelpers.mjs
- var $431fbd86ca7dc216$export$b204af158042fbac = (el) => {
- var _el_ownerDocument;
- return (_el_ownerDocument = el?.ownerDocument) !== null && _el_ownerDocument !== void 0 ? _el_ownerDocument : document;
- }, $431fbd86ca7dc216$export$f21a1ffae260145a = (el) => el && "window" in el && el.window === el ? el : $431fbd86ca7dc216$export$b204af158042fbac(el).defaultView || window;
- function $431fbd86ca7dc216$var$isNode(value) {
- return value !== null && typeof value == "object" && "nodeType" in value && typeof value.nodeType == "number";
- }
- function $431fbd86ca7dc216$export$af51f0f06c0f328a(node2) {
- return $431fbd86ca7dc216$var$isNode(node2) && node2.nodeType === Node.DOCUMENT_FRAGMENT_NODE && "host" in node2;
- }
-
- // ../../node_modules/@react-stately/flags/dist/import.mjs
- var $f4e2df6bd15f8569$var$_shadowDOM = !1;
- function $f4e2df6bd15f8569$export$98658e8c59125e6a() {
- return $f4e2df6bd15f8569$var$_shadowDOM;
- }
-
- // ../../node_modules/@react-aria/utils/dist/DOMFunctions.mjs
- function $d4ee10de306f2510$export$4282f70798064fe0(node2, otherNode) {
- if (!$f4e2df6bd15f8569$export$98658e8c59125e6a()) return otherNode && node2 ? node2.contains(otherNode) : !1;
- if (!node2 || !otherNode) return !1;
- let currentNode = otherNode;
- for (; currentNode !== null; ) {
- if (currentNode === node2) return !0;
- currentNode.tagName === "SLOT" && currentNode.assignedSlot ? currentNode = currentNode.assignedSlot.parentNode : $431fbd86ca7dc216$export$af51f0f06c0f328a(currentNode) ? currentNode = currentNode.host : currentNode = currentNode.parentNode;
- }
- return !1;
- }
- var $d4ee10de306f2510$export$cd4e5573fbe2b576 = (doc = document) => {
- var _activeElement_shadowRoot;
- if (!$f4e2df6bd15f8569$export$98658e8c59125e6a()) return doc.activeElement;
- let activeElement = doc.activeElement;
- for (; activeElement && "shadowRoot" in activeElement && (!((_activeElement_shadowRoot = activeElement.shadowRoot) === null || _activeElement_shadowRoot === void 0) && _activeElement_shadowRoot.activeElement); ) activeElement = activeElement.shadowRoot.activeElement;
- return activeElement;
- };
- function $d4ee10de306f2510$export$e58f029f0fbfdb29(event) {
- return $f4e2df6bd15f8569$export$98658e8c59125e6a() && event.target.shadowRoot && event.composedPath ? event.composedPath()[0] : event.target;
- }
-
- // ../../node_modules/@react-aria/utils/dist/ShadowTreeWalker.mjs
- var $dfc540311bf7f109$export$63eb3ababa9c55c4 = class {
- get currentNode() {
- return this._currentNode;
- }
- set currentNode(node2) {
- if (!$d4ee10de306f2510$export$4282f70798064fe0(this.root, node2)) throw new Error("Cannot set currentNode to a node that is not contained by the root node.");
- let walkers = [], curNode = node2, currentWalkerCurrentNode = node2;
- for (this._currentNode = node2; curNode && curNode !== this.root; ) if (curNode.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {
- let shadowRoot = curNode, walker2 = this._doc.createTreeWalker(shadowRoot, this.whatToShow, {
- acceptNode: this._acceptNode
- });
- walkers.push(walker2), walker2.currentNode = currentWalkerCurrentNode, this._currentSetFor.add(walker2), curNode = currentWalkerCurrentNode = shadowRoot.host;
- } else curNode = curNode.parentNode;
- let walker = this._doc.createTreeWalker(this.root, this.whatToShow, {
- acceptNode: this._acceptNode
- });
- walkers.push(walker), walker.currentNode = currentWalkerCurrentNode, this._currentSetFor.add(walker), this._walkerStack = walkers;
- }
- get doc() {
- return this._doc;
- }
- firstChild() {
- let currentNode = this.currentNode, newNode = this.nextNode();
- return $d4ee10de306f2510$export$4282f70798064fe0(currentNode, newNode) ? (newNode && (this.currentNode = newNode), newNode) : (this.currentNode = currentNode, null);
- }
- lastChild() {
- let newNode = this._walkerStack[0].lastChild();
- return newNode && (this.currentNode = newNode), newNode;
- }
- nextNode() {
- let nextNode = this._walkerStack[0].nextNode();
- if (nextNode) {
- if (nextNode.shadowRoot) {
- var _this_filter;
- let nodeResult;
- if (typeof this.filter == "function" ? nodeResult = this.filter(nextNode) : !((_this_filter = this.filter) === null || _this_filter === void 0) && _this_filter.acceptNode && (nodeResult = this.filter.acceptNode(nextNode)), nodeResult === NodeFilter.FILTER_ACCEPT)
- return this.currentNode = nextNode, nextNode;
- let newNode = this.nextNode();
- return newNode && (this.currentNode = newNode), newNode;
- }
- return nextNode && (this.currentNode = nextNode), nextNode;
- } else if (this._walkerStack.length > 1) {
- this._walkerStack.shift();
- let newNode = this.nextNode();
- return newNode && (this.currentNode = newNode), newNode;
- } else return null;
- }
- previousNode() {
- let currentWalker = this._walkerStack[0];
- if (currentWalker.currentNode === currentWalker.root) {
- if (this._currentSetFor.has(currentWalker))
- if (this._currentSetFor.delete(currentWalker), this._walkerStack.length > 1) {
- this._walkerStack.shift();
- let newNode = this.previousNode();
- return newNode && (this.currentNode = newNode), newNode;
- } else return null;
- return null;
- }
- let previousNode = currentWalker.previousNode();
- if (previousNode) {
- if (previousNode.shadowRoot) {
- var _this_filter;
- let nodeResult;
- if (typeof this.filter == "function" ? nodeResult = this.filter(previousNode) : !((_this_filter = this.filter) === null || _this_filter === void 0) && _this_filter.acceptNode && (nodeResult = this.filter.acceptNode(previousNode)), nodeResult === NodeFilter.FILTER_ACCEPT)
- return previousNode && (this.currentNode = previousNode), previousNode;
- let newNode = this.lastChild();
- return newNode && (this.currentNode = newNode), newNode;
- }
- return previousNode && (this.currentNode = previousNode), previousNode;
- } else if (this._walkerStack.length > 1) {
- this._walkerStack.shift();
- let newNode = this.previousNode();
- return newNode && (this.currentNode = newNode), newNode;
- } else return null;
- }
- /**
- * @deprecated
- */
- nextSibling() {
- return null;
- }
- /**
- * @deprecated
- */
- previousSibling() {
- return null;
- }
- /**
- * @deprecated
- */
- parentNode() {
- return null;
- }
- constructor(doc, root2, whatToShow, filter) {
- this._walkerStack = [], this._currentSetFor = /* @__PURE__ */ new Set(), this._acceptNode = (node2) => {
- if (node2.nodeType === Node.ELEMENT_NODE) {
- let shadowRoot2 = node2.shadowRoot;
- if (shadowRoot2) {
- let walker = this._doc.createTreeWalker(shadowRoot2, this.whatToShow, {
- acceptNode: this._acceptNode
- });
- return this._walkerStack.unshift(walker), NodeFilter.FILTER_ACCEPT;
- } else {
- var _this_filter;
- if (typeof this.filter == "function") return this.filter(node2);
- if (!((_this_filter = this.filter) === null || _this_filter === void 0) && _this_filter.acceptNode) return this.filter.acceptNode(node2);
- if (this.filter === null) return NodeFilter.FILTER_ACCEPT;
- }
- }
- return NodeFilter.FILTER_SKIP;
- }, this._doc = doc, this.root = root2, this.filter = filter ?? null, this.whatToShow = whatToShow ?? NodeFilter.SHOW_ALL, this._currentNode = root2, this._walkerStack.unshift(doc.createTreeWalker(root2, whatToShow, this._acceptNode));
- let shadowRoot = root2.shadowRoot;
- if (shadowRoot) {
- let walker = this._doc.createTreeWalker(shadowRoot, this.whatToShow, {
- acceptNode: this._acceptNode
- });
- this._walkerStack.unshift(walker);
- }
- }
- };
- function $dfc540311bf7f109$export$4d0f8be8b12a7ef6(doc, root2, whatToShow, filter) {
- return $f4e2df6bd15f8569$export$98658e8c59125e6a() ? new $dfc540311bf7f109$export$63eb3ababa9c55c4(doc, root2, whatToShow, filter) : doc.createTreeWalker(root2, whatToShow, filter);
- }
-
- // ../../node_modules/clsx/dist/clsx.mjs
- function r(e) {
- var t, f4, n = "";
- if (typeof e == "string" || typeof e == "number") n += e;
- else if (typeof e == "object") if (Array.isArray(e)) {
- var o = e.length;
- for (t = 0; t < o; t++) e[t] && (f4 = r(e[t])) && (n && (n += " "), n += f4);
- } else for (f4 in e) e[f4] && (n && (n += " "), n += f4);
- return n;
- }
- function clsx() {
- for (var e, t, f4 = 0, n = "", o = arguments.length; f4 < o; f4++) (e = arguments[f4]) && (t = r(e)) && (n && (n += " "), n += t);
- return n;
- }
- var clsx_default = clsx;
-
- // ../../node_modules/@react-aria/utils/dist/mergeProps.mjs
- function $3ef42575df84b30b$export$9d1611c77c2fe928(...args) {
- let result = {
- ...args[0]
- };
- for (let i = 1; i < args.length; i++) {
- let props = args[i];
- for (let key in props) {
- let a3 = result[key], b = props[key];
- typeof a3 == "function" && typeof b == "function" && // This is a lot faster than a regex.
- key[0] === "o" && key[1] === "n" && key.charCodeAt(2) >= /* 'A' */
- 65 && key.charCodeAt(2) <= /* 'Z' */
- 90 ? result[key] = $ff5963eb1fccf552$export$e08e3b67e392101e(a3, b) : (key === "className" || key === "UNSAFE_className") && typeof a3 == "string" && typeof b == "string" ? result[key] = clsx_default(a3, b) : key === "id" && a3 && b ? result.id = $bdb11010cef70236$export$cd8c9cb68f842629(a3, b) : result[key] = b !== void 0 ? b : a3;
- }
- }
- return result;
- }
-
- // ../../node_modules/@react-aria/utils/dist/mergeRefs.mjs
- function $5dc95899b306f630$export$c9058316764c140e(...refs) {
- return refs.length === 1 && refs[0] ? refs[0] : (value) => {
- let hasCleanup = !1, cleanups = refs.map((ref) => {
- let cleanup = $5dc95899b306f630$var$setRef(ref, value);
- return hasCleanup || (hasCleanup = typeof cleanup == "function"), cleanup;
- });
- if (hasCleanup) return () => {
- cleanups.forEach((cleanup, i) => {
- typeof cleanup == "function" ? cleanup() : $5dc95899b306f630$var$setRef(refs[i], null);
- });
- };
- };
- }
- function $5dc95899b306f630$var$setRef(ref, value) {
- if (typeof ref == "function") return ref(value);
- ref != null && (ref.current = value);
- }
-
- // ../../node_modules/@react-aria/utils/dist/filterDOMProps.mjs
- var $65484d02dcb7eb3e$var$DOMPropNames = /* @__PURE__ */ new Set([
- "id"
- ]), $65484d02dcb7eb3e$var$labelablePropNames = /* @__PURE__ */ new Set([
- "aria-label",
- "aria-labelledby",
- "aria-describedby",
- "aria-details"
- ]), $65484d02dcb7eb3e$var$linkPropNames = /* @__PURE__ */ new Set([
- "href",
- "hrefLang",
- "target",
- "rel",
- "download",
- "ping",
- "referrerPolicy"
- ]), $65484d02dcb7eb3e$var$globalAttrs = /* @__PURE__ */ new Set([
- "dir",
- "lang",
- "hidden",
- "inert",
- "translate"
- ]), $65484d02dcb7eb3e$var$globalEvents = /* @__PURE__ */ new Set([
- "onClick",
- "onAuxClick",
- "onContextMenu",
- "onDoubleClick",
- "onMouseDown",
- "onMouseEnter",
- "onMouseLeave",
- "onMouseMove",
- "onMouseOut",
- "onMouseOver",
- "onMouseUp",
- "onTouchCancel",
- "onTouchEnd",
- "onTouchMove",
- "onTouchStart",
- "onPointerDown",
- "onPointerMove",
- "onPointerUp",
- "onPointerCancel",
- "onPointerEnter",
- "onPointerLeave",
- "onPointerOver",
- "onPointerOut",
- "onGotPointerCapture",
- "onLostPointerCapture",
- "onScroll",
- "onWheel",
- "onAnimationStart",
- "onAnimationEnd",
- "onAnimationIteration",
- "onTransitionCancel",
- "onTransitionEnd",
- "onTransitionRun",
- "onTransitionStart"
- ]), $65484d02dcb7eb3e$var$propRe = /^(data-.*)$/;
- function $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, opts = {}) {
- let { labelable, isLink: isLink2, global: global2, events: events2 = global2, propNames } = opts, filteredProps = {};
- for (let prop in props) Object.prototype.hasOwnProperty.call(props, prop) && ($65484d02dcb7eb3e$var$DOMPropNames.has(prop) || labelable && $65484d02dcb7eb3e$var$labelablePropNames.has(prop) || isLink2 && $65484d02dcb7eb3e$var$linkPropNames.has(prop) || global2 && $65484d02dcb7eb3e$var$globalAttrs.has(prop) || events2 && ($65484d02dcb7eb3e$var$globalEvents.has(prop) || prop.endsWith("Capture") && $65484d02dcb7eb3e$var$globalEvents.has(prop.slice(0, -7))) || propNames?.has(prop) || $65484d02dcb7eb3e$var$propRe.test(prop)) && (filteredProps[prop] = props[prop]);
- return filteredProps;
- }
-
- // ../../node_modules/@react-aria/utils/dist/focusWithoutScrolling.mjs
- function $7215afc6de606d6b$export$de79e2c695e052f3(element) {
- if ($7215afc6de606d6b$var$supportsPreventScroll()) element.focus({
- preventScroll: !0
- });
- else {
- let scrollableElements = $7215afc6de606d6b$var$getScrollableElements(element);
- element.focus(), $7215afc6de606d6b$var$restoreScrollPosition(scrollableElements);
- }
- }
- var $7215afc6de606d6b$var$supportsPreventScrollCached = null;
- function $7215afc6de606d6b$var$supportsPreventScroll() {
- if ($7215afc6de606d6b$var$supportsPreventScrollCached == null) {
- $7215afc6de606d6b$var$supportsPreventScrollCached = !1;
- try {
- document.createElement("div").focus({
- get preventScroll() {
- return $7215afc6de606d6b$var$supportsPreventScrollCached = !0, !0;
- }
- });
- } catch {
- }
- }
- return $7215afc6de606d6b$var$supportsPreventScrollCached;
- }
- function $7215afc6de606d6b$var$getScrollableElements(element) {
- let parent = element.parentNode, scrollableElements = [], rootScrollingElement = document.scrollingElement || document.documentElement;
- for (; parent instanceof HTMLElement && parent !== rootScrollingElement; )
- (parent.offsetHeight < parent.scrollHeight || parent.offsetWidth < parent.scrollWidth) && scrollableElements.push({
- element: parent,
- scrollTop: parent.scrollTop,
- scrollLeft: parent.scrollLeft
- }), parent = parent.parentNode;
- return rootScrollingElement instanceof HTMLElement && scrollableElements.push({
- element: rootScrollingElement,
- scrollTop: rootScrollingElement.scrollTop,
- scrollLeft: rootScrollingElement.scrollLeft
- }), scrollableElements;
- }
- function $7215afc6de606d6b$var$restoreScrollPosition(scrollableElements) {
- for (let { element, scrollTop, scrollLeft } of scrollableElements)
- element.scrollTop = scrollTop, element.scrollLeft = scrollLeft;
- }
-
- // ../../node_modules/@react-aria/utils/dist/platform.mjs
- function $c87311424ea30a05$var$testUserAgent(re) {
- var _window_navigator_userAgentData;
- if (typeof window > "u" || window.navigator == null) return !1;
- let brands = (_window_navigator_userAgentData = window.navigator.userAgentData) === null || _window_navigator_userAgentData === void 0 ? void 0 : _window_navigator_userAgentData.brands;
- return Array.isArray(brands) && brands.some((brand) => re.test(brand.brand)) || re.test(window.navigator.userAgent);
- }
- function $c87311424ea30a05$var$testPlatform(re) {
- var _window_navigator_userAgentData;
- return typeof window < "u" && window.navigator != null ? re.test(((_window_navigator_userAgentData = window.navigator.userAgentData) === null || _window_navigator_userAgentData === void 0 ? void 0 : _window_navigator_userAgentData.platform) || window.navigator.platform) : !1;
- }
- function $c87311424ea30a05$var$cached(fn4) {
- let res = null;
- return () => (res == null && (res = fn4()), res);
- }
- var $c87311424ea30a05$export$9ac100e40613ea10 = $c87311424ea30a05$var$cached(function() {
- return $c87311424ea30a05$var$testPlatform(/^Mac/i);
- }), $c87311424ea30a05$export$186c6964ca17d99 = $c87311424ea30a05$var$cached(function() {
- return $c87311424ea30a05$var$testPlatform(/^iPhone/i);
- }), $c87311424ea30a05$export$7bef049ce92e4224 = $c87311424ea30a05$var$cached(function() {
- return $c87311424ea30a05$var$testPlatform(/^iPad/i) || // iPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support.
- $c87311424ea30a05$export$9ac100e40613ea10() && navigator.maxTouchPoints > 1;
- }), $c87311424ea30a05$export$fedb369cb70207f1 = $c87311424ea30a05$var$cached(function() {
- return $c87311424ea30a05$export$186c6964ca17d99() || $c87311424ea30a05$export$7bef049ce92e4224();
- }), $c87311424ea30a05$export$e1865c3bedcd822b = $c87311424ea30a05$var$cached(function() {
- return $c87311424ea30a05$export$9ac100e40613ea10() || $c87311424ea30a05$export$fedb369cb70207f1();
- }), $c87311424ea30a05$export$78551043582a6a98 = $c87311424ea30a05$var$cached(function() {
- return $c87311424ea30a05$var$testUserAgent(/AppleWebKit/i) && !$c87311424ea30a05$export$6446a186d09e379e();
- }), $c87311424ea30a05$export$6446a186d09e379e = $c87311424ea30a05$var$cached(function() {
- return $c87311424ea30a05$var$testUserAgent(/Chrome/i);
- }), $c87311424ea30a05$export$a11b0059900ceec8 = $c87311424ea30a05$var$cached(function() {
- return $c87311424ea30a05$var$testUserAgent(/Android/i);
- }), $c87311424ea30a05$export$b7d78993b74f766d = $c87311424ea30a05$var$cached(function() {
- return $c87311424ea30a05$var$testUserAgent(/Firefox/i);
- });
-
- // ../../node_modules/@react-aria/utils/dist/openLink.mjs
- var import_react29 = __toESM(require_react(), 1), $ea8dcbcb9ea1b556$var$RouterContext = (0, import_react29.createContext)({
- isNative: !0,
- open: $ea8dcbcb9ea1b556$var$openSyntheticLink,
- useHref: (href) => href
- });
- function $ea8dcbcb9ea1b556$export$9a302a45f65d0572() {
- return (0, import_react29.useContext)($ea8dcbcb9ea1b556$var$RouterContext);
- }
- function $ea8dcbcb9ea1b556$export$efa8c9099e530235(link, modifiers) {
- let target = link.getAttribute("target");
- return (!target || target === "_self") && link.origin === location.origin && !link.hasAttribute("download") && !modifiers.metaKey && // open in new tab (mac)
- !modifiers.ctrlKey && // open in new tab (windows)
- !modifiers.altKey && // download
- !modifiers.shiftKey;
- }
- function $ea8dcbcb9ea1b556$export$95185d699e05d4d7(target, modifiers, setOpening = !0) {
- var _window_event_type, _window_event;
- let { metaKey, ctrlKey, altKey, shiftKey } = modifiers;
- $c87311424ea30a05$export$b7d78993b74f766d() && (!((_window_event = window.event) === null || _window_event === void 0 || (_window_event_type = _window_event.type) === null || _window_event_type === void 0) && _window_event_type.startsWith("key")) && target.target === "_blank" && ($c87311424ea30a05$export$9ac100e40613ea10() ? metaKey = !0 : ctrlKey = !0);
- let event = $c87311424ea30a05$export$78551043582a6a98() && $c87311424ea30a05$export$9ac100e40613ea10() && !$c87311424ea30a05$export$7bef049ce92e4224() ? new KeyboardEvent("keydown", {
- keyIdentifier: "Enter",
- metaKey,
- ctrlKey,
- altKey,
- shiftKey
- }) : new MouseEvent("click", {
- metaKey,
- ctrlKey,
- altKey,
- shiftKey,
- detail: 1,
- bubbles: !0,
- cancelable: !0
- });
- $ea8dcbcb9ea1b556$export$95185d699e05d4d7.isOpening = setOpening, $7215afc6de606d6b$export$de79e2c695e052f3(target), target.dispatchEvent(event), $ea8dcbcb9ea1b556$export$95185d699e05d4d7.isOpening = !1;
- }
- $ea8dcbcb9ea1b556$export$95185d699e05d4d7.isOpening = !1;
- function $ea8dcbcb9ea1b556$var$getSyntheticLink(target, open) {
- if (target instanceof HTMLAnchorElement) open(target);
- else if (target.hasAttribute("data-href")) {
- let link = document.createElement("a");
- link.href = target.getAttribute("data-href"), target.hasAttribute("data-target") && (link.target = target.getAttribute("data-target")), target.hasAttribute("data-rel") && (link.rel = target.getAttribute("data-rel")), target.hasAttribute("data-download") && (link.download = target.getAttribute("data-download")), target.hasAttribute("data-ping") && (link.ping = target.getAttribute("data-ping")), target.hasAttribute("data-referrer-policy") && (link.referrerPolicy = target.getAttribute("data-referrer-policy")), target.appendChild(link), open(link), target.removeChild(link);
- }
- }
- function $ea8dcbcb9ea1b556$var$openSyntheticLink(target, modifiers) {
- $ea8dcbcb9ea1b556$var$getSyntheticLink(target, (link) => $ea8dcbcb9ea1b556$export$95185d699e05d4d7(link, modifiers));
- }
- function $ea8dcbcb9ea1b556$export$7e924b3091a3bd18(props) {
- let router = $ea8dcbcb9ea1b556$export$9a302a45f65d0572();
- var _props_href;
- let href = router.useHref((_props_href = props?.href) !== null && _props_href !== void 0 ? _props_href : "");
- return {
- href: props?.href ? href : void 0,
- target: props?.target,
- rel: props?.rel,
- download: props?.download,
- ping: props?.ping,
- referrerPolicy: props?.referrerPolicy
- };
- }
- function $ea8dcbcb9ea1b556$export$13aea1a3cb5e3f1f(e, router, href, routerOptions) {
- !router.isNative && e.currentTarget instanceof HTMLAnchorElement && e.currentTarget.href && // If props are applied to a router Link component, it may have already prevented default.
- !e.isDefaultPrevented() && $ea8dcbcb9ea1b556$export$efa8c9099e530235(e.currentTarget, e) && href && (e.preventDefault(), router.open(e.currentTarget, e, href, routerOptions));
- }
-
- // ../../node_modules/@react-aria/utils/dist/runAfterTransition.mjs
- var $bbed8b41f857bcc0$var$transitionsByElement = /* @__PURE__ */ new Map(), $bbed8b41f857bcc0$var$transitionCallbacks = /* @__PURE__ */ new Set();
- function $bbed8b41f857bcc0$var$setupGlobalEvents() {
- if (typeof window > "u") return;
- function isTransitionEvent(event) {
- return "propertyName" in event;
- }
- let onTransitionStart = (e) => {
- if (!isTransitionEvent(e) || !e.target) return;
- let transitions = $bbed8b41f857bcc0$var$transitionsByElement.get(e.target);
- transitions || (transitions = /* @__PURE__ */ new Set(), $bbed8b41f857bcc0$var$transitionsByElement.set(e.target, transitions), e.target.addEventListener("transitioncancel", onTransitionEnd, {
- once: !0
- })), transitions.add(e.propertyName);
- }, onTransitionEnd = (e) => {
- if (!isTransitionEvent(e) || !e.target) return;
- let properties = $bbed8b41f857bcc0$var$transitionsByElement.get(e.target);
- if (properties && (properties.delete(e.propertyName), properties.size === 0 && (e.target.removeEventListener("transitioncancel", onTransitionEnd), $bbed8b41f857bcc0$var$transitionsByElement.delete(e.target)), $bbed8b41f857bcc0$var$transitionsByElement.size === 0)) {
- for (let cb of $bbed8b41f857bcc0$var$transitionCallbacks) cb();
- $bbed8b41f857bcc0$var$transitionCallbacks.clear();
- }
- };
- document.body.addEventListener("transitionrun", onTransitionStart), document.body.addEventListener("transitionend", onTransitionEnd);
- }
- typeof document < "u" && (document.readyState !== "loading" ? $bbed8b41f857bcc0$var$setupGlobalEvents() : document.addEventListener("DOMContentLoaded", $bbed8b41f857bcc0$var$setupGlobalEvents));
- function $bbed8b41f857bcc0$var$cleanupDetachedElements() {
- for (let [eventTarget] of $bbed8b41f857bcc0$var$transitionsByElement)
- "isConnected" in eventTarget && !eventTarget.isConnected && $bbed8b41f857bcc0$var$transitionsByElement.delete(eventTarget);
- }
- function $bbed8b41f857bcc0$export$24490316f764c430(fn4) {
- requestAnimationFrame(() => {
- $bbed8b41f857bcc0$var$cleanupDetachedElements(), $bbed8b41f857bcc0$var$transitionsByElement.size === 0 ? fn4() : $bbed8b41f857bcc0$var$transitionCallbacks.add(fn4);
- });
- }
-
- // ../../node_modules/@react-aria/utils/dist/useDrag1D.mjs
- var import_react30 = __toESM(require_react(), 1);
-
- // ../../node_modules/@react-aria/utils/dist/useGlobalListeners.mjs
- var import_react31 = __toESM(require_react(), 1);
- function $03deb23ff14920c4$export$4eaf04e54aa8eed6() {
- let globalListeners = (0, import_react31.useRef)(/* @__PURE__ */ new Map()), addGlobalListener = (0, import_react31.useCallback)((eventTarget, type5, listener, options) => {
- let fn4 = options?.once ? (...args) => {
- globalListeners.current.delete(listener), listener(...args);
- } : listener;
- globalListeners.current.set(listener, {
- type: type5,
- eventTarget,
- fn: fn4,
- options
- }), eventTarget.addEventListener(type5, fn4, options);
- }, []), removeGlobalListener = (0, import_react31.useCallback)((eventTarget, type5, listener, options) => {
- var _globalListeners_current_get;
- let fn4 = ((_globalListeners_current_get = globalListeners.current.get(listener)) === null || _globalListeners_current_get === void 0 ? void 0 : _globalListeners_current_get.fn) || listener;
- eventTarget.removeEventListener(type5, fn4, options), globalListeners.current.delete(listener);
- }, []), removeAllGlobalListeners = (0, import_react31.useCallback)(() => {
- globalListeners.current.forEach((value, key) => {
- removeGlobalListener(value.eventTarget, value.type, key, value.options);
- });
- }, [
- removeGlobalListener
- ]);
- return (0, import_react31.useEffect)(() => removeAllGlobalListeners, [
- removeAllGlobalListeners
- ]), {
- addGlobalListener,
- removeGlobalListener,
- removeAllGlobalListeners
- };
- }
-
- // ../../node_modules/@react-aria/utils/dist/useLabels.mjs
- function $313b98861ee5dd6c$export$d6875122194c7b44(props, defaultLabel) {
- let { id, "aria-label": label, "aria-labelledby": labelledBy } = props;
- return id = $bdb11010cef70236$export$f680877a34711e37(id), labelledBy && label ? labelledBy = [
- .../* @__PURE__ */ new Set([
- id,
- ...labelledBy.trim().split(/\s+/)
- ])
- ].join(" ") : labelledBy && (labelledBy = labelledBy.trim().split(/\s+/).join(" ")), !label && !labelledBy && defaultLabel && (label = defaultLabel), {
- id,
- "aria-label": label,
- "aria-labelledby": labelledBy
- };
- }
-
- // ../../node_modules/@react-aria/utils/dist/useObjectRef.mjs
- var import_react32 = __toESM(require_react(), 1);
- function $df56164dff5785e2$export$4338b53315abf666(ref) {
- let objRef = (0, import_react32.useRef)(null), cleanupRef = (0, import_react32.useRef)(void 0), refEffect = (0, import_react32.useCallback)((instance) => {
- if (typeof ref == "function") {
- let refCallback = ref, refCleanup = refCallback(instance);
- return () => {
- typeof refCleanup == "function" ? refCleanup() : refCallback(null);
- };
- } else if (ref)
- return ref.current = instance, () => {
- ref.current = null;
- };
- }, [
- ref
- ]);
- return (0, import_react32.useMemo)(() => ({
- get current() {
- return objRef.current;
- },
- set current(value) {
- objRef.current = value, cleanupRef.current && (cleanupRef.current(), cleanupRef.current = void 0), value != null && (cleanupRef.current = refEffect(value));
- }
- }), [
- refEffect
- ]);
- }
-
- // ../../node_modules/@react-aria/utils/dist/useEffectEvent.mjs
- var import_react33 = __toESM(require_react(), 1), $8ae05eaa5c114e9c$var$_React_useInsertionEffect, $8ae05eaa5c114e9c$var$useEarlyEffect = ($8ae05eaa5c114e9c$var$_React_useInsertionEffect = import_react33.default.useInsertionEffect) !== null && $8ae05eaa5c114e9c$var$_React_useInsertionEffect !== void 0 ? $8ae05eaa5c114e9c$var$_React_useInsertionEffect : $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c;
- function $8ae05eaa5c114e9c$export$7f54fc3180508a52(fn4) {
- let ref = (0, import_react33.useRef)(null);
- return $8ae05eaa5c114e9c$var$useEarlyEffect(() => {
- ref.current = fn4;
- }, [
- fn4
- ]), (0, import_react33.useCallback)((...args) => {
- let f4 = ref.current;
- return f4?.(...args);
- }, []);
- }
-
- // ../../node_modules/@react-aria/utils/dist/useUpdateEffect.mjs
- var import_react34 = __toESM(require_react(), 1);
-
- // ../../node_modules/@react-aria/utils/dist/useUpdateLayoutEffect.mjs
- var import_react35 = __toESM(require_react(), 1);
- function $ca9b37712f007381$export$72ef708ab07251f1(effect4, dependencies) {
- let isInitialMount = (0, import_react35.useRef)(!0), lastDeps = (0, import_react35.useRef)(null);
- $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => (isInitialMount.current = !0, () => {
- isInitialMount.current = !1;
- }), []), $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
- isInitialMount.current ? isInitialMount.current = !1 : (!lastDeps.current || dependencies.some((dep, i) => !Object.is(dep, lastDeps[i]))) && effect4(), lastDeps.current = dependencies;
- }, dependencies);
- }
-
- // ../../node_modules/@react-aria/utils/dist/useResizeObserver.mjs
- var import_react36 = __toESM(require_react(), 1);
- function $9daab02d461809db$var$hasResizeObserver() {
- return typeof window.ResizeObserver < "u";
- }
- function $9daab02d461809db$export$683480f191c0e3ea(options) {
- let { ref, box, onResize } = options, onResizeEvent = $8ae05eaa5c114e9c$export$7f54fc3180508a52(onResize);
- (0, import_react36.useEffect)(() => {
- let element = ref?.current;
- if (element)
- if ($9daab02d461809db$var$hasResizeObserver()) {
- let resizeObserverInstance = new window.ResizeObserver((entries) => {
- entries.length && onResizeEvent();
- });
- return resizeObserverInstance.observe(element, {
- box
- }), () => {
- element && resizeObserverInstance.unobserve(element);
- };
- } else
- return window.addEventListener("resize", onResizeEvent, !1), () => {
- window.removeEventListener("resize", onResizeEvent, !1);
- };
- }, [
- ref,
- box
- ]);
- }
-
- // ../../node_modules/@react-aria/utils/dist/useSyncRef.mjs
- function $e7801be82b4b2a53$export$4debdb1a3f0fa79e(context, ref) {
- $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
- if (context && context.ref && ref)
- return context.ref.current = ref.current, () => {
- context.ref && (context.ref.current = null);
- };
- });
- }
-
- // ../../node_modules/@react-aria/utils/dist/isScrollable.mjs
- function $cc38e7bd3fc7b213$export$2bb74740c4e19def(node2, checkForOverflow) {
- if (!node2) return !1;
- let style = window.getComputedStyle(node2), isScrollable = /(auto|scroll)/.test(style.overflow + style.overflowX + style.overflowY);
- return isScrollable && checkForOverflow && (isScrollable = node2.scrollHeight !== node2.clientHeight || node2.scrollWidth !== node2.clientWidth), isScrollable;
- }
-
- // ../../node_modules/@react-aria/utils/dist/getScrollParent.mjs
- function $62d8ded9296f3872$export$cfa2225e87938781(node2, checkForOverflow) {
- let scrollableNode = node2;
- for ($cc38e7bd3fc7b213$export$2bb74740c4e19def(scrollableNode, checkForOverflow) && (scrollableNode = scrollableNode.parentElement); scrollableNode && !$cc38e7bd3fc7b213$export$2bb74740c4e19def(scrollableNode, checkForOverflow); ) scrollableNode = scrollableNode.parentElement;
- return scrollableNode || document.scrollingElement || document.documentElement;
- }
-
- // ../../node_modules/@react-aria/utils/dist/getScrollParents.mjs
- function $a40c673dc9f6d9c7$export$94ed1c92c7beeb22(node2, checkForOverflow) {
- let scrollParents = [];
- for (; node2 && node2 !== document.documentElement; )
- $cc38e7bd3fc7b213$export$2bb74740c4e19def(node2, checkForOverflow) && scrollParents.push(node2), node2 = node2.parentElement;
- return scrollParents;
- }
-
- // ../../node_modules/@react-aria/utils/dist/keyboard.mjs
- function $21f1aa98acb08317$export$16792effe837dba3(e) {
- return $c87311424ea30a05$export$9ac100e40613ea10() ? e.metaKey : e.ctrlKey;
- }
- var $21f1aa98acb08317$var$nonTextInputTypes = /* @__PURE__ */ new Set([
- "checkbox",
- "radio",
- "range",
- "color",
- "file",
- "image",
- "button",
- "submit",
- "reset"
- ]);
- function $21f1aa98acb08317$export$c57958e35f31ed73(target) {
- return target instanceof HTMLInputElement && !$21f1aa98acb08317$var$nonTextInputTypes.has(target.type) || target instanceof HTMLTextAreaElement || target instanceof HTMLElement && target.isContentEditable;
- }
-
- // ../../node_modules/@react-aria/utils/dist/useViewportSize.mjs
- var import_react37 = __toESM(require_react(), 1);
- var $5df64b3807dc15ee$var$visualViewport = typeof document < "u" && window.visualViewport;
-
- // ../../node_modules/@react-aria/utils/dist/useDescription.mjs
- var import_react38 = __toESM(require_react(), 1), $ef06256079686ba0$var$descriptionId = 0, $ef06256079686ba0$var$descriptionNodes = /* @__PURE__ */ new Map();
- function $ef06256079686ba0$export$f8aeda7b10753fa1(description) {
- let [id, setId] = (0, import_react38.useState)();
- return $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
- if (!description) return;
- let desc = $ef06256079686ba0$var$descriptionNodes.get(description);
- if (desc)
- setId(desc.element.id);
- else {
- let id2 = `react-aria-description-${$ef06256079686ba0$var$descriptionId++}`;
- setId(id2);
- let node2 = document.createElement("div");
- node2.id = id2, node2.style.display = "none", node2.textContent = description, document.body.appendChild(node2), desc = {
- refCount: 0,
- element: node2
- }, $ef06256079686ba0$var$descriptionNodes.set(description, desc);
- }
- return desc.refCount++, () => {
- desc && --desc.refCount === 0 && (desc.element.remove(), $ef06256079686ba0$var$descriptionNodes.delete(description));
- };
- }, [
- description
- ]), {
- "aria-describedby": description ? id : void 0
- };
- }
-
- // ../../node_modules/@react-aria/utils/dist/useEvent.mjs
- var import_react39 = __toESM(require_react(), 1);
- function $e9faafb641e167db$export$90fc3a17d93f704c(ref, event, handler, options) {
- let handleEvent = $8ae05eaa5c114e9c$export$7f54fc3180508a52(handler), isDisabled3 = handler == null;
- (0, import_react39.useEffect)(() => {
- if (isDisabled3 || !ref.current) return;
- let element = ref.current;
- return element.addEventListener(event, handleEvent, options), () => {
- element.removeEventListener(event, handleEvent, options);
- };
- }, [
- ref,
- event,
- options,
- isDisabled3
- ]);
- }
-
- // ../../node_modules/@react-aria/utils/dist/scrollIntoView.mjs
- function $2f04cbc44ee30ce0$export$53a0910f038337bd(scrollView, element) {
- let offsetX = $2f04cbc44ee30ce0$var$relativeOffset(scrollView, element, "left"), offsetY = $2f04cbc44ee30ce0$var$relativeOffset(scrollView, element, "top"), width = element.offsetWidth, height = element.offsetHeight, x = scrollView.scrollLeft, y = scrollView.scrollTop, { borderTopWidth, borderLeftWidth, scrollPaddingTop, scrollPaddingRight, scrollPaddingBottom, scrollPaddingLeft } = getComputedStyle(scrollView), borderAdjustedX = x + parseInt(borderLeftWidth, 10), borderAdjustedY = y + parseInt(borderTopWidth, 10), maxX = borderAdjustedX + scrollView.clientWidth, maxY = borderAdjustedY + scrollView.clientHeight, scrollPaddingTopNumber = parseInt(scrollPaddingTop, 10) || 0, scrollPaddingBottomNumber = parseInt(scrollPaddingBottom, 10) || 0, scrollPaddingRightNumber = parseInt(scrollPaddingRight, 10) || 0, scrollPaddingLeftNumber = parseInt(scrollPaddingLeft, 10) || 0;
- offsetX <= x + scrollPaddingLeftNumber ? x = offsetX - parseInt(borderLeftWidth, 10) - scrollPaddingLeftNumber : offsetX + width > maxX - scrollPaddingRightNumber && (x += offsetX + width - maxX + scrollPaddingRightNumber), offsetY <= borderAdjustedY + scrollPaddingTopNumber ? y = offsetY - parseInt(borderTopWidth, 10) - scrollPaddingTopNumber : offsetY + height > maxY - scrollPaddingBottomNumber && (y += offsetY + height - maxY + scrollPaddingBottomNumber), scrollView.scrollLeft = x, scrollView.scrollTop = y;
- }
- function $2f04cbc44ee30ce0$var$relativeOffset(ancestor, child, axis) {
- let prop = axis === "left" ? "offsetLeft" : "offsetTop", sum = 0;
- for (; child.offsetParent && (sum += child[prop], child.offsetParent !== ancestor); ) {
- if (child.offsetParent.contains(ancestor)) {
- sum -= ancestor[prop];
- break;
- }
- child = child.offsetParent;
- }
- return sum;
- }
- function $2f04cbc44ee30ce0$export$c826860796309d1b(targetElement, opts) {
- if (targetElement && document.contains(targetElement)) {
- let root2 = document.scrollingElement || document.documentElement, isScrollPrevented = window.getComputedStyle(root2).overflow === "hidden";
- if (isScrollPrevented) {
- let scrollParents = $a40c673dc9f6d9c7$export$94ed1c92c7beeb22(targetElement);
- isScrollPrevented || scrollParents.push(root2);
- for (let scrollParent of scrollParents) $2f04cbc44ee30ce0$export$53a0910f038337bd(scrollParent, targetElement);
- } else {
- var _targetElement_scrollIntoView;
- let { left: originalLeft, top: originalTop } = targetElement.getBoundingClientRect();
- targetElement == null || (_targetElement_scrollIntoView = targetElement.scrollIntoView) === null || _targetElement_scrollIntoView === void 0 || _targetElement_scrollIntoView.call(targetElement, {
- block: "nearest"
- });
- let { left: newLeft, top: newTop } = targetElement.getBoundingClientRect();
- if (Math.abs(originalLeft - newLeft) > 1 || Math.abs(originalTop - newTop) > 1) {
- var _opts_containingElement_scrollIntoView, _opts_containingElement, _targetElement_scrollIntoView1;
- opts == null || (_opts_containingElement = opts.containingElement) === null || _opts_containingElement === void 0 || (_opts_containingElement_scrollIntoView = _opts_containingElement.scrollIntoView) === null || _opts_containingElement_scrollIntoView === void 0 || _opts_containingElement_scrollIntoView.call(_opts_containingElement, {
- block: "center",
- inline: "center"
- }), (_targetElement_scrollIntoView1 = targetElement.scrollIntoView) === null || _targetElement_scrollIntoView1 === void 0 || _targetElement_scrollIntoView1.call(targetElement, {
- block: "nearest"
- });
- }
- }
- }
- }
-
- // ../../node_modules/@react-aria/utils/dist/isVirtualEvent.mjs
- function $6a7db85432448f7f$export$60278871457622de(event) {
- return event.pointerType === "" && event.isTrusted ? !0 : $c87311424ea30a05$export$a11b0059900ceec8() && event.pointerType ? event.type === "click" && event.buttons === 1 : event.detail === 0 && !event.pointerType;
- }
- function $6a7db85432448f7f$export$29bf1b5f2c56cf63(event) {
- return !$c87311424ea30a05$export$a11b0059900ceec8() && event.width === 0 && event.height === 0 || event.width === 1 && event.height === 1 && event.pressure === 0 && event.detail === 0 && event.pointerType === "mouse";
- }
-
- // ../../node_modules/@react-aria/utils/dist/useDeepMemo.mjs
- var import_react40 = __toESM(require_react(), 1);
-
- // ../../node_modules/@react-aria/utils/dist/useFormReset.mjs
- var import_react41 = __toESM(require_react(), 1);
-
- // ../../node_modules/@react-aria/utils/dist/useLoadMore.mjs
- var import_react42 = __toESM(require_react(), 1);
-
- // ../../node_modules/@react-aria/utils/dist/useLoadMoreSentinel.mjs
- var import_react43 = __toESM(require_react(), 1);
-
- // ../../node_modules/@react-aria/utils/dist/inertValue.mjs
- var import_react44 = __toESM(require_react(), 1);
- function $cdc5a6778b766db2$export$a9d04c5684123369(value) {
- let pieces = import_react44.version.split(".");
- return parseInt(pieces[0], 10) >= 19 ? value : value ? "true" : void 0;
- }
-
- // ../../node_modules/@react-aria/utils/dist/constants.mjs
- var $5671b20cf9b562b2$export$447a38995de2c711 = "react-aria-clear-focus", $5671b20cf9b562b2$export$831c820ad60f9d12 = "react-aria-focus";
-
- // ../../node_modules/@react-aria/utils/dist/animation.mjs
- var import_react_dom = __toESM(require_react_dom(), 1), import_react45 = __toESM(require_react(), 1);
- function $d3f049242431219c$export$6d3443f2c48bfc20(ref, isReady = !0) {
- let [isEntering, setEntering] = (0, import_react45.useState)(!0), isAnimationReady = isEntering && isReady;
- return $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
- if (isAnimationReady && ref.current && "getAnimations" in ref.current)
- for (let animation2 of ref.current.getAnimations()) animation2 instanceof CSSTransition && animation2.cancel();
- }, [
- ref,
- isAnimationReady
- ]), $d3f049242431219c$var$useAnimation(ref, isAnimationReady, (0, import_react45.useCallback)(() => setEntering(!1), [])), isAnimationReady;
- }
- function $d3f049242431219c$export$45fda7c47f93fd48(ref, isOpen) {
- let [exitState, setExitState] = (0, import_react45.useState)(isOpen ? "open" : "closed");
- switch (exitState) {
- case "open":
- isOpen || setExitState("exiting");
- break;
- case "closed":
- case "exiting":
- isOpen && setExitState("open");
- break;
- }
- let isExiting = exitState === "exiting";
- return $d3f049242431219c$var$useAnimation(ref, isExiting, (0, import_react45.useCallback)(() => {
- setExitState((state3) => state3 === "exiting" ? "closed" : state3);
- }, [])), isExiting;
- }
- function $d3f049242431219c$var$useAnimation(ref, isActive, onEnd) {
- $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
- if (isActive && ref.current) {
- if (!("getAnimations" in ref.current)) {
- onEnd();
- return;
- }
- let animations = ref.current.getAnimations();
- if (animations.length === 0) {
- onEnd();
- return;
- }
- let canceled = !1;
- return Promise.all(animations.map((a3) => a3.finished)).then(() => {
- canceled || (0, import_react_dom.flushSync)(() => {
- onEnd();
- });
- }).catch(() => {
- }), () => {
- canceled = !0;
- };
- }
- }, [
- ref,
- isActive,
- onEnd
- ]);
- }
-
- // ../../node_modules/@react-aria/utils/dist/isElementVisible.mjs
- var $7d2416ea0959daaa$var$supportsCheckVisibility = typeof Element < "u" && "checkVisibility" in Element.prototype;
- function $7d2416ea0959daaa$var$isStyleVisible(element) {
- let windowObject = $431fbd86ca7dc216$export$f21a1ffae260145a(element);
- if (!(element instanceof windowObject.HTMLElement) && !(element instanceof windowObject.SVGElement)) return !1;
- let { display: display2, visibility } = element.style, isVisible2 = display2 !== "none" && visibility !== "hidden" && visibility !== "collapse";
- if (isVisible2) {
- let { getComputedStyle: getComputedStyle3 } = element.ownerDocument.defaultView, { display: computedDisplay, visibility: computedVisibility } = getComputedStyle3(element);
- isVisible2 = computedDisplay !== "none" && computedVisibility !== "hidden" && computedVisibility !== "collapse";
- }
- return isVisible2;
- }
- function $7d2416ea0959daaa$var$isAttributeVisible(element, childElement) {
- return !element.hasAttribute("hidden") && // Ignore HiddenSelect when tree walking.
- !element.hasAttribute("data-react-aria-prevent-focus") && (element.nodeName === "DETAILS" && childElement && childElement.nodeName !== "SUMMARY" ? element.hasAttribute("open") : !0);
- }
- function $7d2416ea0959daaa$export$e989c0fffaa6b27a(element, childElement) {
- return $7d2416ea0959daaa$var$supportsCheckVisibility ? element.checkVisibility({
- visibilityProperty: !0
- }) && !element.closest("[data-react-aria-prevent-focus]") : element.nodeName !== "#comment" && $7d2416ea0959daaa$var$isStyleVisible(element) && $7d2416ea0959daaa$var$isAttributeVisible(element, childElement) && (!element.parentElement || $7d2416ea0959daaa$export$e989c0fffaa6b27a(element.parentElement, element));
- }
-
- // ../../node_modules/@react-aria/utils/dist/isFocusable.mjs
- var $b4b717babfbb907b$var$focusableElements = [
- "input:not([disabled]):not([type=hidden])",
- "select:not([disabled])",
- "textarea:not([disabled])",
- "button:not([disabled])",
- "a[href]",
- "area[href]",
- "summary",
- "iframe",
- "object",
- "embed",
- "audio[controls]",
- "video[controls]",
- '[contenteditable]:not([contenteditable^="false"])',
- "permission"
- ], $b4b717babfbb907b$var$FOCUSABLE_ELEMENT_SELECTOR = $b4b717babfbb907b$var$focusableElements.join(":not([hidden]),") + ",[tabindex]:not([disabled]):not([hidden])";
- $b4b717babfbb907b$var$focusableElements.push('[tabindex]:not([tabindex="-1"]):not([disabled])');
- var $b4b717babfbb907b$var$TABBABLE_ELEMENT_SELECTOR = $b4b717babfbb907b$var$focusableElements.join(':not([hidden]):not([tabindex="-1"]),');
- function $b4b717babfbb907b$export$4c063cf1350e6fed(element) {
- return element.matches($b4b717babfbb907b$var$FOCUSABLE_ELEMENT_SELECTOR) && $7d2416ea0959daaa$export$e989c0fffaa6b27a(element) && !$b4b717babfbb907b$var$isInert(element);
- }
- function $b4b717babfbb907b$export$bebd5a1431fec25d(element) {
- return element.matches($b4b717babfbb907b$var$TABBABLE_ELEMENT_SELECTOR) && $7d2416ea0959daaa$export$e989c0fffaa6b27a(element) && !$b4b717babfbb907b$var$isInert(element);
- }
- function $b4b717babfbb907b$var$isInert(element) {
- let node2 = element;
- for (; node2 != null; ) {
- if (node2 instanceof node2.ownerDocument.defaultView.HTMLElement && node2.inert) return !0;
- node2 = node2.parentElement;
- }
- return !1;
- }
-
- // ../../node_modules/@react-stately/utils/dist/useControlledState.mjs
- var import_react46 = __toESM(require_react(), 1), $458b0a5536c1a7cf$var$_React_useInsertionEffect, $458b0a5536c1a7cf$var$useEarlyEffect = typeof document < "u" ? ($458b0a5536c1a7cf$var$_React_useInsertionEffect = import_react46.default.useInsertionEffect) !== null && $458b0a5536c1a7cf$var$_React_useInsertionEffect !== void 0 ? $458b0a5536c1a7cf$var$_React_useInsertionEffect : import_react46.default.useLayoutEffect : () => {
- };
- function $458b0a5536c1a7cf$export$40bfa8c7b0832715(value, defaultValue, onChange) {
- let [stateValue, setStateValue] = (0, import_react46.useState)(value || defaultValue), valueRef = (0, import_react46.useRef)(stateValue), isControlledRef = (0, import_react46.useRef)(value !== void 0), isControlled = value !== void 0;
- (0, import_react46.useEffect)(() => {
- let wasControlled = isControlledRef.current;
- isControlledRef.current = isControlled;
- }, [
- isControlled
- ]);
- let currentValue = isControlled ? value : stateValue;
- $458b0a5536c1a7cf$var$useEarlyEffect(() => {
- valueRef.current = currentValue;
- });
- let [, forceUpdate] = (0, import_react46.useReducer)(() => ({}), {}), setValue = (0, import_react46.useCallback)((value2, ...args) => {
- let newValue = typeof value2 == "function" ? value2(valueRef.current) : value2;
- Object.is(valueRef.current, newValue) || (valueRef.current = newValue, setStateValue(newValue), forceUpdate(), onChange?.(newValue, ...args));
- }, [
- onChange
- ]);
- return [
- currentValue,
- setValue
- ];
- }
-
- // ../../node_modules/@react-stately/utils/dist/number.mjs
- function $9446cca9a3875146$export$7d15b64cf5a3a4c4(value, min2 = -1 / 0, max2 = 1 / 0) {
- return Math.min(Math.max(value, min2), max2);
- }
-
- // ../../node_modules/@react-aria/interactions/dist/utils.mjs
- var import_react47 = __toESM(require_react(), 1);
- function $8a9cb279dc87e130$export$525bc4921d56d4a(nativeEvent) {
- let event = nativeEvent;
- return event.nativeEvent = nativeEvent, event.isDefaultPrevented = () => event.defaultPrevented, event.isPropagationStopped = () => event.cancelBubble, event.persist = () => {
- }, event;
- }
- function $8a9cb279dc87e130$export$c2b7abe5d61ec696(event, target) {
- Object.defineProperty(event, "target", {
- value: target
- }), Object.defineProperty(event, "currentTarget", {
- value: target
- });
- }
- function $8a9cb279dc87e130$export$715c682d09d639cc(onBlur) {
- let stateRef = (0, import_react47.useRef)({
- isFocused: !1,
- observer: null
- });
- $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
- let state3 = stateRef.current;
- return () => {
- state3.observer && (state3.observer.disconnect(), state3.observer = null);
- };
- }, []);
- let dispatchBlur = $8ae05eaa5c114e9c$export$7f54fc3180508a52((e) => {
- onBlur?.(e);
- });
- return (0, import_react47.useCallback)((e) => {
- if (e.target instanceof HTMLButtonElement || e.target instanceof HTMLInputElement || e.target instanceof HTMLTextAreaElement || e.target instanceof HTMLSelectElement) {
- stateRef.current.isFocused = !0;
- let target = e.target, onBlurHandler = (e2) => {
- if (stateRef.current.isFocused = !1, target.disabled) {
- let event = $8a9cb279dc87e130$export$525bc4921d56d4a(e2);
- dispatchBlur(event);
- }
- stateRef.current.observer && (stateRef.current.observer.disconnect(), stateRef.current.observer = null);
- };
- target.addEventListener("focusout", onBlurHandler, {
- once: !0
- }), stateRef.current.observer = new MutationObserver(() => {
- if (stateRef.current.isFocused && target.disabled) {
- var _stateRef_current_observer;
- (_stateRef_current_observer = stateRef.current.observer) === null || _stateRef_current_observer === void 0 || _stateRef_current_observer.disconnect();
- let relatedTargetEl = target === document.activeElement ? null : document.activeElement;
- target.dispatchEvent(new FocusEvent("blur", {
- relatedTarget: relatedTargetEl
- })), target.dispatchEvent(new FocusEvent("focusout", {
- bubbles: !0,
- relatedTarget: relatedTargetEl
- }));
- }
- }), stateRef.current.observer.observe(target, {
- attributes: !0,
- attributeFilter: [
- "disabled"
- ]
- });
- }
- }, [
- dispatchBlur
- ]);
- }
- var $8a9cb279dc87e130$export$fda7da73ab5d4c48 = !1;
- function $8a9cb279dc87e130$export$cabe61c495ee3649(target) {
- for (; target && !$b4b717babfbb907b$export$4c063cf1350e6fed(target); ) target = target.parentElement;
- let window2 = $431fbd86ca7dc216$export$f21a1ffae260145a(target), activeElement = window2.document.activeElement;
- if (!activeElement || activeElement === target) return;
- $8a9cb279dc87e130$export$fda7da73ab5d4c48 = !0;
- let isRefocusing = !1, onBlur = (e) => {
- (e.target === activeElement || isRefocusing) && e.stopImmediatePropagation();
- }, onFocusOut = (e) => {
- (e.target === activeElement || isRefocusing) && (e.stopImmediatePropagation(), !target && !isRefocusing && (isRefocusing = !0, $7215afc6de606d6b$export$de79e2c695e052f3(activeElement), cleanup()));
- }, onFocus = (e) => {
- (e.target === target || isRefocusing) && e.stopImmediatePropagation();
- }, onFocusIn = (e) => {
- (e.target === target || isRefocusing) && (e.stopImmediatePropagation(), isRefocusing || (isRefocusing = !0, $7215afc6de606d6b$export$de79e2c695e052f3(activeElement), cleanup()));
- };
- window2.addEventListener("blur", onBlur, !0), window2.addEventListener("focusout", onFocusOut, !0), window2.addEventListener("focusin", onFocusIn, !0), window2.addEventListener("focus", onFocus, !0);
- let cleanup = () => {
- cancelAnimationFrame(raf), window2.removeEventListener("blur", onBlur, !0), window2.removeEventListener("focusout", onFocusOut, !0), window2.removeEventListener("focusin", onFocusIn, !0), window2.removeEventListener("focus", onFocus, !0), $8a9cb279dc87e130$export$fda7da73ab5d4c48 = !1, isRefocusing = !1;
- }, raf = requestAnimationFrame(cleanup);
- return cleanup;
- }
-
- // ../../node_modules/@react-aria/interactions/dist/textSelection.mjs
- var $14c0b72509d70225$var$state = "default", $14c0b72509d70225$var$savedUserSelect = "", $14c0b72509d70225$var$modifiedElementMap = /* @__PURE__ */ new WeakMap();
- function $14c0b72509d70225$export$16a4697467175487(target) {
- if ($c87311424ea30a05$export$fedb369cb70207f1()) {
- if ($14c0b72509d70225$var$state === "default") {
- let documentObject = $431fbd86ca7dc216$export$b204af158042fbac(target);
- $14c0b72509d70225$var$savedUserSelect = documentObject.documentElement.style.webkitUserSelect, documentObject.documentElement.style.webkitUserSelect = "none";
- }
- $14c0b72509d70225$var$state = "disabled";
- } else if (target instanceof HTMLElement || target instanceof SVGElement) {
- let property = "userSelect" in target.style ? "userSelect" : "webkitUserSelect";
- $14c0b72509d70225$var$modifiedElementMap.set(target, target.style[property]), target.style[property] = "none";
- }
- }
- function $14c0b72509d70225$export$b0d6fa1ab32e3295(target) {
- if ($c87311424ea30a05$export$fedb369cb70207f1()) {
- if ($14c0b72509d70225$var$state !== "disabled") return;
- $14c0b72509d70225$var$state = "restoring", setTimeout(() => {
- $bbed8b41f857bcc0$export$24490316f764c430(() => {
- if ($14c0b72509d70225$var$state === "restoring") {
- let documentObject = $431fbd86ca7dc216$export$b204af158042fbac(target);
- documentObject.documentElement.style.webkitUserSelect === "none" && (documentObject.documentElement.style.webkitUserSelect = $14c0b72509d70225$var$savedUserSelect || ""), $14c0b72509d70225$var$savedUserSelect = "", $14c0b72509d70225$var$state = "default";
- }
- });
- }, 300);
- } else if ((target instanceof HTMLElement || target instanceof SVGElement) && target && $14c0b72509d70225$var$modifiedElementMap.has(target)) {
- let targetOldUserSelect = $14c0b72509d70225$var$modifiedElementMap.get(target), property = "userSelect" in target.style ? "userSelect" : "webkitUserSelect";
- target.style[property] === "none" && (target.style[property] = targetOldUserSelect), target.getAttribute("style") === "" && target.removeAttribute("style"), $14c0b72509d70225$var$modifiedElementMap.delete(target);
- }
- }
-
- // ../../node_modules/@react-aria/interactions/dist/context.mjs
- var import_react48 = __toESM(require_react(), 1), $ae1eeba8b9eafd08$export$5165eccb35aaadb5 = import_react48.default.createContext({
- register: () => {
- }
- });
- $ae1eeba8b9eafd08$export$5165eccb35aaadb5.displayName = "PressResponderContext";
-
- // ../../node_modules/@swc/helpers/esm/_class_apply_descriptor_get.js
- function _class_apply_descriptor_get(receiver, descriptor) {
- return descriptor.get ? descriptor.get.call(receiver) : descriptor.value;
- }
-
- // ../../node_modules/@swc/helpers/esm/_class_extract_field_descriptor.js
- function _class_extract_field_descriptor(receiver, privateMap, action2) {
- if (!privateMap.has(receiver)) throw new TypeError("attempted to " + action2 + " private field on non-instance");
- return privateMap.get(receiver);
- }
-
- // ../../node_modules/@swc/helpers/esm/_class_private_field_get.js
- function _class_private_field_get(receiver, privateMap) {
- var descriptor = _class_extract_field_descriptor(receiver, privateMap, "get");
- return _class_apply_descriptor_get(receiver, descriptor);
- }
-
- // ../../node_modules/@swc/helpers/esm/_check_private_redeclaration.js
- function _check_private_redeclaration(obj, privateCollection) {
- if (privateCollection.has(obj))
- throw new TypeError("Cannot initialize the same private elements twice on an object");
- }
-
- // ../../node_modules/@swc/helpers/esm/_class_private_field_init.js
- function _class_private_field_init(obj, privateMap, value) {
- _check_private_redeclaration(obj, privateMap), privateMap.set(obj, value);
- }
-
- // ../../node_modules/@swc/helpers/esm/_class_apply_descriptor_set.js
- function _class_apply_descriptor_set(receiver, descriptor, value) {
- if (descriptor.set) descriptor.set.call(receiver, value);
- else {
- if (!descriptor.writable)
- throw new TypeError("attempted to set read only private field");
- descriptor.value = value;
- }
- }
-
- // ../../node_modules/@swc/helpers/esm/_class_private_field_set.js
- function _class_private_field_set(receiver, privateMap, value) {
- var descriptor = _class_extract_field_descriptor(receiver, privateMap, "set");
- return _class_apply_descriptor_set(receiver, descriptor, value), value;
- }
-
- // ../../node_modules/@react-aria/interactions/dist/usePress.mjs
- var import_react_dom2 = __toESM(require_react_dom(), 1), import_react49 = __toESM(require_react(), 1);
- function $f6c31cce2adf654f$var$usePressResponderContext(props) {
- let context = (0, import_react49.useContext)($ae1eeba8b9eafd08$export$5165eccb35aaadb5);
- if (context) {
- let { register, ...contextProps } = context;
- props = $3ef42575df84b30b$export$9d1611c77c2fe928(contextProps, props), register();
- }
- return $e7801be82b4b2a53$export$4debdb1a3f0fa79e(context, props.ref), props;
- }
- var $f6c31cce2adf654f$var$_shouldStopPropagation = /* @__PURE__ */ new WeakMap(), $f6c31cce2adf654f$var$PressEvent = class {
- continuePropagation() {
- _class_private_field_set(this, $f6c31cce2adf654f$var$_shouldStopPropagation, !1);
- }
- get shouldStopPropagation() {
- return _class_private_field_get(this, $f6c31cce2adf654f$var$_shouldStopPropagation);
- }
- constructor(type5, pointerType, originalEvent, state3) {
- _class_private_field_init(this, $f6c31cce2adf654f$var$_shouldStopPropagation, {
- writable: !0,
- value: void 0
- }), _class_private_field_set(this, $f6c31cce2adf654f$var$_shouldStopPropagation, !0);
- var _state_target;
- let currentTarget = (_state_target = state3?.target) !== null && _state_target !== void 0 ? _state_target : originalEvent.currentTarget, rect = currentTarget?.getBoundingClientRect(), x, y = 0, clientX, clientY = null;
- originalEvent.clientX != null && originalEvent.clientY != null && (clientX = originalEvent.clientX, clientY = originalEvent.clientY), rect && (clientX != null && clientY != null ? (x = clientX - rect.left, y = clientY - rect.top) : (x = rect.width / 2, y = rect.height / 2)), this.type = type5, this.pointerType = pointerType, this.target = originalEvent.currentTarget, this.shiftKey = originalEvent.shiftKey, this.metaKey = originalEvent.metaKey, this.ctrlKey = originalEvent.ctrlKey, this.altKey = originalEvent.altKey, this.x = x, this.y = y;
- }
- }, $f6c31cce2adf654f$var$LINK_CLICKED = Symbol("linkClicked"), $f6c31cce2adf654f$var$STYLE_ID = "react-aria-pressable-style", $f6c31cce2adf654f$var$PRESSABLE_ATTRIBUTE = "data-react-aria-pressable";
- function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
- let { onPress, onPressChange, onPressStart, onPressEnd, onPressUp, onClick, isDisabled: isDisabled3, isPressed: isPressedProp, preventFocusOnPress, shouldCancelOnPointerExit, allowTextSelectionOnPress, ref: domRef, ...domProps } = $f6c31cce2adf654f$var$usePressResponderContext(props), [isPressed, setPressed] = (0, import_react49.useState)(!1), ref = (0, import_react49.useRef)({
- isPressed: !1,
- ignoreEmulatedMouseEvents: !1,
- didFirePressStart: !1,
- isTriggeringEvent: !1,
- activePointerId: null,
- target: null,
- isOverTarget: !1,
- pointerType: null,
- disposables: []
- }), { addGlobalListener, removeAllGlobalListeners } = $03deb23ff14920c4$export$4eaf04e54aa8eed6(), triggerPressStart = $8ae05eaa5c114e9c$export$7f54fc3180508a52((originalEvent, pointerType) => {
- let state3 = ref.current;
- if (isDisabled3 || state3.didFirePressStart) return !1;
- let shouldStopPropagation = !0;
- if (state3.isTriggeringEvent = !0, onPressStart) {
- let event = new $f6c31cce2adf654f$var$PressEvent("pressstart", pointerType, originalEvent);
- onPressStart(event), shouldStopPropagation = event.shouldStopPropagation;
- }
- return onPressChange && onPressChange(!0), state3.isTriggeringEvent = !1, state3.didFirePressStart = !0, setPressed(!0), shouldStopPropagation;
- }), triggerPressEnd = $8ae05eaa5c114e9c$export$7f54fc3180508a52((originalEvent, pointerType, wasPressed = !0) => {
- let state3 = ref.current;
- if (!state3.didFirePressStart) return !1;
- state3.didFirePressStart = !1, state3.isTriggeringEvent = !0;
- let shouldStopPropagation = !0;
- if (onPressEnd) {
- let event = new $f6c31cce2adf654f$var$PressEvent("pressend", pointerType, originalEvent);
- onPressEnd(event), shouldStopPropagation = event.shouldStopPropagation;
- }
- if (onPressChange && onPressChange(!1), setPressed(!1), onPress && wasPressed && !isDisabled3) {
- let event = new $f6c31cce2adf654f$var$PressEvent("press", pointerType, originalEvent);
- onPress(event), shouldStopPropagation && (shouldStopPropagation = event.shouldStopPropagation);
- }
- return state3.isTriggeringEvent = !1, shouldStopPropagation;
- }), triggerPressUp = $8ae05eaa5c114e9c$export$7f54fc3180508a52((originalEvent, pointerType) => {
- let state3 = ref.current;
- if (isDisabled3) return !1;
- if (onPressUp) {
- state3.isTriggeringEvent = !0;
- let event = new $f6c31cce2adf654f$var$PressEvent("pressup", pointerType, originalEvent);
- return onPressUp(event), state3.isTriggeringEvent = !1, event.shouldStopPropagation;
- }
- return !0;
- }), cancel = $8ae05eaa5c114e9c$export$7f54fc3180508a52((e) => {
- let state3 = ref.current;
- if (state3.isPressed && state3.target) {
- state3.didFirePressStart && state3.pointerType != null && triggerPressEnd($f6c31cce2adf654f$var$createEvent(state3.target, e), state3.pointerType, !1), state3.isPressed = !1, state3.isOverTarget = !1, state3.activePointerId = null, state3.pointerType = null, removeAllGlobalListeners(), allowTextSelectionOnPress || $14c0b72509d70225$export$b0d6fa1ab32e3295(state3.target);
- for (let dispose of state3.disposables) dispose();
- state3.disposables = [];
- }
- }), cancelOnPointerExit = $8ae05eaa5c114e9c$export$7f54fc3180508a52((e) => {
- shouldCancelOnPointerExit && cancel(e);
- }), triggerClick = $8ae05eaa5c114e9c$export$7f54fc3180508a52((e) => {
- isDisabled3 || onClick?.(e);
- }), triggerSyntheticClick = $8ae05eaa5c114e9c$export$7f54fc3180508a52((e, target) => {
- if (!isDisabled3 && onClick) {
- let event = new MouseEvent("click", e);
- $8a9cb279dc87e130$export$c2b7abe5d61ec696(event, target), onClick($8a9cb279dc87e130$export$525bc4921d56d4a(event));
- }
- }), pressProps = (0, import_react49.useMemo)(() => {
- let state3 = ref.current, pressProps2 = {
- onKeyDown(e) {
- if ($f6c31cce2adf654f$var$isValidKeyboardEvent(e.nativeEvent, e.currentTarget) && $d4ee10de306f2510$export$4282f70798064fe0(e.currentTarget, $d4ee10de306f2510$export$e58f029f0fbfdb29(e.nativeEvent))) {
- var _state_metaKeyEvents;
- $f6c31cce2adf654f$var$shouldPreventDefaultKeyboard($d4ee10de306f2510$export$e58f029f0fbfdb29(e.nativeEvent), e.key) && e.preventDefault();
- let shouldStopPropagation = !0;
- if (!state3.isPressed && !e.repeat) {
- state3.target = e.currentTarget, state3.isPressed = !0, state3.pointerType = "keyboard", shouldStopPropagation = triggerPressStart(e, "keyboard");
- let originalTarget = e.currentTarget, pressUp = (e2) => {
- $f6c31cce2adf654f$var$isValidKeyboardEvent(e2, originalTarget) && !e2.repeat && $d4ee10de306f2510$export$4282f70798064fe0(originalTarget, $d4ee10de306f2510$export$e58f029f0fbfdb29(e2)) && state3.target && triggerPressUp($f6c31cce2adf654f$var$createEvent(state3.target, e2), "keyboard");
- };
- addGlobalListener($431fbd86ca7dc216$export$b204af158042fbac(e.currentTarget), "keyup", $ff5963eb1fccf552$export$e08e3b67e392101e(pressUp, onKeyUp), !0);
- }
- shouldStopPropagation && e.stopPropagation(), e.metaKey && $c87311424ea30a05$export$9ac100e40613ea10() && ((_state_metaKeyEvents = state3.metaKeyEvents) === null || _state_metaKeyEvents === void 0 || _state_metaKeyEvents.set(e.key, e.nativeEvent));
- } else e.key === "Meta" && (state3.metaKeyEvents = /* @__PURE__ */ new Map());
- },
- onClick(e) {
- if (!(e && !$d4ee10de306f2510$export$4282f70798064fe0(e.currentTarget, $d4ee10de306f2510$export$e58f029f0fbfdb29(e.nativeEvent))) && e && e.button === 0 && !state3.isTriggeringEvent && !$ea8dcbcb9ea1b556$export$95185d699e05d4d7.isOpening) {
- let shouldStopPropagation = !0;
- if (isDisabled3 && e.preventDefault(), !state3.ignoreEmulatedMouseEvents && !state3.isPressed && (state3.pointerType === "virtual" || $6a7db85432448f7f$export$60278871457622de(e.nativeEvent))) {
- let stopPressStart = triggerPressStart(e, "virtual"), stopPressUp = triggerPressUp(e, "virtual"), stopPressEnd = triggerPressEnd(e, "virtual");
- triggerClick(e), shouldStopPropagation = stopPressStart && stopPressUp && stopPressEnd;
- } else if (state3.isPressed && state3.pointerType !== "keyboard") {
- let pointerType = state3.pointerType || e.nativeEvent.pointerType || "virtual", stopPressUp = triggerPressUp($f6c31cce2adf654f$var$createEvent(e.currentTarget, e), pointerType), stopPressEnd = triggerPressEnd($f6c31cce2adf654f$var$createEvent(e.currentTarget, e), pointerType, !0);
- shouldStopPropagation = stopPressUp && stopPressEnd, state3.isOverTarget = !1, triggerClick(e), cancel(e);
- }
- state3.ignoreEmulatedMouseEvents = !1, shouldStopPropagation && e.stopPropagation();
- }
- }
- }, onKeyUp = (e) => {
- var _state_metaKeyEvents;
- if (state3.isPressed && state3.target && $f6c31cce2adf654f$var$isValidKeyboardEvent(e, state3.target)) {
- var _state_metaKeyEvents1;
- $f6c31cce2adf654f$var$shouldPreventDefaultKeyboard($d4ee10de306f2510$export$e58f029f0fbfdb29(e), e.key) && e.preventDefault();
- let target = $d4ee10de306f2510$export$e58f029f0fbfdb29(e), wasPressed = $d4ee10de306f2510$export$4282f70798064fe0(state3.target, $d4ee10de306f2510$export$e58f029f0fbfdb29(e));
- triggerPressEnd($f6c31cce2adf654f$var$createEvent(state3.target, e), "keyboard", wasPressed), wasPressed && triggerSyntheticClick(e, state3.target), removeAllGlobalListeners(), e.key !== "Enter" && $f6c31cce2adf654f$var$isHTMLAnchorLink(state3.target) && $d4ee10de306f2510$export$4282f70798064fe0(state3.target, target) && !e[$f6c31cce2adf654f$var$LINK_CLICKED] && (e[$f6c31cce2adf654f$var$LINK_CLICKED] = !0, $ea8dcbcb9ea1b556$export$95185d699e05d4d7(state3.target, e, !1)), state3.isPressed = !1, (_state_metaKeyEvents1 = state3.metaKeyEvents) === null || _state_metaKeyEvents1 === void 0 || _state_metaKeyEvents1.delete(e.key);
- } else if (e.key === "Meta" && (!((_state_metaKeyEvents = state3.metaKeyEvents) === null || _state_metaKeyEvents === void 0) && _state_metaKeyEvents.size)) {
- var _state_target;
- let events2 = state3.metaKeyEvents;
- state3.metaKeyEvents = void 0;
- for (let event of events2.values()) (_state_target = state3.target) === null || _state_target === void 0 || _state_target.dispatchEvent(new KeyboardEvent("keyup", event));
- }
- };
- if (typeof PointerEvent < "u") {
- pressProps2.onPointerDown = (e) => {
- if (e.button !== 0 || !$d4ee10de306f2510$export$4282f70798064fe0(e.currentTarget, $d4ee10de306f2510$export$e58f029f0fbfdb29(e.nativeEvent))) return;
- if ($6a7db85432448f7f$export$29bf1b5f2c56cf63(e.nativeEvent)) {
- state3.pointerType = "virtual";
- return;
- }
- state3.pointerType = e.pointerType;
- let shouldStopPropagation = !0;
- if (!state3.isPressed) {
- state3.isPressed = !0, state3.isOverTarget = !0, state3.activePointerId = e.pointerId, state3.target = e.currentTarget, allowTextSelectionOnPress || $14c0b72509d70225$export$16a4697467175487(state3.target), shouldStopPropagation = triggerPressStart(e, state3.pointerType);
- let target = $d4ee10de306f2510$export$e58f029f0fbfdb29(e.nativeEvent);
- "releasePointerCapture" in target && target.releasePointerCapture(e.pointerId), addGlobalListener($431fbd86ca7dc216$export$b204af158042fbac(e.currentTarget), "pointerup", onPointerUp, !1), addGlobalListener($431fbd86ca7dc216$export$b204af158042fbac(e.currentTarget), "pointercancel", onPointerCancel, !1);
- }
- shouldStopPropagation && e.stopPropagation();
- }, pressProps2.onMouseDown = (e) => {
- if ($d4ee10de306f2510$export$4282f70798064fe0(e.currentTarget, $d4ee10de306f2510$export$e58f029f0fbfdb29(e.nativeEvent)) && e.button === 0) {
- if (preventFocusOnPress) {
- let dispose = $8a9cb279dc87e130$export$cabe61c495ee3649(e.target);
- dispose && state3.disposables.push(dispose);
- }
- e.stopPropagation();
- }
- }, pressProps2.onPointerUp = (e) => {
- !$d4ee10de306f2510$export$4282f70798064fe0(e.currentTarget, $d4ee10de306f2510$export$e58f029f0fbfdb29(e.nativeEvent)) || state3.pointerType === "virtual" || e.button === 0 && !state3.isPressed && triggerPressUp(e, state3.pointerType || e.pointerType);
- }, pressProps2.onPointerEnter = (e) => {
- e.pointerId === state3.activePointerId && state3.target && !state3.isOverTarget && state3.pointerType != null && (state3.isOverTarget = !0, triggerPressStart($f6c31cce2adf654f$var$createEvent(state3.target, e), state3.pointerType));
- }, pressProps2.onPointerLeave = (e) => {
- e.pointerId === state3.activePointerId && state3.target && state3.isOverTarget && state3.pointerType != null && (state3.isOverTarget = !1, triggerPressEnd($f6c31cce2adf654f$var$createEvent(state3.target, e), state3.pointerType, !1), cancelOnPointerExit(e));
- };
- let onPointerUp = (e) => {
- if (e.pointerId === state3.activePointerId && state3.isPressed && e.button === 0 && state3.target) {
- if ($d4ee10de306f2510$export$4282f70798064fe0(state3.target, $d4ee10de306f2510$export$e58f029f0fbfdb29(e)) && state3.pointerType != null) {
- let clicked = !1, timeout = setTimeout(() => {
- state3.isPressed && state3.target instanceof HTMLElement && (clicked ? cancel(e) : ($7215afc6de606d6b$export$de79e2c695e052f3(state3.target), state3.target.click()));
- }, 80);
- addGlobalListener(e.currentTarget, "click", () => clicked = !0, !0), state3.disposables.push(() => clearTimeout(timeout));
- } else cancel(e);
- state3.isOverTarget = !1;
- }
- }, onPointerCancel = (e) => {
- cancel(e);
- };
- pressProps2.onDragStart = (e) => {
- $d4ee10de306f2510$export$4282f70798064fe0(e.currentTarget, $d4ee10de306f2510$export$e58f029f0fbfdb29(e.nativeEvent)) && cancel(e);
- };
- }
- return pressProps2;
- }, [
- addGlobalListener,
- isDisabled3,
- preventFocusOnPress,
- removeAllGlobalListeners,
- allowTextSelectionOnPress,
- cancel,
- cancelOnPointerExit,
- triggerPressEnd,
- triggerPressStart,
- triggerPressUp,
- triggerClick,
- triggerSyntheticClick
- ]);
- return (0, import_react49.useEffect)(() => {
- if (!domRef) return;
- let ownerDocument = $431fbd86ca7dc216$export$b204af158042fbac(domRef.current);
- if (!ownerDocument || !ownerDocument.head || ownerDocument.getElementById($f6c31cce2adf654f$var$STYLE_ID)) return;
- let style = ownerDocument.createElement("style");
- style.id = $f6c31cce2adf654f$var$STYLE_ID, style.textContent = `
- @layer {
- [${$f6c31cce2adf654f$var$PRESSABLE_ATTRIBUTE}] {
- touch-action: pan-x pan-y pinch-zoom;
- }
- }
- `.trim(), ownerDocument.head.prepend(style);
- }, [
- domRef
- ]), (0, import_react49.useEffect)(() => {
- let state3 = ref.current;
- return () => {
- var _state_target;
- allowTextSelectionOnPress || $14c0b72509d70225$export$b0d6fa1ab32e3295((_state_target = state3.target) !== null && _state_target !== void 0 ? _state_target : void 0);
- for (let dispose of state3.disposables) dispose();
- state3.disposables = [];
- };
- }, [
- allowTextSelectionOnPress
- ]), {
- isPressed: isPressedProp || isPressed,
- pressProps: $3ef42575df84b30b$export$9d1611c77c2fe928(domProps, pressProps, {
- [$f6c31cce2adf654f$var$PRESSABLE_ATTRIBUTE]: !0
- })
- };
- }
- function $f6c31cce2adf654f$var$isHTMLAnchorLink(target) {
- return target.tagName === "A" && target.hasAttribute("href");
- }
- function $f6c31cce2adf654f$var$isValidKeyboardEvent(event, currentTarget) {
- let { key, code } = event, element = currentTarget, role = element.getAttribute("role");
- return (key === "Enter" || key === " " || key === "Spacebar" || code === "Space") && !(element instanceof $431fbd86ca7dc216$export$f21a1ffae260145a(element).HTMLInputElement && !$f6c31cce2adf654f$var$isValidInputKey(element, key) || element instanceof $431fbd86ca7dc216$export$f21a1ffae260145a(element).HTMLTextAreaElement || element.isContentEditable) && // Links should only trigger with Enter key
- !((role === "link" || !role && $f6c31cce2adf654f$var$isHTMLAnchorLink(element)) && key !== "Enter");
- }
- function $f6c31cce2adf654f$var$createEvent(target, e) {
- let clientX = e.clientX, clientY = e.clientY;
- return {
- currentTarget: target,
- shiftKey: e.shiftKey,
- ctrlKey: e.ctrlKey,
- metaKey: e.metaKey,
- altKey: e.altKey,
- clientX,
- clientY
- };
- }
- function $f6c31cce2adf654f$var$shouldPreventDefaultUp(target) {
- return target instanceof HTMLInputElement ? !1 : target instanceof HTMLButtonElement ? target.type !== "submit" && target.type !== "reset" : !$f6c31cce2adf654f$var$isHTMLAnchorLink(target);
- }
- function $f6c31cce2adf654f$var$shouldPreventDefaultKeyboard(target, key) {
- return target instanceof HTMLInputElement ? !$f6c31cce2adf654f$var$isValidInputKey(target, key) : $f6c31cce2adf654f$var$shouldPreventDefaultUp(target);
- }
- var $f6c31cce2adf654f$var$nonTextInputTypes = /* @__PURE__ */ new Set([
- "checkbox",
- "radio",
- "range",
- "color",
- "file",
- "image",
- "button",
- "submit",
- "reset"
- ]);
- function $f6c31cce2adf654f$var$isValidInputKey(target, key) {
- return target.type === "checkbox" || target.type === "radio" ? key === " " : $f6c31cce2adf654f$var$nonTextInputTypes.has(target.type);
- }
-
- // ../../node_modules/@react-aria/interactions/dist/useFocusVisible.mjs
- var import_react50 = __toESM(require_react(), 1);
- var $507fabe10e71c6fb$var$currentModality = null, $507fabe10e71c6fb$var$changeHandlers = /* @__PURE__ */ new Set(), $507fabe10e71c6fb$export$d90243b58daecda7 = /* @__PURE__ */ new Map(), $507fabe10e71c6fb$var$hasEventBeforeFocus = !1, $507fabe10e71c6fb$var$hasBlurredWindowRecently = !1, $507fabe10e71c6fb$var$FOCUS_VISIBLE_INPUT_KEYS = {
- Tab: !0,
- Escape: !0
- };
- function $507fabe10e71c6fb$var$triggerChangeHandlers(modality, e) {
- for (let handler of $507fabe10e71c6fb$var$changeHandlers) handler(modality, e);
- }
- function $507fabe10e71c6fb$var$isValidKey(e) {
- return !(e.metaKey || !$c87311424ea30a05$export$9ac100e40613ea10() && e.altKey || e.ctrlKey || e.key === "Control" || e.key === "Shift" || e.key === "Meta");
- }
- function $507fabe10e71c6fb$var$handleKeyboardEvent(e) {
- $507fabe10e71c6fb$var$hasEventBeforeFocus = !0, $507fabe10e71c6fb$var$isValidKey(e) && ($507fabe10e71c6fb$var$currentModality = "keyboard", $507fabe10e71c6fb$var$triggerChangeHandlers("keyboard", e));
- }
- function $507fabe10e71c6fb$var$handlePointerEvent(e) {
- $507fabe10e71c6fb$var$currentModality = "pointer", (e.type === "mousedown" || e.type === "pointerdown") && ($507fabe10e71c6fb$var$hasEventBeforeFocus = !0, $507fabe10e71c6fb$var$triggerChangeHandlers("pointer", e));
- }
- function $507fabe10e71c6fb$var$handleClickEvent(e) {
- $6a7db85432448f7f$export$60278871457622de(e) && ($507fabe10e71c6fb$var$hasEventBeforeFocus = !0, $507fabe10e71c6fb$var$currentModality = "virtual");
- }
- function $507fabe10e71c6fb$var$handleFocusEvent(e) {
- e.target === window || e.target === document || $8a9cb279dc87e130$export$fda7da73ab5d4c48 || !e.isTrusted || (!$507fabe10e71c6fb$var$hasEventBeforeFocus && !$507fabe10e71c6fb$var$hasBlurredWindowRecently && ($507fabe10e71c6fb$var$currentModality = "virtual", $507fabe10e71c6fb$var$triggerChangeHandlers("virtual", e)), $507fabe10e71c6fb$var$hasEventBeforeFocus = !1, $507fabe10e71c6fb$var$hasBlurredWindowRecently = !1);
- }
- function $507fabe10e71c6fb$var$handleWindowBlur() {
- $8a9cb279dc87e130$export$fda7da73ab5d4c48 || ($507fabe10e71c6fb$var$hasEventBeforeFocus = !1, $507fabe10e71c6fb$var$hasBlurredWindowRecently = !0);
- }
- function $507fabe10e71c6fb$var$setupGlobalFocusEvents(element) {
- if (typeof window > "u" || typeof document > "u" || $507fabe10e71c6fb$export$d90243b58daecda7.get($431fbd86ca7dc216$export$f21a1ffae260145a(element))) return;
- let windowObject = $431fbd86ca7dc216$export$f21a1ffae260145a(element), documentObject = $431fbd86ca7dc216$export$b204af158042fbac(element), focus = windowObject.HTMLElement.prototype.focus;
- windowObject.HTMLElement.prototype.focus = function() {
- $507fabe10e71c6fb$var$hasEventBeforeFocus = !0, focus.apply(this, arguments);
- }, documentObject.addEventListener("keydown", $507fabe10e71c6fb$var$handleKeyboardEvent, !0), documentObject.addEventListener("keyup", $507fabe10e71c6fb$var$handleKeyboardEvent, !0), documentObject.addEventListener("click", $507fabe10e71c6fb$var$handleClickEvent, !0), windowObject.addEventListener("focus", $507fabe10e71c6fb$var$handleFocusEvent, !0), windowObject.addEventListener("blur", $507fabe10e71c6fb$var$handleWindowBlur, !1), typeof PointerEvent < "u" && (documentObject.addEventListener("pointerdown", $507fabe10e71c6fb$var$handlePointerEvent, !0), documentObject.addEventListener("pointermove", $507fabe10e71c6fb$var$handlePointerEvent, !0), documentObject.addEventListener("pointerup", $507fabe10e71c6fb$var$handlePointerEvent, !0)), windowObject.addEventListener("beforeunload", () => {
- $507fabe10e71c6fb$var$tearDownWindowFocusTracking(element);
- }, {
- once: !0
- }), $507fabe10e71c6fb$export$d90243b58daecda7.set(windowObject, {
- focus
- });
- }
- var $507fabe10e71c6fb$var$tearDownWindowFocusTracking = (element, loadListener) => {
- let windowObject = $431fbd86ca7dc216$export$f21a1ffae260145a(element), documentObject = $431fbd86ca7dc216$export$b204af158042fbac(element);
- loadListener && documentObject.removeEventListener("DOMContentLoaded", loadListener), $507fabe10e71c6fb$export$d90243b58daecda7.has(windowObject) && (windowObject.HTMLElement.prototype.focus = $507fabe10e71c6fb$export$d90243b58daecda7.get(windowObject).focus, documentObject.removeEventListener("keydown", $507fabe10e71c6fb$var$handleKeyboardEvent, !0), documentObject.removeEventListener("keyup", $507fabe10e71c6fb$var$handleKeyboardEvent, !0), documentObject.removeEventListener("click", $507fabe10e71c6fb$var$handleClickEvent, !0), windowObject.removeEventListener("focus", $507fabe10e71c6fb$var$handleFocusEvent, !0), windowObject.removeEventListener("blur", $507fabe10e71c6fb$var$handleWindowBlur, !1), typeof PointerEvent < "u" && (documentObject.removeEventListener("pointerdown", $507fabe10e71c6fb$var$handlePointerEvent, !0), documentObject.removeEventListener("pointermove", $507fabe10e71c6fb$var$handlePointerEvent, !0), documentObject.removeEventListener("pointerup", $507fabe10e71c6fb$var$handlePointerEvent, !0)), $507fabe10e71c6fb$export$d90243b58daecda7.delete(windowObject));
- };
- function $507fabe10e71c6fb$export$2f1888112f558a7d(element) {
- let documentObject = $431fbd86ca7dc216$export$b204af158042fbac(element), loadListener;
- return documentObject.readyState !== "loading" ? $507fabe10e71c6fb$var$setupGlobalFocusEvents(element) : (loadListener = () => {
- $507fabe10e71c6fb$var$setupGlobalFocusEvents(element);
- }, documentObject.addEventListener("DOMContentLoaded", loadListener)), () => $507fabe10e71c6fb$var$tearDownWindowFocusTracking(element, loadListener);
- }
- typeof document < "u" && $507fabe10e71c6fb$export$2f1888112f558a7d();
- function $507fabe10e71c6fb$export$b9b3dfddab17db27() {
- return $507fabe10e71c6fb$var$currentModality !== "pointer";
- }
- function $507fabe10e71c6fb$export$630ff653c5ada6a9() {
- return $507fabe10e71c6fb$var$currentModality;
- }
- function $507fabe10e71c6fb$export$98e20ec92f614cfe() {
- $507fabe10e71c6fb$var$setupGlobalFocusEvents();
- let [modality, setModality] = (0, import_react50.useState)($507fabe10e71c6fb$var$currentModality);
- return (0, import_react50.useEffect)(() => {
- let handler = () => {
- setModality($507fabe10e71c6fb$var$currentModality);
- };
- return $507fabe10e71c6fb$var$changeHandlers.add(handler), () => {
- $507fabe10e71c6fb$var$changeHandlers.delete(handler);
- };
- }, []), $b5e257d569688ac6$export$535bd6ca7f90a273() ? null : modality;
- }
- var $507fabe10e71c6fb$var$nonTextInputTypes = /* @__PURE__ */ new Set([
- "checkbox",
- "radio",
- "range",
- "color",
- "file",
- "image",
- "button",
- "submit",
- "reset"
- ]);
- function $507fabe10e71c6fb$var$isKeyboardFocusEvent(isTextInput, modality, e) {
- let document1 = $431fbd86ca7dc216$export$b204af158042fbac(e?.target), IHTMLInputElement = typeof window < "u" ? $431fbd86ca7dc216$export$f21a1ffae260145a(e?.target).HTMLInputElement : HTMLInputElement, IHTMLTextAreaElement = typeof window < "u" ? $431fbd86ca7dc216$export$f21a1ffae260145a(e?.target).HTMLTextAreaElement : HTMLTextAreaElement, IHTMLElement = typeof window < "u" ? $431fbd86ca7dc216$export$f21a1ffae260145a(e?.target).HTMLElement : HTMLElement, IKeyboardEvent = typeof window < "u" ? $431fbd86ca7dc216$export$f21a1ffae260145a(e?.target).KeyboardEvent : KeyboardEvent;
- return isTextInput = isTextInput || document1.activeElement instanceof IHTMLInputElement && !$507fabe10e71c6fb$var$nonTextInputTypes.has(document1.activeElement.type) || document1.activeElement instanceof IHTMLTextAreaElement || document1.activeElement instanceof IHTMLElement && document1.activeElement.isContentEditable, !(isTextInput && modality === "keyboard" && e instanceof IKeyboardEvent && !$507fabe10e71c6fb$var$FOCUS_VISIBLE_INPUT_KEYS[e.key]);
- }
- function $507fabe10e71c6fb$export$ec71b4b83ac08ec3(fn4, deps, opts) {
- $507fabe10e71c6fb$var$setupGlobalFocusEvents(), (0, import_react50.useEffect)(() => {
- let handler = (modality, e) => {
- $507fabe10e71c6fb$var$isKeyboardFocusEvent(!!opts?.isTextInput, modality, e) && fn4($507fabe10e71c6fb$export$b9b3dfddab17db27());
- };
- return $507fabe10e71c6fb$var$changeHandlers.add(handler), () => {
- $507fabe10e71c6fb$var$changeHandlers.delete(handler);
- };
- }, deps);
- }
-
- // ../../node_modules/@react-aria/interactions/dist/focusSafely.mjs
- function $3ad3f6e1647bc98d$export$80f3e147d781571c(element) {
- let ownerDocument = $431fbd86ca7dc216$export$b204af158042fbac(element), activeElement = $d4ee10de306f2510$export$cd4e5573fbe2b576(ownerDocument);
- if ($507fabe10e71c6fb$export$630ff653c5ada6a9() === "virtual") {
- let lastFocusedElement = activeElement;
- $bbed8b41f857bcc0$export$24490316f764c430(() => {
- $d4ee10de306f2510$export$cd4e5573fbe2b576(ownerDocument) === lastFocusedElement && element.isConnected && $7215afc6de606d6b$export$de79e2c695e052f3(element);
- });
- } else $7215afc6de606d6b$export$de79e2c695e052f3(element);
- }
-
- // ../../node_modules/@react-aria/interactions/dist/useFocus.mjs
- var import_react51 = __toESM(require_react(), 1);
- function $a1ea59d68270f0dd$export$f8168d8dd8fd66e6(props) {
- let { isDisabled: isDisabled3, onFocus: onFocusProp, onBlur: onBlurProp, onFocusChange } = props, onBlur = (0, import_react51.useCallback)((e) => {
- if (e.target === e.currentTarget)
- return onBlurProp && onBlurProp(e), onFocusChange && onFocusChange(!1), !0;
- }, [
- onBlurProp,
- onFocusChange
- ]), onSyntheticFocus = $8a9cb279dc87e130$export$715c682d09d639cc(onBlur), onFocus = (0, import_react51.useCallback)((e) => {
- let ownerDocument = $431fbd86ca7dc216$export$b204af158042fbac(e.target), activeElement = ownerDocument ? $d4ee10de306f2510$export$cd4e5573fbe2b576(ownerDocument) : $d4ee10de306f2510$export$cd4e5573fbe2b576();
- e.target === e.currentTarget && activeElement === $d4ee10de306f2510$export$e58f029f0fbfdb29(e.nativeEvent) && (onFocusProp && onFocusProp(e), onFocusChange && onFocusChange(!0), onSyntheticFocus(e));
- }, [
- onFocusChange,
- onFocusProp,
- onSyntheticFocus
- ]);
- return {
- focusProps: {
- onFocus: !isDisabled3 && (onFocusProp || onFocusChange || onBlurProp) ? onFocus : void 0,
- onBlur: !isDisabled3 && (onBlurProp || onFocusChange) ? onBlur : void 0
- }
- };
- }
-
- // ../../node_modules/@react-aria/interactions/dist/createEventHandler.mjs
- function $93925083ecbb358c$export$48d1ea6320830260(handler) {
- if (!handler) return;
- let shouldStopPropagation = !0;
- return (e) => {
- let event = {
- ...e,
- preventDefault() {
- e.preventDefault();
- },
- isDefaultPrevented() {
- return e.isDefaultPrevented();
- },
- stopPropagation() {
- shouldStopPropagation = !0;
- },
- continuePropagation() {
- shouldStopPropagation = !1;
- },
- isPropagationStopped() {
- return shouldStopPropagation;
- }
- };
- handler(event), shouldStopPropagation && e.stopPropagation();
- };
- }
-
- // ../../node_modules/@react-aria/interactions/dist/useKeyboard.mjs
- function $46d819fcbaf35654$export$8f71654801c2f7cd(props) {
- return {
- keyboardProps: props.isDisabled ? {} : {
- onKeyDown: $93925083ecbb358c$export$48d1ea6320830260(props.onKeyDown),
- onKeyUp: $93925083ecbb358c$export$48d1ea6320830260(props.onKeyUp)
- }
- };
- }
-
- // ../../node_modules/@react-aria/interactions/dist/useFocusable.mjs
- var import_react52 = __toESM(require_react(), 1), $f645667febf57a63$export$f9762fab77588ecb = import_react52.default.createContext(null);
- function $f645667febf57a63$var$useFocusableContext(ref) {
- let context = (0, import_react52.useContext)($f645667febf57a63$export$f9762fab77588ecb) || {};
- $e7801be82b4b2a53$export$4debdb1a3f0fa79e(context, ref);
- let { ref: _, ...otherProps } = context;
- return otherProps;
- }
- var $f645667febf57a63$export$13f3202a3e5ddd5 = import_react52.default.forwardRef(function(props, ref) {
- let { children, ...otherProps } = props, objRef = $df56164dff5785e2$export$4338b53315abf666(ref), context = {
- ...otherProps,
- ref: objRef
- };
- return import_react52.default.createElement($f645667febf57a63$export$f9762fab77588ecb.Provider, {
- value: context
- }, children);
- });
- function $f645667febf57a63$export$4c014de7c8940b4c(props, domRef) {
- let { focusProps } = $a1ea59d68270f0dd$export$f8168d8dd8fd66e6(props), { keyboardProps } = $46d819fcbaf35654$export$8f71654801c2f7cd(props), interactions = $3ef42575df84b30b$export$9d1611c77c2fe928(focusProps, keyboardProps), domProps = $f645667febf57a63$var$useFocusableContext(domRef), interactionProps = props.isDisabled ? {} : domProps, autoFocusRef = (0, import_react52.useRef)(props.autoFocus);
- (0, import_react52.useEffect)(() => {
- autoFocusRef.current && domRef.current && $3ad3f6e1647bc98d$export$80f3e147d781571c(domRef.current), autoFocusRef.current = !1;
- }, [
- domRef
- ]);
- let tabIndex = props.excludeFromTabOrder ? -1 : 0;
- return props.isDisabled && (tabIndex = void 0), {
- focusableProps: $3ef42575df84b30b$export$9d1611c77c2fe928({
- ...interactions,
- tabIndex
- }, interactionProps)
- };
- }
- var $f645667febf57a63$export$35a3bebf7ef2d934 = (0, import_react52.forwardRef)(({ children, ...props }, ref) => {
- ref = $df56164dff5785e2$export$4338b53315abf666(ref);
- let { focusableProps } = $f645667febf57a63$export$4c014de7c8940b4c(props, ref), child = import_react52.default.Children.only(children);
- (0, import_react52.useEffect)(() => {
- }, [
- ref,
- props.isDisabled
- ]);
- let childRef = parseInt(import_react52.default.version, 10) < 19 ? child.ref : child.props.ref;
- return import_react52.default.cloneElement(child, {
- ...$3ef42575df84b30b$export$9d1611c77c2fe928(focusableProps, child.props),
- // @ts-ignore
- ref: $5dc95899b306f630$export$c9058316764c140e(childRef, ref)
- });
- });
-
- // ../../node_modules/@react-aria/interactions/dist/Pressable.mjs
- var import_react53 = __toESM(require_react(), 1), $3b117e43dc0ca95d$export$27c701ed9e449e99 = import_react53.default.forwardRef(({ children, ...props }, ref) => {
- ref = $df56164dff5785e2$export$4338b53315abf666(ref);
- let { pressProps } = $f6c31cce2adf654f$export$45712eceda6fad21({
- ...props,
- ref
- }), { focusableProps } = $f645667febf57a63$export$4c014de7c8940b4c(props, ref), child = import_react53.default.Children.only(children);
- (0, import_react53.useEffect)(() => {
- }, [
- ref,
- props.isDisabled
- ]);
- let childRef = parseInt(import_react53.default.version, 10) < 19 ? child.ref : child.props.ref;
- return import_react53.default.cloneElement(child, {
- ...$3ef42575df84b30b$export$9d1611c77c2fe928(pressProps, focusableProps, child.props),
- // @ts-ignore
- ref: $5dc95899b306f630$export$c9058316764c140e(childRef, ref)
- });
- });
-
- // ../../node_modules/@react-aria/interactions/dist/PressResponder.mjs
- var import_react54 = __toESM(require_react(), 1), $f1ab8c75478c6f73$export$3351871ee4b288b8 = import_react54.default.forwardRef(({ children, ...props }, ref) => {
- let isRegistered = (0, import_react54.useRef)(!1), prevContext = (0, import_react54.useContext)($ae1eeba8b9eafd08$export$5165eccb35aaadb5);
- ref = $df56164dff5785e2$export$4338b53315abf666(ref || prevContext?.ref);
- let context = $3ef42575df84b30b$export$9d1611c77c2fe928(prevContext || {}, {
- ...props,
- ref,
- register() {
- isRegistered.current = !0, prevContext && prevContext.register();
- }
- });
- return $e7801be82b4b2a53$export$4debdb1a3f0fa79e(prevContext, ref), (0, import_react54.useEffect)(() => {
- isRegistered.current || (isRegistered.current = !0);
- }, []), import_react54.default.createElement($ae1eeba8b9eafd08$export$5165eccb35aaadb5.Provider, {
- value: context
- }, children);
- });
- function $f1ab8c75478c6f73$export$cf75428e0b9ed1ea({ children }) {
- let context = (0, import_react54.useMemo)(() => ({
- register: () => {
- }
- }), []);
- return import_react54.default.createElement($ae1eeba8b9eafd08$export$5165eccb35aaadb5.Provider, {
- value: context
- }, children);
- }
-
- // ../../node_modules/@react-aria/interactions/dist/useFocusWithin.mjs
- var import_react55 = __toESM(require_react(), 1);
- function $9ab94262bd0047c7$export$420e68273165f4ec(props) {
- let { isDisabled: isDisabled3, onBlurWithin, onFocusWithin, onFocusWithinChange } = props, state3 = (0, import_react55.useRef)({
- isFocusWithin: !1
- }), { addGlobalListener, removeAllGlobalListeners } = $03deb23ff14920c4$export$4eaf04e54aa8eed6(), onBlur = (0, import_react55.useCallback)((e) => {
- e.currentTarget.contains(e.target) && state3.current.isFocusWithin && !e.currentTarget.contains(e.relatedTarget) && (state3.current.isFocusWithin = !1, removeAllGlobalListeners(), onBlurWithin && onBlurWithin(e), onFocusWithinChange && onFocusWithinChange(!1));
- }, [
- onBlurWithin,
- onFocusWithinChange,
- state3,
- removeAllGlobalListeners
- ]), onSyntheticFocus = $8a9cb279dc87e130$export$715c682d09d639cc(onBlur), onFocus = (0, import_react55.useCallback)((e) => {
- if (!e.currentTarget.contains(e.target)) return;
- let ownerDocument = $431fbd86ca7dc216$export$b204af158042fbac(e.target), activeElement = $d4ee10de306f2510$export$cd4e5573fbe2b576(ownerDocument);
- if (!state3.current.isFocusWithin && activeElement === $d4ee10de306f2510$export$e58f029f0fbfdb29(e.nativeEvent)) {
- onFocusWithin && onFocusWithin(e), onFocusWithinChange && onFocusWithinChange(!0), state3.current.isFocusWithin = !0, onSyntheticFocus(e);
- let currentTarget = e.currentTarget;
- addGlobalListener(ownerDocument, "focus", (e2) => {
- if (state3.current.isFocusWithin && !$d4ee10de306f2510$export$4282f70798064fe0(currentTarget, e2.target)) {
- let nativeEvent = new ownerDocument.defaultView.FocusEvent("blur", {
- relatedTarget: e2.target
- });
- $8a9cb279dc87e130$export$c2b7abe5d61ec696(nativeEvent, currentTarget);
- let event = $8a9cb279dc87e130$export$525bc4921d56d4a(nativeEvent);
- onBlur(event);
- }
- }, {
- capture: !0
- });
- }
- }, [
- onFocusWithin,
- onFocusWithinChange,
- onSyntheticFocus,
- addGlobalListener,
- onBlur
- ]);
- return isDisabled3 ? {
- focusWithinProps: {
- // These cannot be null, that would conflict in mergeProps
- onFocus: void 0,
- onBlur: void 0
- }
- } : {
- focusWithinProps: {
- onFocus,
- onBlur
- }
- };
- }
-
- // ../../node_modules/@react-aria/interactions/dist/useHover.mjs
- var import_react56 = __toESM(require_react(), 1), $6179b936705e76d3$var$globalIgnoreEmulatedMouseEvents = !1, $6179b936705e76d3$var$hoverCount = 0;
- function $6179b936705e76d3$var$setGlobalIgnoreEmulatedMouseEvents() {
- $6179b936705e76d3$var$globalIgnoreEmulatedMouseEvents = !0, setTimeout(() => {
- $6179b936705e76d3$var$globalIgnoreEmulatedMouseEvents = !1;
- }, 50);
- }
- function $6179b936705e76d3$var$handleGlobalPointerEvent(e) {
- e.pointerType === "touch" && $6179b936705e76d3$var$setGlobalIgnoreEmulatedMouseEvents();
- }
- function $6179b936705e76d3$var$setupGlobalTouchEvents() {
- if (!(typeof document > "u"))
- return $6179b936705e76d3$var$hoverCount === 0 && typeof PointerEvent < "u" && document.addEventListener("pointerup", $6179b936705e76d3$var$handleGlobalPointerEvent), $6179b936705e76d3$var$hoverCount++, () => {
- $6179b936705e76d3$var$hoverCount--, !($6179b936705e76d3$var$hoverCount > 0) && typeof PointerEvent < "u" && document.removeEventListener("pointerup", $6179b936705e76d3$var$handleGlobalPointerEvent);
- };
- }
- function $6179b936705e76d3$export$ae780daf29e6d456(props) {
- let { onHoverStart, onHoverChange, onHoverEnd, isDisabled: isDisabled3 } = props, [isHovered, setHovered] = (0, import_react56.useState)(!1), state3 = (0, import_react56.useRef)({
- isHovered: !1,
- ignoreEmulatedMouseEvents: !1,
- pointerType: "",
- target: null
- }).current;
- (0, import_react56.useEffect)($6179b936705e76d3$var$setupGlobalTouchEvents, []);
- let { addGlobalListener, removeAllGlobalListeners } = $03deb23ff14920c4$export$4eaf04e54aa8eed6(), { hoverProps, triggerHoverEnd } = (0, import_react56.useMemo)(() => {
- let triggerHoverStart = (event, pointerType) => {
- if (state3.pointerType = pointerType, isDisabled3 || pointerType === "touch" || state3.isHovered || !event.currentTarget.contains(event.target)) return;
- state3.isHovered = !0;
- let target = event.currentTarget;
- state3.target = target, addGlobalListener($431fbd86ca7dc216$export$b204af158042fbac(event.target), "pointerover", (e) => {
- state3.isHovered && state3.target && !$d4ee10de306f2510$export$4282f70798064fe0(state3.target, e.target) && triggerHoverEnd2(e, e.pointerType);
- }, {
- capture: !0
- }), onHoverStart && onHoverStart({
- type: "hoverstart",
- target,
- pointerType
- }), onHoverChange && onHoverChange(!0), setHovered(!0);
- }, triggerHoverEnd2 = (event, pointerType) => {
- let target = state3.target;
- state3.pointerType = "", state3.target = null, !(pointerType === "touch" || !state3.isHovered || !target) && (state3.isHovered = !1, removeAllGlobalListeners(), onHoverEnd && onHoverEnd({
- type: "hoverend",
- target,
- pointerType
- }), onHoverChange && onHoverChange(!1), setHovered(!1));
- }, hoverProps2 = {};
- return typeof PointerEvent < "u" && (hoverProps2.onPointerEnter = (e) => {
- $6179b936705e76d3$var$globalIgnoreEmulatedMouseEvents && e.pointerType === "mouse" || triggerHoverStart(e, e.pointerType);
- }, hoverProps2.onPointerLeave = (e) => {
- !isDisabled3 && e.currentTarget.contains(e.target) && triggerHoverEnd2(e, e.pointerType);
- }), {
- hoverProps: hoverProps2,
- triggerHoverEnd: triggerHoverEnd2
- };
- }, [
- onHoverStart,
- onHoverChange,
- onHoverEnd,
- isDisabled3,
- state3,
- addGlobalListener,
- removeAllGlobalListeners
- ]);
- return (0, import_react56.useEffect)(() => {
- isDisabled3 && triggerHoverEnd({
- currentTarget: state3.target
- }, state3.pointerType);
- }, [
- isDisabled3
- ]), {
- hoverProps,
- isHovered
- };
- }
-
- // ../../node_modules/@react-aria/interactions/dist/useInteractOutside.mjs
- var import_react57 = __toESM(require_react(), 1);
- function $e0b6e0b68ec7f50f$export$872b660ac5a1ff98(props) {
- let { ref, onInteractOutside, isDisabled: isDisabled3, onInteractOutsideStart } = props, stateRef = (0, import_react57.useRef)({
- isPointerDown: !1,
- ignoreEmulatedMouseEvents: !1
- }), onPointerDown = $8ae05eaa5c114e9c$export$7f54fc3180508a52((e) => {
- onInteractOutside && $e0b6e0b68ec7f50f$var$isValidEvent(e, ref) && (onInteractOutsideStart && onInteractOutsideStart(e), stateRef.current.isPointerDown = !0);
- }), triggerInteractOutside = $8ae05eaa5c114e9c$export$7f54fc3180508a52((e) => {
- onInteractOutside && onInteractOutside(e);
- });
- (0, import_react57.useEffect)(() => {
- let state3 = stateRef.current;
- if (isDisabled3) return;
- let element = ref.current, documentObject = $431fbd86ca7dc216$export$b204af158042fbac(element);
- if (typeof PointerEvent < "u") {
- let onClick = (e) => {
- state3.isPointerDown && $e0b6e0b68ec7f50f$var$isValidEvent(e, ref) && triggerInteractOutside(e), state3.isPointerDown = !1;
- };
- return documentObject.addEventListener("pointerdown", onPointerDown, !0), documentObject.addEventListener("click", onClick, !0), () => {
- documentObject.removeEventListener("pointerdown", onPointerDown, !0), documentObject.removeEventListener("click", onClick, !0);
- };
- }
- }, [
- ref,
- isDisabled3,
- onPointerDown,
- triggerInteractOutside
- ]);
- }
- function $e0b6e0b68ec7f50f$var$isValidEvent(event, ref) {
- if (event.button > 0) return !1;
- if (event.target) {
- let ownerDocument = event.target.ownerDocument;
- if (!ownerDocument || !ownerDocument.documentElement.contains(event.target) || event.target.closest("[data-react-aria-top-layer]")) return !1;
- }
- return ref.current ? !event.composedPath().includes(ref.current) : !1;
- }
-
- // ../../node_modules/@react-aria/interactions/dist/useMove.mjs
- var import_react58 = __toESM(require_react(), 1);
-
- // ../../node_modules/@react-aria/interactions/dist/useScrollWheel.mjs
- var import_react59 = __toESM(require_react(), 1);
-
- // ../../node_modules/@react-aria/interactions/dist/useLongPress.mjs
- var import_react60 = __toESM(require_react(), 1), $8a26561d2877236e$var$DEFAULT_THRESHOLD = 500;
- function $8a26561d2877236e$export$c24ed0104d07eab9(props) {
- let { isDisabled: isDisabled3, onLongPressStart, onLongPressEnd, onLongPress, threshold = $8a26561d2877236e$var$DEFAULT_THRESHOLD, accessibilityDescription } = props, timeRef = (0, import_react60.useRef)(void 0), { addGlobalListener, removeGlobalListener } = $03deb23ff14920c4$export$4eaf04e54aa8eed6(), { pressProps } = $f6c31cce2adf654f$export$45712eceda6fad21({
- isDisabled: isDisabled3,
- onPressStart(e) {
- if (e.continuePropagation(), (e.pointerType === "mouse" || e.pointerType === "touch") && (onLongPressStart && onLongPressStart({
- ...e,
- type: "longpressstart"
- }), timeRef.current = setTimeout(() => {
- e.target.dispatchEvent(new PointerEvent("pointercancel", {
- bubbles: !0
- })), $431fbd86ca7dc216$export$b204af158042fbac(e.target).activeElement !== e.target && $7215afc6de606d6b$export$de79e2c695e052f3(e.target), onLongPress && onLongPress({
- ...e,
- type: "longpress"
- }), timeRef.current = void 0;
- }, threshold), e.pointerType === "touch")) {
- let onContextMenu = (e2) => {
- e2.preventDefault();
- };
- addGlobalListener(e.target, "contextmenu", onContextMenu, {
- once: !0
- }), addGlobalListener(window, "pointerup", () => {
- setTimeout(() => {
- removeGlobalListener(e.target, "contextmenu", onContextMenu);
- }, 30);
- }, {
- once: !0
- });
- }
- },
- onPressEnd(e) {
- timeRef.current && clearTimeout(timeRef.current), onLongPressEnd && (e.pointerType === "mouse" || e.pointerType === "touch") && onLongPressEnd({
- ...e,
- type: "longpressend"
- });
- }
- }), descriptionProps = $ef06256079686ba0$export$f8aeda7b10753fa1(onLongPress && !isDisabled3 ? accessibilityDescription : void 0);
- return {
- longPressProps: $3ef42575df84b30b$export$9d1611c77c2fe928(pressProps, descriptionProps)
- };
- }
-
- // ../../node_modules/react-aria-components/dist/utils.mjs
- var import_react61 = __toESM(require_react(), 1), $64fa3d84918910a7$export$c62b8e45d58ddad9 = Symbol("default");
- function $64fa3d84918910a7$export$2881499e37b75b9a({ values, children }) {
- for (let [Context, value] of values)
- children = import_react61.default.createElement(Context.Provider, {
- value
- }, children);
- return children;
- }
- function $64fa3d84918910a7$export$4d86445c2cf5e3(props) {
- let { className, style, children, defaultClassName, defaultChildren, defaultStyle, values } = props;
- return (0, import_react61.useMemo)(() => {
- let computedClassName, computedStyle, computedChildren;
- return typeof className == "function" ? computedClassName = className({
- ...values,
- defaultClassName
- }) : computedClassName = className, typeof style == "function" ? computedStyle = style({
- ...values,
- defaultStyle: defaultStyle || {}
- }) : computedStyle = style, typeof children == "function" ? computedChildren = children({
- ...values,
- defaultChildren
- }) : children == null ? computedChildren = defaultChildren : computedChildren = children, {
- className: computedClassName ?? defaultClassName,
- style: computedStyle || defaultStyle ? {
- ...defaultStyle,
- ...computedStyle
- } : void 0,
- children: computedChildren ?? defaultChildren,
- "data-rac": ""
- };
- }, [
- className,
- style,
- children,
- defaultClassName,
- defaultChildren,
- defaultStyle,
- values
- ]);
- }
- function $64fa3d84918910a7$export$fabf2dc03a41866e(context, slot) {
- let ctx = (0, import_react61.useContext)(context);
- if (slot === null)
- return null;
- if (ctx && typeof ctx == "object" && "slots" in ctx && ctx.slots) {
- let slotKey = slot || $64fa3d84918910a7$export$c62b8e45d58ddad9;
- if (!ctx.slots[slotKey]) {
- let availableSlots = new Intl.ListFormat().format(Object.keys(ctx.slots).map((p3) => `"${p3}"`)), errorMessage = slot ? `Invalid slot "${slot}".` : "A slot prop is required.";
- throw new Error(`${errorMessage} Valid slot names are ${availableSlots}.`);
- }
- return ctx.slots[slotKey];
- }
- return ctx;
- }
- function $64fa3d84918910a7$export$29f1550f4b0d4415(props, ref, context) {
- let ctx = $64fa3d84918910a7$export$fabf2dc03a41866e(context, props.slot) || {}, { ref: contextRef, ...contextProps } = ctx, mergedRef = $df56164dff5785e2$export$4338b53315abf666((0, import_react61.useMemo)(() => $5dc95899b306f630$export$c9058316764c140e(ref, contextRef), [
- ref,
- contextRef
- ])), mergedProps = $3ef42575df84b30b$export$9d1611c77c2fe928(contextProps, props);
- return "style" in contextProps && contextProps.style && "style" in props && props.style && (typeof contextProps.style == "function" || typeof props.style == "function" ? mergedProps.style = (renderProps) => {
- let contextStyle = typeof contextProps.style == "function" ? contextProps.style(renderProps) : contextProps.style, defaultStyle = {
- ...renderProps.defaultStyle,
- ...contextStyle
- }, style = typeof props.style == "function" ? props.style({
- ...renderProps,
- defaultStyle
- }) : props.style;
- return {
- ...defaultStyle,
- ...style
- };
- } : mergedProps.style = {
- ...contextProps.style,
- ...props.style
- }), [
- mergedProps,
- mergedRef
- ];
- }
- function $64fa3d84918910a7$export$9d4c57ee4c6ffdd8(initialState2 = !0) {
- let [hasSlot, setHasSlot] = (0, import_react61.useState)(initialState2), hasRun = (0, import_react61.useRef)(!1), ref = (0, import_react61.useCallback)((el) => {
- hasRun.current = !0, setHasSlot(!!el);
- }, []);
- return $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
- hasRun.current || setHasSlot(!1);
- }, []), [
- ref,
- hasSlot
- ];
- }
-
- // ../../node_modules/react-aria-components/dist/OverlayArrow.mjs
- var import_react62 = __toESM(require_react(), 1), $44f671af83e7d9e0$export$2de4954e8ae13b9f = (0, import_react62.createContext)({
- placement: "bottom"
- }), $44f671af83e7d9e0$export$746d02f47f4d381 = (0, import_react62.forwardRef)(function(props, ref) {
- [props, ref] = $64fa3d84918910a7$export$29f1550f4b0d4415(props, ref, $44f671af83e7d9e0$export$2de4954e8ae13b9f);
- let placement = props.placement, style = {
- position: "absolute",
- transform: placement === "top" || placement === "bottom" ? "translateX(-50%)" : "translateY(-50%)"
- };
- placement != null && (style[placement] = "100%");
- let renderProps = $64fa3d84918910a7$export$4d86445c2cf5e3({
- ...props,
- defaultClassName: "react-aria-OverlayArrow",
- values: {
- placement
- }
- });
- renderProps.style && Object.keys(renderProps.style).forEach((key) => renderProps.style[key] === void 0 && delete renderProps.style[key]);
- let DOMProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props);
- return import_react62.default.createElement("div", {
- ...DOMProps,
- ...renderProps,
- style: {
- ...style,
- ...renderProps.style
- },
- ref,
- "data-placement": placement
- });
- });
-
- // ../../node_modules/@react-aria/tooltip/dist/useTooltip.mjs
- function $326e436e94273fe1$export$1c4b08e0eca38426(props, state3) {
- let domProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, {
- labelable: !0
- }), { hoverProps } = $6179b936705e76d3$export$ae780daf29e6d456({
- onHoverStart: () => state3?.open(!0),
- onHoverEnd: () => state3?.close()
- });
- return {
- tooltipProps: $3ef42575df84b30b$export$9d1611c77c2fe928(domProps, hoverProps, {
- role: "tooltip"
- })
- };
- }
-
- // ../../node_modules/@react-aria/tooltip/dist/useTooltipTrigger.mjs
- var import_react63 = __toESM(require_react(), 1);
- function $4e1b34546679e357$export$a6da6c504e4bba8b(props, state3, ref) {
- let { isDisabled: isDisabled3, trigger } = props, tooltipId = $bdb11010cef70236$export$f680877a34711e37(), isHovered = (0, import_react63.useRef)(!1), isFocused = (0, import_react63.useRef)(!1), handleShow = () => {
- (isHovered.current || isFocused.current) && state3.open(isFocused.current);
- }, handleHide = (immediate) => {
- !isHovered.current && !isFocused.current && state3.close(immediate);
- };
- (0, import_react63.useEffect)(() => {
- let onKeyDown = (e) => {
- ref && ref.current && e.key === "Escape" && (e.stopPropagation(), state3.close(!0));
- };
- if (state3.isOpen)
- return document.addEventListener("keydown", onKeyDown, !0), () => {
- document.removeEventListener("keydown", onKeyDown, !0);
- };
- }, [
- ref,
- state3
- ]);
- let onHoverStart = () => {
- trigger !== "focus" && ($507fabe10e71c6fb$export$630ff653c5ada6a9() === "pointer" ? isHovered.current = !0 : isHovered.current = !1, handleShow());
- }, onHoverEnd = () => {
- trigger !== "focus" && (isFocused.current = !1, isHovered.current = !1, handleHide());
- }, onPressStart = () => {
- isFocused.current = !1, isHovered.current = !1, handleHide(!0);
- }, onFocus = () => {
- $507fabe10e71c6fb$export$b9b3dfddab17db27() && (isFocused.current = !0, handleShow());
- }, onBlur = () => {
- isFocused.current = !1, isHovered.current = !1, handleHide(!0);
- }, { hoverProps } = $6179b936705e76d3$export$ae780daf29e6d456({
- isDisabled: isDisabled3,
- onHoverStart,
- onHoverEnd
- }), { focusableProps } = $f645667febf57a63$export$4c014de7c8940b4c({
- isDisabled: isDisabled3,
- onFocus,
- onBlur
- }, ref);
- return {
- triggerProps: {
- "aria-describedby": state3.isOpen ? tooltipId : void 0,
- ...$3ef42575df84b30b$export$9d1611c77c2fe928(focusableProps, hoverProps, {
- onPointerDown: onPressStart,
- onKeyDown: onPressStart
- }),
- tabIndex: void 0
- },
- tooltipProps: {
- id: tooltipId
- }
- };
- }
-
- // ../../node_modules/@react-aria/overlays/dist/calculatePosition.mjs
- var $edcf132a9284368a$var$AXIS = {
- top: "top",
- bottom: "top",
- left: "left",
- right: "left"
- }, $edcf132a9284368a$var$FLIPPED_DIRECTION = {
- top: "bottom",
- bottom: "top",
- left: "right",
- right: "left"
- }, $edcf132a9284368a$var$CROSS_AXIS = {
- top: "left",
- left: "top"
- }, $edcf132a9284368a$var$AXIS_SIZE = {
- top: "height",
- left: "width"
- }, $edcf132a9284368a$var$TOTAL_SIZE = {
- width: "totalWidth",
- height: "totalHeight"
- }, $edcf132a9284368a$var$PARSED_PLACEMENT_CACHE = {}, $edcf132a9284368a$var$visualViewport = typeof document < "u" ? window.visualViewport : null;
- function $edcf132a9284368a$var$getContainerDimensions(containerNode) {
- let width = 0, height = 0, totalWidth = 0, totalHeight = 0, top2 = 0, left2 = 0, scroll = {};
- var _visualViewport_scale;
- let isPinchZoomedIn = ((_visualViewport_scale = $edcf132a9284368a$var$visualViewport?.scale) !== null && _visualViewport_scale !== void 0 ? _visualViewport_scale : 1) > 1;
- if (containerNode.tagName === "BODY") {
- let documentElement = document.documentElement;
- totalWidth = documentElement.clientWidth, totalHeight = documentElement.clientHeight;
- var _visualViewport_width;
- width = (_visualViewport_width = $edcf132a9284368a$var$visualViewport?.width) !== null && _visualViewport_width !== void 0 ? _visualViewport_width : totalWidth;
- var _visualViewport_height;
- height = (_visualViewport_height = $edcf132a9284368a$var$visualViewport?.height) !== null && _visualViewport_height !== void 0 ? _visualViewport_height : totalHeight, scroll.top = documentElement.scrollTop || containerNode.scrollTop, scroll.left = documentElement.scrollLeft || containerNode.scrollLeft, $edcf132a9284368a$var$visualViewport && (top2 = $edcf132a9284368a$var$visualViewport.offsetTop, left2 = $edcf132a9284368a$var$visualViewport.offsetLeft);
- } else
- ({ width, height, top: top2, left: left2 } = $edcf132a9284368a$var$getOffset(containerNode, !1)), scroll.top = containerNode.scrollTop, scroll.left = containerNode.scrollLeft, totalWidth = width, totalHeight = height;
- if ($c87311424ea30a05$export$78551043582a6a98() && (containerNode.tagName === "BODY" || containerNode.tagName === "HTML") && isPinchZoomedIn) {
- scroll.top = 0, scroll.left = 0;
- var _visualViewport_pageTop;
- top2 = (_visualViewport_pageTop = $edcf132a9284368a$var$visualViewport?.pageTop) !== null && _visualViewport_pageTop !== void 0 ? _visualViewport_pageTop : 0;
- var _visualViewport_pageLeft;
- left2 = (_visualViewport_pageLeft = $edcf132a9284368a$var$visualViewport?.pageLeft) !== null && _visualViewport_pageLeft !== void 0 ? _visualViewport_pageLeft : 0;
- }
- return {
- width,
- height,
- totalWidth,
- totalHeight,
- scroll,
- top: top2,
- left: left2
- };
- }
- function $edcf132a9284368a$var$getScroll(node2) {
- return {
- top: node2.scrollTop,
- left: node2.scrollLeft,
- width: node2.scrollWidth,
- height: node2.scrollHeight
- };
- }
- function $edcf132a9284368a$var$getDelta(axis, offset3, size, boundaryDimensions, containerDimensions, padding, containerOffsetWithBoundary) {
- var _containerDimensions_scroll_axis;
- let containerScroll = (_containerDimensions_scroll_axis = containerDimensions.scroll[axis]) !== null && _containerDimensions_scroll_axis !== void 0 ? _containerDimensions_scroll_axis : 0, boundarySize = boundaryDimensions[$edcf132a9284368a$var$AXIS_SIZE[axis]], boundaryStartEdge = boundaryDimensions.scroll[$edcf132a9284368a$var$AXIS[axis]] + padding, boundaryEndEdge = boundarySize + boundaryDimensions.scroll[$edcf132a9284368a$var$AXIS[axis]] - padding, startEdgeOffset = offset3 - containerScroll + containerOffsetWithBoundary[axis] - boundaryDimensions[$edcf132a9284368a$var$AXIS[axis]], endEdgeOffset = offset3 - containerScroll + size + containerOffsetWithBoundary[axis] - boundaryDimensions[$edcf132a9284368a$var$AXIS[axis]];
- return startEdgeOffset < boundaryStartEdge ? boundaryStartEdge - startEdgeOffset : endEdgeOffset > boundaryEndEdge ? Math.max(boundaryEndEdge - endEdgeOffset, boundaryStartEdge - startEdgeOffset) : 0;
- }
- function $edcf132a9284368a$var$getMargins(node2) {
- let style = window.getComputedStyle(node2);
- return {
- top: parseInt(style.marginTop, 10) || 0,
- bottom: parseInt(style.marginBottom, 10) || 0,
- left: parseInt(style.marginLeft, 10) || 0,
- right: parseInt(style.marginRight, 10) || 0
- };
- }
- function $edcf132a9284368a$var$parsePlacement(input2) {
- if ($edcf132a9284368a$var$PARSED_PLACEMENT_CACHE[input2]) return $edcf132a9284368a$var$PARSED_PLACEMENT_CACHE[input2];
- let [placement, crossPlacement] = input2.split(" "), axis = $edcf132a9284368a$var$AXIS[placement] || "right", crossAxis = $edcf132a9284368a$var$CROSS_AXIS[axis];
- $edcf132a9284368a$var$AXIS[crossPlacement] || (crossPlacement = "center");
- let size = $edcf132a9284368a$var$AXIS_SIZE[axis], crossSize = $edcf132a9284368a$var$AXIS_SIZE[crossAxis];
- return $edcf132a9284368a$var$PARSED_PLACEMENT_CACHE[input2] = {
- placement,
- crossPlacement,
- axis,
- crossAxis,
- size,
- crossSize
- }, $edcf132a9284368a$var$PARSED_PLACEMENT_CACHE[input2];
- }
- function $edcf132a9284368a$var$computePosition(childOffset, boundaryDimensions, overlaySize, placementInfo, offset3, crossOffset, containerOffsetWithBoundary, isContainerPositioned, arrowSize, arrowBoundaryOffset) {
- let { placement, crossPlacement, axis, crossAxis, size, crossSize } = placementInfo, position2 = {};
- var _childOffset_crossAxis;
- position2[crossAxis] = (_childOffset_crossAxis = childOffset[crossAxis]) !== null && _childOffset_crossAxis !== void 0 ? _childOffset_crossAxis : 0;
- var _childOffset_crossSize, _overlaySize_crossSize, _childOffset_crossSize1, _overlaySize_crossSize1;
- crossPlacement === "center" ? position2[crossAxis] += (((_childOffset_crossSize = childOffset[crossSize]) !== null && _childOffset_crossSize !== void 0 ? _childOffset_crossSize : 0) - ((_overlaySize_crossSize = overlaySize[crossSize]) !== null && _overlaySize_crossSize !== void 0 ? _overlaySize_crossSize : 0)) / 2 : crossPlacement !== crossAxis && (position2[crossAxis] += ((_childOffset_crossSize1 = childOffset[crossSize]) !== null && _childOffset_crossSize1 !== void 0 ? _childOffset_crossSize1 : 0) - ((_overlaySize_crossSize1 = overlaySize[crossSize]) !== null && _overlaySize_crossSize1 !== void 0 ? _overlaySize_crossSize1 : 0)), position2[crossAxis] += crossOffset;
- let minPosition = childOffset[crossAxis] - overlaySize[crossSize] + arrowSize + arrowBoundaryOffset, maxPosition = childOffset[crossAxis] + childOffset[crossSize] - arrowSize - arrowBoundaryOffset;
- if (position2[crossAxis] = $9446cca9a3875146$export$7d15b64cf5a3a4c4(position2[crossAxis], minPosition, maxPosition), placement === axis) {
- let containerHeight = isContainerPositioned ? containerOffsetWithBoundary[size] : boundaryDimensions[$edcf132a9284368a$var$TOTAL_SIZE[size]];
- position2[$edcf132a9284368a$var$FLIPPED_DIRECTION[axis]] = Math.floor(containerHeight - childOffset[axis] + offset3);
- } else position2[axis] = Math.floor(childOffset[axis] + childOffset[size] + offset3);
- return position2;
- }
- function $edcf132a9284368a$var$getMaxHeight(position2, boundaryDimensions, containerOffsetWithBoundary, isContainerPositioned, margins, padding, overlayHeight, heightGrowthDirection) {
- let containerHeight = isContainerPositioned ? containerOffsetWithBoundary.height : boundaryDimensions[$edcf132a9284368a$var$TOTAL_SIZE.height];
- var _position_bottom;
- let overlayTop = position2.top != null ? containerOffsetWithBoundary.top + position2.top : containerOffsetWithBoundary.top + (containerHeight - ((_position_bottom = position2.bottom) !== null && _position_bottom !== void 0 ? _position_bottom : 0) - overlayHeight);
- var _boundaryDimensions_scroll_top, _margins_top, _margins_bottom, _boundaryDimensions_scroll_top1, _margins_top1, _margins_bottom1;
- let maxHeight = heightGrowthDirection !== "top" ? (
- // We want the distance between the top of the overlay to the bottom of the boundary
- Math.max(0, boundaryDimensions.height + boundaryDimensions.top + ((_boundaryDimensions_scroll_top = boundaryDimensions.scroll.top) !== null && _boundaryDimensions_scroll_top !== void 0 ? _boundaryDimensions_scroll_top : 0) - overlayTop - (((_margins_top = margins.top) !== null && _margins_top !== void 0 ? _margins_top : 0) + ((_margins_bottom = margins.bottom) !== null && _margins_bottom !== void 0 ? _margins_bottom : 0) + padding))
- ) : Math.max(0, overlayTop + overlayHeight - (boundaryDimensions.top + ((_boundaryDimensions_scroll_top1 = boundaryDimensions.scroll.top) !== null && _boundaryDimensions_scroll_top1 !== void 0 ? _boundaryDimensions_scroll_top1 : 0)) - (((_margins_top1 = margins.top) !== null && _margins_top1 !== void 0 ? _margins_top1 : 0) + ((_margins_bottom1 = margins.bottom) !== null && _margins_bottom1 !== void 0 ? _margins_bottom1 : 0) + padding));
- return Math.min(boundaryDimensions.height - padding * 2, maxHeight);
- }
- function $edcf132a9284368a$var$getAvailableSpace(boundaryDimensions, containerOffsetWithBoundary, childOffset, margins, padding, placementInfo) {
- let { placement, axis, size } = placementInfo;
- var _boundaryDimensions_scroll_axis, _margins_axis;
- if (placement === axis) return Math.max(0, childOffset[axis] - boundaryDimensions[axis] - ((_boundaryDimensions_scroll_axis = boundaryDimensions.scroll[axis]) !== null && _boundaryDimensions_scroll_axis !== void 0 ? _boundaryDimensions_scroll_axis : 0) + containerOffsetWithBoundary[axis] - ((_margins_axis = margins[axis]) !== null && _margins_axis !== void 0 ? _margins_axis : 0) - margins[$edcf132a9284368a$var$FLIPPED_DIRECTION[axis]] - padding);
- var _margins_axis1;
- return Math.max(0, boundaryDimensions[size] + boundaryDimensions[axis] + boundaryDimensions.scroll[axis] - containerOffsetWithBoundary[axis] - childOffset[axis] - childOffset[size] - ((_margins_axis1 = margins[axis]) !== null && _margins_axis1 !== void 0 ? _margins_axis1 : 0) - margins[$edcf132a9284368a$var$FLIPPED_DIRECTION[axis]] - padding);
- }
- function $edcf132a9284368a$export$6839422d1f33cee9(placementInput, childOffset, overlaySize, scrollSize, margins, padding, flip2, boundaryDimensions, containerDimensions, containerOffsetWithBoundary, offset3, crossOffset, isContainerPositioned, userSetMaxHeight, arrowSize, arrowBoundaryOffset) {
- let placementInfo = $edcf132a9284368a$var$parsePlacement(placementInput), { size, crossAxis, crossSize, placement, crossPlacement } = placementInfo, position2 = $edcf132a9284368a$var$computePosition(childOffset, boundaryDimensions, overlaySize, placementInfo, offset3, crossOffset, containerOffsetWithBoundary, isContainerPositioned, arrowSize, arrowBoundaryOffset), normalizedOffset = offset3, space = $edcf132a9284368a$var$getAvailableSpace(boundaryDimensions, containerOffsetWithBoundary, childOffset, margins, padding + offset3, placementInfo);
- if (flip2 && scrollSize[size] > space) {
- let flippedPlacementInfo = $edcf132a9284368a$var$parsePlacement(`${$edcf132a9284368a$var$FLIPPED_DIRECTION[placement]} ${crossPlacement}`), flippedPosition = $edcf132a9284368a$var$computePosition(childOffset, boundaryDimensions, overlaySize, flippedPlacementInfo, offset3, crossOffset, containerOffsetWithBoundary, isContainerPositioned, arrowSize, arrowBoundaryOffset);
- $edcf132a9284368a$var$getAvailableSpace(boundaryDimensions, containerOffsetWithBoundary, childOffset, margins, padding + offset3, flippedPlacementInfo) > space && (placementInfo = flippedPlacementInfo, position2 = flippedPosition, normalizedOffset = offset3);
- }
- let heightGrowthDirection = "bottom";
- placementInfo.axis === "top" ? placementInfo.placement === "top" ? heightGrowthDirection = "top" : placementInfo.placement === "bottom" && (heightGrowthDirection = "bottom") : placementInfo.crossAxis === "top" && (placementInfo.crossPlacement === "top" ? heightGrowthDirection = "bottom" : placementInfo.crossPlacement === "bottom" && (heightGrowthDirection = "top"));
- let delta = $edcf132a9284368a$var$getDelta(crossAxis, position2[crossAxis], overlaySize[crossSize], boundaryDimensions, containerDimensions, padding, containerOffsetWithBoundary);
- position2[crossAxis] += delta;
- let maxHeight = $edcf132a9284368a$var$getMaxHeight(position2, boundaryDimensions, containerOffsetWithBoundary, isContainerPositioned, margins, padding, overlaySize.height, heightGrowthDirection);
- userSetMaxHeight && userSetMaxHeight < maxHeight && (maxHeight = userSetMaxHeight), overlaySize.height = Math.min(overlaySize.height, maxHeight), position2 = $edcf132a9284368a$var$computePosition(childOffset, boundaryDimensions, overlaySize, placementInfo, normalizedOffset, crossOffset, containerOffsetWithBoundary, isContainerPositioned, arrowSize, arrowBoundaryOffset), delta = $edcf132a9284368a$var$getDelta(crossAxis, position2[crossAxis], overlaySize[crossSize], boundaryDimensions, containerDimensions, padding, containerOffsetWithBoundary), position2[crossAxis] += delta;
- let arrowPosition = {}, origin = childOffset[crossAxis] - position2[crossAxis] - margins[$edcf132a9284368a$var$AXIS[crossAxis]], preferredArrowPosition = origin + 0.5 * childOffset[crossSize], arrowMinPosition = arrowSize / 2 + arrowBoundaryOffset;
- var _margins_left, _margins_right, _margins_top, _margins_bottom;
- let overlayMargin = $edcf132a9284368a$var$AXIS[crossAxis] === "left" ? ((_margins_left = margins.left) !== null && _margins_left !== void 0 ? _margins_left : 0) + ((_margins_right = margins.right) !== null && _margins_right !== void 0 ? _margins_right : 0) : ((_margins_top = margins.top) !== null && _margins_top !== void 0 ? _margins_top : 0) + ((_margins_bottom = margins.bottom) !== null && _margins_bottom !== void 0 ? _margins_bottom : 0), arrowMaxPosition = overlaySize[crossSize] - overlayMargin - arrowSize / 2 - arrowBoundaryOffset, arrowOverlappingChildMinEdge = childOffset[crossAxis] + arrowSize / 2 - (position2[crossAxis] + margins[$edcf132a9284368a$var$AXIS[crossAxis]]), arrowOverlappingChildMaxEdge = childOffset[crossAxis] + childOffset[crossSize] - arrowSize / 2 - (position2[crossAxis] + margins[$edcf132a9284368a$var$AXIS[crossAxis]]), arrowPositionOverlappingChild = $9446cca9a3875146$export$7d15b64cf5a3a4c4(preferredArrowPosition, arrowOverlappingChildMinEdge, arrowOverlappingChildMaxEdge);
- arrowPosition[crossAxis] = $9446cca9a3875146$export$7d15b64cf5a3a4c4(arrowPositionOverlappingChild, arrowMinPosition, arrowMaxPosition), { placement, crossPlacement } = placementInfo, arrowSize ? origin = arrowPosition[crossAxis] : crossPlacement === "right" ? origin += childOffset[crossSize] : crossPlacement === "center" && (origin += childOffset[crossSize] / 2);
- let crossOrigin = placement === "left" || placement === "top" ? overlaySize[size] : 0, triggerAnchorPoint = {
- x: placement === "top" || placement === "bottom" ? origin : crossOrigin,
- y: placement === "left" || placement === "right" ? origin : crossOrigin
- };
- return {
- position: position2,
- maxHeight,
- arrowOffsetLeft: arrowPosition.left,
- arrowOffsetTop: arrowPosition.top,
- placement,
- triggerAnchorPoint
- };
- }
- function $edcf132a9284368a$export$b3ceb0cbf1056d98(opts) {
- let { placement, targetNode, overlayNode, scrollNode, padding, shouldFlip, boundaryElement, offset: offset3, crossOffset, maxHeight, arrowSize = 0, arrowBoundaryOffset = 0 } = opts, container = overlayNode instanceof HTMLElement ? $edcf132a9284368a$var$getContainingBlock(overlayNode) : document.documentElement, isViewportContainer = container === document.documentElement, containerPositionStyle = window.getComputedStyle(container).position, isContainerPositioned = !!containerPositionStyle && containerPositionStyle !== "static", childOffset = isViewportContainer ? $edcf132a9284368a$var$getOffset(targetNode, !1) : $edcf132a9284368a$var$getPosition(targetNode, container, !1);
- if (!isViewportContainer) {
- let { marginTop, marginLeft } = window.getComputedStyle(targetNode);
- childOffset.top += parseInt(marginTop, 10) || 0, childOffset.left += parseInt(marginLeft, 10) || 0;
- }
- let overlaySize = $edcf132a9284368a$var$getOffset(overlayNode, !0), margins = $edcf132a9284368a$var$getMargins(overlayNode);
- var _margins_left, _margins_right;
- overlaySize.width += ((_margins_left = margins.left) !== null && _margins_left !== void 0 ? _margins_left : 0) + ((_margins_right = margins.right) !== null && _margins_right !== void 0 ? _margins_right : 0);
- var _margins_top, _margins_bottom;
- overlaySize.height += ((_margins_top = margins.top) !== null && _margins_top !== void 0 ? _margins_top : 0) + ((_margins_bottom = margins.bottom) !== null && _margins_bottom !== void 0 ? _margins_bottom : 0);
- let scrollSize = $edcf132a9284368a$var$getScroll(scrollNode), boundaryDimensions = $edcf132a9284368a$var$getContainerDimensions(boundaryElement), containerDimensions = $edcf132a9284368a$var$getContainerDimensions(container), containerOffsetWithBoundary = boundaryElement.tagName === "BODY" ? $edcf132a9284368a$var$getOffset(container, !1) : $edcf132a9284368a$var$getPosition(container, boundaryElement, !1);
- return container.tagName === "HTML" && boundaryElement.tagName === "BODY" && (containerDimensions.scroll.top = 0, containerDimensions.scroll.left = 0), $edcf132a9284368a$export$6839422d1f33cee9(placement, childOffset, overlaySize, scrollSize, margins, padding, shouldFlip, boundaryDimensions, containerDimensions, containerOffsetWithBoundary, offset3, crossOffset, isContainerPositioned, maxHeight, arrowSize, arrowBoundaryOffset);
- }
- function $edcf132a9284368a$export$4b834cebd9e5cebe(node2, ignoreScale) {
- let { top: top2, left: left2, width, height } = node2.getBoundingClientRect();
- return ignoreScale && node2 instanceof node2.ownerDocument.defaultView.HTMLElement && (width = node2.offsetWidth, height = node2.offsetHeight), {
- top: top2,
- left: left2,
- width,
- height
- };
- }
- function $edcf132a9284368a$var$getOffset(node2, ignoreScale) {
- let { top: top2, left: left2, width, height } = $edcf132a9284368a$export$4b834cebd9e5cebe(node2, ignoreScale), { scrollTop, scrollLeft, clientTop, clientLeft } = document.documentElement;
- return {
- top: top2 + scrollTop - clientTop,
- left: left2 + scrollLeft - clientLeft,
- width,
- height
- };
- }
- function $edcf132a9284368a$var$getPosition(node2, parent, ignoreScale) {
- let style = window.getComputedStyle(node2), offset3;
- if (style.position === "fixed") offset3 = $edcf132a9284368a$export$4b834cebd9e5cebe(node2, ignoreScale);
- else {
- offset3 = $edcf132a9284368a$var$getOffset(node2, ignoreScale);
- let parentOffset = $edcf132a9284368a$var$getOffset(parent, ignoreScale), parentStyle = window.getComputedStyle(parent);
- parentOffset.top += (parseInt(parentStyle.borderTopWidth, 10) || 0) - parent.scrollTop, parentOffset.left += (parseInt(parentStyle.borderLeftWidth, 10) || 0) - parent.scrollLeft, offset3.top -= parentOffset.top, offset3.left -= parentOffset.left;
- }
- return offset3.top -= parseInt(style.marginTop, 10) || 0, offset3.left -= parseInt(style.marginLeft, 10) || 0, offset3;
- }
- function $edcf132a9284368a$var$getContainingBlock(node2) {
- let offsetParent = node2.offsetParent;
- if (offsetParent && offsetParent === document.body && window.getComputedStyle(offsetParent).position === "static" && !$edcf132a9284368a$var$isContainingBlock(offsetParent) && (offsetParent = document.documentElement), offsetParent == null)
- for (offsetParent = node2.parentElement; offsetParent && !$edcf132a9284368a$var$isContainingBlock(offsetParent); ) offsetParent = offsetParent.parentElement;
- return offsetParent || document.documentElement;
- }
- function $edcf132a9284368a$var$isContainingBlock(node2) {
- let style = window.getComputedStyle(node2);
- return style.transform !== "none" || /transform|perspective/.test(style.willChange) || style.filter !== "none" || style.contain === "paint" || "backdropFilter" in style && style.backdropFilter !== "none" || "WebkitBackdropFilter" in style && style.WebkitBackdropFilter !== "none";
- }
-
- // ../../node_modules/@react-aria/overlays/dist/useCloseOnScroll.mjs
- var import_react64 = __toESM(require_react(), 1), $dd149f63282afbbf$export$f6211563215e3b37 = /* @__PURE__ */ new WeakMap();
- function $dd149f63282afbbf$export$18fc8428861184da(opts) {
- let { triggerRef, isOpen, onClose } = opts;
- (0, import_react64.useEffect)(() => {
- if (!isOpen || onClose === null) return;
- let onScroll = (e) => {
- let target = e.target;
- if (!triggerRef.current || target instanceof Node && !target.contains(triggerRef.current) || e.target instanceof HTMLInputElement || e.target instanceof HTMLTextAreaElement) return;
- let onCloseHandler = onClose || $dd149f63282afbbf$export$f6211563215e3b37.get(triggerRef.current);
- onCloseHandler && onCloseHandler();
- };
- return window.addEventListener("scroll", onScroll, !0), () => {
- window.removeEventListener("scroll", onScroll, !0);
- };
- }, [
- isOpen,
- onClose,
- triggerRef
- ]);
- }
-
- // ../../node_modules/@react-aria/overlays/dist/useOverlayPosition.mjs
- var import_react73 = __toESM(require_react(), 1);
-
- // ../../node_modules/@react-aria/i18n/dist/utils.mjs
- var $148a7a147e38ea7f$var$RTL_SCRIPTS = /* @__PURE__ */ new Set([
- "Arab",
- "Syrc",
- "Samr",
- "Mand",
- "Thaa",
- "Mend",
- "Nkoo",
- "Adlm",
- "Rohg",
- "Hebr"
- ]), $148a7a147e38ea7f$var$RTL_LANGS = /* @__PURE__ */ new Set([
- "ae",
- "ar",
- "arc",
- "bcc",
- "bqi",
- "ckb",
- "dv",
- "fa",
- "glk",
- "he",
- "ku",
- "mzn",
- "nqo",
- "pnb",
- "ps",
- "sd",
- "ug",
- "ur",
- "yi"
- ]);
- function $148a7a147e38ea7f$export$702d680b21cbd764(localeString) {
- if (Intl.Locale) {
- let locale = new Intl.Locale(localeString).maximize(), textInfo = typeof locale.getTextInfo == "function" ? locale.getTextInfo() : locale.textInfo;
- if (textInfo) return textInfo.direction === "rtl";
- if (locale.script) return $148a7a147e38ea7f$var$RTL_SCRIPTS.has(locale.script);
- }
- let lang = localeString.split("-")[0];
- return $148a7a147e38ea7f$var$RTL_LANGS.has(lang);
- }
-
- // ../../node_modules/@react-aria/i18n/dist/useDefaultLocale.mjs
- var import_react65 = __toESM(require_react(), 1);
- var $1e5a04cdaf7d1af8$var$localeSymbol = Symbol.for("react-aria.i18n.locale");
- function $1e5a04cdaf7d1af8$export$f09106e7c6677ec5() {
- let locale = typeof window < "u" && window[$1e5a04cdaf7d1af8$var$localeSymbol] || typeof navigator < "u" && (navigator.language || navigator.userLanguage) || "en-US";
- try {
- Intl.DateTimeFormat.supportedLocalesOf([
- locale
- ]);
- } catch {
- locale = "en-US";
- }
- return {
- locale,
- direction: $148a7a147e38ea7f$export$702d680b21cbd764(locale) ? "rtl" : "ltr"
- };
- }
- var $1e5a04cdaf7d1af8$var$currentLocale = $1e5a04cdaf7d1af8$export$f09106e7c6677ec5(), $1e5a04cdaf7d1af8$var$listeners = /* @__PURE__ */ new Set();
- function $1e5a04cdaf7d1af8$var$updateLocale() {
- $1e5a04cdaf7d1af8$var$currentLocale = $1e5a04cdaf7d1af8$export$f09106e7c6677ec5();
- for (let listener of $1e5a04cdaf7d1af8$var$listeners) listener($1e5a04cdaf7d1af8$var$currentLocale);
- }
- function $1e5a04cdaf7d1af8$export$188ec29ebc2bdc3a() {
- let isSSR = $b5e257d569688ac6$export$535bd6ca7f90a273(), [defaultLocale, setDefaultLocale] = (0, import_react65.useState)($1e5a04cdaf7d1af8$var$currentLocale);
- return (0, import_react65.useEffect)(() => ($1e5a04cdaf7d1af8$var$listeners.size === 0 && window.addEventListener("languagechange", $1e5a04cdaf7d1af8$var$updateLocale), $1e5a04cdaf7d1af8$var$listeners.add(setDefaultLocale), () => {
- $1e5a04cdaf7d1af8$var$listeners.delete(setDefaultLocale), $1e5a04cdaf7d1af8$var$listeners.size === 0 && window.removeEventListener("languagechange", $1e5a04cdaf7d1af8$var$updateLocale);
- }), []), isSSR ? {
- locale: "en-US",
- direction: "ltr"
- } : defaultLocale;
- }
-
- // ../../node_modules/@react-aria/i18n/dist/context.mjs
- var import_react66 = __toESM(require_react(), 1), $18f2051aff69b9bf$var$I18nContext = import_react66.default.createContext(null);
- function $18f2051aff69b9bf$export$43bb16f9c6d9e3f7() {
- let defaultLocale = $1e5a04cdaf7d1af8$export$188ec29ebc2bdc3a();
- return (0, import_react66.useContext)($18f2051aff69b9bf$var$I18nContext) || defaultLocale;
- }
-
- // ../../node_modules/tslib/tslib.es6.mjs
- var extendStatics = function(d, b) {
- return extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
- d2.__proto__ = b2;
- } || function(d2, b2) {
- for (var p3 in b2) Object.prototype.hasOwnProperty.call(b2, p3) && (d2[p3] = b2[p3]);
- }, extendStatics(d, b);
- };
- function __extends(d, b) {
- if (typeof b != "function" && b !== null)
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
- extendStatics(d, b);
- function __() {
- this.constructor = d;
- }
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
- }
- var __assign = function() {
- return __assign = Object.assign || function(t) {
- for (var s3, i = 1, n = arguments.length; i < n; i++) {
- s3 = arguments[i];
- for (var p3 in s3) Object.prototype.hasOwnProperty.call(s3, p3) && (t[p3] = s3[p3]);
- }
- return t;
- }, __assign.apply(this, arguments);
- };
- function __rest(s3, e) {
- var t = {};
- for (var p3 in s3) Object.prototype.hasOwnProperty.call(s3, p3) && e.indexOf(p3) < 0 && (t[p3] = s3[p3]);
- if (s3 != null && typeof Object.getOwnPropertySymbols == "function")
- for (var i = 0, p3 = Object.getOwnPropertySymbols(s3); i < p3.length; i++)
- e.indexOf(p3[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s3, p3[i]) && (t[p3[i]] = s3[p3[i]]);
- return t;
- }
- function __spreadArray(to, from2, pack) {
- if (pack || arguments.length === 2) for (var i = 0, l = from2.length, ar; i < l; i++)
- (ar || !(i in from2)) && (ar || (ar = Array.prototype.slice.call(from2, 0, i)), ar[i] = from2[i]);
- return to.concat(ar || Array.prototype.slice.call(from2));
- }
-
- // ../../node_modules/@formatjs/fast-memoize/lib/index.js
- function memoize12(fn4, options) {
- var cache = options && options.cache ? options.cache : cacheDefault, serializer = options && options.serializer ? options.serializer : serializerDefault, strategy = options && options.strategy ? options.strategy : strategyDefault;
- return strategy(fn4, {
- cache,
- serializer
- });
- }
- function isPrimitive4(value) {
- return value == null || typeof value == "number" || typeof value == "boolean";
- }
- function monadic(fn4, cache, serializer, arg) {
- var cacheKey = isPrimitive4(arg) ? arg : serializer(arg), computedValue = cache.get(cacheKey);
- return typeof computedValue > "u" && (computedValue = fn4.call(this, arg), cache.set(cacheKey, computedValue)), computedValue;
- }
- function variadic(fn4, cache, serializer) {
- var args = Array.prototype.slice.call(arguments, 3), cacheKey = serializer(args), computedValue = cache.get(cacheKey);
- return typeof computedValue > "u" && (computedValue = fn4.apply(this, args), cache.set(cacheKey, computedValue)), computedValue;
- }
- function assemble(fn4, context, strategy, cache, serialize3) {
- return strategy.bind(context, fn4, cache, serialize3);
- }
- function strategyDefault(fn4, options) {
- var strategy = fn4.length === 1 ? monadic : variadic;
- return assemble(fn4, this, strategy, options.cache.create(), options.serializer);
- }
- function strategyVariadic(fn4, options) {
- return assemble(fn4, this, variadic, options.cache.create(), options.serializer);
- }
- function strategyMonadic(fn4, options) {
- return assemble(fn4, this, monadic, options.cache.create(), options.serializer);
- }
- var serializerDefault = function() {
- return JSON.stringify(arguments);
- }, ObjectWithoutPrototypeCache = (
- /** @class */
- (function() {
- function ObjectWithoutPrototypeCache2() {
- this.cache = /* @__PURE__ */ Object.create(null);
- }
- return ObjectWithoutPrototypeCache2.prototype.get = function(key) {
- return this.cache[key];
- }, ObjectWithoutPrototypeCache2.prototype.set = function(key, value) {
- this.cache[key] = value;
- }, ObjectWithoutPrototypeCache2;
- })()
- ), cacheDefault = {
- create: function() {
- return new ObjectWithoutPrototypeCache();
- }
- }, strategies = {
- variadic: strategyVariadic,
- monadic: strategyMonadic
- };
-
- // ../../node_modules/@formatjs/icu-messageformat-parser/lib/error.js
- var ErrorKind;
- (function(ErrorKind2) {
- ErrorKind2[ErrorKind2.EXPECT_ARGUMENT_CLOSING_BRACE = 1] = "EXPECT_ARGUMENT_CLOSING_BRACE", ErrorKind2[ErrorKind2.EMPTY_ARGUMENT = 2] = "EMPTY_ARGUMENT", ErrorKind2[ErrorKind2.MALFORMED_ARGUMENT = 3] = "MALFORMED_ARGUMENT", ErrorKind2[ErrorKind2.EXPECT_ARGUMENT_TYPE = 4] = "EXPECT_ARGUMENT_TYPE", ErrorKind2[ErrorKind2.INVALID_ARGUMENT_TYPE = 5] = "INVALID_ARGUMENT_TYPE", ErrorKind2[ErrorKind2.EXPECT_ARGUMENT_STYLE = 6] = "EXPECT_ARGUMENT_STYLE", ErrorKind2[ErrorKind2.INVALID_NUMBER_SKELETON = 7] = "INVALID_NUMBER_SKELETON", ErrorKind2[ErrorKind2.INVALID_DATE_TIME_SKELETON = 8] = "INVALID_DATE_TIME_SKELETON", ErrorKind2[ErrorKind2.EXPECT_NUMBER_SKELETON = 9] = "EXPECT_NUMBER_SKELETON", ErrorKind2[ErrorKind2.EXPECT_DATE_TIME_SKELETON = 10] = "EXPECT_DATE_TIME_SKELETON", ErrorKind2[ErrorKind2.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE = 11] = "UNCLOSED_QUOTE_IN_ARGUMENT_STYLE", ErrorKind2[ErrorKind2.EXPECT_SELECT_ARGUMENT_OPTIONS = 12] = "EXPECT_SELECT_ARGUMENT_OPTIONS", ErrorKind2[ErrorKind2.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE = 13] = "EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE", ErrorKind2[ErrorKind2.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE = 14] = "INVALID_PLURAL_ARGUMENT_OFFSET_VALUE", ErrorKind2[ErrorKind2.EXPECT_SELECT_ARGUMENT_SELECTOR = 15] = "EXPECT_SELECT_ARGUMENT_SELECTOR", ErrorKind2[ErrorKind2.EXPECT_PLURAL_ARGUMENT_SELECTOR = 16] = "EXPECT_PLURAL_ARGUMENT_SELECTOR", ErrorKind2[ErrorKind2.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT = 17] = "EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT", ErrorKind2[ErrorKind2.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT = 18] = "EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT", ErrorKind2[ErrorKind2.INVALID_PLURAL_ARGUMENT_SELECTOR = 19] = "INVALID_PLURAL_ARGUMENT_SELECTOR", ErrorKind2[ErrorKind2.DUPLICATE_PLURAL_ARGUMENT_SELECTOR = 20] = "DUPLICATE_PLURAL_ARGUMENT_SELECTOR", ErrorKind2[ErrorKind2.DUPLICATE_SELECT_ARGUMENT_SELECTOR = 21] = "DUPLICATE_SELECT_ARGUMENT_SELECTOR", ErrorKind2[ErrorKind2.MISSING_OTHER_CLAUSE = 22] = "MISSING_OTHER_CLAUSE", ErrorKind2[ErrorKind2.INVALID_TAG = 23] = "INVALID_TAG", ErrorKind2[ErrorKind2.INVALID_TAG_NAME = 25] = "INVALID_TAG_NAME", ErrorKind2[ErrorKind2.UNMATCHED_CLOSING_TAG = 26] = "UNMATCHED_CLOSING_TAG", ErrorKind2[ErrorKind2.UNCLOSED_TAG = 27] = "UNCLOSED_TAG";
- })(ErrorKind || (ErrorKind = {}));
-
- // ../../node_modules/@formatjs/icu-messageformat-parser/lib/types.js
- var TYPE;
- (function(TYPE2) {
- TYPE2[TYPE2.literal = 0] = "literal", TYPE2[TYPE2.argument = 1] = "argument", TYPE2[TYPE2.number = 2] = "number", TYPE2[TYPE2.date = 3] = "date", TYPE2[TYPE2.time = 4] = "time", TYPE2[TYPE2.select = 5] = "select", TYPE2[TYPE2.plural = 6] = "plural", TYPE2[TYPE2.pound = 7] = "pound", TYPE2[TYPE2.tag = 8] = "tag";
- })(TYPE || (TYPE = {}));
- var SKELETON_TYPE;
- (function(SKELETON_TYPE2) {
- SKELETON_TYPE2[SKELETON_TYPE2.number = 0] = "number", SKELETON_TYPE2[SKELETON_TYPE2.dateTime = 1] = "dateTime";
- })(SKELETON_TYPE || (SKELETON_TYPE = {}));
- function isLiteralElement(el) {
- return el.type === TYPE.literal;
- }
- function isArgumentElement(el) {
- return el.type === TYPE.argument;
- }
- function isNumberElement(el) {
- return el.type === TYPE.number;
- }
- function isDateElement(el) {
- return el.type === TYPE.date;
- }
- function isTimeElement(el) {
- return el.type === TYPE.time;
- }
- function isSelectElement(el) {
- return el.type === TYPE.select;
- }
- function isPluralElement(el) {
- return el.type === TYPE.plural;
- }
- function isPoundElement(el) {
- return el.type === TYPE.pound;
- }
- function isTagElement(el) {
- return el.type === TYPE.tag;
- }
- function isNumberSkeleton(el) {
- return !!(el && typeof el == "object" && el.type === SKELETON_TYPE.number);
- }
- function isDateTimeSkeleton(el) {
- return !!(el && typeof el == "object" && el.type === SKELETON_TYPE.dateTime);
- }
-
- // ../../node_modules/@formatjs/icu-messageformat-parser/lib/regex.generated.js
- var SPACE_SEPARATOR_REGEX = /[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/;
-
- // ../../node_modules/@formatjs/icu-skeleton-parser/lib/date-time.js
- var DATE_TIME_REGEX = /(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;
- function parseDateTimeSkeleton(skeleton) {
- var result = {};
- return skeleton.replace(DATE_TIME_REGEX, function(match3) {
- var len = match3.length;
- switch (match3[0]) {
- // Era
- case "G":
- result.era = len === 4 ? "long" : len === 5 ? "narrow" : "short";
- break;
- // Year
- case "y":
- result.year = len === 2 ? "2-digit" : "numeric";
- break;
- case "Y":
- case "u":
- case "U":
- case "r":
- throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");
- // Quarter
- case "q":
- case "Q":
- throw new RangeError("`q/Q` (quarter) patterns are not supported");
- // Month
- case "M":
- case "L":
- result.month = ["numeric", "2-digit", "short", "long", "narrow"][len - 1];
- break;
- // Week
- case "w":
- case "W":
- throw new RangeError("`w/W` (week) patterns are not supported");
- case "d":
- result.day = ["numeric", "2-digit"][len - 1];
- break;
- case "D":
- case "F":
- case "g":
- throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");
- // Weekday
- case "E":
- result.weekday = len === 4 ? "long" : len === 5 ? "narrow" : "short";
- break;
- case "e":
- if (len < 4)
- throw new RangeError("`e..eee` (weekday) patterns are not supported");
- result.weekday = ["short", "long", "narrow", "short"][len - 4];
- break;
- case "c":
- if (len < 4)
- throw new RangeError("`c..ccc` (weekday) patterns are not supported");
- result.weekday = ["short", "long", "narrow", "short"][len - 4];
- break;
- // Period
- case "a":
- result.hour12 = !0;
- break;
- case "b":
- // am, pm, noon, midnight
- case "B":
- throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");
- // Hour
- case "h":
- result.hourCycle = "h12", result.hour = ["numeric", "2-digit"][len - 1];
- break;
- case "H":
- result.hourCycle = "h23", result.hour = ["numeric", "2-digit"][len - 1];
- break;
- case "K":
- result.hourCycle = "h11", result.hour = ["numeric", "2-digit"][len - 1];
- break;
- case "k":
- result.hourCycle = "h24", result.hour = ["numeric", "2-digit"][len - 1];
- break;
- case "j":
- case "J":
- case "C":
- throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");
- // Minute
- case "m":
- result.minute = ["numeric", "2-digit"][len - 1];
- break;
- // Second
- case "s":
- result.second = ["numeric", "2-digit"][len - 1];
- break;
- case "S":
- case "A":
- throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");
- // Zone
- case "z":
- result.timeZoneName = len < 4 ? "short" : "long";
- break;
- case "Z":
- // 1..3, 4, 5: The ISO8601 varios formats
- case "O":
- // 1, 4: milliseconds in day short, long
- case "v":
- // 1, 4: generic non-location format
- case "V":
- // 1, 2, 3, 4: time zone ID or city
- case "X":
- // 1, 2, 3, 4: The ISO8601 varios formats
- case "x":
- throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead");
- }
- return "";
- }), result;
- }
-
- // ../../node_modules/@formatjs/icu-skeleton-parser/lib/regex.generated.js
- var WHITE_SPACE_REGEX = /[\t-\r \x85\u200E\u200F\u2028\u2029]/i;
-
- // ../../node_modules/@formatjs/icu-skeleton-parser/lib/number.js
- function parseNumberSkeletonFromString(skeleton) {
- if (skeleton.length === 0)
- throw new Error("Number skeleton cannot be empty");
- for (var stringTokens = skeleton.split(WHITE_SPACE_REGEX).filter(function(x) {
- return x.length > 0;
- }), tokens2 = [], _i = 0, stringTokens_1 = stringTokens; _i < stringTokens_1.length; _i++) {
- var stringToken = stringTokens_1[_i], stemAndOptions = stringToken.split("/");
- if (stemAndOptions.length === 0)
- throw new Error("Invalid number skeleton");
- for (var stem = stemAndOptions[0], options = stemAndOptions.slice(1), _a4 = 0, options_1 = options; _a4 < options_1.length; _a4++) {
- var option = options_1[_a4];
- if (option.length === 0)
- throw new Error("Invalid number skeleton");
- }
- tokens2.push({ stem, options });
- }
- return tokens2;
- }
- function icuUnitToEcma(unit) {
- return unit.replace(/^(.*?)-/, "");
- }
- var FRACTION_PRECISION_REGEX = /^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g, SIGNIFICANT_PRECISION_REGEX = /^(@+)?(\+|#+)?[rs]?$/g, INTEGER_WIDTH_REGEX = /(\*)(0+)|(#+)(0+)|(0+)/g, CONCISE_INTEGER_WIDTH_REGEX = /^(0+)$/;
- function parseSignificantPrecision(str2) {
- var result = {};
- return str2[str2.length - 1] === "r" ? result.roundingPriority = "morePrecision" : str2[str2.length - 1] === "s" && (result.roundingPriority = "lessPrecision"), str2.replace(SIGNIFICANT_PRECISION_REGEX, function(_, g1, g2) {
- return typeof g2 != "string" ? (result.minimumSignificantDigits = g1.length, result.maximumSignificantDigits = g1.length) : g2 === "+" ? result.minimumSignificantDigits = g1.length : g1[0] === "#" ? result.maximumSignificantDigits = g1.length : (result.minimumSignificantDigits = g1.length, result.maximumSignificantDigits = g1.length + (typeof g2 == "string" ? g2.length : 0)), "";
- }), result;
- }
- function parseSign(str2) {
- switch (str2) {
- case "sign-auto":
- return {
- signDisplay: "auto"
- };
- case "sign-accounting":
- case "()":
- return {
- currencySign: "accounting"
- };
- case "sign-always":
- case "+!":
- return {
- signDisplay: "always"
- };
- case "sign-accounting-always":
- case "()!":
- return {
- signDisplay: "always",
- currencySign: "accounting"
- };
- case "sign-except-zero":
- case "+?":
- return {
- signDisplay: "exceptZero"
- };
- case "sign-accounting-except-zero":
- case "()?":
- return {
- signDisplay: "exceptZero",
- currencySign: "accounting"
- };
- case "sign-never":
- case "+_":
- return {
- signDisplay: "never"
- };
- }
- }
- function parseConciseScientificAndEngineeringStem(stem) {
- var result;
- if (stem[0] === "E" && stem[1] === "E" ? (result = {
- notation: "engineering"
- }, stem = stem.slice(2)) : stem[0] === "E" && (result = {
- notation: "scientific"
- }, stem = stem.slice(1)), result) {
- var signDisplay = stem.slice(0, 2);
- if (signDisplay === "+!" ? (result.signDisplay = "always", stem = stem.slice(2)) : signDisplay === "+?" && (result.signDisplay = "exceptZero", stem = stem.slice(2)), !CONCISE_INTEGER_WIDTH_REGEX.test(stem))
- throw new Error("Malformed concise eng/scientific notation");
- result.minimumIntegerDigits = stem.length;
- }
- return result;
- }
- function parseNotationOptions(opt) {
- var result = {}, signOpts = parseSign(opt);
- return signOpts || result;
- }
- function parseNumberSkeleton(tokens2) {
- for (var result = {}, _i = 0, tokens_1 = tokens2; _i < tokens_1.length; _i++) {
- var token2 = tokens_1[_i];
- switch (token2.stem) {
- case "percent":
- case "%":
- result.style = "percent";
- continue;
- case "%x100":
- result.style = "percent", result.scale = 100;
- continue;
- case "currency":
- result.style = "currency", result.currency = token2.options[0];
- continue;
- case "group-off":
- case ",_":
- result.useGrouping = !1;
- continue;
- case "precision-integer":
- case ".":
- result.maximumFractionDigits = 0;
- continue;
- case "measure-unit":
- case "unit":
- result.style = "unit", result.unit = icuUnitToEcma(token2.options[0]);
- continue;
- case "compact-short":
- case "K":
- result.notation = "compact", result.compactDisplay = "short";
- continue;
- case "compact-long":
- case "KK":
- result.notation = "compact", result.compactDisplay = "long";
- continue;
- case "scientific":
- result = __assign(__assign(__assign({}, result), { notation: "scientific" }), token2.options.reduce(function(all, opt2) {
- return __assign(__assign({}, all), parseNotationOptions(opt2));
- }, {}));
- continue;
- case "engineering":
- result = __assign(__assign(__assign({}, result), { notation: "engineering" }), token2.options.reduce(function(all, opt2) {
- return __assign(__assign({}, all), parseNotationOptions(opt2));
- }, {}));
- continue;
- case "notation-simple":
- result.notation = "standard";
- continue;
- // https://github.com/unicode-org/icu/blob/master/icu4c/source/i18n/unicode/unumberformatter.h
- case "unit-width-narrow":
- result.currencyDisplay = "narrowSymbol", result.unitDisplay = "narrow";
- continue;
- case "unit-width-short":
- result.currencyDisplay = "code", result.unitDisplay = "short";
- continue;
- case "unit-width-full-name":
- result.currencyDisplay = "name", result.unitDisplay = "long";
- continue;
- case "unit-width-iso-code":
- result.currencyDisplay = "symbol";
- continue;
- case "scale":
- result.scale = parseFloat(token2.options[0]);
- continue;
- case "rounding-mode-floor":
- result.roundingMode = "floor";
- continue;
- case "rounding-mode-ceiling":
- result.roundingMode = "ceil";
- continue;
- case "rounding-mode-down":
- result.roundingMode = "trunc";
- continue;
- case "rounding-mode-up":
- result.roundingMode = "expand";
- continue;
- case "rounding-mode-half-even":
- result.roundingMode = "halfEven";
- continue;
- case "rounding-mode-half-down":
- result.roundingMode = "halfTrunc";
- continue;
- case "rounding-mode-half-up":
- result.roundingMode = "halfExpand";
- continue;
- // https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#integer-width
- case "integer-width":
- if (token2.options.length > 1)
- throw new RangeError("integer-width stems only accept a single optional option");
- token2.options[0].replace(INTEGER_WIDTH_REGEX, function(_, g1, g2, g3, g4, g5) {
- if (g1)
- result.minimumIntegerDigits = g2.length;
- else {
- if (g3 && g4)
- throw new Error("We currently do not support maximum integer digits");
- if (g5)
- throw new Error("We currently do not support exact integer digits");
- }
- return "";
- });
- continue;
- }
- if (CONCISE_INTEGER_WIDTH_REGEX.test(token2.stem)) {
- result.minimumIntegerDigits = token2.stem.length;
- continue;
- }
- if (FRACTION_PRECISION_REGEX.test(token2.stem)) {
- if (token2.options.length > 1)
- throw new RangeError("Fraction-precision stems only accept a single optional option");
- token2.stem.replace(FRACTION_PRECISION_REGEX, function(_, g1, g2, g3, g4, g5) {
- return g2 === "*" ? result.minimumFractionDigits = g1.length : g3 && g3[0] === "#" ? result.maximumFractionDigits = g3.length : g4 && g5 ? (result.minimumFractionDigits = g4.length, result.maximumFractionDigits = g4.length + g5.length) : (result.minimumFractionDigits = g1.length, result.maximumFractionDigits = g1.length), "";
- });
- var opt = token2.options[0];
- opt === "w" ? result = __assign(__assign({}, result), { trailingZeroDisplay: "stripIfInteger" }) : opt && (result = __assign(__assign({}, result), parseSignificantPrecision(opt)));
- continue;
- }
- if (SIGNIFICANT_PRECISION_REGEX.test(token2.stem)) {
- result = __assign(__assign({}, result), parseSignificantPrecision(token2.stem));
- continue;
- }
- var signOpts = parseSign(token2.stem);
- signOpts && (result = __assign(__assign({}, result), signOpts));
- var conciseScientificAndEngineeringOpts = parseConciseScientificAndEngineeringStem(token2.stem);
- conciseScientificAndEngineeringOpts && (result = __assign(__assign({}, result), conciseScientificAndEngineeringOpts));
- }
- return result;
- }
-
- // ../../node_modules/@formatjs/icu-messageformat-parser/lib/time-data.generated.js
- var timeData = {
- "001": [
- "H",
- "h"
- ],
- 419: [
- "h",
- "H",
- "hB",
- "hb"
- ],
- AC: [
- "H",
- "h",
- "hb",
- "hB"
- ],
- AD: [
- "H",
- "hB"
- ],
- AE: [
- "h",
- "hB",
- "hb",
- "H"
- ],
- AF: [
- "H",
- "hb",
- "hB",
- "h"
- ],
- AG: [
- "h",
- "hb",
- "H",
- "hB"
- ],
- AI: [
- "H",
- "h",
- "hb",
- "hB"
- ],
- AL: [
- "h",
- "H",
- "hB"
- ],
- AM: [
- "H",
- "hB"
- ],
- AO: [
- "H",
- "hB"
- ],
- AR: [
- "h",
- "H",
- "hB",
- "hb"
- ],
- AS: [
- "h",
- "H"
- ],
- AT: [
- "H",
- "hB"
- ],
- AU: [
- "h",
- "hb",
- "H",
- "hB"
- ],
- AW: [
- "H",
- "hB"
- ],
- AX: [
- "H"
- ],
- AZ: [
- "H",
- "hB",
- "h"
- ],
- BA: [
- "H",
- "hB",
- "h"
- ],
- BB: [
- "h",
- "hb",
- "H",
- "hB"
- ],
- BD: [
- "h",
- "hB",
- "H"
- ],
- BE: [
- "H",
- "hB"
- ],
- BF: [
- "H",
- "hB"
- ],
- BG: [
- "H",
- "hB",
- "h"
- ],
- BH: [
- "h",
- "hB",
- "hb",
- "H"
- ],
- BI: [
- "H",
- "h"
- ],
- BJ: [
- "H",
- "hB"
- ],
- BL: [
- "H",
- "hB"
- ],
- BM: [
- "h",
- "hb",
- "H",
- "hB"
- ],
- BN: [
- "hb",
- "hB",
- "h",
- "H"
- ],
- BO: [
- "h",
- "H",
- "hB",
- "hb"
- ],
- BQ: [
- "H"
- ],
- BR: [
- "H",
- "hB"
- ],
- BS: [
- "h",
- "hb",
- "H",
- "hB"
- ],
- BT: [
- "h",
- "H"
- ],
- BW: [
- "H",
- "h",
- "hb",
- "hB"
- ],
- BY: [
- "H",
- "h"
- ],
- BZ: [
- "H",
- "h",
- "hb",
- "hB"
- ],
- CA: [
- "h",
- "hb",
- "H",
- "hB"
- ],
- CC: [
- "H",
- "h",
- "hb",
- "hB"
- ],
- CD: [
- "hB",
- "H"
- ],
- CF: [
- "H",
- "h",
- "hB"
- ],
- CG: [
- "H",
- "hB"
- ],
- CH: [
- "H",
- "hB",
- "h"
- ],
- CI: [
- "H",
- "hB"
- ],
- CK: [
- "H",
- "h",
- "hb",
- "hB"
- ],
- CL: [
- "h",
- "H",
- "hB",
- "hb"
- ],
- CM: [
- "H",
- "h",
- "hB"
- ],
- CN: [
- "H",
- "hB",
- "hb",
- "h"
- ],
- CO: [
- "h",
- "H",
- "hB",
- "hb"
- ],
- CP: [
- "H"
- ],
- CR: [
- "h",
- "H",
- "hB",
- "hb"
- ],
- CU: [
- "h",
- "H",
- "hB",
- "hb"
- ],
- CV: [
- "H",
- "hB"
- ],
- CW: [
- "H",
- "hB"
- ],
- CX: [
- "H",
- "h",
- "hb",
- "hB"
- ],
- CY: [
- "h",
- "H",
- "hb",
- "hB"
- ],
- CZ: [
- "H"
- ],
- DE: [
- "H",
- "hB"
- ],
- DG: [
- "H",
- "h",
- "hb",
- "hB"
- ],
- DJ: [
- "h",
- "H"
- ],
- DK: [
- "H"
- ],
- DM: [
- "h",
- "hb",
- "H",
- "hB"
- ],
- DO: [
- "h",
- "H",
- "hB",
- "hb"
- ],
- DZ: [
- "h",
- "hB",
- "hb",
- "H"
- ],
- EA: [
- "H",
- "h",
- "hB",
- "hb"
- ],
- EC: [
- "h",
- "H",
- "hB",
- "hb"
- ],
- EE: [
- "H",
- "hB"
- ],
- EG: [
- "h",
- "hB",
- "hb",
- "H"
- ],
- EH: [
- "h",
- "hB",
- "hb",
- "H"
- ],
- ER: [
- "h",
- "H"
- ],
- ES: [
- "H",
- "hB",
- "h",
- "hb"
- ],
- ET: [
- "hB",
- "hb",
- "h",
- "H"
- ],
- FI: [
- "H"
- ],
- FJ: [
- "h",
- "hb",
- "H",
- "hB"
- ],
- FK: [
- "H",
- "h",
- "hb",
- "hB"
- ],
- FM: [
- "h",
- "hb",
- "H",
- "hB"
- ],
- FO: [
- "H",
- "h"
- ],
- FR: [
- "H",
- "hB"
- ],
- GA: [
- "H",
- "hB"
- ],
- GB: [
- "H",
- "h",
- "hb",
- "hB"
- ],
- GD: [
- "h",
- "hb",
- "H",
- "hB"
- ],
- GE: [
- "H",
- "hB",
- "h"
- ],
- GF: [
- "H",
- "hB"
- ],
- GG: [
- "H",
- "h",
- "hb",
- "hB"
- ],
- GH: [
- "h",
- "H"
- ],
- GI: [
- "H",
- "h",
- "hb",
- "hB"
- ],
- GL: [
- "H",
- "h"
- ],
- GM: [
- "h",
- "hb",
- "H",
- "hB"
- ],
- GN: [
- "H",
- "hB"
- ],
- GP: [
- "H",
- "hB"
- ],
- GQ: [
- "H",
- "hB",
- "h",
- "hb"
- ],
- GR: [
- "h",
- "H",
- "hb",
- "hB"
- ],
- GT: [
- "h",
- "H",
- "hB",
- "hb"
- ],
- GU: [
- "h",
- "hb",
- "H",
- "hB"
- ],
- GW: [
- "H",
- "hB"
- ],
- GY: [
- "h",
- "hb",
- "H",
- "hB"
- ],
- HK: [
- "h",
- "hB",
- "hb",
- "H"
- ],
- HN: [
- "h",
- "H",
- "hB",
- "hb"
- ],
- HR: [
- "H",
- "hB"
- ],
- HU: [
- "H",
- "h"
- ],
- IC: [
- "H",
- "h",
- "hB",
- "hb"
- ],
- ID: [
- "H"
- ],
- IE: [
- "H",
- "h",
- "hb",
- "hB"
- ],
- IL: [
- "H",
- "hB"
- ],
- IM: [
- "H",
- "h",
- "hb",
- "hB"
- ],
- IN: [
- "h",
- "H"
- ],
- IO: [
- "H",
- "h",
- "hb",
- "hB"
- ],
- IQ: [
- "h",
- "hB",
- "hb",
- "H"
- ],
- IR: [
- "hB",
- "H"
- ],
- IS: [
- "H"
- ],
- IT: [
- "H",
- "hB"
- ],
- JE: [
- "H",
- "h",
- "hb",
- "hB"
- ],
- JM: [
- "h",
- "hb",
- "H",
- "hB"
- ],
- JO: [
- "h",
- "hB",
- "hb",
- "H"
- ],
- JP: [
- "H",
- "K",
- "h"
- ],
- KE: [
- "hB",
- "hb",
- "H",
- "h"
- ],
- KG: [
- "H",
- "h",
- "hB",
- "hb"
- ],
- KH: [
- "hB",
- "h",
- "H",
- "hb"
- ],
- KI: [
- "h",
- "hb",
- "H",
- "hB"
- ],
- KM: [
- "H",
- "h",
- "hB",
- "hb"
- ],
- KN: [
- "h",
- "hb",
- "H",
- "hB"
- ],
- KP: [
- "h",
- "H",
- "hB",
- "hb"
- ],
- KR: [
- "h",
- "H",
- "hB",
- "hb"
- ],
- KW: [
- "h",
- "hB",
- "hb",
- "H"
- ],
- KY: [
- "h",
- "hb",
- "H",
- "hB"
- ],
- KZ: [
- "H",
- "hB"
- ],
- LA: [
- "H",
- "hb",
- "hB",
- "h"
- ],
- LB: [
- "h",
- "hB",
- "hb",
- "H"
- ],
- LC: [
- "h",
- "hb",
- "H",
- "hB"
- ],
- LI: [
- "H",
- "hB",
- "h"
- ],
- LK: [
- "H",
- "h",
- "hB",
- "hb"
- ],
- LR: [
- "h",
- "hb",
- "H",
- "hB"
- ],
- LS: [
- "h",
- "H"
- ],
- LT: [
- "H",
- "h",
- "hb",
- "hB"
- ],
- LU: [
- "H",
- "h",
- "hB"
- ],
- LV: [
- "H",
- "hB",
- "hb",
- "h"
- ],
- LY: [
- "h",
- "hB",
- "hb",
- "H"
- ],
- MA: [
- "H",
- "h",
- "hB",
- "hb"
- ],
- MC: [
- "H",
- "hB"
- ],
- MD: [
- "H",
- "hB"
- ],
- ME: [
- "H",
- "hB",
- "h"
- ],
- MF: [
- "H",
- "hB"
- ],
- MG: [
- "H",
- "h"
- ],
- MH: [
- "h",
- "hb",
- "H",
- "hB"
- ],
- MK: [
- "H",
- "h",
- "hb",
- "hB"
- ],
- ML: [
- "H"
- ],
- MM: [
- "hB",
- "hb",
- "H",
- "h"
- ],
- MN: [
- "H",
- "h",
- "hb",
- "hB"
- ],
- MO: [
- "h",
- "hB",
- "hb",
- "H"
- ],
- MP: [
- "h",
- "hb",
- "H",
- "hB"
- ],
- MQ: [
- "H",
- "hB"
- ],
- MR: [
- "h",
- "hB",
- "hb",
- "H"
- ],
- MS: [
- "H",
- "h",
- "hb",
- "hB"
- ],
- MT: [
- "H",
- "h"
- ],
- MU: [
- "H",
- "h"
- ],
- MV: [
- "H",
- "h"
- ],
- MW: [
- "h",
- "hb",
- "H",
- "hB"
- ],
- MX: [
- "h",
- "H",
- "hB",
- "hb"
- ],
- MY: [
- "hb",
- "hB",
- "h",
- "H"
- ],
- MZ: [
- "H",
- "hB"
- ],
- NA: [
- "h",
- "H",
- "hB",
- "hb"
- ],
- NC: [
- "H",
- "hB"
- ],
- NE: [
- "H"
- ],
- NF: [
- "H",
- "h",
- "hb",
- "hB"
- ],
- NG: [
- "H",
- "h",
- "hb",
- "hB"
- ],
- NI: [
- "h",
- "H",
- "hB",
- "hb"
- ],
- NL: [
- "H",
- "hB"
- ],
- NO: [
- "H",
- "h"
- ],
- NP: [
- "H",
- "h",
- "hB"
- ],
- NR: [
- "H",
- "h",
- "hb",
- "hB"
- ],
- NU: [
- "H",
- "h",
- "hb",
- "hB"
- ],
- NZ: [
- "h",
- "hb",
- "H",
- "hB"
- ],
- OM: [
- "h",
- "hB",
- "hb",
- "H"
- ],
- PA: [
- "h",
- "H",
- "hB",
- "hb"
- ],
- PE: [
- "h",
- "H",
- "hB",
- "hb"
- ],
- PF: [
- "H",
- "h",
- "hB"
- ],
- PG: [
- "h",
- "H"
- ],
- PH: [
- "h",
- "hB",
- "hb",
- "H"
- ],
- PK: [
- "h",
- "hB",
- "H"
- ],
- PL: [
- "H",
- "h"
- ],
- PM: [
- "H",
- "hB"
- ],
- PN: [
- "H",
- "h",
- "hb",
- "hB"
- ],
- PR: [
- "h",
- "H",
- "hB",
- "hb"
- ],
- PS: [
- "h",
- "hB",
- "hb",
- "H"
- ],
- PT: [
- "H",
- "hB"
- ],
- PW: [
- "h",
- "H"
- ],
- PY: [
- "h",
- "H",
- "hB",
- "hb"
- ],
- QA: [
- "h",
- "hB",
- "hb",
- "H"
- ],
- RE: [
- "H",
- "hB"
- ],
- RO: [
- "H",
- "hB"
- ],
- RS: [
- "H",
- "hB",
- "h"
- ],
- RU: [
- "H"
- ],
- RW: [
- "H",
- "h"
- ],
- SA: [
- "h",
- "hB",
- "hb",
- "H"
- ],
- SB: [
- "h",
- "hb",
- "H",
- "hB"
- ],
- SC: [
- "H",
- "h",
- "hB"
- ],
- SD: [
- "h",
- "hB",
- "hb",
- "H"
- ],
- SE: [
- "H"
- ],
- SG: [
- "h",
- "hb",
- "H",
- "hB"
- ],
- SH: [
- "H",
- "h",
- "hb",
- "hB"
- ],
- SI: [
- "H",
- "hB"
- ],
- SJ: [
- "H"
- ],
- SK: [
- "H"
- ],
- SL: [
- "h",
- "hb",
- "H",
- "hB"
- ],
- SM: [
- "H",
- "h",
- "hB"
- ],
- SN: [
- "H",
- "h",
- "hB"
- ],
- SO: [
- "h",
- "H"
- ],
- SR: [
- "H",
- "hB"
- ],
- SS: [
- "h",
- "hb",
- "H",
- "hB"
- ],
- ST: [
- "H",
- "hB"
- ],
- SV: [
- "h",
- "H",
- "hB",
- "hb"
- ],
- SX: [
- "H",
- "h",
- "hb",
- "hB"
- ],
- SY: [
- "h",
- "hB",
- "hb",
- "H"
- ],
- SZ: [
- "h",
- "hb",
- "H",
- "hB"
- ],
- TA: [
- "H",
- "h",
- "hb",
- "hB"
- ],
- TC: [
- "h",
- "hb",
- "H",
- "hB"
- ],
- TD: [
- "h",
- "H",
- "hB"
- ],
- TF: [
- "H",
- "h",
- "hB"
- ],
- TG: [
- "H",
- "hB"
- ],
- TH: [
- "H",
- "h"
- ],
- TJ: [
- "H",
- "h"
- ],
- TL: [
- "H",
- "hB",
- "hb",
- "h"
- ],
- TM: [
- "H",
- "h"
- ],
- TN: [
- "h",
- "hB",
- "hb",
- "H"
- ],
- TO: [
- "h",
- "H"
- ],
- TR: [
- "H",
- "hB"
- ],
- TT: [
- "h",
- "hb",
- "H",
- "hB"
- ],
- TW: [
- "hB",
- "hb",
- "h",
- "H"
- ],
- TZ: [
- "hB",
- "hb",
- "H",
- "h"
- ],
- UA: [
- "H",
- "hB",
- "h"
- ],
- UG: [
- "hB",
- "hb",
- "H",
- "h"
- ],
- UM: [
- "h",
- "hb",
- "H",
- "hB"
- ],
- US: [
- "h",
- "hb",
- "H",
- "hB"
- ],
- UY: [
- "h",
- "H",
- "hB",
- "hb"
- ],
- UZ: [
- "H",
- "hB",
- "h"
- ],
- VA: [
- "H",
- "h",
- "hB"
- ],
- VC: [
- "h",
- "hb",
- "H",
- "hB"
- ],
- VE: [
- "h",
- "H",
- "hB",
- "hb"
- ],
- VG: [
- "h",
- "hb",
- "H",
- "hB"
- ],
- VI: [
- "h",
- "hb",
- "H",
- "hB"
- ],
- VN: [
- "H",
- "h"
- ],
- VU: [
- "h",
- "H"
- ],
- WF: [
- "H",
- "hB"
- ],
- WS: [
- "h",
- "H"
- ],
- XK: [
- "H",
- "hB",
- "h"
- ],
- YE: [
- "h",
- "hB",
- "hb",
- "H"
- ],
- YT: [
- "H",
- "hB"
- ],
- ZA: [
- "H",
- "h",
- "hb",
- "hB"
- ],
- ZM: [
- "h",
- "hb",
- "H",
- "hB"
- ],
- ZW: [
- "H",
- "h"
- ],
- "af-ZA": [
- "H",
- "h",
- "hB",
- "hb"
- ],
- "ar-001": [
- "h",
- "hB",
- "hb",
- "H"
- ],
- "ca-ES": [
- "H",
- "h",
- "hB"
- ],
- "en-001": [
- "h",
- "hb",
- "H",
- "hB"
- ],
- "en-HK": [
- "h",
- "hb",
- "H",
- "hB"
- ],
- "en-IL": [
- "H",
- "h",
- "hb",
- "hB"
- ],
- "en-MY": [
- "h",
- "hb",
- "H",
- "hB"
- ],
- "es-BR": [
- "H",
- "h",
- "hB",
- "hb"
- ],
- "es-ES": [
- "H",
- "h",
- "hB",
- "hb"
- ],
- "es-GQ": [
- "H",
- "h",
- "hB",
- "hb"
- ],
- "fr-CA": [
- "H",
- "h",
- "hB"
- ],
- "gl-ES": [
- "H",
- "h",
- "hB"
- ],
- "gu-IN": [
- "hB",
- "hb",
- "h",
- "H"
- ],
- "hi-IN": [
- "hB",
- "h",
- "H"
- ],
- "it-CH": [
- "H",
- "h",
- "hB"
- ],
- "it-IT": [
- "H",
- "h",
- "hB"
- ],
- "kn-IN": [
- "hB",
- "h",
- "H"
- ],
- "ml-IN": [
- "hB",
- "h",
- "H"
- ],
- "mr-IN": [
- "hB",
- "hb",
- "h",
- "H"
- ],
- "pa-IN": [
- "hB",
- "hb",
- "h",
- "H"
- ],
- "ta-IN": [
- "hB",
- "h",
- "hb",
- "H"
- ],
- "te-IN": [
- "hB",
- "h",
- "H"
- ],
- "zu-ZA": [
- "H",
- "hB",
- "hb",
- "h"
- ]
- };
-
- // ../../node_modules/@formatjs/icu-messageformat-parser/lib/date-time-pattern-generator.js
- function getBestPattern(skeleton, locale) {
- for (var skeletonCopy = "", patternPos = 0; patternPos < skeleton.length; patternPos++) {
- var patternChar = skeleton.charAt(patternPos);
- if (patternChar === "j") {
- for (var extraLength = 0; patternPos + 1 < skeleton.length && skeleton.charAt(patternPos + 1) === patternChar; )
- extraLength++, patternPos++;
- var hourLen = 1 + (extraLength & 1), dayPeriodLen = extraLength < 2 ? 1 : 3 + (extraLength >> 1), dayPeriodChar = "a", hourChar = getDefaultHourSymbolFromLocale(locale);
- for ((hourChar == "H" || hourChar == "k") && (dayPeriodLen = 0); dayPeriodLen-- > 0; )
- skeletonCopy += dayPeriodChar;
- for (; hourLen-- > 0; )
- skeletonCopy = hourChar + skeletonCopy;
- } else patternChar === "J" ? skeletonCopy += "H" : skeletonCopy += patternChar;
- }
- return skeletonCopy;
- }
- function getDefaultHourSymbolFromLocale(locale) {
- var hourCycle = locale.hourCycle;
- if (hourCycle === void 0 && // @ts-ignore hourCycle(s) is not identified yet
- locale.hourCycles && // @ts-ignore
- locale.hourCycles.length && (hourCycle = locale.hourCycles[0]), hourCycle)
- switch (hourCycle) {
- case "h24":
- return "k";
- case "h23":
- return "H";
- case "h12":
- return "h";
- case "h11":
- return "K";
- default:
- throw new Error("Invalid hourCycle");
- }
- var languageTag = locale.language, regionTag;
- languageTag !== "root" && (regionTag = locale.maximize().region);
- var hourCycles = timeData[regionTag || ""] || timeData[languageTag || ""] || timeData["".concat(languageTag, "-001")] || timeData["001"];
- return hourCycles[0];
- }
-
- // ../../node_modules/@formatjs/icu-messageformat-parser/lib/parser.js
- var _a3, SPACE_SEPARATOR_START_REGEX = new RegExp("^".concat(SPACE_SEPARATOR_REGEX.source, "*")), SPACE_SEPARATOR_END_REGEX = new RegExp("".concat(SPACE_SEPARATOR_REGEX.source, "*$"));
- function createLocation2(start2, end2) {
- return { start: start2, end: end2 };
- }
- var hasNativeStartsWith = !!String.prototype.startsWith && "_a".startsWith("a", 1), hasNativeFromCodePoint = !!String.fromCodePoint, hasNativeFromEntries = !!Object.fromEntries, hasNativeCodePointAt = !!String.prototype.codePointAt, hasTrimStart = !!String.prototype.trimStart, hasTrimEnd = !!String.prototype.trimEnd, hasNativeIsSafeInteger = !!Number.isSafeInteger, isSafeInteger = hasNativeIsSafeInteger ? Number.isSafeInteger : function(n) {
- return typeof n == "number" && isFinite(n) && Math.floor(n) === n && Math.abs(n) <= 9007199254740991;
- }, REGEX_SUPPORTS_U_AND_Y = !0;
- try {
- re = RE("([^\\p{White_Space}\\p{Pattern_Syntax}]*)", "yu"), REGEX_SUPPORTS_U_AND_Y = ((_a3 = re.exec("a")) === null || _a3 === void 0 ? void 0 : _a3[0]) === "a";
- } catch {
- REGEX_SUPPORTS_U_AND_Y = !1;
- }
- var re, startsWith = hasNativeStartsWith ? (
- // Native
- function(s3, search, position2) {
- return s3.startsWith(search, position2);
- }
- ) : (
- // For IE11
- function(s3, search, position2) {
- return s3.slice(position2, position2 + search.length) === search;
- }
- ), fromCodePoint = hasNativeFromCodePoint ? String.fromCodePoint : (
- // IE11
- function() {
- for (var codePoints = [], _i = 0; _i < arguments.length; _i++)
- codePoints[_i] = arguments[_i];
- for (var elements = "", length2 = codePoints.length, i = 0, code; length2 > i; ) {
- if (code = codePoints[i++], code > 1114111)
- throw RangeError(code + " is not a valid code point");
- elements += code < 65536 ? String.fromCharCode(code) : String.fromCharCode(((code -= 65536) >> 10) + 55296, code % 1024 + 56320);
- }
- return elements;
- }
- ), fromEntries = (
- // native
- hasNativeFromEntries ? Object.fromEntries : (
- // Ponyfill
- function(entries) {
- for (var obj = {}, _i = 0, entries_1 = entries; _i < entries_1.length; _i++) {
- var _a4 = entries_1[_i], k = _a4[0], v = _a4[1];
- obj[k] = v;
- }
- return obj;
- }
- )
- ), codePointAt = hasNativeCodePointAt ? (
- // Native
- function(s3, index4) {
- return s3.codePointAt(index4);
- }
- ) : (
- // IE 11
- function(s3, index4) {
- var size = s3.length;
- if (!(index4 < 0 || index4 >= size)) {
- var first = s3.charCodeAt(index4), second;
- return first < 55296 || first > 56319 || index4 + 1 === size || (second = s3.charCodeAt(index4 + 1)) < 56320 || second > 57343 ? first : (first - 55296 << 10) + (second - 56320) + 65536;
- }
- }
- ), trimStart = hasTrimStart ? (
- // Native
- function(s3) {
- return s3.trimStart();
- }
- ) : (
- // Ponyfill
- function(s3) {
- return s3.replace(SPACE_SEPARATOR_START_REGEX, "");
- }
- ), trimEnd = hasTrimEnd ? (
- // Native
- function(s3) {
- return s3.trimEnd();
- }
- ) : (
- // Ponyfill
- function(s3) {
- return s3.replace(SPACE_SEPARATOR_END_REGEX, "");
- }
- );
- function RE(s3, flag3) {
- return new RegExp(s3, flag3);
- }
- var matchIdentifierAtIndex;
- REGEX_SUPPORTS_U_AND_Y ? (IDENTIFIER_PREFIX_RE_1 = RE("([^\\p{White_Space}\\p{Pattern_Syntax}]*)", "yu"), matchIdentifierAtIndex = function(s3, index4) {
- var _a4;
- IDENTIFIER_PREFIX_RE_1.lastIndex = index4;
- var match3 = IDENTIFIER_PREFIX_RE_1.exec(s3);
- return (_a4 = match3[1]) !== null && _a4 !== void 0 ? _a4 : "";
- }) : matchIdentifierAtIndex = function(s3, index4) {
- for (var match3 = []; ; ) {
- var c = codePointAt(s3, index4);
- if (c === void 0 || _isWhiteSpace(c) || _isPatternSyntax(c))
- break;
- match3.push(c), index4 += c >= 65536 ? 2 : 1;
- }
- return fromCodePoint.apply(void 0, match3);
- };
- var IDENTIFIER_PREFIX_RE_1, Parser = (
- /** @class */
- (function() {
- function Parser2(message, options) {
- options === void 0 && (options = {}), this.message = message, this.position = { offset: 0, line: 1, column: 1 }, this.ignoreTag = !!options.ignoreTag, this.locale = options.locale, this.requiresOtherClause = !!options.requiresOtherClause, this.shouldParseSkeletons = !!options.shouldParseSkeletons;
- }
- return Parser2.prototype.parse = function() {
- if (this.offset() !== 0)
- throw Error("parser can only be used once");
- return this.parseMessage(0, "", !1);
- }, Parser2.prototype.parseMessage = function(nestingLevel, parentArgType, expectingCloseTag) {
- for (var elements = []; !this.isEOF(); ) {
- var char2 = this.char();
- if (char2 === 123) {
- var result = this.parseArgument(nestingLevel, expectingCloseTag);
- if (result.err)
- return result;
- elements.push(result.val);
- } else {
- if (char2 === 125 && nestingLevel > 0)
- break;
- if (char2 === 35 && (parentArgType === "plural" || parentArgType === "selectordinal")) {
- var position2 = this.clonePosition();
- this.bump(), elements.push({
- type: TYPE.pound,
- location: createLocation2(position2, this.clonePosition())
- });
- } else if (char2 === 60 && !this.ignoreTag && this.peek() === 47) {
- if (expectingCloseTag)
- break;
- return this.error(ErrorKind.UNMATCHED_CLOSING_TAG, createLocation2(this.clonePosition(), this.clonePosition()));
- } else if (char2 === 60 && !this.ignoreTag && _isAlpha(this.peek() || 0)) {
- var result = this.parseTag(nestingLevel, parentArgType);
- if (result.err)
- return result;
- elements.push(result.val);
- } else {
- var result = this.parseLiteral(nestingLevel, parentArgType);
- if (result.err)
- return result;
- elements.push(result.val);
- }
- }
- }
- return { val: elements, err: null };
- }, Parser2.prototype.parseTag = function(nestingLevel, parentArgType) {
- var startPosition = this.clonePosition();
- this.bump();
- var tagName = this.parseTagName();
- if (this.bumpSpace(), this.bumpIf("/>"))
- return {
- val: {
- type: TYPE.literal,
- value: "<".concat(tagName, "/>"),
- location: createLocation2(startPosition, this.clonePosition())
- },
- err: null
- };
- if (this.bumpIf(">")) {
- var childrenResult = this.parseMessage(nestingLevel + 1, parentArgType, !0);
- if (childrenResult.err)
- return childrenResult;
- var children = childrenResult.val, endTagStartPosition = this.clonePosition();
- if (this.bumpIf("</")) {
- if (this.isEOF() || !_isAlpha(this.char()))
- return this.error(ErrorKind.INVALID_TAG, createLocation2(endTagStartPosition, this.clonePosition()));
- var closingTagNameStartPosition = this.clonePosition(), closingTagName = this.parseTagName();
- return tagName !== closingTagName ? this.error(ErrorKind.UNMATCHED_CLOSING_TAG, createLocation2(closingTagNameStartPosition, this.clonePosition())) : (this.bumpSpace(), this.bumpIf(">") ? {
- val: {
- type: TYPE.tag,
- value: tagName,
- children,
- location: createLocation2(startPosition, this.clonePosition())
- },
- err: null
- } : this.error(ErrorKind.INVALID_TAG, createLocation2(endTagStartPosition, this.clonePosition())));
- } else
- return this.error(ErrorKind.UNCLOSED_TAG, createLocation2(startPosition, this.clonePosition()));
- } else
- return this.error(ErrorKind.INVALID_TAG, createLocation2(startPosition, this.clonePosition()));
- }, Parser2.prototype.parseTagName = function() {
- var startOffset = this.offset();
- for (this.bump(); !this.isEOF() && _isPotentialElementNameChar(this.char()); )
- this.bump();
- return this.message.slice(startOffset, this.offset());
- }, Parser2.prototype.parseLiteral = function(nestingLevel, parentArgType) {
- for (var start2 = this.clonePosition(), value = ""; ; ) {
- var parseQuoteResult = this.tryParseQuote(parentArgType);
- if (parseQuoteResult) {
- value += parseQuoteResult;
- continue;
- }
- var parseUnquotedResult = this.tryParseUnquoted(nestingLevel, parentArgType);
- if (parseUnquotedResult) {
- value += parseUnquotedResult;
- continue;
- }
- var parseLeftAngleResult = this.tryParseLeftAngleBracket();
- if (parseLeftAngleResult) {
- value += parseLeftAngleResult;
- continue;
- }
- break;
- }
- var location4 = createLocation2(start2, this.clonePosition());
- return {
- val: { type: TYPE.literal, value, location: location4 },
- err: null
- };
- }, Parser2.prototype.tryParseLeftAngleBracket = function() {
- return !this.isEOF() && this.char() === 60 && (this.ignoreTag || // If at the opening tag or closing tag position, bail.
- !_isAlphaOrSlash(this.peek() || 0)) ? (this.bump(), "<") : null;
- }, Parser2.prototype.tryParseQuote = function(parentArgType) {
- if (this.isEOF() || this.char() !== 39)
- return null;
- switch (this.peek()) {
- case 39:
- return this.bump(), this.bump(), "'";
- // '{', '<', '>', '}'
- case 123:
- case 60:
- case 62:
- case 125:
- break;
- case 35:
- if (parentArgType === "plural" || parentArgType === "selectordinal")
- break;
- return null;
- default:
- return null;
- }
- this.bump();
- var codePoints = [this.char()];
- for (this.bump(); !this.isEOF(); ) {
- var ch = this.char();
- if (ch === 39)
- if (this.peek() === 39)
- codePoints.push(39), this.bump();
- else {
- this.bump();
- break;
- }
- else
- codePoints.push(ch);
- this.bump();
- }
- return fromCodePoint.apply(void 0, codePoints);
- }, Parser2.prototype.tryParseUnquoted = function(nestingLevel, parentArgType) {
- if (this.isEOF())
- return null;
- var ch = this.char();
- return ch === 60 || ch === 123 || ch === 35 && (parentArgType === "plural" || parentArgType === "selectordinal") || ch === 125 && nestingLevel > 0 ? null : (this.bump(), fromCodePoint(ch));
- }, Parser2.prototype.parseArgument = function(nestingLevel, expectingCloseTag) {
- var openingBracePosition = this.clonePosition();
- if (this.bump(), this.bumpSpace(), this.isEOF())
- return this.error(ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation2(openingBracePosition, this.clonePosition()));
- if (this.char() === 125)
- return this.bump(), this.error(ErrorKind.EMPTY_ARGUMENT, createLocation2(openingBracePosition, this.clonePosition()));
- var value = this.parseIdentifierIfPossible().value;
- if (!value)
- return this.error(ErrorKind.MALFORMED_ARGUMENT, createLocation2(openingBracePosition, this.clonePosition()));
- if (this.bumpSpace(), this.isEOF())
- return this.error(ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation2(openingBracePosition, this.clonePosition()));
- switch (this.char()) {
- // Simple argument: `{name}`
- case 125:
- return this.bump(), {
- val: {
- type: TYPE.argument,
- // value does not include the opening and closing braces.
- value,
- location: createLocation2(openingBracePosition, this.clonePosition())
- },
- err: null
- };
- // Argument with options: `{name, format, ...}`
- case 44:
- return this.bump(), this.bumpSpace(), this.isEOF() ? this.error(ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation2(openingBracePosition, this.clonePosition())) : this.parseArgumentOptions(nestingLevel, expectingCloseTag, value, openingBracePosition);
- default:
- return this.error(ErrorKind.MALFORMED_ARGUMENT, createLocation2(openingBracePosition, this.clonePosition()));
- }
- }, Parser2.prototype.parseIdentifierIfPossible = function() {
- var startingPosition = this.clonePosition(), startOffset = this.offset(), value = matchIdentifierAtIndex(this.message, startOffset), endOffset = startOffset + value.length;
- this.bumpTo(endOffset);
- var endPosition = this.clonePosition(), location4 = createLocation2(startingPosition, endPosition);
- return { value, location: location4 };
- }, Parser2.prototype.parseArgumentOptions = function(nestingLevel, expectingCloseTag, value, openingBracePosition) {
- var _a4, typeStartPosition = this.clonePosition(), argType = this.parseIdentifierIfPossible().value, typeEndPosition = this.clonePosition();
- switch (argType) {
- case "":
- return this.error(ErrorKind.EXPECT_ARGUMENT_TYPE, createLocation2(typeStartPosition, typeEndPosition));
- case "number":
- case "date":
- case "time": {
- this.bumpSpace();
- var styleAndLocation = null;
- if (this.bumpIf(",")) {
- this.bumpSpace();
- var styleStartPosition = this.clonePosition(), result = this.parseSimpleArgStyleIfPossible();
- if (result.err)
- return result;
- var style = trimEnd(result.val);
- if (style.length === 0)
- return this.error(ErrorKind.EXPECT_ARGUMENT_STYLE, createLocation2(this.clonePosition(), this.clonePosition()));
- var styleLocation = createLocation2(styleStartPosition, this.clonePosition());
- styleAndLocation = { style, styleLocation };
- }
- var argCloseResult = this.tryParseArgumentClose(openingBracePosition);
- if (argCloseResult.err)
- return argCloseResult;
- var location_1 = createLocation2(openingBracePosition, this.clonePosition());
- if (styleAndLocation && startsWith(styleAndLocation?.style, "::", 0)) {
- var skeleton = trimStart(styleAndLocation.style.slice(2));
- if (argType === "number") {
- var result = this.parseNumberSkeletonFromString(skeleton, styleAndLocation.styleLocation);
- return result.err ? result : {
- val: { type: TYPE.number, value, location: location_1, style: result.val },
- err: null
- };
- } else {
- if (skeleton.length === 0)
- return this.error(ErrorKind.EXPECT_DATE_TIME_SKELETON, location_1);
- var dateTimePattern = skeleton;
- this.locale && (dateTimePattern = getBestPattern(skeleton, this.locale));
- var style = {
- type: SKELETON_TYPE.dateTime,
- pattern: dateTimePattern,
- location: styleAndLocation.styleLocation,
- parsedOptions: this.shouldParseSkeletons ? parseDateTimeSkeleton(dateTimePattern) : {}
- }, type5 = argType === "date" ? TYPE.date : TYPE.time;
- return {
- val: { type: type5, value, location: location_1, style },
- err: null
- };
- }
- }
- return {
- val: {
- type: argType === "number" ? TYPE.number : argType === "date" ? TYPE.date : TYPE.time,
- value,
- location: location_1,
- style: (_a4 = styleAndLocation?.style) !== null && _a4 !== void 0 ? _a4 : null
- },
- err: null
- };
- }
- case "plural":
- case "selectordinal":
- case "select": {
- var typeEndPosition_1 = this.clonePosition();
- if (this.bumpSpace(), !this.bumpIf(","))
- return this.error(ErrorKind.EXPECT_SELECT_ARGUMENT_OPTIONS, createLocation2(typeEndPosition_1, __assign({}, typeEndPosition_1)));
- this.bumpSpace();
- var identifierAndLocation = this.parseIdentifierIfPossible(), pluralOffset = 0;
- if (argType !== "select" && identifierAndLocation.value === "offset") {
- if (!this.bumpIf(":"))
- return this.error(ErrorKind.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, createLocation2(this.clonePosition(), this.clonePosition()));
- this.bumpSpace();
- var result = this.tryParseDecimalInteger(ErrorKind.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, ErrorKind.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);
- if (result.err)
- return result;
- this.bumpSpace(), identifierAndLocation = this.parseIdentifierIfPossible(), pluralOffset = result.val;
- }
- var optionsResult = this.tryParsePluralOrSelectOptions(nestingLevel, argType, expectingCloseTag, identifierAndLocation);
- if (optionsResult.err)
- return optionsResult;
- var argCloseResult = this.tryParseArgumentClose(openingBracePosition);
- if (argCloseResult.err)
- return argCloseResult;
- var location_2 = createLocation2(openingBracePosition, this.clonePosition());
- return argType === "select" ? {
- val: {
- type: TYPE.select,
- value,
- options: fromEntries(optionsResult.val),
- location: location_2
- },
- err: null
- } : {
- val: {
- type: TYPE.plural,
- value,
- options: fromEntries(optionsResult.val),
- offset: pluralOffset,
- pluralType: argType === "plural" ? "cardinal" : "ordinal",
- location: location_2
- },
- err: null
- };
- }
- default:
- return this.error(ErrorKind.INVALID_ARGUMENT_TYPE, createLocation2(typeStartPosition, typeEndPosition));
- }
- }, Parser2.prototype.tryParseArgumentClose = function(openingBracePosition) {
- return this.isEOF() || this.char() !== 125 ? this.error(ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation2(openingBracePosition, this.clonePosition())) : (this.bump(), { val: !0, err: null });
- }, Parser2.prototype.parseSimpleArgStyleIfPossible = function() {
- for (var nestedBraces = 0, startPosition = this.clonePosition(); !this.isEOF(); ) {
- var ch = this.char();
- switch (ch) {
- case 39: {
- this.bump();
- var apostrophePosition = this.clonePosition();
- if (!this.bumpUntil("'"))
- return this.error(ErrorKind.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE, createLocation2(apostrophePosition, this.clonePosition()));
- this.bump();
- break;
- }
- case 123: {
- nestedBraces += 1, this.bump();
- break;
- }
- case 125: {
- if (nestedBraces > 0)
- nestedBraces -= 1;
- else
- return {
- val: this.message.slice(startPosition.offset, this.offset()),
- err: null
- };
- break;
- }
- default:
- this.bump();
- break;
- }
- }
- return {
- val: this.message.slice(startPosition.offset, this.offset()),
- err: null
- };
- }, Parser2.prototype.parseNumberSkeletonFromString = function(skeleton, location4) {
- var tokens2 = [];
- try {
- tokens2 = parseNumberSkeletonFromString(skeleton);
- } catch {
- return this.error(ErrorKind.INVALID_NUMBER_SKELETON, location4);
- }
- return {
- val: {
- type: SKELETON_TYPE.number,
- tokens: tokens2,
- location: location4,
- parsedOptions: this.shouldParseSkeletons ? parseNumberSkeleton(tokens2) : {}
- },
- err: null
- };
- }, Parser2.prototype.tryParsePluralOrSelectOptions = function(nestingLevel, parentArgType, expectCloseTag, parsedFirstIdentifier) {
- for (var _a4, hasOtherClause = !1, options = [], parsedSelectors = /* @__PURE__ */ new Set(), selector = parsedFirstIdentifier.value, selectorLocation = parsedFirstIdentifier.location; ; ) {
- if (selector.length === 0) {
- var startPosition = this.clonePosition();
- if (parentArgType !== "select" && this.bumpIf("=")) {
- var result = this.tryParseDecimalInteger(ErrorKind.EXPECT_PLURAL_ARGUMENT_SELECTOR, ErrorKind.INVALID_PLURAL_ARGUMENT_SELECTOR);
- if (result.err)
- return result;
- selectorLocation = createLocation2(startPosition, this.clonePosition()), selector = this.message.slice(startPosition.offset, this.offset());
- } else
- break;
- }
- if (parsedSelectors.has(selector))
- return this.error(parentArgType === "select" ? ErrorKind.DUPLICATE_SELECT_ARGUMENT_SELECTOR : ErrorKind.DUPLICATE_PLURAL_ARGUMENT_SELECTOR, selectorLocation);
- selector === "other" && (hasOtherClause = !0), this.bumpSpace();
- var openingBracePosition = this.clonePosition();
- if (!this.bumpIf("{"))
- return this.error(parentArgType === "select" ? ErrorKind.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT : ErrorKind.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT, createLocation2(this.clonePosition(), this.clonePosition()));
- var fragmentResult = this.parseMessage(nestingLevel + 1, parentArgType, expectCloseTag);
- if (fragmentResult.err)
- return fragmentResult;
- var argCloseResult = this.tryParseArgumentClose(openingBracePosition);
- if (argCloseResult.err)
- return argCloseResult;
- options.push([
- selector,
- {
- value: fragmentResult.val,
- location: createLocation2(openingBracePosition, this.clonePosition())
- }
- ]), parsedSelectors.add(selector), this.bumpSpace(), _a4 = this.parseIdentifierIfPossible(), selector = _a4.value, selectorLocation = _a4.location;
- }
- return options.length === 0 ? this.error(parentArgType === "select" ? ErrorKind.EXPECT_SELECT_ARGUMENT_SELECTOR : ErrorKind.EXPECT_PLURAL_ARGUMENT_SELECTOR, createLocation2(this.clonePosition(), this.clonePosition())) : this.requiresOtherClause && !hasOtherClause ? this.error(ErrorKind.MISSING_OTHER_CLAUSE, createLocation2(this.clonePosition(), this.clonePosition())) : { val: options, err: null };
- }, Parser2.prototype.tryParseDecimalInteger = function(expectNumberError, invalidNumberError) {
- var sign = 1, startingPosition = this.clonePosition();
- this.bumpIf("+") || this.bumpIf("-") && (sign = -1);
- for (var hasDigits = !1, decimal = 0; !this.isEOF(); ) {
- var ch = this.char();
- if (ch >= 48 && ch <= 57)
- hasDigits = !0, decimal = decimal * 10 + (ch - 48), this.bump();
- else
- break;
- }
- var location4 = createLocation2(startingPosition, this.clonePosition());
- return hasDigits ? (decimal *= sign, isSafeInteger(decimal) ? { val: decimal, err: null } : this.error(invalidNumberError, location4)) : this.error(expectNumberError, location4);
- }, Parser2.prototype.offset = function() {
- return this.position.offset;
- }, Parser2.prototype.isEOF = function() {
- return this.offset() === this.message.length;
- }, Parser2.prototype.clonePosition = function() {
- return {
- offset: this.position.offset,
- line: this.position.line,
- column: this.position.column
- };
- }, Parser2.prototype.char = function() {
- var offset3 = this.position.offset;
- if (offset3 >= this.message.length)
- throw Error("out of bound");
- var code = codePointAt(this.message, offset3);
- if (code === void 0)
- throw Error("Offset ".concat(offset3, " is at invalid UTF-16 code unit boundary"));
- return code;
- }, Parser2.prototype.error = function(kind, location4) {
- return {
- val: null,
- err: {
- kind,
- message: this.message,
- location: location4
- }
- };
- }, Parser2.prototype.bump = function() {
- if (!this.isEOF()) {
- var code = this.char();
- code === 10 ? (this.position.line += 1, this.position.column = 1, this.position.offset += 1) : (this.position.column += 1, this.position.offset += code < 65536 ? 1 : 2);
- }
- }, Parser2.prototype.bumpIf = function(prefix4) {
- if (startsWith(this.message, prefix4, this.offset())) {
- for (var i = 0; i < prefix4.length; i++)
- this.bump();
- return !0;
- }
- return !1;
- }, Parser2.prototype.bumpUntil = function(pattern) {
- var currentOffset = this.offset(), index4 = this.message.indexOf(pattern, currentOffset);
- return index4 >= 0 ? (this.bumpTo(index4), !0) : (this.bumpTo(this.message.length), !1);
- }, Parser2.prototype.bumpTo = function(targetOffset) {
- if (this.offset() > targetOffset)
- throw Error("targetOffset ".concat(targetOffset, " must be greater than or equal to the current offset ").concat(this.offset()));
- for (targetOffset = Math.min(targetOffset, this.message.length); ; ) {
- var offset3 = this.offset();
- if (offset3 === targetOffset)
- break;
- if (offset3 > targetOffset)
- throw Error("targetOffset ".concat(targetOffset, " is at invalid UTF-16 code unit boundary"));
- if (this.bump(), this.isEOF())
- break;
- }
- }, Parser2.prototype.bumpSpace = function() {
- for (; !this.isEOF() && _isWhiteSpace(this.char()); )
- this.bump();
- }, Parser2.prototype.peek = function() {
- if (this.isEOF())
- return null;
- var code = this.char(), offset3 = this.offset(), nextCode = this.message.charCodeAt(offset3 + (code >= 65536 ? 2 : 1));
- return nextCode ?? null;
- }, Parser2;
- })()
- );
- function _isAlpha(codepoint) {
- return codepoint >= 97 && codepoint <= 122 || codepoint >= 65 && codepoint <= 90;
- }
- function _isAlphaOrSlash(codepoint) {
- return _isAlpha(codepoint) || codepoint === 47;
- }
- function _isPotentialElementNameChar(c) {
- return c === 45 || c === 46 || c >= 48 && c <= 57 || c === 95 || c >= 97 && c <= 122 || c >= 65 && c <= 90 || c == 183 || c >= 192 && c <= 214 || c >= 216 && c <= 246 || c >= 248 && c <= 893 || c >= 895 && c <= 8191 || c >= 8204 && c <= 8205 || c >= 8255 && c <= 8256 || c >= 8304 && c <= 8591 || c >= 11264 && c <= 12271 || c >= 12289 && c <= 55295 || c >= 63744 && c <= 64975 || c >= 65008 && c <= 65533 || c >= 65536 && c <= 983039;
- }
- function _isWhiteSpace(c) {
- return c >= 9 && c <= 13 || c === 32 || c === 133 || c >= 8206 && c <= 8207 || c === 8232 || c === 8233;
- }
- function _isPatternSyntax(c) {
- return c >= 33 && c <= 35 || c === 36 || c >= 37 && c <= 39 || c === 40 || c === 41 || c === 42 || c === 43 || c === 44 || c === 45 || c >= 46 && c <= 47 || c >= 58 && c <= 59 || c >= 60 && c <= 62 || c >= 63 && c <= 64 || c === 91 || c === 92 || c === 93 || c === 94 || c === 96 || c === 123 || c === 124 || c === 125 || c === 126 || c === 161 || c >= 162 && c <= 165 || c === 166 || c === 167 || c === 169 || c === 171 || c === 172 || c === 174 || c === 176 || c === 177 || c === 182 || c === 187 || c === 191 || c === 215 || c === 247 || c >= 8208 && c <= 8213 || c >= 8214 && c <= 8215 || c === 8216 || c === 8217 || c === 8218 || c >= 8219 && c <= 8220 || c === 8221 || c === 8222 || c === 8223 || c >= 8224 && c <= 8231 || c >= 8240 && c <= 8248 || c === 8249 || c === 8250 || c >= 8251 && c <= 8254 || c >= 8257 && c <= 8259 || c === 8260 || c === 8261 || c === 8262 || c >= 8263 && c <= 8273 || c === 8274 || c === 8275 || c >= 8277 && c <= 8286 || c >= 8592 && c <= 8596 || c >= 8597 && c <= 8601 || c >= 8602 && c <= 8603 || c >= 8604 && c <= 8607 || c === 8608 || c >= 8609 && c <= 8610 || c === 8611 || c >= 8612 && c <= 8613 || c === 8614 || c >= 8615 && c <= 8621 || c === 8622 || c >= 8623 && c <= 8653 || c >= 8654 && c <= 8655 || c >= 8656 && c <= 8657 || c === 8658 || c === 8659 || c === 8660 || c >= 8661 && c <= 8691 || c >= 8692 && c <= 8959 || c >= 8960 && c <= 8967 || c === 8968 || c === 8969 || c === 8970 || c === 8971 || c >= 8972 && c <= 8991 || c >= 8992 && c <= 8993 || c >= 8994 && c <= 9e3 || c === 9001 || c === 9002 || c >= 9003 && c <= 9083 || c === 9084 || c >= 9085 && c <= 9114 || c >= 9115 && c <= 9139 || c >= 9140 && c <= 9179 || c >= 9180 && c <= 9185 || c >= 9186 && c <= 9254 || c >= 9255 && c <= 9279 || c >= 9280 && c <= 9290 || c >= 9291 && c <= 9311 || c >= 9472 && c <= 9654 || c === 9655 || c >= 9656 && c <= 9664 || c === 9665 || c >= 9666 && c <= 9719 || c >= 9720 && c <= 9727 || c >= 9728 && c <= 9838 || c === 9839 || c >= 9840 && c <= 10087 || c === 10088 || c === 10089 || c === 10090 || c === 10091 || c === 10092 || c === 10093 || c === 10094 || c === 10095 || c === 10096 || c === 10097 || c === 10098 || c === 10099 || c === 10100 || c === 10101 || c >= 10132 && c <= 10175 || c >= 10176 && c <= 10180 || c === 10181 || c === 10182 || c >= 10183 && c <= 10213 || c === 10214 || c === 10215 || c === 10216 || c === 10217 || c === 10218 || c === 10219 || c === 10220 || c === 10221 || c === 10222 || c === 10223 || c >= 10224 && c <= 10239 || c >= 10240 && c <= 10495 || c >= 10496 && c <= 10626 || c === 10627 || c === 10628 || c === 10629 || c === 10630 || c === 10631 || c === 10632 || c === 10633 || c === 10634 || c === 10635 || c === 10636 || c === 10637 || c === 10638 || c === 10639 || c === 10640 || c === 10641 || c === 10642 || c === 10643 || c === 10644 || c === 10645 || c === 10646 || c === 10647 || c === 10648 || c >= 10649 && c <= 10711 || c === 10712 || c === 10713 || c === 10714 || c === 10715 || c >= 10716 && c <= 10747 || c === 10748 || c === 10749 || c >= 10750 && c <= 11007 || c >= 11008 && c <= 11055 || c >= 11056 && c <= 11076 || c >= 11077 && c <= 11078 || c >= 11079 && c <= 11084 || c >= 11085 && c <= 11123 || c >= 11124 && c <= 11125 || c >= 11126 && c <= 11157 || c === 11158 || c >= 11159 && c <= 11263 || c >= 11776 && c <= 11777 || c === 11778 || c === 11779 || c === 11780 || c === 11781 || c >= 11782 && c <= 11784 || c === 11785 || c === 11786 || c === 11787 || c === 11788 || c === 11789 || c >= 11790 && c <= 11798 || c === 11799 || c >= 11800 && c <= 11801 || c === 11802 || c === 11803 || c === 11804 || c === 11805 || c >= 11806 && c <= 11807 || c === 11808 || c === 11809 || c === 11810 || c === 11811 || c === 11812 || c === 11813 || c === 11814 || c === 11815 || c === 11816 || c === 11817 || c >= 11818 && c <= 11822 || c === 11823 || c >= 11824 && c <= 11833 || c >= 11834 && c <= 11835 || c >= 11836 && c <= 11839 || c === 11840 || c === 11841 || c === 11842 || c >= 11843 && c <= 11855 || c >= 11856 && c <= 11857 || c === 11858 || c >= 11859 && c <= 11903 || c >= 12289 && c <= 12291 || c === 12296 || c === 12297 || c === 12298 || c === 12299 || c === 12300 || c === 12301 || c === 12302 || c === 12303 || c === 12304 || c === 12305 || c >= 12306 && c <= 12307 || c === 12308 || c === 12309 || c === 12310 || c === 12311 || c === 12312 || c === 12313 || c === 12314 || c === 12315 || c === 12316 || c === 12317 || c >= 12318 && c <= 12319 || c === 12320 || c === 12336 || c === 64830 || c === 64831 || c >= 65093 && c <= 65094;
- }
-
- // ../../node_modules/@formatjs/icu-messageformat-parser/lib/index.js
- function pruneLocation(els) {
- els.forEach(function(el) {
- if (delete el.location, isSelectElement(el) || isPluralElement(el))
- for (var k in el.options)
- delete el.options[k].location, pruneLocation(el.options[k].value);
- else isNumberElement(el) && isNumberSkeleton(el.style) || (isDateElement(el) || isTimeElement(el)) && isDateTimeSkeleton(el.style) ? delete el.style.location : isTagElement(el) && pruneLocation(el.children);
- });
- }
- function parse8(message, opts) {
- opts === void 0 && (opts = {}), opts = __assign({ shouldParseSkeletons: !0, requiresOtherClause: !0 }, opts);
- var result = new Parser(message, opts).parse();
- if (result.err) {
- var error = SyntaxError(ErrorKind[result.err.kind]);
- throw error.location = result.err.location, error.originalMessage = result.err.message, error;
- }
- return opts?.captureLocation || pruneLocation(result.val), result.val;
- }
-
- // ../../node_modules/intl-messageformat/lib/src/error.js
- var ErrorCode;
- (function(ErrorCode2) {
- ErrorCode2.MISSING_VALUE = "MISSING_VALUE", ErrorCode2.INVALID_VALUE = "INVALID_VALUE", ErrorCode2.MISSING_INTL_API = "MISSING_INTL_API";
- })(ErrorCode || (ErrorCode = {}));
- var FormatError = (
- /** @class */
- (function(_super) {
- __extends(FormatError2, _super);
- function FormatError2(msg, code, originalMessage) {
- var _this = _super.call(this, msg) || this;
- return _this.code = code, _this.originalMessage = originalMessage, _this;
- }
- return FormatError2.prototype.toString = function() {
- return "[formatjs Error: ".concat(this.code, "] ").concat(this.message);
- }, FormatError2;
- })(Error)
- );
- var InvalidValueError = (
- /** @class */
- (function(_super) {
- __extends(InvalidValueError2, _super);
- function InvalidValueError2(variableId, value, options, originalMessage) {
- return _super.call(this, 'Invalid values for "'.concat(variableId, '": "').concat(value, '". Options are "').concat(Object.keys(options).join('", "'), '"'), ErrorCode.INVALID_VALUE, originalMessage) || this;
- }
- return InvalidValueError2;
- })(FormatError)
- );
- var InvalidValueTypeError = (
- /** @class */
- (function(_super) {
- __extends(InvalidValueTypeError2, _super);
- function InvalidValueTypeError2(value, type5, originalMessage) {
- return _super.call(this, 'Value for "'.concat(value, '" must be of type ').concat(type5), ErrorCode.INVALID_VALUE, originalMessage) || this;
- }
- return InvalidValueTypeError2;
- })(FormatError)
- );
- var MissingValueError = (
- /** @class */
- (function(_super) {
- __extends(MissingValueError2, _super);
- function MissingValueError2(variableId, originalMessage) {
- return _super.call(this, 'The intl string context variable "'.concat(variableId, '" was not provided to the string "').concat(originalMessage, '"'), ErrorCode.MISSING_VALUE, originalMessage) || this;
- }
- return MissingValueError2;
- })(FormatError)
- );
-
- // ../../node_modules/intl-messageformat/lib/src/formatters.js
- var PART_TYPE;
- (function(PART_TYPE2) {
- PART_TYPE2[PART_TYPE2.literal = 0] = "literal", PART_TYPE2[PART_TYPE2.object = 1] = "object";
- })(PART_TYPE || (PART_TYPE = {}));
- function mergeLiteral(parts) {
- return parts.length < 2 ? parts : parts.reduce(function(all, part) {
- var lastPart = all[all.length - 1];
- return !lastPart || lastPart.type !== PART_TYPE.literal || part.type !== PART_TYPE.literal ? all.push(part) : lastPart.value += part.value, all;
- }, []);
- }
- function isFormatXMLElementFn(el) {
- return typeof el == "function";
- }
- function formatToParts(els, locales, formatters, formats, values, currentPluralValue, originalMessage) {
- if (els.length === 1 && isLiteralElement(els[0]))
- return [
- {
- type: PART_TYPE.literal,
- value: els[0].value
- }
- ];
- for (var result = [], _i = 0, els_1 = els; _i < els_1.length; _i++) {
- var el = els_1[_i];
- if (isLiteralElement(el)) {
- result.push({
- type: PART_TYPE.literal,
- value: el.value
- });
- continue;
- }
- if (isPoundElement(el)) {
- typeof currentPluralValue == "number" && result.push({
- type: PART_TYPE.literal,
- value: formatters.getNumberFormat(locales).format(currentPluralValue)
- });
- continue;
- }
- var varName = el.value;
- if (!(values && varName in values))
- throw new MissingValueError(varName, originalMessage);
- var value = values[varName];
- if (isArgumentElement(el)) {
- (!value || typeof value == "string" || typeof value == "number") && (value = typeof value == "string" || typeof value == "number" ? String(value) : ""), result.push({
- type: typeof value == "string" ? PART_TYPE.literal : PART_TYPE.object,
- value
- });
- continue;
- }
- if (isDateElement(el)) {
- var style = typeof el.style == "string" ? formats.date[el.style] : isDateTimeSkeleton(el.style) ? el.style.parsedOptions : void 0;
- result.push({
- type: PART_TYPE.literal,
- value: formatters.getDateTimeFormat(locales, style).format(value)
- });
- continue;
- }
- if (isTimeElement(el)) {
- var style = typeof el.style == "string" ? formats.time[el.style] : isDateTimeSkeleton(el.style) ? el.style.parsedOptions : formats.time.medium;
- result.push({
- type: PART_TYPE.literal,
- value: formatters.getDateTimeFormat(locales, style).format(value)
- });
- continue;
- }
- if (isNumberElement(el)) {
- var style = typeof el.style == "string" ? formats.number[el.style] : isNumberSkeleton(el.style) ? el.style.parsedOptions : void 0;
- style && style.scale && (value = value * (style.scale || 1)), result.push({
- type: PART_TYPE.literal,
- value: formatters.getNumberFormat(locales, style).format(value)
- });
- continue;
- }
- if (isTagElement(el)) {
- var children = el.children, value_1 = el.value, formatFn = values[value_1];
- if (!isFormatXMLElementFn(formatFn))
- throw new InvalidValueTypeError(value_1, "function", originalMessage);
- var parts = formatToParts(children, locales, formatters, formats, values, currentPluralValue), chunks = formatFn(parts.map(function(p3) {
- return p3.value;
- }));
- Array.isArray(chunks) || (chunks = [chunks]), result.push.apply(result, chunks.map(function(c) {
- return {
- type: typeof c == "string" ? PART_TYPE.literal : PART_TYPE.object,
- value: c
- };
- }));
- }
- if (isSelectElement(el)) {
- var opt = el.options[value] || el.options.other;
- if (!opt)
- throw new InvalidValueError(el.value, value, Object.keys(el.options), originalMessage);
- result.push.apply(result, formatToParts(opt.value, locales, formatters, formats, values));
- continue;
- }
- if (isPluralElement(el)) {
- var opt = el.options["=".concat(value)];
- if (!opt) {
- if (!Intl.PluralRules)
- throw new FormatError(`Intl.PluralRules is not available in this environment.
- Try polyfilling it using "@formatjs/intl-pluralrules"
- `, ErrorCode.MISSING_INTL_API, originalMessage);
- var rule = formatters.getPluralRules(locales, { type: el.pluralType }).select(value - (el.offset || 0));
- opt = el.options[rule] || el.options.other;
- }
- if (!opt)
- throw new InvalidValueError(el.value, value, Object.keys(el.options), originalMessage);
- result.push.apply(result, formatToParts(opt.value, locales, formatters, formats, values, value - (el.offset || 0)));
- continue;
- }
- }
- return mergeLiteral(result);
- }
-
- // ../../node_modules/intl-messageformat/lib/src/core.js
- function mergeConfig(c1, c2) {
- return c2 ? __assign(__assign(__assign({}, c1 || {}), c2 || {}), Object.keys(c1).reduce(function(all, k) {
- return all[k] = __assign(__assign({}, c1[k]), c2[k] || {}), all;
- }, {})) : c1;
- }
- function mergeConfigs(defaultConfig2, configs) {
- return configs ? Object.keys(defaultConfig2).reduce(function(all, k) {
- return all[k] = mergeConfig(defaultConfig2[k], configs[k]), all;
- }, __assign({}, defaultConfig2)) : defaultConfig2;
- }
- function createFastMemoizeCache(store2) {
- return {
- create: function() {
- return {
- get: function(key) {
- return store2[key];
- },
- set: function(key, value) {
- store2[key] = value;
- }
- };
- }
- };
- }
- function createDefaultFormatters(cache) {
- return cache === void 0 && (cache = {
- number: {},
- dateTime: {},
- pluralRules: {}
- }), {
- getNumberFormat: memoize12(function() {
- for (var _a4, args = [], _i = 0; _i < arguments.length; _i++)
- args[_i] = arguments[_i];
- return new ((_a4 = Intl.NumberFormat).bind.apply(_a4, __spreadArray([void 0], args, !1)))();
- }, {
- cache: createFastMemoizeCache(cache.number),
- strategy: strategies.variadic
- }),
- getDateTimeFormat: memoize12(function() {
- for (var _a4, args = [], _i = 0; _i < arguments.length; _i++)
- args[_i] = arguments[_i];
- return new ((_a4 = Intl.DateTimeFormat).bind.apply(_a4, __spreadArray([void 0], args, !1)))();
- }, {
- cache: createFastMemoizeCache(cache.dateTime),
- strategy: strategies.variadic
- }),
- getPluralRules: memoize12(function() {
- for (var _a4, args = [], _i = 0; _i < arguments.length; _i++)
- args[_i] = arguments[_i];
- return new ((_a4 = Intl.PluralRules).bind.apply(_a4, __spreadArray([void 0], args, !1)))();
- }, {
- cache: createFastMemoizeCache(cache.pluralRules),
- strategy: strategies.variadic
- })
- };
- }
- var IntlMessageFormat = (
- /** @class */
- (function() {
- function IntlMessageFormat2(message, locales, overrideFormats, opts) {
- locales === void 0 && (locales = IntlMessageFormat2.defaultLocale);
- var _this = this;
- if (this.formatterCache = {
- number: {},
- dateTime: {},
- pluralRules: {}
- }, this.format = function(values) {
- var parts = _this.formatToParts(values);
- if (parts.length === 1)
- return parts[0].value;
- var result = parts.reduce(function(all, part) {
- return !all.length || part.type !== PART_TYPE.literal || typeof all[all.length - 1] != "string" ? all.push(part.value) : all[all.length - 1] += part.value, all;
- }, []);
- return result.length <= 1 ? result[0] || "" : result;
- }, this.formatToParts = function(values) {
- return formatToParts(_this.ast, _this.locales, _this.formatters, _this.formats, values, void 0, _this.message);
- }, this.resolvedOptions = function() {
- var _a5;
- return {
- locale: ((_a5 = _this.resolvedLocale) === null || _a5 === void 0 ? void 0 : _a5.toString()) || Intl.NumberFormat.supportedLocalesOf(_this.locales)[0]
- };
- }, this.getAst = function() {
- return _this.ast;
- }, this.locales = locales, this.resolvedLocale = IntlMessageFormat2.resolveLocale(locales), typeof message == "string") {
- if (this.message = message, !IntlMessageFormat2.__parse)
- throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");
- var _a4 = opts || {}, formatters = _a4.formatters, parseOpts = __rest(_a4, ["formatters"]);
- this.ast = IntlMessageFormat2.__parse(message, __assign(__assign({}, parseOpts), { locale: this.resolvedLocale }));
- } else
- this.ast = message;
- if (!Array.isArray(this.ast))
- throw new TypeError("A message must be provided as a String or AST.");
- this.formats = mergeConfigs(IntlMessageFormat2.formats, overrideFormats), this.formatters = opts && opts.formatters || createDefaultFormatters(this.formatterCache);
- }
- return Object.defineProperty(IntlMessageFormat2, "defaultLocale", {
- get: function() {
- return IntlMessageFormat2.memoizedDefaultLocale || (IntlMessageFormat2.memoizedDefaultLocale = new Intl.NumberFormat().resolvedOptions().locale), IntlMessageFormat2.memoizedDefaultLocale;
- },
- enumerable: !1,
- configurable: !0
- }), IntlMessageFormat2.memoizedDefaultLocale = null, IntlMessageFormat2.resolveLocale = function(locales) {
- if (!(typeof Intl.Locale > "u")) {
- var supportedLocales = Intl.NumberFormat.supportedLocalesOf(locales);
- return supportedLocales.length > 0 ? new Intl.Locale(supportedLocales[0]) : new Intl.Locale(typeof locales == "string" ? locales : locales[0]);
- }
- }, IntlMessageFormat2.__parse = parse8, IntlMessageFormat2.formats = {
- number: {
- integer: {
- maximumFractionDigits: 0
- },
- currency: {
- style: "currency"
- },
- percent: {
- style: "percent"
- }
- },
- date: {
- short: {
- month: "numeric",
- day: "numeric",
- year: "2-digit"
- },
- medium: {
- month: "short",
- day: "numeric",
- year: "numeric"
- },
- long: {
- month: "long",
- day: "numeric",
- year: "numeric"
- },
- full: {
- weekday: "long",
- month: "long",
- day: "numeric",
- year: "numeric"
- }
- },
- time: {
- short: {
- hour: "numeric",
- minute: "numeric"
- },
- medium: {
- hour: "numeric",
- minute: "numeric",
- second: "numeric"
- },
- long: {
- hour: "numeric",
- minute: "numeric",
- second: "numeric",
- timeZoneName: "short"
- },
- full: {
- hour: "numeric",
- minute: "numeric",
- second: "numeric",
- timeZoneName: "short"
- }
- }
- }, IntlMessageFormat2;
- })()
- );
-
- // ../../node_modules/@react-aria/i18n/dist/useMessageFormatter.mjs
- var import_react67 = __toESM(require_react(), 1);
-
- // ../../node_modules/@internationalized/string/dist/LocalizedStringDictionary.mjs
- var $5b160d28a433310d$var$localeSymbol = Symbol.for("react-aria.i18n.locale"), $5b160d28a433310d$var$stringsSymbol = Symbol.for("react-aria.i18n.strings"), $5b160d28a433310d$var$cachedGlobalStrings, $5b160d28a433310d$export$c17fa47878dc55b6 = class _$5b160d28a433310d$export$c17fa47878dc55b6 {
- /** Returns a localized string for the given key and locale. */
- getStringForLocale(key, locale) {
- let string = this.getStringsForLocale(locale)[key];
- if (!string) throw new Error(`Could not find intl message ${key} in ${locale} locale`);
- return string;
- }
- /** Returns all localized strings for the given locale. */
- getStringsForLocale(locale) {
- let strings = this.strings[locale];
- return strings || (strings = $5b160d28a433310d$var$getStringsForLocale(locale, this.strings, this.defaultLocale), this.strings[locale] = strings), strings;
- }
- static getGlobalDictionaryForPackage(packageName) {
- if (typeof window > "u") return null;
- let locale = window[$5b160d28a433310d$var$localeSymbol];
- if ($5b160d28a433310d$var$cachedGlobalStrings === void 0) {
- let globalStrings = window[$5b160d28a433310d$var$stringsSymbol];
- if (!globalStrings) return null;
- $5b160d28a433310d$var$cachedGlobalStrings = {};
- for (let pkg in globalStrings) $5b160d28a433310d$var$cachedGlobalStrings[pkg] = new _$5b160d28a433310d$export$c17fa47878dc55b6({
- [locale]: globalStrings[pkg]
- }, locale);
- }
- let dictionary = $5b160d28a433310d$var$cachedGlobalStrings?.[packageName];
- if (!dictionary) throw new Error(`Strings for package "${packageName}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);
- return dictionary;
- }
- constructor(messages, defaultLocale = "en-US") {
- this.strings = Object.fromEntries(Object.entries(messages).filter(([, v]) => v)), this.defaultLocale = defaultLocale;
- }
- };
- function $5b160d28a433310d$var$getStringsForLocale(locale, strings, defaultLocale = "en-US") {
- if (strings[locale]) return strings[locale];
- let language = $5b160d28a433310d$var$getLanguage(locale);
- if (strings[language]) return strings[language];
- for (let key in strings)
- if (key.startsWith(language + "-")) return strings[key];
- return strings[defaultLocale];
- }
- function $5b160d28a433310d$var$getLanguage(locale) {
- return Intl.Locale ? new Intl.Locale(locale).language : locale.split("-")[0];
- }
-
- // ../../node_modules/@internationalized/string/dist/LocalizedStringFormatter.mjs
- var $6db58dc88e78b024$var$pluralRulesCache = /* @__PURE__ */ new Map(), $6db58dc88e78b024$var$numberFormatCache = /* @__PURE__ */ new Map(), $6db58dc88e78b024$export$2f817fcdc4b89ae0 = class {
- /** Formats a localized string for the given key with the provided variables. */
- format(key, variables) {
- let message = this.strings.getStringForLocale(key, this.locale);
- return typeof message == "function" ? message(variables, this) : message;
- }
- plural(count, options, type5 = "cardinal") {
- let opt = options["=" + count];
- if (opt) return typeof opt == "function" ? opt() : opt;
- let key = this.locale + ":" + type5, pluralRules = $6db58dc88e78b024$var$pluralRulesCache.get(key);
- pluralRules || (pluralRules = new Intl.PluralRules(this.locale, {
- type: type5
- }), $6db58dc88e78b024$var$pluralRulesCache.set(key, pluralRules));
- let selected = pluralRules.select(count);
- return opt = options[selected] || options.other, typeof opt == "function" ? opt() : opt;
- }
- number(value) {
- let numberFormat = $6db58dc88e78b024$var$numberFormatCache.get(this.locale);
- return numberFormat || (numberFormat = new Intl.NumberFormat(this.locale), $6db58dc88e78b024$var$numberFormatCache.set(this.locale, numberFormat)), numberFormat.format(value);
- }
- select(options, value) {
- let opt = options[value] || options.other;
- return typeof opt == "function" ? opt() : opt;
- }
- constructor(locale, strings) {
- this.locale = locale, this.strings = strings;
- }
- };
-
- // ../../node_modules/@react-aria/i18n/dist/useLocalizedStringFormatter.mjs
- var import_react68 = __toESM(require_react(), 1), $fca6afa0e843324b$var$cache = /* @__PURE__ */ new WeakMap();
- function $fca6afa0e843324b$var$getCachedDictionary(strings) {
- let dictionary = $fca6afa0e843324b$var$cache.get(strings);
- return dictionary || (dictionary = new $5b160d28a433310d$export$c17fa47878dc55b6(strings), $fca6afa0e843324b$var$cache.set(strings, dictionary)), dictionary;
- }
- function $fca6afa0e843324b$export$87b761675e8eaa10(strings, packageName) {
- return packageName && $5b160d28a433310d$export$c17fa47878dc55b6.getGlobalDictionaryForPackage(packageName) || $fca6afa0e843324b$var$getCachedDictionary(strings);
- }
- function $fca6afa0e843324b$export$f12b703ca79dfbb1(strings, packageName) {
- let { locale } = $18f2051aff69b9bf$export$43bb16f9c6d9e3f7(), dictionary = $fca6afa0e843324b$export$87b761675e8eaa10(strings, packageName);
- return (0, import_react68.useMemo)(() => new $6db58dc88e78b024$export$2f817fcdc4b89ae0(locale, dictionary), [
- locale,
- dictionary
- ]);
- }
-
- // ../../node_modules/@react-aria/i18n/dist/useListFormatter.mjs
- var import_react69 = __toESM(require_react(), 1);
-
- // ../../node_modules/@internationalized/date/dist/string.mjs
- var $fae977aafc393c5c$var$requiredDurationTimeGroups = [
- "hours",
- "minutes",
- "seconds"
- ], $fae977aafc393c5c$var$requiredDurationGroups = [
- "years",
- "months",
- "weeks",
- "days",
- ...$fae977aafc393c5c$var$requiredDurationTimeGroups
- ];
-
- // ../../node_modules/@internationalized/date/dist/HebrewCalendar.mjs
- var $7c5f6fbf42389787$var$HOUR_PARTS = 1080, $7c5f6fbf42389787$var$DAY_PARTS = 24 * $7c5f6fbf42389787$var$HOUR_PARTS, $7c5f6fbf42389787$var$MONTH_DAYS = 29, $7c5f6fbf42389787$var$MONTH_FRACT = 12 * $7c5f6fbf42389787$var$HOUR_PARTS + 793, $7c5f6fbf42389787$var$MONTH_PARTS = $7c5f6fbf42389787$var$MONTH_DAYS * $7c5f6fbf42389787$var$DAY_PARTS + $7c5f6fbf42389787$var$MONTH_FRACT;
-
- // ../../node_modules/@react-aria/i18n/dist/useDateFormatter.mjs
- var import_react70 = __toESM(require_react(), 1);
-
- // ../../node_modules/@internationalized/number/dist/NumberFormatter.mjs
- var $488c6ddbf4ef74c2$var$formatterCache = /* @__PURE__ */ new Map(), $488c6ddbf4ef74c2$var$supportsSignDisplay = !1;
- try {
- $488c6ddbf4ef74c2$var$supportsSignDisplay = new Intl.NumberFormat("de-DE", {
- signDisplay: "exceptZero"
- }).resolvedOptions().signDisplay === "exceptZero";
- } catch {
- }
- var $488c6ddbf4ef74c2$var$supportsUnit = !1;
- try {
- $488c6ddbf4ef74c2$var$supportsUnit = new Intl.NumberFormat("de-DE", {
- style: "unit",
- unit: "degree"
- }).resolvedOptions().style === "unit";
- } catch {
- }
- var $488c6ddbf4ef74c2$var$UNITS = {
- degree: {
- narrow: {
- default: "\xB0",
- "ja-JP": " \u5EA6",
- "zh-TW": "\u5EA6",
- "sl-SI": " \xB0"
- }
- }
- }, $488c6ddbf4ef74c2$export$cc77c4ff7e8673c5 = class {
- /** Formats a number value as a string, according to the locale and options provided to the constructor. */
- format(value) {
- let res = "";
- if (!$488c6ddbf4ef74c2$var$supportsSignDisplay && this.options.signDisplay != null ? res = $488c6ddbf4ef74c2$export$711b50b3c525e0f2(this.numberFormatter, this.options.signDisplay, value) : res = this.numberFormatter.format(value), this.options.style === "unit" && !$488c6ddbf4ef74c2$var$supportsUnit) {
- var _UNITS_unit;
- let { unit, unitDisplay = "short", locale } = this.resolvedOptions();
- if (!unit) return res;
- let values = (_UNITS_unit = $488c6ddbf4ef74c2$var$UNITS[unit]) === null || _UNITS_unit === void 0 ? void 0 : _UNITS_unit[unitDisplay];
- res += values[locale] || values.default;
- }
- return res;
- }
- /** Formats a number to an array of parts such as separators, digits, punctuation, and more. */
- formatToParts(value) {
- return this.numberFormatter.formatToParts(value);
- }
- /** Formats a number range as a string. */
- formatRange(start2, end2) {
- if (typeof this.numberFormatter.formatRange == "function") return this.numberFormatter.formatRange(start2, end2);
- if (end2 < start2) throw new RangeError("End date must be >= start date");
- return `${this.format(start2)} \u2013 ${this.format(end2)}`;
- }
- /** Formats a number range as an array of parts. */
- formatRangeToParts(start2, end2) {
- if (typeof this.numberFormatter.formatRangeToParts == "function") return this.numberFormatter.formatRangeToParts(start2, end2);
- if (end2 < start2) throw new RangeError("End date must be >= start date");
- let startParts = this.numberFormatter.formatToParts(start2), endParts = this.numberFormatter.formatToParts(end2);
- return [
- ...startParts.map((p3) => ({
- ...p3,
- source: "startRange"
- })),
- {
- type: "literal",
- value: " \u2013 ",
- source: "shared"
- },
- ...endParts.map((p3) => ({
- ...p3,
- source: "endRange"
- }))
- ];
- }
- /** Returns the resolved formatting options based on the values passed to the constructor. */
- resolvedOptions() {
- let options = this.numberFormatter.resolvedOptions();
- return !$488c6ddbf4ef74c2$var$supportsSignDisplay && this.options.signDisplay != null && (options = {
- ...options,
- signDisplay: this.options.signDisplay
- }), !$488c6ddbf4ef74c2$var$supportsUnit && this.options.style === "unit" && (options = {
- ...options,
- style: "unit",
- unit: this.options.unit,
- unitDisplay: this.options.unitDisplay
- }), options;
- }
- constructor(locale, options = {}) {
- this.numberFormatter = $488c6ddbf4ef74c2$var$getCachedNumberFormatter(locale, options), this.options = options;
- }
- };
- function $488c6ddbf4ef74c2$var$getCachedNumberFormatter(locale, options = {}) {
- let { numberingSystem } = options;
- if (numberingSystem && locale.includes("-nu-") && (locale.includes("-u-") || (locale += "-u-"), locale += `-nu-${numberingSystem}`), options.style === "unit" && !$488c6ddbf4ef74c2$var$supportsUnit) {
- var _UNITS_unit;
- let { unit, unitDisplay = "short" } = options;
- if (!unit) throw new Error('unit option must be provided with style: "unit"');
- if (!(!((_UNITS_unit = $488c6ddbf4ef74c2$var$UNITS[unit]) === null || _UNITS_unit === void 0) && _UNITS_unit[unitDisplay])) throw new Error(`Unsupported unit ${unit} with unitDisplay = ${unitDisplay}`);
- options = {
- ...options,
- style: "decimal"
- };
- }
- let cacheKey = locale + (options ? Object.entries(options).sort((a3, b) => a3[0] < b[0] ? -1 : 1).join() : "");
- if ($488c6ddbf4ef74c2$var$formatterCache.has(cacheKey)) return $488c6ddbf4ef74c2$var$formatterCache.get(cacheKey);
- let numberFormatter = new Intl.NumberFormat(locale, options);
- return $488c6ddbf4ef74c2$var$formatterCache.set(cacheKey, numberFormatter), numberFormatter;
- }
- function $488c6ddbf4ef74c2$export$711b50b3c525e0f2(numberFormat, signDisplay, num) {
- if (signDisplay === "auto") return numberFormat.format(num);
- if (signDisplay === "never") return numberFormat.format(Math.abs(num));
- {
- let needsPositiveSign = !1;
- if (signDisplay === "always" ? needsPositiveSign = num > 0 || Object.is(num, 0) : signDisplay === "exceptZero" && (Object.is(num, -0) || Object.is(num, 0) ? num = Math.abs(num) : needsPositiveSign = num > 0), needsPositiveSign) {
- let negative = numberFormat.format(-num), noSign = numberFormat.format(num), minus = negative.replace(noSign, "").replace(/\u200e|\u061C/, "");
- return [
- ...minus
- ].length !== 1 && console.warn("@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case"), negative.replace(noSign, "!!!").replace(minus, "+").replace("!!!", noSign);
- } else return numberFormat.format(num);
- }
- }
-
- // ../../node_modules/@internationalized/number/dist/NumberParser.mjs
- var $6c7bd7858deea686$var$CURRENCY_SIGN_REGEX = new RegExp("^.*\\(.*\\).*$");
-
- // ../../node_modules/@react-aria/i18n/dist/useNumberFormatter.mjs
- var import_react71 = __toESM(require_react(), 1);
- function $a916eb452884faea$export$b7a616150fdb9f44(options = {}) {
- let { locale } = $18f2051aff69b9bf$export$43bb16f9c6d9e3f7();
- return (0, import_react71.useMemo)(() => new $488c6ddbf4ef74c2$export$cc77c4ff7e8673c5(locale, options), [
- locale,
- options
- ]);
- }
-
- // ../../node_modules/@react-aria/i18n/dist/useCollator.mjs
- var $325a3faab7a68acd$var$cache = /* @__PURE__ */ new Map();
- function $325a3faab7a68acd$export$a16aca283550c30d(options) {
- let { locale } = $18f2051aff69b9bf$export$43bb16f9c6d9e3f7(), cacheKey = locale + (options ? Object.entries(options).sort((a3, b) => a3[0] < b[0] ? -1 : 1).join() : "");
- if ($325a3faab7a68acd$var$cache.has(cacheKey)) return $325a3faab7a68acd$var$cache.get(cacheKey);
- let formatter2 = new Intl.Collator(locale, options);
- return $325a3faab7a68acd$var$cache.set(cacheKey, formatter2), formatter2;
- }
-
- // ../../node_modules/@react-aria/i18n/dist/useFilter.mjs
- var import_react72 = __toESM(require_react(), 1);
-
- // ../../node_modules/@react-aria/overlays/dist/useOverlayPosition.mjs
- var $2a41e45df1593e64$var$visualViewport = typeof document < "u" ? window.visualViewport : null;
- function $2a41e45df1593e64$export$d39e1813b3bdd0e1(props) {
- let { direction } = $18f2051aff69b9bf$export$43bb16f9c6d9e3f7(), { arrowSize, targetRef, overlayRef, arrowRef, scrollRef = overlayRef, placement = "bottom", containerPadding = 12, shouldFlip = !0, boundaryElement = typeof document < "u" ? document.body : null, offset: offset3 = 0, crossOffset = 0, shouldUpdatePosition = !0, isOpen = !0, onClose, maxHeight, arrowBoundaryOffset = 0 } = props, [position2, setPosition] = (0, import_react73.useState)(null), deps = [
- shouldUpdatePosition,
- placement,
- overlayRef.current,
- targetRef.current,
- arrowRef?.current,
- scrollRef.current,
- containerPadding,
- shouldFlip,
- boundaryElement,
- offset3,
- crossOffset,
- isOpen,
- direction,
- maxHeight,
- arrowBoundaryOffset,
- arrowSize
- ], lastScale = (0, import_react73.useRef)($2a41e45df1593e64$var$visualViewport?.scale);
- (0, import_react73.useEffect)(() => {
- isOpen && (lastScale.current = $2a41e45df1593e64$var$visualViewport?.scale);
- }, [
- isOpen
- ]);
- let updatePosition = (0, import_react73.useCallback)(() => {
- if (shouldUpdatePosition === !1 || !isOpen || !overlayRef.current || !targetRef.current || !boundaryElement || $2a41e45df1593e64$var$visualViewport?.scale !== lastScale.current) return;
- let anchor = null;
- if (scrollRef.current && scrollRef.current.contains(document.activeElement)) {
- var _document_activeElement;
- let anchorRect = (_document_activeElement = document.activeElement) === null || _document_activeElement === void 0 ? void 0 : _document_activeElement.getBoundingClientRect(), scrollRect = scrollRef.current.getBoundingClientRect();
- var _anchorRect_top;
- if (anchor = {
- type: "top",
- offset: ((_anchorRect_top = anchorRect?.top) !== null && _anchorRect_top !== void 0 ? _anchorRect_top : 0) - scrollRect.top
- }, anchor.offset > scrollRect.height / 2) {
- anchor.type = "bottom";
- var _anchorRect_bottom;
- anchor.offset = ((_anchorRect_bottom = anchorRect?.bottom) !== null && _anchorRect_bottom !== void 0 ? _anchorRect_bottom : 0) - scrollRect.bottom;
- }
- }
- let overlay = overlayRef.current;
- if (!maxHeight && overlayRef.current) {
- var _window_visualViewport;
- overlay.style.top = "0px", overlay.style.bottom = "";
- var _window_visualViewport_height;
- overlay.style.maxHeight = ((_window_visualViewport_height = (_window_visualViewport = window.visualViewport) === null || _window_visualViewport === void 0 ? void 0 : _window_visualViewport.height) !== null && _window_visualViewport_height !== void 0 ? _window_visualViewport_height : window.innerHeight) + "px";
- }
- let position3 = $edcf132a9284368a$export$b3ceb0cbf1056d98({
- placement: $2a41e45df1593e64$var$translateRTL(placement, direction),
- overlayNode: overlayRef.current,
- targetNode: targetRef.current,
- scrollNode: scrollRef.current || overlayRef.current,
- padding: containerPadding,
- shouldFlip,
- boundaryElement,
- offset: offset3,
- crossOffset,
- maxHeight,
- arrowSize: arrowSize ?? (arrowRef?.current ? $edcf132a9284368a$export$4b834cebd9e5cebe(arrowRef.current, !0).width : 0),
- arrowBoundaryOffset
- });
- if (position3.position) {
- if (overlay.style.top = "", overlay.style.bottom = "", overlay.style.left = "", overlay.style.right = "", Object.keys(position3.position).forEach((key) => overlay.style[key] = position3.position[key] + "px"), overlay.style.maxHeight = position3.maxHeight != null ? position3.maxHeight + "px" : "", anchor && document.activeElement && scrollRef.current) {
- let anchorRect = document.activeElement.getBoundingClientRect(), scrollRect = scrollRef.current.getBoundingClientRect(), newOffset = anchorRect[anchor.type] - scrollRect[anchor.type];
- scrollRef.current.scrollTop += newOffset - anchor.offset;
- }
- setPosition(position3);
- }
- }, deps);
- $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(updatePosition, deps), $2a41e45df1593e64$var$useResize(updatePosition), $9daab02d461809db$export$683480f191c0e3ea({
- ref: overlayRef,
- onResize: updatePosition
- }), $9daab02d461809db$export$683480f191c0e3ea({
- ref: targetRef,
- onResize: updatePosition
- });
- let isResizing = (0, import_react73.useRef)(!1);
- $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
- let timeout, onResize = () => {
- isResizing.current = !0, clearTimeout(timeout), timeout = setTimeout(() => {
- isResizing.current = !1;
- }, 500), updatePosition();
- }, onScroll = () => {
- isResizing.current && onResize();
- };
- return $2a41e45df1593e64$var$visualViewport?.addEventListener("resize", onResize), $2a41e45df1593e64$var$visualViewport?.addEventListener("scroll", onScroll), () => {
- $2a41e45df1593e64$var$visualViewport?.removeEventListener("resize", onResize), $2a41e45df1593e64$var$visualViewport?.removeEventListener("scroll", onScroll);
- };
- }, [
- updatePosition
- ]);
- let close = (0, import_react73.useCallback)(() => {
- isResizing.current || onClose?.();
- }, [
- onClose,
- isResizing
- ]);
- $dd149f63282afbbf$export$18fc8428861184da({
- triggerRef: targetRef,
- isOpen,
- onClose: onClose && close
- });
- var _position_maxHeight, _position_placement, _position_triggerAnchorPoint;
- return {
- overlayProps: {
- style: {
- position: position2 ? "absolute" : "fixed",
- top: position2 ? void 0 : 0,
- left: position2 ? void 0 : 0,
- zIndex: 1e5,
- ...position2?.position,
- maxHeight: (_position_maxHeight = position2?.maxHeight) !== null && _position_maxHeight !== void 0 ? _position_maxHeight : "100vh"
- }
- },
- placement: (_position_placement = position2?.placement) !== null && _position_placement !== void 0 ? _position_placement : null,
- triggerAnchorPoint: (_position_triggerAnchorPoint = position2?.triggerAnchorPoint) !== null && _position_triggerAnchorPoint !== void 0 ? _position_triggerAnchorPoint : null,
- arrowProps: {
- "aria-hidden": "true",
- role: "presentation",
- style: {
- left: position2?.arrowOffsetLeft,
- top: position2?.arrowOffsetTop
- }
- },
- updatePosition
- };
- }
- function $2a41e45df1593e64$var$useResize(onResize) {
- $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => (window.addEventListener("resize", onResize, !1), () => {
- window.removeEventListener("resize", onResize, !1);
- }), [
- onResize
- ]);
- }
- function $2a41e45df1593e64$var$translateRTL(position2, direction) {
- return direction === "rtl" ? position2.replace("start", "right").replace("end", "left") : position2.replace("start", "left").replace("end", "right");
- }
-
- // ../../node_modules/@react-aria/focus/dist/FocusScope.mjs
- var import_react74 = __toESM(require_react(), 1), $9bf71ea28793e738$var$FocusContext = import_react74.default.createContext(null), $9bf71ea28793e738$var$RESTORE_FOCUS_EVENT = "react-aria-focus-scope-restore", $9bf71ea28793e738$var$activeScope = null;
- function $9bf71ea28793e738$export$20e40289641fbbb6(props) {
- let { children, contain, restoreFocus, autoFocus } = props, startRef = (0, import_react74.useRef)(null), endRef = (0, import_react74.useRef)(null), scopeRef = (0, import_react74.useRef)([]), { parentNode } = (0, import_react74.useContext)($9bf71ea28793e738$var$FocusContext) || {}, node2 = (0, import_react74.useMemo)(() => new $9bf71ea28793e738$var$TreeNode({
- scopeRef
- }), [
- scopeRef
- ]);
- $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
- let parent = parentNode || $9bf71ea28793e738$export$d06fae2ee68b101e.root;
- if ($9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(parent.scopeRef) && $9bf71ea28793e738$var$activeScope && !$9bf71ea28793e738$var$isAncestorScope($9bf71ea28793e738$var$activeScope, parent.scopeRef)) {
- let activeNode = $9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode($9bf71ea28793e738$var$activeScope);
- activeNode && (parent = activeNode);
- }
- parent.addChild(node2), $9bf71ea28793e738$export$d06fae2ee68b101e.addNode(node2);
- }, [
- node2,
- parentNode
- ]), $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
- let node3 = $9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(scopeRef);
- node3 && (node3.contain = !!contain);
- }, [
- contain
- ]), $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
- var _startRef_current;
- let node3 = (_startRef_current = startRef.current) === null || _startRef_current === void 0 ? void 0 : _startRef_current.nextSibling, nodes = [], stopPropagation = (e) => e.stopPropagation();
- for (; node3 && node3 !== endRef.current; )
- nodes.push(node3), node3.addEventListener($9bf71ea28793e738$var$RESTORE_FOCUS_EVENT, stopPropagation), node3 = node3.nextSibling;
- return scopeRef.current = nodes, () => {
- for (let node4 of nodes) node4.removeEventListener($9bf71ea28793e738$var$RESTORE_FOCUS_EVENT, stopPropagation);
- };
- }, [
- children
- ]), $9bf71ea28793e738$var$useActiveScopeTracker(scopeRef, restoreFocus, contain), $9bf71ea28793e738$var$useFocusContainment(scopeRef, contain), $9bf71ea28793e738$var$useRestoreFocus(scopeRef, restoreFocus, contain), $9bf71ea28793e738$var$useAutoFocus(scopeRef, autoFocus), (0, import_react74.useEffect)(() => {
- let activeElement = $d4ee10de306f2510$export$cd4e5573fbe2b576($431fbd86ca7dc216$export$b204af158042fbac(scopeRef.current ? scopeRef.current[0] : void 0)), scope2 = null;
- if ($9bf71ea28793e738$var$isElementInScope(activeElement, scopeRef.current)) {
- for (let node3 of $9bf71ea28793e738$export$d06fae2ee68b101e.traverse()) node3.scopeRef && $9bf71ea28793e738$var$isElementInScope(activeElement, node3.scopeRef.current) && (scope2 = node3);
- scope2 === $9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(scopeRef) && ($9bf71ea28793e738$var$activeScope = scope2.scopeRef);
- }
- }, [
- scopeRef
- ]), $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => () => {
- var _focusScopeTree_getTreeNode_parent, _focusScopeTree_getTreeNode, _focusScopeTree_getTreeNode_parent_scopeRef;
- let parentScope = (_focusScopeTree_getTreeNode_parent_scopeRef = (_focusScopeTree_getTreeNode = $9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(scopeRef)) === null || _focusScopeTree_getTreeNode === void 0 || (_focusScopeTree_getTreeNode_parent = _focusScopeTree_getTreeNode.parent) === null || _focusScopeTree_getTreeNode_parent === void 0 ? void 0 : _focusScopeTree_getTreeNode_parent.scopeRef) !== null && _focusScopeTree_getTreeNode_parent_scopeRef !== void 0 ? _focusScopeTree_getTreeNode_parent_scopeRef : null;
- (scopeRef === $9bf71ea28793e738$var$activeScope || $9bf71ea28793e738$var$isAncestorScope(scopeRef, $9bf71ea28793e738$var$activeScope)) && (!parentScope || $9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(parentScope)) && ($9bf71ea28793e738$var$activeScope = parentScope), $9bf71ea28793e738$export$d06fae2ee68b101e.removeTreeNode(scopeRef);
- }, [
- scopeRef
- ]);
- let focusManager = (0, import_react74.useMemo)(() => $9bf71ea28793e738$var$createFocusManagerForScope(scopeRef), []), value = (0, import_react74.useMemo)(() => ({
- focusManager,
- parentNode: node2
- }), [
- node2,
- focusManager
- ]);
- return import_react74.default.createElement($9bf71ea28793e738$var$FocusContext.Provider, {
- value
- }, import_react74.default.createElement("span", {
- "data-focus-scope-start": !0,
- hidden: !0,
- ref: startRef
- }), children, import_react74.default.createElement("span", {
- "data-focus-scope-end": !0,
- hidden: !0,
- ref: endRef
- }));
- }
- function $9bf71ea28793e738$var$createFocusManagerForScope(scopeRef) {
- return {
- focusNext(opts = {}) {
- let scope2 = scopeRef.current, { from: from2, tabbable, wrap: wrap2, accept } = opts;
- var _scope_;
- let node2 = from2 || $d4ee10de306f2510$export$cd4e5573fbe2b576($431fbd86ca7dc216$export$b204af158042fbac((_scope_ = scope2[0]) !== null && _scope_ !== void 0 ? _scope_ : void 0)), sentinel = scope2[0].previousElementSibling, scopeRoot = $9bf71ea28793e738$var$getScopeRoot(scope2), walker = $9bf71ea28793e738$export$2d6ec8fc375ceafa(scopeRoot, {
- tabbable,
- accept
- }, scope2);
- walker.currentNode = $9bf71ea28793e738$var$isElementInScope(node2, scope2) ? node2 : sentinel;
- let nextNode = walker.nextNode();
- return !nextNode && wrap2 && (walker.currentNode = sentinel, nextNode = walker.nextNode()), nextNode && $9bf71ea28793e738$var$focusElement(nextNode, !0), nextNode;
- },
- focusPrevious(opts = {}) {
- let scope2 = scopeRef.current, { from: from2, tabbable, wrap: wrap2, accept } = opts;
- var _scope_;
- let node2 = from2 || $d4ee10de306f2510$export$cd4e5573fbe2b576($431fbd86ca7dc216$export$b204af158042fbac((_scope_ = scope2[0]) !== null && _scope_ !== void 0 ? _scope_ : void 0)), sentinel = scope2[scope2.length - 1].nextElementSibling, scopeRoot = $9bf71ea28793e738$var$getScopeRoot(scope2), walker = $9bf71ea28793e738$export$2d6ec8fc375ceafa(scopeRoot, {
- tabbable,
- accept
- }, scope2);
- walker.currentNode = $9bf71ea28793e738$var$isElementInScope(node2, scope2) ? node2 : sentinel;
- let previousNode = walker.previousNode();
- return !previousNode && wrap2 && (walker.currentNode = sentinel, previousNode = walker.previousNode()), previousNode && $9bf71ea28793e738$var$focusElement(previousNode, !0), previousNode;
- },
- focusFirst(opts = {}) {
- let scope2 = scopeRef.current, { tabbable, accept } = opts, scopeRoot = $9bf71ea28793e738$var$getScopeRoot(scope2), walker = $9bf71ea28793e738$export$2d6ec8fc375ceafa(scopeRoot, {
- tabbable,
- accept
- }, scope2);
- walker.currentNode = scope2[0].previousElementSibling;
- let nextNode = walker.nextNode();
- return nextNode && $9bf71ea28793e738$var$focusElement(nextNode, !0), nextNode;
- },
- focusLast(opts = {}) {
- let scope2 = scopeRef.current, { tabbable, accept } = opts, scopeRoot = $9bf71ea28793e738$var$getScopeRoot(scope2), walker = $9bf71ea28793e738$export$2d6ec8fc375ceafa(scopeRoot, {
- tabbable,
- accept
- }, scope2);
- walker.currentNode = scope2[scope2.length - 1].nextElementSibling;
- let previousNode = walker.previousNode();
- return previousNode && $9bf71ea28793e738$var$focusElement(previousNode, !0), previousNode;
- }
- };
- }
- function $9bf71ea28793e738$var$getScopeRoot(scope2) {
- return scope2[0].parentElement;
- }
- function $9bf71ea28793e738$var$shouldContainFocus(scopeRef) {
- let scope2 = $9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode($9bf71ea28793e738$var$activeScope);
- for (; scope2 && scope2.scopeRef !== scopeRef; ) {
- if (scope2.contain) return !1;
- scope2 = scope2.parent;
- }
- return !0;
- }
- function $9bf71ea28793e738$var$isTabbableRadio(element) {
- if (element.checked) return !0;
- let radios = [];
- if (!element.form) radios = [
- ...$431fbd86ca7dc216$export$b204af158042fbac(element).querySelectorAll(`input[type="radio"][name="${CSS.escape(element.name)}"]`)
- ].filter((radio) => !radio.form);
- else {
- var _element_form_elements, _element_form;
- let radioList = (_element_form = element.form) === null || _element_form === void 0 || (_element_form_elements = _element_form.elements) === null || _element_form_elements === void 0 ? void 0 : _element_form_elements.namedItem(element.name);
- radios = [
- ...radioList ?? []
- ];
- }
- return radios ? !radios.some((radio) => radio.checked) : !1;
- }
- function $9bf71ea28793e738$var$useFocusContainment(scopeRef, contain) {
- let focusedNode = (0, import_react74.useRef)(void 0), raf = (0, import_react74.useRef)(void 0);
- $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
- let scope2 = scopeRef.current;
- if (!contain) {
- raf.current && (cancelAnimationFrame(raf.current), raf.current = void 0);
- return;
- }
- let ownerDocument = $431fbd86ca7dc216$export$b204af158042fbac(scope2 ? scope2[0] : void 0), onKeyDown = (e) => {
- if (e.key !== "Tab" || e.altKey || e.ctrlKey || e.metaKey || !$9bf71ea28793e738$var$shouldContainFocus(scopeRef) || e.isComposing) return;
- let focusedElement = $d4ee10de306f2510$export$cd4e5573fbe2b576(ownerDocument), scope3 = scopeRef.current;
- if (!scope3 || !$9bf71ea28793e738$var$isElementInScope(focusedElement, scope3)) return;
- let scopeRoot = $9bf71ea28793e738$var$getScopeRoot(scope3), walker = $9bf71ea28793e738$export$2d6ec8fc375ceafa(scopeRoot, {
- tabbable: !0
- }, scope3);
- if (!focusedElement) return;
- walker.currentNode = focusedElement;
- let nextElement = e.shiftKey ? walker.previousNode() : walker.nextNode();
- nextElement || (walker.currentNode = e.shiftKey ? scope3[scope3.length - 1].nextElementSibling : scope3[0].previousElementSibling, nextElement = e.shiftKey ? walker.previousNode() : walker.nextNode()), e.preventDefault(), nextElement && $9bf71ea28793e738$var$focusElement(nextElement, !0);
- }, onFocus = (e) => {
- (!$9bf71ea28793e738$var$activeScope || $9bf71ea28793e738$var$isAncestorScope($9bf71ea28793e738$var$activeScope, scopeRef)) && $9bf71ea28793e738$var$isElementInScope($d4ee10de306f2510$export$e58f029f0fbfdb29(e), scopeRef.current) ? ($9bf71ea28793e738$var$activeScope = scopeRef, focusedNode.current = $d4ee10de306f2510$export$e58f029f0fbfdb29(e)) : $9bf71ea28793e738$var$shouldContainFocus(scopeRef) && !$9bf71ea28793e738$var$isElementInChildScope($d4ee10de306f2510$export$e58f029f0fbfdb29(e), scopeRef) ? focusedNode.current ? focusedNode.current.focus() : $9bf71ea28793e738$var$activeScope && $9bf71ea28793e738$var$activeScope.current && $9bf71ea28793e738$var$focusFirstInScope($9bf71ea28793e738$var$activeScope.current) : $9bf71ea28793e738$var$shouldContainFocus(scopeRef) && (focusedNode.current = $d4ee10de306f2510$export$e58f029f0fbfdb29(e));
- }, onBlur = (e) => {
- raf.current && cancelAnimationFrame(raf.current), raf.current = requestAnimationFrame(() => {
- let modality = $507fabe10e71c6fb$export$630ff653c5ada6a9(), shouldSkipFocusRestore = (modality === "virtual" || modality === null) && $c87311424ea30a05$export$a11b0059900ceec8() && $c87311424ea30a05$export$6446a186d09e379e(), activeElement = $d4ee10de306f2510$export$cd4e5573fbe2b576(ownerDocument);
- if (!shouldSkipFocusRestore && activeElement && $9bf71ea28793e738$var$shouldContainFocus(scopeRef) && !$9bf71ea28793e738$var$isElementInChildScope(activeElement, scopeRef)) {
- $9bf71ea28793e738$var$activeScope = scopeRef;
- let target = $d4ee10de306f2510$export$e58f029f0fbfdb29(e);
- if (target && target.isConnected) {
- var _focusedNode_current;
- focusedNode.current = target, (_focusedNode_current = focusedNode.current) === null || _focusedNode_current === void 0 || _focusedNode_current.focus();
- } else $9bf71ea28793e738$var$activeScope.current && $9bf71ea28793e738$var$focusFirstInScope($9bf71ea28793e738$var$activeScope.current);
- }
- });
- };
- return ownerDocument.addEventListener("keydown", onKeyDown, !1), ownerDocument.addEventListener("focusin", onFocus, !1), scope2?.forEach((element) => element.addEventListener("focusin", onFocus, !1)), scope2?.forEach((element) => element.addEventListener("focusout", onBlur, !1)), () => {
- ownerDocument.removeEventListener("keydown", onKeyDown, !1), ownerDocument.removeEventListener("focusin", onFocus, !1), scope2?.forEach((element) => element.removeEventListener("focusin", onFocus, !1)), scope2?.forEach((element) => element.removeEventListener("focusout", onBlur, !1));
- };
- }, [
- scopeRef,
- contain
- ]), $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => () => {
- raf.current && cancelAnimationFrame(raf.current);
- }, [
- raf
- ]);
- }
- function $9bf71ea28793e738$var$isElementInAnyScope(element) {
- return $9bf71ea28793e738$var$isElementInChildScope(element);
- }
- function $9bf71ea28793e738$var$isElementInScope(element, scope2) {
- return !element || !scope2 ? !1 : scope2.some((node2) => node2.contains(element));
- }
- function $9bf71ea28793e738$var$isElementInChildScope(element, scope2 = null) {
- if (element instanceof Element && element.closest("[data-react-aria-top-layer]")) return !0;
- for (let { scopeRef: s3 } of $9bf71ea28793e738$export$d06fae2ee68b101e.traverse($9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(scope2)))
- if (s3 && $9bf71ea28793e738$var$isElementInScope(element, s3.current)) return !0;
- return !1;
- }
- function $9bf71ea28793e738$export$1258395f99bf9cbf(element) {
- return $9bf71ea28793e738$var$isElementInChildScope(element, $9bf71ea28793e738$var$activeScope);
- }
- function $9bf71ea28793e738$var$isAncestorScope(ancestor, scope2) {
- var _focusScopeTree_getTreeNode;
- let parent = (_focusScopeTree_getTreeNode = $9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(scope2)) === null || _focusScopeTree_getTreeNode === void 0 ? void 0 : _focusScopeTree_getTreeNode.parent;
- for (; parent; ) {
- if (parent.scopeRef === ancestor) return !0;
- parent = parent.parent;
- }
- return !1;
- }
- function $9bf71ea28793e738$var$focusElement(element, scroll = !1) {
- if (element != null && !scroll) try {
- $3ad3f6e1647bc98d$export$80f3e147d781571c(element);
- } catch {
- }
- else if (element != null) try {
- element.focus();
- } catch {
- }
- }
- function $9bf71ea28793e738$var$getFirstInScope(scope2, tabbable = !0) {
- let sentinel = scope2[0].previousElementSibling, scopeRoot = $9bf71ea28793e738$var$getScopeRoot(scope2), walker = $9bf71ea28793e738$export$2d6ec8fc375ceafa(scopeRoot, {
- tabbable
- }, scope2);
- walker.currentNode = sentinel;
- let nextNode = walker.nextNode();
- return tabbable && !nextNode && (scopeRoot = $9bf71ea28793e738$var$getScopeRoot(scope2), walker = $9bf71ea28793e738$export$2d6ec8fc375ceafa(scopeRoot, {
- tabbable: !1
- }, scope2), walker.currentNode = sentinel, nextNode = walker.nextNode()), nextNode;
- }
- function $9bf71ea28793e738$var$focusFirstInScope(scope2, tabbable = !0) {
- $9bf71ea28793e738$var$focusElement($9bf71ea28793e738$var$getFirstInScope(scope2, tabbable));
- }
- function $9bf71ea28793e738$var$useAutoFocus(scopeRef, autoFocus) {
- let autoFocusRef = import_react74.default.useRef(autoFocus);
- (0, import_react74.useEffect)(() => {
- if (autoFocusRef.current) {
- $9bf71ea28793e738$var$activeScope = scopeRef;
- let ownerDocument = $431fbd86ca7dc216$export$b204af158042fbac(scopeRef.current ? scopeRef.current[0] : void 0);
- !$9bf71ea28793e738$var$isElementInScope($d4ee10de306f2510$export$cd4e5573fbe2b576(ownerDocument), $9bf71ea28793e738$var$activeScope.current) && scopeRef.current && $9bf71ea28793e738$var$focusFirstInScope(scopeRef.current);
- }
- autoFocusRef.current = !1;
- }, [
- scopeRef
- ]);
- }
- function $9bf71ea28793e738$var$useActiveScopeTracker(scopeRef, restore, contain) {
- $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
- if (restore || contain) return;
- let scope2 = scopeRef.current, ownerDocument = $431fbd86ca7dc216$export$b204af158042fbac(scope2 ? scope2[0] : void 0), onFocus = (e) => {
- let target = $d4ee10de306f2510$export$e58f029f0fbfdb29(e);
- $9bf71ea28793e738$var$isElementInScope(target, scopeRef.current) ? $9bf71ea28793e738$var$activeScope = scopeRef : $9bf71ea28793e738$var$isElementInAnyScope(target) || ($9bf71ea28793e738$var$activeScope = null);
- };
- return ownerDocument.addEventListener("focusin", onFocus, !1), scope2?.forEach((element) => element.addEventListener("focusin", onFocus, !1)), () => {
- ownerDocument.removeEventListener("focusin", onFocus, !1), scope2?.forEach((element) => element.removeEventListener("focusin", onFocus, !1));
- };
- }, [
- scopeRef,
- restore,
- contain
- ]);
- }
- function $9bf71ea28793e738$var$shouldRestoreFocus(scopeRef) {
- let scope2 = $9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode($9bf71ea28793e738$var$activeScope);
- for (; scope2 && scope2.scopeRef !== scopeRef; ) {
- if (scope2.nodeToRestore) return !1;
- scope2 = scope2.parent;
- }
- return scope2?.scopeRef === scopeRef;
- }
- function $9bf71ea28793e738$var$useRestoreFocus(scopeRef, restoreFocus, contain) {
- let nodeToRestoreRef = (0, import_react74.useRef)(typeof document < "u" ? $d4ee10de306f2510$export$cd4e5573fbe2b576($431fbd86ca7dc216$export$b204af158042fbac(scopeRef.current ? scopeRef.current[0] : void 0)) : null);
- $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
- let scope2 = scopeRef.current, ownerDocument = $431fbd86ca7dc216$export$b204af158042fbac(scope2 ? scope2[0] : void 0);
- if (!restoreFocus || contain) return;
- let onFocus = () => {
- (!$9bf71ea28793e738$var$activeScope || $9bf71ea28793e738$var$isAncestorScope($9bf71ea28793e738$var$activeScope, scopeRef)) && $9bf71ea28793e738$var$isElementInScope($d4ee10de306f2510$export$cd4e5573fbe2b576(ownerDocument), scopeRef.current) && ($9bf71ea28793e738$var$activeScope = scopeRef);
- };
- return ownerDocument.addEventListener("focusin", onFocus, !1), scope2?.forEach((element) => element.addEventListener("focusin", onFocus, !1)), () => {
- ownerDocument.removeEventListener("focusin", onFocus, !1), scope2?.forEach((element) => element.removeEventListener("focusin", onFocus, !1));
- };
- }, [
- scopeRef,
- contain
- ]), $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
- let ownerDocument = $431fbd86ca7dc216$export$b204af158042fbac(scopeRef.current ? scopeRef.current[0] : void 0);
- if (!restoreFocus) return;
- let onKeyDown = (e) => {
- if (e.key !== "Tab" || e.altKey || e.ctrlKey || e.metaKey || !$9bf71ea28793e738$var$shouldContainFocus(scopeRef) || e.isComposing) return;
- let focusedElement = ownerDocument.activeElement;
- if (!$9bf71ea28793e738$var$isElementInChildScope(focusedElement, scopeRef) || !$9bf71ea28793e738$var$shouldRestoreFocus(scopeRef)) return;
- let treeNode = $9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(scopeRef);
- if (!treeNode) return;
- let nodeToRestore = treeNode.nodeToRestore, walker = $9bf71ea28793e738$export$2d6ec8fc375ceafa(ownerDocument.body, {
- tabbable: !0
- });
- walker.currentNode = focusedElement;
- let nextElement = e.shiftKey ? walker.previousNode() : walker.nextNode();
- if ((!nodeToRestore || !nodeToRestore.isConnected || nodeToRestore === ownerDocument.body) && (nodeToRestore = void 0, treeNode.nodeToRestore = void 0), (!nextElement || !$9bf71ea28793e738$var$isElementInChildScope(nextElement, scopeRef)) && nodeToRestore) {
- walker.currentNode = nodeToRestore;
- do
- nextElement = e.shiftKey ? walker.previousNode() : walker.nextNode();
- while ($9bf71ea28793e738$var$isElementInChildScope(nextElement, scopeRef));
- e.preventDefault(), e.stopPropagation(), nextElement ? $9bf71ea28793e738$var$focusElement(nextElement, !0) : $9bf71ea28793e738$var$isElementInAnyScope(nodeToRestore) ? $9bf71ea28793e738$var$focusElement(nodeToRestore, !0) : focusedElement.blur();
- }
- };
- return contain || ownerDocument.addEventListener("keydown", onKeyDown, !0), () => {
- contain || ownerDocument.removeEventListener("keydown", onKeyDown, !0);
- };
- }, [
- scopeRef,
- restoreFocus,
- contain
- ]), $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
- let ownerDocument = $431fbd86ca7dc216$export$b204af158042fbac(scopeRef.current ? scopeRef.current[0] : void 0);
- if (!restoreFocus) return;
- let treeNode = $9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(scopeRef);
- if (treeNode) {
- var _nodeToRestoreRef_current;
- return treeNode.nodeToRestore = (_nodeToRestoreRef_current = nodeToRestoreRef.current) !== null && _nodeToRestoreRef_current !== void 0 ? _nodeToRestoreRef_current : void 0, () => {
- let treeNode2 = $9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(scopeRef);
- if (!treeNode2) return;
- let nodeToRestore = treeNode2.nodeToRestore, activeElement = $d4ee10de306f2510$export$cd4e5573fbe2b576(ownerDocument);
- if (restoreFocus && nodeToRestore && (activeElement && $9bf71ea28793e738$var$isElementInChildScope(activeElement, scopeRef) || activeElement === ownerDocument.body && $9bf71ea28793e738$var$shouldRestoreFocus(scopeRef))) {
- let clonedTree = $9bf71ea28793e738$export$d06fae2ee68b101e.clone();
- requestAnimationFrame(() => {
- if (ownerDocument.activeElement === ownerDocument.body) {
- let treeNode3 = clonedTree.getTreeNode(scopeRef);
- for (; treeNode3; ) {
- if (treeNode3.nodeToRestore && treeNode3.nodeToRestore.isConnected) {
- $9bf71ea28793e738$var$restoreFocusToElement(treeNode3.nodeToRestore);
- return;
- }
- treeNode3 = treeNode3.parent;
- }
- for (treeNode3 = clonedTree.getTreeNode(scopeRef); treeNode3; ) {
- if (treeNode3.scopeRef && treeNode3.scopeRef.current && $9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(treeNode3.scopeRef)) {
- let node2 = $9bf71ea28793e738$var$getFirstInScope(treeNode3.scopeRef.current, !0);
- $9bf71ea28793e738$var$restoreFocusToElement(node2);
- return;
- }
- treeNode3 = treeNode3.parent;
- }
- }
- });
- }
- };
- }
- }, [
- scopeRef,
- restoreFocus
- ]);
- }
- function $9bf71ea28793e738$var$restoreFocusToElement(node2) {
- node2.dispatchEvent(new CustomEvent($9bf71ea28793e738$var$RESTORE_FOCUS_EVENT, {
- bubbles: !0,
- cancelable: !0
- })) && $9bf71ea28793e738$var$focusElement(node2);
- }
- function $9bf71ea28793e738$export$2d6ec8fc375ceafa(root2, opts, scope2) {
- let filter = opts?.tabbable ? $b4b717babfbb907b$export$bebd5a1431fec25d : $b4b717babfbb907b$export$4c063cf1350e6fed, rootElement = root2?.nodeType === Node.ELEMENT_NODE ? root2 : null, doc = $431fbd86ca7dc216$export$b204af158042fbac(rootElement), walker = $dfc540311bf7f109$export$4d0f8be8b12a7ef6(doc, root2 || doc, NodeFilter.SHOW_ELEMENT, {
- acceptNode(node2) {
- var _opts_from;
- return !(opts == null || (_opts_from = opts.from) === null || _opts_from === void 0) && _opts_from.contains(node2) || opts?.tabbable && node2.tagName === "INPUT" && node2.getAttribute("type") === "radio" && (!$9bf71ea28793e738$var$isTabbableRadio(node2) || walker.currentNode.tagName === "INPUT" && walker.currentNode.type === "radio" && walker.currentNode.name === node2.name) ? NodeFilter.FILTER_REJECT : filter(node2) && (!scope2 || $9bf71ea28793e738$var$isElementInScope(node2, scope2)) && (!opts?.accept || opts.accept(node2)) ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
- }
- });
- return opts?.from && (walker.currentNode = opts.from), walker;
- }
- function $9bf71ea28793e738$export$c5251b9e124bf29(ref, defaultOptions2 = {}) {
- return {
- focusNext(opts = {}) {
- let root2 = ref.current;
- if (!root2) return null;
- let { from: from2, tabbable = defaultOptions2.tabbable, wrap: wrap2 = defaultOptions2.wrap, accept = defaultOptions2.accept } = opts, node2 = from2 || $d4ee10de306f2510$export$cd4e5573fbe2b576($431fbd86ca7dc216$export$b204af158042fbac(root2)), walker = $9bf71ea28793e738$export$2d6ec8fc375ceafa(root2, {
- tabbable,
- accept
- });
- root2.contains(node2) && (walker.currentNode = node2);
- let nextNode = walker.nextNode();
- return !nextNode && wrap2 && (walker.currentNode = root2, nextNode = walker.nextNode()), nextNode && $9bf71ea28793e738$var$focusElement(nextNode, !0), nextNode;
- },
- focusPrevious(opts = defaultOptions2) {
- let root2 = ref.current;
- if (!root2) return null;
- let { from: from2, tabbable = defaultOptions2.tabbable, wrap: wrap2 = defaultOptions2.wrap, accept = defaultOptions2.accept } = opts, node2 = from2 || $d4ee10de306f2510$export$cd4e5573fbe2b576($431fbd86ca7dc216$export$b204af158042fbac(root2)), walker = $9bf71ea28793e738$export$2d6ec8fc375ceafa(root2, {
- tabbable,
- accept
- });
- if (root2.contains(node2)) walker.currentNode = node2;
- else {
- let next2 = $9bf71ea28793e738$var$last(walker);
- return next2 && $9bf71ea28793e738$var$focusElement(next2, !0), next2 ?? null;
- }
- let previousNode = walker.previousNode();
- if (!previousNode && wrap2) {
- walker.currentNode = root2;
- let lastNode = $9bf71ea28793e738$var$last(walker);
- if (!lastNode)
- return null;
- previousNode = lastNode;
- }
- return previousNode && $9bf71ea28793e738$var$focusElement(previousNode, !0), previousNode ?? null;
- },
- focusFirst(opts = defaultOptions2) {
- let root2 = ref.current;
- if (!root2) return null;
- let { tabbable = defaultOptions2.tabbable, accept = defaultOptions2.accept } = opts, nextNode = $9bf71ea28793e738$export$2d6ec8fc375ceafa(root2, {
- tabbable,
- accept
- }).nextNode();
- return nextNode && $9bf71ea28793e738$var$focusElement(nextNode, !0), nextNode;
- },
- focusLast(opts = defaultOptions2) {
- let root2 = ref.current;
- if (!root2) return null;
- let { tabbable = defaultOptions2.tabbable, accept = defaultOptions2.accept } = opts, walker = $9bf71ea28793e738$export$2d6ec8fc375ceafa(root2, {
- tabbable,
- accept
- }), next2 = $9bf71ea28793e738$var$last(walker);
- return next2 && $9bf71ea28793e738$var$focusElement(next2, !0), next2 ?? null;
- }
- };
- }
- function $9bf71ea28793e738$var$last(walker) {
- let next2, last2;
- do
- last2 = walker.lastChild(), last2 && (next2 = last2);
- while (last2);
- return next2;
- }
- var $9bf71ea28793e738$var$Tree = class _$9bf71ea28793e738$var$Tree {
- get size() {
- return this.fastMap.size;
- }
- getTreeNode(data) {
- return this.fastMap.get(data);
- }
- addTreeNode(scopeRef, parent, nodeToRestore) {
- let parentNode = this.fastMap.get(parent ?? null);
- if (!parentNode) return;
- let node2 = new $9bf71ea28793e738$var$TreeNode({
- scopeRef
- });
- parentNode.addChild(node2), node2.parent = parentNode, this.fastMap.set(scopeRef, node2), nodeToRestore && (node2.nodeToRestore = nodeToRestore);
- }
- addNode(node2) {
- this.fastMap.set(node2.scopeRef, node2);
- }
- removeTreeNode(scopeRef) {
- if (scopeRef === null) return;
- let node2 = this.fastMap.get(scopeRef);
- if (!node2) return;
- let parentNode = node2.parent;
- for (let current of this.traverse()) current !== node2 && node2.nodeToRestore && current.nodeToRestore && node2.scopeRef && node2.scopeRef.current && $9bf71ea28793e738$var$isElementInScope(current.nodeToRestore, node2.scopeRef.current) && (current.nodeToRestore = node2.nodeToRestore);
- let children = node2.children;
- parentNode && (parentNode.removeChild(node2), children.size > 0 && children.forEach((child) => parentNode && parentNode.addChild(child))), this.fastMap.delete(node2.scopeRef);
- }
- // Pre Order Depth First
- *traverse(node2 = this.root) {
- if (node2.scopeRef != null && (yield node2), node2.children.size > 0) for (let child of node2.children) yield* this.traverse(child);
- }
- clone() {
- var _node_parent;
- let newTree = new _$9bf71ea28793e738$var$Tree();
- var _node_parent_scopeRef;
- for (let node2 of this.traverse()) newTree.addTreeNode(node2.scopeRef, (_node_parent_scopeRef = (_node_parent = node2.parent) === null || _node_parent === void 0 ? void 0 : _node_parent.scopeRef) !== null && _node_parent_scopeRef !== void 0 ? _node_parent_scopeRef : null, node2.nodeToRestore);
- return newTree;
- }
- constructor() {
- this.fastMap = /* @__PURE__ */ new Map(), this.root = new $9bf71ea28793e738$var$TreeNode({
- scopeRef: null
- }), this.fastMap.set(null, this.root);
- }
- }, $9bf71ea28793e738$var$TreeNode = class {
- addChild(node2) {
- this.children.add(node2), node2.parent = this;
- }
- removeChild(node2) {
- this.children.delete(node2), node2.parent = void 0;
- }
- constructor(props) {
- this.children = /* @__PURE__ */ new Set(), this.contain = !1, this.scopeRef = props.scopeRef;
- }
- }, $9bf71ea28793e738$export$d06fae2ee68b101e = new $9bf71ea28793e738$var$Tree();
-
- // ../../node_modules/@react-aria/focus/dist/useFocusRing.mjs
- var import_react75 = __toESM(require_react(), 1);
- function $f7dceffc5ad7768b$export$4e328f61c538687f(props = {}) {
- let { autoFocus = !1, isTextInput, within: within3 } = props, state3 = (0, import_react75.useRef)({
- isFocused: !1,
- isFocusVisible: autoFocus || $507fabe10e71c6fb$export$b9b3dfddab17db27()
- }), [isFocused, setFocused] = (0, import_react75.useState)(!1), [isFocusVisibleState, setFocusVisible] = (0, import_react75.useState)(() => state3.current.isFocused && state3.current.isFocusVisible), updateState2 = (0, import_react75.useCallback)(() => setFocusVisible(state3.current.isFocused && state3.current.isFocusVisible), []), onFocusChange = (0, import_react75.useCallback)((isFocused2) => {
- state3.current.isFocused = isFocused2, setFocused(isFocused2), updateState2();
- }, [
- updateState2
- ]);
- $507fabe10e71c6fb$export$ec71b4b83ac08ec3((isFocusVisible) => {
- state3.current.isFocusVisible = isFocusVisible, updateState2();
- }, [], {
- isTextInput
- });
- let { focusProps } = $a1ea59d68270f0dd$export$f8168d8dd8fd66e6({
- isDisabled: within3,
- onFocusChange
- }), { focusWithinProps } = $9ab94262bd0047c7$export$420e68273165f4ec({
- isDisabled: !within3,
- onFocusWithinChange: onFocusChange
- });
- return {
- isFocused,
- isFocusVisible: isFocusVisibleState,
- focusProps: within3 ? focusWithinProps : focusProps
- };
- }
-
- // ../../node_modules/@react-aria/focus/dist/FocusRing.mjs
- var import_react76 = __toESM(require_react(), 1);
-
- // ../../node_modules/@react-aria/focus/dist/useHasTabbableChild.mjs
- var import_react77 = __toESM(require_react(), 1);
- function $83013635b024ae3d$export$eac1895992b9f3d6(ref, options) {
- let isDisabled3 = options?.isDisabled, [hasTabbableChild, setHasTabbableChild] = (0, import_react77.useState)(!1);
- return $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
- if (ref?.current && !isDisabled3) {
- let update2 = () => {
- if (ref.current) {
- let walker = $9bf71ea28793e738$export$2d6ec8fc375ceafa(ref.current, {
- tabbable: !0
- });
- setHasTabbableChild(!!walker.nextNode());
- }
- };
- update2();
- let observer = new MutationObserver(update2);
- return observer.observe(ref.current, {
- subtree: !0,
- childList: !0,
- attributes: !0,
- attributeFilter: [
- "tabIndex",
- "disabled"
- ]
- }), () => {
- observer.disconnect();
- };
- }
- }), isDisabled3 ? !1 : hasTabbableChild;
- }
-
- // ../../node_modules/@react-aria/focus/dist/virtualFocus.mjs
- function $55f9b1ae81f22853$export$76e4e37e5339496d(to) {
- let from2 = $55f9b1ae81f22853$export$759df0d867455a91($431fbd86ca7dc216$export$b204af158042fbac(to));
- from2 !== to && (from2 && $55f9b1ae81f22853$export$6c5dc7e81d2cc29a(from2, to), to && $55f9b1ae81f22853$export$2b35b76d2e30e129(to, from2));
- }
- function $55f9b1ae81f22853$export$6c5dc7e81d2cc29a(from2, to) {
- from2.dispatchEvent(new FocusEvent("blur", {
- relatedTarget: to
- })), from2.dispatchEvent(new FocusEvent("focusout", {
- bubbles: !0,
- relatedTarget: to
- }));
- }
- function $55f9b1ae81f22853$export$2b35b76d2e30e129(to, from2) {
- to.dispatchEvent(new FocusEvent("focus", {
- relatedTarget: from2
- })), to.dispatchEvent(new FocusEvent("focusin", {
- bubbles: !0,
- relatedTarget: from2
- }));
- }
- function $55f9b1ae81f22853$export$759df0d867455a91(document13) {
- let activeElement = $d4ee10de306f2510$export$cd4e5573fbe2b576(document13), activeDescendant = activeElement?.getAttribute("aria-activedescendant");
- return activeDescendant && document13.getElementById(activeDescendant) || activeElement;
- }
-
- // ../../node_modules/@react-aria/overlays/dist/useOverlay.mjs
- var import_react78 = __toESM(require_react(), 1);
- var $a11501f3d1d39e6c$var$visibleOverlays = [];
- function $a11501f3d1d39e6c$export$ea8f71083e90600f(props, ref) {
- let { onClose, shouldCloseOnBlur, isOpen, isDismissable = !1, isKeyboardDismissDisabled = !1, shouldCloseOnInteractOutside } = props;
- (0, import_react78.useEffect)(() => {
- if (isOpen && !$a11501f3d1d39e6c$var$visibleOverlays.includes(ref))
- return $a11501f3d1d39e6c$var$visibleOverlays.push(ref), () => {
- let index4 = $a11501f3d1d39e6c$var$visibleOverlays.indexOf(ref);
- index4 >= 0 && $a11501f3d1d39e6c$var$visibleOverlays.splice(index4, 1);
- };
- }, [
- isOpen,
- ref
- ]);
- let onHide = () => {
- $a11501f3d1d39e6c$var$visibleOverlays[$a11501f3d1d39e6c$var$visibleOverlays.length - 1] === ref && onClose && onClose();
- }, onInteractOutsideStart = (e) => {
- (!shouldCloseOnInteractOutside || shouldCloseOnInteractOutside(e.target)) && $a11501f3d1d39e6c$var$visibleOverlays[$a11501f3d1d39e6c$var$visibleOverlays.length - 1] === ref && (e.stopPropagation(), e.preventDefault());
- }, onInteractOutside = (e) => {
- (!shouldCloseOnInteractOutside || shouldCloseOnInteractOutside(e.target)) && ($a11501f3d1d39e6c$var$visibleOverlays[$a11501f3d1d39e6c$var$visibleOverlays.length - 1] === ref && (e.stopPropagation(), e.preventDefault()), onHide());
- }, onKeyDown = (e) => {
- e.key === "Escape" && !isKeyboardDismissDisabled && !e.nativeEvent.isComposing && (e.stopPropagation(), e.preventDefault(), onHide());
- };
- $e0b6e0b68ec7f50f$export$872b660ac5a1ff98({
- ref,
- onInteractOutside: isDismissable && isOpen ? onInteractOutside : void 0,
- onInteractOutsideStart
- });
- let { focusWithinProps } = $9ab94262bd0047c7$export$420e68273165f4ec({
- isDisabled: !shouldCloseOnBlur,
- onBlurWithin: (e) => {
- !e.relatedTarget || $9bf71ea28793e738$export$1258395f99bf9cbf(e.relatedTarget) || (!shouldCloseOnInteractOutside || shouldCloseOnInteractOutside(e.relatedTarget)) && onClose?.();
- }
- }), onPointerDownUnderlay = (e) => {
- e.target === e.currentTarget && e.preventDefault();
- };
- return {
- overlayProps: {
- onKeyDown,
- ...focusWithinProps
- },
- underlayProps: {
- onPointerDown: onPointerDownUnderlay
- }
- };
- }
-
- // ../../node_modules/@react-aria/overlays/dist/useOverlayTrigger.mjs
- var import_react79 = __toESM(require_react(), 1);
- function $628037886ba31236$export$f9d5c8beee7d008d(props, state3, ref) {
- let { type: type5 } = props, { isOpen } = state3;
- (0, import_react79.useEffect)(() => {
- ref && ref.current && $dd149f63282afbbf$export$f6211563215e3b37.set(ref.current, state3.close);
- });
- let ariaHasPopup;
- type5 === "menu" ? ariaHasPopup = !0 : type5 === "listbox" && (ariaHasPopup = "listbox");
- let overlayId = $bdb11010cef70236$export$f680877a34711e37();
- return {
- triggerProps: {
- "aria-haspopup": ariaHasPopup,
- "aria-expanded": isOpen,
- "aria-controls": isOpen ? overlayId : void 0,
- onPress: state3.toggle
- },
- overlayProps: {
- id: overlayId
- }
- };
- }
-
- // ../../node_modules/@react-aria/overlays/dist/usePreventScroll.mjs
- var $49c51c25361d4cd2$var$visualViewport = typeof document < "u" && window.visualViewport, $49c51c25361d4cd2$var$preventScrollCount = 0, $49c51c25361d4cd2$var$restore;
- function $49c51c25361d4cd2$export$ee0f7cc6afcd1c18(options = {}) {
- let { isDisabled: isDisabled3 } = options;
- $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
- if (!isDisabled3)
- return $49c51c25361d4cd2$var$preventScrollCount++, $49c51c25361d4cd2$var$preventScrollCount === 1 && ($c87311424ea30a05$export$fedb369cb70207f1() ? $49c51c25361d4cd2$var$restore = $49c51c25361d4cd2$var$preventScrollMobileSafari() : $49c51c25361d4cd2$var$restore = $49c51c25361d4cd2$var$preventScrollStandard()), () => {
- $49c51c25361d4cd2$var$preventScrollCount--, $49c51c25361d4cd2$var$preventScrollCount === 0 && $49c51c25361d4cd2$var$restore();
- };
- }, [
- isDisabled3
- ]);
- }
- function $49c51c25361d4cd2$var$preventScrollStandard() {
- let scrollbarWidth = window.innerWidth - document.documentElement.clientWidth;
- return $ff5963eb1fccf552$export$e08e3b67e392101e(scrollbarWidth > 0 && // Use scrollbar-gutter when supported because it also works for fixed positioned elements.
- ("scrollbarGutter" in document.documentElement.style ? $49c51c25361d4cd2$var$setStyle(document.documentElement, "scrollbarGutter", "stable") : $49c51c25361d4cd2$var$setStyle(document.documentElement, "paddingRight", `${scrollbarWidth}px`)), $49c51c25361d4cd2$var$setStyle(document.documentElement, "overflow", "hidden"));
- }
- function $49c51c25361d4cd2$var$preventScrollMobileSafari() {
- let scrollable, allowTouchMove = !1, onTouchStart = (e) => {
- let target = e.target;
- scrollable = $cc38e7bd3fc7b213$export$2bb74740c4e19def(target) ? target : $62d8ded9296f3872$export$cfa2225e87938781(target, !0), allowTouchMove = !1;
- let selection = target.ownerDocument.defaultView.getSelection();
- selection && !selection.isCollapsed && selection.containsNode(target, !0) && (allowTouchMove = !0), "selectionStart" in target && "selectionEnd" in target && target.selectionStart < target.selectionEnd && target.ownerDocument.activeElement === target && (allowTouchMove = !0);
- }, style = document.createElement("style");
- style.textContent = `
- @layer {
- * {
- overscroll-behavior: contain;
- }
- }`.trim(), document.head.prepend(style);
- let onTouchMove = (e) => {
- if (!(e.touches.length === 2 || allowTouchMove)) {
- if (!scrollable || scrollable === document.documentElement || scrollable === document.body) {
- e.preventDefault();
- return;
- }
- scrollable.scrollHeight === scrollable.clientHeight && scrollable.scrollWidth === scrollable.clientWidth && e.preventDefault();
- }
- }, onBlur = (e) => {
- let target = e.target, relatedTarget = e.relatedTarget;
- if (relatedTarget && $21f1aa98acb08317$export$c57958e35f31ed73(relatedTarget))
- relatedTarget.focus({
- preventScroll: !0
- }), $49c51c25361d4cd2$var$scrollIntoViewWhenReady(relatedTarget, $21f1aa98acb08317$export$c57958e35f31ed73(target));
- else if (!relatedTarget) {
- var _target_parentElement;
- let focusable = (_target_parentElement = target.parentElement) === null || _target_parentElement === void 0 ? void 0 : _target_parentElement.closest("[tabindex]");
- focusable?.focus({
- preventScroll: !0
- });
- }
- }, focus = HTMLElement.prototype.focus;
- HTMLElement.prototype.focus = function(opts) {
- let wasKeyboardVisible = document.activeElement != null && $21f1aa98acb08317$export$c57958e35f31ed73(document.activeElement);
- focus.call(this, {
- ...opts,
- preventScroll: !0
- }), (!opts || !opts.preventScroll) && $49c51c25361d4cd2$var$scrollIntoViewWhenReady(this, wasKeyboardVisible);
- };
- let removeEvents = $ff5963eb1fccf552$export$e08e3b67e392101e($49c51c25361d4cd2$var$addEvent(document, "touchstart", onTouchStart, {
- passive: !1,
- capture: !0
- }), $49c51c25361d4cd2$var$addEvent(document, "touchmove", onTouchMove, {
- passive: !1,
- capture: !0
- }), $49c51c25361d4cd2$var$addEvent(document, "blur", onBlur, !0));
- return () => {
- removeEvents(), style.remove(), HTMLElement.prototype.focus = focus;
- };
- }
- function $49c51c25361d4cd2$var$setStyle(element, style, value) {
- let cur = element.style[style];
- return element.style[style] = value, () => {
- element.style[style] = cur;
- };
- }
- function $49c51c25361d4cd2$var$addEvent(target, event, handler, options) {
- return target.addEventListener(event, handler, options), () => {
- target.removeEventListener(event, handler, options);
- };
- }
- function $49c51c25361d4cd2$var$scrollIntoViewWhenReady(target, wasKeyboardVisible) {
- wasKeyboardVisible || !$49c51c25361d4cd2$var$visualViewport ? $49c51c25361d4cd2$var$scrollIntoView(target) : $49c51c25361d4cd2$var$visualViewport.addEventListener("resize", () => $49c51c25361d4cd2$var$scrollIntoView(target), {
- once: !0
- });
- }
- function $49c51c25361d4cd2$var$scrollIntoView(target) {
- let root2 = document.scrollingElement || document.documentElement, nextTarget = target;
- for (; nextTarget && nextTarget !== root2; ) {
- let scrollable = $62d8ded9296f3872$export$cfa2225e87938781(nextTarget);
- if (scrollable !== document.documentElement && scrollable !== document.body && scrollable !== nextTarget) {
- let scrollableRect = scrollable.getBoundingClientRect(), targetRect = nextTarget.getBoundingClientRect();
- if (targetRect.top < scrollableRect.top || targetRect.bottom > scrollableRect.top + nextTarget.clientHeight) {
- let bottom2 = scrollableRect.bottom;
- $49c51c25361d4cd2$var$visualViewport && (bottom2 = Math.min(bottom2, $49c51c25361d4cd2$var$visualViewport.offsetTop + $49c51c25361d4cd2$var$visualViewport.height));
- let adjustment = targetRect.top - scrollableRect.top - ((bottom2 - scrollableRect.top) / 2 - targetRect.height / 2);
- scrollable.scrollTo({
- // Clamp to the valid range to prevent over-scrolling.
- top: Math.max(0, Math.min(scrollable.scrollHeight - scrollable.clientHeight, scrollable.scrollTop + adjustment)),
- behavior: "smooth"
- });
- }
- }
- nextTarget = scrollable.parentElement;
- }
- }
-
- // ../../node_modules/@react-aria/overlays/dist/PortalProvider.mjs
- var import_react80 = __toESM(require_react(), 1), $96b38030c423d352$export$60d741e20e0aa309 = (0, import_react80.createContext)({});
- function $96b38030c423d352$export$78efe591171d7d45(props) {
- let { getContainer } = props, { getContainer: ctxGetContainer } = $96b38030c423d352$export$9fc1347d4195ccb3();
- return import_react80.default.createElement($96b38030c423d352$export$60d741e20e0aa309.Provider, {
- value: {
- getContainer: getContainer === null ? void 0 : getContainer ?? ctxGetContainer
- }
- }, props.children);
- }
- function $96b38030c423d352$export$9fc1347d4195ccb3() {
- var _useContext;
- return (_useContext = (0, import_react80.useContext)($96b38030c423d352$export$60d741e20e0aa309)) !== null && _useContext !== void 0 ? _useContext : {};
- }
-
- // ../../node_modules/@react-aria/overlays/dist/useModal.mjs
- var import_react81 = __toESM(require_react(), 1), import_react_dom3 = __toESM(require_react_dom(), 1);
- var $f57aed4a881a3485$var$Context = import_react81.default.createContext(null);
- function $f57aed4a881a3485$export$178405afcd8c5eb(props) {
- let { children } = props, parent = (0, import_react81.useContext)($f57aed4a881a3485$var$Context), [modalCount, setModalCount] = (0, import_react81.useState)(0), context = (0, import_react81.useMemo)(() => ({
- parent,
- modalCount,
- addModal() {
- setModalCount((count) => count + 1), parent && parent.addModal();
- },
- removeModal() {
- setModalCount((count) => count - 1), parent && parent.removeModal();
- }
- }), [
- parent,
- modalCount
- ]);
- return import_react81.default.createElement($f57aed4a881a3485$var$Context.Provider, {
- value: context
- }, children);
- }
- function $f57aed4a881a3485$export$d9aaed4c3ece1bc0() {
- let context = (0, import_react81.useContext)($f57aed4a881a3485$var$Context);
- return {
- modalProviderProps: {
- "aria-hidden": context && context.modalCount > 0 ? !0 : void 0
- }
- };
- }
- function $f57aed4a881a3485$var$OverlayContainerDOM(props) {
- let { modalProviderProps } = $f57aed4a881a3485$export$d9aaed4c3ece1bc0();
- return import_react81.default.createElement("div", {
- "data-overlay-container": !0,
- ...props,
- ...modalProviderProps
- });
- }
- function $f57aed4a881a3485$export$bf688221f59024e5(props) {
- return import_react81.default.createElement($f57aed4a881a3485$export$178405afcd8c5eb, null, import_react81.default.createElement($f57aed4a881a3485$var$OverlayContainerDOM, props));
- }
- function $f57aed4a881a3485$export$b47c3594eab58386(props) {
- let isSSR = $b5e257d569688ac6$export$535bd6ca7f90a273(), { portalContainer = isSSR ? null : document.body, ...rest } = props, { getContainer } = $96b38030c423d352$export$9fc1347d4195ccb3();
- if (!props.portalContainer && getContainer && (portalContainer = getContainer()), import_react81.default.useEffect(() => {
- if (portalContainer?.closest("[data-overlay-container]")) throw new Error("An OverlayContainer must not be inside another container. Please change the portalContainer prop.");
- }, [
- portalContainer
- ]), !portalContainer) return null;
- let contents = import_react81.default.createElement($f57aed4a881a3485$export$bf688221f59024e5, rest);
- return import_react_dom3.default.createPortal(contents, portalContainer);
- }
-
- // ../../node_modules/@react-aria/overlays/dist/ar-AE.mjs
- var $773d5888b972f1cf$exports = {};
- $773d5888b972f1cf$exports = {
- dismiss: "\u062A\u062C\u0627\u0647\u0644"
- };
-
- // ../../node_modules/@react-aria/overlays/dist/bg-BG.mjs
- var $d11f19852b941573$exports = {};
- $d11f19852b941573$exports = {
- dismiss: "\u041E\u0442\u0445\u0432\u044A\u0440\u043B\u044F\u043D\u0435"
- };
-
- // ../../node_modules/@react-aria/overlays/dist/cs-CZ.mjs
- var $b983974c2ee1efb3$exports = {};
- $b983974c2ee1efb3$exports = {
- dismiss: "Odstranit"
- };
-
- // ../../node_modules/@react-aria/overlays/dist/da-DK.mjs
- var $5809cc9d4e92de73$exports = {};
- $5809cc9d4e92de73$exports = {
- dismiss: "Luk"
- };
-
- // ../../node_modules/@react-aria/overlays/dist/de-DE.mjs
- var $c68c2e4fc74398d1$exports = {};
- $c68c2e4fc74398d1$exports = {
- dismiss: "Schlie\xDFen"
- };
-
- // ../../node_modules/@react-aria/overlays/dist/el-GR.mjs
- var $0898b4c153db2b77$exports = {};
- $0898b4c153db2b77$exports = {
- dismiss: "\u0391\u03C0\u03CC\u03C1\u03C1\u03B9\u03C8\u03B7"
- };
-
- // ../../node_modules/@react-aria/overlays/dist/en-US.mjs
- var $6d74810286a15183$exports = {};
- $6d74810286a15183$exports = {
- dismiss: "Dismiss"
- };
-
- // ../../node_modules/@react-aria/overlays/dist/es-ES.mjs
- var $309d73dc65f78055$exports = {};
- $309d73dc65f78055$exports = {
- dismiss: "Descartar"
- };
-
- // ../../node_modules/@react-aria/overlays/dist/et-EE.mjs
- var $44ad94f7205cf593$exports = {};
- $44ad94f7205cf593$exports = {
- dismiss: "L\xF5peta"
- };
-
- // ../../node_modules/@react-aria/overlays/dist/fi-FI.mjs
- var $7c28f5687f0779a9$exports = {};
- $7c28f5687f0779a9$exports = {
- dismiss: "Hylk\xE4\xE4"
- };
-
- // ../../node_modules/@react-aria/overlays/dist/fr-FR.mjs
- var $e6d75df4b68bd73a$exports = {};
- $e6d75df4b68bd73a$exports = {
- dismiss: "Rejeter"
- };
-
- // ../../node_modules/@react-aria/overlays/dist/he-IL.mjs
- var $87505c9dab186d0f$exports = {};
- $87505c9dab186d0f$exports = {
- dismiss: "\u05D4\u05EA\u05E2\u05DC\u05DD"
- };
-
- // ../../node_modules/@react-aria/overlays/dist/hr-HR.mjs
- var $553439c3ffb3e492$exports = {};
- $553439c3ffb3e492$exports = {
- dismiss: "Odbaci"
- };
-
- // ../../node_modules/@react-aria/overlays/dist/hu-HU.mjs
- var $74cf411061b983a2$exports = {};
- $74cf411061b983a2$exports = {
- dismiss: "Elutas\xEDt\xE1s"
- };
-
- // ../../node_modules/@react-aria/overlays/dist/it-IT.mjs
- var $e933f298574dc435$exports = {};
- $e933f298574dc435$exports = {
- dismiss: "Ignora"
- };
-
- // ../../node_modules/@react-aria/overlays/dist/ja-JP.mjs
- var $ac91fc9fe02f71f6$exports = {};
- $ac91fc9fe02f71f6$exports = {
- dismiss: "\u9589\u3058\u308B"
- };
-
- // ../../node_modules/@react-aria/overlays/dist/ko-KR.mjs
- var $52b96f86422025af$exports = {};
- $52b96f86422025af$exports = {
- dismiss: "\uBB34\uC2DC"
- };
-
- // ../../node_modules/@react-aria/overlays/dist/lt-LT.mjs
- var $c0d724c3e51dafa6$exports = {};
- $c0d724c3e51dafa6$exports = {
- dismiss: "Atmesti"
- };
-
- // ../../node_modules/@react-aria/overlays/dist/lv-LV.mjs
- var $c92899672a3fe72e$exports = {};
- $c92899672a3fe72e$exports = {
- dismiss: "Ner\u0101d\u012Bt"
- };
-
- // ../../node_modules/@react-aria/overlays/dist/nb-NO.mjs
- var $9f576b39d8e7a9d6$exports = {};
- $9f576b39d8e7a9d6$exports = {
- dismiss: "Lukk"
- };
-
- // ../../node_modules/@react-aria/overlays/dist/nl-NL.mjs
- var $9d025808aeec81a7$exports = {};
- $9d025808aeec81a7$exports = {
- dismiss: "Negeren"
- };
-
- // ../../node_modules/@react-aria/overlays/dist/pl-PL.mjs
- var $fce709921e2c0fa6$exports = {};
- $fce709921e2c0fa6$exports = {
- dismiss: "Zignoruj"
- };
-
- // ../../node_modules/@react-aria/overlays/dist/pt-BR.mjs
- var $2599cf0c4ab37f59$exports = {};
- $2599cf0c4ab37f59$exports = {
- dismiss: "Descartar"
- };
-
- // ../../node_modules/@react-aria/overlays/dist/pt-PT.mjs
- var $3c220ae7ef8a35fd$exports = {};
- $3c220ae7ef8a35fd$exports = {
- dismiss: "Dispensar"
- };
-
- // ../../node_modules/@react-aria/overlays/dist/ro-RO.mjs
- var $93562b5094072f54$exports = {};
- $93562b5094072f54$exports = {
- dismiss: "Revocare"
- };
-
- // ../../node_modules/@react-aria/overlays/dist/ru-RU.mjs
- var $cd9e2abd0d06c7b4$exports = {};
- $cd9e2abd0d06c7b4$exports = {
- dismiss: "\u041F\u0440\u043E\u043F\u0443\u0441\u0442\u0438\u0442\u044C"
- };
-
- // ../../node_modules/@react-aria/overlays/dist/sk-SK.mjs
- var $45375701f409adf1$exports = {};
- $45375701f409adf1$exports = {
- dismiss: "Zru\u0161i\u0165"
- };
-
- // ../../node_modules/@react-aria/overlays/dist/sl-SI.mjs
- var $27fab53a576de9dd$exports = {};
- $27fab53a576de9dd$exports = {
- dismiss: "Opusti"
- };
-
- // ../../node_modules/@react-aria/overlays/dist/sr-SP.mjs
- var $4438748d9952e7c7$exports = {};
- $4438748d9952e7c7$exports = {
- dismiss: "Odbaci"
- };
-
- // ../../node_modules/@react-aria/overlays/dist/sv-SE.mjs
- var $0936d7347ef4da4c$exports = {};
- $0936d7347ef4da4c$exports = {
- dismiss: "Avvisa"
- };
-
- // ../../node_modules/@react-aria/overlays/dist/tr-TR.mjs
- var $29700c92185d38f8$exports = {};
- $29700c92185d38f8$exports = {
- dismiss: "Kapat"
- };
-
- // ../../node_modules/@react-aria/overlays/dist/uk-UA.mjs
- var $662ccaf2be4c25b3$exports = {};
- $662ccaf2be4c25b3$exports = {
- dismiss: "\u0421\u043A\u0430\u0441\u0443\u0432\u0430\u0442\u0438"
- };
-
- // ../../node_modules/@react-aria/overlays/dist/zh-CN.mjs
- var $d80a27deda7cdb3c$exports = {};
- $d80a27deda7cdb3c$exports = {
- dismiss: "\u53D6\u6D88"
- };
-
- // ../../node_modules/@react-aria/overlays/dist/zh-TW.mjs
- var $2b2734393847c884$exports = {};
- $2b2734393847c884$exports = {
- dismiss: "\u95DC\u9589"
- };
-
- // ../../node_modules/@react-aria/overlays/dist/intlStrings.mjs
- var $a2f21f5f14f60553$exports = {};
- $a2f21f5f14f60553$exports = {
- "ar-AE": $773d5888b972f1cf$exports,
- "bg-BG": $d11f19852b941573$exports,
- "cs-CZ": $b983974c2ee1efb3$exports,
- "da-DK": $5809cc9d4e92de73$exports,
- "de-DE": $c68c2e4fc74398d1$exports,
- "el-GR": $0898b4c153db2b77$exports,
- "en-US": $6d74810286a15183$exports,
- "es-ES": $309d73dc65f78055$exports,
- "et-EE": $44ad94f7205cf593$exports,
- "fi-FI": $7c28f5687f0779a9$exports,
- "fr-FR": $e6d75df4b68bd73a$exports,
- "he-IL": $87505c9dab186d0f$exports,
- "hr-HR": $553439c3ffb3e492$exports,
- "hu-HU": $74cf411061b983a2$exports,
- "it-IT": $e933f298574dc435$exports,
- "ja-JP": $ac91fc9fe02f71f6$exports,
- "ko-KR": $52b96f86422025af$exports,
- "lt-LT": $c0d724c3e51dafa6$exports,
- "lv-LV": $c92899672a3fe72e$exports,
- "nb-NO": $9f576b39d8e7a9d6$exports,
- "nl-NL": $9d025808aeec81a7$exports,
- "pl-PL": $fce709921e2c0fa6$exports,
- "pt-BR": $2599cf0c4ab37f59$exports,
- "pt-PT": $3c220ae7ef8a35fd$exports,
- "ro-RO": $93562b5094072f54$exports,
- "ru-RU": $cd9e2abd0d06c7b4$exports,
- "sk-SK": $45375701f409adf1$exports,
- "sl-SI": $27fab53a576de9dd$exports,
- "sr-SP": $4438748d9952e7c7$exports,
- "sv-SE": $0936d7347ef4da4c$exports,
- "tr-TR": $29700c92185d38f8$exports,
- "uk-UA": $662ccaf2be4c25b3$exports,
- "zh-CN": $d80a27deda7cdb3c$exports,
- "zh-TW": $2b2734393847c884$exports
- };
-
- // ../../node_modules/@react-aria/overlays/dist/DismissButton.mjs
- var import_react83 = __toESM(require_react(), 1);
-
- // ../../node_modules/@react-aria/visually-hidden/dist/VisuallyHidden.mjs
- var import_react82 = __toESM(require_react(), 1);
- var $5c3e21d68f1c4674$var$styles = {
- border: 0,
- clip: "rect(0 0 0 0)",
- clipPath: "inset(50%)",
- height: "1px",
- margin: "-1px",
- overflow: "hidden",
- padding: 0,
- position: "absolute",
- width: "1px",
- whiteSpace: "nowrap"
- };
- function $5c3e21d68f1c4674$export$a966af930f325cab(props = {}) {
- let { style, isFocusable: isFocusable2 } = props, [isFocused, setFocused] = (0, import_react82.useState)(!1), { focusWithinProps } = $9ab94262bd0047c7$export$420e68273165f4ec({
- isDisabled: !isFocusable2,
- onFocusWithinChange: (val) => setFocused(val)
- }), combinedStyles = (0, import_react82.useMemo)(() => isFocused ? style : style ? {
- ...$5c3e21d68f1c4674$var$styles,
- ...style
- } : $5c3e21d68f1c4674$var$styles, [
- isFocused
- ]);
- return {
- visuallyHiddenProps: {
- ...focusWithinProps,
- style: combinedStyles
- }
- };
- }
- function $5c3e21d68f1c4674$export$439d29a4e110a164(props) {
- let { children, elementType: Element2 = "div", isFocusable: isFocusable2, style, ...otherProps } = props, { visuallyHiddenProps } = $5c3e21d68f1c4674$export$a966af930f325cab(props);
- return import_react82.default.createElement(Element2, $3ef42575df84b30b$export$9d1611c77c2fe928(otherProps, visuallyHiddenProps), children);
- }
-
- // ../../node_modules/@react-aria/overlays/dist/DismissButton.mjs
- function $parcel$interopDefault(a3) {
- return a3 && a3.__esModule ? a3.default : a3;
- }
- function $86ea4cb521eb2e37$export$2317d149ed6f78c4(props) {
- let { onDismiss, ...otherProps } = props, stringFormatter = $fca6afa0e843324b$export$f12b703ca79dfbb1($parcel$interopDefault($a2f21f5f14f60553$exports), "@react-aria/overlays"), labels = $313b98861ee5dd6c$export$d6875122194c7b44(otherProps, stringFormatter.format("dismiss")), onClick = () => {
- onDismiss && onDismiss();
- };
- return import_react83.default.createElement($5c3e21d68f1c4674$export$439d29a4e110a164, null, import_react83.default.createElement("button", {
- ...labels,
- tabIndex: -1,
- onClick,
- style: {
- width: 1,
- height: 1
- }
- }));
- }
-
- // ../../node_modules/@react-aria/overlays/dist/ariaHideOutside.mjs
- var $5e3802645cc19319$var$supportsInert = typeof HTMLElement < "u" && "inert" in HTMLElement.prototype, $5e3802645cc19319$var$refCountMap = /* @__PURE__ */ new WeakMap(), $5e3802645cc19319$var$observerStack = [];
- function $5e3802645cc19319$export$1c3ebcada18427bf(targets, options) {
- let windowObj = $431fbd86ca7dc216$export$f21a1ffae260145a(targets?.[0]), opts = options instanceof windowObj.Element ? {
- root: options
- } : options;
- var _opts_root;
- let root2 = (_opts_root = opts?.root) !== null && _opts_root !== void 0 ? _opts_root : document.body, shouldUseInert = opts?.shouldUseInert && $5e3802645cc19319$var$supportsInert, visibleNodes = new Set(targets), hiddenNodes = /* @__PURE__ */ new Set(), getHidden = (element) => shouldUseInert && element instanceof windowObj.HTMLElement ? element.inert : element.getAttribute("aria-hidden") === "true", setHidden = (element, hidden) => {
- shouldUseInert && element instanceof windowObj.HTMLElement ? element.inert = hidden : hidden ? element.setAttribute("aria-hidden", "true") : (element.removeAttribute("aria-hidden"), element instanceof windowObj.HTMLElement && (element.inert = !1));
- }, walk = (root3) => {
- for (let element of root3.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]")) visibleNodes.add(element);
- let acceptNode = (node2) => {
- if (hiddenNodes.has(node2) || visibleNodes.has(node2) || node2.parentElement && hiddenNodes.has(node2.parentElement) && node2.parentElement.getAttribute("role") !== "row") return NodeFilter.FILTER_REJECT;
- for (let target of visibleNodes)
- if (node2.contains(target)) return NodeFilter.FILTER_SKIP;
- return NodeFilter.FILTER_ACCEPT;
- }, walker = document.createTreeWalker(root3, NodeFilter.SHOW_ELEMENT, {
- acceptNode
- }), acceptRoot = acceptNode(root3);
- if (acceptRoot === NodeFilter.FILTER_ACCEPT && hide2(root3), acceptRoot !== NodeFilter.FILTER_REJECT) {
- let node2 = walker.nextNode();
- for (; node2 != null; )
- hide2(node2), node2 = walker.nextNode();
- }
- }, hide2 = (node2) => {
- var _refCountMap_get;
- let refCount = (_refCountMap_get = $5e3802645cc19319$var$refCountMap.get(node2)) !== null && _refCountMap_get !== void 0 ? _refCountMap_get : 0;
- getHidden(node2) && refCount === 0 || (refCount === 0 && setHidden(node2, !0), hiddenNodes.add(node2), $5e3802645cc19319$var$refCountMap.set(node2, refCount + 1));
- };
- $5e3802645cc19319$var$observerStack.length && $5e3802645cc19319$var$observerStack[$5e3802645cc19319$var$observerStack.length - 1].disconnect(), walk(root2);
- let observer = new MutationObserver((changes) => {
- for (let change of changes)
- if (change.type === "childList" && ![
- ...visibleNodes,
- ...hiddenNodes
- ].some((node2) => node2.contains(change.target)))
- for (let node2 of change.addedNodes)
- (node2 instanceof HTMLElement || node2 instanceof SVGElement) && (node2.dataset.liveAnnouncer === "true" || node2.dataset.reactAriaTopLayer === "true") ? visibleNodes.add(node2) : node2 instanceof Element && walk(node2);
- });
- observer.observe(root2, {
- childList: !0,
- subtree: !0
- });
- let observerWrapper = {
- visibleNodes,
- hiddenNodes,
- observe() {
- observer.observe(root2, {
- childList: !0,
- subtree: !0
- });
- },
- disconnect() {
- observer.disconnect();
- }
- };
- return $5e3802645cc19319$var$observerStack.push(observerWrapper), () => {
- observer.disconnect();
- for (let node2 of hiddenNodes) {
- let count = $5e3802645cc19319$var$refCountMap.get(node2);
- count != null && (count === 1 ? (setHidden(node2, !1), $5e3802645cc19319$var$refCountMap.delete(node2)) : $5e3802645cc19319$var$refCountMap.set(node2, count - 1));
- }
- observerWrapper === $5e3802645cc19319$var$observerStack[$5e3802645cc19319$var$observerStack.length - 1] ? ($5e3802645cc19319$var$observerStack.pop(), $5e3802645cc19319$var$observerStack.length && $5e3802645cc19319$var$observerStack[$5e3802645cc19319$var$observerStack.length - 1].observe()) : $5e3802645cc19319$var$observerStack.splice($5e3802645cc19319$var$observerStack.indexOf(observerWrapper), 1);
- };
- }
- function $5e3802645cc19319$export$1020fa7f77e17884(element) {
- let observer = $5e3802645cc19319$var$observerStack[$5e3802645cc19319$var$observerStack.length - 1];
- if (observer && !observer.visibleNodes.has(element))
- return observer.visibleNodes.add(element), () => {
- observer.visibleNodes.delete(element);
- };
- }
-
- // ../../node_modules/@react-aria/overlays/dist/usePopover.mjs
- var import_react84 = __toESM(require_react(), 1);
- function $f2f8a6077418541e$export$542a6fd13ac93354(props, state3) {
- let { triggerRef, popoverRef, groupRef, isNonModal, isKeyboardDismissDisabled, shouldCloseOnInteractOutside, ...otherProps } = props, isSubmenu = otherProps.trigger === "SubmenuTrigger", { overlayProps, underlayProps } = $a11501f3d1d39e6c$export$ea8f71083e90600f({
- isOpen: state3.isOpen,
- onClose: state3.close,
- shouldCloseOnBlur: !0,
- isDismissable: !isNonModal || isSubmenu,
- isKeyboardDismissDisabled,
- shouldCloseOnInteractOutside
- }, groupRef ?? popoverRef), { overlayProps: positionProps, arrowProps, placement, triggerAnchorPoint: origin } = $2a41e45df1593e64$export$d39e1813b3bdd0e1({
- ...otherProps,
- targetRef: triggerRef,
- overlayRef: popoverRef,
- isOpen: state3.isOpen,
- onClose: isNonModal && !isSubmenu ? state3.close : null
- });
- return $49c51c25361d4cd2$export$ee0f7cc6afcd1c18({
- isDisabled: isNonModal || !state3.isOpen
- }), (0, import_react84.useEffect)(() => {
- if (state3.isOpen && popoverRef.current) {
- var _groupRef_current, _groupRef_current1;
- return isNonModal ? $5e3802645cc19319$export$1020fa7f77e17884((_groupRef_current = groupRef?.current) !== null && _groupRef_current !== void 0 ? _groupRef_current : popoverRef.current) : $5e3802645cc19319$export$1c3ebcada18427bf([
- (_groupRef_current1 = groupRef?.current) !== null && _groupRef_current1 !== void 0 ? _groupRef_current1 : popoverRef.current
- ], {
- shouldUseInert: !0
- });
- }
- }, [
- isNonModal,
- state3.isOpen,
- popoverRef,
- groupRef
- ]), {
- popoverProps: $3ef42575df84b30b$export$9d1611c77c2fe928(overlayProps, positionProps),
- arrowProps,
- underlayProps,
- placement,
- triggerAnchorPoint: origin
- };
- }
-
- // ../../node_modules/@react-aria/overlays/dist/Overlay.mjs
- var import_react85 = __toESM(require_react(), 1), import_react_dom4 = __toESM(require_react_dom(), 1);
- var $337b884510726a0d$export$a2200b96afd16271 = import_react85.default.createContext(null);
- function $337b884510726a0d$export$c6fdb837b070b4ff(props) {
- let isSSR = $b5e257d569688ac6$export$535bd6ca7f90a273(), { portalContainer = isSSR ? null : document.body, isExiting } = props, [contain, setContain] = (0, import_react85.useState)(!1), contextValue = (0, import_react85.useMemo)(() => ({
- contain,
- setContain
- }), [
- contain,
- setContain
- ]), { getContainer } = $96b38030c423d352$export$9fc1347d4195ccb3();
- if (!props.portalContainer && getContainer && (portalContainer = getContainer()), !portalContainer) return null;
- let contents = props.children;
- return props.disableFocusManagement || (contents = import_react85.default.createElement($9bf71ea28793e738$export$20e40289641fbbb6, {
- restoreFocus: !0,
- contain: (props.shouldContainFocus || contain) && !isExiting
- }, contents)), contents = import_react85.default.createElement($337b884510726a0d$export$a2200b96afd16271.Provider, {
- value: contextValue
- }, import_react85.default.createElement($f1ab8c75478c6f73$export$cf75428e0b9ed1ea, null, contents)), import_react_dom4.default.createPortal(contents, portalContainer);
- }
- function $337b884510726a0d$export$14c98a7594375490() {
- let ctx = (0, import_react85.useContext)($337b884510726a0d$export$a2200b96afd16271), setContain = ctx?.setContain;
- $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
- setContain?.(!0);
- }, [
- setContain
- ]);
- }
-
- // ../../node_modules/@react-aria/overlays/dist/useModalOverlay.mjs
- var import_react86 = __toESM(require_react(), 1);
- function $8ac8429251c45e4b$export$dbc0f175b25fb0fb(props, state3, ref) {
- let { overlayProps, underlayProps } = $a11501f3d1d39e6c$export$ea8f71083e90600f({
- ...props,
- isOpen: state3.isOpen,
- onClose: state3.close
- }, ref);
- return $49c51c25361d4cd2$export$ee0f7cc6afcd1c18({
- isDisabled: !state3.isOpen
- }), $337b884510726a0d$export$14c98a7594375490(), (0, import_react86.useEffect)(() => {
- if (state3.isOpen && ref.current) return $5e3802645cc19319$export$1c3ebcada18427bf([
- ref.current
- ], {
- shouldUseInert: !0
- });
- }, [
- state3.isOpen,
- ref
- ]), {
- modalProps: $3ef42575df84b30b$export$9d1611c77c2fe928(overlayProps),
- underlayProps
- };
- }
-
- // ../../node_modules/@react-stately/tooltip/dist/useTooltipTriggerState.mjs
- var import_react88 = __toESM(require_react(), 1);
-
- // ../../node_modules/@react-stately/overlays/dist/useOverlayTriggerState.mjs
- var import_react87 = __toESM(require_react(), 1);
- function $fc909762b330b746$export$61c6a8c84e605fb6(props) {
- let [isOpen, setOpen] = $458b0a5536c1a7cf$export$40bfa8c7b0832715(props.isOpen, props.defaultOpen || !1, props.onOpenChange), open = (0, import_react87.useCallback)(() => {
- setOpen(!0);
- }, [
- setOpen
- ]), close = (0, import_react87.useCallback)(() => {
- setOpen(!1);
- }, [
- setOpen
- ]), toggle = (0, import_react87.useCallback)(() => {
- setOpen(!isOpen);
- }, [
- setOpen,
- isOpen
- ]);
- return {
- isOpen,
- setOpen,
- open,
- close,
- toggle
- };
- }
-
- // ../../node_modules/@react-stately/tooltip/dist/useTooltipTriggerState.mjs
- var $8796f90736e175cb$var$TOOLTIP_DELAY = 1500, $8796f90736e175cb$var$TOOLTIP_COOLDOWN = 500, $8796f90736e175cb$var$tooltips = {}, $8796f90736e175cb$var$tooltipId = 0, $8796f90736e175cb$var$globalWarmedUp = !1, $8796f90736e175cb$var$globalWarmUpTimeout = null, $8796f90736e175cb$var$globalCooldownTimeout = null;
- function $8796f90736e175cb$export$4d40659c25ecb50b(props = {}) {
- let { delay = $8796f90736e175cb$var$TOOLTIP_DELAY, closeDelay = $8796f90736e175cb$var$TOOLTIP_COOLDOWN } = props, { isOpen, open, close } = $fc909762b330b746$export$61c6a8c84e605fb6(props), id = (0, import_react88.useMemo)(() => `${++$8796f90736e175cb$var$tooltipId}`, []), closeTimeout = (0, import_react88.useRef)(null), closeCallback = (0, import_react88.useRef)(close), ensureTooltipEntry = () => {
- $8796f90736e175cb$var$tooltips[id] = hideTooltip;
- }, closeOpenTooltips = () => {
- for (let hideTooltipId in $8796f90736e175cb$var$tooltips) hideTooltipId !== id && ($8796f90736e175cb$var$tooltips[hideTooltipId](!0), delete $8796f90736e175cb$var$tooltips[hideTooltipId]);
- }, showTooltip = () => {
- closeTimeout.current && clearTimeout(closeTimeout.current), closeTimeout.current = null, closeOpenTooltips(), ensureTooltipEntry(), $8796f90736e175cb$var$globalWarmedUp = !0, open(), $8796f90736e175cb$var$globalWarmUpTimeout && (clearTimeout($8796f90736e175cb$var$globalWarmUpTimeout), $8796f90736e175cb$var$globalWarmUpTimeout = null), $8796f90736e175cb$var$globalCooldownTimeout && (clearTimeout($8796f90736e175cb$var$globalCooldownTimeout), $8796f90736e175cb$var$globalCooldownTimeout = null);
- }, hideTooltip = (immediate) => {
- immediate || closeDelay <= 0 ? (closeTimeout.current && clearTimeout(closeTimeout.current), closeTimeout.current = null, closeCallback.current()) : closeTimeout.current || (closeTimeout.current = setTimeout(() => {
- closeTimeout.current = null, closeCallback.current();
- }, closeDelay)), $8796f90736e175cb$var$globalWarmUpTimeout && (clearTimeout($8796f90736e175cb$var$globalWarmUpTimeout), $8796f90736e175cb$var$globalWarmUpTimeout = null), $8796f90736e175cb$var$globalWarmedUp && ($8796f90736e175cb$var$globalCooldownTimeout && clearTimeout($8796f90736e175cb$var$globalCooldownTimeout), $8796f90736e175cb$var$globalCooldownTimeout = setTimeout(() => {
- delete $8796f90736e175cb$var$tooltips[id], $8796f90736e175cb$var$globalCooldownTimeout = null, $8796f90736e175cb$var$globalWarmedUp = !1;
- }, Math.max($8796f90736e175cb$var$TOOLTIP_COOLDOWN, closeDelay)));
- }, warmupTooltip = () => {
- closeOpenTooltips(), ensureTooltipEntry(), !isOpen && !$8796f90736e175cb$var$globalWarmUpTimeout && !$8796f90736e175cb$var$globalWarmedUp ? $8796f90736e175cb$var$globalWarmUpTimeout = setTimeout(() => {
- $8796f90736e175cb$var$globalWarmUpTimeout = null, $8796f90736e175cb$var$globalWarmedUp = !0, showTooltip();
- }, delay) : isOpen || showTooltip();
- };
- return (0, import_react88.useEffect)(() => {
- closeCallback.current = close;
- }, [
- close
- ]), (0, import_react88.useEffect)(() => () => {
- closeTimeout.current && clearTimeout(closeTimeout.current), $8796f90736e175cb$var$tooltips[id] && delete $8796f90736e175cb$var$tooltips[id];
- }, [
- id
- ]), {
- isOpen,
- open: (immediate) => {
- !immediate && delay > 0 && !closeTimeout.current ? warmupTooltip() : showTooltip();
- },
- close: hideTooltip
- };
- }
-
- // ../../node_modules/react-aria-components/dist/Tooltip.mjs
- var import_react89 = __toESM(require_react(), 1), $4e3b923658d69c60$export$7a7623236eec67fa = (0, import_react89.createContext)(null), $4e3b923658d69c60$export$39ae08fa83328b12 = (0, import_react89.createContext)(null);
- function $4e3b923658d69c60$export$8c610744efcf8a1d(props) {
- let state3 = $8796f90736e175cb$export$4d40659c25ecb50b(props), ref = (0, import_react89.useRef)(null), { triggerProps, tooltipProps } = $4e1b34546679e357$export$a6da6c504e4bba8b(props, state3, ref);
- return import_react89.default.createElement($64fa3d84918910a7$export$2881499e37b75b9a, {
- values: [
- [
- $4e3b923658d69c60$export$7a7623236eec67fa,
- state3
- ],
- [
- $4e3b923658d69c60$export$39ae08fa83328b12,
- {
- ...tooltipProps,
- triggerRef: ref
- }
- ]
- ]
- }, import_react89.default.createElement($f645667febf57a63$export$13f3202a3e5ddd5, {
- ...triggerProps,
- ref
- }, props.children));
- }
- var $4e3b923658d69c60$export$28c660c63b792dea = (0, import_react89.forwardRef)(function({ UNSTABLE_portalContainer, ...props }, ref) {
- [props, ref] = $64fa3d84918910a7$export$29f1550f4b0d4415(props, ref, $4e3b923658d69c60$export$39ae08fa83328b12);
- let contextState = (0, import_react89.useContext)($4e3b923658d69c60$export$7a7623236eec67fa), localState = $8796f90736e175cb$export$4d40659c25ecb50b(props), state3 = props.isOpen != null || props.defaultOpen != null || !contextState ? localState : contextState, isExiting = $d3f049242431219c$export$45fda7c47f93fd48(ref, state3.isOpen) || props.isExiting || !1;
- return !state3.isOpen && !isExiting ? null : import_react89.default.createElement($f57aed4a881a3485$export$b47c3594eab58386, {
- portalContainer: UNSTABLE_portalContainer
- }, import_react89.default.createElement($4e3b923658d69c60$var$TooltipInner, {
- ...props,
- tooltipRef: ref,
- isExiting
- }));
- });
- function $4e3b923658d69c60$var$TooltipInner(props) {
- let state3 = (0, import_react89.useContext)($4e3b923658d69c60$export$7a7623236eec67fa), arrowRef = (0, import_react89.useRef)(null), { overlayProps, arrowProps, placement, triggerAnchorPoint } = $2a41e45df1593e64$export$d39e1813b3bdd0e1({
- placement: props.placement || "top",
- targetRef: props.triggerRef,
- overlayRef: props.tooltipRef,
- arrowRef,
- offset: props.offset,
- crossOffset: props.crossOffset,
- isOpen: state3.isOpen,
- arrowBoundaryOffset: props.arrowBoundaryOffset,
- shouldFlip: props.shouldFlip,
- containerPadding: props.containerPadding,
- onClose: () => state3.close(!0)
- }), isEntering = $d3f049242431219c$export$6d3443f2c48bfc20(props.tooltipRef, !!placement) || props.isEntering || !1, renderProps = $64fa3d84918910a7$export$4d86445c2cf5e3({
- ...props,
- defaultClassName: "react-aria-Tooltip",
- values: {
- placement,
- isEntering,
- isExiting: props.isExiting,
- state: state3
- }
- });
- props = $3ef42575df84b30b$export$9d1611c77c2fe928(props, overlayProps);
- let { tooltipProps } = $326e436e94273fe1$export$1c4b08e0eca38426(props, state3), DOMProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, {
- global: !0
- });
- return import_react89.default.createElement("div", {
- ...$3ef42575df84b30b$export$9d1611c77c2fe928(DOMProps, renderProps, tooltipProps),
- ref: props.tooltipRef,
- style: {
- ...overlayProps.style,
- "--trigger-anchor-point": triggerAnchorPoint ? `${triggerAnchorPoint.x}px ${triggerAnchorPoint.y}px` : void 0,
- ...renderProps.style
- },
- "data-placement": placement ?? void 0,
- "data-entering": isEntering || void 0,
- "data-exiting": props.isExiting || void 0
- }, import_react89.default.createElement($44f671af83e7d9e0$export$2de4954e8ae13b9f.Provider, {
- value: {
- ...arrowProps,
- placement,
- ref: arrowRef
- }
- }, renderProps.children));
- }
-
- // src/components/components/shared/overlayHelpers.tsx
- var import_react90 = __toESM(require_react(), 1);
- var import_memoizerific10 = __toESM(require_memoizerific(), 1);
- init_theming();
- var convertToReactAriaPlacement = (0, import_memoizerific10.default)(1e3)((p3) => p3 === "left-end" ? "left bottom" : p3 === "right-end" ? "right bottom" : p3 === "left-start" ? "left top" : p3 === "right-start" ? "right top" : p3.replace("-", " ")), Container2 = styled.div({
- width: 500,
- height: 500,
- paddingTop: 100,
- overflowY: "scroll",
- background: "#eee",
- position: "relative"
- }), Trigger = (0, import_react90.forwardRef)((props, ref) => import_react90.default.createElement(
- "button",
- {
- ...props,
- ref,
- style: {
- width: 120,
- height: 50,
- margin: 10
- }
- }
- ));
- Trigger.displayName = "Trigger";
-
- // src/components/components/tooltip/TooltipProvider.tsx
- var TooltipProvider = ({
- triggerOnFocusOnly = !1,
- placement: placementProp = "top",
- offset: offset3 = 8,
- tooltip,
- children,
- defaultVisible,
- startOpen,
- delayShow = 400,
- delayHide = 200,
- visible,
- onVisibleChange,
- ...props
- }) => {
- let placement = convertToReactAriaPlacement(placementProp), child = import_react91.default.Children.only(children);
- startOpen !== void 0 && deprecate("The `startOpen` prop is deprecated. Please use `defaultVisible` instead.");
- let [isOpen, setIsOpen] = (0, import_react91.useState)(defaultVisible ?? startOpen ?? !1), onOpenChange = (0, import_react91.useCallback)(
- (isOpen2) => {
- setIsOpen(isOpen2), onVisibleChange?.(isOpen2);
- },
- [onVisibleChange]
- );
- return import_react91.default.createElement(
- $4e3b923658d69c60$export$8c610744efcf8a1d,
- {
- delay: delayShow,
- closeDelay: delayHide,
- isOpen: visible ?? isOpen,
- onOpenChange,
- trigger: triggerOnFocusOnly ? "focus" : void 0,
- ...props
- },
- import_react91.default.createElement($f645667febf57a63$export$35a3bebf7ef2d934, null, import_react91.default.cloneElement(child, { "aria-describedby": null })),
- import_react91.default.createElement(
- $4e3b923658d69c60$export$28c660c63b792dea,
- {
- "data-testid": "tooltip",
- placement,
- offset: offset3,
- onOpenChange,
- style: { outline: "none" },
- ...props
- },
- tooltip
- )
- );
- };
-
- // src/components/components/Button/helpers/InteractiveTooltipWrapper.tsx
- var InteractiveTooltipWrapper = ({ children, disableAllTooltips, shortcut, tooltip }) => {
- let tooltipLabel = (0, import_react92.useMemo)(() => {
- let hasShortcuts = document?.body?.getAttribute("data-shortcuts-enabled") !== "false";
- if (!(!tooltip && (!shortcut || !hasShortcuts)))
- return [tooltip, shortcut && hasShortcuts && `[${shortcutToHumanString(shortcut)}]`].filter(Boolean).join(" ");
- }, [shortcut, tooltip]);
- return tooltipLabel ? import_react92.default.createElement(
- TooltipProvider,
- {
- placement: "top",
- tooltip: import_react92.default.createElement(TooltipNote, { note: tooltipLabel }),
- visible: disableAllTooltips ? !1 : void 0
- },
- children
- ) : import_react92.default.createElement(import_react92.default.Fragment, null, children);
- };
- InteractiveTooltipWrapper.displayName = "InteractiveTooltipWrapper";
-
- // src/components/components/Button/helpers/useAriaDescription.tsx
- var import_react93 = __toESM(require_react(), 1);
- function useAriaDescription(description = "") {
- let describedbyId = description.toLowerCase().trim().replace(/\s+/g, "-");
- return {
- ariaDescriptionAttrs: {
- "aria-describedby": description ? describedbyId : void 0
- },
- AriaDescription: () => description ? import_react93.default.createElement("span", { id: describedbyId, hidden: !0 }, description) : null
- };
- }
-
- // src/components/components/Button/Button.tsx
- var Button = (0, import_react94.forwardRef)(
- ({
- as = "button",
- asChild = !1,
- animation: animation2 = "none",
- size = "small",
- variant = "outline",
- padding = "medium",
- disabled = !1,
- readOnly = !1,
- active,
- onClick,
- ariaLabel,
- ariaDescription = void 0,
- tooltip = void 0,
- shortcut = void 0,
- disableAllTooltips = !1,
- ...props
- }, ref) => {
- let Comp2 = asChild ? Slot2 : as, deprecated;
- !readOnly && (ariaLabel === void 0 || ariaLabel === "") && (deprecated = "ariaLabel", deprecate(
- `The 'ariaLabel' prop on 'Button' will become mandatory in Storybook 11. Buttons with text content should set 'ariaLabel={false}' to indicate that they are accessible as-is. Buttons without text content must provide a meaningful 'ariaLabel' for accessibility. The button content is: ${props.children}.`
- )), active !== void 0 && (deprecated = "active", deprecate(
- "The `active` prop on `Button` is deprecated and will be removed in Storybook 11. Use specialized components like `ToggleButton` or `Select` instead."
- ));
- let { ariaDescriptionAttrs, AriaDescription } = useAriaDescription(ariaDescription), shortcutAttribute = (0, import_react94.useMemo)(() => shortcut ? shortcutToAriaKeyshortcuts(shortcut) : void 0, [shortcut]), [isAnimating, setIsAnimating] = (0, import_react94.useState)(!1), handleClick = (event) => {
- onClick && onClick(event), animation2 !== "none" && setIsAnimating(!0);
- };
- return (0, import_react94.useEffect)(() => {
- let timer = setTimeout(() => {
- isAnimating && setIsAnimating(!1);
- }, 1e3);
- return () => clearTimeout(timer);
- }, [isAnimating]), import_react94.default.createElement(import_react94.default.Fragment, null, import_react94.default.createElement(
- InteractiveTooltipWrapper,
- {
- disableAllTooltips,
- shortcut,
- tooltip: tooltip || (ariaLabel !== !1 ? ariaLabel : void 0)
- },
- import_react94.default.createElement(
- StyledButton,
- {
- "data-deprecated": deprecated,
- as: Comp2,
- ref,
- variant,
- size,
- padding,
- $disabled: disabled || readOnly,
- "aria-disabled": disabled || readOnly ? "true" : void 0,
- readOnly,
- active,
- animating: isAnimating,
- animation: animation2,
- onClick: disabled || readOnly ? void 0 : handleClick,
- "aria-label": !readOnly && ariaLabel !== !1 ? ariaLabel : void 0,
- "aria-keyshortcuts": readOnly ? void 0 : shortcutAttribute,
- ...readOnly ? {} : ariaDescriptionAttrs,
- ...props
- }
- )
- ), import_react94.default.createElement(AriaDescription, null));
- }
- );
- Button.displayName = "Button";
- var StyledButton = styled("button", {
- shouldForwardProp: (prop) => isPropValid(prop)
- })(
- ({
- theme: theme3,
- variant,
- size,
- $disabled,
- readOnly,
- active,
- animating,
- animation: animation2 = "none",
- padding
- }) => ({
- border: 0,
- cursor: readOnly ? "inherit" : $disabled ? "not-allowed" : "pointer",
- display: "inline-flex",
- gap: "6px",
- alignItems: "center",
- justifyContent: "center",
- overflow: "hidden",
- padding: padding === "none" ? 0 : padding === "small" && size === "small" ? "0 7px" : padding === "small" && size === "medium" ? "0 9px" : size === "small" ? "0 10px" : size === "medium" ? "0 12px" : 0,
- height: size === "small" ? "28px" : "32px",
- position: "relative",
- textAlign: "center",
- textDecoration: "none",
- transitionProperty: "background, box-shadow",
- transitionDuration: "150ms",
- transitionTimingFunction: "ease-out",
- verticalAlign: "top",
- whiteSpace: "nowrap",
- userSelect: "none",
- opacity: $disabled && !readOnly ? 0.5 : 1,
- margin: 0,
- fontSize: `${theme3.typography.size.s1}px`,
- fontWeight: theme3.typography.weight.bold,
- lineHeight: "1",
- background: variant === "solid" ? theme3.base === "light" ? theme3.color.secondary : curriedDarken$1(0.18, theme3.color.secondary) : variant === "outline" ? theme3.button.background : variant === "ghost" && active ? curriedTransparentize$1(0.93, theme3.barSelectedColor) : "transparent",
- color: variant === "solid" ? theme3.color.lightest : variant === "outline" ? theme3.input.color : variant === "ghost" && active ? theme3.base === "light" ? curriedDarken$1(0.1, theme3.color.secondary) : theme3.color.secondary : variant === "ghost" ? theme3.textMutedColor : theme3.input.color,
- boxShadow: variant === "outline" ? `${theme3.button.border} 0 0 0 1px inset` : "none",
- borderRadius: theme3.input.borderRadius,
- // Making sure that the button never shrinks below its minimum size
- flexShrink: 0,
- ...!readOnly && {
- "&:hover": {
- color: variant === "ghost" ? theme3.color.secondary : void 0,
- background: (() => {
- let bgColor = theme3.color.secondary;
- return variant === "solid" && (bgColor = theme3.base === "light" ? curriedLighten$1(0.1, theme3.color.secondary) : curriedDarken$1(0.3, theme3.color.secondary)), variant === "outline" && (bgColor = theme3.button.background), variant === "ghost" ? curriedTransparentize$1(0.86, theme3.color.secondary) : theme3.base === "light" ? curriedDarken$1(0.02, bgColor) : curriedLighten$1(0.03, bgColor);
- })()
- },
- "&:active": {
- color: variant === "ghost" ? theme3.color.secondary : void 0,
- background: (() => {
- let bgColor = theme3.color.secondary;
- return variant === "solid" && (bgColor = theme3.color.secondary), variant === "outline" && (bgColor = theme3.button.background), variant === "ghost" ? theme3.background.hoverable : theme3.base === "light" ? curriedDarken$1(0.02, bgColor) : curriedLighten$1(0.03, bgColor);
- })()
- },
- "&:focus-visible": {
- outline: `2px solid ${rgba(theme3.color.secondary, 1)}`,
- outlineOffset: 2,
- // Should ensure focus outline gets drawn above next sibling
- zIndex: "1"
- },
- ".sb-bar &:focus-visible, .sb-list &:focus-visible": {
- outlineOffset: 0
- }
- },
- "> svg": {
- flex: "0 0 auto",
- animation: animating && animation2 !== "none" ? `${theme3.animation[animation2]} 1000ms ease-out` : ""
- }
- })
- ), IconButton = (0, import_react94.forwardRef)((props, ref) => (deprecate(
- "`IconButton` is deprecated and will be removed in Storybook 11, use `Button` instead."
- ), import_react94.default.createElement(Button, { ref, ...props, "data-deprecated": "IconButton" })));
- IconButton.displayName = "IconButton";
-
- // src/components/components/ToggleButton/ToggleButton.tsx
- var import_react95 = __toESM(require_react(), 1);
- init_polished_esm();
- init_theming();
- var ToggleButton = (0, import_react95.forwardRef)(
- ({ pressed, ...props }, ref) => import_react95.default.createElement(StyledToggle, { role: "switch", "aria-checked": pressed, ref, pressed, ...props })
- );
- ToggleButton.displayName = "ToggleButton";
- var StyledToggle = styled(Button)(
- ({ theme: theme3, variant = "outline", pressed }) => ({
- ...pressed ? {
- ...variant === "solid" ? {
- background: theme3.base === "lighten" ? curriedDarken$1(0.1, theme3.color.secondary) : curriedDarken$1(0.2, theme3.color.secondary)
- } : {},
- ...variant === "outline" ? {
- background: curriedTransparentize$1(0.94, theme3.barSelectedColor),
- boxShadow: `${theme3.barSelectedColor} 0 0 0 1px inset`,
- color: theme3.barSelectedColor
- } : {},
- ...variant === "ghost" ? {
- background: curriedTransparentize$1(0.93, theme3.barSelectedColor),
- color: theme3.base === "light" ? curriedDarken$1(0.1, theme3.color.secondary) : theme3.color.secondary
- } : {}
- } : {}
- })
- );
-
- // src/components/components/ActionList/ActionList.tsx
- var ActionListItem = styled.li(
- ({ active, theme: theme3 }) => ({
- display: "flex",
- alignItems: "center",
- justifyContent: "space-between",
- flex: "0 0 auto",
- overflow: "hidden",
- minHeight: 32,
- gap: 4,
- fontSize: theme3.typography.size.s1,
- fontWeight: active ? theme3.typography.weight.bold : theme3.typography.weight.regular,
- color: active ? "var(--listbox-item-active-color)" : theme3.color.defaultText,
- "--listbox-item-active-color": theme3.base === "light" ? curriedDarken$1(0.1, theme3.color.secondary) : theme3.color.secondary,
- "--listbox-item-muted-color": active ? "var(--listbox-item-active-color)" : theme3.color.mediumdark,
- '&[aria-disabled="true"]': {
- opacity: 0.5,
- cursor: "not-allowed"
- },
- '&[aria-selected="true"]': {
- color: "var(--listbox-item-active-color)",
- fontWeight: theme3.typography.weight.bold,
- "--listbox-item-muted-color": "var(--listbox-item-active-color)"
- },
- "&:not(:hover, :has(:focus-visible)) :not(input) + input": {
- position: "absolute",
- opacity: 0
- },
- '&[role="option"]': {
- cursor: "pointer",
- borderRadius: theme3.input.borderRadius,
- outlineOffset: -2,
- padding: "0 9px",
- gap: 8,
- "&:hover": {
- background: curriedTransparentize$1(0.86, theme3.color.secondary)
- },
- "&:focus-visible": {
- outline: `2px solid ${theme3.color.secondary}`
- }
- },
- "@supports (interpolate-size: allow-keywords)": {
- interpolateSize: "allow-keywords",
- transitionBehavior: "allow-discrete",
- transitionDuration: "var(--transition-duration, 0.2s)",
- transitionProperty: "opacity, block-size, content-visibility"
- },
- "@media (prefers-reduced-motion: reduce)": {
- transition: "none"
- }
- }),
- ({ transitionStatus }) => {
- switch (transitionStatus) {
- case "preEnter":
- case "exiting":
- case "exited":
- return {
- opacity: 0,
- blockSize: 0,
- contentVisibility: "hidden"
- };
- default:
- return {
- opacity: 1,
- blockSize: "auto",
- contentVisibility: "visible"
- };
- }
- }
- ), ActionListHoverItem = styled(ActionListItem)(({ targetId }) => ({
- gap: 0,
- [`& [data-target-id="${targetId}"]`]: {
- inlineSize: "auto",
- marginLeft: 4,
- opacity: 1,
- "@supports (interpolate-size: allow-keywords)": {
- interpolateSize: "allow-keywords",
- transitionProperty: "inline-size, margin-left, opacity, padding-inline",
- transitionDuration: "var(--transition-duration, 0.2s)"
- }
- },
- [`&:not(:hover, :has(:focus-visible)) [data-target-id="${targetId}"]`]: {
- inlineSize: 0,
- marginLeft: 0,
- opacity: 0,
- paddingInline: 0
- }
- })), StyledButton2 = styled(Button)(({ size }) => ({
- gap: size === "small" ? 6 : 8,
- "&:focus-visible": {
- // Prevent focus outline from being cut off by overflow: hidden
- outlineOffset: -2
- }
- })), StyledToggleButton = styled(ToggleButton)({
- "&:focus-visible": {
- // Prevent focus outline from being cut off by overflow: hidden
- outlineOffset: -2
- }
- }), ActionListButton = (0, import_react96.forwardRef)(
- function({ padding = "small", size = "medium", variant = "ghost", ...props }, ref) {
- return import_react96.default.createElement(StyledButton2, { ...props, variant, padding, size, ref });
- }
- ), ActionListToggle = (0, import_react96.forwardRef)(
- function({ padding = "small", size = "medium", variant = "ghost", ...props }, ref) {
- return import_react96.default.createElement(StyledToggleButton, { ...props, variant, padding, size, ref });
- }
- ), ActionListAction = styled(ActionListButton)(({ theme: theme3 }) => ({
- height: "auto",
- minHeight: 32,
- flex: "0 1 100%",
- textAlign: "start",
- justifyContent: "space-between",
- fontWeight: "inherit",
- color: "inherit",
- "&:hover": {
- color: "inherit"
- },
- "& input:enabled:focus-visible": {
- outline: "none"
- },
- "&:has(input:focus-visible)": {
- outline: `2px solid ${theme3.color.secondary}`,
- outlineOffset: -2
- }
- })), ActionListLink = (props) => import_react96.default.createElement(ActionListAction, { as: "a", ...props }), ActionListText = styled.div(({ theme: theme3 }) => ({
- display: "flex",
- flexDirection: "column",
- justifyContent: "center",
- flexGrow: 1,
- minWidth: 0,
- padding: "8px 0",
- lineHeight: "16px",
- "& > *": {
- margin: 0,
- whiteSpace: "normal"
- },
- "& > span": {
- overflow: "hidden",
- textOverflow: "ellipsis",
- whiteSpace: "nowrap"
- },
- "& small": {
- fontSize: "inherit",
- color: theme3.textMutedColor
- },
- "&:first-child": {
- paddingLeft: 8
- },
- "&:last-child": {
- paddingRight: 8
- },
- 'button > &:first-child, [role="option"] > &:first-child': {
- paddingLeft: 0
- },
- 'button > &:last-child, [role="option"] > &:last-child': {
- paddingRight: 0
- }
- })), ActionListIcon = styled.div({
- display: "flex",
- alignItems: "center",
- justifyContent: "center",
- flex: "0 0 14px",
- width: 14,
- height: 14,
- color: "var(--listbox-item-muted-color)"
- }), ActionList = Object.assign(
- styled.ul(({ theme: theme3, onClick }) => ({
- listStyle: "none",
- margin: 0,
- padding: 4,
- cursor: onClick ? "pointer" : "default",
- "& + *": {
- borderTop: `1px solid ${theme3.appBorderColor}`
- }
- })),
- {
- Item: ActionListItem,
- HoverItem: ActionListHoverItem,
- Button: ActionListButton,
- Toggle: ActionListToggle,
- Action: ActionListAction,
- Link: ActionListLink,
- Text: ActionListText,
- Icon: ActionListIcon
- }
- );
-
- // src/components/components/Collapsible/Collapsible.tsx
- var import_react97 = __toESM(require_react(), 1);
- init_theming();
- var CollapsibleContent = styled.div(({ collapsed = !1 }) => ({
- blockSize: collapsed ? 0 : "auto",
- contentVisibility: collapsed ? "hidden" : "visible",
- transform: collapsed ? "translateY(-10px)" : "translateY(0)",
- opacity: collapsed ? 0 : 1,
- overflow: "hidden",
- "@supports (interpolate-size: allow-keywords)": {
- interpolateSize: "allow-keywords",
- transition: "all var(--transition-duration, 0.2s)",
- transitionBehavior: "allow-discrete"
- },
- "@media (prefers-reduced-motion: reduce)": {
- transition: "none"
- }
- })), Collapsible = Object.assign(
- function({
- children,
- summary,
- collapsed,
- disabled,
- initialCollapsed,
- storageKey,
- state: providedState,
- ...props
- }) {
- let internalState = useCollapsible({ collapsed, disabled, initialCollapsed, storageKey }), state3 = providedState || internalState;
- return import_react97.default.createElement(import_react97.default.Fragment, null, typeof summary == "function" ? summary(state3) : summary, import_react97.default.createElement(
- CollapsibleContent,
- {
- ...props,
- id: state3.contentId,
- collapsed: state3.isCollapsed,
- "aria-hidden": state3.isCollapsed
- },
- typeof children == "function" ? children(state3) : children
- ));
- },
- {
- Content: CollapsibleContent
- }
- ), useSessionState = (key, initialValue2) => {
- let [value, setValue] = (0, import_react97.useState)(() => {
- try {
- return JSON.parse(sessionStorage.getItem(key)) ?? initialValue2;
- } catch {
- return initialValue2;
- }
- });
- return (0, import_react97.useEffect)(() => {
- try {
- key && sessionStorage.setItem(key, JSON.stringify(value));
- } catch {
- }
- }, [key, value]), [value, setValue];
- }, useCollapsible = ({
- collapsed,
- disabled,
- initialCollapsed = collapsed,
- storageKey
- }) => {
- let [isCollapsed, setCollapsed] = useSessionState(
- storageKey && `useCollapsible:${storageKey}`,
- !!initialCollapsed
- );
- (0, import_react97.useEffect)(() => {
- collapsed !== void 0 && setCollapsed(collapsed);
- }, [collapsed, setCollapsed]);
- let toggleCollapsed = (0, import_react97.useCallback)(
- (event) => {
- event?.stopPropagation(), disabled || setCollapsed((value) => !value);
- },
- [disabled, setCollapsed]
- ), contentId = $bdb11010cef70236$export$f680877a34711e37();
- return {
- contentId,
- isCollapsed,
- isDisabled: !!disabled,
- setCollapsed,
- toggleCollapsed,
- toggleProps: {
- disabled,
- onClick: toggleCollapsed,
- "aria-controls": contentId,
- "aria-expanded": !isCollapsed
- }
- };
- };
-
- // src/components/components/Card/Card.tsx
- var import_react98 = __toESM(require_react(), 1);
- init_theming();
- var fadeInOut = keyframes({
- "0%": { opacity: 0 },
- "5%": { opacity: 1 },
- "25%": { opacity: 1 },
- "30%": { opacity: 0 }
- }), spin = keyframes({
- "0%": { transform: "rotate(0deg)" },
- "10%": { transform: "rotate(10deg)" },
- "40%": { transform: "rotate(170deg)" },
- "50%": { transform: "rotate(180deg)" },
- "60%": { transform: "rotate(190deg)" },
- "90%": { transform: "rotate(350deg)" },
- "100%": { transform: "rotate(360deg)" }
- }), slide = keyframes({
- to: {
- backgroundPositionX: "36%"
- }
- }), CardContent = styled.div(({ theme: theme3 }) => ({
- borderRadius: theme3.appBorderRadius,
- backgroundColor: theme3.background.content,
- position: "relative"
- })), CardOutline = styled.div(({ animation: animation2 = "none", color: color2, theme: theme3 }) => ({
- position: "relative",
- width: "100%",
- padding: 1,
- overflow: "hidden",
- backgroundColor: theme3.background.content,
- borderRadius: theme3.appBorderRadius + 1,
- boxShadow: `inset 0 0 0 1px ${animation2 === "none" && color2 && theme3.color[color2] || theme3.appBorderColor}, var(--card-box-shadow, transparent 0 0)`,
- transition: "box-shadow 1s",
- "@supports (interpolate-size: allow-keywords)": {
- interpolateSize: "allow-keywords",
- transition: "all var(--transition-duration, 0.2s), box-shadow 1s",
- transitionBehavior: "allow-discrete"
- },
- "@media (prefers-reduced-motion: reduce)": {
- transition: "box-shadow 1s"
- },
- "&:before": {
- content: '""',
- display: animation2 === "none" ? "none" : "block",
- position: "absolute",
- left: 0,
- top: 0,
- width: "100%",
- height: "100%",
- opacity: 1,
- ...animation2 === "rainbow" && {
- animation: `${slide} 10s infinite linear, ${fadeInOut} 60s infinite linear`,
- backgroundImage: "linear-gradient(45deg,rgb(234, 0, 0),rgb(255, 157, 0),rgb(255, 208, 0),rgb(0, 172, 0),rgb(0, 166, 255),rgb(181, 0, 181), rgb(234, 0, 0),rgb(255, 157, 0),rgb(255, 208, 0),rgb(0, 172, 0),rgb(0, 166, 255),rgb(181, 0, 181))",
- backgroundSize: "1000%",
- backgroundPositionX: "100%"
- },
- ...animation2 === "spin" && {
- left: "50%",
- top: "50%",
- marginLeft: "calc(max(100vw, 100vh) * -0.5)",
- marginTop: "calc(max(100vw, 100vh) * -0.5)",
- height: "max(100vw, 100vh)",
- width: "max(100vw, 100vh)",
- animation: `${spin} 3s linear infinite`,
- backgroundImage: color2 === "negative" ? (
- // Hardcoded colors to prevent themes from messing with them (orange+gold, secondary+seafoam)
- "conic-gradient(transparent 90deg, #FC521F 150deg, #FFAE00 210deg, transparent 270deg)"
- ) : "conic-gradient(transparent 90deg, #029CFD 150deg, #37D5D3 210deg, transparent 270deg)"
- }
- }
- })), Card = Object.assign(
- (0, import_react98.forwardRef)(function({ outlineAnimation = "none", outlineColor, outlineAttrs = {}, ...props }, ref) {
- return import_react98.default.createElement(CardOutline, { animation: outlineAnimation, color: outlineColor, ref, ...outlineAttrs }, import_react98.default.createElement(CardContent, { ...props }));
- }),
- {
- Content: CardContent,
- Outline: CardOutline
- }
- );
-
- // src/components/components/Modal/Modal.tsx
- var import_react106 = __toESM(require_react(), 1);
- init_client_logger();
-
- // ../../node_modules/react-transition-state/dist/esm/hooks/useTransitionState.mjs
- var import_react99 = __toESM(require_react(), 1);
-
- // ../../node_modules/react-transition-state/dist/esm/hooks/utils.mjs
- var STATUS = ["preEnter", "entering", "entered", "preExit", "exiting", "exited", "unmounted"], getState2 = (status) => ({
- _s: status,
- status: STATUS[status],
- isEnter: status < 3,
- isMounted: status !== 6,
- isResolved: status === 2 || status > 4
- }), startOrEnd = (unmounted) => unmounted ? 6 : 5, getEndStatus = (status, unmountOnExit) => {
- switch (status) {
- case 1:
- case 0:
- return 2;
- case 4:
- case 3:
- return startOrEnd(unmountOnExit);
- }
- }, getTimeout = (timeout) => typeof timeout == "object" ? [timeout.enter, timeout.exit] : [timeout, timeout], nextTick = (transitState, status) => setTimeout(() => {
- isNaN(document.body.offsetTop) || transitState(status + 1);
- }, 0);
-
- // ../../node_modules/react-transition-state/dist/esm/hooks/useTransitionState.mjs
- var updateState = (status, setState2, latestState, timeoutId, onChange) => {
- clearTimeout(timeoutId.current);
- let state3 = getState2(status);
- setState2(state3), latestState.current = state3, onChange && onChange({
- current: state3
- });
- }, useTransitionState = ({
- enter = !0,
- exit = !0,
- preEnter,
- preExit,
- timeout,
- initialEntered,
- mountOnEnter,
- unmountOnExit,
- onStateChange: onChange
- } = {}) => {
- let [state3, setState2] = (0, import_react99.useState)(() => getState2(initialEntered ? 2 : startOrEnd(mountOnEnter))), latestState = (0, import_react99.useRef)(state3), timeoutId = (0, import_react99.useRef)(), [enterTimeout, exitTimeout] = getTimeout(timeout), endTransition = (0, import_react99.useCallback)(() => {
- let status = getEndStatus(latestState.current._s, unmountOnExit);
- status && updateState(status, setState2, latestState, timeoutId, onChange);
- }, [onChange, unmountOnExit]), toggle = (0, import_react99.useCallback)((toEnter) => {
- let transitState = (status) => {
- switch (updateState(status, setState2, latestState, timeoutId, onChange), status) {
- case 1:
- enterTimeout >= 0 && (timeoutId.current = setTimeout(endTransition, enterTimeout));
- break;
- case 4:
- exitTimeout >= 0 && (timeoutId.current = setTimeout(endTransition, exitTimeout));
- break;
- case 0:
- case 3:
- timeoutId.current = nextTick(transitState, status);
- break;
- }
- }, enterStage = latestState.current.isEnter;
- typeof toEnter != "boolean" && (toEnter = !enterStage), toEnter ? !enterStage && transitState(enter ? preEnter ? 0 : 1 : 2) : enterStage && transitState(exit ? preExit ? 3 : 4 : startOrEnd(unmountOnExit));
- }, [endTransition, onChange, enter, exit, preEnter, preExit, enterTimeout, exitTimeout, unmountOnExit]);
- return [state3, toggle, endTransition];
- };
-
- // ../../node_modules/react-transition-state/dist/esm/hooks/useTransitionMap.mjs
- var import_react100 = __toESM(require_react(), 1);
-
- // src/manager/hooks/useMedia.tsx
- var import_react101 = __toESM(require_react(), 1);
- function useMediaQuery(query) {
- let getMatches = (queryMatch) => typeof window < "u" ? window.matchMedia(queryMatch).matches : !1, [matches4, setMatches] = (0, import_react101.useState)(getMatches(query));
- function handleChange() {
- setMatches(getMatches(query));
- }
- return (0, import_react101.useEffect)(() => {
- let matchMedia = window.matchMedia(query);
- return handleChange(), matchMedia.addEventListener("change", handleChange), () => {
- matchMedia.removeEventListener("change", handleChange);
- };
- }, [query]), matches4;
- }
-
- // src/components/components/Modal/Modal.styled.tsx
- var Modal_styled_exports = {};
- __export(Modal_styled_exports, {
- Actions: () => Actions,
- Close: () => Close,
- CloseButton: () => CloseButton,
- Col: () => Col,
- Container: () => Container3,
- Content: () => Content,
- Description: () => Description,
- Dialog: () => Dialog,
- Error: () => Error2,
- ErrorWrapper: () => ErrorWrapper,
- Header: () => Header,
- Overlay: () => Overlay,
- Row: () => Row,
- Title: () => Title
- });
- var import_react105 = __toESM(require_react(), 1);
- init_client_logger();
-
- // ../../node_modules/react-aria-components/dist/RSPContexts.mjs
- var import_react102 = __toESM(require_react(), 1), $4e85f108e88277b8$export$b085522c77523c51 = (0, import_react102.createContext)(null), $4e85f108e88277b8$export$ebe63fadcdce34ed = (0, import_react102.createContext)(null), $4e85f108e88277b8$export$44644b8a16031b5b = (0, import_react102.createContext)(null), $4e85f108e88277b8$export$717b2c0a523a0b53 = (0, import_react102.createContext)(null), $4e85f108e88277b8$export$265015d6dc85bf21 = (0, import_react102.createContext)(null), $4e85f108e88277b8$export$d688439359537581 = (0, import_react102.createContext)({});
-
- // ../../node_modules/react-aria-components/dist/Heading.mjs
- var import_react103 = __toESM(require_react(), 1), $5cb03073d3f54797$export$a8a3e93435678ff9 = (0, import_react103.forwardRef)(function(props, ref) {
- [props, ref] = $64fa3d84918910a7$export$29f1550f4b0d4415(props, ref, $4e85f108e88277b8$export$d688439359537581);
- let { children, level = 3, className, ...domProps } = props, Element2 = `h${level}`;
- return import_react103.default.createElement(Element2, {
- ...domProps,
- ref,
- className: className ?? "react-aria-Heading"
- }, children);
- });
-
- // ../../node_modules/react-aria-components/dist/Text.mjs
- var import_react104 = __toESM(require_react(), 1), $514c0188e459b4c0$export$9afb8bc826b033ea = (0, import_react104.createContext)({}), $514c0188e459b4c0$export$5f1af8db9871e1d6 = (0, import_react104.forwardRef)(function(props, ref) {
- [props, ref] = $64fa3d84918910a7$export$29f1550f4b0d4415(props, ref, $514c0188e459b4c0$export$9afb8bc826b033ea);
- let { elementType: ElementType = "span", ...domProps } = props;
- return import_react104.default.createElement(ElementType, {
- className: "react-aria-Text",
- ...domProps,
- ref
- });
- });
-
- // src/components/components/Modal/Modal.styled.tsx
- init_theming();
- var fadeIn = keyframes({
- from: { opacity: 0 },
- to: { opacity: 1 }
- }), fadeOut = keyframes({
- from: { opacity: 1 },
- to: { opacity: 0 }
- }), expand = keyframes({
- from: { maxHeight: 0 },
- to: {}
- }), zoomIn = keyframes({
- from: {
- opacity: 0,
- transform: "translate(-50%, -50%) scale(0.9)"
- },
- to: {
- opacity: 1,
- transform: "translate(-50%, -50%) scale(1)"
- }
- }), zoomOut = keyframes({
- from: {
- opacity: 1,
- transform: "translate(-50%, -50%) scale(1)"
- },
- to: {
- opacity: 0,
- transform: "translate(-50%, -50%) scale(0.9)"
- }
- }), slideFromBottom = keyframes({
- from: {
- opacity: 0,
- maxHeight: "0px"
- },
- to: {
- opacity: 1,
- maxHeight: "80vh"
- }
- }), slideToBottom = keyframes({
- from: {
- opacity: 1,
- maxHeight: "80vh"
- },
- to: {
- opacity: 0,
- maxHeight: "0px"
- }
- }), Overlay = styled.div(({ $status, $transitionDuration }) => ({
- backdropFilter: "blur(24px)",
- background: "rgba(0, 0, 0, 0.4)",
- position: "absolute",
- inset: 0,
- width: "100%",
- height: "100%",
- zIndex: 1e5,
- "@media (prefers-reduced-motion: no-preference)": {
- animation: $status === "exiting" || $status === "preExit" ? `${fadeOut} ${$transitionDuration}ms` : `${fadeIn} ${$transitionDuration}ms`,
- animationFillMode: "forwards"
- }
- })), Container3 = styled.div(
- ({ theme: theme3 }) => ({
- backgroundColor: theme3.background.bar,
- borderRadius: 6,
- boxShadow: "0px 4px 67px 0px #00000040",
- position: "absolute",
- overflow: "auto",
- zIndex: 1e5,
- "&:focus-visible": {
- outline: "none"
- }
- }),
- ({ theme: theme3, width, height, $variant, $status, $transitionDuration }) => $variant === "dialog" ? {
- top: "50%",
- left: "50%",
- width: width ?? 740,
- height: height ?? "auto",
- maxWidth: "calc(100% - 40px)",
- maxHeight: "85vh",
- "@media (prefers-reduced-motion: no-preference)": {
- willChange: "transform, opacity",
- animationTimingFunction: "cubic-bezier(0.32, 0.72, 0, 1)",
- animation: $status === "exiting" || $status === "preExit" ? `${zoomOut} ${$transitionDuration}ms` : `${zoomIn} ${$transitionDuration}ms`,
- animationFillMode: "forwards !important"
- },
- "@media (prefers-reduced-motion: reduce)": {
- transform: "translate(-50%, -50%) scale(1)"
- }
- } : {
- bottom: "0",
- left: "0",
- right: "0",
- borderRadius: "10px 10px 0 0",
- overflow: "hidden",
- width: width ?? "100%",
- height: height ?? "80%",
- maxWidth: "100%",
- background: theme3.background.content,
- "@supports (interpolate-size: allow-keywords)": {
- interpolateSize: "allow-keywords"
- },
- "@media (prefers-reduced-motion: no-preference)": {
- animationTimingFunction: "cubic-bezier(.9,.16,.77,.64)",
- animation: $status === "exiting" || $status === "preExit" ? `${slideToBottom} ${$transitionDuration}ms` : `${slideFromBottom} ${$transitionDuration}ms`,
- animationFillMode: "forwards !important"
- }
- }
- ), Close = ({ asChild, children, onClick, ...props }) => {
- let { close } = (0, import_react105.useContext)(ModalContext);
- if (asChild && import_react105.default.isValidElement(children)) {
- let handleClick = (event) => {
- onClick?.(event), children.props.onClick?.(event), close?.();
- };
- return import_react105.default.cloneElement(children, {
- ...props,
- onClick: handleClick
- });
- }
- return import_react105.default.createElement(
- Button,
- {
- type: "button",
- padding: "small",
- ariaLabel: "Close modal",
- variant: "ghost",
- shortcut: ["Escape"],
- onClick: close
- },
- import_react105.default.createElement(CrossIcon, null)
- );
- }, Dialog = {
- Close: () => (deprecate("Modal.Dialog.Close is deprecated, please use Modal.Close instead."), import_react105.default.createElement(Close, { "data-deprecated": "Modal.Dialog.Close" }))
- }, CloseButton = ({ ariaLabel, ...props }) => (deprecate("Modal.CloseButton is deprecated, please use Modal.Close instead."), import_react105.default.createElement(Close, { asChild: !0 }, import_react105.default.createElement(Button, { ariaLabel: ariaLabel || "Close", "data-deprecated": "Modal.CloseButton", ...props }, import_react105.default.createElement(CrossIcon, null)))), Content = styled.div({
- display: "flex",
- flexDirection: "column",
- margin: 16,
- gap: 16
- }), Row = styled.div({
- display: "flex",
- justifyContent: "space-between",
- gap: 16
- }), Col = styled.div({
- display: "flex",
- flexDirection: "column",
- gap: 4
- }), Header = ({
- hasClose = !0,
- onClose,
- ...props
- }) => import_react105.default.createElement(Row, null, import_react105.default.createElement(Col, { ...props }), hasClose && import_react105.default.createElement(Close, { onClick: onClose })), Title = styled((props) => import_react105.default.createElement($5cb03073d3f54797$export$a8a3e93435678ff9, { level: 2, ...props }))(({ theme: theme3 }) => ({
- margin: 0,
- fontSize: theme3.typography.size.s3,
- fontWeight: theme3.typography.weight.bold
- })), Description = styled($514c0188e459b4c0$export$5f1af8db9871e1d6)(({ theme: theme3 }) => ({
- position: "relative",
- zIndex: 1,
- margin: 0,
- fontSize: theme3.typography.size.s2
- })), Actions = styled.div({
- display: "flex",
- flexDirection: "row-reverse",
- gap: 8
- }), ErrorWrapper = styled.div(({ theme: theme3 }) => ({
- maxHeight: 100,
- overflow: "auto",
- "@media (prefers-reduced-motion: no-preference)": {
- animation: `${expand} 300ms, ${fadeIn} 300ms`
- },
- backgroundColor: theme3.background.critical,
- color: theme3.color.lightest,
- fontSize: theme3.typography.size.s2,
- "& > div": {
- position: "relative",
- padding: "8px 16px"
- }
- })), Error2 = ({
- children,
- ...props
- }) => import_react105.default.createElement(ErrorWrapper, { ...props }, import_react105.default.createElement("div", null, children));
-
- // src/components/components/Modal/Modal.tsx
- var ModalContext = (0, import_react106.createContext)({});
- function BaseModal({
- container,
- portalSelector,
- children,
- width,
- height,
- ariaLabel,
- dismissOnClickOutside = !0,
- dismissOnEscape = !0,
- className,
- open,
- onEscapeKeyDown,
- onInteractOutside,
- onOpenChange,
- defaultOpen,
- transitionDuration = 200,
- variant = "dialog",
- ...props
- }) {
- let deprecated;
- (ariaLabel === void 0 || ariaLabel === "") && (deprecated = "ariaLabel", deprecate("The `ariaLabel` prop on `Modal` will become mandatory in Storybook 11.")), onEscapeKeyDown !== void 0 && (deprecated = "onEscapeKeyDown", deprecate(
- "The `onEscapeKeyDown` prop is deprecated and will be removed in Storybook 11. Use `dismissOnEscape` instead."
- )), onInteractOutside !== void 0 && (deprecated = "onInteractOutside", deprecate(
- "The `onInteractOutside` prop is deprecated and will be removed in Storybook 11. Use `dismissOnInteractOutside` instead."
- ));
- let overlayRef = (0, import_react106.useRef)(null), reducedMotion = useMediaQuery("(prefers-reduced-motion: reduce)"), [{ status, isMounted }, toggle] = useTransitionState({
- timeout: reducedMotion ? 0 : transitionDuration,
- mountOnEnter: !0,
- unmountOnExit: !0
- }), state3 = $fc909762b330b746$export$61c6a8c84e605fb6({
- isOpen: open || isMounted,
- defaultOpen,
- onOpenChange: (isOpen) => {
- toggle(isOpen), onOpenChange?.(isOpen);
- }
- }), close = () => {
- state3.close();
- }, { modalProps, underlayProps } = $8ac8429251c45e4b$export$dbc0f175b25fb0fb(
- {
- isDismissable: dismissOnClickOutside,
- isKeyboardDismissDisabled: !0,
- shouldCloseOnInteractOutside: onInteractOutside ? (element) => {
- let mockedEvent = new MouseEvent("click", {
- bubbles: !0,
- cancelable: !0,
- relatedTarget: element
- });
- return onInteractOutside(mockedEvent), !mockedEvent.defaultPrevented;
- } : void 0
- },
- state3,
- overlayRef
- );
- if ((0, import_react106.useEffect)(() => {
- let shouldBeOpen = open ?? defaultOpen ?? !1;
- shouldBeOpen && !isMounted ? toggle(!0) : !shouldBeOpen && isMounted && toggle(!1);
- }, [open, defaultOpen, isMounted, toggle]), (0, import_react106.useEffect)(() => {
- isMounted && (open || defaultOpen) && onOpenChange?.(!0);
- }, [isMounted]), (0, import_react106.useEffect)(() => {
- if (isMounted && (open || defaultOpen) && overlayRef.current)
- return $5e3802645cc19319$export$1c3ebcada18427bf([overlayRef.current], { shouldUseInert: !0 });
- }, [isMounted, open, defaultOpen, overlayRef]), !isMounted || status === "exited" || status === "unmounted")
- return null;
- let finalModalProps = $3ef42575df84b30b$export$9d1611c77c2fe928(modalProps, {
- onKeyDown: (e) => {
- e.key !== "Escape" ? modalProps.onKeyDown?.(e) : dismissOnEscape && (onEscapeKeyDown?.(e.nativeEvent), e.nativeEvent.defaultPrevented || close());
- }
- }), containerElement = container ?? (portalSelector ? document.querySelector(portalSelector) : void 0);
- return import_react106.default.createElement($337b884510726a0d$export$c6fdb837b070b4ff, { disableFocusManagement: !0, portalContainer: containerElement || void 0 }, import_react106.default.createElement($9bf71ea28793e738$export$20e40289641fbbb6, { restoreFocus: !0, contain: !0, autoFocus: !0 }, import_react106.default.createElement(
- Overlay,
- {
- $status: status,
- $transitionDuration: transitionDuration,
- ...underlayProps
- }
- ), import_react106.default.createElement("div", { role: "dialog", "aria-label": ariaLabel, ref: overlayRef, ...finalModalProps }, import_react106.default.createElement(ModalContext.Provider, { value: { close } }, import_react106.default.createElement("div", { tabIndex: -1 }, import_react106.default.createElement(
- Container3,
- {
- "data-deprecated": deprecated,
- $variant: variant,
- $status: status,
- $transitionDuration: transitionDuration,
- className,
- width,
- height,
- ...props
- },
- children
- ))))));
- }
- var Modal = Object.assign(BaseModal, Modal_styled_exports), ModalDecorator = (Story, { args }) => {
- let [container, setContainer] = (0, import_react106.useState)(null);
- return args.container || args.portalSelector ? import_react106.default.createElement(Story, { args }) : import_react106.default.createElement(import_react106.default.Fragment, null, import_react106.default.createElement($96b38030c423d352$export$78efe591171d7d45, { getContainer: () => container }, import_react106.default.createElement(Story, { args })), import_react106.default.createElement(
- "div",
- {
- ref: (element) => setContainer(element ?? null),
- style: {
- width: "100%",
- height: "100%",
- minHeight: "600px",
- transform: "translateZ(0)"
- }
- }
- ));
- };
-
- // src/components/components/spaced/Spaced.tsx
- var import_react107 = __toESM(require_react(), 1);
- init_theming();
- var toNumber2 = (input2) => typeof input2 == "number" ? input2 : Number(input2), Container4 = styled.div(
- ({ theme: theme3, col, row = 1 }) => col ? {
- display: "inline-block",
- verticalAlign: "inherit",
- "& > *": {
- marginLeft: col * theme3.layoutMargin,
- verticalAlign: "inherit"
- },
- [`& > *:first-child${ignoreSsrWarning}`]: {
- marginLeft: 0
- }
- } : {
- "& > *": {
- marginTop: row * theme3.layoutMargin
- },
- [`& > *:first-child${ignoreSsrWarning}`]: {
- marginTop: 0
- }
- },
- ({ theme: theme3, outer, col, row }) => {
- switch (!0) {
- case !!(outer && col):
- return {
- marginLeft: outer * theme3.layoutMargin,
- marginRight: outer * theme3.layoutMargin
- };
- case !!(outer && row):
- return {
- marginTop: outer * theme3.layoutMargin,
- marginBottom: outer * theme3.layoutMargin
- };
- default:
- return {};
- }
- }
- ), Spaced = ({ col, row, outer, children, ...rest }) => {
- let outerAmount = toNumber2(typeof outer == "number" || !outer ? outer : col || row);
- return import_react107.default.createElement(Container4, { col, row, outer: outerAmount, ...rest }, children);
- };
-
- // src/components/components/placeholder/placeholder.tsx
- var import_react108 = __toESM(require_react(), 1);
- init_theming();
- var Title2 = styled.div(({ theme: theme3 }) => ({
- fontWeight: theme3.typography.weight.bold
- })), Desc = styled.div(), Message = styled.div(({ theme: theme3 }) => ({
- padding: 30,
- textAlign: "center",
- color: theme3.color.defaultText,
- fontSize: theme3.typography.size.s2 - 1
- })), Placeholder = ({ children, ...props }) => {
- let [title, desc] = import_react108.Children.toArray(children);
- return import_react108.default.createElement(Message, { ...props }, import_react108.default.createElement(Title2, null, title), desc && import_react108.default.createElement(Desc, null, desc));
- };
-
- // src/components/index.ts
- init_ScrollArea();
-
- // src/components/components/Zoom/ZoomElement.tsx
- var import_react110 = __toESM(require_react(), 1);
- init_theming();
-
- // ../../node_modules/use-resize-observer/dist/bundle.esm.js
- var import_react109 = __toESM(require_react());
- function useResolvedElement(subscriber, refOrElement) {
- var lastReportRef = (0, import_react109.useRef)(null), refOrElementRef = (0, import_react109.useRef)(null);
- refOrElementRef.current = refOrElement;
- var cbElementRef = (0, import_react109.useRef)(null);
- (0, import_react109.useEffect)(function() {
- evaluateSubscription();
- });
- var evaluateSubscription = (0, import_react109.useCallback)(function() {
- var cbElement = cbElementRef.current, refOrElement2 = refOrElementRef.current, element = cbElement || (refOrElement2 ? refOrElement2 instanceof Element ? refOrElement2 : refOrElement2.current : null);
- lastReportRef.current && lastReportRef.current.element === element && lastReportRef.current.subscriber === subscriber || (lastReportRef.current && lastReportRef.current.cleanup && lastReportRef.current.cleanup(), lastReportRef.current = {
- element,
- subscriber,
- // Only calling the subscriber, if there's an actual element to report.
- // Setting cleanup to undefined unless a subscriber returns one, as an existing cleanup function would've been just called.
- cleanup: element ? subscriber(element) : void 0
- });
- }, [subscriber]);
- return (0, import_react109.useEffect)(function() {
- return function() {
- lastReportRef.current && lastReportRef.current.cleanup && (lastReportRef.current.cleanup(), lastReportRef.current = null);
- };
- }, []), (0, import_react109.useCallback)(function(element) {
- cbElementRef.current = element, evaluateSubscription();
- }, [evaluateSubscription]);
- }
- function extractSize(entry, boxProp, sizeType) {
- return entry[boxProp] ? entry[boxProp][0] ? entry[boxProp][0][sizeType] : (
- // TS complains about this, because the RO entry type follows the spec and does not reflect Firefox's current
- // behaviour of returning objects instead of arrays for `borderBoxSize` and `contentBoxSize`.
- // @ts-ignore
- entry[boxProp][sizeType]
- ) : boxProp === "contentBoxSize" ? entry.contentRect[sizeType === "inlineSize" ? "width" : "height"] : void 0;
- }
- function useResizeObserver2(opts) {
- opts === void 0 && (opts = {});
- var onResize = opts.onResize, onResizeRef = (0, import_react109.useRef)(void 0);
- onResizeRef.current = onResize;
- var round3 = opts.round || Math.round, resizeObserverRef = (0, import_react109.useRef)(), _useState = (0, import_react109.useState)({
- width: void 0,
- height: void 0
- }), size = _useState[0], setSize = _useState[1], didUnmount = (0, import_react109.useRef)(!1);
- (0, import_react109.useEffect)(function() {
- return didUnmount.current = !1, function() {
- didUnmount.current = !0;
- };
- }, []);
- var previous = (0, import_react109.useRef)({
- width: void 0,
- height: void 0
- }), refCallback = useResolvedElement((0, import_react109.useCallback)(function(element) {
- return (!resizeObserverRef.current || resizeObserverRef.current.box !== opts.box || resizeObserverRef.current.round !== round3) && (resizeObserverRef.current = {
- box: opts.box,
- round: round3,
- instance: new ResizeObserver(function(entries) {
- var entry = entries[0], boxProp = opts.box === "border-box" ? "borderBoxSize" : opts.box === "device-pixel-content-box" ? "devicePixelContentBoxSize" : "contentBoxSize", reportedWidth = extractSize(entry, boxProp, "inlineSize"), reportedHeight = extractSize(entry, boxProp, "blockSize"), newWidth = reportedWidth ? round3(reportedWidth) : void 0, newHeight = reportedHeight ? round3(reportedHeight) : void 0;
- if (previous.current.width !== newWidth || previous.current.height !== newHeight) {
- var newSize = {
- width: newWidth,
- height: newHeight
- };
- previous.current.width = newWidth, previous.current.height = newHeight, onResizeRef.current ? onResizeRef.current(newSize) : didUnmount.current || setSize(newSize);
- }
- })
- }), resizeObserverRef.current.instance.observe(element, {
- box: opts.box
- }), function() {
- resizeObserverRef.current && resizeObserverRef.current.instance.unobserve(element);
- };
- }, [opts.box, round3]), opts.ref);
- return (0, import_react109.useMemo)(function() {
- return {
- ref: refCallback,
- width: size.width,
- height: size.height
- };
- }, [refCallback, size.width, size.height]);
- }
-
- // src/components/components/Zoom/ZoomElement.tsx
- var ZoomElementWrapper = styled.div(
- ({ centered = !1, scale = 1, elementHeight }) => ({
- height: elementHeight || "auto",
- transformOrigin: centered ? "center top" : "left top",
- transform: `scale(${1 / scale})`
- })
- );
- function ZoomElement({ centered, scale, children }) {
- let componentWrapperRef = (0, import_react110.useRef)(null), [elementHeight, setElementHeight] = (0, import_react110.useState)(0), onResize = (0, import_react110.useCallback)(
- ({ height }) => {
- height && setElementHeight(height / scale);
- },
- [scale]
- );
- return (0, import_react110.useEffect)(() => {
- componentWrapperRef.current && setElementHeight(componentWrapperRef.current.getBoundingClientRect().height);
- }, [scale]), useResizeObserver2({
- ref: componentWrapperRef,
- onResize
- }), import_react110.default.createElement(ZoomElementWrapper, { centered, scale, elementHeight }, import_react110.default.createElement("div", { ref: componentWrapperRef, className: "innerZoomElementWrapper" }, children));
- }
-
- // src/components/components/Zoom/ZoomIFrame.tsx
- var import_react111 = __toESM(require_react(), 1), ZoomIFrame = class extends import_react111.Component {
- constructor() {
- super(...arguments);
- // @ts-expect-error (non strict)
- this.iframe = null;
- }
- componentDidMount() {
- let { iFrameRef } = this.props;
- this.iframe = iFrameRef.current;
- }
- shouldComponentUpdate(nextProps) {
- let { scale, active } = this.props;
- return scale !== nextProps.scale && this.setIframeInnerZoom(nextProps.scale), active !== nextProps.active && this.iframe.setAttribute("data-is-storybook", nextProps.active ? "true" : "false"), nextProps.children.props.src !== this.props.children.props.src;
- }
- setIframeInnerZoom(scale) {
- try {
- Object.assign(this.iframe.contentDocument.body.style, {
- width: `${1 / scale * 100}%`,
- height: `${1 / scale * 100}%`,
- transform: `scale(${scale})`,
- transformOrigin: "top left"
- });
- } catch {
- this.setIframeZoom(scale);
- }
- }
- setIframeZoom(scale) {
- Object.assign(this.iframe.style, {
- width: `${1 / scale * 100}%`,
- height: `${1 / scale * 100}%`,
- transform: `scale(${scale})`,
- transformOrigin: "top left"
- });
- }
- render() {
- let { children } = this.props;
- return import_react111.default.createElement(import_react111.default.Fragment, null, children);
- }
- };
-
- // src/components/components/Zoom/Zoom.tsx
- var Zoom = {
- Element: ZoomElement,
- IFrame: ZoomIFrame
- };
-
- // src/components/components/ErrorFormatter/ErrorFormatter.tsx
- var import_react112 = __toESM(require_react(), 1);
- init_dist();
- init_theming();
- var { document: document11 } = scope, ErrorName = styled.strong(({ theme: theme3 }) => ({
- color: theme3.color.orange
- })), ErrorImportant = styled.strong(({ theme: theme3 }) => ({
- color: theme3.color.ancillary,
- textDecoration: "underline"
- })), ErrorDetail = styled.em(({ theme: theme3 }) => ({
- color: theme3.textMutedColor
- })), firstLineRegex = /(Error): (.*)\n/, linesRegexChromium = /at (?:(.*) )?\(?(.+)\)?/, linesRegexFirefox = /([^@]+)?(?:\/<)?@(.+)?/, linesRegexSafari = /([^@]+)?@(.+)?/, ErrorFormatter = ({ error }) => {
- if (!error)
- return import_react112.default.createElement(import_react112.Fragment, null, "This error has no stack or message");
- if (!error.stack)
- return import_react112.default.createElement(import_react112.Fragment, null, error.message || "This error has no stack or message");
- let input2 = error.stack.toString();
- input2 && error.message && !input2.includes(error.message) && (input2 = `Error: ${error.message}
-
- ${input2}`);
- let match3 = input2.match(firstLineRegex);
- if (!match3)
- return import_react112.default.createElement(import_react112.Fragment, null, input2);
- let [, type5, name] = match3, rawLines = input2.split(/\n/).slice(1), [, ...lines] = rawLines.map((line2) => {
- let result = line2.match(linesRegexChromium) || line2.match(linesRegexFirefox) || line2.match(linesRegexSafari);
- return result ? {
- name: (result[1] || "").replace("/<", ""),
- location: result[2].replace(document11.location.origin, "")
- } : null;
- }).filter(Boolean);
- return import_react112.default.createElement(import_react112.Fragment, null, import_react112.default.createElement("span", null, type5), ": ", import_react112.default.createElement(ErrorName, null, name), import_react112.default.createElement("br", null), lines.map(
- (l, i) => l?.name ? import_react112.default.createElement(import_react112.Fragment, { key: i }, " ", "at ", import_react112.default.createElement(ErrorImportant, null, l.name), " (", import_react112.default.createElement(ErrorDetail, null, l.location), ")", import_react112.default.createElement("br", null)) : import_react112.default.createElement(import_react112.Fragment, { key: i }, " ", "at ", import_react112.default.createElement(ErrorDetail, null, l?.location), import_react112.default.createElement("br", null))
- ));
- };
-
- // src/components/components/Select/Select.tsx
- var import_react125 = __toESM(require_react(), 1);
- init_polished_esm();
- init_theming();
-
- // src/components/components/Form/Form.tsx
- init_theming();
-
- // src/components/components/Form/Checkbox.tsx
- var import_react113 = __toESM(require_react(), 1);
- init_theming();
- var Input = styled.input(({ theme: theme3 }) => ({
- appearance: "none",
- backgroundColor: theme3.input.background,
- border: `1px solid ${theme3.base === "dark" ? "hsl(0 0 100 / 0.4)" : "hsl(0 0 0 / 0.44)"}`,
- borderRadius: 2,
- display: "grid",
- flexShrink: 0,
- height: 14,
- margin: 0,
- placeContent: "center",
- transition: "background-color 0.1s",
- width: 14,
- "&:enabled": {
- cursor: "pointer"
- },
- "&:disabled": {
- backgroundColor: "transparent",
- borderColor: theme3.input.border
- },
- "&:disabled:checked, &:disabled:indeterminate": {
- backgroundColor: theme3.base === "dark" ? color.dark : theme3.color.mediumdark
- },
- "&:checked, &:indeterminate": {
- border: "none",
- backgroundColor: color.secondary
- },
- "&:checked::before": {
- content: '""',
- width: 14,
- height: 14,
- background: `no-repeat center url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2' d='m3 7 2.5 2.5L11 4'/%3E%3C/svg%3E")`
- },
- "&:indeterminate::before": {
- content: '""',
- width: 8,
- height: 2,
- background: "white"
- },
- "&:enabled:focus-visible": {
- outline: `2px solid ${theme3.color.secondary}`,
- outlineOffset: 2
- }
- })), Checkbox = (props) => import_react113.default.createElement(Input, { ...props, type: "checkbox" });
-
- // src/components/components/Form/Field.tsx
- var import_react114 = __toESM(require_react(), 1);
- init_theming();
- var Wrapper2 = styled.label(({ theme: theme3 }) => ({
- display: "flex",
- borderBottom: `1px solid ${theme3.appBorderColor}`,
- margin: "0 15px",
- padding: "8px 0",
- "&:last-child": {
- marginBottom: "3rem"
- }
- })), Label = styled.span(({ theme: theme3 }) => ({
- minWidth: 100,
- fontWeight: theme3.typography.weight.bold,
- marginRight: 15,
- display: "flex",
- justifyContent: "flex-start",
- alignItems: "center",
- lineHeight: "16px"
- })), Field = ({ label, children, ...props }) => import_react114.default.createElement(Wrapper2, { ...props }, label ? import_react114.default.createElement(Label, null, import_react114.default.createElement("span", null, label)) : null, children);
-
- // src/components/components/Form/Input.tsx
- var import_react115 = __toESM(require_react(), 1), import_react116 = __toESM(require_react(), 1);
- init_theming();
-
- // src/components/components/Form/styles.ts
- var sizes = (({ size }) => {
- switch (size) {
- case "100%":
- return { width: "100%" };
- case "flex":
- return { flex: 1 };
- case "auto":
- default:
- return { display: "inline" };
- }
- }), alignment = (({
- align: align2
- }) => {
- switch (align2) {
- case "end":
- return { textAlign: "right" };
- case "center":
- return { textAlign: "center" };
- case "start":
- default:
- return { textAlign: "left" };
- }
- }), validation = (({
- valid,
- theme: theme3
- }) => {
- switch (valid) {
- case "valid":
- return { boxShadow: `${theme3.color.positive} 0 0 0 1px inset !important` };
- case "error":
- return { boxShadow: `${theme3.color.negative} 0 0 0 1px inset !important` };
- case "warn":
- return {
- boxShadow: `${theme3.color.warning} 0 0 0 1px inset`
- };
- case void 0:
- case null:
- default:
- return {};
- }
- }), styleResets = {
- // resets
- appearance: "none",
- border: "0 none",
- boxSizing: "inherit",
- display: "block",
- margin: " 0",
- background: "transparent",
- padding: 0,
- fontSize: "inherit",
- position: "relative"
- }, styles3 = (({ theme: theme3 }) => ({
- ...styleResets,
- transition: "box-shadow 200ms ease-out, opacity 200ms ease-out",
- color: theme3.input.color || "inherit",
- background: theme3.input.background,
- boxShadow: `${theme3.input.border} 0 0 0 1px inset`,
- borderRadius: theme3.input.borderRadius,
- fontSize: theme3.typography.size.s2 - 1,
- lineHeight: "20px",
- padding: "6px 10px",
- // 32
- boxSizing: "border-box",
- height: 32,
- '&[type="file"]': {
- height: "auto"
- },
- "&:focus": {
- boxShadow: `${theme3.color.secondary} 0 0 0 1px inset`,
- outline: "none",
- "@media (forced-colors: active)": {
- outline: "1px solid highlight"
- }
- },
- '&[disabled], &[aria-disabled="true"]': {
- background: theme3.base === "light" ? theme3.color.lighter : "transparent",
- cursor: "not-allowed"
- },
- "&:-webkit-autofill": { WebkitBoxShadow: `0 0 0 3em ${theme3.color.lightest} inset` },
- "&::placeholder": {
- color: theme3.textMutedColor,
- opacity: 1
- }
- }));
-
- // src/components/components/Form/Input.tsx
- var Wrapper3 = styled.div({
- position: "relative",
- width: "100%"
- }), Mask = styled.div(
- ({ theme: theme3 }) => ({
- position: "absolute",
- left: 0,
- right: 0,
- top: 0,
- bottom: 0,
- display: "flex",
- alignItems: "center",
- pointerEvents: "none",
- overflow: "hidden",
- color: theme3.textMutedColor,
- "span:first-of-type": {
- opacity: 0
- }
- }),
- (props) => {
- let { fontSize, lineHeight, padding } = styles3(props);
- return { fontSize, lineHeight, padding };
- }
- ), Input2 = Object.assign(
- styled(
- (0, import_react116.forwardRef)(function({ size, valid, align: align2, value, suffix, ...props }, ref) {
- let suffixId = $bdb11010cef70236$export$f680877a34711e37();
- return import_react115.default.createElement(Wrapper3, null, import_react115.default.createElement(
- "input",
- {
- ...props,
- value,
- ref,
- "aria-describedby": suffix ? suffixId : void 0
- }
- ), suffix && import_react115.default.createElement(Mask, { "aria-hidden": !0 }, import_react115.default.createElement("span", null, value), import_react115.default.createElement("span", { id: suffixId }, suffix)));
- })
- )(styles3, sizes, alignment, validation, {
- minHeight: 32,
- width: "100%"
- }),
- {
- displayName: "Input"
- }
- );
-
- // src/components/components/Form/Radio.tsx
- var import_react117 = __toESM(require_react(), 1);
- init_theming();
- var Input4 = styled.input(({ theme: theme3 }) => ({
- appearance: "none",
- backgroundColor: theme3.input.background,
- border: `1px solid ${theme3.base === "dark" ? "hsl(0 0 100 / 0.4)" : "hsl(0 0 0 / 0.44)"}`,
- borderRadius: 8,
- display: "grid",
- flexShrink: 0,
- height: 16,
- margin: -1,
- placeContent: "center",
- transition: "background-color 0.1s",
- width: 16,
- "&:enabled": {
- cursor: "pointer"
- },
- "&:disabled": {
- backgroundColor: "transparent",
- borderColor: theme3.input.border
- },
- "&:disabled:checked": {
- backgroundColor: theme3.base === "dark" ? color.dark : theme3.color.mediumdark,
- borderColor: theme3.base === "dark" ? color.dark : theme3.color.mediumdark
- },
- "&:checked": {
- backgroundColor: color.secondary,
- borderColor: color.secondary,
- boxShadow: `inset 0 0 0 2px ${theme3.input.background}`
- },
- "&:enabled:focus-visible": {
- outline: `2px solid ${theme3.color.secondary}`,
- outlineOffset: 2
- }
- })), Radio = (props) => import_react117.default.createElement(Input4, { ...props, type: "radio" });
-
- // src/components/components/Form/Select.tsx
- var import_react118 = __toESM(require_react(), 1);
- init_theming();
- var BaseSelect = styled.select(sizes, ({ theme: theme3 }) => ({
- appearance: "none",
- background: `calc(100% - 12px) center no-repeat url("data:image/svg+xml,%3Csvg width='8' height='4' viewBox='0 0 8 4' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1.30303 0.196815C1.13566 0.0294472 0.864304 0.0294472 0.696937 0.196815C0.529569 0.364182 0.529569 0.635539 0.696937 0.802906L3.69694 3.80291C3.8643 3.97027 4.13566 3.97027 4.30303 3.80291L7.30303 0.802906C7.4704 0.635539 7.4704 0.364182 7.30303 0.196815C7.13566 0.0294473 6.8643 0.0294473 6.69694 0.196815L3.99998 2.89377L1.30303 0.196815Z' fill='%2373828C'/%3E%3C/svg%3E%0A")`,
- backgroundSize: 10,
- padding: "6px 30px 6px 10px",
- "@supports (appearance: base-select)": {
- appearance: "base-select",
- background: theme3.input.background,
- padding: "6px 10px"
- },
- transition: "box-shadow 200ms ease-out, opacity 200ms ease-out",
- color: theme3.input.color || "inherit",
- boxShadow: `${theme3.input.border} 0 0 0 1px inset`,
- borderRadius: theme3.input.borderRadius,
- fontSize: theme3.typography.size.s2 - 1,
- lineHeight: "20px",
- boxSizing: "border-box",
- border: "none",
- cursor: "pointer",
- "& > button": {
- display: "flex",
- alignItems: "center",
- justifyContent: "space-between",
- width: "100%",
- gap: 8,
- "& > svg": {
- width: 14,
- height: 14,
- color: theme3.textMutedColor
- }
- },
- "&:has(option:not([hidden]):checked)": {
- color: theme3.color.defaultText
- },
- "&:focus-visible, &:focus-within": {
- outline: "none",
- boxShadow: `${theme3.color.secondary} 0 0 0 1px inset`
- },
- "&::picker-icon": {
- display: "none"
- },
- "&::picker(select)": {
- appearance: "base-select",
- border: `1px solid ${theme3.input.border}`,
- padding: 4,
- marginTop: 4,
- background: theme3.base === "light" ? lightenColor(theme3.background.app) : theme3.background.app,
- filter: `
- drop-shadow(0 5px 5px rgba(0,0,0,0.05))
- drop-shadow(0 0 3px rgba(0,0,0,0.1))
- `,
- borderRadius: theme3.appBorderRadius + 2,
- fontSize: theme3.typography.size.s1,
- cursor: "default",
- transition: "opacity 100ms ease-in-out, transform 100ms ease-in-out",
- transformOrigin: "top",
- transform: "translateY(0)",
- opacity: 1,
- "@starting-style": {
- transform: "translateY(-0.25rem) scale(0.95)",
- opacity: 0
- }
- },
- "& optgroup label": {
- display: "block",
- padding: "3px 6px"
- },
- "& option": {
- lineHeight: "18px",
- padding: "7px 10px",
- borderRadius: 4,
- outline: "none",
- cursor: "pointer",
- color: theme3.color.defaultText,
- "&::checkmark": {
- display: "none"
- },
- "&:hover, &:focus-visible": {
- backgroundColor: theme3.background.hoverable
- },
- "&:checked": {
- color: theme3.color.secondary,
- fontWeight: theme3.typography.weight.bold
- },
- "&:disabled": {
- backgroundColor: "transparent",
- cursor: "default",
- color: theme3.color.defaultText
- }
- }
- })), Select = ({ children, ...props }) => (
- // @ts-expect-error Weird props mismatch
- import_react118.default.createElement(BaseSelect, { ...props }, !isTestEnvironment() && import_react118.default.createElement("button", null, import_react118.default.createElement("selectedcontent", null), import_react118.default.createElement(
- "svg",
- {
- xmlns: "http://www.w3.org/2000/svg",
- viewBox: "0 0 24 24",
- fill: "none",
- stroke: "currentColor",
- strokeWidth: "2",
- strokeLinecap: "round",
- strokeLinejoin: "round",
- "aria-hidden": "true"
- },
- import_react118.default.createElement("path", { d: "m6 9 6 6 6-6" })
- )), import_react118.default.createElement("optgroup", null, children))
- );
-
- // src/components/components/Form/Textarea.tsx
- var import_react122 = __toESM(require_react(), 1);
-
- // ../../node_modules/react-textarea-autosize/dist/react-textarea-autosize.browser.esm.js
- init_extends();
- init_objectWithoutPropertiesLoose();
- var React60 = __toESM(require_react());
-
- // ../../node_modules/use-latest/dist/use-latest.esm.js
- var import_react120 = __toESM(require_react());
-
- // ../../node_modules/use-isomorphic-layout-effect/dist/use-isomorphic-layout-effect.browser.esm.js
- var import_react119 = __toESM(require_react()), index2 = import_react119.useLayoutEffect;
-
- // ../../node_modules/use-latest/dist/use-latest.esm.js
- var useLatest = function(value) {
- var ref = import_react120.default.useRef(value);
- return index2(function() {
- ref.current = value;
- }), ref;
- };
-
- // ../../node_modules/use-composed-ref/dist/use-composed-ref.esm.js
- var import_react121 = __toESM(require_react()), updateRef = function(ref, value) {
- if (typeof ref == "function") {
- ref(value);
- return;
- }
- ref.current = value;
- }, useComposedRef = function(libRef, userRef) {
- var prevUserRef = import_react121.default.useRef();
- return import_react121.default.useCallback(function(instance) {
- libRef.current = instance, prevUserRef.current && updateRef(prevUserRef.current, null), prevUserRef.current = userRef, userRef && updateRef(userRef, instance);
- }, [userRef]);
- };
-
- // ../../node_modules/react-textarea-autosize/dist/react-textarea-autosize.browser.esm.js
- var HIDDEN_TEXTAREA_STYLE = {
- "min-height": "0",
- "max-height": "none",
- height: "0",
- visibility: "hidden",
- overflow: "hidden",
- position: "absolute",
- "z-index": "-1000",
- top: "0",
- right: "0",
- display: "block"
- }, forceHiddenStyles = function(node2) {
- Object.keys(HIDDEN_TEXTAREA_STYLE).forEach(function(key) {
- node2.style.setProperty(key, HIDDEN_TEXTAREA_STYLE[key], "important");
- });
- }, forceHiddenStyles$1 = forceHiddenStyles, hiddenTextarea = null, getHeight = function(node2, sizingData) {
- var height = node2.scrollHeight;
- return sizingData.sizingStyle.boxSizing === "border-box" ? height + sizingData.borderSize : height - sizingData.paddingSize;
- };
- function calculateNodeHeight(sizingData, value, minRows, maxRows) {
- minRows === void 0 && (minRows = 1), maxRows === void 0 && (maxRows = 1 / 0), hiddenTextarea || (hiddenTextarea = document.createElement("textarea"), hiddenTextarea.setAttribute("tabindex", "-1"), hiddenTextarea.setAttribute("aria-hidden", "true"), forceHiddenStyles$1(hiddenTextarea)), hiddenTextarea.parentNode === null && document.body.appendChild(hiddenTextarea);
- var paddingSize = sizingData.paddingSize, borderSize = sizingData.borderSize, sizingStyle = sizingData.sizingStyle, boxSizing = sizingStyle.boxSizing;
- Object.keys(sizingStyle).forEach(function(_key) {
- var key = _key;
- hiddenTextarea.style[key] = sizingStyle[key];
- }), forceHiddenStyles$1(hiddenTextarea), hiddenTextarea.value = value;
- var height = getHeight(hiddenTextarea, sizingData);
- hiddenTextarea.value = value, height = getHeight(hiddenTextarea, sizingData), hiddenTextarea.value = "x";
- var rowHeight = hiddenTextarea.scrollHeight - paddingSize, minHeight = rowHeight * minRows;
- boxSizing === "border-box" && (minHeight = minHeight + paddingSize + borderSize), height = Math.max(minHeight, height);
- var maxHeight = rowHeight * maxRows;
- return boxSizing === "border-box" && (maxHeight = maxHeight + paddingSize + borderSize), height = Math.min(maxHeight, height), [height, rowHeight];
- }
- var noop3 = function() {
- }, pick2 = function(props, obj) {
- return props.reduce(function(acc, prop) {
- return acc[prop] = obj[prop], acc;
- }, {});
- }, SIZING_STYLE = [
- "borderBottomWidth",
- "borderLeftWidth",
- "borderRightWidth",
- "borderTopWidth",
- "boxSizing",
- "fontFamily",
- "fontSize",
- "fontStyle",
- "fontWeight",
- "letterSpacing",
- "lineHeight",
- "paddingBottom",
- "paddingLeft",
- "paddingRight",
- "paddingTop",
- // non-standard
- "tabSize",
- "textIndent",
- // non-standard
- "textRendering",
- "textTransform",
- "width",
- "wordBreak",
- "wordSpacing",
- "scrollbarGutter"
- ], isIE = !!document.documentElement.currentStyle, getSizingData = function(node2) {
- var style = window.getComputedStyle(node2);
- if (style === null)
- return null;
- var sizingStyle = pick2(SIZING_STYLE, style), boxSizing = sizingStyle.boxSizing;
- if (boxSizing === "")
- return null;
- isIE && boxSizing === "border-box" && (sizingStyle.width = parseFloat(sizingStyle.width) + parseFloat(sizingStyle.borderRightWidth) + parseFloat(sizingStyle.borderLeftWidth) + parseFloat(sizingStyle.paddingRight) + parseFloat(sizingStyle.paddingLeft) + "px");
- var paddingSize = parseFloat(sizingStyle.paddingBottom) + parseFloat(sizingStyle.paddingTop), borderSize = parseFloat(sizingStyle.borderBottomWidth) + parseFloat(sizingStyle.borderTopWidth);
- return {
- sizingStyle,
- paddingSize,
- borderSize
- };
- }, getSizingData$1 = getSizingData;
- function useListener(target, type5, listener) {
- var latestListener = useLatest(listener);
- React60.useLayoutEffect(function() {
- var handler = function(ev) {
- return latestListener.current(ev);
- };
- if (target)
- return target.addEventListener(type5, handler), function() {
- return target.removeEventListener(type5, handler);
- };
- }, []);
- }
- var useFormResetListener = function(libRef, listener) {
- useListener(document.body, "reset", function(ev) {
- libRef.current.form === ev.target && listener(ev);
- });
- }, useWindowResizeListener = function(listener) {
- useListener(window, "resize", listener);
- }, useFontsLoadedListener = function(listener) {
- useListener(document.fonts, "loadingdone", listener);
- }, _excluded4 = ["cacheMeasurements", "maxRows", "minRows", "onChange", "onHeightChange"], TextareaAutosize = function(_ref, userRef) {
- var cacheMeasurements = _ref.cacheMeasurements, maxRows = _ref.maxRows, minRows = _ref.minRows, _ref$onChange = _ref.onChange, onChange = _ref$onChange === void 0 ? noop3 : _ref$onChange, _ref$onHeightChange = _ref.onHeightChange, onHeightChange = _ref$onHeightChange === void 0 ? noop3 : _ref$onHeightChange, props = _objectWithoutPropertiesLoose(_ref, _excluded4), isControlled = props.value !== void 0, libRef = React60.useRef(null), ref = useComposedRef(libRef, userRef), heightRef = React60.useRef(0), measurementsCacheRef = React60.useRef(), resizeTextarea = function() {
- var node2 = libRef.current, nodeSizingData = cacheMeasurements && measurementsCacheRef.current ? measurementsCacheRef.current : getSizingData$1(node2);
- if (nodeSizingData) {
- measurementsCacheRef.current = nodeSizingData;
- var _calculateNodeHeight = calculateNodeHeight(nodeSizingData, node2.value || node2.placeholder || "x", minRows, maxRows), height = _calculateNodeHeight[0], rowHeight = _calculateNodeHeight[1];
- heightRef.current !== height && (heightRef.current = height, node2.style.setProperty("height", height + "px", "important"), onHeightChange(height, {
- rowHeight
- }));
- }
- }, handleChange = function(event) {
- isControlled || resizeTextarea(), onChange(event);
- };
- return React60.useLayoutEffect(resizeTextarea), useFormResetListener(libRef, function() {
- if (!isControlled) {
- var currentValue = libRef.current.value;
- requestAnimationFrame(function() {
- var node2 = libRef.current;
- node2 && currentValue !== node2.value && resizeTextarea();
- });
- }
- }), useWindowResizeListener(resizeTextarea), useFontsLoadedListener(resizeTextarea), React60.createElement("textarea", _extends({}, props, {
- onChange: handleChange,
- ref
- }));
- }, index3 = React60.forwardRef(TextareaAutosize);
-
- // src/components/components/Form/Textarea.tsx
- init_theming();
- var Textarea = Object.assign(
- styled(
- (0, import_react122.forwardRef)(function({ size, valid, align: align2, ...props }, ref) {
- return import_react122.default.createElement(index3, { ...props, ref });
- })
- )(styles3, sizes, alignment, validation, ({ height = 400 }) => ({
- overflow: "visible",
- maxHeight: height
- })),
- {
- displayName: "Textarea"
- }
- );
-
- // src/components/components/Form/Form.tsx
- var Form2 = Object.assign(
- styled.form({
- boxSizing: "border-box",
- width: "100%"
- }),
- {
- Field,
- Input: Input2,
- Select,
- Textarea,
- Button,
- Checkbox,
- Radio
- }
- );
-
- // src/components/components/Popover/Popover.tsx
- var import_react123 = __toESM(require_react(), 1);
- init_theming();
- var Wrapper4 = styled.div(
- ({ hasCloseButton, padding }) => ({
- display: "inline-block",
- position: "relative",
- minHeight: hasCloseButton ? 36 : void 0,
- zIndex: 2147483647,
- colorScheme: "light dark",
- padding
- }),
- ({ theme: theme3, hasChrome }) => hasChrome ? {
- filter: `
- drop-shadow(0px 5px 5px rgba(0,0,0,0.05))
- drop-shadow(0 1px 3px rgba(0,0,0,0.1))
- `,
- borderRadius: theme3.appBorderRadius + 2,
- fontSize: theme3.typography.size.s1
- } : {},
- ({ theme: theme3, bgColor }) => bgColor === "default" && {
- background: theme3.base === "light" ? lightenColor(theme3.background.app) : theme3.background.app,
- color: theme3.color.defaultText
- },
- ({ theme: theme3, bgColor }) => bgColor === "inverse" && {
- background: theme3.base === "light" ? theme3.color.darkest : theme3.color.lightest,
- color: theme3.color.inverseText
- },
- ({ theme: theme3, bgColor }) => (bgColor === "positive" || bgColor === "negative" || bgColor === "warning") && {
- background: theme3.background[bgColor],
- color: theme3.color[`${bgColor}Text`]
- }
- ), AbsoluteButton = styled(Button)({
- position: "absolute",
- top: 4,
- right: 4
- }), Popover = (0, import_react123.forwardRef)(
- ({
- children,
- color: color2 = "default",
- hasChrome = !0,
- hideLabel = "Close",
- onHide,
- padding = 8,
- ...props
- }, ref) => import_react123.default.createElement(
- Wrapper4,
- {
- bgColor: color2,
- hasChrome,
- hasCloseButton: !!onHide,
- padding,
- ref,
- ...props
- },
- children,
- onHide && import_react123.default.createElement(
- AbsoluteButton,
- {
- ariaLabel: hideLabel,
- onClick: onHide,
- padding: "small",
- variant: "ghost",
- size: "small"
- },
- import_react123.default.createElement(CloseIcon, null)
- )
- )
- );
- Popover.displayName = "Popover";
-
- // src/components/components/Select/SelectOption.tsx
- var import_react124 = __toESM(require_react(), 1);
- var SelectOption = ({
- id,
- title,
- description,
- icon,
- aside,
- children,
- isSelected,
- isActive,
- onClick,
- onFocus,
- onKeyDown,
- shouldLookDisabled = !1,
- ...props
- }) => import_react124.default.createElement(
- ActionList.Item,
- {
- ...props,
- id,
- role: "option",
- tabIndex: isActive ? 0 : -1,
- "aria-selected": isSelected,
- "aria-disabled": shouldLookDisabled ? !0 : void 0,
- onClick,
- onFocus,
- onKeyDown
- },
- children ?? import_react124.default.createElement(import_react124.default.Fragment, null, icon && import_react124.default.createElement(ActionList.Icon, null, icon), import_react124.default.createElement(ActionList.Text, null, import_react124.default.createElement("p", null, title), description && import_react124.default.createElement("small", null, description)), aside)
- );
- SelectOption.displayName = "SelectOption";
-
- // src/components/components/Select/helpers.tsx
- init_theming();
- var PAGE_STEP_SIZE = 5, UNDEFINED_VALUE = Symbol.for("undefined");
- function isLiteralValue(value) {
- return value == null || typeof value == "string" || typeof value == "number" || typeof value == "boolean" || typeof value == "symbol";
- }
- function optionToInternal(option) {
- return {
- ...option,
- type: "option",
- value: externalToValue(option.value)
- };
- }
- function optionOrResetToInternal(option) {
- return "type" in option && option.type === "reset" ? option : optionToInternal(option);
- }
- function valueToExternal(value) {
- if (value !== UNDEFINED_VALUE)
- return value;
- }
- function externalToValue(value) {
- return value === void 0 ? UNDEFINED_VALUE : value;
- }
- var Listbox = styled("ul")({
- minWidth: 180,
- height: "100%",
- borderRadius: 6,
- overflow: "hidden auto",
- listStyle: "none",
- margin: 0,
- padding: 4
- });
-
- // src/components/components/Select/Select.tsx
- function valueToId(parentId, { value }) {
- return `${parentId}-opt-${String(value) ?? "sb-reset"}`;
- }
- var SelectedOptionCount = styled.span(({ theme: theme3 }) => ({
- appearance: "none",
- color: theme3.textMutedColor,
- fontSize: 12
- }));
- function setSelectedFromDefault(options, defaultOptions2) {
- return defaultOptions2 === void 0 ? [] : isLiteralValue(defaultOptions2) ? options.filter((opt) => opt.value === defaultOptions2).map(optionToInternal) : options.filter((opt) => defaultOptions2.some((def) => opt.value === def)).map(optionToInternal);
- }
- var StyledButton3 = styled(Button)(
- ({ $isOpen: isOpen, $hasSelection: hasSelection, theme: theme3 }) => isOpen || hasSelection ? {
- boxShadow: "none",
- background: curriedTransparentize$1(0.93, theme3.barSelectedColor),
- color: theme3.base === "light" ? curriedDarken$1(0.1, theme3.color.secondary) : theme3.color.secondary
- } : {}
- ), Underlay = styled.div({
- position: "fixed",
- inset: 0,
- // This will do for now, our popovers use the max z-index of 2147483647. We'll want to
- // inherit a base from a CSS variable and add preset values to it in the future (e.g.
- // 100 for underlay, 200 for overlay) if we start using Select in dialogs.
- zIndex: 1e3
- }), MinimalistPopover = ({ children, handleClose, triggerRef }) => {
- let popoverRef = import_react125.default.useRef(null);
- $e0b6e0b68ec7f50f$export$872b660ac5a1ff98({
- ref: popoverRef,
- onInteractOutside: handleClose
- }), (0, import_react125.useEffect)(() => {
- if (popoverRef.current)
- return $5e3802645cc19319$export$1c3ebcada18427bf([popoverRef.current], { shouldUseInert: !0 });
- }, []);
- let { overlayProps: positionProps } = $2a41e45df1593e64$export$d39e1813b3bdd0e1({
- targetRef: triggerRef,
- overlayRef: popoverRef,
- placement: "bottom start",
- offset: 8,
- maxHeight: 504,
- isOpen: !0
- }), { overlayProps, underlayProps } = $a11501f3d1d39e6c$export$ea8f71083e90600f(
- {
- isOpen: !0,
- onClose: handleClose,
- isDismissable: !0,
- /* We do this ourselves. */
- shouldCloseOnBlur: !1,
- /* We also do this ourselves. */
- isKeyboardDismissDisabled: !0
- },
- popoverRef
- ), theme3 = useTheme();
- return positionProps.style = {
- ...positionProps.style,
- overflow: "hidden auto",
- scrollbarColor: `${theme3.barTextColor} transparent`,
- scrollbarWidth: "thin"
- }, import_react125.default.createElement($337b884510726a0d$export$c6fdb837b070b4ff, { disableFocusManagement: !0, ...overlayProps }, import_react125.default.createElement(Underlay, { ...underlayProps }), import_react125.default.createElement(Popover, { hasChrome: !0, ref: popoverRef, padding: 0, ...positionProps }, children));
- }, Select2 = (0, import_react125.forwardRef)(
- ({
- children,
- icon,
- disabled = !1,
- options: calleeOptions,
- defaultOptions: defaultOptions2,
- multiSelect = !1,
- onReset,
- padding = "small",
- resetLabel,
- onSelect,
- onDeselect,
- onChange,
- tooltip,
- ariaLabel,
- showSelectedOptionTitle = !0,
- ...props
- }, ref) => {
- let [isOpen, setIsOpen] = (0, import_react125.useState)(props.defaultOpen || !1), [shouldRefocusTrigger, setShouldRefocusTrigger] = (0, import_react125.useState)(!1), triggerRef = $df56164dff5785e2$export$4338b53315abf666(ref), id = (0, import_react125.useMemo)(() => "select-" + Math.random().toString(36).substring(2, 15), []), listboxId = `${id}-listbox`, listboxRef = (0, import_react125.useRef)(null), otState = $fc909762b330b746$export$61c6a8c84e605fb6({
- isOpen: isOpen && !disabled,
- onOpenChange: setIsOpen
- }), handleClose = (0, import_react125.useCallback)(() => {
- setIsOpen(!1), setShouldRefocusTrigger(!0);
- }, []);
- (0, import_react125.useEffect)(() => {
- !otState.isOpen && shouldRefocusTrigger && (triggerRef.current?.focus(), setShouldRefocusTrigger(!1));
- }, [otState.isOpen, shouldRefocusTrigger, triggerRef]);
- let [selectedOptions, setSelectedOptions] = (0, import_react125.useState)(
- setSelectedFromDefault(calleeOptions, defaultOptions2)
- ), handleSelectOption = (0, import_react125.useCallback)(
- (option) => {
- option.type === "reset" ? (onChange?.([]), onReset?.(), setSelectedOptions([])) : setSelectedOptions(multiSelect ? (previous) => {
- let newSelected = [];
- return previous?.some((opt) => opt.value === option.value) ? (onDeselect?.(valueToExternal(option.value)), newSelected = previous?.filter((opt) => opt.value !== option.value) ?? []) : (onSelect?.(valueToExternal(option.value)), newSelected = [...previous ?? [], option]), onChange?.(newSelected.map((opt) => valueToExternal(opt.value))), newSelected;
- } : (current) => current.every((opt) => opt.value !== option.value) ? (onSelect?.(valueToExternal(option.value)), onChange?.([valueToExternal(option.value)]), [option]) : current);
- },
- [multiSelect, onChange, onSelect, onDeselect, onReset]
- ), resetOption = (0, import_react125.useMemo)(
- () => onReset ? {
- type: "reset",
- value: void 0,
- title: resetLabel ?? "Reset selection",
- icon: import_react125.default.createElement(RefreshIcon, null),
- description: void 0,
- children: void 0
- } : void 0,
- [onReset, resetLabel]
- ), options = (0, import_react125.useMemo)(
- () => resetOption ? [resetOption, ...calleeOptions] : calleeOptions,
- [calleeOptions, resetOption]
- );
- (0, import_react125.useEffect)(() => {
- defaultOptions2 && setSelectedOptions(setSelectedFromDefault(calleeOptions, defaultOptions2));
- }, [defaultOptions2, calleeOptions]);
- let [activeOption, setActiveOptionState] = (0, import_react125.useState)(
- void 0
- ), setActiveOption = (0, import_react125.useCallback)(
- (option, changeSelection = !0) => {
- setActiveOptionState(optionOrResetToInternal(option)), !multiSelect && changeSelection && handleSelectOption(optionOrResetToInternal(option));
- },
- [multiSelect, handleSelectOption]
- ), moveActiveOptionDown = (0, import_react125.useCallback)(
- (step2 = 1) => {
- if (!isOpen || !activeOption) {
- setActiveOption(options[step2 === 1 ? 0 : Math.min(step2, options.length - 1)]);
- return;
- }
- let currentIndex = options.findIndex(
- (option) => activeOption.type === "reset" ? "type" in option && option.type === "reset" : externalToValue(option.value) === activeOption.value
- ), nextIndex = currentIndex + step2, newActiveOption;
- nextIndex >= options.length && currentIndex === options.length - 1 ? newActiveOption = options[0] : newActiveOption = options[Math.min(options.length - 1, nextIndex)], setActiveOption(newActiveOption);
- },
- [isOpen, activeOption, setActiveOption, options]
- ), moveActiveOptionUp = (0, import_react125.useCallback)(
- (step2 = 1) => {
- if (!isOpen || !activeOption) {
- setActiveOption(options[Math.max(0, options.length - step2)]);
- return;
- }
- let currentIndex = options.findIndex(
- (option) => activeOption.type === "reset" ? "type" in option && option.type === "reset" : externalToValue(option.value) === activeOption.value
- ), nextIndex = currentIndex - step2, newActiveOption;
- nextIndex < 0 && currentIndex === 0 ? newActiveOption = options[options.length - 1] : newActiveOption = options[Math.max(0, nextIndex)], setActiveOption(newActiveOption);
- },
- [isOpen, activeOption, setActiveOption, options]
- ), handleButtonKeyDown = (0, import_react125.useCallback)(
- (e) => {
- let openAt = (index4) => {
- e.preventDefault(), setActiveOption(options[index4]), setIsOpen(!0);
- }, indexOfFirstSelected = options.findIndex(
- (option) => selectedOptions.some((sel) => sel.value === externalToValue(option.value))
- ), hasSelection = indexOfFirstSelected !== -1, listStart = resetOption && !hasSelection ? 1 : 0, listEnd = options.length - 1;
- e.key === "Enter" || e.key === " " ? openAt(hasSelection ? Math.min(indexOfFirstSelected, listEnd) : listStart) : e.key === "ArrowDown" ? openAt(hasSelection ? Math.min(indexOfFirstSelected + 1, listEnd) : listStart) : e.key === "ArrowUp" ? openAt(hasSelection ? Math.max(indexOfFirstSelected - 1, listStart) : listEnd) : e.key === "Home" ? openAt(listStart) : e.key === "End" ? openAt(listEnd) : e.key === "PageDown" ? openAt(
- Math.min((hasSelection ? indexOfFirstSelected : listStart) + PAGE_STEP_SIZE, listEnd)
- ) : e.key === "PageUp" && openAt(Math.max(0, (hasSelection ? indexOfFirstSelected : listEnd) - PAGE_STEP_SIZE));
- },
- [options, resetOption, setActiveOption, selectedOptions]
- ), handleListboxKeyDown = (0, import_react125.useCallback)(
- (e) => {
- e.key !== "Tab" ? e.preventDefault() : handleClose(), e.key === "Escape" ? handleClose() : e.key === "ArrowDown" ? moveActiveOptionDown() : e.key === "ArrowUp" ? moveActiveOptionUp() : e.key === "Home" ? setActiveOption(options[0]) : e.key === "End" ? setActiveOption(options[options.length - 1]) : e.key === "PageDown" ? moveActiveOptionDown(PAGE_STEP_SIZE) : e.key === "PageUp" && moveActiveOptionUp(PAGE_STEP_SIZE);
- },
- [handleClose, moveActiveOptionDown, moveActiveOptionUp, options, setActiveOption]
- );
- (0, import_react125.useEffect)(() => {
- if (isOpen && activeOption) {
- let optionElement = document.getElementById(valueToId(id, activeOption));
- optionElement && (optionElement.scrollIntoView({ block: "nearest" }), optionElement.focus());
- } else isOpen && listboxRef.current?.focus();
- }, [isOpen, activeOption, id]);
- let finalAriaLabel = (0, import_react125.useMemo)(() => selectedOptions.length === 1 ? `${ariaLabel} ${selectedOptions[0].title}` : selectedOptions.length ? `${ariaLabel}, ${selectedOptions.length} values selected` : ariaLabel, [ariaLabel, selectedOptions]);
- return import_react125.default.createElement(import_react125.default.Fragment, null, import_react125.default.createElement(
- StyledButton3,
- {
- ...props,
- variant: "ghost",
- ariaLabel: finalAriaLabel,
- tooltip: tooltip ?? ariaLabel,
- disableAllTooltips: isOpen,
- id,
- ref: triggerRef,
- padding,
- $isOpen: isOpen,
- $hasSelection: !!selectedOptions.length,
- "aria-disabled": disabled,
- disabled,
- onClick: () => {
- isOpen ? handleClose() : setIsOpen(!0);
- },
- tabIndex: isOpen ? -1 : 0,
- onKeyDown: handleButtonKeyDown,
- role: "button",
- "aria-controls": isOpen ? listboxId : void 0,
- "aria-expanded": isOpen,
- "aria-haspopup": "listbox"
- },
- !multiSelect && import_react125.default.createElement(import_react125.default.Fragment, null, icon, showSelectedOptionTitle && selectedOptions[0]?.title || children),
- multiSelect && import_react125.default.createElement(import_react125.default.Fragment, null, icon, children, !!selectedOptions.length && import_react125.default.createElement(
- SelectedOptionCount,
- {
- "aria-label": `${selectedOptions.length} ${selectedOptions.length > 1 ? "items" : "item"} selected`
- },
- selectedOptions?.length
- ))
- ), otState.isOpen && import_react125.default.createElement(MinimalistPopover, { handleClose, triggerRef }, import_react125.default.createElement(
- Listbox,
- {
- "aria-label": ariaLabel,
- role: "listbox",
- id: listboxId,
- ref: listboxRef,
- "aria-multiselectable": multiSelect,
- onKeyDown: handleListboxKeyDown,
- tabIndex: isOpen ? 0 : -1
- },
- options.map((opt) => ({
- option: optionOrResetToInternal(opt),
- externalOption: opt
- })).map(({ externalOption, option }) => {
- let isSelected = selectedOptions?.some((sel) => sel.value === option.value) && option !== resetOption, isReset = option === resetOption;
- return import_react125.default.createElement(
- SelectOption,
- {
- key: option.value === void 0 ? "sb-reset" : String(option.value),
- title: option.title,
- description: option.description,
- aside: option.aside,
- icon: !isReset && multiSelect ? (
- // Purely decorative.
- import_react125.default.createElement(Form2.Checkbox, { checked: isSelected, hidden: !0, role: "presentation" })
- ) : option.icon,
- id: valueToId(id, option),
- isActive: isOpen && activeOption?.value === option.value,
- isSelected,
- onClick: () => {
- handleSelectOption(option), multiSelect || handleClose();
- },
- onFocus: () => setActiveOption(externalOption, !1),
- shouldLookDisabled: isReset && selectedOptions.length === 0 && multiSelect,
- onKeyDown: (e) => {
- e.key === "Enter" || e.key === " " ? (e.preventDefault(), handleSelectOption(option), multiSelect || handleClose()) : e.key === "Tab" && (multiSelect || handleSelectOption(option), handleClose());
- }
- },
- option.children
- );
- })
- )));
- }
- );
- Select2.displayName = "Select";
-
- // src/components/components/Popover/PopoverProvider.tsx
- var import_react157 = __toESM(require_react(), 1);
- init_client_logger();
-
- // ../../node_modules/@react-aria/collections/dist/BaseCollection.mjs
- var $23b9f4fcf0fe224b$export$d68d59712b04d9d1 = class {
- get childNodes() {
- throw new Error("childNodes is not supported");
- }
- clone() {
- let node2 = new this.constructor(this.key);
- return node2.value = this.value, node2.level = this.level, node2.hasChildNodes = this.hasChildNodes, node2.rendered = this.rendered, node2.textValue = this.textValue, node2["aria-label"] = this["aria-label"], node2.index = this.index, node2.parentKey = this.parentKey, node2.prevKey = this.prevKey, node2.nextKey = this.nextKey, node2.firstChildKey = this.firstChildKey, node2.lastChildKey = this.lastChildKey, node2.props = this.props, node2.render = this.render, node2.colSpan = this.colSpan, node2.colIndex = this.colIndex, node2;
- }
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
- filter(collection, newCollection, filterFn) {
- let clone3 = this.clone();
- return newCollection.addDescendants(clone3, collection), clone3;
- }
- constructor(key) {
- this.value = null, this.level = 0, this.hasChildNodes = !1, this.rendered = null, this.textValue = "", this["aria-label"] = void 0, this.index = 0, this.parentKey = null, this.prevKey = null, this.nextKey = null, this.firstChildKey = null, this.lastChildKey = null, this.props = {}, this.colSpan = null, this.colIndex = null, this.type = this.constructor.type, this.key = key;
- }
- }, $23b9f4fcf0fe224b$export$b1918e978f1ee46f = class extends $23b9f4fcf0fe224b$export$d68d59712b04d9d1 {
- filter(collection, newCollection, filterFn) {
- let [firstKey, lastKey] = $23b9f4fcf0fe224b$var$filterChildren(collection, newCollection, this.firstChildKey, filterFn), newNode = this.clone();
- return newNode.firstChildKey = firstKey, newNode.lastChildKey = lastKey, newNode;
- }
- }, $23b9f4fcf0fe224b$export$5ae2504e948afce5 = class extends $23b9f4fcf0fe224b$export$d68d59712b04d9d1 {
- };
- $23b9f4fcf0fe224b$export$5ae2504e948afce5.type = "header";
- var $23b9f4fcf0fe224b$export$8258a0665a675899 = class extends $23b9f4fcf0fe224b$export$d68d59712b04d9d1 {
- };
- $23b9f4fcf0fe224b$export$8258a0665a675899.type = "loader";
- var $23b9f4fcf0fe224b$export$fd11f34e1d07f134 = class extends $23b9f4fcf0fe224b$export$b1918e978f1ee46f {
- filter(collection, newCollection, filterFn) {
- if (filterFn(this.textValue, this)) {
- let clone3 = this.clone();
- return newCollection.addDescendants(clone3, collection), clone3;
- }
- return null;
- }
- };
- $23b9f4fcf0fe224b$export$fd11f34e1d07f134.type = "item";
- var $23b9f4fcf0fe224b$export$437f11dc9b403b78 = class extends $23b9f4fcf0fe224b$export$b1918e978f1ee46f {
- filter(collection, newCollection, filterFn) {
- let filteredSection = super.filter(collection, newCollection, filterFn);
- if (filteredSection && filteredSection.lastChildKey !== null) {
- let lastChild = collection.getItem(filteredSection.lastChildKey);
- if (lastChild && lastChild.type !== "header") return filteredSection;
- }
- return null;
- }
- };
- $23b9f4fcf0fe224b$export$437f11dc9b403b78.type = "section";
- var $23b9f4fcf0fe224b$export$408d25a4e12db025 = class {
- get size() {
- return this.itemCount;
- }
- getKeys() {
- return this.keyMap.keys();
- }
- *[Symbol.iterator]() {
- let node2 = this.firstKey != null ? this.keyMap.get(this.firstKey) : void 0;
- for (; node2; )
- yield node2, node2 = node2.nextKey != null ? this.keyMap.get(node2.nextKey) : void 0;
- }
- getChildren(key) {
- let keyMap = this.keyMap;
- return {
- *[Symbol.iterator]() {
- let parent = keyMap.get(key), node2 = parent?.firstChildKey != null ? keyMap.get(parent.firstChildKey) : null;
- for (; node2; )
- yield node2, node2 = node2.nextKey != null ? keyMap.get(node2.nextKey) : void 0;
- }
- };
- }
- getKeyBefore(key) {
- let node2 = this.keyMap.get(key);
- if (!node2) return null;
- if (node2.prevKey != null) {
- for (node2 = this.keyMap.get(node2.prevKey); node2 && node2.type !== "item" && node2.lastChildKey != null; ) node2 = this.keyMap.get(node2.lastChildKey);
- var _node_key;
- return (_node_key = node2?.key) !== null && _node_key !== void 0 ? _node_key : null;
- }
- return node2.parentKey;
- }
- getKeyAfter(key) {
- let node2 = this.keyMap.get(key);
- if (!node2) return null;
- if (node2.type !== "item" && node2.firstChildKey != null) return node2.firstChildKey;
- for (; node2; ) {
- if (node2.nextKey != null) return node2.nextKey;
- if (node2.parentKey != null) node2 = this.keyMap.get(node2.parentKey);
- else return null;
- }
- return null;
- }
- getFirstKey() {
- return this.firstKey;
- }
- getLastKey() {
- let node2 = this.lastKey != null ? this.keyMap.get(this.lastKey) : null;
- for (; node2?.lastChildKey != null; ) node2 = this.keyMap.get(node2.lastChildKey);
- var _node_key;
- return (_node_key = node2?.key) !== null && _node_key !== void 0 ? _node_key : null;
- }
- getItem(key) {
- var _this_keyMap_get;
- return (_this_keyMap_get = this.keyMap.get(key)) !== null && _this_keyMap_get !== void 0 ? _this_keyMap_get : null;
- }
- at() {
- throw new Error("Not implemented");
- }
- clone() {
- let Constructor = this.constructor, collection = new Constructor();
- return collection.keyMap = new Map(this.keyMap), collection.firstKey = this.firstKey, collection.lastKey = this.lastKey, collection.itemCount = this.itemCount, collection;
- }
- addNode(node2) {
- if (this.frozen) throw new Error("Cannot add a node to a frozen collection");
- node2.type === "item" && this.keyMap.get(node2.key) == null && this.itemCount++, this.keyMap.set(node2.key, node2);
- }
- // Deeply add a node and its children to the collection from another collection, primarily used when filtering a collection
- addDescendants(node2, oldCollection) {
- this.addNode(node2);
- let children = oldCollection.getChildren(node2.key);
- for (let child of children) this.addDescendants(child, oldCollection);
- }
- removeNode(key) {
- if (this.frozen) throw new Error("Cannot remove a node to a frozen collection");
- let node2 = this.keyMap.get(key);
- node2 != null && node2.type === "item" && this.itemCount--, this.keyMap.delete(key);
- }
- commit(firstKey, lastKey, isSSR = !1) {
- if (this.frozen) throw new Error("Cannot commit a frozen collection");
- this.firstKey = firstKey, this.lastKey = lastKey, this.frozen = !isSSR;
- }
- filter(filterFn) {
- let newCollection = new this.constructor(), [firstKey, lastKey] = $23b9f4fcf0fe224b$var$filterChildren(this, newCollection, this.firstKey, filterFn);
- return newCollection?.commit(firstKey, lastKey), newCollection;
- }
- constructor() {
- this.keyMap = /* @__PURE__ */ new Map(), this.firstKey = null, this.lastKey = null, this.frozen = !1, this.itemCount = 0;
- }
- };
- function $23b9f4fcf0fe224b$var$filterChildren(collection, newCollection, firstChildKey, filterFn) {
- if (firstChildKey == null) return [
- null,
- null
- ];
- let firstNode = null, lastNode = null, currentNode = collection.getItem(firstChildKey);
- for (; currentNode != null; ) {
- let newNode = currentNode.filter(collection, newCollection, filterFn);
- newNode != null && (newNode.nextKey = null, lastNode && (newNode.prevKey = lastNode.key, lastNode.nextKey = newNode.key), firstNode == null && (firstNode = newNode), newCollection.addNode(newNode), lastNode = newNode), currentNode = currentNode.nextKey ? collection.getItem(currentNode.nextKey) : null;
- }
- if (lastNode && lastNode.type === "separator") {
- let prevKey = lastNode.prevKey;
- newCollection.removeNode(lastNode.key), prevKey ? (lastNode = newCollection.getItem(prevKey), lastNode.nextKey = null) : lastNode = null;
- }
- var _firstNode_key, _lastNode_key;
- return [
- (_firstNode_key = firstNode?.key) !== null && _firstNode_key !== void 0 ? _firstNode_key : null,
- (_lastNode_key = lastNode?.key) !== null && _lastNode_key !== void 0 ? _lastNode_key : null
- ];
- }
-
- // ../../node_modules/@react-aria/collections/dist/Document.mjs
- var $681cc3c98f569e39$export$410b0c854570d131 = class {
- *[Symbol.iterator]() {
- let node2 = this.firstChild;
- for (; node2; )
- yield node2, node2 = node2.nextSibling;
- }
- get firstChild() {
- return this._firstChild;
- }
- set firstChild(firstChild) {
- this._firstChild = firstChild, this.ownerDocument.markDirty(this);
- }
- get lastChild() {
- return this._lastChild;
- }
- set lastChild(lastChild) {
- this._lastChild = lastChild, this.ownerDocument.markDirty(this);
- }
- get previousSibling() {
- return this._previousSibling;
- }
- set previousSibling(previousSibling) {
- this._previousSibling = previousSibling, this.ownerDocument.markDirty(this);
- }
- get nextSibling() {
- return this._nextSibling;
- }
- set nextSibling(nextSibling) {
- this._nextSibling = nextSibling, this.ownerDocument.markDirty(this);
- }
- get parentNode() {
- return this._parentNode;
- }
- set parentNode(parentNode) {
- this._parentNode = parentNode, this.ownerDocument.markDirty(this);
- }
- get isConnected() {
- var _this_parentNode;
- return ((_this_parentNode = this.parentNode) === null || _this_parentNode === void 0 ? void 0 : _this_parentNode.isConnected) || !1;
- }
- invalidateChildIndices(child) {
- (this._minInvalidChildIndex == null || !this._minInvalidChildIndex.isConnected || child.index < this._minInvalidChildIndex.index) && (this._minInvalidChildIndex = child, this.ownerDocument.markDirty(this));
- }
- updateChildIndices() {
- let node2 = this._minInvalidChildIndex;
- for (; node2; )
- node2.index = node2.previousSibling ? node2.previousSibling.index + 1 : 0, node2 = node2.nextSibling;
- this._minInvalidChildIndex = null;
- }
- appendChild(child) {
- child.parentNode && child.parentNode.removeChild(child), this.firstChild == null && (this.firstChild = child), this.lastChild ? (this.lastChild.nextSibling = child, child.index = this.lastChild.index + 1, child.previousSibling = this.lastChild) : (child.previousSibling = null, child.index = 0), child.parentNode = this, child.nextSibling = null, this.lastChild = child, this.ownerDocument.markDirty(this), this.isConnected && this.ownerDocument.queueUpdate();
- }
- insertBefore(newNode, referenceNode) {
- if (referenceNode == null) return this.appendChild(newNode);
- newNode.parentNode && newNode.parentNode.removeChild(newNode), newNode.nextSibling = referenceNode, newNode.previousSibling = referenceNode.previousSibling, newNode.index = referenceNode.index - 1, this.firstChild === referenceNode ? this.firstChild = newNode : referenceNode.previousSibling && (referenceNode.previousSibling.nextSibling = newNode), referenceNode.previousSibling = newNode, newNode.parentNode = referenceNode.parentNode, this.invalidateChildIndices(newNode), this.isConnected && this.ownerDocument.queueUpdate();
- }
- removeChild(child) {
- child.parentNode !== this || !this.ownerDocument.isMounted || (this._minInvalidChildIndex === child && (this._minInvalidChildIndex = null), child.nextSibling && (this.invalidateChildIndices(child.nextSibling), child.nextSibling.previousSibling = child.previousSibling), child.previousSibling && (child.previousSibling.nextSibling = child.nextSibling), this.firstChild === child && (this.firstChild = child.nextSibling), this.lastChild === child && (this.lastChild = child.previousSibling), child.parentNode = null, child.nextSibling = null, child.previousSibling = null, child.index = 0, this.ownerDocument.markDirty(child), this.isConnected && this.ownerDocument.queueUpdate());
- }
- addEventListener() {
- }
- removeEventListener() {
- }
- get previousVisibleSibling() {
- let node2 = this.previousSibling;
- for (; node2 && node2.isHidden; ) node2 = node2.previousSibling;
- return node2;
- }
- get nextVisibleSibling() {
- let node2 = this.nextSibling;
- for (; node2 && node2.isHidden; ) node2 = node2.nextSibling;
- return node2;
- }
- get firstVisibleChild() {
- let node2 = this.firstChild;
- for (; node2 && node2.isHidden; ) node2 = node2.nextSibling;
- return node2;
- }
- get lastVisibleChild() {
- let node2 = this.lastChild;
- for (; node2 && node2.isHidden; ) node2 = node2.previousSibling;
- return node2;
- }
- constructor(ownerDocument) {
- this._firstChild = null, this._lastChild = null, this._previousSibling = null, this._nextSibling = null, this._parentNode = null, this._minInvalidChildIndex = null, this.ownerDocument = ownerDocument;
- }
- }, $681cc3c98f569e39$export$dc064fe9e59310fd = class _$681cc3c98f569e39$export$dc064fe9e59310fd extends $681cc3c98f569e39$export$410b0c854570d131 {
- get index() {
- return this._index;
- }
- set index(index4) {
- this._index = index4, this.ownerDocument.markDirty(this);
- }
- get level() {
- var _this_node;
- return this.parentNode instanceof _$681cc3c98f569e39$export$dc064fe9e59310fd ? this.parentNode.level + (((_this_node = this.node) === null || _this_node === void 0 ? void 0 : _this_node.type) === "item" ? 1 : 0) : 0;
- }
- /**
- * Lazily gets a mutable instance of a Node. If the node has already
- * been cloned during this update cycle, it just returns the existing one.
- */
- getMutableNode() {
- return this.node == null ? null : (this.isMutated || (this.node = this.node.clone(), this.isMutated = !0), this.ownerDocument.markDirty(this), this.node);
- }
- updateNode() {
- var _this_parentNode_node, _this_previousVisibleSibling_node, _this_previousVisibleSibling, _nextSibling_node, _this_firstVisibleChild_node, _this_firstVisibleChild, _this_lastVisibleChild_node, _this_lastVisibleChild;
- let nextSibling = this.nextVisibleSibling, node2 = this.getMutableNode();
- if (node2 != null) {
- node2.index = this.index, node2.level = this.level;
- var _this_parentNode_node_key;
- node2.parentKey = this.parentNode instanceof _$681cc3c98f569e39$export$dc064fe9e59310fd && (_this_parentNode_node_key = (_this_parentNode_node = this.parentNode.node) === null || _this_parentNode_node === void 0 ? void 0 : _this_parentNode_node.key) !== null && _this_parentNode_node_key !== void 0 ? _this_parentNode_node_key : null;
- var _this_previousVisibleSibling_node_key;
- node2.prevKey = (_this_previousVisibleSibling_node_key = (_this_previousVisibleSibling = this.previousVisibleSibling) === null || _this_previousVisibleSibling === void 0 || (_this_previousVisibleSibling_node = _this_previousVisibleSibling.node) === null || _this_previousVisibleSibling_node === void 0 ? void 0 : _this_previousVisibleSibling_node.key) !== null && _this_previousVisibleSibling_node_key !== void 0 ? _this_previousVisibleSibling_node_key : null;
- var _nextSibling_node_key;
- node2.nextKey = (_nextSibling_node_key = nextSibling == null || (_nextSibling_node = nextSibling.node) === null || _nextSibling_node === void 0 ? void 0 : _nextSibling_node.key) !== null && _nextSibling_node_key !== void 0 ? _nextSibling_node_key : null, node2.hasChildNodes = !!this.firstChild;
- var _this_firstVisibleChild_node_key;
- node2.firstChildKey = (_this_firstVisibleChild_node_key = (_this_firstVisibleChild = this.firstVisibleChild) === null || _this_firstVisibleChild === void 0 || (_this_firstVisibleChild_node = _this_firstVisibleChild.node) === null || _this_firstVisibleChild_node === void 0 ? void 0 : _this_firstVisibleChild_node.key) !== null && _this_firstVisibleChild_node_key !== void 0 ? _this_firstVisibleChild_node_key : null;
- var _this_lastVisibleChild_node_key;
- if (node2.lastChildKey = (_this_lastVisibleChild_node_key = (_this_lastVisibleChild = this.lastVisibleChild) === null || _this_lastVisibleChild === void 0 || (_this_lastVisibleChild_node = _this_lastVisibleChild.node) === null || _this_lastVisibleChild_node === void 0 ? void 0 : _this_lastVisibleChild_node.key) !== null && _this_lastVisibleChild_node_key !== void 0 ? _this_lastVisibleChild_node_key : null, (node2.colSpan != null || node2.colIndex != null) && nextSibling) {
- var _node_colIndex, _node_colSpan;
- let nextColIndex = ((_node_colIndex = node2.colIndex) !== null && _node_colIndex !== void 0 ? _node_colIndex : node2.index) + ((_node_colSpan = node2.colSpan) !== null && _node_colSpan !== void 0 ? _node_colSpan : 1);
- if (nextSibling.node != null && nextColIndex !== nextSibling.node.colIndex) {
- let siblingNode = nextSibling.getMutableNode();
- siblingNode.colIndex = nextColIndex;
- }
- }
- }
- }
- setProps(obj, ref, CollectionNodeClass, rendered, render) {
- let node2, { value: value1, textValue, id, ...props } = obj;
- if (this.node == null ? (node2 = new CollectionNodeClass(id ?? `react-aria-${++this.ownerDocument.nodeId}`), this.node = node2) : node2 = this.getMutableNode(), props.ref = ref, node2.props = props, node2.rendered = rendered, node2.render = render, node2.value = value1, node2.textValue = textValue || (typeof props.children == "string" ? props.children : "") || obj["aria-label"] || "", id != null && id !== node2.key) throw new Error("Cannot change the id of an item");
- props.colSpan != null && (node2.colSpan = props.colSpan), this.isConnected && this.ownerDocument.queueUpdate();
- }
- get style() {
- let element = this;
- return {
- get display() {
- return element.isHidden ? "none" : "";
- },
- set display(value) {
- let isHidden3 = value === "none";
- if (element.isHidden !== isHidden3) {
- var _element_parentNode, _element_parentNode1;
- (((_element_parentNode = element.parentNode) === null || _element_parentNode === void 0 ? void 0 : _element_parentNode.firstVisibleChild) === element || ((_element_parentNode1 = element.parentNode) === null || _element_parentNode1 === void 0 ? void 0 : _element_parentNode1.lastVisibleChild) === element) && element.ownerDocument.markDirty(element.parentNode);
- let prev2 = element.previousVisibleSibling, next2 = element.nextVisibleSibling;
- prev2 && element.ownerDocument.markDirty(prev2), next2 && element.ownerDocument.markDirty(next2), element.isHidden = isHidden3, element.ownerDocument.markDirty(element);
- }
- }
- };
- }
- hasAttribute() {
- }
- setAttribute() {
- }
- setAttributeNS() {
- }
- removeAttribute() {
- }
- constructor(type5, ownerDocument) {
- super(ownerDocument), this.nodeType = 8, this.isMutated = !0, this._index = 0, this.isHidden = !1, this.node = null;
- }
- }, $681cc3c98f569e39$export$b34a105447964f9f = class extends $681cc3c98f569e39$export$410b0c854570d131 {
- get isConnected() {
- return this.isMounted;
- }
- createElement(type5) {
- return new $681cc3c98f569e39$export$dc064fe9e59310fd(type5, this);
- }
- getMutableCollection() {
- return this.nextCollection || (this.nextCollection = this.collection.clone()), this.nextCollection;
- }
- markDirty(node2) {
- this.dirtyNodes.add(node2);
- }
- addNode(element) {
- if (element.isHidden || element.node == null) return;
- let collection = this.getMutableCollection();
- if (!collection.getItem(element.node.key)) for (let child of element) this.addNode(child);
- collection.addNode(element.node);
- }
- removeNode(node2) {
- if (node2.node == null) return;
- for (let child of node2) this.removeNode(child);
- this.getMutableCollection().removeNode(node2.node.key);
- }
- /** Finalizes the collection update, updating all nodes and freezing the collection. */
- getCollection() {
- return this.inSubscription ? this.collection.clone() : (this.queuedRender = !1, this.updateCollection(), this.collection);
- }
- updateCollection() {
- for (let element of this.dirtyNodes) element instanceof $681cc3c98f569e39$export$dc064fe9e59310fd && (!element.isConnected || element.isHidden) ? this.removeNode(element) : element.updateChildIndices();
- for (let element of this.dirtyNodes) element instanceof $681cc3c98f569e39$export$dc064fe9e59310fd && (element.isConnected && !element.isHidden && (element.updateNode(), this.addNode(element)), element.isMutated = !1);
- if (this.dirtyNodes.clear(), this.nextCollection) {
- var _this_firstVisibleChild_node, _this_firstVisibleChild, _this_lastVisibleChild_node, _this_lastVisibleChild, _this_firstVisibleChild_node_key, _this_lastVisibleChild_node_key;
- this.nextCollection.commit((_this_firstVisibleChild_node_key = (_this_firstVisibleChild = this.firstVisibleChild) === null || _this_firstVisibleChild === void 0 || (_this_firstVisibleChild_node = _this_firstVisibleChild.node) === null || _this_firstVisibleChild_node === void 0 ? void 0 : _this_firstVisibleChild_node.key) !== null && _this_firstVisibleChild_node_key !== void 0 ? _this_firstVisibleChild_node_key : null, (_this_lastVisibleChild_node_key = (_this_lastVisibleChild = this.lastVisibleChild) === null || _this_lastVisibleChild === void 0 || (_this_lastVisibleChild_node = _this_lastVisibleChild.node) === null || _this_lastVisibleChild_node === void 0 ? void 0 : _this_lastVisibleChild_node.key) !== null && _this_lastVisibleChild_node_key !== void 0 ? _this_lastVisibleChild_node_key : null, this.isSSR), this.isSSR || (this.collection = this.nextCollection, this.nextCollection = null);
- }
- }
- queueUpdate() {
- if (!(this.dirtyNodes.size === 0 || this.queuedRender)) {
- this.queuedRender = !0, this.inSubscription = !0;
- for (let fn4 of this.subscriptions) fn4();
- this.inSubscription = !1;
- }
- }
- subscribe(fn4) {
- return this.subscriptions.add(fn4), () => this.subscriptions.delete(fn4);
- }
- resetAfterSSR() {
- this.isSSR && (this.isSSR = !1, this.firstChild = null, this.lastChild = null, this.nodeId = 0);
- }
- constructor(collection) {
- super(null), this.nodeType = 11, this.ownerDocument = this, this.dirtyNodes = /* @__PURE__ */ new Set(), this.isSSR = !1, this.nodeId = 0, this.nodesByProps = /* @__PURE__ */ new WeakMap(), this.isMounted = !0, this.nextCollection = null, this.subscriptions = /* @__PURE__ */ new Set(), this.queuedRender = !1, this.inSubscription = !1, this.collection = collection, this.nextCollection = collection;
- }
- };
-
- // ../../node_modules/@react-aria/collections/dist/useCachedChildren.mjs
- var import_react126 = __toESM(require_react(), 1);
- function $e948873055cbafe4$export$727c8fc270210f13(props) {
- let { children, items, idScope, addIdAndValue, dependencies = [] } = props, cache = (0, import_react126.useMemo)(() => /* @__PURE__ */ new WeakMap(), dependencies);
- return (0, import_react126.useMemo)(() => {
- if (items && typeof children == "function") {
- let res = [];
- for (let item of items) {
- let rendered = cache.get(item);
- if (!rendered) {
- rendered = children(item);
- var _rendered_props_id, _ref;
- let key = (_ref = (_rendered_props_id = rendered.props.id) !== null && _rendered_props_id !== void 0 ? _rendered_props_id : item.key) !== null && _ref !== void 0 ? _ref : item.id;
- if (key == null) throw new Error("Could not determine key for item");
- idScope && (key = idScope + ":" + key), rendered = (0, import_react126.cloneElement)(rendered, addIdAndValue ? {
- key,
- id: key,
- value: item
- } : {
- key
- }), cache.set(item, rendered);
- }
- res.push(rendered);
- }
- return res;
- } else if (typeof children != "function") return children;
- }, [
- children,
- items,
- cache,
- idScope,
- addIdAndValue
- ]);
- }
-
- // ../../node_modules/@react-aria/collections/dist/Hidden.mjs
- var import_react127 = __toESM(require_react(), 1);
- if (typeof HTMLTemplateElement < "u") {
- let getFirstChild = Object.getOwnPropertyDescriptor(Node.prototype, "firstChild").get;
- Object.defineProperty(HTMLTemplateElement.prototype, "firstChild", {
- configurable: !0,
- enumerable: !0,
- get: function() {
- return this.dataset.reactAriaHidden ? this.content.firstChild : getFirstChild.call(this);
- }
- });
- }
- var $f39a9eba43920ace$export$94b6d0abf7d33e8c = (0, import_react127.createContext)(!1);
- function $f39a9eba43920ace$export$8dc98ba7eadeaa56(props) {
- if ((0, import_react127.useContext)($f39a9eba43920ace$export$94b6d0abf7d33e8c))
- return import_react127.default.createElement(import_react127.default.Fragment, null, props.children);
- let children = import_react127.default.createElement($f39a9eba43920ace$export$94b6d0abf7d33e8c.Provider, {
- value: !0
- }, props.children);
- return import_react127.default.createElement("template", {
- "data-react-aria-hidden": !0
- }, children);
- }
- function $f39a9eba43920ace$export$86427a43e3e48ebb(fn4) {
- let Wrapper9 = (props, ref) => (0, import_react127.useContext)($f39a9eba43920ace$export$94b6d0abf7d33e8c) ? null : fn4(props, ref);
- return Wrapper9.displayName = fn4.displayName || fn4.name, (0, import_react127.forwardRef)(Wrapper9);
- }
- function $f39a9eba43920ace$export$b5d7cc18bb8d2b59() {
- return (0, import_react127.useContext)($f39a9eba43920ace$export$94b6d0abf7d33e8c);
- }
-
- // ../../node_modules/@react-aria/collections/dist/CollectionBuilder.mjs
- var import_react_dom5 = __toESM(require_react_dom(), 1);
- var import_react128 = __toESM(require_react(), 1);
- var import_shim = __toESM(require_shim(), 1), $e1995378a142960e$var$ShallowRenderContext = (0, import_react128.createContext)(!1), $e1995378a142960e$var$CollectionDocumentContext = (0, import_react128.createContext)(null);
- function $e1995378a142960e$export$bf788dd355e3a401(props) {
- if ((0, import_react128.useContext)($e1995378a142960e$var$CollectionDocumentContext))
- return props.content;
- let { collection, document: document13 } = $e1995378a142960e$var$useCollectionDocument(props.createCollection);
- return import_react128.default.createElement(import_react128.default.Fragment, null, import_react128.default.createElement($f39a9eba43920ace$export$8dc98ba7eadeaa56, null, import_react128.default.createElement($e1995378a142960e$var$CollectionDocumentContext.Provider, {
- value: document13
- }, props.content)), import_react128.default.createElement($e1995378a142960e$var$CollectionInner, {
- render: props.children,
- collection
- }));
- }
- function $e1995378a142960e$var$CollectionInner({ collection, render }) {
- return render(collection);
- }
- function $e1995378a142960e$var$useSyncExternalStoreFallback(subscribe, getSnapshot, getServerSnapshot) {
- let isSSR = $b5e257d569688ac6$export$535bd6ca7f90a273(), isSSRRef = (0, import_react128.useRef)(isSSR);
- isSSRRef.current = isSSR;
- let getSnapshotWrapper = (0, import_react128.useCallback)(() => isSSRRef.current ? getServerSnapshot() : getSnapshot(), [
- getSnapshot,
- getServerSnapshot
- ]);
- return (0, import_shim.useSyncExternalStore)(subscribe, getSnapshotWrapper);
- }
- var $e1995378a142960e$var$useSyncExternalStore = typeof import_react128.default.useSyncExternalStore == "function" ? import_react128.default.useSyncExternalStore : $e1995378a142960e$var$useSyncExternalStoreFallback;
- function $e1995378a142960e$var$useCollectionDocument(createCollection) {
- let [document13] = (0, import_react128.useState)(() => new $681cc3c98f569e39$export$b34a105447964f9f(createCollection?.() || new $23b9f4fcf0fe224b$export$408d25a4e12db025())), subscribe = (0, import_react128.useCallback)((fn4) => document13.subscribe(fn4), [
- document13
- ]), getSnapshot = (0, import_react128.useCallback)(() => {
- let collection2 = document13.getCollection();
- return document13.isSSR && document13.resetAfterSSR(), collection2;
- }, [
- document13
- ]), getServerSnapshot = (0, import_react128.useCallback)(() => (document13.isSSR = !0, document13.getCollection()), [
- document13
- ]), collection = $e1995378a142960e$var$useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
- return $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => (document13.isMounted = !0, () => {
- document13.isMounted = !1;
- }), [
- document13
- ]), {
- collection,
- document: document13
- };
- }
- var $e1995378a142960e$var$SSRContext = (0, import_react128.createContext)(null);
- function $e1995378a142960e$var$createCollectionNodeClass(type5) {
- var _class;
- return _class = class extends $23b9f4fcf0fe224b$export$d68d59712b04d9d1 {
- }, _class.type = type5, _class;
- }
- function $e1995378a142960e$var$useSSRCollectionNode(CollectionNodeClass, props, ref, rendered, children, render) {
- typeof CollectionNodeClass == "string" && (CollectionNodeClass = $e1995378a142960e$var$createCollectionNodeClass(CollectionNodeClass));
- let itemRef = (0, import_react128.useCallback)((element) => {
- element?.setProps(props, ref, CollectionNodeClass, rendered, render);
- }, [
- props,
- ref,
- rendered,
- render,
- CollectionNodeClass
- ]), parentNode = (0, import_react128.useContext)($e1995378a142960e$var$SSRContext);
- if (parentNode) {
- let element = parentNode.ownerDocument.nodesByProps.get(props);
- return element || (element = parentNode.ownerDocument.createElement(CollectionNodeClass.type), element.setProps(props, ref, CollectionNodeClass, rendered, render), parentNode.appendChild(element), parentNode.ownerDocument.updateCollection(), parentNode.ownerDocument.nodesByProps.set(props, element)), children ? import_react128.default.createElement($e1995378a142960e$var$SSRContext.Provider, {
- value: element
- }, children) : null;
- }
- return import_react128.default.createElement(CollectionNodeClass.type, {
- ref: itemRef
- }, children);
- }
- function $e1995378a142960e$export$18af5c7a9e9b3664(CollectionNodeClass, render) {
- let Component5 = ({ node: node2 }) => render(node2.props, node2.props.ref, node2), Result = (0, import_react128.forwardRef)((props, ref) => {
- let focusableProps = (0, import_react128.useContext)($f645667febf57a63$export$f9762fab77588ecb);
- if (!(0, import_react128.useContext)($e1995378a142960e$var$ShallowRenderContext)) {
- if (render.length >= 3) throw new Error(render.name + " cannot be rendered outside a collection.");
- return render(props, ref);
- }
- return $e1995378a142960e$var$useSSRCollectionNode(CollectionNodeClass, props, ref, "children" in props ? props.children : null, null, (node2) => (
- // Forward FocusableContext to real DOM tree so tooltips work.
- import_react128.default.createElement($f645667febf57a63$export$f9762fab77588ecb.Provider, {
- value: focusableProps
- }, import_react128.default.createElement(Component5, {
- node: node2
- }))
- ));
- });
- return Result.displayName = render.name, Result;
- }
- function $e1995378a142960e$export$e953bb1cd0f19726(CollectionNodeClass, render, useChildren = $e1995378a142960e$var$useCollectionChildren) {
- let Component5 = ({ node: node2 }) => render(node2.props, node2.props.ref, node2), Result = (0, import_react128.forwardRef)((props, ref) => {
- let children = useChildren(props);
- var _useSSRCollectionNode;
- return (_useSSRCollectionNode = $e1995378a142960e$var$useSSRCollectionNode(CollectionNodeClass, props, ref, null, children, (node2) => import_react128.default.createElement(Component5, {
- node: node2
- }))) !== null && _useSSRCollectionNode !== void 0 ? _useSSRCollectionNode : import_react128.default.createElement(import_react128.default.Fragment, null);
- });
- return Result.displayName = render.name, Result;
- }
- function $e1995378a142960e$var$useCollectionChildren(options) {
- return $e948873055cbafe4$export$727c8fc270210f13({
- ...options,
- addIdAndValue: !0
- });
- }
- var $e1995378a142960e$var$CollectionContext = (0, import_react128.createContext)(null);
- function $e1995378a142960e$export$fb8073518f34e6ec(props) {
- let ctx = (0, import_react128.useContext)($e1995378a142960e$var$CollectionContext), dependencies = (ctx?.dependencies || []).concat(props.dependencies), idScope = props.idScope || ctx?.idScope, children = $e1995378a142960e$var$useCollectionChildren({
- ...props,
- idScope,
- dependencies
- });
- return (0, import_react128.useContext)($e1995378a142960e$var$CollectionDocumentContext) && (children = import_react128.default.createElement($e1995378a142960e$var$CollectionRoot, null, children)), ctx = (0, import_react128.useMemo)(() => ({
- dependencies,
- idScope
- }), [
- idScope,
- ...dependencies
- ]), import_react128.default.createElement($e1995378a142960e$var$CollectionContext.Provider, {
- value: ctx
- }, children);
- }
- function $e1995378a142960e$var$CollectionRoot({ children }) {
- let doc = (0, import_react128.useContext)($e1995378a142960e$var$CollectionDocumentContext), wrappedChildren = (0, import_react128.useMemo)(() => import_react128.default.createElement($e1995378a142960e$var$CollectionDocumentContext.Provider, {
- value: null
- }, import_react128.default.createElement($e1995378a142960e$var$ShallowRenderContext.Provider, {
- value: !0
- }, children)), [
- children
- ]);
- return $b5e257d569688ac6$export$535bd6ca7f90a273() ? import_react128.default.createElement($e1995378a142960e$var$SSRContext.Provider, {
- value: doc
- }, wrappedChildren) : (0, import_react_dom5.createPortal)(wrappedChildren, doc);
- }
-
- // ../../node_modules/react-aria-components/dist/Label.mjs
- var import_react129 = __toESM(require_react(), 1), $01b77f81d0f07f68$export$75b6ee27786ba447 = (0, import_react129.createContext)({}), $01b77f81d0f07f68$export$b04be29aa201d4f5 = $f39a9eba43920ace$export$86427a43e3e48ebb(function(props, ref) {
- [props, ref] = $64fa3d84918910a7$export$29f1550f4b0d4415(props, ref, $01b77f81d0f07f68$export$75b6ee27786ba447);
- let { elementType: ElementType = "label", ...labelProps } = props;
- return import_react129.default.createElement(ElementType, {
- className: "react-aria-Label",
- ...labelProps,
- ref
- });
- });
-
- // ../../node_modules/@react-aria/label/dist/useLabel.mjs
- function $d191a55c9702f145$export$8467354a121f1b9f(props) {
- let { id, label, "aria-labelledby": ariaLabelledby, "aria-label": ariaLabel, labelElementType = "label" } = props;
- id = $bdb11010cef70236$export$f680877a34711e37(id);
- let labelId = $bdb11010cef70236$export$f680877a34711e37(), labelProps = {};
- label && (ariaLabelledby = ariaLabelledby ? `${labelId} ${ariaLabelledby}` : labelId, labelProps = {
- id: labelId,
- htmlFor: labelElementType === "label" ? id : void 0
- });
- let fieldProps = $313b98861ee5dd6c$export$d6875122194c7b44({
- id,
- "aria-label": ariaLabel,
- "aria-labelledby": ariaLabelledby
- });
- return {
- labelProps,
- fieldProps
- };
- }
-
- // ../../node_modules/@react-aria/progress/dist/useProgressBar.mjs
- function $204d9ebcedfb8806$export$ed5abd763a836edc(props) {
- let { value = 0, minValue = 0, maxValue = 100, valueLabel, isIndeterminate, formatOptions = {
- style: "percent"
- } } = props, domProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, {
- labelable: !0
- }), { labelProps, fieldProps } = $d191a55c9702f145$export$8467354a121f1b9f({
- ...props,
- // Progress bar is not an HTML input element so it
- // shouldn't be labeled by a <label> element.
- labelElementType: "span"
- });
- value = $9446cca9a3875146$export$7d15b64cf5a3a4c4(value, minValue, maxValue);
- let percentage = (value - minValue) / (maxValue - minValue), formatter2 = $a916eb452884faea$export$b7a616150fdb9f44(formatOptions);
- if (!isIndeterminate && !valueLabel) {
- let valueToFormat = formatOptions.style === "percent" ? percentage : value;
- valueLabel = formatter2.format(valueToFormat);
- }
- return {
- progressBarProps: $3ef42575df84b30b$export$9d1611c77c2fe928(domProps, {
- ...fieldProps,
- "aria-valuenow": isIndeterminate ? void 0 : value,
- "aria-valuemin": minValue,
- "aria-valuemax": maxValue,
- "aria-valuetext": isIndeterminate ? void 0 : valueLabel,
- role: "progressbar"
- }),
- labelProps
- };
- }
-
- // ../../node_modules/react-aria-components/dist/ProgressBar.mjs
- var import_react130 = __toESM(require_react(), 1), $0393f8ab869a0f1a$export$e9f3bf65a26ce129 = (0, import_react130.createContext)(null), $0393f8ab869a0f1a$export$c17561cb55d4db30 = (0, import_react130.forwardRef)(function(props, ref) {
- [props, ref] = $64fa3d84918910a7$export$29f1550f4b0d4415(props, ref, $0393f8ab869a0f1a$export$e9f3bf65a26ce129);
- let { value = 0, minValue = 0, maxValue = 100, isIndeterminate = !1 } = props;
- value = $9446cca9a3875146$export$7d15b64cf5a3a4c4(value, minValue, maxValue);
- let [labelRef, label] = $64fa3d84918910a7$export$9d4c57ee4c6ffdd8(!props["aria-label"] && !props["aria-labelledby"]), { progressBarProps, labelProps } = $204d9ebcedfb8806$export$ed5abd763a836edc({
- ...props,
- label
- }), percentage = isIndeterminate ? void 0 : (value - minValue) / (maxValue - minValue) * 100, renderProps = $64fa3d84918910a7$export$4d86445c2cf5e3({
- ...props,
- defaultClassName: "react-aria-ProgressBar",
- values: {
- percentage,
- valueText: progressBarProps["aria-valuetext"],
- isIndeterminate
- }
- }), DOMProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, {
- global: !0
- });
- return import_react130.default.createElement("div", {
- ...$3ef42575df84b30b$export$9d1611c77c2fe928(DOMProps, renderProps, progressBarProps),
- ref,
- slot: props.slot || void 0
- }, import_react130.default.createElement($01b77f81d0f07f68$export$75b6ee27786ba447.Provider, {
- value: {
- ...labelProps,
- ref: labelRef,
- elementType: "span"
- }
- }, renderProps.children));
- });
-
- // ../../node_modules/react-aria-components/dist/Button.mjs
- init_import();
-
- // ../../node_modules/@react-aria/button/dist/useButton.mjs
- function $701a24aa0da5b062$export$ea18c227d4417cc3(props, ref) {
- let { elementType = "button", isDisabled: isDisabled3, onPress, onPressStart, onPressEnd, onPressUp, onPressChange, preventFocusOnPress, allowFocusWhenDisabled, onClick, href, target, rel, type: type5 = "button" } = props, additionalProps;
- elementType === "button" ? additionalProps = {
- type: type5,
- disabled: isDisabled3,
- form: props.form,
- formAction: props.formAction,
- formEncType: props.formEncType,
- formMethod: props.formMethod,
- formNoValidate: props.formNoValidate,
- formTarget: props.formTarget,
- name: props.name,
- value: props.value
- } : additionalProps = {
- role: "button",
- href: elementType === "a" && !isDisabled3 ? href : void 0,
- target: elementType === "a" ? target : void 0,
- type: elementType === "input" ? type5 : void 0,
- disabled: elementType === "input" ? isDisabled3 : void 0,
- "aria-disabled": !isDisabled3 || elementType === "input" ? void 0 : isDisabled3,
- rel: elementType === "a" ? rel : void 0
- };
- let { pressProps, isPressed } = $f6c31cce2adf654f$export$45712eceda6fad21({
- onPressStart,
- onPressEnd,
- onPressChange,
- onPress,
- onPressUp,
- onClick,
- isDisabled: isDisabled3,
- preventFocusOnPress,
- ref
- }), { focusableProps } = $f645667febf57a63$export$4c014de7c8940b4c(props, ref);
- allowFocusWhenDisabled && (focusableProps.tabIndex = isDisabled3 ? -1 : focusableProps.tabIndex);
- let buttonProps = $3ef42575df84b30b$export$9d1611c77c2fe928(focusableProps, pressProps, $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, {
- labelable: !0
- }));
- return {
- isPressed,
- buttonProps: $3ef42575df84b30b$export$9d1611c77c2fe928(additionalProps, buttonProps, {
- "aria-haspopup": props["aria-haspopup"],
- "aria-expanded": props["aria-expanded"],
- "aria-controls": props["aria-controls"],
- "aria-pressed": props["aria-pressed"],
- "aria-current": props["aria-current"],
- "aria-disabled": props["aria-disabled"]
- })
- };
- }
-
- // ../../node_modules/@react-aria/button/node_modules/@react-aria/toolbar/dist/useToolbar.mjs
- var import_react131 = __toESM(require_react(), 1);
-
- // ../../node_modules/react-aria-components/dist/Button.mjs
- var import_react132 = __toESM(require_react(), 1), $d2b4bc8c273e7be6$export$24d547caef80ccd1 = (0, import_react132.createContext)({}), $d2b4bc8c273e7be6$export$353f5b6fc5456de1 = $f39a9eba43920ace$export$86427a43e3e48ebb(function(props, ref) {
- [props, ref] = $64fa3d84918910a7$export$29f1550f4b0d4415(props, ref, $d2b4bc8c273e7be6$export$24d547caef80ccd1), props = $d2b4bc8c273e7be6$var$disablePendingProps(props);
- let ctx = props, { isPending } = ctx, { buttonProps, isPressed } = $701a24aa0da5b062$export$ea18c227d4417cc3(props, ref), { focusProps, isFocused, isFocusVisible } = $f7dceffc5ad7768b$export$4e328f61c538687f(props), { hoverProps, isHovered } = $6179b936705e76d3$export$ae780daf29e6d456({
- ...props,
- isDisabled: props.isDisabled || isPending
- }), renderValues = {
- isHovered,
- isPressed: (ctx.isPressed || isPressed) && !isPending,
- isFocused,
- isFocusVisible,
- isDisabled: props.isDisabled || !1,
- isPending: isPending ?? !1
- }, renderProps = $64fa3d84918910a7$export$4d86445c2cf5e3({
- ...props,
- values: renderValues,
- defaultClassName: "react-aria-Button"
- }), buttonId = $bdb11010cef70236$export$f680877a34711e37(buttonProps.id), progressId = $bdb11010cef70236$export$f680877a34711e37(), ariaLabelledby = buttonProps["aria-labelledby"];
- isPending && (ariaLabelledby ? ariaLabelledby = `${ariaLabelledby} ${progressId}` : buttonProps["aria-label"] && (ariaLabelledby = `${buttonId} ${progressId}`));
- let wasPending = (0, import_react132.useRef)(isPending);
- (0, import_react132.useEffect)(() => {
- let message = {
- "aria-labelledby": ariaLabelledby || buttonId
- };
- !wasPending.current && isFocused && isPending ? $319e236875307eab$export$a9b970dcc4ae71a9(message, "assertive") : wasPending.current && isFocused && !isPending && $319e236875307eab$export$a9b970dcc4ae71a9(message, "assertive"), wasPending.current = isPending;
- }, [
- isPending,
- isFocused,
- ariaLabelledby,
- buttonId
- ]);
- let DOMProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, {
- global: !0
- });
- return delete DOMProps.onClick, import_react132.default.createElement("button", {
- ...$3ef42575df84b30b$export$9d1611c77c2fe928(DOMProps, renderProps, buttonProps, focusProps, hoverProps),
- // When the button is in a pending state, we want to stop implicit form submission (ie. when the user presses enter on a text input).
- // We do this by changing the button's type to button.
- type: buttonProps.type === "submit" && isPending ? "button" : buttonProps.type,
- id: buttonId,
- ref,
- "aria-labelledby": ariaLabelledby,
- slot: props.slot || void 0,
- "aria-disabled": isPending ? "true" : buttonProps["aria-disabled"],
- "data-disabled": props.isDisabled || void 0,
- "data-pressed": renderValues.isPressed || void 0,
- "data-hovered": isHovered || void 0,
- "data-focused": isFocused || void 0,
- "data-pending": isPending || void 0,
- "data-focus-visible": isFocusVisible || void 0
- }, import_react132.default.createElement($0393f8ab869a0f1a$export$e9f3bf65a26ce129.Provider, {
- value: {
- id: progressId
- }
- }, renderProps.children));
- });
- function $d2b4bc8c273e7be6$var$disablePendingProps(props) {
- return props.isPending && (props.onPress = void 0, props.onPressStart = void 0, props.onPressEnd = void 0, props.onPressChange = void 0, props.onPressUp = void 0, props.onKeyDown = void 0, props.onKeyUp = void 0, props.onClick = void 0, props.href = void 0), props;
- }
-
- // ../../node_modules/react-aria-components/dist/Popover.mjs
- var import_react133 = __toESM(require_react(), 1);
- var $07b14b47974efb58$export$9b9a0cd73afb7ca4 = (0, import_react133.createContext)(null), $07b14b47974efb58$var$PopoverGroupContext = (0, import_react133.createContext)(null), $07b14b47974efb58$export$5b6b19405a83ff9d = (0, import_react133.forwardRef)(function(props, ref) {
- [props, ref] = $64fa3d84918910a7$export$29f1550f4b0d4415(props, ref, $07b14b47974efb58$export$9b9a0cd73afb7ca4);
- let contextState = (0, import_react133.useContext)($de32f1b87079253c$export$d2f961adcb0afbe), localState = $fc909762b330b746$export$61c6a8c84e605fb6(props), state3 = props.isOpen != null || props.defaultOpen != null || !contextState ? localState : contextState, isExiting = $d3f049242431219c$export$45fda7c47f93fd48(ref, state3.isOpen) || props.isExiting || !1, isHidden3 = $f39a9eba43920ace$export$b5d7cc18bb8d2b59(), { direction } = $18f2051aff69b9bf$export$43bb16f9c6d9e3f7();
- if (isHidden3) {
- let children = props.children;
- return typeof children == "function" && (children = children({
- trigger: props.trigger || null,
- placement: "bottom",
- isEntering: !1,
- isExiting: !1,
- defaultChildren: null
- })), import_react133.default.createElement(import_react133.default.Fragment, null, children);
- }
- return state3 && !state3.isOpen && !isExiting ? null : import_react133.default.createElement($07b14b47974efb58$var$PopoverInner, {
- ...props,
- triggerRef: props.triggerRef,
- state: state3,
- popoverRef: ref,
- isExiting,
- dir: direction
- });
- });
- function $07b14b47974efb58$var$PopoverInner({ state: state3, isExiting, UNSTABLE_portalContainer, clearContexts, ...props }) {
- let arrowRef = (0, import_react133.useRef)(null), containerRef = (0, import_react133.useRef)(null), groupCtx = (0, import_react133.useContext)($07b14b47974efb58$var$PopoverGroupContext), isSubPopover = groupCtx && props.trigger === "SubmenuTrigger";
- var _props_offset;
- let { popoverProps, underlayProps, arrowProps, placement, triggerAnchorPoint } = $f2f8a6077418541e$export$542a6fd13ac93354({
- ...props,
- offset: (_props_offset = props.offset) !== null && _props_offset !== void 0 ? _props_offset : 8,
- arrowRef,
- // If this is a submenu/subdialog, use the root popover's container
- // to detect outside interaction and add aria-hidden.
- groupRef: isSubPopover ? groupCtx : containerRef
- }, state3), ref = props.popoverRef, isEntering = $d3f049242431219c$export$6d3443f2c48bfc20(ref, !!placement) || props.isEntering || !1, renderProps = $64fa3d84918910a7$export$4d86445c2cf5e3({
- ...props,
- defaultClassName: "react-aria-Popover",
- values: {
- trigger: props.trigger || null,
- placement,
- isEntering,
- isExiting
- }
- }), shouldBeDialog = !props.isNonModal || props.trigger === "SubmenuTrigger", [isDialog, setDialog] = (0, import_react133.useState)(!1);
- $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
- ref.current && setDialog(shouldBeDialog && !ref.current.querySelector("[role=dialog]"));
- }, [
- ref,
- shouldBeDialog
- ]), (0, import_react133.useEffect)(() => {
- isDialog && props.trigger !== "SubmenuTrigger" && ref.current && !ref.current.contains(document.activeElement) && $3ad3f6e1647bc98d$export$80f3e147d781571c(ref.current);
- }, [
- isDialog,
- ref,
- props.trigger
- ]);
- let children = (0, import_react133.useMemo)(() => {
- let children2 = renderProps.children;
- if (clearContexts) for (let Context of clearContexts) children2 = import_react133.default.createElement(Context.Provider, {
- value: null
- }, children2);
- return children2;
- }, [
- renderProps.children,
- clearContexts
- ]), style = {
- ...popoverProps.style,
- "--trigger-anchor-point": triggerAnchorPoint ? `${triggerAnchorPoint.x}px ${triggerAnchorPoint.y}px` : void 0,
- ...renderProps.style
- }, overlay = import_react133.default.createElement("div", {
- ...$3ef42575df84b30b$export$9d1611c77c2fe928($65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, {
- global: !0
- }), popoverProps),
- ...renderProps,
- role: isDialog ? "dialog" : void 0,
- tabIndex: isDialog ? -1 : void 0,
- "aria-label": props["aria-label"],
- "aria-labelledby": props["aria-labelledby"],
- ref,
- slot: props.slot || void 0,
- style,
- dir: props.dir,
- "data-trigger": props.trigger,
- "data-placement": placement,
- "data-entering": isEntering || void 0,
- "data-exiting": isExiting || void 0
- }, !props.isNonModal && import_react133.default.createElement($86ea4cb521eb2e37$export$2317d149ed6f78c4, {
- onDismiss: state3.close
- }), import_react133.default.createElement($44f671af83e7d9e0$export$2de4954e8ae13b9f.Provider, {
- value: {
- ...arrowProps,
- placement,
- ref: arrowRef
- }
- }, children), import_react133.default.createElement($86ea4cb521eb2e37$export$2317d149ed6f78c4, {
- onDismiss: state3.close
- }));
- if (!isSubPopover) return import_react133.default.createElement($337b884510726a0d$export$c6fdb837b070b4ff, {
- ...props,
- shouldContainFocus: isDialog,
- isExiting,
- portalContainer: UNSTABLE_portalContainer
- }, !props.isNonModal && state3.isOpen && import_react133.default.createElement("div", {
- "data-testid": "underlay",
- ...underlayProps,
- style: {
- position: "fixed",
- inset: 0
- }
- }), import_react133.default.createElement("div", {
- ref: containerRef,
- style: {
- display: "contents"
- }
- }, import_react133.default.createElement($07b14b47974efb58$var$PopoverGroupContext.Provider, {
- value: containerRef
- }, overlay)));
- var _ref;
- return import_react133.default.createElement($337b884510726a0d$export$c6fdb837b070b4ff, {
- ...props,
- shouldContainFocus: isDialog,
- isExiting,
- portalContainer: (_ref = UNSTABLE_portalContainer ?? groupCtx?.current) !== null && _ref !== void 0 ? _ref : void 0
- }, overlay);
- }
-
- // ../../node_modules/react-aria-components/dist/Collection.mjs
- var import_react134 = __toESM(require_react(), 1), $7135fc7d473fd974$export$d40e14dec8b060a8 = (0, import_react134.createContext)(null), $7135fc7d473fd974$export$6e2c8f0811a474ce = $e1995378a142960e$export$e953bb1cd0f19726("section", (props, ref, section) => {
- let { name, render } = (0, import_react134.useContext)($7135fc7d473fd974$export$d40e14dec8b060a8);
- return render(props, ref, section, "react-aria-Section");
- }), $7135fc7d473fd974$export$a164736487e3f0ae = {
- CollectionRoot({ collection, renderDropIndicator }) {
- return $7135fc7d473fd974$var$useCollectionRender(collection, null, renderDropIndicator);
- },
- CollectionBranch({ collection, parent, renderDropIndicator }) {
- return $7135fc7d473fd974$var$useCollectionRender(collection, parent, renderDropIndicator);
- }
- };
- function $7135fc7d473fd974$var$useCollectionRender(collection, parent, renderDropIndicator) {
- return $e948873055cbafe4$export$727c8fc270210f13({
- items: parent ? collection.getChildren(parent.key) : collection,
- dependencies: [
- renderDropIndicator
- ],
- children(node2) {
- let rendered = node2.render(node2);
- return !renderDropIndicator || node2.type !== "item" ? rendered : import_react134.default.createElement(import_react134.default.Fragment, null, renderDropIndicator({
- type: "item",
- key: node2.key,
- dropPosition: "before"
- }), rendered, $7135fc7d473fd974$export$2dbbd341daed716d(collection, node2, renderDropIndicator));
- }
- });
- }
- function $7135fc7d473fd974$export$2dbbd341daed716d(collection, node2, renderDropIndicator) {
- let key = node2.key, keyAfter = collection.getKeyAfter(key), nextItemInFlattenedCollection = keyAfter != null ? collection.getItem(keyAfter) : null;
- for (; nextItemInFlattenedCollection != null && nextItemInFlattenedCollection.type !== "item"; )
- keyAfter = collection.getKeyAfter(nextItemInFlattenedCollection.key), nextItemInFlattenedCollection = keyAfter != null ? collection.getItem(keyAfter) : null;
- let nextItemInSameLevel = node2.nextKey != null ? collection.getItem(node2.nextKey) : null;
- for (; nextItemInSameLevel != null && nextItemInSameLevel.type !== "item"; ) nextItemInSameLevel = nextItemInSameLevel.nextKey != null ? collection.getItem(nextItemInSameLevel.nextKey) : null;
- let afterIndicators = [];
- if (nextItemInSameLevel == null) {
- let current = node2;
- for (; current && (!nextItemInFlattenedCollection || current.parentKey !== nextItemInFlattenedCollection.parentKey && nextItemInFlattenedCollection.level < current.level); ) {
- let indicator = renderDropIndicator({
- type: "item",
- key: current.key,
- dropPosition: "after"
- });
- (0, import_react134.isValidElement)(indicator) && afterIndicators.push((0, import_react134.cloneElement)(indicator, {
- key: `${current.key}-after`
- })), current = current.parentKey != null ? collection.getItem(current.parentKey) : null;
- }
- }
- return afterIndicators;
- }
- var $7135fc7d473fd974$export$4feb769f8ddf26c5 = (0, import_react134.createContext)($7135fc7d473fd974$export$a164736487e3f0ae);
- function $7135fc7d473fd974$export$90e00781bc59d8f9(focusedKey) {
- return (0, import_react134.useMemo)(() => focusedKey != null ? /* @__PURE__ */ new Set([
- focusedKey
- ]) : null, [
- focusedKey
- ]);
- }
-
- // ../../node_modules/react-aria-components/dist/context.mjs
- var import_react135 = __toESM(require_react(), 1), $8e6cc465cc68f603$export$b0d3ecf7112093a7 = (0, import_react135.createContext)(null), $8e6cc465cc68f603$export$698f465ec27e93df = (0, import_react135.createContext)(null);
-
- // ../../node_modules/react-aria-components/dist/Header.mjs
- var import_react136 = __toESM(require_react(), 1), $72a5793c14baf454$export$e0e4026c12a8bdbb = (0, import_react136.createContext)({}), $72a5793c14baf454$export$8b251419efc915eb = $e1995378a142960e$export$18af5c7a9e9b3664($23b9f4fcf0fe224b$export$5ae2504e948afce5, function(props, ref) {
- return [props, ref] = $64fa3d84918910a7$export$29f1550f4b0d4415(props, ref, $72a5793c14baf454$export$e0e4026c12a8bdbb), import_react136.default.createElement("header", {
- className: "react-aria-Header",
- ...props,
- ref
- }, props.children);
- });
-
- // ../../node_modules/react-aria-components/dist/Keyboard.mjs
- var import_react137 = __toESM(require_react(), 1), $63df2425e2108aa8$export$744d98a3b8a94e1c = (0, import_react137.createContext)({}), $63df2425e2108aa8$export$16e4d70cc375e707 = (0, import_react137.forwardRef)(function(props, ref) {
- return [props, ref] = $64fa3d84918910a7$export$29f1550f4b0d4415(props, ref, $63df2425e2108aa8$export$744d98a3b8a94e1c), import_react137.default.createElement("kbd", {
- dir: "ltr",
- ...props,
- ref
- });
- });
-
- // ../../node_modules/@react-aria/separator/dist/useSeparator.mjs
- function $f4b273590fab9f93$export$52210f68a14655d0(props) {
- let domProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, {
- labelable: !0
- }), ariaOrientation;
- return props.orientation === "vertical" && (ariaOrientation = "vertical"), props.elementType !== "hr" ? {
- separatorProps: {
- ...domProps,
- role: "separator",
- "aria-orientation": ariaOrientation
- }
- } : {
- separatorProps: domProps
- };
- }
-
- // ../../node_modules/react-aria-components/dist/Separator.mjs
- var import_react138 = __toESM(require_react(), 1), $431f98aba6844401$export$6615d83f6de245ce = (0, import_react138.createContext)({}), $431f98aba6844401$export$7750289ca694c0b5 = class extends $23b9f4fcf0fe224b$export$d68d59712b04d9d1 {
- filter(collection, newCollection) {
- let prevItem = newCollection.getItem(this.prevKey);
- if (prevItem && prevItem.type !== "separator") {
- let clone3 = this.clone();
- return newCollection.addDescendants(clone3, collection), clone3;
- }
- return null;
- }
- };
- $431f98aba6844401$export$7750289ca694c0b5.type = "separator";
- var $431f98aba6844401$export$1ff3c3f08ae963c0 = $e1995378a142960e$export$18af5c7a9e9b3664($431f98aba6844401$export$7750289ca694c0b5, function(props, ref) {
- [props, ref] = $64fa3d84918910a7$export$29f1550f4b0d4415(props, ref, $431f98aba6844401$export$6615d83f6de245ce);
- let { elementType, orientation, style, className, slot, ...otherProps } = props, Element2 = elementType || "hr";
- Element2 === "hr" && orientation === "vertical" && (Element2 = "div");
- let { separatorProps } = $f4b273590fab9f93$export$52210f68a14655d0({
- ...otherProps,
- elementType,
- orientation
- }), DOMProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, {
- global: !0
- });
- return import_react138.default.createElement(Element2, {
- ...$3ef42575df84b30b$export$9d1611c77c2fe928(DOMProps, separatorProps),
- style,
- className: className ?? "react-aria-Separator",
- ref,
- slot: slot || void 0
- });
- });
-
- // ../../node_modules/@react-aria/menu/dist/ar-AE.mjs
- var $c0398ad35c3639b7$exports = {};
- $c0398ad35c3639b7$exports = {
- longPressMessage: "\u0627\u0636\u063A\u0637 \u0645\u0637\u0648\u0644\u0627\u064B \u0623\u0648 \u0627\u0636\u063A\u0637 \u0639\u0644\u0649 Alt + \u0627\u0644\u0633\u0647\u0645 \u0644\u0623\u0633\u0641\u0644 \u0644\u0641\u062A\u062D \u0627\u0644\u0642\u0627\u0626\u0645\u0629"
- };
-
- // ../../node_modules/@react-aria/menu/dist/bg-BG.mjs
- var $7af657c4165927c3$exports = {};
- $7af657c4165927c3$exports = {
- longPressMessage: "\u041D\u0430\u0442\u0438\u0441\u043D\u0435\u0442\u0435 \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E \u0438\u043B\u0438 \u043D\u0430\u0442\u0438\u0441\u043D\u0435\u0442\u0435 Alt+ \u0441\u0442\u0440\u0435\u043B\u043A\u0430 \u043D\u0430\u0434\u043E\u043B\u0443, \u0437\u0430 \u0434\u0430 \u043E\u0442\u0432\u043E\u0440\u0438\u0442\u0435 \u043C\u0435\u043D\u044E\u0442\u043E"
- };
-
- // ../../node_modules/@react-aria/menu/dist/cs-CZ.mjs
- var $d95d4da6d531ab81$exports = {};
- $d95d4da6d531ab81$exports = {
- longPressMessage: "Dlouh\xFDm stiskem nebo stisknut\xEDm kl\xE1ves Alt + \u0161ipka dol\u016F otev\u0159ete nab\xEDdku"
- };
-
- // ../../node_modules/@react-aria/menu/dist/da-DK.mjs
- var $24ebda9c775dca17$exports = {};
- $24ebda9c775dca17$exports = {
- longPressMessage: "Langt tryk eller tryk p\xE5 Alt + pil ned for at \xE5bne menuen"
- };
-
- // ../../node_modules/@react-aria/menu/dist/de-DE.mjs
- var $743e0dfca6cab1e9$exports = {};
- $743e0dfca6cab1e9$exports = {
- longPressMessage: "Dr\xFCcken Sie lange oder dr\xFCcken Sie Alt + Nach-unten, um das Men\xFC zu \xF6ffnen"
- };
-
- // ../../node_modules/@react-aria/menu/dist/el-GR.mjs
- var $a2f41026e05f1c84$exports = {};
- $a2f41026e05f1c84$exports = {
- longPressMessage: "\u03A0\u03B9\u03AD\u03C3\u03C4\u03B5 \u03C0\u03B1\u03C1\u03B1\u03C4\u03B5\u03C4\u03B1\u03BC\u03AD\u03BD\u03B1 \u03AE \u03C0\u03B1\u03C4\u03AE\u03C3\u03C4\u03B5 Alt + \u03BA\u03AC\u03C4\u03C9 \u03B2\u03AD\u03BB\u03BF\u03C2 \u03B3\u03B9\u03B1 \u03BD\u03B1 \u03B1\u03BD\u03BF\u03AF\u03BE\u03B5\u03C4\u03B5 \u03C4\u03BF \u03BC\u03B5\u03BD\u03BF\u03CD"
- };
-
- // ../../node_modules/@react-aria/menu/dist/en-US.mjs
- var $43b800e97c901737$exports = {};
- $43b800e97c901737$exports = {
- longPressMessage: "Long press or press Alt + ArrowDown to open menu"
- };
-
- // ../../node_modules/@react-aria/menu/dist/es-ES.mjs
- var $442f5f6ac211e29f$exports = {};
- $442f5f6ac211e29f$exports = {
- longPressMessage: "Mantenga pulsado o pulse Alt + flecha abajo para abrir el men\xFA"
- };
-
- // ../../node_modules/@react-aria/menu/dist/et-EE.mjs
- var $dff280acfeb2d8ac$exports = {};
- $dff280acfeb2d8ac$exports = {
- longPressMessage: "Men\xFC\xFC avamiseks vajutage pikalt v\xF5i vajutage klahve Alt + allanool"
- };
-
- // ../../node_modules/@react-aria/menu/dist/fi-FI.mjs
- var $51608325613944d7$exports = {};
- $51608325613944d7$exports = {
- longPressMessage: "Avaa valikko painamalla pohjassa tai n\xE4pp\xE4inyhdistelm\xE4ll\xE4 Alt + Alanuoli"
- };
-
- // ../../node_modules/@react-aria/menu/dist/fr-FR.mjs
- var $c4a1b1eabeaa87be$exports = {};
- $c4a1b1eabeaa87be$exports = {
- longPressMessage: "Appuyez de mani\xE8re prolong\xE9e ou appuyez sur Alt\xA0+\xA0Fl\xE8che vers le bas pour ouvrir le menu."
- };
-
- // ../../node_modules/@react-aria/menu/dist/he-IL.mjs
- var $8c74815cdee18d1b$exports = {};
- $8c74815cdee18d1b$exports = {
- longPressMessage: "\u05DC\u05D7\u05E5 \u05DC\u05D7\u05D9\u05E6\u05D4 \u05D0\u05E8\u05D5\u05DB\u05D4 \u05D0\u05D5 \u05D4\u05E7\u05E9 Alt + ArrowDown \u05DB\u05D3\u05D9 \u05DC\u05E4\u05EA\u05D5\u05D7 \u05D0\u05EA \u05D4\u05EA\u05E4\u05E8\u05D9\u05D8"
- };
-
- // ../../node_modules/@react-aria/menu/dist/hr-HR.mjs
- var $fd0e9ef6a7fe0ec9$exports = {};
- $fd0e9ef6a7fe0ec9$exports = {
- longPressMessage: "Dugo pritisnite ili pritisnite Alt + strelicu prema dolje za otvaranje izbornika"
- };
-
- // ../../node_modules/@react-aria/menu/dist/hu-HU.mjs
- var $a89a74a39eba465a$exports = {};
- $a89a74a39eba465a$exports = {
- longPressMessage: "Nyomja meg hosszan, vagy nyomja meg az Alt + lefele ny\xEDl gombot a men\xFC megnyit\xE1s\xE1hoz"
- };
-
- // ../../node_modules/@react-aria/menu/dist/it-IT.mjs
- var $edc7c66594a0ae8a$exports = {};
- $edc7c66594a0ae8a$exports = {
- longPressMessage: "Premere a lungo o premere Alt + Freccia gi\xF9 per aprire il menu"
- };
-
- // ../../node_modules/@react-aria/menu/dist/ja-JP.mjs
- var $f1ab51510712db52$exports = {};
- $f1ab51510712db52$exports = {
- longPressMessage: "\u9577\u62BC\u3057\u307E\u305F\u306F Alt+\u4E0B\u77E2\u5370\u30AD\u30FC\u3067\u30E1\u30CB\u30E5\u30FC\u3092\u958B\u304F"
- };
-
- // ../../node_modules/@react-aria/menu/dist/ko-KR.mjs
- var $f9b672d9b82fa3d6$exports = {};
- $f9b672d9b82fa3d6$exports = {
- longPressMessage: "\uAE38\uAC8C \uB204\uB974\uAC70\uB098 Alt + \uC544\uB798\uCABD \uD654\uC0B4\uD45C\uB97C \uB20C\uB7EC \uBA54\uB274 \uC5F4\uAE30"
- };
-
- // ../../node_modules/@react-aria/menu/dist/lt-LT.mjs
- var $a385f3910feda499$exports = {};
- $a385f3910feda499$exports = {
- longPressMessage: "Nor\u0117dami atidaryti meniu, nuspaud\u0119 palaikykite arba paspauskite \u201EAlt + ArrowDown\u201C."
- };
-
- // ../../node_modules/@react-aria/menu/dist/lv-LV.mjs
- var $4f1bde932c441789$exports = {};
- $4f1bde932c441789$exports = {
- longPressMessage: "Lai atv\u0113rtu izv\u0113lni, turiet nospiestu vai nospiediet tausti\u0146u kombin\u0101ciju Alt + lejupv\u0113rst\u0101 bulti\u0146a"
- };
-
- // ../../node_modules/@react-aria/menu/dist/nb-NO.mjs
- var $914a51a8a594d5be$exports = {};
- $914a51a8a594d5be$exports = {
- longPressMessage: "Langt trykk eller trykk Alt + PilNed for \xE5 \xE5pne menyen"
- };
-
- // ../../node_modules/@react-aria/menu/dist/nl-NL.mjs
- var $89aaf803103bb500$exports = {};
- $89aaf803103bb500$exports = {
- longPressMessage: "Druk lang op Alt + pijl-omlaag of druk op Alt om het menu te openen"
- };
-
- // ../../node_modules/@react-aria/menu/dist/pl-PL.mjs
- var $c685891476dbaaca$exports = {};
- $c685891476dbaaca$exports = {
- longPressMessage: "Naci\u015Bnij i przytrzymaj lub naci\u015Bnij klawisze Alt + Strza\u0142ka w d\xF3\u0142, aby otworzy\u0107 menu"
- };
-
- // ../../node_modules/@react-aria/menu/dist/pt-BR.mjs
- var $885879b9b10c2959$exports = {};
- $885879b9b10c2959$exports = {
- longPressMessage: "Pressione e segure ou pressione Alt + Seta para baixo para abrir o menu"
- };
-
- // ../../node_modules/@react-aria/menu/dist/pt-PT.mjs
- var $6b39616688a51692$exports = {};
- $6b39616688a51692$exports = {
- longPressMessage: "Prima continuamente ou prima Alt + Seta Para Baixo para abrir o menu"
- };
-
- // ../../node_modules/@react-aria/menu/dist/ro-RO.mjs
- var $f26362aed63f47e2$exports = {};
- $f26362aed63f47e2$exports = {
- longPressMessage: "Ap\u0103sa\u021Bi lung sau ap\u0103sa\u021Bi pe Alt + s\u0103geat\u0103 \xEEn jos pentru a deschide meniul"
- };
-
- // ../../node_modules/@react-aria/menu/dist/ru-RU.mjs
- var $06cbade644558bf0$exports = {};
- $06cbade644558bf0$exports = {
- longPressMessage: "\u041D\u0430\u0436\u043C\u0438\u0442\u0435 \u0438 \u0443\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0439\u0442\u0435 \u0438\u043B\u0438 \u043D\u0430\u0436\u043C\u0438\u0442\u0435 Alt + \u0421\u0442\u0440\u0435\u043B\u043A\u0430 \u0432\u043D\u0438\u0437, \u0447\u0442\u043E\u0431\u044B \u043E\u0442\u043A\u0440\u044B\u0442\u044C \u043C\u0435\u043D\u044E"
- };
-
- // ../../node_modules/@react-aria/menu/dist/sk-SK.mjs
- var $0a391ff68f9d59b1$exports = {};
- $0a391ff68f9d59b1$exports = {
- longPressMessage: "Ponuku otvor\xEDte dlh\xFDm stla\u010Den\xEDm alebo stla\u010Den\xEDm kl\xE1vesu Alt + kl\xE1vesu so \u0161\xEDpkou nadol"
- };
-
- // ../../node_modules/@react-aria/menu/dist/sl-SI.mjs
- var $8193cf0e649c7928$exports = {};
- $8193cf0e649c7928$exports = {
- longPressMessage: "Za odprtje menija pritisnite in dr\u017Eite gumb ali pritisnite Alt+pu\u0161\u010Dica navzdol"
- };
-
- // ../../node_modules/@react-aria/menu/dist/sr-SP.mjs
- var $f398debcce5a5c55$exports = {};
- $f398debcce5a5c55$exports = {
- longPressMessage: "Dugo pritisnite ili pritisnite Alt + strelicu prema dole da otvorite meni"
- };
-
- // ../../node_modules/@react-aria/menu/dist/sv-SE.mjs
- var $9e9fef000aa4c013$exports = {};
- $9e9fef000aa4c013$exports = {
- longPressMessage: "H\xE5ll nedtryckt eller tryck p\xE5 Alt + pil ned\xE5t f\xF6r att \xF6ppna menyn"
- };
-
- // ../../node_modules/@react-aria/menu/dist/tr-TR.mjs
- var $c016c8183bbe3d68$exports = {};
- $c016c8183bbe3d68$exports = {
- longPressMessage: "Men\xFCy\xFC a\xE7mak i\xE7in uzun bas\u0131n veya Alt + A\u015Fa\u011F\u0131 Ok tu\u015Funa bas\u0131n"
- };
-
- // ../../node_modules/@react-aria/menu/dist/uk-UA.mjs
- var $ca4f6c8462244e62$exports = {};
- $ca4f6c8462244e62$exports = {
- longPressMessage: "\u0414\u043E\u0432\u0433\u043E \u0430\u0431\u043E \u0437\u0432\u0438\u0447\u0430\u0439\u043D\u043E \u043D\u0430\u0442\u0438\u0441\u043D\u0456\u0442\u044C \u043A\u043E\u043C\u0431\u0456\u043D\u0430\u0446\u0456\u044E \u043A\u043B\u0430\u0432\u0456\u0448 Alt \u0456 \u0441\u0442\u0440\u0456\u043B\u043A\u0430 \u0432\u043D\u0438\u0437, \u0449\u043E\u0431 \u0432\u0456\u0434\u043A\u0440\u0438\u0442\u0438 \u043C\u0435\u043D\u044E"
- };
-
- // ../../node_modules/@react-aria/menu/dist/zh-CN.mjs
- var $2d9960c02ccac927$exports = {};
- $2d9960c02ccac927$exports = {
- longPressMessage: "\u957F\u6309\u6216\u6309 Alt + \u5411\u4E0B\u65B9\u5411\u952E\u4EE5\u6253\u5F00\u83DC\u5355"
- };
-
- // ../../node_modules/@react-aria/menu/dist/zh-TW.mjs
- var $f1b682a4c8c5631c$exports = {};
- $f1b682a4c8c5631c$exports = {
- longPressMessage: "\u9577\u6309\u6216\u6309 Alt+\u5411\u4E0B\u9375\u4EE5\u958B\u555F\u529F\u80FD\u8868"
- };
-
- // ../../node_modules/@react-aria/menu/dist/intlStrings.mjs
- var $2cbb7ca666678a14$exports = {};
- $2cbb7ca666678a14$exports = {
- "ar-AE": $c0398ad35c3639b7$exports,
- "bg-BG": $7af657c4165927c3$exports,
- "cs-CZ": $d95d4da6d531ab81$exports,
- "da-DK": $24ebda9c775dca17$exports,
- "de-DE": $743e0dfca6cab1e9$exports,
- "el-GR": $a2f41026e05f1c84$exports,
- "en-US": $43b800e97c901737$exports,
- "es-ES": $442f5f6ac211e29f$exports,
- "et-EE": $dff280acfeb2d8ac$exports,
- "fi-FI": $51608325613944d7$exports,
- "fr-FR": $c4a1b1eabeaa87be$exports,
- "he-IL": $8c74815cdee18d1b$exports,
- "hr-HR": $fd0e9ef6a7fe0ec9$exports,
- "hu-HU": $a89a74a39eba465a$exports,
- "it-IT": $edc7c66594a0ae8a$exports,
- "ja-JP": $f1ab51510712db52$exports,
- "ko-KR": $f9b672d9b82fa3d6$exports,
- "lt-LT": $a385f3910feda499$exports,
- "lv-LV": $4f1bde932c441789$exports,
- "nb-NO": $914a51a8a594d5be$exports,
- "nl-NL": $89aaf803103bb500$exports,
- "pl-PL": $c685891476dbaaca$exports,
- "pt-BR": $885879b9b10c2959$exports,
- "pt-PT": $6b39616688a51692$exports,
- "ro-RO": $f26362aed63f47e2$exports,
- "ru-RU": $06cbade644558bf0$exports,
- "sk-SK": $0a391ff68f9d59b1$exports,
- "sl-SI": $8193cf0e649c7928$exports,
- "sr-SP": $f398debcce5a5c55$exports,
- "sv-SE": $9e9fef000aa4c013$exports,
- "tr-TR": $c016c8183bbe3d68$exports,
- "uk-UA": $ca4f6c8462244e62$exports,
- "zh-CN": $2d9960c02ccac927$exports,
- "zh-TW": $f1b682a4c8c5631c$exports
- };
-
- // ../../node_modules/@react-aria/menu/dist/utils.mjs
- var $fc79756100351201$export$6f49b4016bfc8d56 = /* @__PURE__ */ new WeakMap();
-
- // ../../node_modules/@react-aria/selection/dist/utils.mjs
- function $feb5ffebff200149$export$d3e3bd3e26688c04(e) {
- return $c87311424ea30a05$export$e1865c3bedcd822b() ? e.altKey : e.ctrlKey;
- }
- function $feb5ffebff200149$export$c3d8340acf92597f(collectionRef, key) {
- var _collectionRef_current, _collectionRef_current1;
- let selector = `[data-key="${CSS.escape(String(key))}"]`, collection = (_collectionRef_current = collectionRef.current) === null || _collectionRef_current === void 0 ? void 0 : _collectionRef_current.dataset.collection;
- return collection && (selector = `[data-collection="${CSS.escape(collection)}"]${selector}`), (_collectionRef_current1 = collectionRef.current) === null || _collectionRef_current1 === void 0 ? void 0 : _collectionRef_current1.querySelector(selector);
- }
- var $feb5ffebff200149$var$collectionMap = /* @__PURE__ */ new WeakMap();
- function $feb5ffebff200149$export$881eb0d9f3605d9d(collection) {
- let id = $bdb11010cef70236$export$f680877a34711e37();
- return $feb5ffebff200149$var$collectionMap.set(collection, id), id;
- }
- function $feb5ffebff200149$export$6aeb1680a0ae8741(collection) {
- return $feb5ffebff200149$var$collectionMap.get(collection);
- }
-
- // ../../node_modules/@react-aria/selection/dist/useTypeSelect.mjs
- var import_react139 = __toESM(require_react(), 1), $fb3050f43d946246$var$TYPEAHEAD_DEBOUNCE_WAIT_MS = 1e3;
- function $fb3050f43d946246$export$e32c88dfddc6e1d8(options) {
- let { keyboardDelegate, selectionManager, onTypeSelect } = options, state3 = (0, import_react139.useRef)({
- search: "",
- timeout: void 0
- }).current, onKeyDown = (e) => {
- let character2 = $fb3050f43d946246$var$getStringForKey(e.key);
- if (!(!character2 || e.ctrlKey || e.metaKey || !e.currentTarget.contains(e.target) || state3.search.length === 0 && character2 === " ")) {
- if (character2 === " " && state3.search.trim().length > 0 && (e.preventDefault(), "continuePropagation" in e || e.stopPropagation()), state3.search += character2, keyboardDelegate.getKeyForSearch != null) {
- let key = keyboardDelegate.getKeyForSearch(state3.search, selectionManager.focusedKey);
- key == null && (key = keyboardDelegate.getKeyForSearch(state3.search)), key != null && (selectionManager.setFocusedKey(key), onTypeSelect && onTypeSelect(key));
- }
- clearTimeout(state3.timeout), state3.timeout = setTimeout(() => {
- state3.search = "";
- }, $fb3050f43d946246$var$TYPEAHEAD_DEBOUNCE_WAIT_MS);
- }
- };
- return {
- typeSelectProps: {
- // Using a capturing listener to catch the keydown event before
- // other hooks in order to handle the Spacebar event.
- onKeyDownCapture: keyboardDelegate.getKeyForSearch ? onKeyDown : void 0
- }
- };
- }
- function $fb3050f43d946246$var$getStringForKey(key) {
- return key.length === 1 || !/^[A-Z]/i.test(key) ? key : "";
- }
-
- // ../../node_modules/@react-aria/selection/dist/useSelectableCollection.mjs
- var import_react_dom6 = __toESM(require_react_dom(), 1), import_react140 = __toESM(require_react(), 1);
- function $ae20dd8cbca75726$export$d6daf82dcd84e87c(options) {
- let { selectionManager: manager, keyboardDelegate: delegate, ref, autoFocus = !1, shouldFocusWrap = !1, disallowEmptySelection = !1, disallowSelectAll = !1, escapeKeyBehavior = "clearSelection", selectOnFocus = manager.selectionBehavior === "replace", disallowTypeAhead = !1, shouldUseVirtualFocus, allowsTabNavigation = !1, isVirtualized, scrollRef = ref, linkBehavior = "action" } = options, { direction } = $18f2051aff69b9bf$export$43bb16f9c6d9e3f7(), router = $ea8dcbcb9ea1b556$export$9a302a45f65d0572(), onKeyDown = (e) => {
- var _ref_current;
- if (e.altKey && e.key === "Tab" && e.preventDefault(), !(!((_ref_current = ref.current) === null || _ref_current === void 0) && _ref_current.contains(e.target))) return;
- let navigateToKey = (key, childFocus) => {
- if (key != null) {
- if (manager.isLink(key) && linkBehavior === "selection" && selectOnFocus && !$feb5ffebff200149$export$d3e3bd3e26688c04(e)) {
- (0, import_react_dom6.flushSync)(() => {
- manager.setFocusedKey(key, childFocus);
- });
- let item = $feb5ffebff200149$export$c3d8340acf92597f(ref, key), itemProps = manager.getItemProps(key);
- item && router.open(item, e, itemProps.href, itemProps.routerOptions);
- return;
- }
- if (manager.setFocusedKey(key, childFocus), manager.isLink(key) && linkBehavior === "override") return;
- e.shiftKey && manager.selectionMode === "multiple" ? manager.extendSelection(key) : selectOnFocus && !$feb5ffebff200149$export$d3e3bd3e26688c04(e) && manager.replaceSelection(key);
- }
- };
- switch (e.key) {
- case "ArrowDown":
- if (delegate.getKeyBelow) {
- var _delegate_getKeyBelow, _delegate_getFirstKey, _delegate_getFirstKey1;
- let nextKey = manager.focusedKey != null ? (_delegate_getKeyBelow = delegate.getKeyBelow) === null || _delegate_getKeyBelow === void 0 ? void 0 : _delegate_getKeyBelow.call(delegate, manager.focusedKey) : (_delegate_getFirstKey = delegate.getFirstKey) === null || _delegate_getFirstKey === void 0 ? void 0 : _delegate_getFirstKey.call(delegate);
- nextKey == null && shouldFocusWrap && (nextKey = (_delegate_getFirstKey1 = delegate.getFirstKey) === null || _delegate_getFirstKey1 === void 0 ? void 0 : _delegate_getFirstKey1.call(delegate, manager.focusedKey)), nextKey != null && (e.preventDefault(), navigateToKey(nextKey));
- }
- break;
- case "ArrowUp":
- if (delegate.getKeyAbove) {
- var _delegate_getKeyAbove, _delegate_getLastKey, _delegate_getLastKey1;
- let nextKey = manager.focusedKey != null ? (_delegate_getKeyAbove = delegate.getKeyAbove) === null || _delegate_getKeyAbove === void 0 ? void 0 : _delegate_getKeyAbove.call(delegate, manager.focusedKey) : (_delegate_getLastKey = delegate.getLastKey) === null || _delegate_getLastKey === void 0 ? void 0 : _delegate_getLastKey.call(delegate);
- nextKey == null && shouldFocusWrap && (nextKey = (_delegate_getLastKey1 = delegate.getLastKey) === null || _delegate_getLastKey1 === void 0 ? void 0 : _delegate_getLastKey1.call(delegate, manager.focusedKey)), nextKey != null && (e.preventDefault(), navigateToKey(nextKey));
- }
- break;
- case "ArrowLeft":
- if (delegate.getKeyLeftOf) {
- var _delegate_getKeyLeftOf, _delegate_getFirstKey2, _delegate_getLastKey2;
- let nextKey = manager.focusedKey != null ? (_delegate_getKeyLeftOf = delegate.getKeyLeftOf) === null || _delegate_getKeyLeftOf === void 0 ? void 0 : _delegate_getKeyLeftOf.call(delegate, manager.focusedKey) : null;
- nextKey == null && shouldFocusWrap && (nextKey = direction === "rtl" ? (_delegate_getFirstKey2 = delegate.getFirstKey) === null || _delegate_getFirstKey2 === void 0 ? void 0 : _delegate_getFirstKey2.call(delegate, manager.focusedKey) : (_delegate_getLastKey2 = delegate.getLastKey) === null || _delegate_getLastKey2 === void 0 ? void 0 : _delegate_getLastKey2.call(delegate, manager.focusedKey)), nextKey != null && (e.preventDefault(), navigateToKey(nextKey, direction === "rtl" ? "first" : "last"));
- }
- break;
- case "ArrowRight":
- if (delegate.getKeyRightOf) {
- var _delegate_getKeyRightOf, _delegate_getLastKey3, _delegate_getFirstKey3;
- let nextKey = manager.focusedKey != null ? (_delegate_getKeyRightOf = delegate.getKeyRightOf) === null || _delegate_getKeyRightOf === void 0 ? void 0 : _delegate_getKeyRightOf.call(delegate, manager.focusedKey) : null;
- nextKey == null && shouldFocusWrap && (nextKey = direction === "rtl" ? (_delegate_getLastKey3 = delegate.getLastKey) === null || _delegate_getLastKey3 === void 0 ? void 0 : _delegate_getLastKey3.call(delegate, manager.focusedKey) : (_delegate_getFirstKey3 = delegate.getFirstKey) === null || _delegate_getFirstKey3 === void 0 ? void 0 : _delegate_getFirstKey3.call(delegate, manager.focusedKey)), nextKey != null && (e.preventDefault(), navigateToKey(nextKey, direction === "rtl" ? "last" : "first"));
- }
- break;
- case "Home":
- if (delegate.getFirstKey) {
- if (manager.focusedKey === null && e.shiftKey) return;
- e.preventDefault();
- let firstKey = delegate.getFirstKey(manager.focusedKey, $21f1aa98acb08317$export$16792effe837dba3(e));
- manager.setFocusedKey(firstKey), firstKey != null && ($21f1aa98acb08317$export$16792effe837dba3(e) && e.shiftKey && manager.selectionMode === "multiple" ? manager.extendSelection(firstKey) : selectOnFocus && manager.replaceSelection(firstKey));
- }
- break;
- case "End":
- if (delegate.getLastKey) {
- if (manager.focusedKey === null && e.shiftKey) return;
- e.preventDefault();
- let lastKey = delegate.getLastKey(manager.focusedKey, $21f1aa98acb08317$export$16792effe837dba3(e));
- manager.setFocusedKey(lastKey), lastKey != null && ($21f1aa98acb08317$export$16792effe837dba3(e) && e.shiftKey && manager.selectionMode === "multiple" ? manager.extendSelection(lastKey) : selectOnFocus && manager.replaceSelection(lastKey));
- }
- break;
- case "PageDown":
- if (delegate.getKeyPageBelow && manager.focusedKey != null) {
- let nextKey = delegate.getKeyPageBelow(manager.focusedKey);
- nextKey != null && (e.preventDefault(), navigateToKey(nextKey));
- }
- break;
- case "PageUp":
- if (delegate.getKeyPageAbove && manager.focusedKey != null) {
- let nextKey = delegate.getKeyPageAbove(manager.focusedKey);
- nextKey != null && (e.preventDefault(), navigateToKey(nextKey));
- }
- break;
- case "a":
- $21f1aa98acb08317$export$16792effe837dba3(e) && manager.selectionMode === "multiple" && disallowSelectAll !== !0 && (e.preventDefault(), manager.selectAll());
- break;
- case "Escape":
- escapeKeyBehavior === "clearSelection" && !disallowEmptySelection && manager.selectedKeys.size !== 0 && (e.stopPropagation(), e.preventDefault(), manager.clearSelection());
- break;
- case "Tab":
- if (!allowsTabNavigation) {
- if (e.shiftKey) ref.current.focus();
- else {
- let walker = $9bf71ea28793e738$export$2d6ec8fc375ceafa(ref.current, {
- tabbable: !0
- }), next2, last2;
- do
- last2 = walker.lastChild(), last2 && (next2 = last2);
- while (last2);
- next2 && !next2.contains(document.activeElement) && $7215afc6de606d6b$export$de79e2c695e052f3(next2);
- }
- break;
- }
- }
- }, scrollPos = (0, import_react140.useRef)({
- top: 0,
- left: 0
- });
- $e9faafb641e167db$export$90fc3a17d93f704c(scrollRef, "scroll", isVirtualized ? void 0 : () => {
- var _scrollRef_current, _scrollRef_current1, _scrollRef_current_scrollTop, _scrollRef_current_scrollLeft;
- scrollPos.current = {
- top: (_scrollRef_current_scrollTop = (_scrollRef_current = scrollRef.current) === null || _scrollRef_current === void 0 ? void 0 : _scrollRef_current.scrollTop) !== null && _scrollRef_current_scrollTop !== void 0 ? _scrollRef_current_scrollTop : 0,
- left: (_scrollRef_current_scrollLeft = (_scrollRef_current1 = scrollRef.current) === null || _scrollRef_current1 === void 0 ? void 0 : _scrollRef_current1.scrollLeft) !== null && _scrollRef_current_scrollLeft !== void 0 ? _scrollRef_current_scrollLeft : 0
- };
- });
- let onFocus = (e) => {
- if (manager.isFocused) {
- e.currentTarget.contains(e.target) || manager.setFocused(!1);
- return;
- }
- if (e.currentTarget.contains(e.target)) {
- if (manager.setFocused(!0), manager.focusedKey == null) {
- var _delegate_getLastKey, _delegate_getFirstKey;
- let navigateToKey = (key) => {
- key != null && (manager.setFocusedKey(key), selectOnFocus && !manager.isSelected(key) && manager.replaceSelection(key));
- }, relatedTarget = e.relatedTarget;
- var _manager_lastSelectedKey, _manager_firstSelectedKey;
- relatedTarget && e.currentTarget.compareDocumentPosition(relatedTarget) & Node.DOCUMENT_POSITION_FOLLOWING ? navigateToKey((_manager_lastSelectedKey = manager.lastSelectedKey) !== null && _manager_lastSelectedKey !== void 0 ? _manager_lastSelectedKey : (_delegate_getLastKey = delegate.getLastKey) === null || _delegate_getLastKey === void 0 ? void 0 : _delegate_getLastKey.call(delegate)) : navigateToKey((_manager_firstSelectedKey = manager.firstSelectedKey) !== null && _manager_firstSelectedKey !== void 0 ? _manager_firstSelectedKey : (_delegate_getFirstKey = delegate.getFirstKey) === null || _delegate_getFirstKey === void 0 ? void 0 : _delegate_getFirstKey.call(delegate));
- } else !isVirtualized && scrollRef.current && (scrollRef.current.scrollTop = scrollPos.current.top, scrollRef.current.scrollLeft = scrollPos.current.left);
- if (manager.focusedKey != null && scrollRef.current) {
- let element = $feb5ffebff200149$export$c3d8340acf92597f(ref, manager.focusedKey);
- element instanceof HTMLElement && (!element.contains(document.activeElement) && !shouldUseVirtualFocus && $7215afc6de606d6b$export$de79e2c695e052f3(element), $507fabe10e71c6fb$export$630ff653c5ada6a9() === "keyboard" && $2f04cbc44ee30ce0$export$c826860796309d1b(element, {
- containingElement: ref.current
- }));
- }
- }
- }, onBlur = (e) => {
- e.currentTarget.contains(e.relatedTarget) || manager.setFocused(!1);
- }, shouldVirtualFocusFirst = (0, import_react140.useRef)(!1);
- $e9faafb641e167db$export$90fc3a17d93f704c(ref, $5671b20cf9b562b2$export$831c820ad60f9d12, shouldUseVirtualFocus ? (e) => {
- let { detail } = e;
- e.stopPropagation(), manager.setFocused(!0), detail?.focusStrategy === "first" && (shouldVirtualFocusFirst.current = !0);
- } : void 0);
- let updateActiveDescendant = $8ae05eaa5c114e9c$export$7f54fc3180508a52(() => {
- var _delegate_getFirstKey, _delegate_getFirstKey1;
- let keyToFocus = (_delegate_getFirstKey1 = (_delegate_getFirstKey = delegate.getFirstKey) === null || _delegate_getFirstKey === void 0 ? void 0 : _delegate_getFirstKey.call(delegate)) !== null && _delegate_getFirstKey1 !== void 0 ? _delegate_getFirstKey1 : null;
- if (keyToFocus == null) {
- let previousActiveElement = $d4ee10de306f2510$export$cd4e5573fbe2b576();
- $55f9b1ae81f22853$export$76e4e37e5339496d(ref.current), $55f9b1ae81f22853$export$2b35b76d2e30e129(previousActiveElement, null), manager.collection.size > 0 && (shouldVirtualFocusFirst.current = !1);
- } else
- manager.setFocusedKey(keyToFocus), shouldVirtualFocusFirst.current = !1;
- });
- $ca9b37712f007381$export$72ef708ab07251f1(() => {
- shouldVirtualFocusFirst.current && updateActiveDescendant();
- }, [
- manager.collection,
- updateActiveDescendant
- ]);
- let resetFocusFirstFlag = $8ae05eaa5c114e9c$export$7f54fc3180508a52(() => {
- manager.collection.size > 0 && (shouldVirtualFocusFirst.current = !1);
- });
- $ca9b37712f007381$export$72ef708ab07251f1(() => {
- resetFocusFirstFlag();
- }, [
- manager.focusedKey,
- resetFocusFirstFlag
- ]), $e9faafb641e167db$export$90fc3a17d93f704c(ref, $5671b20cf9b562b2$export$447a38995de2c711, shouldUseVirtualFocus ? (e) => {
- var _e_detail;
- e.stopPropagation(), manager.setFocused(!1), !((_e_detail = e.detail) === null || _e_detail === void 0) && _e_detail.clearFocusKey && manager.setFocusedKey(null);
- } : void 0);
- let autoFocusRef = (0, import_react140.useRef)(autoFocus), didAutoFocusRef = (0, import_react140.useRef)(!1);
- (0, import_react140.useEffect)(() => {
- if (autoFocusRef.current) {
- var _delegate_getFirstKey, _delegate_getLastKey;
- let focusedKey = null;
- var _delegate_getFirstKey1;
- autoFocus === "first" && (focusedKey = (_delegate_getFirstKey1 = (_delegate_getFirstKey = delegate.getFirstKey) === null || _delegate_getFirstKey === void 0 ? void 0 : _delegate_getFirstKey.call(delegate)) !== null && _delegate_getFirstKey1 !== void 0 ? _delegate_getFirstKey1 : null);
- var _delegate_getLastKey1;
- autoFocus === "last" && (focusedKey = (_delegate_getLastKey1 = (_delegate_getLastKey = delegate.getLastKey) === null || _delegate_getLastKey === void 0 ? void 0 : _delegate_getLastKey.call(delegate)) !== null && _delegate_getLastKey1 !== void 0 ? _delegate_getLastKey1 : null);
- let selectedKeys = manager.selectedKeys;
- if (selectedKeys.size) {
- for (let key of selectedKeys) if (manager.canSelectItem(key)) {
- focusedKey = key;
- break;
- }
- }
- manager.setFocused(!0), manager.setFocusedKey(focusedKey), focusedKey == null && !shouldUseVirtualFocus && ref.current && $3ad3f6e1647bc98d$export$80f3e147d781571c(ref.current), manager.collection.size > 0 && (autoFocusRef.current = !1, didAutoFocusRef.current = !0);
- }
- });
- let lastFocusedKey = (0, import_react140.useRef)(manager.focusedKey), raf = (0, import_react140.useRef)(null);
- (0, import_react140.useEffect)(() => {
- if (manager.isFocused && manager.focusedKey != null && (manager.focusedKey !== lastFocusedKey.current || didAutoFocusRef.current) && scrollRef.current && ref.current) {
- let modality = $507fabe10e71c6fb$export$630ff653c5ada6a9(), element = $feb5ffebff200149$export$c3d8340acf92597f(ref, manager.focusedKey);
- if (!(element instanceof HTMLElement))
- return;
- (modality === "keyboard" || didAutoFocusRef.current) && (raf.current && cancelAnimationFrame(raf.current), raf.current = requestAnimationFrame(() => {
- scrollRef.current && ($2f04cbc44ee30ce0$export$53a0910f038337bd(scrollRef.current, element), modality !== "virtual" && $2f04cbc44ee30ce0$export$c826860796309d1b(element, {
- containingElement: ref.current
- }));
- }));
- }
- !shouldUseVirtualFocus && manager.isFocused && manager.focusedKey == null && lastFocusedKey.current != null && ref.current && $3ad3f6e1647bc98d$export$80f3e147d781571c(ref.current), lastFocusedKey.current = manager.focusedKey, didAutoFocusRef.current = !1;
- }), (0, import_react140.useEffect)(() => () => {
- raf.current && cancelAnimationFrame(raf.current);
- }, []), $e9faafb641e167db$export$90fc3a17d93f704c(ref, "react-aria-focus-scope-restore", (e) => {
- e.preventDefault(), manager.setFocused(!0);
- });
- let handlers = {
- onKeyDown,
- onFocus,
- onBlur,
- onMouseDown(e) {
- scrollRef.current === e.target && e.preventDefault();
- }
- }, { typeSelectProps } = $fb3050f43d946246$export$e32c88dfddc6e1d8({
- keyboardDelegate: delegate,
- selectionManager: manager
- });
- disallowTypeAhead || (handlers = $3ef42575df84b30b$export$9d1611c77c2fe928(typeSelectProps, handlers));
- let tabIndex;
- shouldUseVirtualFocus || (tabIndex = manager.focusedKey == null ? 0 : -1);
- let collectionId = $feb5ffebff200149$export$881eb0d9f3605d9d(manager.collection);
- return {
- collectionProps: $3ef42575df84b30b$export$9d1611c77c2fe928(handlers, {
- tabIndex,
- "data-collection": collectionId
- })
- };
- }
-
- // ../../node_modules/@react-aria/selection/dist/useSelectableItem.mjs
- var import_react141 = __toESM(require_react(), 1);
- function $880e95eb8b93ba9a$export$ecf600387e221c37(options) {
- let { id, selectionManager: manager, key, ref, shouldSelectOnPressUp, shouldUseVirtualFocus, focus, isDisabled: isDisabled3, onAction, allowsDifferentPressOrigin, linkBehavior = "action" } = options, router = $ea8dcbcb9ea1b556$export$9a302a45f65d0572();
- id = $bdb11010cef70236$export$f680877a34711e37(id);
- let onSelect = (e) => {
- if (e.pointerType === "keyboard" && $feb5ffebff200149$export$d3e3bd3e26688c04(e)) manager.toggleSelection(key);
- else {
- if (manager.selectionMode === "none") return;
- if (manager.isLink(key)) {
- if (linkBehavior === "selection" && ref.current) {
- let itemProps2 = manager.getItemProps(key);
- router.open(ref.current, e, itemProps2.href, itemProps2.routerOptions), manager.setSelectedKeys(manager.selectedKeys);
- return;
- } else if (linkBehavior === "override" || linkBehavior === "none") return;
- }
- manager.selectionMode === "single" ? manager.isSelected(key) && !manager.disallowEmptySelection ? manager.toggleSelection(key) : manager.replaceSelection(key) : e && e.shiftKey ? manager.extendSelection(key) : manager.selectionBehavior === "toggle" || e && ($21f1aa98acb08317$export$16792effe837dba3(e) || e.pointerType === "touch" || e.pointerType === "virtual") ? manager.toggleSelection(key) : manager.replaceSelection(key);
- }
- };
- (0, import_react141.useEffect)(() => {
- key === manager.focusedKey && manager.isFocused && (shouldUseVirtualFocus ? $55f9b1ae81f22853$export$76e4e37e5339496d(ref.current) : focus ? focus() : document.activeElement !== ref.current && ref.current && $3ad3f6e1647bc98d$export$80f3e147d781571c(ref.current));
- }, [
- ref,
- key,
- manager.focusedKey,
- manager.childFocusStrategy,
- manager.isFocused,
- shouldUseVirtualFocus
- ]), isDisabled3 = isDisabled3 || manager.isDisabled(key);
- let itemProps = {};
- !shouldUseVirtualFocus && !isDisabled3 ? itemProps = {
- tabIndex: key === manager.focusedKey ? 0 : -1,
- onFocus(e) {
- e.target === ref.current && manager.setFocusedKey(key);
- }
- } : isDisabled3 && (itemProps.onMouseDown = (e) => {
- e.preventDefault();
- });
- let isLinkOverride = manager.isLink(key) && linkBehavior === "override", isActionOverride = onAction && options.UNSTABLE_itemBehavior === "action", hasLinkAction = manager.isLink(key) && linkBehavior !== "selection" && linkBehavior !== "none", allowsSelection = !isDisabled3 && manager.canSelectItem(key) && !isLinkOverride && !isActionOverride, allowsActions = (onAction || hasLinkAction) && !isDisabled3, hasPrimaryAction = allowsActions && (manager.selectionBehavior === "replace" ? !allowsSelection : !allowsSelection || manager.isEmpty), hasSecondaryAction = allowsActions && allowsSelection && manager.selectionBehavior === "replace", hasAction = hasPrimaryAction || hasSecondaryAction, modality = (0, import_react141.useRef)(null), longPressEnabled = hasAction && allowsSelection, longPressEnabledOnPressStart = (0, import_react141.useRef)(!1), hadPrimaryActionOnPressStart = (0, import_react141.useRef)(!1), collectionItemProps = manager.getItemProps(key), performAction = (e) => {
- if (onAction) {
- var _ref_current;
- onAction(), (_ref_current = ref.current) === null || _ref_current === void 0 || _ref_current.dispatchEvent(new CustomEvent("react-aria-item-action", {
- bubbles: !0
- }));
- }
- hasLinkAction && ref.current && router.open(ref.current, e, collectionItemProps.href, collectionItemProps.routerOptions);
- }, itemPressProps = {
- ref
- };
- if (shouldSelectOnPressUp ? (itemPressProps.onPressStart = (e) => {
- modality.current = e.pointerType, longPressEnabledOnPressStart.current = longPressEnabled, e.pointerType === "keyboard" && (!hasAction || $880e95eb8b93ba9a$var$isSelectionKey()) && onSelect(e);
- }, allowsDifferentPressOrigin ? (itemPressProps.onPressUp = hasPrimaryAction ? void 0 : (e) => {
- e.pointerType === "mouse" && allowsSelection && onSelect(e);
- }, itemPressProps.onPress = hasPrimaryAction ? performAction : (e) => {
- e.pointerType !== "keyboard" && e.pointerType !== "mouse" && allowsSelection && onSelect(e);
- }) : itemPressProps.onPress = (e) => {
- if (hasPrimaryAction || hasSecondaryAction && e.pointerType !== "mouse") {
- if (e.pointerType === "keyboard" && !$880e95eb8b93ba9a$var$isActionKey()) return;
- performAction(e);
- } else e.pointerType !== "keyboard" && allowsSelection && onSelect(e);
- }) : (itemPressProps.onPressStart = (e) => {
- modality.current = e.pointerType, longPressEnabledOnPressStart.current = longPressEnabled, hadPrimaryActionOnPressStart.current = hasPrimaryAction, allowsSelection && (e.pointerType === "mouse" && !hasPrimaryAction || e.pointerType === "keyboard" && (!allowsActions || $880e95eb8b93ba9a$var$isSelectionKey())) && onSelect(e);
- }, itemPressProps.onPress = (e) => {
- (e.pointerType === "touch" || e.pointerType === "pen" || e.pointerType === "virtual" || e.pointerType === "keyboard" && hasAction && $880e95eb8b93ba9a$var$isActionKey() || e.pointerType === "mouse" && hadPrimaryActionOnPressStart.current) && (hasAction ? performAction(e) : allowsSelection && onSelect(e));
- }), itemProps["data-collection"] = $feb5ffebff200149$export$6aeb1680a0ae8741(manager.collection), itemProps["data-key"] = key, itemPressProps.preventFocusOnPress = shouldUseVirtualFocus, shouldUseVirtualFocus && (itemPressProps = $3ef42575df84b30b$export$9d1611c77c2fe928(itemPressProps, {
- onPressStart(e) {
- e.pointerType !== "touch" && (manager.setFocused(!0), manager.setFocusedKey(key));
- },
- onPress(e) {
- e.pointerType === "touch" && (manager.setFocused(!0), manager.setFocusedKey(key));
- }
- })), collectionItemProps)
- for (let key2 of [
- "onPressStart",
- "onPressEnd",
- "onPressChange",
- "onPress",
- "onPressUp",
- "onClick"
- ]) collectionItemProps[key2] && (itemPressProps[key2] = $ff5963eb1fccf552$export$e08e3b67e392101e(itemPressProps[key2], collectionItemProps[key2]));
- let { pressProps, isPressed } = $f6c31cce2adf654f$export$45712eceda6fad21(itemPressProps), onDoubleClick = hasSecondaryAction ? (e) => {
- modality.current === "mouse" && (e.stopPropagation(), e.preventDefault(), performAction(e));
- } : void 0, { longPressProps } = $8a26561d2877236e$export$c24ed0104d07eab9({
- isDisabled: !longPressEnabled,
- onLongPress(e) {
- e.pointerType === "touch" && (onSelect(e), manager.setSelectionBehavior("toggle"));
- }
- }), onDragStartCapture = (e) => {
- modality.current === "touch" && longPressEnabledOnPressStart.current && e.preventDefault();
- }, onClick = linkBehavior !== "none" && manager.isLink(key) ? (e) => {
- $ea8dcbcb9ea1b556$export$95185d699e05d4d7.isOpening || e.preventDefault();
- } : void 0;
- return {
- itemProps: $3ef42575df84b30b$export$9d1611c77c2fe928(
- itemProps,
- allowsSelection || hasPrimaryAction || shouldUseVirtualFocus && !isDisabled3 ? pressProps : {},
- longPressEnabled ? longPressProps : {},
- {
- onDoubleClick,
- onDragStartCapture,
- onClick,
- id
- },
- // Prevent DOM focus from moving on mouse down when using virtual focus
- shouldUseVirtualFocus ? {
- onMouseDown: (e) => e.preventDefault()
- } : void 0
- ),
- isPressed,
- isSelected: manager.isSelected(key),
- isFocused: manager.isFocused && manager.focusedKey === key,
- isDisabled: isDisabled3,
- allowsSelection,
- hasAction
- };
- }
- function $880e95eb8b93ba9a$var$isActionKey() {
- let event = window.event;
- return event?.key === "Enter";
- }
- function $880e95eb8b93ba9a$var$isSelectionKey() {
- let event = window.event;
- return event?.key === " " || event?.code === "Space";
- }
-
- // ../../node_modules/@react-aria/selection/dist/DOMLayoutDelegate.mjs
- var $657e4dc4a6e88df0$export$8f5ed9ff9f511381 = class {
- getItemRect(key) {
- let container = this.ref.current;
- if (!container) return null;
- let item = key != null ? $feb5ffebff200149$export$c3d8340acf92597f(this.ref, key) : null;
- if (!item) return null;
- let containerRect = container.getBoundingClientRect(), itemRect = item.getBoundingClientRect();
- return {
- x: itemRect.left - containerRect.left - container.clientLeft + container.scrollLeft,
- y: itemRect.top - containerRect.top - container.clientTop + container.scrollTop,
- width: itemRect.width,
- height: itemRect.height
- };
- }
- getContentSize() {
- let container = this.ref.current;
- var _container_scrollWidth, _container_scrollHeight;
- return {
- width: (_container_scrollWidth = container?.scrollWidth) !== null && _container_scrollWidth !== void 0 ? _container_scrollWidth : 0,
- height: (_container_scrollHeight = container?.scrollHeight) !== null && _container_scrollHeight !== void 0 ? _container_scrollHeight : 0
- };
- }
- getVisibleRect() {
- let container = this.ref.current;
- var _container_scrollLeft, _container_scrollTop, _container_clientWidth, _container_clientHeight;
- return {
- x: (_container_scrollLeft = container?.scrollLeft) !== null && _container_scrollLeft !== void 0 ? _container_scrollLeft : 0,
- y: (_container_scrollTop = container?.scrollTop) !== null && _container_scrollTop !== void 0 ? _container_scrollTop : 0,
- width: (_container_clientWidth = container?.clientWidth) !== null && _container_clientWidth !== void 0 ? _container_clientWidth : 0,
- height: (_container_clientHeight = container?.clientHeight) !== null && _container_clientHeight !== void 0 ? _container_clientHeight : 0
- };
- }
- constructor(ref) {
- this.ref = ref;
- }
- };
-
- // ../../node_modules/@react-aria/selection/dist/ListKeyboardDelegate.mjs
- var $2a25aae57d74318e$export$a05409b8bb224a5a = class {
- isDisabled(item) {
- var _item_props;
- return this.disabledBehavior === "all" && (((_item_props = item.props) === null || _item_props === void 0 ? void 0 : _item_props.isDisabled) || this.disabledKeys.has(item.key));
- }
- findNextNonDisabled(key, getNext) {
- let nextKey = key;
- for (; nextKey != null; ) {
- let item = this.collection.getItem(nextKey);
- if (item?.type === "item" && !this.isDisabled(item)) return nextKey;
- nextKey = getNext(nextKey);
- }
- return null;
- }
- getNextKey(key) {
- let nextKey = key;
- return nextKey = this.collection.getKeyAfter(nextKey), this.findNextNonDisabled(nextKey, (key2) => this.collection.getKeyAfter(key2));
- }
- getPreviousKey(key) {
- let nextKey = key;
- return nextKey = this.collection.getKeyBefore(nextKey), this.findNextNonDisabled(nextKey, (key2) => this.collection.getKeyBefore(key2));
- }
- findKey(key, nextKey, shouldSkip) {
- let tempKey = key, itemRect = this.layoutDelegate.getItemRect(tempKey);
- if (!itemRect || tempKey == null) return null;
- let prevRect = itemRect;
- do {
- if (tempKey = nextKey(tempKey), tempKey == null) break;
- itemRect = this.layoutDelegate.getItemRect(tempKey);
- } while (itemRect && shouldSkip(prevRect, itemRect) && tempKey != null);
- return tempKey;
- }
- isSameRow(prevRect, itemRect) {
- return prevRect.y === itemRect.y || prevRect.x !== itemRect.x;
- }
- isSameColumn(prevRect, itemRect) {
- return prevRect.x === itemRect.x || prevRect.y !== itemRect.y;
- }
- getKeyBelow(key) {
- return this.layout === "grid" && this.orientation === "vertical" ? this.findKey(key, (key2) => this.getNextKey(key2), this.isSameRow) : this.getNextKey(key);
- }
- getKeyAbove(key) {
- return this.layout === "grid" && this.orientation === "vertical" ? this.findKey(key, (key2) => this.getPreviousKey(key2), this.isSameRow) : this.getPreviousKey(key);
- }
- getNextColumn(key, right2) {
- return right2 ? this.getPreviousKey(key) : this.getNextKey(key);
- }
- getKeyRightOf(key) {
- let layoutDelegateMethod = this.direction === "ltr" ? "getKeyRightOf" : "getKeyLeftOf";
- return this.layoutDelegate[layoutDelegateMethod] ? (key = this.layoutDelegate[layoutDelegateMethod](key), this.findNextNonDisabled(key, (key2) => this.layoutDelegate[layoutDelegateMethod](key2))) : this.layout === "grid" ? this.orientation === "vertical" ? this.getNextColumn(key, this.direction === "rtl") : this.findKey(key, (key2) => this.getNextColumn(key2, this.direction === "rtl"), this.isSameColumn) : this.orientation === "horizontal" ? this.getNextColumn(key, this.direction === "rtl") : null;
- }
- getKeyLeftOf(key) {
- let layoutDelegateMethod = this.direction === "ltr" ? "getKeyLeftOf" : "getKeyRightOf";
- return this.layoutDelegate[layoutDelegateMethod] ? (key = this.layoutDelegate[layoutDelegateMethod](key), this.findNextNonDisabled(key, (key2) => this.layoutDelegate[layoutDelegateMethod](key2))) : this.layout === "grid" ? this.orientation === "vertical" ? this.getNextColumn(key, this.direction === "ltr") : this.findKey(key, (key2) => this.getNextColumn(key2, this.direction === "ltr"), this.isSameColumn) : this.orientation === "horizontal" ? this.getNextColumn(key, this.direction === "ltr") : null;
- }
- getFirstKey() {
- let key = this.collection.getFirstKey();
- return this.findNextNonDisabled(key, (key2) => this.collection.getKeyAfter(key2));
- }
- getLastKey() {
- let key = this.collection.getLastKey();
- return this.findNextNonDisabled(key, (key2) => this.collection.getKeyBefore(key2));
- }
- getKeyPageAbove(key) {
- let menu = this.ref.current, itemRect = this.layoutDelegate.getItemRect(key);
- if (!itemRect) return null;
- if (menu && !$cc38e7bd3fc7b213$export$2bb74740c4e19def(menu)) return this.getFirstKey();
- let nextKey = key;
- if (this.orientation === "horizontal") {
- let pageX = Math.max(0, itemRect.x + itemRect.width - this.layoutDelegate.getVisibleRect().width);
- for (; itemRect && itemRect.x > pageX && nextKey != null; )
- nextKey = this.getKeyAbove(nextKey), itemRect = nextKey == null ? null : this.layoutDelegate.getItemRect(nextKey);
- } else {
- let pageY = Math.max(0, itemRect.y + itemRect.height - this.layoutDelegate.getVisibleRect().height);
- for (; itemRect && itemRect.y > pageY && nextKey != null; )
- nextKey = this.getKeyAbove(nextKey), itemRect = nextKey == null ? null : this.layoutDelegate.getItemRect(nextKey);
- }
- return nextKey ?? this.getFirstKey();
- }
- getKeyPageBelow(key) {
- let menu = this.ref.current, itemRect = this.layoutDelegate.getItemRect(key);
- if (!itemRect) return null;
- if (menu && !$cc38e7bd3fc7b213$export$2bb74740c4e19def(menu)) return this.getLastKey();
- let nextKey = key;
- if (this.orientation === "horizontal") {
- let pageX = Math.min(this.layoutDelegate.getContentSize().width, itemRect.y - itemRect.width + this.layoutDelegate.getVisibleRect().width);
- for (; itemRect && itemRect.x < pageX && nextKey != null; )
- nextKey = this.getKeyBelow(nextKey), itemRect = nextKey == null ? null : this.layoutDelegate.getItemRect(nextKey);
- } else {
- let pageY = Math.min(this.layoutDelegate.getContentSize().height, itemRect.y - itemRect.height + this.layoutDelegate.getVisibleRect().height);
- for (; itemRect && itemRect.y < pageY && nextKey != null; )
- nextKey = this.getKeyBelow(nextKey), itemRect = nextKey == null ? null : this.layoutDelegate.getItemRect(nextKey);
- }
- return nextKey ?? this.getLastKey();
- }
- getKeyForSearch(search, fromKey) {
- if (!this.collator) return null;
- let collection = this.collection, key = fromKey || this.getFirstKey();
- for (; key != null; ) {
- let item = collection.getItem(key);
- if (!item) return null;
- let substring = item.textValue.slice(0, search.length);
- if (item.textValue && this.collator.compare(substring, search) === 0) return key;
- key = this.getNextKey(key);
- }
- return null;
- }
- constructor(...args) {
- if (args.length === 1) {
- let opts = args[0];
- this.collection = opts.collection, this.ref = opts.ref, this.collator = opts.collator, this.disabledKeys = opts.disabledKeys || /* @__PURE__ */ new Set(), this.disabledBehavior = opts.disabledBehavior || "all", this.orientation = opts.orientation || "vertical", this.direction = opts.direction, this.layout = opts.layout || "stack", this.layoutDelegate = opts.layoutDelegate || new $657e4dc4a6e88df0$export$8f5ed9ff9f511381(opts.ref);
- } else
- this.collection = args[0], this.disabledKeys = args[1], this.ref = args[2], this.collator = args[3], this.layout = "stack", this.orientation = "vertical", this.disabledBehavior = "all", this.layoutDelegate = new $657e4dc4a6e88df0$export$8f5ed9ff9f511381(this.ref);
- this.layout === "stack" && this.orientation === "vertical" && (this.getKeyLeftOf = void 0, this.getKeyRightOf = void 0);
- }
- };
-
- // ../../node_modules/@react-aria/selection/dist/useSelectableList.mjs
- var import_react142 = __toESM(require_react(), 1);
- function $982254629710d113$export$b95089534ab7c1fd(props) {
- let { selectionManager, collection, disabledKeys, ref, keyboardDelegate, layoutDelegate } = props, collator = $325a3faab7a68acd$export$a16aca283550c30d({
- usage: "search",
- sensitivity: "base"
- }), disabledBehavior = selectionManager.disabledBehavior, delegate = (0, import_react142.useMemo)(() => keyboardDelegate || new $2a25aae57d74318e$export$a05409b8bb224a5a({
- collection,
- disabledKeys,
- disabledBehavior,
- ref,
- collator,
- layoutDelegate
- }), [
- keyboardDelegate,
- layoutDelegate,
- collection,
- disabledKeys,
- ref,
- collator,
- disabledBehavior
- ]), { collectionProps } = $ae20dd8cbca75726$export$d6daf82dcd84e87c({
- ...props,
- ref,
- selectionManager,
- keyboardDelegate: delegate
- });
- return {
- listProps: collectionProps
- };
- }
-
- // ../../node_modules/@react-aria/menu/dist/useMenu.mjs
- function $d5336fe17ce95402$export$38eaa17faae8f579(props, state3, ref) {
- let { shouldFocusWrap = !0, onKeyDown, onKeyUp, ...otherProps } = props;
- !props["aria-label"] && props["aria-labelledby"];
- let domProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, {
- labelable: !0
- }), { listProps } = $982254629710d113$export$b95089534ab7c1fd({
- ...otherProps,
- ref,
- selectionManager: state3.selectionManager,
- collection: state3.collection,
- disabledKeys: state3.disabledKeys,
- shouldFocusWrap,
- linkBehavior: "override"
- });
- return $fc79756100351201$export$6f49b4016bfc8d56.set(state3, {
- onClose: props.onClose,
- onAction: props.onAction,
- shouldUseVirtualFocus: props.shouldUseVirtualFocus
- }), {
- menuProps: $3ef42575df84b30b$export$9d1611c77c2fe928(domProps, {
- onKeyDown,
- onKeyUp
- }, {
- role: "menu",
- ...listProps,
- onKeyDown: (e) => {
- var _listProps_onKeyDown;
- (e.key !== "Escape" || props.shouldUseVirtualFocus) && ((_listProps_onKeyDown = listProps.onKeyDown) === null || _listProps_onKeyDown === void 0 || _listProps_onKeyDown.call(listProps, e));
- }
- })
- };
- }
-
- // ../../node_modules/@react-stately/collections/dist/Item.mjs
- var import_react143 = __toESM(require_react(), 1);
- function $c1d7fb2ec91bae71$var$Item(props) {
- return null;
- }
- $c1d7fb2ec91bae71$var$Item.getCollectionNode = function* (props, context) {
- let { childItems, title, children } = props, rendered = props.title || props.children, textValue = props.textValue || (typeof rendered == "string" ? rendered : "") || props["aria-label"] || "";
- !textValue && context?.suppressTextValueWarning, yield {
- type: "item",
- props,
- rendered,
- textValue,
- "aria-label": props["aria-label"],
- hasChildNodes: $c1d7fb2ec91bae71$var$hasChildItems(props),
- *childNodes() {
- if (childItems) for (let child of childItems) yield {
- type: "item",
- value: child
- };
- else if (title) {
- let items = [];
- import_react143.default.Children.forEach(children, (child) => {
- items.push({
- type: "item",
- element: child
- });
- }), yield* items;
- }
- }
- };
- };
- function $c1d7fb2ec91bae71$var$hasChildItems(props) {
- return props.hasChildItems != null ? props.hasChildItems : !!(props.childItems || props.title && import_react143.default.Children.count(props.children) > 0);
- }
- var $c1d7fb2ec91bae71$export$6d08773d2e66f8f2 = $c1d7fb2ec91bae71$var$Item;
-
- // ../../node_modules/@react-stately/collections/dist/Section.mjs
- var import_react144 = __toESM(require_react(), 1);
- function $9fc4852771d079eb$var$Section(props) {
- return null;
- }
- $9fc4852771d079eb$var$Section.getCollectionNode = function* (props) {
- let { children, title, items } = props;
- yield {
- type: "section",
- props,
- hasChildNodes: !0,
- rendered: title,
- "aria-label": props["aria-label"],
- *childNodes() {
- if (typeof children == "function") {
- if (!items) throw new Error("props.children was a function but props.items is missing");
- for (let item of items) yield {
- type: "item",
- value: item,
- renderer: children
- };
- } else {
- let items2 = [];
- import_react144.default.Children.forEach(children, (child) => {
- items2.push({
- type: "item",
- element: child
- });
- }), yield* items2;
- }
- }
- };
- };
-
- // ../../node_modules/@react-stately/collections/dist/CollectionBuilder.mjs
- var import_react145 = __toESM(require_react(), 1), $eb2240fc39a57fa5$export$bf788dd355e3a401 = class {
- build(props, context) {
- return this.context = context, $eb2240fc39a57fa5$var$iterable(() => this.iterateCollection(props));
- }
- *iterateCollection(props) {
- let { children, items } = props;
- if (import_react145.default.isValidElement(children) && children.type === import_react145.default.Fragment) yield* this.iterateCollection({
- children: children.props.children,
- items
- });
- else if (typeof children == "function") {
- if (!items) throw new Error("props.children was a function but props.items is missing");
- let index4 = 0;
- for (let item of items)
- yield* this.getFullNode({
- value: item,
- index: index4
- }, {
- renderer: children
- }), index4++;
- } else {
- let items2 = [];
- import_react145.default.Children.forEach(children, (child) => {
- child && items2.push(child);
- });
- let index4 = 0;
- for (let item of items2) {
- let nodes = this.getFullNode({
- element: item,
- index: index4
- }, {});
- for (let node2 of nodes)
- index4++, yield node2;
- }
- }
- }
- getKey(item, partialNode, state3, parentKey) {
- if (item.key != null) return item.key;
- if (partialNode.type === "cell" && partialNode.key != null) return `${parentKey}${partialNode.key}`;
- let v = partialNode.value;
- if (v != null) {
- var _v_key;
- let key = (_v_key = v.key) !== null && _v_key !== void 0 ? _v_key : v.id;
- if (key == null) throw new Error("No key found for item");
- return key;
- }
- return parentKey ? `${parentKey}.${partialNode.index}` : `$.${partialNode.index}`;
- }
- getChildState(state3, partialNode) {
- return {
- renderer: partialNode.renderer || state3.renderer
- };
- }
- *getFullNode(partialNode, state3, parentKey, parentNode) {
- if (import_react145.default.isValidElement(partialNode.element) && partialNode.element.type === import_react145.default.Fragment) {
- let children = [];
- import_react145.default.Children.forEach(partialNode.element.props.children, (child) => {
- children.push(child);
- });
- var _partialNode_index;
- let index4 = (_partialNode_index = partialNode.index) !== null && _partialNode_index !== void 0 ? _partialNode_index : 0;
- for (let child of children) yield* this.getFullNode({
- element: child,
- index: index4++
- }, state3, parentKey, parentNode);
- return;
- }
- let element = partialNode.element;
- if (!element && partialNode.value && state3 && state3.renderer) {
- let cached = this.cache.get(partialNode.value);
- if (cached && (!cached.shouldInvalidate || !cached.shouldInvalidate(this.context))) {
- cached.index = partialNode.index, cached.parentKey = parentNode ? parentNode.key : null, yield cached;
- return;
- }
- element = state3.renderer(partialNode.value);
- }
- if (import_react145.default.isValidElement(element)) {
- let type5 = element.type;
- if (typeof type5 != "function" && typeof type5.getCollectionNode != "function") {
- let name = element.type;
- throw new Error(`Unknown element <${name}> in collection.`);
- }
- let childNodes = type5.getCollectionNode(element.props, this.context);
- var _partialNode_index1;
- let index4 = (_partialNode_index1 = partialNode.index) !== null && _partialNode_index1 !== void 0 ? _partialNode_index1 : 0, result = childNodes.next();
- for (; !result.done && result.value; ) {
- let childNode = result.value;
- partialNode.index = index4;
- var _childNode_key;
- let nodeKey = (_childNode_key = childNode.key) !== null && _childNode_key !== void 0 ? _childNode_key : null;
- nodeKey == null && (nodeKey = childNode.element ? null : this.getKey(element, partialNode, state3, parentKey));
- let children = [
- ...this.getFullNode({
- ...childNode,
- key: nodeKey,
- index: index4,
- wrapper: $eb2240fc39a57fa5$var$compose(partialNode.wrapper, childNode.wrapper)
- }, this.getChildState(state3, childNode), parentKey ? `${parentKey}${element.key}` : element.key, parentNode)
- ];
- for (let node3 of children) {
- var _childNode_value, _ref;
- node3.value = (_ref = (_childNode_value = childNode.value) !== null && _childNode_value !== void 0 ? _childNode_value : partialNode.value) !== null && _ref !== void 0 ? _ref : null, node3.value && this.cache.set(node3.value, node3);
- var _parentNode_type;
- if (partialNode.type && node3.type !== partialNode.type) throw new Error(`Unsupported type <${$eb2240fc39a57fa5$var$capitalize(node3.type)}> in <${$eb2240fc39a57fa5$var$capitalize((_parentNode_type = parentNode?.type) !== null && _parentNode_type !== void 0 ? _parentNode_type : "unknown parent type")}>. Only <${$eb2240fc39a57fa5$var$capitalize(partialNode.type)}> is supported.`);
- index4++, yield node3;
- }
- result = childNodes.next(children);
- }
- return;
- }
- if (partialNode.key == null || partialNode.type == null) return;
- let builder = this;
- var _partialNode_value, _partialNode_textValue;
- let node2 = {
- type: partialNode.type,
- props: partialNode.props,
- key: partialNode.key,
- parentKey: parentNode ? parentNode.key : null,
- value: (_partialNode_value = partialNode.value) !== null && _partialNode_value !== void 0 ? _partialNode_value : null,
- level: parentNode ? parentNode.level + 1 : 0,
- index: partialNode.index,
- rendered: partialNode.rendered,
- textValue: (_partialNode_textValue = partialNode.textValue) !== null && _partialNode_textValue !== void 0 ? _partialNode_textValue : "",
- "aria-label": partialNode["aria-label"],
- wrapper: partialNode.wrapper,
- shouldInvalidate: partialNode.shouldInvalidate,
- hasChildNodes: partialNode.hasChildNodes || !1,
- childNodes: $eb2240fc39a57fa5$var$iterable(function* () {
- if (!partialNode.hasChildNodes || !partialNode.childNodes) return;
- let index4 = 0;
- for (let child of partialNode.childNodes()) {
- child.key != null && (child.key = `${node2.key}${child.key}`);
- let nodes = builder.getFullNode({
- ...child,
- index: index4
- }, builder.getChildState(state3, child), node2.key, node2);
- for (let node3 of nodes)
- index4++, yield node3;
- }
- })
- };
- yield node2;
- }
- constructor() {
- this.cache = /* @__PURE__ */ new WeakMap();
- }
- };
- function $eb2240fc39a57fa5$var$iterable(iterator) {
- let cache = [], iterable = null;
- return {
- *[Symbol.iterator]() {
- for (let item of cache) yield item;
- iterable || (iterable = iterator());
- for (let item of iterable)
- cache.push(item), yield item;
- }
- };
- }
- function $eb2240fc39a57fa5$var$compose(outer, inner) {
- if (outer && inner) return (element) => outer(inner(element));
- if (outer) return outer;
- if (inner) return inner;
- }
- function $eb2240fc39a57fa5$var$capitalize(str2) {
- return str2[0].toUpperCase() + str2.slice(1);
- }
-
- // ../../node_modules/@react-stately/collections/dist/useCollection.mjs
- var import_react146 = __toESM(require_react(), 1);
- function $7613b1592d41b092$export$6cd28814d92fa9c9(props, factory, context) {
- let builder = (0, import_react146.useMemo)(() => new $eb2240fc39a57fa5$export$bf788dd355e3a401(), []), { children, items, collection } = props;
- return (0, import_react146.useMemo)(() => {
- if (collection) return collection;
- let nodes = builder.build({
- children,
- items
- }, context);
- return factory(nodes);
- }, [
- builder,
- children,
- items,
- collection,
- context,
- factory
- ]);
- }
-
- // ../../node_modules/@react-stately/collections/dist/getChildNodes.mjs
- function $c5a24bc478652b5f$export$1005530eda016c13(node2, collection) {
- return typeof collection.getChildren == "function" ? collection.getChildren(node2.key) : node2.childNodes;
- }
- function $c5a24bc478652b5f$export$fbdeaa6a76694f71(iterable) {
- return $c5a24bc478652b5f$export$5f3398f8733f90e2(iterable, 0);
- }
- function $c5a24bc478652b5f$export$5f3398f8733f90e2(iterable, index4) {
- if (index4 < 0) return;
- let i = 0;
- for (let item of iterable) {
- if (i === index4) return item;
- i++;
- }
- }
- function $c5a24bc478652b5f$export$8c434b3a7a4dad6(collection, a3, b) {
- if (a3.parentKey === b.parentKey) return a3.index - b.index;
- let aAncestors = [
- ...$c5a24bc478652b5f$var$getAncestors(collection, a3),
- a3
- ], bAncestors = [
- ...$c5a24bc478652b5f$var$getAncestors(collection, b),
- b
- ], firstNonMatchingAncestor = aAncestors.slice(0, bAncestors.length).findIndex((a4, i) => a4 !== bAncestors[i]);
- return firstNonMatchingAncestor !== -1 ? (a3 = aAncestors[firstNonMatchingAncestor], b = bAncestors[firstNonMatchingAncestor], a3.index - b.index) : aAncestors.findIndex((node2) => node2 === b) >= 0 ? 1 : (bAncestors.findIndex((node2) => node2 === a3) >= 0, -1);
- }
- function $c5a24bc478652b5f$var$getAncestors(collection, node2) {
- let parents = [], currNode = node2;
- for (; currNode?.parentKey != null; )
- currNode = collection.getItem(currNode.parentKey), currNode && parents.unshift(currNode);
- return parents;
- }
-
- // ../../node_modules/@react-stately/collections/dist/getItemCount.mjs
- var $453cc9f0df89c0a5$var$cache = /* @__PURE__ */ new WeakMap();
- function $453cc9f0df89c0a5$export$77d5aafae4e095b2(collection) {
- let count = $453cc9f0df89c0a5$var$cache.get(collection);
- if (count != null) return count;
- let counter = 0, countItems = (items) => {
- for (let item of items)
- item.type === "section" ? countItems($c5a24bc478652b5f$export$1005530eda016c13(item, collection)) : item.type === "item" && counter++;
- };
- return countItems(collection), $453cc9f0df89c0a5$var$cache.set(collection, counter), counter;
- }
-
- // ../../node_modules/@react-aria/menu/dist/useMenuItem.mjs
- var import_react147 = __toESM(require_react(), 1);
- function $a2e5df62f93c7633$export$9d32628fc2aea7da(props, state3, ref) {
- let { id, key, closeOnSelect, isVirtualized, "aria-haspopup": hasPopup, onPressStart, onPressUp: pressUpProp, onPress, onPressChange: pressChangeProp, onPressEnd, onClick: onClickProp, onHoverStart: hoverStartProp, onHoverChange, onHoverEnd, onKeyDown, onKeyUp, onFocus, onFocusChange, onBlur, selectionManager = state3.selectionManager } = props, isTrigger = !!hasPopup, isTriggerExpanded = isTrigger && props["aria-expanded"] === "true";
- var _props_isDisabled;
- let isDisabled3 = (_props_isDisabled = props.isDisabled) !== null && _props_isDisabled !== void 0 ? _props_isDisabled : selectionManager.isDisabled(key);
- var _props_isSelected;
- let isSelected = (_props_isSelected = props.isSelected) !== null && _props_isSelected !== void 0 ? _props_isSelected : selectionManager.isSelected(key), data = $fc79756100351201$export$6f49b4016bfc8d56.get(state3), item = state3.collection.getItem(key), onClose = props.onClose || data.onClose, router = $ea8dcbcb9ea1b556$export$9a302a45f65d0572(), performAction = () => {
- var _item_props;
- if (!isTrigger && (!(item == null || (_item_props = item.props) === null || _item_props === void 0) && _item_props.onAction ? item.props.onAction() : props.onAction && props.onAction(key), data.onAction)) {
- let onAction = data.onAction;
- onAction(key);
- }
- }, role = "menuitem";
- isTrigger || (selectionManager.selectionMode === "single" ? role = "menuitemradio" : selectionManager.selectionMode === "multiple" && (role = "menuitemcheckbox"));
- let labelId = $bdb11010cef70236$export$b4cc09c592e8fdb8(), descriptionId = $bdb11010cef70236$export$b4cc09c592e8fdb8(), keyboardId = $bdb11010cef70236$export$b4cc09c592e8fdb8(), ariaProps = {
- id,
- "aria-disabled": isDisabled3 || void 0,
- role,
- "aria-label": props["aria-label"],
- "aria-labelledby": labelId,
- "aria-describedby": [
- descriptionId,
- keyboardId
- ].filter(Boolean).join(" ") || void 0,
- "aria-controls": props["aria-controls"],
- "aria-haspopup": hasPopup,
- "aria-expanded": props["aria-expanded"]
- };
- selectionManager.selectionMode !== "none" && !isTrigger && (ariaProps["aria-checked"] = isSelected), isVirtualized && (ariaProps["aria-posinset"] = item?.index, ariaProps["aria-setsize"] = $453cc9f0df89c0a5$export$77d5aafae4e095b2(state3.collection));
- let isPressedRef = (0, import_react147.useRef)(!1), onPressChange = (isPressed2) => {
- pressChangeProp?.(isPressed2), isPressedRef.current = isPressed2;
- }, interaction = (0, import_react147.useRef)(null), onPressUp = (e) => {
- e.pointerType !== "keyboard" && (interaction.current = {
- pointerType: e.pointerType
- }), e.pointerType === "mouse" && (isPressedRef.current || e.target.click()), pressUpProp?.(e);
- }, onClick = (e) => {
- var _interaction_current, _interaction_current1;
- onClickProp?.(e), performAction(), $ea8dcbcb9ea1b556$export$13aea1a3cb5e3f1f(e, router, item.props.href, item?.props.routerOptions);
- let shouldClose = ((_interaction_current = interaction.current) === null || _interaction_current === void 0 ? void 0 : _interaction_current.pointerType) === "keyboard" ? ((_interaction_current1 = interaction.current) === null || _interaction_current1 === void 0 ? void 0 : _interaction_current1.key) === "Enter" || selectionManager.selectionMode === "none" || selectionManager.isLink(key) : selectionManager.selectionMode !== "multiple" || selectionManager.isLink(key);
- shouldClose = closeOnSelect ?? shouldClose, onClose && !isTrigger && shouldClose && onClose(), interaction.current = null;
- }, { itemProps, isFocused } = $880e95eb8b93ba9a$export$ecf600387e221c37({
- id,
- selectionManager,
- key,
- ref,
- shouldSelectOnPressUp: !0,
- allowsDifferentPressOrigin: !0,
- // Disable all handling of links in useSelectable item
- // because we handle it ourselves. The behavior of menus
- // is slightly different from other collections because
- // actions are performed on key down rather than key up.
- linkBehavior: "none",
- shouldUseVirtualFocus: data.shouldUseVirtualFocus
- }), { pressProps, isPressed } = $f6c31cce2adf654f$export$45712eceda6fad21({
- onPressStart,
- onPress,
- onPressUp,
- onPressChange,
- onPressEnd,
- isDisabled: isDisabled3
- }), { hoverProps } = $6179b936705e76d3$export$ae780daf29e6d456({
- isDisabled: isDisabled3,
- onHoverStart(e) {
- !$507fabe10e71c6fb$export$b9b3dfddab17db27() && !(isTriggerExpanded && hasPopup) && (selectionManager.setFocused(!0), selectionManager.setFocusedKey(key)), hoverStartProp?.(e);
- },
- onHoverChange,
- onHoverEnd
- }), { keyboardProps } = $46d819fcbaf35654$export$8f71654801c2f7cd({
- onKeyDown: (e) => {
- if (e.repeat) {
- e.continuePropagation();
- return;
- }
- switch (e.key) {
- case " ":
- interaction.current = {
- pointerType: "keyboard",
- key: " "
- }, e.target.click();
- break;
- case "Enter":
- interaction.current = {
- pointerType: "keyboard",
- key: "Enter"
- }, e.target.tagName !== "A" && e.target.click();
- break;
- default:
- isTrigger || e.continuePropagation(), onKeyDown?.(e);
- break;
- }
- },
- onKeyUp
- }), { focusProps } = $a1ea59d68270f0dd$export$f8168d8dd8fd66e6({
- onBlur,
- onFocus,
- onFocusChange
- }), domProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(item?.props);
- delete domProps.id;
- let linkProps = $ea8dcbcb9ea1b556$export$7e924b3091a3bd18(item?.props);
- return {
- menuItemProps: {
- ...ariaProps,
- ...$3ef42575df84b30b$export$9d1611c77c2fe928(
- domProps,
- linkProps,
- isTrigger ? {
- onFocus: itemProps.onFocus,
- "data-collection": itemProps["data-collection"],
- "data-key": itemProps["data-key"]
- } : itemProps,
- pressProps,
- hoverProps,
- keyboardProps,
- focusProps,
- // Prevent DOM focus from moving on mouse down when using virtual focus or this is a submenu/subdialog trigger.
- data.shouldUseVirtualFocus || isTrigger ? {
- onMouseDown: (e) => e.preventDefault()
- } : void 0,
- isDisabled3 ? void 0 : {
- onClick
- }
- ),
- // If a submenu is expanded, set the tabIndex to -1 so that shift tabbing goes out of the menu instead of the parent menu item.
- tabIndex: itemProps.tabIndex != null && isTriggerExpanded && !data.shouldUseVirtualFocus ? -1 : itemProps.tabIndex
- },
- labelProps: {
- id: labelId
- },
- descriptionProps: {
- id: descriptionId
- },
- keyboardShortcutProps: {
- id: keyboardId
- },
- isFocused,
- isFocusVisible: isFocused && selectionManager.isFocused && $507fabe10e71c6fb$export$b9b3dfddab17db27() && !isTriggerExpanded,
- isSelected,
- isPressed,
- isDisabled: isDisabled3
- };
- }
-
- // ../../node_modules/@react-aria/menu/dist/useMenuSection.mjs
- function $3e5eb2498db5b506$export$73f7a44322579622(props) {
- let { heading, "aria-label": ariaLabel } = props, headingId = $bdb11010cef70236$export$f680877a34711e37();
- return {
- itemProps: {
- role: "presentation"
- },
- headingProps: heading ? {
- // Techincally, menus cannot contain headings according to ARIA.
- // We hide the heading from assistive technology, using role="presentation",
- // and only use it as a label for the nested group.
- id: headingId,
- role: "presentation"
- } : {},
- groupProps: {
- role: "group",
- "aria-label": ariaLabel,
- "aria-labelledby": heading ? headingId : void 0
- }
- };
- }
-
- // ../../node_modules/@react-aria/menu/dist/useSafelyMouseToSubmenu.mjs
- var import_react148 = __toESM(require_react(), 1);
- var $d275435c250248f8$var$ALLOWED_INVALID_MOVEMENTS = 2, $d275435c250248f8$var$THROTTLE_TIME = 50, $d275435c250248f8$var$TIMEOUT_TIME = 1e3, $d275435c250248f8$var$ANGLE_PADDING = Math.PI / 12;
- function $d275435c250248f8$export$85ec83e04c95f50a(options) {
- let { menuRef, submenuRef, isOpen, isDisabled: isDisabled3 } = options, prevPointerPos = (0, import_react148.useRef)(void 0), submenuRect = (0, import_react148.useRef)(void 0), lastProcessedTime = (0, import_react148.useRef)(0), timeout = (0, import_react148.useRef)(void 0), autoCloseTimeout = (0, import_react148.useRef)(void 0), submenuSide = (0, import_react148.useRef)(void 0), movementsTowardsSubmenuCount = (0, import_react148.useRef)(2), [preventPointerEvents, setPreventPointerEvents] = (0, import_react148.useState)(!1);
- $9daab02d461809db$export$683480f191c0e3ea({
- ref: submenuRef,
- onResize: () => {
- submenuRef.current && (submenuRect.current = submenuRef.current.getBoundingClientRect(), submenuSide.current = void 0);
- }
- });
- let reset2 = () => {
- setPreventPointerEvents(!1), movementsTowardsSubmenuCount.current = $d275435c250248f8$var$ALLOWED_INVALID_MOVEMENTS, prevPointerPos.current = void 0;
- }, modality = $507fabe10e71c6fb$export$98e20ec92f614cfe(), onPointerDown = $8ae05eaa5c114e9c$export$7f54fc3180508a52((e) => {
- preventPointerEvents && e.preventDefault();
- });
- (0, import_react148.useEffect)(() => {
- preventPointerEvents && menuRef.current ? menuRef.current.style.pointerEvents = "none" : menuRef.current.style.pointerEvents = "";
- }, [
- menuRef,
- preventPointerEvents
- ]), (0, import_react148.useEffect)(() => {
- let submenu = submenuRef.current, menu = menuRef.current;
- if (isDisabled3 || !submenu || !isOpen || modality !== "pointer" || !menu) {
- reset2();
- return;
- }
- submenuRect.current = submenu.getBoundingClientRect();
- let onPointerMove = (e) => {
- if (e.pointerType === "touch" || e.pointerType === "pen") return;
- let currentTime = Date.now();
- if (currentTime - lastProcessedTime.current < $d275435c250248f8$var$THROTTLE_TIME) return;
- clearTimeout(timeout.current), clearTimeout(autoCloseTimeout.current);
- let { clientX: mouseX, clientY: mouseY } = e;
- if (!prevPointerPos.current) {
- prevPointerPos.current = {
- x: mouseX,
- y: mouseY
- };
- return;
- }
- if (!submenuRect.current) return;
- if (submenuSide.current || (submenuSide.current = mouseX > submenuRect.current.right ? "left" : "right"), mouseX < menu.getBoundingClientRect().left || mouseX > menu.getBoundingClientRect().right || mouseY < menu.getBoundingClientRect().top || mouseY > menu.getBoundingClientRect().bottom) {
- reset2();
- return;
- }
- let prevMouseX = prevPointerPos.current.x, prevMouseY = prevPointerPos.current.y, toSubmenuX = submenuSide.current === "right" ? submenuRect.current.left - prevMouseX : prevMouseX - submenuRect.current.right, angleTop = Math.atan2(prevMouseY - submenuRect.current.top, toSubmenuX) + $d275435c250248f8$var$ANGLE_PADDING, angleBottom = Math.atan2(prevMouseY - submenuRect.current.bottom, toSubmenuX) - $d275435c250248f8$var$ANGLE_PADDING, anglePointer = Math.atan2(prevMouseY - mouseY, submenuSide.current === "left" ? -(mouseX - prevMouseX) : mouseX - prevMouseX), isMovingTowardsSubmenu = anglePointer < angleTop && anglePointer > angleBottom;
- movementsTowardsSubmenuCount.current = isMovingTowardsSubmenu ? Math.min(movementsTowardsSubmenuCount.current + 1, $d275435c250248f8$var$ALLOWED_INVALID_MOVEMENTS) : Math.max(movementsTowardsSubmenuCount.current - 1, 0), movementsTowardsSubmenuCount.current >= $d275435c250248f8$var$ALLOWED_INVALID_MOVEMENTS ? setPreventPointerEvents(!0) : setPreventPointerEvents(!1), lastProcessedTime.current = currentTime, prevPointerPos.current = {
- x: mouseX,
- y: mouseY
- }, isMovingTowardsSubmenu && (timeout.current = setTimeout(() => {
- reset2(), autoCloseTimeout.current = setTimeout(() => {
- let target = document.elementFromPoint(mouseX, mouseY);
- target && menu.contains(target) && target.dispatchEvent(new PointerEvent("pointerover", {
- bubbles: !0,
- cancelable: !0
- }));
- }, 100);
- }, $d275435c250248f8$var$TIMEOUT_TIME));
- };
- return window.addEventListener("pointermove", onPointerMove), window.addEventListener("pointerdown", onPointerDown, !0), () => {
- window.removeEventListener("pointermove", onPointerMove), window.removeEventListener("pointerdown", onPointerDown, !0), clearTimeout(timeout.current), clearTimeout(autoCloseTimeout.current), movementsTowardsSubmenuCount.current = $d275435c250248f8$var$ALLOWED_INVALID_MOVEMENTS;
- };
- }, [
- isDisabled3,
- isOpen,
- menuRef,
- modality,
- setPreventPointerEvents,
- onPointerDown,
- submenuRef
- ]);
- }
-
- // ../../node_modules/@react-aria/menu/dist/useSubmenuTrigger.mjs
- var import_react149 = __toESM(require_react(), 1);
- function $0065b146e7192841$export$7138b0d059a6e743(props, state3, ref) {
- let { parentMenuRef, submenuRef, type: type5 = "menu", isDisabled: isDisabled3, delay = 200, shouldUseVirtualFocus } = props, submenuTriggerId = $bdb11010cef70236$export$f680877a34711e37(), overlayId = $bdb11010cef70236$export$f680877a34711e37(), { direction } = $18f2051aff69b9bf$export$43bb16f9c6d9e3f7(), openTimeout = (0, import_react149.useRef)(void 0), cancelOpenTimeout = (0, import_react149.useCallback)(() => {
- openTimeout.current && (clearTimeout(openTimeout.current), openTimeout.current = void 0);
- }, [
- openTimeout
- ]), onSubmenuOpen = $8ae05eaa5c114e9c$export$7f54fc3180508a52((focusStrategy) => {
- cancelOpenTimeout(), state3.open(focusStrategy);
- }), onSubmenuClose = $8ae05eaa5c114e9c$export$7f54fc3180508a52(() => {
- cancelOpenTimeout(), state3.close();
- });
- $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => () => {
- cancelOpenTimeout();
- }, [
- cancelOpenTimeout
- ]);
- let submenuKeyDown = (e) => {
- if (e.currentTarget.contains(document.activeElement))
- switch (e.key) {
- case "ArrowLeft":
- direction === "ltr" && e.currentTarget.contains(e.target) && (e.preventDefault(), e.stopPropagation(), onSubmenuClose(), !shouldUseVirtualFocus && ref.current && $7215afc6de606d6b$export$de79e2c695e052f3(ref.current));
- break;
- case "ArrowRight":
- direction === "rtl" && e.currentTarget.contains(e.target) && (e.preventDefault(), e.stopPropagation(), onSubmenuClose(), !shouldUseVirtualFocus && ref.current && $7215afc6de606d6b$export$de79e2c695e052f3(ref.current));
- break;
- case "Escape":
- var _submenuRef_current;
- !((_submenuRef_current = submenuRef.current) === null || _submenuRef_current === void 0) && _submenuRef_current.contains(e.target) && (e.stopPropagation(), onSubmenuClose(), !shouldUseVirtualFocus && ref.current && $7215afc6de606d6b$export$de79e2c695e052f3(ref.current));
- break;
- }
- };
- var _state_focusStrategy;
- let submenuProps = {
- id: overlayId,
- "aria-labelledby": submenuTriggerId,
- submenuLevel: state3.submenuLevel,
- ...type5 === "menu" && {
- onClose: state3.closeAll,
- autoFocus: (_state_focusStrategy = state3.focusStrategy) !== null && _state_focusStrategy !== void 0 ? _state_focusStrategy : void 0,
- onKeyDown: submenuKeyDown
- }
- }, submenuTriggerKeyDown = (e) => {
- switch (e.key) {
- case "ArrowRight":
- isDisabled3 || (direction === "ltr" ? (e.preventDefault(), state3.isOpen || onSubmenuOpen("first"), type5 === "menu" && submenuRef?.current && document.activeElement === ref?.current && $7215afc6de606d6b$export$de79e2c695e052f3(submenuRef.current)) : state3.isOpen ? onSubmenuClose() : e.continuePropagation());
- break;
- case "ArrowLeft":
- isDisabled3 || (direction === "rtl" ? (e.preventDefault(), state3.isOpen || onSubmenuOpen("first"), type5 === "menu" && submenuRef?.current && document.activeElement === ref?.current && $7215afc6de606d6b$export$de79e2c695e052f3(submenuRef.current)) : state3.isOpen ? onSubmenuClose() : e.continuePropagation());
- break;
- default:
- e.continuePropagation();
- break;
- }
- }, onPressStart = (e) => {
- !isDisabled3 && (e.pointerType === "virtual" || e.pointerType === "keyboard") && onSubmenuOpen("first");
- }, onPress = (e) => {
- !isDisabled3 && (e.pointerType === "touch" || e.pointerType === "mouse") && onSubmenuOpen();
- }, onHoverChange = (isHovered) => {
- isDisabled3 || (isHovered && !state3.isOpen ? openTimeout.current || (openTimeout.current = setTimeout(() => {
- onSubmenuOpen();
- }, delay)) : isHovered || cancelOpenTimeout());
- };
- $e9faafb641e167db$export$90fc3a17d93f704c(parentMenuRef, "focusin", (e) => {
- var _parentMenuRef_current;
- state3.isOpen && (!((_parentMenuRef_current = parentMenuRef.current) === null || _parentMenuRef_current === void 0) && _parentMenuRef_current.contains(e.target)) && e.target !== ref.current && onSubmenuClose();
- });
- let shouldCloseOnInteractOutside = (target) => target !== ref.current;
- return $d275435c250248f8$export$85ec83e04c95f50a({
- menuRef: parentMenuRef,
- submenuRef,
- isOpen: state3.isOpen,
- isDisabled: isDisabled3
- }), {
- submenuTriggerProps: {
- id: submenuTriggerId,
- "aria-controls": state3.isOpen ? overlayId : void 0,
- "aria-haspopup": isDisabled3 ? void 0 : type5,
- "aria-expanded": state3.isOpen ? "true" : "false",
- onPressStart,
- onPress,
- onHoverChange,
- onKeyDown: submenuTriggerKeyDown,
- isOpen: state3.isOpen
- },
- submenuProps,
- popoverProps: {
- isNonModal: !0,
- shouldCloseOnInteractOutside
- }
- };
- }
-
- // ../../node_modules/@react-stately/menu/dist/useMenuTriggerState.mjs
- var import_react150 = __toESM(require_react(), 1);
- function $a28c903ee9ad8dc5$export$79fefeb1c2091ac3(props) {
- let overlayTriggerState = $fc909762b330b746$export$61c6a8c84e605fb6(props), [focusStrategy, setFocusStrategy] = (0, import_react150.useState)(null), [expandedKeysStack, setExpandedKeysStack] = (0, import_react150.useState)([]), closeAll = () => {
- setExpandedKeysStack([]), overlayTriggerState.close();
- };
- return {
- focusStrategy,
- ...overlayTriggerState,
- open(focusStrategy2 = null) {
- setFocusStrategy(focusStrategy2), overlayTriggerState.open();
- },
- toggle(focusStrategy2 = null) {
- setFocusStrategy(focusStrategy2), overlayTriggerState.toggle();
- },
- close() {
- closeAll();
- },
- expandedKeysStack,
- openSubmenu: (triggerKey, level) => {
- setExpandedKeysStack((oldStack) => level > oldStack.length ? oldStack : [
- ...oldStack.slice(0, level),
- triggerKey
- ]);
- },
- closeSubmenu: (triggerKey, level) => {
- setExpandedKeysStack((oldStack) => oldStack[level] === triggerKey ? oldStack.slice(0, level) : oldStack);
- }
- };
- }
-
- // ../../node_modules/@react-stately/menu/dist/useSubmenuTriggerState.mjs
- var import_react151 = __toESM(require_react(), 1);
- function $e5614764aa47eb35$export$cfc51cf86138bf98(props, state3) {
- let { triggerKey } = props, { expandedKeysStack, openSubmenu, closeSubmenu, close: closeAll } = state3, [submenuLevel] = (0, import_react151.useState)(expandedKeysStack?.length), isOpen = (0, import_react151.useMemo)(() => expandedKeysStack[submenuLevel] === triggerKey, [
- expandedKeysStack,
- triggerKey,
- submenuLevel
- ]), [focusStrategy, setFocusStrategy] = (0, import_react151.useState)(null), open = (0, import_react151.useCallback)((focusStrategy2) => {
- setFocusStrategy(focusStrategy2 ?? null), openSubmenu(triggerKey, submenuLevel);
- }, [
- openSubmenu,
- submenuLevel,
- triggerKey
- ]), close = (0, import_react151.useCallback)(() => {
- setFocusStrategy(null), closeSubmenu(triggerKey, submenuLevel);
- }, [
- closeSubmenu,
- submenuLevel,
- triggerKey
- ]), toggle = (0, import_react151.useCallback)((focusStrategy2) => {
- setFocusStrategy(focusStrategy2 ?? null), isOpen ? close() : open(focusStrategy2);
- }, [
- close,
- open,
- isOpen
- ]);
- return (0, import_react151.useMemo)(() => ({
- focusStrategy,
- isOpen,
- open,
- close,
- closeAll,
- submenuLevel,
- // TODO: Placeholders that aren't used but give us parity with OverlayTriggerState so we can use this in Popover. Refactor if we update Popover via
- // https://github.com/adobe/react-spectrum/pull/4976#discussion_r1336472863
- setOpen: () => {
- },
- toggle
- }), [
- isOpen,
- open,
- close,
- closeAll,
- focusStrategy,
- toggle,
- submenuLevel
- ]);
- }
-
- // ../../node_modules/@react-stately/tree/dist/TreeCollection.mjs
- var $05ca4cd7c4a5a999$export$863faf230ee2118a = class {
- *[Symbol.iterator]() {
- yield* this.iterable;
- }
- get size() {
- return this.keyMap.size;
- }
- getKeys() {
- return this.keyMap.keys();
- }
- getKeyBefore(key) {
- let node2 = this.keyMap.get(key);
- var _node_prevKey;
- return node2 && (_node_prevKey = node2.prevKey) !== null && _node_prevKey !== void 0 ? _node_prevKey : null;
- }
- getKeyAfter(key) {
- let node2 = this.keyMap.get(key);
- var _node_nextKey;
- return node2 && (_node_nextKey = node2.nextKey) !== null && _node_nextKey !== void 0 ? _node_nextKey : null;
- }
- getFirstKey() {
- return this.firstKey;
- }
- getLastKey() {
- return this.lastKey;
- }
- getItem(key) {
- var _this_keyMap_get;
- return (_this_keyMap_get = this.keyMap.get(key)) !== null && _this_keyMap_get !== void 0 ? _this_keyMap_get : null;
- }
- at(idx) {
- let keys3 = [
- ...this.getKeys()
- ];
- return this.getItem(keys3[idx]);
- }
- constructor(nodes, { expandedKeys } = {}) {
- this.keyMap = /* @__PURE__ */ new Map(), this.firstKey = null, this.lastKey = null, this.iterable = nodes, expandedKeys = expandedKeys || /* @__PURE__ */ new Set();
- let visit = (node2) => {
- if (this.keyMap.set(node2.key, node2), node2.childNodes && (node2.type === "section" || expandedKeys.has(node2.key))) for (let child of node2.childNodes) visit(child);
- };
- for (let node2 of nodes) visit(node2);
- let last2 = null, index4 = 0;
- for (let [key, node2] of this.keyMap)
- last2 ? (last2.nextKey = key, node2.prevKey = last2.key) : (this.firstKey = key, node2.prevKey = void 0), node2.type === "item" && (node2.index = index4++), last2 = node2, last2.nextKey = void 0;
- var _last_key;
- this.lastKey = (_last_key = last2?.key) !== null && _last_key !== void 0 ? _last_key : null;
- }
- };
-
- // ../../node_modules/@react-stately/selection/dist/Selection.mjs
- var $e40ea825a81a3709$export$52baac22726c72bf = class _$e40ea825a81a3709$export$52baac22726c72bf extends Set {
- constructor(keys3, anchorKey, currentKey) {
- super(keys3), keys3 instanceof _$e40ea825a81a3709$export$52baac22726c72bf ? (this.anchorKey = anchorKey ?? keys3.anchorKey, this.currentKey = currentKey ?? keys3.currentKey) : (this.anchorKey = anchorKey ?? null, this.currentKey = currentKey ?? null);
- }
- };
-
- // ../../node_modules/@react-stately/selection/dist/useMultipleSelectionState.mjs
- var import_react152 = __toESM(require_react(), 1);
- function $7af3f5b51489e0b5$var$equalSets(setA, setB) {
- if (setA.size !== setB.size) return !1;
- for (let item of setA)
- if (!setB.has(item)) return !1;
- return !0;
- }
- function $7af3f5b51489e0b5$export$253fe78d46329472(props) {
- let { selectionMode = "none", disallowEmptySelection = !1, allowDuplicateSelectionEvents, selectionBehavior: selectionBehaviorProp = "toggle", disabledBehavior = "all" } = props, isFocusedRef = (0, import_react152.useRef)(!1), [, setFocused] = (0, import_react152.useState)(!1), focusedKeyRef = (0, import_react152.useRef)(null), childFocusStrategyRef = (0, import_react152.useRef)(null), [, setFocusedKey] = (0, import_react152.useState)(null), selectedKeysProp = (0, import_react152.useMemo)(() => $7af3f5b51489e0b5$var$convertSelection(props.selectedKeys), [
- props.selectedKeys
- ]), defaultSelectedKeys = (0, import_react152.useMemo)(() => $7af3f5b51489e0b5$var$convertSelection(props.defaultSelectedKeys, new $e40ea825a81a3709$export$52baac22726c72bf()), [
- props.defaultSelectedKeys
- ]), [selectedKeys, setSelectedKeys] = $458b0a5536c1a7cf$export$40bfa8c7b0832715(selectedKeysProp, defaultSelectedKeys, props.onSelectionChange), disabledKeysProp = (0, import_react152.useMemo)(() => props.disabledKeys ? new Set(props.disabledKeys) : /* @__PURE__ */ new Set(), [
- props.disabledKeys
- ]), [selectionBehavior, setSelectionBehavior] = (0, import_react152.useState)(selectionBehaviorProp);
- selectionBehaviorProp === "replace" && selectionBehavior === "toggle" && typeof selectedKeys == "object" && selectedKeys.size === 0 && setSelectionBehavior("replace");
- let lastSelectionBehavior = (0, import_react152.useRef)(selectionBehaviorProp);
- return (0, import_react152.useEffect)(() => {
- selectionBehaviorProp !== lastSelectionBehavior.current && (setSelectionBehavior(selectionBehaviorProp), lastSelectionBehavior.current = selectionBehaviorProp);
- }, [
- selectionBehaviorProp
- ]), {
- selectionMode,
- disallowEmptySelection,
- selectionBehavior,
- setSelectionBehavior,
- get isFocused() {
- return isFocusedRef.current;
- },
- setFocused(f4) {
- isFocusedRef.current = f4, setFocused(f4);
- },
- get focusedKey() {
- return focusedKeyRef.current;
- },
- get childFocusStrategy() {
- return childFocusStrategyRef.current;
- },
- setFocusedKey(k, childFocusStrategy = "first") {
- focusedKeyRef.current = k, childFocusStrategyRef.current = childFocusStrategy, setFocusedKey(k);
- },
- selectedKeys,
- setSelectedKeys(keys3) {
- (allowDuplicateSelectionEvents || !$7af3f5b51489e0b5$var$equalSets(keys3, selectedKeys)) && setSelectedKeys(keys3);
- },
- disabledKeys: disabledKeysProp,
- disabledBehavior
- };
- }
- function $7af3f5b51489e0b5$var$convertSelection(selection, defaultValue) {
- return selection ? selection === "all" ? "all" : new $e40ea825a81a3709$export$52baac22726c72bf(selection) : defaultValue;
- }
-
- // ../../node_modules/@react-stately/selection/dist/SelectionManager.mjs
- var $d496c0a20b6e58ec$export$6c8a5aaad13c9852 = class _$d496c0a20b6e58ec$export$6c8a5aaad13c9852 {
- /**
- * The type of selection that is allowed in the collection.
- */
- get selectionMode() {
- return this.state.selectionMode;
- }
- /**
- * Whether the collection allows empty selection.
- */
- get disallowEmptySelection() {
- return this.state.disallowEmptySelection;
- }
- /**
- * The selection behavior for the collection.
- */
- get selectionBehavior() {
- return this.state.selectionBehavior;
- }
- /**
- * Sets the selection behavior for the collection.
- */
- setSelectionBehavior(selectionBehavior) {
- this.state.setSelectionBehavior(selectionBehavior);
- }
- /**
- * Whether the collection is currently focused.
- */
- get isFocused() {
- return this.state.isFocused;
- }
- /**
- * Sets whether the collection is focused.
- */
- setFocused(isFocused) {
- this.state.setFocused(isFocused);
- }
- /**
- * The current focused key in the collection.
- */
- get focusedKey() {
- return this.state.focusedKey;
- }
- /** Whether the first or last child of the focused key should receive focus. */
- get childFocusStrategy() {
- return this.state.childFocusStrategy;
- }
- /**
- * Sets the focused key.
- */
- setFocusedKey(key, childFocusStrategy) {
- (key == null || this.collection.getItem(key)) && this.state.setFocusedKey(key, childFocusStrategy);
- }
- /**
- * The currently selected keys in the collection.
- */
- get selectedKeys() {
- return this.state.selectedKeys === "all" ? new Set(this.getSelectAllKeys()) : this.state.selectedKeys;
- }
- /**
- * The raw selection value for the collection.
- * Either 'all' for select all, or a set of keys.
- */
- get rawSelection() {
- return this.state.selectedKeys;
- }
- /**
- * Returns whether a key is selected.
- */
- isSelected(key) {
- if (this.state.selectionMode === "none") return !1;
- let mappedKey = this.getKey(key);
- return mappedKey == null ? !1 : this.state.selectedKeys === "all" ? this.canSelectItem(mappedKey) : this.state.selectedKeys.has(mappedKey);
- }
- /**
- * Whether the selection is empty.
- */
- get isEmpty() {
- return this.state.selectedKeys !== "all" && this.state.selectedKeys.size === 0;
- }
- /**
- * Whether all items in the collection are selected.
- */
- get isSelectAll() {
- if (this.isEmpty) return !1;
- if (this.state.selectedKeys === "all") return !0;
- if (this._isSelectAll != null) return this._isSelectAll;
- let allKeys = this.getSelectAllKeys(), selectedKeys = this.state.selectedKeys;
- return this._isSelectAll = allKeys.every((k) => selectedKeys.has(k)), this._isSelectAll;
- }
- get firstSelectedKey() {
- let first = null;
- for (let key of this.state.selectedKeys) {
- let item = this.collection.getItem(key);
- (!first || item && $c5a24bc478652b5f$export$8c434b3a7a4dad6(this.collection, item, first) < 0) && (first = item);
- }
- var _first_key;
- return (_first_key = first?.key) !== null && _first_key !== void 0 ? _first_key : null;
- }
- get lastSelectedKey() {
- let last2 = null;
- for (let key of this.state.selectedKeys) {
- let item = this.collection.getItem(key);
- (!last2 || item && $c5a24bc478652b5f$export$8c434b3a7a4dad6(this.collection, item, last2) > 0) && (last2 = item);
- }
- var _last_key;
- return (_last_key = last2?.key) !== null && _last_key !== void 0 ? _last_key : null;
- }
- get disabledKeys() {
- return this.state.disabledKeys;
- }
- get disabledBehavior() {
- return this.state.disabledBehavior;
- }
- /**
- * Extends the selection to the given key.
- */
- extendSelection(toKey2) {
- if (this.selectionMode === "none") return;
- if (this.selectionMode === "single") {
- this.replaceSelection(toKey2);
- return;
- }
- let mappedToKey = this.getKey(toKey2);
- if (mappedToKey == null) return;
- let selection;
- if (this.state.selectedKeys === "all") selection = new $e40ea825a81a3709$export$52baac22726c72bf([
- mappedToKey
- ], mappedToKey, mappedToKey);
- else {
- let selectedKeys = this.state.selectedKeys;
- var _selectedKeys_anchorKey;
- let anchorKey = (_selectedKeys_anchorKey = selectedKeys.anchorKey) !== null && _selectedKeys_anchorKey !== void 0 ? _selectedKeys_anchorKey : mappedToKey;
- selection = new $e40ea825a81a3709$export$52baac22726c72bf(selectedKeys, anchorKey, mappedToKey);
- var _selectedKeys_currentKey;
- for (let key of this.getKeyRange(anchorKey, (_selectedKeys_currentKey = selectedKeys.currentKey) !== null && _selectedKeys_currentKey !== void 0 ? _selectedKeys_currentKey : mappedToKey)) selection.delete(key);
- for (let key of this.getKeyRange(mappedToKey, anchorKey)) this.canSelectItem(key) && selection.add(key);
- }
- this.state.setSelectedKeys(selection);
- }
- getKeyRange(from2, to) {
- let fromItem = this.collection.getItem(from2), toItem = this.collection.getItem(to);
- return fromItem && toItem ? $c5a24bc478652b5f$export$8c434b3a7a4dad6(this.collection, fromItem, toItem) <= 0 ? this.getKeyRangeInternal(from2, to) : this.getKeyRangeInternal(to, from2) : [];
- }
- getKeyRangeInternal(from2, to) {
- var _this_layoutDelegate;
- if (!((_this_layoutDelegate = this.layoutDelegate) === null || _this_layoutDelegate === void 0) && _this_layoutDelegate.getKeyRange) return this.layoutDelegate.getKeyRange(from2, to);
- let keys3 = [], key = from2;
- for (; key != null; ) {
- let item = this.collection.getItem(key);
- if (item && (item.type === "item" || item.type === "cell" && this.allowsCellSelection) && keys3.push(key), key === to) return keys3;
- key = this.collection.getKeyAfter(key);
- }
- return [];
- }
- getKey(key) {
- let item = this.collection.getItem(key);
- if (!item || item.type === "cell" && this.allowsCellSelection) return key;
- for (; item && item.type !== "item" && item.parentKey != null; ) item = this.collection.getItem(item.parentKey);
- return !item || item.type !== "item" ? null : item.key;
- }
- /**
- * Toggles whether the given key is selected.
- */
- toggleSelection(key) {
- if (this.selectionMode === "none") return;
- if (this.selectionMode === "single" && !this.isSelected(key)) {
- this.replaceSelection(key);
- return;
- }
- let mappedKey = this.getKey(key);
- if (mappedKey == null) return;
- let keys3 = new $e40ea825a81a3709$export$52baac22726c72bf(this.state.selectedKeys === "all" ? this.getSelectAllKeys() : this.state.selectedKeys);
- keys3.has(mappedKey) ? keys3.delete(mappedKey) : this.canSelectItem(mappedKey) && (keys3.add(mappedKey), keys3.anchorKey = mappedKey, keys3.currentKey = mappedKey), !(this.disallowEmptySelection && keys3.size === 0) && this.state.setSelectedKeys(keys3);
- }
- /**
- * Replaces the selection with only the given key.
- */
- replaceSelection(key) {
- if (this.selectionMode === "none") return;
- let mappedKey = this.getKey(key);
- if (mappedKey == null) return;
- let selection = this.canSelectItem(mappedKey) ? new $e40ea825a81a3709$export$52baac22726c72bf([
- mappedKey
- ], mappedKey, mappedKey) : new $e40ea825a81a3709$export$52baac22726c72bf();
- this.state.setSelectedKeys(selection);
- }
- /**
- * Replaces the selection with the given keys.
- */
- setSelectedKeys(keys3) {
- if (this.selectionMode === "none") return;
- let selection = new $e40ea825a81a3709$export$52baac22726c72bf();
- for (let key of keys3) {
- let mappedKey = this.getKey(key);
- if (mappedKey != null && (selection.add(mappedKey), this.selectionMode === "single"))
- break;
- }
- this.state.setSelectedKeys(selection);
- }
- getSelectAllKeys() {
- let keys3 = [], addKeys = (key) => {
- for (; key != null; ) {
- if (this.canSelectItem(key)) {
- var _getFirstItem;
- let item = this.collection.getItem(key);
- item?.type === "item" && keys3.push(key);
- var _getFirstItem_key;
- item?.hasChildNodes && (this.allowsCellSelection || item.type !== "item") && addKeys((_getFirstItem_key = (_getFirstItem = $c5a24bc478652b5f$export$fbdeaa6a76694f71($c5a24bc478652b5f$export$1005530eda016c13(item, this.collection))) === null || _getFirstItem === void 0 ? void 0 : _getFirstItem.key) !== null && _getFirstItem_key !== void 0 ? _getFirstItem_key : null);
- }
- key = this.collection.getKeyAfter(key);
- }
- };
- return addKeys(this.collection.getFirstKey()), keys3;
- }
- /**
- * Selects all items in the collection.
- */
- selectAll() {
- !this.isSelectAll && this.selectionMode === "multiple" && this.state.setSelectedKeys("all");
- }
- /**
- * Removes all keys from the selection.
- */
- clearSelection() {
- !this.disallowEmptySelection && (this.state.selectedKeys === "all" || this.state.selectedKeys.size > 0) && this.state.setSelectedKeys(new $e40ea825a81a3709$export$52baac22726c72bf());
- }
- /**
- * Toggles between select all and an empty selection.
- */
- toggleSelectAll() {
- this.isSelectAll ? this.clearSelection() : this.selectAll();
- }
- select(key, e) {
- this.selectionMode !== "none" && (this.selectionMode === "single" ? this.isSelected(key) && !this.disallowEmptySelection ? this.toggleSelection(key) : this.replaceSelection(key) : this.selectionBehavior === "toggle" || e && (e.pointerType === "touch" || e.pointerType === "virtual") ? this.toggleSelection(key) : this.replaceSelection(key));
- }
- /**
- * Returns whether the current selection is equal to the given selection.
- */
- isSelectionEqual(selection) {
- if (selection === this.state.selectedKeys) return !0;
- let selectedKeys = this.selectedKeys;
- if (selection.size !== selectedKeys.size) return !1;
- for (let key of selection)
- if (!selectedKeys.has(key)) return !1;
- for (let key of selectedKeys)
- if (!selection.has(key)) return !1;
- return !0;
- }
- canSelectItem(key) {
- var _item_props;
- if (this.state.selectionMode === "none" || this.state.disabledKeys.has(key)) return !1;
- let item = this.collection.getItem(key);
- return !(!item || !(item == null || (_item_props = item.props) === null || _item_props === void 0) && _item_props.isDisabled || item.type === "cell" && !this.allowsCellSelection);
- }
- isDisabled(key) {
- var _this_collection_getItem_props, _this_collection_getItem;
- return this.state.disabledBehavior === "all" && (this.state.disabledKeys.has(key) || !!(!((_this_collection_getItem = this.collection.getItem(key)) === null || _this_collection_getItem === void 0 || (_this_collection_getItem_props = _this_collection_getItem.props) === null || _this_collection_getItem_props === void 0) && _this_collection_getItem_props.isDisabled));
- }
- isLink(key) {
- var _this_collection_getItem_props, _this_collection_getItem;
- return !!(!((_this_collection_getItem = this.collection.getItem(key)) === null || _this_collection_getItem === void 0 || (_this_collection_getItem_props = _this_collection_getItem.props) === null || _this_collection_getItem_props === void 0) && _this_collection_getItem_props.href);
- }
- getItemProps(key) {
- var _this_collection_getItem;
- return (_this_collection_getItem = this.collection.getItem(key)) === null || _this_collection_getItem === void 0 ? void 0 : _this_collection_getItem.props;
- }
- withCollection(collection) {
- return new _$d496c0a20b6e58ec$export$6c8a5aaad13c9852(collection, this.state, {
- allowsCellSelection: this.allowsCellSelection,
- layoutDelegate: this.layoutDelegate || void 0
- });
- }
- constructor(collection, state3, options) {
- this.collection = collection, this.state = state3;
- var _options_allowsCellSelection;
- this.allowsCellSelection = (_options_allowsCellSelection = options?.allowsCellSelection) !== null && _options_allowsCellSelection !== void 0 ? _options_allowsCellSelection : !1, this._isSelectAll = null, this.layoutDelegate = options?.layoutDelegate || null;
- }
- };
-
- // ../../node_modules/@react-stately/tree/dist/useTreeState.mjs
- var import_react153 = __toESM(require_react(), 1);
- function $875d6693e12af071$export$728d6ba534403756(props) {
- let { onExpandedChange } = props, [expandedKeys, setExpandedKeys] = $458b0a5536c1a7cf$export$40bfa8c7b0832715(props.expandedKeys ? new Set(props.expandedKeys) : void 0, props.defaultExpandedKeys ? new Set(props.defaultExpandedKeys) : /* @__PURE__ */ new Set(), onExpandedChange), selectionState = $7af3f5b51489e0b5$export$253fe78d46329472(props), disabledKeys = (0, import_react153.useMemo)(() => props.disabledKeys ? new Set(props.disabledKeys) : /* @__PURE__ */ new Set(), [
- props.disabledKeys
- ]), tree = $7613b1592d41b092$export$6cd28814d92fa9c9(props, (0, import_react153.useCallback)((nodes) => new $05ca4cd7c4a5a999$export$863faf230ee2118a(nodes, {
- expandedKeys
- }), [
- expandedKeys
- ]), null);
- return (0, import_react153.useEffect)(() => {
- selectionState.focusedKey != null && !tree.getItem(selectionState.focusedKey) && selectionState.setFocusedKey(null);
- }, [
- tree,
- selectionState.focusedKey
- ]), {
- collection: tree,
- expandedKeys,
- disabledKeys,
- toggleKey: (key) => {
- setExpandedKeys($875d6693e12af071$var$toggleKey(expandedKeys, key));
- },
- setExpandedKeys,
- selectionManager: new $d496c0a20b6e58ec$export$6c8a5aaad13c9852(tree, selectionState)
- };
- }
- function $875d6693e12af071$var$toggleKey(set3, key) {
- let res = new Set(set3);
- return res.has(key) ? res.delete(key) : res.add(key), res;
- }
-
- // ../../node_modules/react-aria-components/dist/Menu.mjs
- var import_react154 = __toESM(require_react(), 1), $3674c52c6b3c5bce$export$c7e742effb1c51e2 = (0, import_react154.createContext)(null), $3674c52c6b3c5bce$export$24aad8519b95b41b = (0, import_react154.createContext)(null), $3674c52c6b3c5bce$export$795aec4671cbae19 = (0, import_react154.createContext)(null), $3674c52c6b3c5bce$var$SelectionManagerContext = (0, import_react154.createContext)(null);
- var $3674c52c6b3c5bce$var$SubmenuTriggerContext = (0, import_react154.createContext)(null), $3674c52c6b3c5bce$var$SubmenuTriggerNode = class extends $23b9f4fcf0fe224b$export$d68d59712b04d9d1 {
- filter(collection, newCollection, filterFn) {
- let triggerNode = collection.getItem(this.firstChildKey);
- if (triggerNode && filterFn(triggerNode.textValue, this)) {
- let clone3 = this.clone();
- return newCollection.addDescendants(clone3, collection), clone3;
- }
- return null;
- }
- };
- $3674c52c6b3c5bce$var$SubmenuTriggerNode.type = "submenutrigger";
- var $3674c52c6b3c5bce$export$ecabc99eeffab7ca = $e1995378a142960e$export$e953bb1cd0f19726($3674c52c6b3c5bce$var$SubmenuTriggerNode, (props, ref, item) => {
- let { CollectionBranch } = (0, import_react154.useContext)($7135fc7d473fd974$export$4feb769f8ddf26c5), state3 = (0, import_react154.useContext)($3674c52c6b3c5bce$export$24aad8519b95b41b), rootMenuTriggerState = (0, import_react154.useContext)($3674c52c6b3c5bce$export$795aec4671cbae19), submenuTriggerState = $e5614764aa47eb35$export$cfc51cf86138bf98({
- triggerKey: item.key
- }, rootMenuTriggerState), submenuRef = (0, import_react154.useRef)(null), itemRef = $df56164dff5785e2$export$4338b53315abf666(ref), { parentMenuRef, shouldUseVirtualFocus } = (0, import_react154.useContext)($3674c52c6b3c5bce$var$SubmenuTriggerContext), { submenuTriggerProps, submenuProps, popoverProps } = $0065b146e7192841$export$7138b0d059a6e743({
- parentMenuRef,
- submenuRef,
- delay: props.delay,
- shouldUseVirtualFocus
- }, submenuTriggerState, itemRef);
- return import_react154.default.createElement($64fa3d84918910a7$export$2881499e37b75b9a, {
- values: [
- [
- $3674c52c6b3c5bce$var$MenuItemContext,
- {
- ...submenuTriggerProps,
- onAction: void 0,
- ref: itemRef
- }
- ],
- [
- $3674c52c6b3c5bce$export$c7e742effb1c51e2,
- {
- ref: submenuRef,
- ...submenuProps
- }
- ],
- [
- $de32f1b87079253c$export$d2f961adcb0afbe,
- submenuTriggerState
- ],
- [
- $07b14b47974efb58$export$9b9a0cd73afb7ca4,
- {
- trigger: "SubmenuTrigger",
- triggerRef: itemRef,
- placement: "end top",
- "aria-labelledby": submenuProps["aria-labelledby"],
- ...popoverProps
- }
- ]
- ]
- }, import_react154.default.createElement(CollectionBranch, {
- collection: state3.collection,
- parent: item
- }), props.children[1]);
- }, (props) => props.children[0]), $3674c52c6b3c5bce$export$d9b273488cd8ce6f = (0, import_react154.forwardRef)(function(props, ref) {
- return [props, ref] = $64fa3d84918910a7$export$29f1550f4b0d4415(props, ref, $3674c52c6b3c5bce$export$c7e742effb1c51e2), import_react154.default.createElement($e1995378a142960e$export$bf788dd355e3a401, {
- content: import_react154.default.createElement($e1995378a142960e$export$fb8073518f34e6ec, props)
- }, (collection) => import_react154.default.createElement($3674c52c6b3c5bce$var$MenuInner, {
- props,
- collection,
- menuRef: ref
- }));
- });
- function $3674c52c6b3c5bce$var$MenuInner({ props, collection, menuRef: ref }) {
- [props, ref] = $64fa3d84918910a7$export$29f1550f4b0d4415(props, ref, $8e6cc465cc68f603$export$b0d3ecf7112093a7);
- let { filter, ...autocompleteMenuProps } = props, filteredCollection = (0, import_react154.useMemo)(() => filter ? collection.filter(filter) : collection, [
- collection,
- filter
- ]), state3 = $875d6693e12af071$export$728d6ba534403756({
- ...props,
- collection: filteredCollection,
- children: void 0
- }), triggerState = (0, import_react154.useContext)($3674c52c6b3c5bce$export$795aec4671cbae19), { isVirtualized, CollectionRoot } = (0, import_react154.useContext)($7135fc7d473fd974$export$4feb769f8ddf26c5), { menuProps } = $d5336fe17ce95402$export$38eaa17faae8f579({
- ...props,
- isVirtualized,
- onClose: props.onClose || triggerState?.close
- }, state3, ref), renderProps = $64fa3d84918910a7$export$4d86445c2cf5e3({
- defaultClassName: "react-aria-Menu",
- className: props.className,
- style: props.style,
- values: {
- isEmpty: state3.collection.size === 0
- }
- }), emptyState = null;
- state3.collection.size === 0 && props.renderEmptyState && (emptyState = import_react154.default.createElement("div", {
- role: "menuitem",
- style: {
- display: "contents"
- }
- }, props.renderEmptyState()));
- let DOMProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, {
- global: !0
- });
- return import_react154.default.createElement($9bf71ea28793e738$export$20e40289641fbbb6, null, import_react154.default.createElement("div", {
- ...$3ef42575df84b30b$export$9d1611c77c2fe928(DOMProps, renderProps, menuProps),
- ref,
- slot: props.slot || void 0,
- "data-empty": state3.collection.size === 0 || void 0,
- onScroll: props.onScroll
- }, import_react154.default.createElement($64fa3d84918910a7$export$2881499e37b75b9a, {
- values: [
- [
- $3674c52c6b3c5bce$export$24aad8519b95b41b,
- state3
- ],
- [
- $431f98aba6844401$export$6615d83f6de245ce,
- {
- elementType: "div"
- }
- ],
- [
- $7135fc7d473fd974$export$d40e14dec8b060a8,
- {
- name: "MenuSection",
- render: $3674c52c6b3c5bce$var$MenuSectionInner
- }
- ],
- [
- $3674c52c6b3c5bce$var$SubmenuTriggerContext,
- {
- parentMenuRef: ref,
- shouldUseVirtualFocus: autocompleteMenuProps?.shouldUseVirtualFocus
- }
- ],
- [
- $3674c52c6b3c5bce$var$MenuItemContext,
- null
- ],
- [
- $8e6cc465cc68f603$export$b0d3ecf7112093a7,
- null
- ],
- [
- $8e6cc465cc68f603$export$698f465ec27e93df,
- null
- ],
- [
- $3674c52c6b3c5bce$var$SelectionManagerContext,
- state3.selectionManager
- ],
- /* Ensure root MenuTriggerState is defined, in case Menu is rendered outside a MenuTrigger. */
- /* We assume the context can never change between defined and undefined. */
- /* eslint-disable-next-line react-hooks/rules-of-hooks */
- [
- $3674c52c6b3c5bce$export$795aec4671cbae19,
- triggerState ?? $a28c903ee9ad8dc5$export$79fefeb1c2091ac3({})
- ]
- ]
- }, import_react154.default.createElement(CollectionRoot, {
- collection: state3.collection,
- persistedKeys: $7135fc7d473fd974$export$90e00781bc59d8f9(state3.selectionManager.focusedKey),
- scrollRef: ref
- })), emptyState));
- }
- var $3674c52c6b3c5bce$var$GroupSelectionManager = class extends $d496c0a20b6e58ec$export$6c8a5aaad13c9852 {
- get focusedKey() {
- return this.parent.focusedKey;
- }
- get isFocused() {
- return this.parent.isFocused;
- }
- setFocusedKey(key, childFocusStrategy) {
- return this.parent.setFocusedKey(key, childFocusStrategy);
- }
- setFocused(isFocused) {
- this.parent.setFocused(isFocused);
- }
- get childFocusStrategy() {
- return this.parent.childFocusStrategy;
- }
- constructor(parent, state3) {
- super(parent.collection, state3), this.parent = parent;
- }
- };
- function $3674c52c6b3c5bce$var$MenuSectionInner(props, ref, section, className = "react-aria-MenuSection") {
- var _section_props, _section_props1;
- let state3 = (0, import_react154.useContext)($3674c52c6b3c5bce$export$24aad8519b95b41b), { CollectionBranch } = (0, import_react154.useContext)($7135fc7d473fd974$export$4feb769f8ddf26c5), [headingRef, heading] = $64fa3d84918910a7$export$9d4c57ee4c6ffdd8();
- var _section_props_arialabel;
- let { headingProps, groupProps } = $3e5eb2498db5b506$export$73f7a44322579622({
- heading,
- "aria-label": (_section_props_arialabel = section.props["aria-label"]) !== null && _section_props_arialabel !== void 0 ? _section_props_arialabel : void 0
- }), renderProps = $64fa3d84918910a7$export$4d86445c2cf5e3({
- defaultClassName: className,
- className: (_section_props = section.props) === null || _section_props === void 0 ? void 0 : _section_props.className,
- style: (_section_props1 = section.props) === null || _section_props1 === void 0 ? void 0 : _section_props1.style,
- values: {}
- }), parent = (0, import_react154.useContext)($3674c52c6b3c5bce$var$SelectionManagerContext), selectionState = $7af3f5b51489e0b5$export$253fe78d46329472(props), manager = props.selectionMode != null ? new $3674c52c6b3c5bce$var$GroupSelectionManager(parent, selectionState) : parent, DOMProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, {
- global: !0
- });
- return delete DOMProps.id, import_react154.default.createElement("section", {
- ...$3ef42575df84b30b$export$9d1611c77c2fe928(DOMProps, renderProps, groupProps),
- ref
- }, import_react154.default.createElement($64fa3d84918910a7$export$2881499e37b75b9a, {
- values: [
- [
- $72a5793c14baf454$export$e0e4026c12a8bdbb,
- {
- ...headingProps,
- ref: headingRef
- }
- ],
- [
- $3674c52c6b3c5bce$var$SelectionManagerContext,
- manager
- ]
- ]
- }, import_react154.default.createElement(CollectionBranch, {
- collection: state3.collection,
- parent: section
- })));
- }
- var $3674c52c6b3c5bce$export$4b1545b4f2016d26 = $e1995378a142960e$export$e953bb1cd0f19726($23b9f4fcf0fe224b$export$437f11dc9b403b78, $3674c52c6b3c5bce$var$MenuSectionInner), $3674c52c6b3c5bce$var$MenuItemContext = (0, import_react154.createContext)(null), $3674c52c6b3c5bce$export$2ce376c2cc3355c8 = $e1995378a142960e$export$18af5c7a9e9b3664($23b9f4fcf0fe224b$export$fd11f34e1d07f134, function(props, forwardedRef, item) {
- var _useSlottedContext;
- [props, forwardedRef] = $64fa3d84918910a7$export$29f1550f4b0d4415(props, forwardedRef, $3674c52c6b3c5bce$var$MenuItemContext);
- let id = (_useSlottedContext = $64fa3d84918910a7$export$fabf2dc03a41866e($3674c52c6b3c5bce$var$MenuItemContext)) === null || _useSlottedContext === void 0 ? void 0 : _useSlottedContext.id, state3 = (0, import_react154.useContext)($3674c52c6b3c5bce$export$24aad8519b95b41b), ref = $df56164dff5785e2$export$4338b53315abf666(forwardedRef), selectionManager = (0, import_react154.useContext)($3674c52c6b3c5bce$var$SelectionManagerContext), { menuItemProps, labelProps, descriptionProps, keyboardShortcutProps, ...states } = $a2e5df62f93c7633$export$9d32628fc2aea7da({
- ...props,
- id,
- key: item.key,
- selectionManager
- }, state3, ref), { hoverProps, isHovered } = $6179b936705e76d3$export$ae780daf29e6d456({
- isDisabled: states.isDisabled
- }), renderProps = $64fa3d84918910a7$export$4d86445c2cf5e3({
- ...props,
- id: void 0,
- children: item.rendered,
- defaultClassName: "react-aria-MenuItem",
- values: {
- ...states,
- isHovered,
- isFocusVisible: states.isFocusVisible,
- selectionMode: selectionManager.selectionMode,
- selectionBehavior: selectionManager.selectionBehavior,
- hasSubmenu: !!props["aria-haspopup"],
- isOpen: props["aria-expanded"] === "true"
- }
- }), ElementType = props.href ? "a" : "div", DOMProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, {
- global: !0
- });
- return delete DOMProps.id, delete DOMProps.onClick, import_react154.default.createElement(ElementType, {
- ...$3ef42575df84b30b$export$9d1611c77c2fe928(DOMProps, renderProps, menuItemProps, hoverProps),
- ref,
- "data-disabled": states.isDisabled || void 0,
- "data-hovered": isHovered || void 0,
- "data-focused": states.isFocused || void 0,
- "data-focus-visible": states.isFocusVisible || void 0,
- "data-pressed": states.isPressed || void 0,
- "data-selected": states.isSelected || void 0,
- "data-selection-mode": selectionManager.selectionMode === "none" ? void 0 : selectionManager.selectionMode,
- "data-has-submenu": !!props["aria-haspopup"] || void 0,
- "data-open": props["aria-expanded"] === "true" || void 0
- }, import_react154.default.createElement($64fa3d84918910a7$export$2881499e37b75b9a, {
- values: [
- [
- $514c0188e459b4c0$export$9afb8bc826b033ea,
- {
- slots: {
- [$64fa3d84918910a7$export$c62b8e45d58ddad9]: labelProps,
- label: labelProps,
- description: descriptionProps
- }
- }
- ],
- [
- $63df2425e2108aa8$export$744d98a3b8a94e1c,
- keyboardShortcutProps
- ]
- ]
- }, renderProps.children));
- });
-
- // ../../node_modules/@react-aria/dialog/dist/useDialog.mjs
- var import_react155 = __toESM(require_react(), 1);
- function $40df3f8667284809$export$d55e7ee900f34e93(props, ref) {
- let { role = "dialog" } = props, titleId = $bdb11010cef70236$export$b4cc09c592e8fdb8();
- titleId = props["aria-label"] ? void 0 : titleId;
- let isRefocusing = (0, import_react155.useRef)(!1);
- return (0, import_react155.useEffect)(() => {
- if (ref.current && !ref.current.contains(document.activeElement)) {
- $3ad3f6e1647bc98d$export$80f3e147d781571c(ref.current);
- let timeout = setTimeout(() => {
- (document.activeElement === ref.current || document.activeElement === document.body) && (isRefocusing.current = !0, ref.current && (ref.current.blur(), $3ad3f6e1647bc98d$export$80f3e147d781571c(ref.current)), isRefocusing.current = !1);
- }, 500);
- return () => {
- clearTimeout(timeout);
- };
- }
- }, [
- ref
- ]), $337b884510726a0d$export$14c98a7594375490(), {
- dialogProps: {
- ...$65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, {
- labelable: !0
- }),
- role,
- tabIndex: -1,
- "aria-labelledby": props["aria-labelledby"] || titleId,
- // Prevent blur events from reaching useOverlay, which may cause
- // popovers to close. Since focus is contained within the dialog,
- // we don't want this to occur due to the above useEffect.
- onBlur: (e) => {
- isRefocusing.current && e.stopPropagation();
- }
- },
- titleProps: {
- id: titleId
- }
- };
- }
-
- // ../../node_modules/react-aria-components/dist/Dialog.mjs
- var import_react156 = __toESM(require_react(), 1), $de32f1b87079253c$export$8b93a07348a7730c = (0, import_react156.createContext)(null), $de32f1b87079253c$export$d2f961adcb0afbe = (0, import_react156.createContext)(null);
- function $de32f1b87079253c$export$2e1e1122cf0cba88(props) {
- let state3 = $a28c903ee9ad8dc5$export$79fefeb1c2091ac3(props), buttonRef = (0, import_react156.useRef)(null), { triggerProps, overlayProps } = $628037886ba31236$export$f9d5c8beee7d008d({
- type: "dialog"
- }, state3, buttonRef), [buttonWidth, setButtonWidth] = (0, import_react156.useState)(null), onResize = (0, import_react156.useCallback)(() => {
- buttonRef.current && setButtonWidth(buttonRef.current.offsetWidth + "px");
- }, [
- buttonRef
- ]);
- return $9daab02d461809db$export$683480f191c0e3ea({
- ref: buttonRef,
- onResize
- }), triggerProps.id = $bdb11010cef70236$export$f680877a34711e37(), overlayProps["aria-labelledby"] = triggerProps.id, import_react156.default.createElement($64fa3d84918910a7$export$2881499e37b75b9a, {
- values: [
- [
- $de32f1b87079253c$export$d2f961adcb0afbe,
- state3
- ],
- [
- $3674c52c6b3c5bce$export$795aec4671cbae19,
- state3
- ],
- [
- $de32f1b87079253c$export$8b93a07348a7730c,
- overlayProps
- ],
- [
- $07b14b47974efb58$export$9b9a0cd73afb7ca4,
- {
- trigger: "DialogTrigger",
- triggerRef: buttonRef,
- "aria-labelledby": overlayProps["aria-labelledby"],
- style: {
- "--trigger-width": buttonWidth
- }
- }
- ]
- ]
- }, import_react156.default.createElement($f1ab8c75478c6f73$export$3351871ee4b288b8, {
- ...triggerProps,
- ref: buttonRef,
- isPressed: state3.isOpen
- }, props.children));
- }
- var $de32f1b87079253c$export$3ddf2d174ce01153 = (0, import_react156.forwardRef)(function(props, ref) {
- let originalAriaLabelledby = props["aria-labelledby"];
- [props, ref] = $64fa3d84918910a7$export$29f1550f4b0d4415(props, ref, $de32f1b87079253c$export$8b93a07348a7730c);
- let { dialogProps, titleProps } = $40df3f8667284809$export$d55e7ee900f34e93({
- ...props,
- // Only pass aria-labelledby from props, not context.
- // Context is used as a fallback below.
- "aria-labelledby": originalAriaLabelledby
- }, ref), state3 = (0, import_react156.useContext)($de32f1b87079253c$export$d2f961adcb0afbe);
- !dialogProps["aria-label"] && !dialogProps["aria-labelledby"] && props["aria-labelledby"] && (dialogProps["aria-labelledby"] = props["aria-labelledby"]);
- let renderProps = $64fa3d84918910a7$export$4d86445c2cf5e3({
- defaultClassName: "react-aria-Dialog",
- className: props.className,
- style: props.style,
- children: props.children,
- values: {
- close: state3?.close || (() => {
- })
- }
- }), DOMProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, {
- global: !0
- });
- return import_react156.default.createElement("section", {
- ...$3ef42575df84b30b$export$9d1611c77c2fe928(DOMProps, renderProps, dialogProps),
- ref,
- slot: props.slot || void 0
- }, import_react156.default.createElement($64fa3d84918910a7$export$2881499e37b75b9a, {
- values: [
- [
- $4e85f108e88277b8$export$d688439359537581,
- {
- slots: {
- [$64fa3d84918910a7$export$c62b8e45d58ddad9]: {},
- title: {
- ...titleProps,
- level: 2
- }
- }
- }
- ],
- [
- $d2b4bc8c273e7be6$export$24d547caef80ccd1,
- {
- slots: {
- [$64fa3d84918910a7$export$c62b8e45d58ddad9]: {},
- close: {
- onPress: () => state3?.close()
- }
- }
- }
- ]
- ]
- }, renderProps.children));
- });
-
- // src/components/components/Popover/PopoverProvider.tsx
- var PopoverProvider = ({
- ariaLabel,
- placement: placementProp = "bottom-start",
- hasChrome = !0,
- hasCloseButton = !1,
- closeLabel,
- offset: offset3 = 8,
- padding,
- popover,
- children,
- defaultVisible,
- visible,
- onVisibleChange,
- ...props
- }) => {
- ariaLabel || deprecate(
- "The 'ariaLabel' prop on 'PopoverProvider' will become mandatory in Storybook 11. Provide a concise, accessible label describing the popover's purpose."
- );
- let placement = convertToReactAriaPlacement(placementProp), [isOpen, setIsOpen] = (0, import_react157.useState)(defaultVisible ?? !1), onOpenChange = (0, import_react157.useCallback)(
- (isOpen2) => {
- setIsOpen(isOpen2), onVisibleChange?.(isOpen2);
- },
- [onVisibleChange]
- ), onHide = (0, import_react157.useCallback)(() => onOpenChange(!1), [onOpenChange]);
- return import_react157.default.createElement(
- $de32f1b87079253c$export$2e1e1122cf0cba88,
- {
- defaultOpen: defaultVisible,
- isOpen: visible ?? isOpen,
- onOpenChange,
- ...props
- },
- import_react157.default.createElement(
- $3b117e43dc0ca95d$export$27c701ed9e449e99,
- null,
- /* React-aria does not inject aria-haspopup='dialog' to support legacy screen readers, so we do it ourselves. */
- (0, import_react157.cloneElement)(
- children,
- // @ts-expect-error aria-haspopup is a valid ARIA attribute but cloneElement types are too strict
- { "aria-haspopup": "dialog" }
- )
- ),
- import_react157.default.createElement(
- $07b14b47974efb58$export$5b6b19405a83ff9d,
- {
- "aria-label": ariaLabel,
- placement,
- offset: offset3,
- style: { outline: "none" }
- },
- import_react157.default.createElement(
- Popover,
- {
- hasChrome,
- hideLabel: closeLabel,
- onHide: hasCloseButton ? onHide : void 0,
- padding
- },
- typeof popover == "function" ? popover({ onHide }) : popover
- )
- )
- );
- };
-
- // src/components/components/tooltip/Tooltip.tsx
- var import_react158 = __toESM(require_react(), 1);
- var Tooltip2 = (0, import_react158.forwardRef)((props, ref) => import_react158.default.createElement(Popover, { ref, ...props }));
- Tooltip2.displayName = "Tooltip";
-
- // src/components/components/tooltip/lazy-WithTooltip.tsx
- var import_react160 = __toESM(require_react(), 1), LazyWithTooltip = (0, import_react160.lazy)(
- () => Promise.resolve().then(() => (init_WithTooltip(), WithTooltip_exports)).then((mod) => ({ default: mod.WithTooltip }))
- ), WithTooltip = (props) => import_react160.default.createElement(import_react160.Suspense, { fallback: import_react160.default.createElement("div", null) }, import_react160.default.createElement(LazyWithTooltip, { ...props })), LazyWithTooltipPure = (0, import_react160.lazy)(
- () => Promise.resolve().then(() => (init_WithTooltip(), WithTooltip_exports)).then((mod) => ({ default: mod.WithTooltipPure }))
- ), WithTooltipPure2 = (props) => import_react160.default.createElement(import_react160.Suspense, { fallback: import_react160.default.createElement("div", null) }, import_react160.default.createElement(LazyWithTooltipPure, { ...props }));
-
- // src/components/components/tooltip/TooltipMessage.tsx
- var import_react161 = __toESM(require_react(), 1);
- init_client_logger();
- init_theming();
- var Title3 = styled.div(({ theme: theme3 }) => ({
- fontWeight: theme3.typography.weight.bold
- })), Desc2 = styled.span(), Links = styled.div(({ theme: theme3 }) => ({
- marginTop: 8,
- textAlign: "center",
- "> *": {
- margin: "0 8px",
- fontWeight: theme3.typography.weight.bold
- }
- })), Message2 = styled.div(({ theme: theme3 }) => ({
- color: theme3.color.defaultText,
- lineHeight: "18px"
- })), MessageWrapper = styled.div({
- padding: 15,
- width: 280,
- boxSizing: "border-box"
- }), TooltipMessage = ({ title, desc, links }) => (deprecate(
- "`TooltipMessage` is deprecated and will be removed in Storybook 11, use `Popover` and `PopoverProvider` instead."
- ), import_react161.default.createElement(MessageWrapper, { "data-deprecated": "TooltipMessage" }, import_react161.default.createElement(Message2, null, title && import_react161.default.createElement(Title3, null, title), desc && import_react161.default.createElement(Desc2, null, desc)), links && import_react161.default.createElement(Links, null, links.map(({ title: linkTitle, ...other }) => import_react161.default.createElement(Link2, { ...other, key: linkTitle }, linkTitle)))));
-
- // src/components/components/tooltip/TooltipLinkList.tsx
- var import_react163 = __toESM(require_react(), 1);
- init_client_logger();
- init_theming();
-
- // src/components/components/tooltip/ListItem.tsx
- var import_react162 = __toESM(require_react(), 1);
- init_client_logger();
- var import_memoizerific12 = __toESM(require_memoizerific(), 1);
- init_theming();
- var Title4 = styled(({ active, loading, disabled, ...rest }) => import_react162.default.createElement("span", { ...rest }))(
- ({ theme: theme3 }) => ({
- color: theme3.color.defaultText,
- // Previously was theme.typography.weight.normal but this weight does not exists in Theme
- fontWeight: theme3.typography.weight.regular
- }),
- ({ active, theme: theme3 }) => active ? {
- color: theme3.color.secondary,
- fontWeight: theme3.typography.weight.bold
- } : {},
- ({ loading, theme: theme3 }) => loading ? {
- display: "inline-block",
- flex: "none",
- ...theme3.animation.inlineGlow
- } : {},
- ({ disabled, theme: theme3 }) => disabled ? {
- color: theme3.textMutedColor
- } : {}
- ), Right = styled.span({
- display: "flex",
- "& svg": {
- height: 12,
- width: 12,
- margin: "3px 0",
- verticalAlign: "top"
- }
- }), Center = styled.span(
- {
- flex: 1,
- textAlign: "left",
- display: "flex",
- flexDirection: "column",
- minWidth: 0
- // required for overflow
- },
- ({ isIndented }) => isIndented ? { marginLeft: 24 } : {}
- ), CenterText = styled.span(
- ({ theme: theme3 }) => ({
- fontSize: "11px",
- lineHeight: "14px"
- }),
- ({ active, theme: theme3 }) => active ? {
- color: theme3.color.secondary
- } : {},
- ({ theme: theme3, disabled }) => disabled ? {
- color: theme3.textMutedColor
- } : {}
- ), Left = styled.span(
- ({ active, theme: theme3 }) => active ? {
- color: theme3.color.secondary
- } : {},
- () => ({
- display: "flex",
- maxWidth: 14
- })
- ), Item = styled.button(
- ({ theme: theme3 }) => ({
- width: "100%",
- minWidth: 0,
- // required for overflow
- border: "none",
- borderRadius: theme3.appBorderRadius,
- background: "none",
- fontSize: theme3.typography.size.s1,
- transition: "background 150ms ease-out",
- color: theme3.color.dark,
- textDecoration: "none",
- justifyContent: "space-between",
- lineHeight: "18px",
- padding: "7px 10px",
- display: "flex",
- alignItems: "center",
- "& > * + *": {
- paddingLeft: 10
- },
- "&:focus-visible": {
- outline: `2px solid ${theme3.color.secondary}`,
- outlineOffset: 0
- }
- }),
- ({ theme: theme3, href, onClick }) => (href || onClick) && {
- cursor: "pointer",
- "&:hover": {
- background: theme3.background.hoverable
- },
- "&:hover svg": {
- opacity: 1
- }
- },
- ({ theme: theme3, as }) => as === "label" && {
- "&:has(input:not(:disabled))": {
- cursor: "pointer",
- "&:hover": {
- background: theme3.background.hoverable
- }
- }
- },
- ({ disabled }) => disabled && { cursor: "not-allowed" }
- ), getItemProps = (0, import_memoizerific12.default)(100)(({ onClick, input: input2, href, LinkWrapper }) => ({
- ...onClick && {
- as: "button",
- role: "button",
- onClick
- },
- ...input2 && {
- as: "label"
- },
- ...href && {
- as: "a",
- role: "link",
- href,
- ...LinkWrapper && {
- as: LinkWrapper,
- to: href
- }
- }
- })), ListItem = (0, import_react162.forwardRef)((props, ref) => {
- let {
- loading = !1,
- title = import_react162.default.createElement("span", null, "Loading state"),
- center = null,
- right: right2 = null,
- active = !1,
- disabled = !1,
- isIndented = !1,
- href = void 0,
- onClick = void 0,
- icon,
- input: input2,
- LinkWrapper = void 0,
- ...rest
- } = props, commonProps = { active, disabled }, itemProps = getItemProps(props), left2 = icon || input2;
- return deprecate(
- "`ListItem` is deprecated and will be removed in Storybook 11, use `MenuItem` instead."
- ), import_react162.default.createElement(Item, { "data-deprecated": "ListItem", ref, ...rest, ...commonProps, ...itemProps }, import_react162.default.createElement(import_react162.default.Fragment, null, left2 && import_react162.default.createElement(Left, { ...commonProps }, left2), title || center ? import_react162.default.createElement(Center, { isIndented: isIndented && !left2 }, title && import_react162.default.createElement(Title4, { ...commonProps, loading }, title), center && import_react162.default.createElement(CenterText, { ...commonProps }, center)) : null, right2 && import_react162.default.createElement(Right, { ...commonProps }, right2)));
- });
- ListItem.displayName = "ListItem";
- var ListItem_default = ListItem;
-
- // src/components/components/tooltip/TooltipLinkList.tsx
- var List = styled.div(
- {
- minWidth: 180,
- overflow: "hidden",
- overflowY: "auto",
- maxHeight: 15.5 * 32 + 8
- // 15.5 items at 32px each + 8px padding
- },
- ({ theme: theme3 }) => ({
- borderRadius: theme3.appBorderRadius + 2
- }),
- ({ theme: theme3 }) => theme3.base === "dark" ? { background: theme3.background.content } : {}
- ), Group = styled.div(({ theme: theme3 }) => ({
- padding: 4,
- "& + &": {
- borderTop: `1px solid ${theme3.appBorderColor}`
- }
- })), Item2 = ({ id, onClick, ...rest }) => {
- let { active, disabled, title, href } = rest, handleClick = (0, import_react163.useCallback)(
- (event) => onClick?.(event, { id, active, disabled, title, href }),
- [onClick, id, active, disabled, title, href]
- );
- return import_react163.default.createElement(ListItem_default, { id: `list-item-${id}`, ...rest, ...onClick && { onClick: handleClick } });
- }, TooltipLinkList = ({ links, LinkWrapper, ...props }) => {
- deprecate(
- "`TooltipLinkList` is deprecated and will be removed in Storybook 11, use `ActionList` or `MenuItem` and `WithMenu` instead."
- );
- let groups = Array.isArray(links[0]) ? links : [links], isIndented = groups.some(
- (group) => group.some((link) => "icon" in link && link.icon || "input" in link && link.input)
- );
- return import_react163.default.createElement(List, { "data-deprecated": "TooltipLinkList", ...props, className: "sb-list" }, groups.filter((group) => group.length).map((group, index4) => import_react163.default.createElement(Group, { key: group.map((link) => link.id).join(`~${index4}~`) }, group.map((link) => "content" in link ? import_react163.default.createElement(import_react163.Fragment, { key: link.id }, link.content) : import_react163.default.createElement(Item2, { key: link.id, isIndented, LinkWrapper, ...link })))));
- };
-
- // src/components/components/Tabs/Tabs.tsx
- var import_react169 = __toESM(require_react(), 1);
- init_client_logger();
- init_theming();
-
- // src/components/components/Bar/Bar.tsx
- var import_react164 = __toESM(require_react(), 1);
- init_client_logger();
- init_theming();
- var StyledBar = styled.div(
- ({ backgroundColor, border = !1, innerStyle = {}, scrollable, theme: theme3 }) => ({
- color: theme3.barTextColor,
- width: "100%",
- minHeight: 40,
- flexShrink: 0,
- // TODO in Storybook 11: Apply background regardless of border.
- scrollbarColor: `${theme3.barTextColor} ${border ? backgroundColor || theme3.barBg : "transparent"}`,
- scrollbarWidth: "thin",
- overflow: scrollable ? "auto" : "hidden",
- overflowY: "hidden",
- display: "flex",
- alignItems: "center",
- gap: scrollable ? 0 : 6,
- paddingInline: scrollable ? 0 : 6,
- // TODO in Storybook 11: Apply background regardless of border.
- ...border ? {
- boxShadow: `${theme3.appBorderColor} 0 -1px 0 0 inset`,
- background: backgroundColor || theme3.barBg
- } : {},
- ...innerStyle
- })
- ), HeightPreserver = styled.div(({ innerStyle }) => ({
- minHeight: 40,
- display: "flex",
- alignItems: "center",
- width: "100%",
- gap: 6,
- paddingInline: 6,
- ...innerStyle
- })), Bar = (0, import_react164.forwardRef)(
- ({ scrollable = !0, children, innerStyle, ...rest }, ref) => import_react164.default.createElement(
- StyledBar,
- {
- ...rest,
- ref,
- innerStyle: scrollable ? void 0 : innerStyle,
- scrollable
- },
- scrollable ? import_react164.default.createElement(HeightPreserver, { innerStyle }, children) : children
- )
- );
- Bar.displayName = "Bar";
- var Side = styled.div(
- {
- display: "flex",
- whiteSpace: "nowrap",
- flexBasis: "auto",
- marginLeft: 3,
- marginRight: 10
- },
- ({ scrollable }) => scrollable ? { flexShrink: 0 } : {},
- ({ left: left2 }) => left2 ? {
- "& > *": {
- marginLeft: 4
- }
- } : {},
- ({ right: right2 }) => right2 ? {
- gap: 6
- } : {}
- );
- Side.displayName = "Side";
- var BarInner = styled.div(({ bgColor }) => ({
- display: "flex",
- justifyContent: "space-between",
- position: "relative",
- flexWrap: "nowrap",
- flexShrink: 0,
- height: 40,
- width: "100%",
- backgroundColor: bgColor || ""
- })), BarWithoutPadding = styled(Bar)({
- paddingInline: 0
- }), FlexBar = ({ children, backgroundColor, className = "", ...rest }) => {
- deprecate('FlexBar is deprecated. Use Bar with justifyContent: "space-between" instead.');
- let [left2, right2] = import_react164.Children.toArray(children);
- return import_react164.default.createElement(
- BarWithoutPadding,
- {
- "data-deprecated": "FlexBar",
- backgroundColor,
- className: `sb-bar ${className}`,
- ...rest
- },
- import_react164.default.createElement(BarInner, { bgColor: backgroundColor }, import_react164.default.createElement(Side, { scrollable: rest.scrollable, left: !0 }, left2), right2 ? import_react164.default.createElement(Side, { right: !0 }, right2) : null)
- );
- };
- FlexBar.displayName = "FlexBar";
-
- // src/components/components/Tabs/Button.tsx
- var import_react165 = __toESM(require_react(), 1);
- init_client_logger();
- init_theming();
- var isLink = (obj) => typeof obj.props.href == "string", isButton = (obj) => typeof obj.props.href != "string";
- function ForwardRefFunction({ children, ...rest }, ref) {
- let o = { props: rest, ref };
- if (isLink(o))
- return import_react165.default.createElement("a", { ref: o.ref, ...o.props }, children);
- if (isButton(o))
- return import_react165.default.createElement("button", { ref: o.ref, type: "button", ...o.props }, children);
- throw new Error("invalid props");
- }
- var ButtonOrLink = (0, import_react165.forwardRef)(ForwardRefFunction);
- ButtonOrLink.displayName = "ButtonOrLink";
- var StyledTabButton = styled(ButtonOrLink, { shouldForwardProp: isPropValid })(
- {
- whiteSpace: "normal",
- display: "inline-flex",
- overflow: "hidden",
- verticalAlign: "top",
- justifyContent: "center",
- alignItems: "center",
- textAlign: "center",
- textDecoration: "none",
- "&:empty": {
- display: "none"
- },
- "&[hidden]": {
- display: "none"
- }
- },
- ({ theme: theme3 }) => ({
- padding: "0 15px",
- transition: "color 0.2s linear, border-bottom-color 0.2s linear",
- height: 40,
- lineHeight: "12px",
- cursor: "pointer",
- background: "transparent",
- border: "0 solid transparent",
- borderTop: "3px solid transparent",
- borderBottom: "3px solid transparent",
- fontWeight: "bold",
- fontSize: 13,
- "&:focus": {
- outline: "0 none",
- borderBottomColor: theme3.barSelectedColor
- }
- }),
- ({ active, textColor, theme: theme3 }) => active ? {
- color: textColor || theme3.barSelectedColor,
- borderBottomColor: theme3.barSelectedColor
- } : {
- color: textColor || theme3.barTextColor,
- borderBottomColor: "transparent",
- "&:hover": {
- color: theme3.barHoverColor
- }
- }
- ), TabButton = (0, import_react165.forwardRef)((props, ref) => (deprecate("The `TabButton` component is deprecated. Use `TabList` instead."), import_react165.default.createElement(StyledTabButton, { "data-deprecated": "TabButton", ref, ...props })));
- TabButton.displayName = "TabButton";
-
- // src/components/components/Tabs/EmptyTabContent.tsx
- var import_react166 = __toESM(require_react(), 1);
- init_theming();
- var Wrapper6 = styled.div(({ theme: theme3 }) => ({
- height: "100%",
- display: "flex",
- padding: 30,
- alignItems: "center",
- justifyContent: "center",
- flexDirection: "column",
- gap: 15,
- background: theme3.background.content
- })), Content2 = styled.div({
- display: "flex",
- flexDirection: "column",
- gap: 4,
- maxWidth: 415
- }), Title5 = styled.div(({ theme: theme3 }) => ({
- fontWeight: theme3.typography.weight.bold,
- fontSize: theme3.typography.size.s2 - 1,
- textAlign: "center",
- color: theme3.color.defaultText
- })), Footer = styled.div(({ theme: theme3 }) => ({
- fontSize: theme3.typography.size.s2 - 1
- })), Description2 = styled.div(({ theme: theme3 }) => ({
- fontWeight: theme3.typography.weight.regular,
- fontSize: theme3.typography.size.s2 - 1,
- textAlign: "center",
- color: theme3.textMutedColor
- })), EmptyTabContent = ({ title, description, footer }) => import_react166.default.createElement(Wrapper6, null, import_react166.default.createElement(Content2, null, import_react166.default.createElement(Title5, null, title), description && import_react166.default.createElement(Description2, null, description)), footer && import_react166.default.createElement(Footer, null, footer));
-
- // src/components/components/Tabs/Tabs.helpers.tsx
- var import_react167 = __toESM(require_react(), 1);
- init_client_logger();
- init_theming();
- var VisuallyHidden = styled.div(
- ({ active }) => active ? { display: "block" } : { display: "none" }
- ), childrenToList = (children) => (deprecate("The `childrenToList` tabs helper is deprecated. Use `TabsView` instead."), import_react167.Children.toArray(children).map(
- // @ts-expect-error (non strict)
- ({
- props: { title, id, color: color2, children: childrenOfChild }
- }) => {
- let content = Array.isArray(
- childrenOfChild
- ) ? childrenOfChild[0] : childrenOfChild;
- return {
- title,
- id,
- ...color2 ? { color: color2 } : {},
- render: typeof content == "function" ? content : ({ active }) => import_react167.default.createElement(VisuallyHidden, { active, role: "tabpanel" }, content)
- };
- }
- ));
-
- // src/components/components/Tabs/Tabs.hooks.tsx
- var import_react168 = __toESM(require_react(), 1);
- init_client_logger();
- init_theming();
- var CollapseIcon2 = styled.span(({ theme: theme3, isActive }) => ({
- display: "inline-block",
- width: 0,
- height: 0,
- marginLeft: 8,
- color: isActive ? theme3.color.secondary : theme3.color.mediumdark,
- borderRight: "3px solid transparent",
- borderLeft: "3px solid transparent",
- borderTop: "3px solid",
- transition: "transform .1s ease-out"
- })), AddonButton = styled(TabButton)(({ active, theme: theme3, preActive }) => `
- color: ${preActive || active ? theme3.barSelectedColor : theme3.barTextColor};
- .addon-collapsible-icon {
- color: ${preActive || active ? theme3.barSelectedColor : theme3.barTextColor};
- }
- &:hover {
- color: ${theme3.barHoverColor};
- .addon-collapsible-icon {
- color: ${theme3.barHoverColor};
- }
- }
- `);
- function useList(list) {
- deprecate("The `useList` tabs hook is deprecated. Use `TabsView` instead.");
- let tabBarRef = (0, import_react168.useRef)(), addonsRef = (0, import_react168.useRef)(), tabRefs = (0, import_react168.useRef)(/* @__PURE__ */ new Map()), { width: tabBarWidth = 1 } = useResizeObserver2({
- // @ts-expect-error (non strict)
- ref: tabBarRef
- }), [visibleList, setVisibleList] = (0, import_react168.useState)(list), [invisibleList, setInvisibleList] = (0, import_react168.useState)([]), previousList = (0, import_react168.useRef)(list), AddonTab = (0, import_react168.useCallback)(
- ({
- menuName,
- actions
- }) => {
- let isAddonsActive = invisibleList.some(({ active }) => active), [isTooltipVisible, setTooltipVisible] = (0, import_react168.useState)(!1);
- return import_react168.default.createElement(import_react168.default.Fragment, null, import_react168.default.createElement(
- PopoverProvider,
- {
- ariaLabel: "Additional tabs",
- visible: isTooltipVisible,
- onVisibleChange: setTooltipVisible,
- placement: "bottom",
- popover: import_react168.default.createElement(
- TooltipLinkList,
- {
- links: invisibleList.map(({ title, id, color: color2, active }) => ({
- id,
- title,
- color: color2,
- active,
- onClick: (e) => {
- e.preventDefault(), actions.onSelect(id);
- }
- }))
- }
- )
- },
- import_react168.default.createElement(
- AddonButton,
- {
- id: "addons-menu-button",
- ref: addonsRef,
- active: isAddonsActive,
- preActive: isTooltipVisible,
- style: { visibility: invisibleList.length ? "visible" : "hidden" },
- "aria-hidden": !invisibleList.length,
- className: "tabbutton",
- type: "button",
- role: "tab"
- },
- menuName,
- import_react168.default.createElement(
- CollapseIcon2,
- {
- className: "addon-collapsible-icon",
- isActive: isAddonsActive || isTooltipVisible
- }
- )
- )
- ), invisibleList.map(({ title, id, color: color2 }, index4) => {
- let indexId = `index-${index4}`;
- return import_react168.default.createElement(
- TabButton,
- {
- id: `tabbutton-${sanitize(id) ?? indexId}`,
- style: { visibility: "hidden" },
- "aria-hidden": !0,
- tabIndex: -1,
- ref: (ref) => {
- tabRefs.current.set(id, ref);
- },
- className: "tabbutton",
- type: "button",
- key: id,
- textColor: color2,
- role: "tab"
- },
- title
- );
- }));
- },
- [invisibleList]
- ), setTabLists = (0, import_react168.useCallback)(() => {
- if (!tabBarRef.current || !addonsRef.current)
- return;
- let { x, width } = tabBarRef.current.getBoundingClientRect(), { width: widthAddonsTab } = addonsRef.current.getBoundingClientRect(), rightBorder = invisibleList.length ? x + width - widthAddonsTab : x + width, newVisibleList = [], widthSum = 0, newInvisibleList = list.filter((item) => {
- let { id } = item, tabButton = tabRefs.current.get(id), { width: tabWidth = 0 } = tabButton?.getBoundingClientRect() || {}, crossBorder = x + widthSum + tabWidth > rightBorder;
- return (!crossBorder || !tabButton) && newVisibleList.push(item), widthSum += tabWidth, crossBorder;
- });
- (newVisibleList.length !== visibleList.length || previousList.current !== list) && (setVisibleList(newVisibleList), setInvisibleList(newInvisibleList), previousList.current = list);
- }, [invisibleList.length, list, visibleList]);
- return (0, import_react168.useLayoutEffect)(setTabLists, [setTabLists, tabBarWidth]), {
- tabRefs,
- addonsRef,
- tabBarRef,
- visibleList,
- invisibleList,
- AddonTab
- };
- }
-
- // src/components/components/Tabs/Tabs.tsx
- var ignoreSsrWarning2 = "/* emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason */", Wrapper7 = styled.div(
- ({ theme: theme3, bordered }) => bordered ? {
- backgroundClip: "padding-box",
- border: `1px solid ${theme3.appBorderColor}`,
- borderRadius: theme3.appBorderRadius,
- overflow: "hidden",
- boxSizing: "border-box"
- } : {},
- ({ absolute }) => absolute ? {
- width: "100%",
- height: "100%",
- boxSizing: "border-box",
- display: "flex",
- flexDirection: "column"
- } : {
- display: "block"
- }
- ), StyledTabBar = styled.div({
- overflow: "hidden",
- "&:first-of-type": {
- marginLeft: -3
- },
- whiteSpace: "nowrap",
- flexGrow: 1
- }), TabBar = (0, import_react169.forwardRef)(
- (props, ref) => (deprecate("The `TabBar` component is deprecated. Use `TabsView` instead."), import_react169.default.createElement(StyledTabBar, { "data-deprecated": "TabBar", ...props, ref }))
- );
- TabBar.displayName = "TabBar";
- var Content3 = styled.div(
- {
- display: "block",
- position: "relative",
- container: "tab-content / inline-size"
- },
- ({ theme: theme3 }) => ({
- fontSize: theme3.typography.size.s2 - 1,
- background: theme3.background.content
- }),
- ({ bordered, theme: theme3 }) => bordered ? {
- borderRadius: `0 0 ${theme3.appBorderRadius - 1}px ${theme3.appBorderRadius - 1}px`
- } : {},
- ({ absolute, bordered }) => absolute ? {
- height: `calc(100% - ${bordered ? 42 : 40}px)`,
- position: "absolute",
- left: 0 + (bordered ? 1 : 0),
- right: 0 + (bordered ? 1 : 0),
- bottom: 0 + (bordered ? 1 : 0),
- top: 40 + (bordered ? 1 : 0),
- overflow: "auto",
- [`& > *:first-child${ignoreSsrWarning2}`]: {
- position: "absolute",
- left: 0 + (bordered ? 1 : 0),
- right: 0 + (bordered ? 1 : 0),
- bottom: 0 + (bordered ? 1 : 0),
- top: 0 + (bordered ? 1 : 0),
- height: `calc(100% - ${bordered ? 2 : 0}px)`,
- overflow: "auto"
- }
- } : {}
- ), TabWrapper = (0, import_react169.forwardRef)(
- ({ active, render, children }, ref) => (deprecate("The `TabWrapper` component is deprecated. Use `TabsView` instead."), import_react169.default.createElement(VisuallyHidden, { "data-deprecated": "TabWrapper", ref, active }, render ? render() : children))
- );
- TabWrapper.displayName = "TabWrapper";
- var TabErrorBoundary = class extends import_react169.Component {
- constructor(props) {
- super(props), this.state = { hasError: !1 };
- }
- static getDerivedStateFromError() {
- return { hasError: !0 };
- }
- componentDidCatch(error, info) {
- console.error("Error rendering addon panel"), console.error(error), console.error(info.componentStack);
- }
- render() {
- return this.state.hasError && this.props.active ? import_react169.default.createElement(
- EmptyTabContent,
- {
- title: "This addon has errors",
- description: "Check your browser logs and addon code to pinpoint what went wrong. This issue was not caused by Storybook."
- }
- ) : this.props.children;
- }
- }, Tabs = (0, import_react169.memo)(
- ({
- children,
- selected = null,
- actions,
- absolute = !1,
- bordered = !1,
- tools = null,
- backgroundColor,
- id: htmlId = null,
- menuName = "Tabs",
- emptyState,
- showToolsWhenEmpty
- }) => {
- deprecate("The `Tabs` component is deprecated. Use `TabsView` instead.");
- let list = (0, import_react169.useMemo)(
- () => childrenToList(children).map((i, index4) => ({
- ...i,
- active: selected ? i.id === selected : index4 === 0
- })),
- [children, selected]
- ), { visibleList, tabBarRef, tabRefs, AddonTab } = useList(list), EmptyContent = emptyState ?? import_react169.default.createElement(EmptyTabContent, { title: "Nothing found" });
- return !showToolsWhenEmpty && list.length === 0 ? EmptyContent : (
- // @ts-expect-error (non strict)
- import_react169.default.createElement(Wrapper7, { "data-deprecated": "Tabs", absolute, bordered, id: htmlId }, import_react169.default.createElement(FlexBar, { scrollable: !1, border: !0, backgroundColor }, import_react169.default.createElement(TabBar, { style: { whiteSpace: "normal" }, ref: tabBarRef, role: "tablist" }, visibleList.map(({ title, id, active, color: color2 }, index4) => {
- let indexId = `index-${index4}`;
- return import_react169.default.createElement(
- TabButton,
- {
- id: `tabbutton-${sanitize(id) ?? indexId}`,
- ref: (ref) => {
- tabRefs.current.set(id, ref);
- },
- className: `tabbutton ${active ? "tabbutton-active" : ""}`,
- type: "button",
- key: id,
- active,
- textColor: color2,
- onClick: (e) => {
- e.preventDefault(), actions.onSelect(id);
- },
- role: "tab",
- "aria-selected": active
- },
- typeof title == "function" ? import_react169.default.createElement("title", null) : title
- );
- }), import_react169.default.createElement(AddonTab, { menuName, actions })), tools), import_react169.default.createElement(Content3, { id: "panel-tab-content", bordered, absolute }, list.length ? list.map(({ id, active, render }) => import_react169.default.createElement(TabErrorBoundary, { key: id, active }, import_react169.default.createElement(render, { active }, null))) : EmptyContent))
- );
- }
- );
- Tabs.displayName = "Tabs";
- var TabsState = class extends import_react169.Component {
- constructor(props) {
- super(props);
- this.handlers = {
- onSelect: (id) => this.setState({ selected: id })
- };
- deprecate("The `TabsState` class is deprecated. Use `TabsView` instead."), this.state = {
- selected: props.initial
- };
- }
- render() {
- let { bordered = !1, absolute = !1, children, backgroundColor, menuName } = this.props, { selected } = this.state;
- return import_react169.default.createElement(
- Tabs,
- {
- bordered,
- absolute,
- selected,
- backgroundColor,
- menuName,
- actions: this.handlers
- },
- children
- );
- }
- };
- TabsState.defaultProps = {
- children: [],
- // @ts-expect-error (non strict)
- initial: null,
- absolute: !1,
- bordered: !1,
- backgroundColor: "",
- // @ts-expect-error (non strict)
- menuName: void 0
- };
-
- // src/components/components/Bar/Separator.tsx
- var import_react170 = __toESM(require_react(), 1);
- init_theming();
- var Separator2 = styled.span(
- ({ theme: theme3 }) => ({
- display: "inline-block",
- width: 1,
- height: 20,
- background: theme3.appBorderColor,
- marginLeft: 2,
- marginRight: 2
- }),
- ({ force }) => force ? {} : {
- "& + &": {
- display: "none"
- }
- }
- );
- Separator2.displayName = "Separator";
- var interleaveSeparators = (list) => list.reduce(
- (acc, item, index4) => item ? import_react170.default.createElement(import_react170.Fragment, { key: item.id || item.key || `f-${index4}` }, acc, index4 > 0 ? import_react170.default.createElement(Separator2, { key: `s-${index4}` }) : null, item.render() || item) : acc,
- null
- );
-
- // src/components/components/addon-panel/addon-panel.tsx
- var import_react171 = __toESM(require_react(), 1);
- init_theming();
- init_ScrollArea();
- var usePrevious = (value) => {
- let ref = (0, import_react171.useRef)();
- return (0, import_react171.useEffect)(() => {
- ref.current = value;
- }, [value]), ref.current;
- }, useUpdate = (update2, value) => {
- let previousValue = usePrevious(value);
- return update2 ? value : previousValue;
- }, Div2 = styled.div(({ theme: theme3 }) => ({
- fontSize: theme3.typography.size.s2 - 1,
- height: "100%"
- })), AddonPanel = ({
- active,
- children,
- hasScrollbar = !0,
- hasHorizontalScrollbar = !1
- }) => (
- // the hidden attribute is an valid html element that's both accessible and works to visually hide content
- import_react171.default.createElement(Div2, { hidden: !active }, hasScrollbar || hasHorizontalScrollbar ? import_react171.default.createElement(ScrollArea2, { vertical: hasScrollbar, horizontal: hasHorizontalScrollbar }, useUpdate(active, children)) : useUpdate(active, children))
- );
-
- // src/components/components/Toolbar/Toolbar.tsx
- var import_react173 = __toESM(require_react(), 1);
-
- // ../../node_modules/@react-aria/toolbar/dist/useToolbar.mjs
- var import_react172 = __toESM(require_react(), 1);
- function $2680b1829e803644$export$fa142eb1681c5202(props, ref) {
- let { "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, orientation = "horizontal" } = props, [isInToolbar, setInToolbar] = (0, import_react172.useState)(!1);
- $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
- var _ref_current_parentElement;
- setInToolbar(!!(ref.current && (!((_ref_current_parentElement = ref.current.parentElement) === null || _ref_current_parentElement === void 0) && _ref_current_parentElement.closest('[role="toolbar"]'))));
- });
- let { direction } = $18f2051aff69b9bf$export$43bb16f9c6d9e3f7(), shouldReverse = direction === "rtl" && orientation === "horizontal", focusManager = $9bf71ea28793e738$export$c5251b9e124bf29(ref), onKeyDown = (e) => {
- if (e.currentTarget.contains(e.target)) {
- if (orientation === "horizontal" && e.key === "ArrowRight" || orientation === "vertical" && e.key === "ArrowDown")
- shouldReverse ? focusManager.focusPrevious() : focusManager.focusNext();
- else if (orientation === "horizontal" && e.key === "ArrowLeft" || orientation === "vertical" && e.key === "ArrowUp")
- shouldReverse ? focusManager.focusNext() : focusManager.focusPrevious();
- else if (e.key === "Tab") {
- e.stopPropagation(), lastFocused.current = document.activeElement, e.shiftKey ? focusManager.focusFirst() : focusManager.focusLast();
- return;
- } else
- return;
- e.stopPropagation(), e.preventDefault();
- }
- }, lastFocused = (0, import_react172.useRef)(null), onBlur = (e) => {
- !e.currentTarget.contains(e.relatedTarget) && !lastFocused.current && (lastFocused.current = e.target);
- }, onFocus = (e) => {
- var _ref_current;
- if (lastFocused.current && !e.currentTarget.contains(e.relatedTarget) && (!((_ref_current = ref.current) === null || _ref_current === void 0) && _ref_current.contains(e.target))) {
- var _lastFocused_current;
- (_lastFocused_current = lastFocused.current) === null || _lastFocused_current === void 0 || _lastFocused_current.focus(), lastFocused.current = null;
- }
- };
- return {
- toolbarProps: {
- ...$65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, {
- labelable: !0
- }),
- role: isInToolbar ? "group" : "toolbar",
- "aria-orientation": orientation,
- "aria-label": ariaLabel,
- "aria-labelledby": ariaLabel == null ? ariaLabelledBy : void 0,
- onKeyDownCapture: isInToolbar ? void 0 : onKeyDown,
- onFocusCapture: isInToolbar ? void 0 : onFocus,
- onBlurCapture: isInToolbar ? void 0 : onBlur
- }
- };
- }
-
- // src/components/components/Toolbar/Toolbar.tsx
- var AbstractToolbar = ({
- "aria-label": ariaLabel,
- "aria-labelledby": ariaLabelledby,
- ...rest
- }) => {
- let ref = (0, import_react173.useRef)(null), { toolbarProps } = $2680b1829e803644$export$fa142eb1681c5202(
- {
- "aria-label": ariaLabel,
- "aria-labelledby": ariaLabelledby,
- orientation: "horizontal"
- },
- ref
- );
- return import_react173.default.createElement("div", { ref, ...toolbarProps, ...rest });
- }, Toolbar = ({
- "aria-label": ariaLabel,
- "aria-labelledby": ariaLabelledby,
- ...rest
- }) => {
- let ref = (0, import_react173.useRef)(null), { toolbarProps } = $2680b1829e803644$export$fa142eb1681c5202(
- {
- "aria-label": ariaLabel,
- "aria-labelledby": ariaLabelledby,
- orientation: "horizontal"
- },
- ref
- );
- return import_react173.default.createElement(Bar, { ref, ...toolbarProps, ...rest });
- };
-
- // src/components/components/Tabs/TabList.tsx
- var import_react175 = __toESM(require_react(), 1);
-
- // ../../node_modules/@react-aria/tabs/dist/utils.mjs
- var $99b62ae3ff97ec45$export$c5f62239608282b6 = /* @__PURE__ */ new WeakMap();
- function $99b62ae3ff97ec45$export$567fc7097e064344(state3, key, role) {
- return state3 ? (typeof key == "string" && (key = key.replace(/\s+/g, "")), `${$99b62ae3ff97ec45$export$c5f62239608282b6.get(state3)}-${role}-${key}`) : "";
- }
-
- // ../../node_modules/@react-aria/tabs/dist/useTab.mjs
- function $0175d55c2a017ebc$export$fdf4756d5b8ef90a(props, state3, ref) {
- let { key, isDisabled: propsDisabled, shouldSelectOnPressUp } = props, { selectionManager: manager, selectedKey } = state3, isSelected = key === selectedKey, isDisabled3 = propsDisabled || state3.isDisabled || state3.selectionManager.isDisabled(key), { itemProps, isPressed } = $880e95eb8b93ba9a$export$ecf600387e221c37({
- selectionManager: manager,
- key,
- ref,
- isDisabled: isDisabled3,
- shouldSelectOnPressUp,
- linkBehavior: "selection"
- }), tabId = $99b62ae3ff97ec45$export$567fc7097e064344(state3, key, "tab"), tabPanelId = $99b62ae3ff97ec45$export$567fc7097e064344(state3, key, "tabpanel"), { tabIndex } = itemProps, item = state3.collection.getItem(key), domProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(item?.props, {
- labelable: !0
- });
- delete domProps.id;
- let linkProps = $ea8dcbcb9ea1b556$export$7e924b3091a3bd18(item?.props), { focusableProps } = $f645667febf57a63$export$4c014de7c8940b4c({
- isDisabled: isDisabled3
- }, ref);
- return {
- tabProps: $3ef42575df84b30b$export$9d1611c77c2fe928(domProps, focusableProps, linkProps, itemProps, {
- id: tabId,
- "aria-selected": isSelected,
- "aria-disabled": isDisabled3 || void 0,
- "aria-controls": isSelected ? tabPanelId : void 0,
- tabIndex: isDisabled3 ? void 0 : tabIndex,
- role: "tab"
- }),
- isSelected,
- isDisabled: isDisabled3,
- isPressed
- };
- }
-
- // ../../node_modules/@react-aria/tabs/dist/useTabPanel.mjs
- function $34bce698202e07cb$export$fae0121b5afe572d(props, state3, ref) {
- let tabIndex = $83013635b024ae3d$export$eac1895992b9f3d6(ref) ? void 0 : 0;
- var _props_id;
- let id = $99b62ae3ff97ec45$export$567fc7097e064344(state3, (_props_id = props.id) !== null && _props_id !== void 0 ? _props_id : state3?.selectedKey, "tabpanel"), tabPanelProps = $313b98861ee5dd6c$export$d6875122194c7b44({
- ...props,
- id,
- "aria-labelledby": $99b62ae3ff97ec45$export$567fc7097e064344(state3, state3?.selectedKey, "tab")
- });
- return {
- tabPanelProps: $3ef42575df84b30b$export$9d1611c77c2fe928(tabPanelProps, {
- tabIndex,
- role: "tabpanel",
- "aria-describedby": props["aria-describedby"],
- "aria-details": props["aria-details"]
- })
- };
- }
-
- // ../../node_modules/@react-aria/tabs/dist/TabsKeyboardDelegate.mjs
- var $bfc6f2d60b8a4c40$export$15010ca3c1abe90b = class {
- getKeyLeftOf(key) {
- return this.flipDirection ? this.getNextKey(key) : this.getPreviousKey(key);
- }
- getKeyRightOf(key) {
- return this.flipDirection ? this.getPreviousKey(key) : this.getNextKey(key);
- }
- isDisabled(key) {
- var _this_collection_getItem_props, _this_collection_getItem;
- return this.disabledKeys.has(key) || !!(!((_this_collection_getItem = this.collection.getItem(key)) === null || _this_collection_getItem === void 0 || (_this_collection_getItem_props = _this_collection_getItem.props) === null || _this_collection_getItem_props === void 0) && _this_collection_getItem_props.isDisabled);
- }
- getFirstKey() {
- let key = this.collection.getFirstKey();
- return key != null && this.isDisabled(key) && (key = this.getNextKey(key)), key;
- }
- getLastKey() {
- let key = this.collection.getLastKey();
- return key != null && this.isDisabled(key) && (key = this.getPreviousKey(key)), key;
- }
- getKeyAbove(key) {
- return this.tabDirection ? null : this.getPreviousKey(key);
- }
- getKeyBelow(key) {
- return this.tabDirection ? null : this.getNextKey(key);
- }
- getNextKey(startKey) {
- let key = startKey;
- do
- key = this.collection.getKeyAfter(key), key == null && (key = this.collection.getFirstKey());
- while (key != null && this.isDisabled(key));
- return key;
- }
- getPreviousKey(startKey) {
- let key = startKey;
- do
- key = this.collection.getKeyBefore(key), key == null && (key = this.collection.getLastKey());
- while (key != null && this.isDisabled(key));
- return key;
- }
- constructor(collection, direction, orientation, disabledKeys = /* @__PURE__ */ new Set()) {
- this.collection = collection, this.flipDirection = direction === "rtl" && orientation === "horizontal", this.disabledKeys = disabledKeys, this.tabDirection = orientation === "horizontal";
- }
- };
-
- // ../../node_modules/@react-aria/tabs/dist/useTabList.mjs
- var import_react174 = __toESM(require_react(), 1);
- function $58d314389b21fa3f$export$773e389e644c5874(props, state3, ref) {
- let { orientation = "horizontal", keyboardActivation = "automatic" } = props, { collection, selectionManager: manager, disabledKeys } = state3, { direction } = $18f2051aff69b9bf$export$43bb16f9c6d9e3f7(), delegate = (0, import_react174.useMemo)(() => new $bfc6f2d60b8a4c40$export$15010ca3c1abe90b(collection, direction, orientation, disabledKeys), [
- collection,
- disabledKeys,
- orientation,
- direction
- ]), { collectionProps } = $ae20dd8cbca75726$export$d6daf82dcd84e87c({
- ref,
- selectionManager: manager,
- keyboardDelegate: delegate,
- selectOnFocus: keyboardActivation === "automatic",
- disallowEmptySelection: !0,
- scrollRef: ref,
- linkBehavior: "selection"
- }), tabsId = $bdb11010cef70236$export$f680877a34711e37();
- $99b62ae3ff97ec45$export$c5f62239608282b6.set(state3, tabsId);
- let tabListLabelProps = $313b98861ee5dd6c$export$d6875122194c7b44({
- ...props,
- id: tabsId
- });
- return {
- tabListProps: {
- ...$3ef42575df84b30b$export$9d1611c77c2fe928(collectionProps, tabListLabelProps),
- role: "tablist",
- "aria-orientation": orientation,
- tabIndex: void 0
- }
- };
- }
-
- // src/components/components/Tabs/TabList.tsx
- init_theming();
- var StyledTabButton2 = styled.button(
- {
- whiteSpace: "normal",
- display: "inline-flex",
- overflow: "hidden",
- verticalAlign: "top",
- justifyContent: "center",
- alignItems: "center",
- textAlign: "center",
- textDecoration: "none",
- scrollSnapAlign: "start",
- "&:empty": {
- display: "none"
- },
- "&[hidden]": {
- display: "none"
- }
- },
- ({ theme: theme3 }) => ({
- padding: "0 15px",
- transition: "color 0.2s linear, border-bottom-color 0.2s linear",
- height: 40,
- lineHeight: "12px",
- cursor: "pointer",
- background: "transparent",
- border: "0 solid transparent",
- borderTop: "3px solid transparent",
- borderBottom: "3px solid transparent",
- fontWeight: "bold",
- fontSize: 13,
- "&:focus-visible": {
- outline: "0 none",
- boxShadow: `inset 0 0 0 2px ${theme3.barSelectedColor}`
- }
- }),
- ({ isSelected, theme: theme3 }) => isSelected ? {
- color: theme3.barSelectedColor,
- borderBottomColor: theme3.barSelectedColor
- } : {
- color: theme3.barTextColor,
- borderBottomColor: "transparent",
- "&:hover": {
- color: theme3.barHoverColor
- }
- }
- ), TabListContainer = styled.div({
- display: "flex",
- alignItems: "center",
- flexShrink: 0,
- position: "relative",
- overflow: "hidden"
- }), ScrollContainer = styled.div({
- display: "flex",
- overflowX: "auto",
- scrollbarWidth: "none",
- msOverflowStyle: "none",
- WebkitScrollbar: "none",
- scrollSnapType: "x mandatory",
- flex: 1,
- "&::-webkit-scrollbar": {
- display: "none"
- }
- }), StyledTabList = styled.div({
- display: "flex",
- flexShrink: 0
- }), SCROLL_BUTTON_WIDTH = 28, ScrollButtonContainer = styled.div(({ $showStartBorder, $showEndBorder, theme: theme3 }) => ({
- flexShrink: 0,
- display: "flex",
- alignItems: "center",
- justifyContent: "center",
- padding: 6,
- boxShadow: $showStartBorder ? `inset 1px 0 0 ${theme3.appBorderColor}` : $showEndBorder ? `inset -1px 0 0 ${theme3.appBorderColor}` : "none"
- })), ScrollButton = styled(Button)({
- flexShrink: 0,
- paddingInline: 0,
- width: 16
- }), TabButton2 = ({ item, state: state3 }) => {
- let { rendered } = item, tabRef = import_react175.default.useRef(null), typedState = state3, { tabProps, isDisabled: isDisabled3, isPressed, isSelected } = $0175d55c2a017ebc$export$fdf4756d5b8ef90a(item, typedState, tabRef);
- return import_react175.default.createElement(
- StyledTabButton2,
- {
- ...tabProps,
- isDisabled: isDisabled3,
- isPressed,
- isSelected,
- className: `tabbutton ${isSelected ? "tabbutton-active" : ""}`,
- ref: tabRef
- },
- rendered
- );
- }, TabList = ({ state: state3, ...rest }) => {
- let containerRef = (0, import_react175.useRef)(null), scrollContainerRef = (0, import_react175.useRef)(null), tabListRef = (0, import_react175.useRef)(null), { tabListProps } = $58d314389b21fa3f$export$773e389e644c5874(
- { orientation: "horizontal" },
- state3,
- tabListRef
- ), [showScrollButtons, setShowScrollButtons] = (0, import_react175.useState)(!1), [canScrollLeft, setCanScrollLeft] = (0, import_react175.useState)(!1), [canScrollRight, setCanScrollRight] = (0, import_react175.useState)(!1), updateScrollState = (0, import_react175.useCallback)(() => {
- let scrollContainer = scrollContainerRef.current, container = containerRef.current;
- if (!scrollContainer || !container)
- return;
- let { scrollLeft, scrollWidth, clientWidth } = scrollContainer, availableWidth = container.clientWidth - (showScrollButtons ? SCROLL_BUTTON_WIDTH * 2 : 0), needsScrolling = scrollWidth > availableWidth;
- setShowScrollButtons(needsScrolling), needsScrolling ? (setCanScrollLeft(scrollLeft > 0), setCanScrollRight(scrollLeft < scrollWidth - clientWidth)) : (setCanScrollLeft(!1), setCanScrollRight(!1));
- }, [showScrollButtons]), throttledUpdateScrollState = (0, import_react175.useCallback)(() => {
- updateScrollState();
- }, [updateScrollState]);
- (0, import_react175.useEffect)(() => {
- let scrollContainer = scrollContainerRef.current;
- if (!scrollContainer || typeof window > "u")
- return;
- scrollContainer.addEventListener("scroll", throttledUpdateScrollState, { passive: !0 });
- let resizeObserver = null;
- typeof ResizeObserver < "u" && (resizeObserver = new ResizeObserver(throttledUpdateScrollState), resizeObserver.observe(scrollContainer));
- let timeoutId = setTimeout(throttledUpdateScrollState, 0);
- return () => {
- clearTimeout(timeoutId), scrollContainer.removeEventListener("scroll", throttledUpdateScrollState), resizeObserver && resizeObserver.disconnect();
- };
- }, [throttledUpdateScrollState]);
- let scroll = (0, import_react175.useCallback)((direction) => {
- let scrollContainer = scrollContainerRef.current, container = containerRef.current;
- if (!scrollContainer || !container || typeof window > "u")
- return;
- let availableWidth = container.clientWidth - SCROLL_BUTTON_WIDTH * 2, scrollDistance = direction === "backward" ? -availableWidth : availableWidth;
- typeof scrollContainer.scrollBy == "function" ? scrollContainer.scrollBy({ left: scrollDistance, behavior: "smooth" }) : scrollContainer.scrollLeft += scrollDistance;
- }, []), scrollBackward = (0, import_react175.useCallback)(() => scroll("backward"), [scroll]), scrollForward = (0, import_react175.useCallback)(() => scroll("forward"), [scroll]);
- return import_react175.default.createElement(TabListContainer, { ...rest, ref: containerRef, "data-show-scroll-buttons": showScrollButtons }, showScrollButtons && import_react175.default.createElement(ScrollButtonContainer, { $showEndBorder: canScrollLeft }, import_react175.default.createElement(
- ScrollButton,
- {
- variant: "ghost",
- padding: "small",
- size: "small",
- ariaLabel: "Scroll backward",
- disabled: !canScrollLeft,
- onClick: scrollBackward,
- tabIndex: -1
- },
- import_react175.default.createElement(ChevronSmallLeftIcon, null)
- )), import_react175.default.createElement(ScrollContainer, { ref: scrollContainerRef }, import_react175.default.createElement(StyledTabList, { ref: tabListRef, ...tabListProps }, [...state3.collection].map((item) => import_react175.default.createElement(TabButton2, { key: item.key, item, state: state3 })))), showScrollButtons && import_react175.default.createElement(ScrollButtonContainer, { $showStartBorder: canScrollRight }, import_react175.default.createElement(
- ScrollButton,
- {
- variant: "ghost",
- padding: "small",
- size: "small",
- ariaLabel: "Scroll forward",
- disabled: !canScrollRight,
- onClick: scrollForward,
- tabIndex: -1
- },
- import_react175.default.createElement(ChevronSmallRightIcon, null)
- )));
- };
-
- // src/components/components/Tabs/TabPanel.tsx
- var import_react176 = __toESM(require_react(), 1);
- init_theming();
- init_ScrollArea();
- var Panel = styled.div({
- overflowY: "hidden",
- height: "100%"
- }), TabPanel = ({
- hasScrollbar = !0,
- renderAllChildren = !1,
- state: state3
- }) => {
- let ref = (0, import_react176.useRef)(null), typedState = state3, { tabPanelProps } = $34bce698202e07cb$export$fae0121b5afe572d(typedState.selectedItem ?? {}, typedState, ref);
- return (renderAllChildren ? [...typedState.collection] : [typedState.selectedItem]).filter((item) => !!item).map((item) => {
- let isSelected = typedState.selectedKey === item.key;
- return import_react176.default.createElement(
- Panel,
- {
- key: item.key,
- ref: isSelected ? ref : void 0,
- ...isSelected ? tabPanelProps : {},
- id: isSelected ? `${tabPanelProps.id}`.replace(/null$/, `${item.key}`) : void 0,
- hidden: isSelected ? void 0 : !0
- },
- hasScrollbar ? import_react176.default.createElement(ScrollArea2, { vertical: !0 }, item.props.children) : item.props.children
- );
- });
- };
-
- // src/components/components/Tabs/TabsView.tsx
- var import_react180 = __toESM(require_react(), 1);
-
- // ../../node_modules/@react-stately/list/dist/ListCollection.mjs
- var $a02d57049d202695$export$d085fb9e920b5ca7 = class {
- *[Symbol.iterator]() {
- yield* this.iterable;
- }
- get size() {
- return this._size;
- }
- getKeys() {
- return this.keyMap.keys();
- }
- getKeyBefore(key) {
- let node2 = this.keyMap.get(key);
- var _node_prevKey;
- return node2 && (_node_prevKey = node2.prevKey) !== null && _node_prevKey !== void 0 ? _node_prevKey : null;
- }
- getKeyAfter(key) {
- let node2 = this.keyMap.get(key);
- var _node_nextKey;
- return node2 && (_node_nextKey = node2.nextKey) !== null && _node_nextKey !== void 0 ? _node_nextKey : null;
- }
- getFirstKey() {
- return this.firstKey;
- }
- getLastKey() {
- return this.lastKey;
- }
- getItem(key) {
- var _this_keyMap_get;
- return (_this_keyMap_get = this.keyMap.get(key)) !== null && _this_keyMap_get !== void 0 ? _this_keyMap_get : null;
- }
- at(idx) {
- let keys3 = [
- ...this.getKeys()
- ];
- return this.getItem(keys3[idx]);
- }
- getChildren(key) {
- let node2 = this.keyMap.get(key);
- return node2?.childNodes || [];
- }
- constructor(nodes) {
- this.keyMap = /* @__PURE__ */ new Map(), this.firstKey = null, this.lastKey = null, this.iterable = nodes;
- let visit = (node2) => {
- if (this.keyMap.set(node2.key, node2), node2.childNodes && node2.type === "section") for (let child of node2.childNodes) visit(child);
- };
- for (let node2 of nodes) visit(node2);
- let last2 = null, index4 = 0, size = 0;
- for (let [key, node2] of this.keyMap)
- last2 ? (last2.nextKey = key, node2.prevKey = last2.key) : (this.firstKey = key, node2.prevKey = void 0), node2.type === "item" && (node2.index = index4++), (node2.type === "section" || node2.type === "item") && size++, last2 = node2, last2.nextKey = void 0;
- this._size = size;
- var _last_key;
- this.lastKey = (_last_key = last2?.key) !== null && _last_key !== void 0 ? _last_key : null;
- }
- };
-
- // ../../node_modules/@react-stately/list/dist/useListState.mjs
- var import_react177 = __toESM(require_react(), 1);
- function $e72dd72e1c76a225$export$2f645645f7bca764(props) {
- let { filter, layoutDelegate } = props, selectionState = $7af3f5b51489e0b5$export$253fe78d46329472(props), disabledKeys = (0, import_react177.useMemo)(() => props.disabledKeys ? new Set(props.disabledKeys) : /* @__PURE__ */ new Set(), [
- props.disabledKeys
- ]), factory = (0, import_react177.useCallback)((nodes) => filter ? new $a02d57049d202695$export$d085fb9e920b5ca7(filter(nodes)) : new $a02d57049d202695$export$d085fb9e920b5ca7(nodes), [
- filter
- ]), context = (0, import_react177.useMemo)(() => ({
- suppressTextValueWarning: props.suppressTextValueWarning
- }), [
- props.suppressTextValueWarning
- ]), collection = $7613b1592d41b092$export$6cd28814d92fa9c9(props, factory, context), selectionManager = (0, import_react177.useMemo)(() => new $d496c0a20b6e58ec$export$6c8a5aaad13c9852(collection, selectionState, {
- layoutDelegate
- }), [
- collection,
- selectionState,
- layoutDelegate
- ]);
- return $e72dd72e1c76a225$var$useFocusedKeyReset(collection, selectionManager), {
- collection,
- disabledKeys,
- selectionManager
- };
- }
- function $e72dd72e1c76a225$var$useFocusedKeyReset(collection, selectionManager) {
- let cachedCollection = (0, import_react177.useRef)(null);
- (0, import_react177.useEffect)(() => {
- if (selectionManager.focusedKey != null && !collection.getItem(selectionManager.focusedKey) && cachedCollection.current) {
- let startItem = cachedCollection.current.getItem(selectionManager.focusedKey), cachedItemNodes = [
- ...cachedCollection.current.getKeys()
- ].map((key) => {
- let itemNode = cachedCollection.current.getItem(key);
- return itemNode?.type === "item" ? itemNode : null;
- }).filter((node2) => node2 !== null), itemNodes = [
- ...collection.getKeys()
- ].map((key) => {
- let itemNode = collection.getItem(key);
- return itemNode?.type === "item" ? itemNode : null;
- }).filter((node2) => node2 !== null);
- var _cachedItemNodes_length, _itemNodes_length;
- let diff2 = ((_cachedItemNodes_length = cachedItemNodes?.length) !== null && _cachedItemNodes_length !== void 0 ? _cachedItemNodes_length : 0) - ((_itemNodes_length = itemNodes?.length) !== null && _itemNodes_length !== void 0 ? _itemNodes_length : 0);
- var _startItem_index, _startItem_index1, _itemNodes_length1;
- let index4 = Math.min(diff2 > 1 ? Math.max(((_startItem_index = startItem?.index) !== null && _startItem_index !== void 0 ? _startItem_index : 0) - diff2 + 1, 0) : (_startItem_index1 = startItem?.index) !== null && _startItem_index1 !== void 0 ? _startItem_index1 : 0, ((_itemNodes_length1 = itemNodes?.length) !== null && _itemNodes_length1 !== void 0 ? _itemNodes_length1 : 0) - 1), newNode = null, isReverseSearching = !1;
- for (; index4 >= 0; ) {
- if (!selectionManager.isDisabled(itemNodes[index4].key)) {
- newNode = itemNodes[index4];
- break;
- }
- if (index4 < itemNodes.length - 1 && !isReverseSearching) index4++;
- else {
- isReverseSearching = !0;
- var _startItem_index2, _startItem_index3;
- index4 > ((_startItem_index2 = startItem?.index) !== null && _startItem_index2 !== void 0 ? _startItem_index2 : 0) && (index4 = (_startItem_index3 = startItem?.index) !== null && _startItem_index3 !== void 0 ? _startItem_index3 : 0), index4--;
- }
- }
- selectionManager.setFocusedKey(newNode ? newNode.key : null);
- }
- cachedCollection.current = collection;
- }, [
- collection,
- selectionManager
- ]);
- }
-
- // ../../node_modules/@react-stately/list/dist/useSingleSelectListState.mjs
- var import_react178 = __toESM(require_react(), 1);
- function $a0d645289fe9b86b$export$e7f05e985daf4b5f(props) {
- var _props_defaultSelectedKey;
- let [selectedKey, setSelectedKey] = $458b0a5536c1a7cf$export$40bfa8c7b0832715(props.selectedKey, (_props_defaultSelectedKey = props.defaultSelectedKey) !== null && _props_defaultSelectedKey !== void 0 ? _props_defaultSelectedKey : null, props.onSelectionChange), selectedKeys = (0, import_react178.useMemo)(() => selectedKey != null ? [
- selectedKey
- ] : [], [
- selectedKey
- ]), { collection, disabledKeys, selectionManager } = $e72dd72e1c76a225$export$2f645645f7bca764({
- ...props,
- selectionMode: "single",
- disallowEmptySelection: !0,
- allowDuplicateSelectionEvents: !0,
- selectedKeys,
- onSelectionChange: (keys3) => {
- if (keys3 === "all") return;
- var _keys_values_next_value;
- let key = (_keys_values_next_value = keys3.values().next().value) !== null && _keys_values_next_value !== void 0 ? _keys_values_next_value : null;
- key === selectedKey && props.onSelectionChange && props.onSelectionChange(key), setSelectedKey(key);
- }
- }), selectedItem = selectedKey != null ? collection.getItem(selectedKey) : null;
- return {
- collection,
- disabledKeys,
- selectionManager,
- selectedKey,
- setSelectedKey,
- selectedItem
- };
- }
-
- // ../../node_modules/@react-stately/tabs/dist/useTabListState.mjs
- var import_react179 = __toESM(require_react(), 1);
- function $76f919a04c5a7d14$export$4ba071daf4e486(props) {
- var _props_defaultSelectedKey, _ref;
- let state3 = $a0d645289fe9b86b$export$e7f05e985daf4b5f({
- ...props,
- onSelectionChange: props.onSelectionChange ? (key) => {
- var _props_onSelectionChange;
- key != null && ((_props_onSelectionChange = props.onSelectionChange) === null || _props_onSelectionChange === void 0 || _props_onSelectionChange.call(props, key));
- } : void 0,
- suppressTextValueWarning: !0,
- defaultSelectedKey: (_ref = (_props_defaultSelectedKey = props.defaultSelectedKey) !== null && _props_defaultSelectedKey !== void 0 ? _props_defaultSelectedKey : $76f919a04c5a7d14$var$findDefaultSelectedKey(props.collection, props.disabledKeys ? new Set(props.disabledKeys) : /* @__PURE__ */ new Set())) !== null && _ref !== void 0 ? _ref : void 0
- }), { selectionManager, collection, selectedKey: currentSelectedKey } = state3, lastSelectedKey = (0, import_react179.useRef)(currentSelectedKey);
- return (0, import_react179.useEffect)(() => {
- let selectedKey = currentSelectedKey;
- props.selectedKey == null && (selectionManager.isEmpty || selectedKey == null || !collection.getItem(selectedKey)) && (selectedKey = $76f919a04c5a7d14$var$findDefaultSelectedKey(collection, state3.disabledKeys), selectedKey != null && selectionManager.setSelectedKeys([
- selectedKey
- ])), (selectedKey != null && selectionManager.focusedKey == null || !selectionManager.isFocused && selectedKey !== lastSelectedKey.current) && selectionManager.setFocusedKey(selectedKey), lastSelectedKey.current = selectedKey;
- }), {
- ...state3,
- isDisabled: props.isDisabled || !1
- };
- }
- function $76f919a04c5a7d14$var$findDefaultSelectedKey(collection, disabledKeys) {
- let selectedKey = null;
- if (collection) {
- var _collection_getItem_props, _collection_getItem, _collection_getItem_props1, _collection_getItem1;
- for (selectedKey = collection.getFirstKey(); selectedKey != null && (disabledKeys.has(selectedKey) || !((_collection_getItem = collection.getItem(selectedKey)) === null || _collection_getItem === void 0 || (_collection_getItem_props = _collection_getItem.props) === null || _collection_getItem_props === void 0) && _collection_getItem_props.isDisabled) && selectedKey !== collection.getLastKey(); ) selectedKey = collection.getKeyAfter(selectedKey);
- selectedKey != null && (disabledKeys.has(selectedKey) || !((_collection_getItem1 = collection.getItem(selectedKey)) === null || _collection_getItem1 === void 0 || (_collection_getItem_props1 = _collection_getItem1.props) === null || _collection_getItem_props1 === void 0) && _collection_getItem_props1.isDisabled) && selectedKey === collection.getLastKey() && (selectedKey = collection.getFirstKey());
- }
- return selectedKey;
- }
-
- // src/components/components/Tabs/TabsView.tsx
- init_theming();
- var useTabsState = ({
- defaultSelected,
- onSelectionChange,
- selected,
- tabs
- }) => $76f919a04c5a7d14$export$4ba071daf4e486({
- children: tabs.map(({ children: Children10, id, "aria-label": ariaLabel, title: Title6 }) => import_react180.default.createElement($c1d7fb2ec91bae71$export$6d08773d2e66f8f2, { key: id, "aria-label": ariaLabel, title: typeof Title6 == "function" ? import_react180.default.createElement(Title6, null) : Title6 }, typeof Children10 == "function" ? import_react180.default.createElement(Children10, null) : Children10)),
- disabledKeys: tabs.filter(({ isDisabled: isDisabled3 }) => isDisabled3).map(({ id }) => id),
- defaultSelectedKey: defaultSelected,
- onSelectionChange: (key) => onSelectionChange?.(`${key}`),
- selectedKey: selected
- }), Container5 = styled.div({
- display: "flex",
- flexDirection: "column",
- height: "100%"
- }), FlexTabPanel = styled(TabPanel)(() => ({
- flex: 1
- })), FlexTabList = styled(TabList)(({ $simulatedGap }) => ({
- flex: "1 1 0%",
- '&[data-show-scroll-buttons="true"]': { marginInlineEnd: $simulatedGap }
- })), TabsView = ({
- backgroundColor,
- barInnerStyle,
- defaultSelected,
- emptyState,
- onSelectionChange,
- panelProps = {},
- selected,
- showToolsWhenEmpty,
- tabs,
- tools,
- ...props
- }) => {
- let state3 = useTabsState({
- defaultSelected,
- onSelectionChange,
- selected,
- tabs
- }), EmptyContent = emptyState ?? import_react180.default.createElement(EmptyTabContent, { title: "Nothing found" }), hasContent = tabs.length > 0;
- return !showToolsWhenEmpty && !hasContent ? EmptyContent : import_react180.default.createElement(Container5, { ...props }, import_react180.default.createElement(
- Bar,
- {
- scrollable: !1,
- border: !0,
- backgroundColor,
- innerStyle: {
- display: "flex",
- justifyContent: "space-between",
- paddingInlineStart: 0,
- paddingInlineEnd: 10,
- // A11y: the tools must be before the tab list in the DOM for correct tab order.
- // This lets us control order without adding a wrapper div, leading to better flex
- // behavior on tools for our callees (e.g. containerType: 'inline-size' in a11y-addon).
- "> *:not(:last-child)": {
- order: 2
- },
- "> *": {
- flexShrink: 0
- },
- ...barInnerStyle,
- gap: 0
- }
- },
- tools,
- hasContent ? import_react180.default.createElement(FlexTabList, { state: state3, $simulatedGap: barInnerStyle?.gap ?? 6 }) : import_react180.default.createElement("div", null)
- ), hasContent ? import_react180.default.createElement(FlexTabPanel, { state: state3, ...panelProps }) : EmptyContent);
- };
-
- // src/components/components/Tabs/StatelessTabList.tsx
- var import_react182 = __toESM(require_react(), 1);
-
- // ../../node_modules/react-aria-components/dist/Tabs.mjs
- var import_react181 = __toESM(require_react(), 1), $5e8ad37a45e1c704$export$cfa7aa87c26e7d1f = (0, import_react181.createContext)(null), $5e8ad37a45e1c704$export$364712098d2aa57c = (0, import_react181.createContext)(null), $5e8ad37a45e1c704$export$b2539bed5023c21c = (0, import_react181.forwardRef)(function(props, ref) {
- [props, ref] = $64fa3d84918910a7$export$29f1550f4b0d4415(props, ref, $5e8ad37a45e1c704$export$cfa7aa87c26e7d1f);
- let { children, orientation = "horizontal" } = props;
- return children = (0, import_react181.useMemo)(() => typeof children == "function" ? children({
- orientation,
- defaultChildren: null
- }) : children, [
- children,
- orientation
- ]), import_react181.default.createElement($e1995378a142960e$export$bf788dd355e3a401, {
- content: children
- }, (collection) => import_react181.default.createElement($5e8ad37a45e1c704$var$TabsInner, {
- props,
- collection,
- tabsRef: ref
- }));
- });
- function $5e8ad37a45e1c704$var$TabsInner({ props, tabsRef: ref, collection }) {
- let { orientation = "horizontal" } = props, state3 = $76f919a04c5a7d14$export$4ba071daf4e486({
- ...props,
- collection,
- children: void 0
- }), { focusProps, isFocused, isFocusVisible } = $f7dceffc5ad7768b$export$4e328f61c538687f({
- within: !0
- }), values = (0, import_react181.useMemo)(() => ({
- orientation,
- isFocusWithin: isFocused,
- isFocusVisible
- }), [
- orientation,
- isFocused,
- isFocusVisible
- ]), renderProps = $64fa3d84918910a7$export$4d86445c2cf5e3({
- ...props,
- defaultClassName: "react-aria-Tabs",
- values
- }), DOMProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, {
- global: !0
- });
- return import_react181.default.createElement("div", {
- ...$3ef42575df84b30b$export$9d1611c77c2fe928(DOMProps, renderProps, focusProps),
- ref,
- slot: props.slot || void 0,
- "data-focused": isFocused || void 0,
- "data-orientation": orientation,
- "data-focus-visible": isFocusVisible || void 0,
- "data-disabled": state3.isDisabled || void 0
- }, import_react181.default.createElement($64fa3d84918910a7$export$2881499e37b75b9a, {
- values: [
- [
- $5e8ad37a45e1c704$export$cfa7aa87c26e7d1f,
- props
- ],
- [
- $5e8ad37a45e1c704$export$364712098d2aa57c,
- state3
- ]
- ]
- }, renderProps.children));
- }
- var $5e8ad37a45e1c704$export$e51a686c67fdaa2d = (0, import_react181.forwardRef)(function(props, ref) {
- return (0, import_react181.useContext)($5e8ad37a45e1c704$export$364712098d2aa57c) ? import_react181.default.createElement($5e8ad37a45e1c704$var$TabListInner, {
- props,
- forwardedRef: ref
- }) : import_react181.default.createElement($e1995378a142960e$export$fb8073518f34e6ec, props);
- });
- function $5e8ad37a45e1c704$var$TabListInner({ props, forwardedRef: ref }) {
- let state3 = (0, import_react181.useContext)($5e8ad37a45e1c704$export$364712098d2aa57c), { CollectionRoot } = (0, import_react181.useContext)($7135fc7d473fd974$export$4feb769f8ddf26c5), { orientation = "horizontal", keyboardActivation = "automatic" } = $64fa3d84918910a7$export$fabf2dc03a41866e($5e8ad37a45e1c704$export$cfa7aa87c26e7d1f), objectRef = $df56164dff5785e2$export$4338b53315abf666(ref), { tabListProps } = $58d314389b21fa3f$export$773e389e644c5874({
- ...props,
- orientation,
- keyboardActivation
- }, state3, objectRef), renderProps = $64fa3d84918910a7$export$4d86445c2cf5e3({
- ...props,
- children: null,
- defaultClassName: "react-aria-TabList",
- values: {
- orientation,
- state: state3
- }
- }), DOMProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, {
- global: !0
- });
- return delete DOMProps.id, import_react181.default.createElement("div", {
- ...$3ef42575df84b30b$export$9d1611c77c2fe928(DOMProps, renderProps, tabListProps),
- ref: objectRef,
- "data-orientation": orientation || void 0
- }, import_react181.default.createElement(CollectionRoot, {
- collection: state3.collection,
- persistedKeys: $7135fc7d473fd974$export$90e00781bc59d8f9(state3.selectionManager.focusedKey)
- }));
- }
- var $5e8ad37a45e1c704$var$TabItemNode = class extends $23b9f4fcf0fe224b$export$d68d59712b04d9d1 {
- };
- $5e8ad37a45e1c704$var$TabItemNode.type = "item";
- var $5e8ad37a45e1c704$export$3e41faf802a29e71 = $e1995378a142960e$export$18af5c7a9e9b3664($5e8ad37a45e1c704$var$TabItemNode, (props, forwardedRef, item) => {
- let state3 = (0, import_react181.useContext)($5e8ad37a45e1c704$export$364712098d2aa57c), ref = $df56164dff5785e2$export$4338b53315abf666(forwardedRef), { tabProps, isSelected, isDisabled: isDisabled3, isPressed } = $0175d55c2a017ebc$export$fdf4756d5b8ef90a({
- key: item.key,
- ...props
- }, state3, ref), { focusProps, isFocused, isFocusVisible } = $f7dceffc5ad7768b$export$4e328f61c538687f(), { hoverProps, isHovered } = $6179b936705e76d3$export$ae780daf29e6d456({
- isDisabled: isDisabled3,
- onHoverStart: props.onHoverStart,
- onHoverEnd: props.onHoverEnd,
- onHoverChange: props.onHoverChange
- }), renderProps = $64fa3d84918910a7$export$4d86445c2cf5e3({
- ...props,
- id: void 0,
- children: item.rendered,
- defaultClassName: "react-aria-Tab",
- values: {
- isSelected,
- isDisabled: isDisabled3,
- isFocused,
- isFocusVisible,
- isPressed,
- isHovered
- }
- }), ElementType = item.props.href ? "a" : "div", DOMProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, {
- global: !0
- });
- return delete DOMProps.id, delete DOMProps.onClick, import_react181.default.createElement(ElementType, {
- ...$3ef42575df84b30b$export$9d1611c77c2fe928(DOMProps, renderProps, tabProps, focusProps, hoverProps),
- ref,
- "data-selected": isSelected || void 0,
- "data-disabled": isDisabled3 || void 0,
- "data-focused": isFocused || void 0,
- "data-focus-visible": isFocusVisible || void 0,
- "data-pressed": isPressed || void 0,
- "data-hovered": isHovered || void 0
- }, renderProps.children);
- }), $5e8ad37a45e1c704$export$3d96ec278d3efce4 = $f39a9eba43920ace$export$86427a43e3e48ebb(function(props, forwardedRef) {
- let state3 = (0, import_react181.useContext)($5e8ad37a45e1c704$export$364712098d2aa57c), ref = $df56164dff5785e2$export$4338b53315abf666(forwardedRef), { id, ...otherProps } = props, { tabPanelProps } = $34bce698202e07cb$export$fae0121b5afe572d(props, state3, ref), { focusProps, isFocused, isFocusVisible } = $f7dceffc5ad7768b$export$4e328f61c538687f(), isSelected = state3.selectedKey === props.id, renderProps = $64fa3d84918910a7$export$4d86445c2cf5e3({
- ...props,
- defaultClassName: "react-aria-TabPanel",
- values: {
- isFocused,
- isFocusVisible,
- // @ts-ignore - compatibility with React < 19
- isInert: $cdc5a6778b766db2$export$a9d04c5684123369(!isSelected),
- state: state3
- }
- });
- if (!isSelected && !props.shouldForceMount) return null;
- let DOMProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(otherProps, {
- global: !0
- });
- delete DOMProps.id;
- let domProps = isSelected ? $3ef42575df84b30b$export$9d1611c77c2fe928(DOMProps, tabPanelProps, focusProps, renderProps) : renderProps;
- return import_react181.default.createElement("div", {
- ...domProps,
- ref,
- "data-focused": isFocused || void 0,
- "data-focus-visible": isFocusVisible || void 0,
- // @ts-ignore
- inert: $cdc5a6778b766db2$export$a9d04c5684123369(!isSelected || props.inert),
- "data-inert": isSelected ? void 0 : "true"
- }, import_react181.default.createElement($64fa3d84918910a7$export$2881499e37b75b9a, {
- values: [
- [
- $5e8ad37a45e1c704$export$cfa7aa87c26e7d1f,
- null
- ],
- [
- $5e8ad37a45e1c704$export$364712098d2aa57c,
- null
- ]
- ]
- }, import_react181.default.createElement($7135fc7d473fd974$export$4feb769f8ddf26c5.Provider, {
- value: $7135fc7d473fd974$export$a164736487e3f0ae
- }, renderProps.children)));
- });
-
- // src/components/components/Tabs/StatelessTabList.tsx
- init_theming();
- var Root2 = styled.div({
- display: "flex",
- alignItems: "center",
- flexShrink: 0,
- position: "relative",
- overflow: "hidden"
- }), ScrollContainer2 = styled.div({
- display: "flex",
- overflowX: "auto",
- scrollbarWidth: "none",
- msOverflowStyle: "none",
- WebkitScrollbar: "none",
- scrollSnapType: "x mandatory",
- flex: 1,
- "&::-webkit-scrollbar": {
- display: "none"
- }
- }), StyledTabList2 = styled($5e8ad37a45e1c704$export$e51a686c67fdaa2d)({
- display: "flex",
- flexShrink: 0
- }), SCROLL_BUTTON_WIDTH2 = 28, ScrollButtonContainer2 = styled.div(({ $showStartBorder, $showEndBorder, theme: theme3 }) => ({
- flexShrink: 0,
- display: "flex",
- alignItems: "center",
- justifyContent: "center",
- padding: 6,
- boxShadow: $showStartBorder ? `inset 1px 0 0 ${theme3.appBorderColor}` : $showEndBorder ? `inset -1px 0 0 ${theme3.appBorderColor}` : "none"
- })), ScrollButton2 = styled(Button)({
- flexShrink: 0,
- paddingInline: 0,
- width: 16
- }), StatelessTabList = ({ children, ...rest }) => {
- let containerRef = (0, import_react182.useRef)(null), scrollContainerRef = (0, import_react182.useRef)(null), [showScrollButtons, setShowScrollButtons] = (0, import_react182.useState)(!1), [canScrollLeft, setCanScrollLeft] = (0, import_react182.useState)(!1), [canScrollRight, setCanScrollRight] = (0, import_react182.useState)(!1), updateScrollState = (0, import_react182.useCallback)(() => {
- let scrollContainer = scrollContainerRef.current, container = containerRef.current;
- if (!scrollContainer || !container)
- return;
- let { scrollLeft, scrollWidth, clientWidth } = scrollContainer, availableWidth = container.clientWidth - (showScrollButtons ? SCROLL_BUTTON_WIDTH2 * 2 : 0), needsScrolling = scrollWidth > availableWidth;
- setShowScrollButtons(needsScrolling), needsScrolling ? (setCanScrollLeft(scrollLeft > 0), setCanScrollRight(scrollLeft < scrollWidth - clientWidth)) : (setCanScrollLeft(!1), setCanScrollRight(!1));
- }, [showScrollButtons]), throttledUpdateScrollState = (0, import_react182.useCallback)(() => {
- updateScrollState();
- }, [updateScrollState]);
- (0, import_react182.useEffect)(() => {
- let scrollContainer = scrollContainerRef.current;
- if (!scrollContainer || typeof window > "u")
- return;
- scrollContainer.addEventListener("scroll", throttledUpdateScrollState, { passive: !0 });
- let resizeObserver = null;
- typeof ResizeObserver < "u" && (resizeObserver = new ResizeObserver(throttledUpdateScrollState), resizeObserver.observe(scrollContainer));
- let timeoutId = setTimeout(throttledUpdateScrollState, 0);
- return () => {
- clearTimeout(timeoutId), scrollContainer.removeEventListener("scroll", throttledUpdateScrollState), resizeObserver && resizeObserver.disconnect();
- };
- }, [throttledUpdateScrollState]);
- let scroll = (0, import_react182.useCallback)((direction) => {
- let scrollContainer = scrollContainerRef.current, container = containerRef.current;
- if (!scrollContainer || !container || typeof window > "u")
- return;
- let availableWidth = container.clientWidth - SCROLL_BUTTON_WIDTH2 * 2, scrollDistance = direction === "backward" ? -availableWidth : availableWidth;
- typeof scrollContainer.scrollBy == "function" ? scrollContainer.scrollBy({ left: scrollDistance, behavior: "smooth" }) : scrollContainer.scrollLeft += scrollDistance;
- }, []), scrollBackward = (0, import_react182.useCallback)(() => scroll("backward"), [scroll]), scrollForward = (0, import_react182.useCallback)(() => scroll("forward"), [scroll]);
- return import_react182.default.createElement(Root2, { ref: containerRef, className: `tablist ${showScrollButtons ? "tablist-has-scroll" : ""}` }, showScrollButtons && import_react182.default.createElement(ScrollButtonContainer2, { $showEndBorder: canScrollLeft }, import_react182.default.createElement(
- ScrollButton2,
- {
- variant: "ghost",
- padding: "small",
- size: "small",
- ariaLabel: "Scroll backward",
- disabled: !canScrollLeft,
- onClick: scrollBackward,
- tabIndex: -1
- },
- import_react182.default.createElement(ChevronSmallLeftIcon, null)
- )), import_react182.default.createElement(ScrollContainer2, { ref: scrollContainerRef }, import_react182.default.createElement(StyledTabList2, { ...rest }, children)), showScrollButtons && import_react182.default.createElement(ScrollButtonContainer2, { $showStartBorder: canScrollRight }, import_react182.default.createElement(
- ScrollButton2,
- {
- variant: "ghost",
- padding: "small",
- size: "small",
- ariaLabel: "Scroll forward",
- disabled: !canScrollRight,
- onClick: scrollForward,
- tabIndex: -1
- },
- import_react182.default.createElement(ChevronSmallRightIcon, null)
- )));
- };
-
- // src/components/components/Tabs/StatelessTabPanel.tsx
- var import_react183 = __toESM(require_react(), 1);
- init_theming();
- init_ScrollArea();
- var Root3 = styled($5e8ad37a45e1c704$export$3d96ec278d3efce4)({
- overflowY: "hidden",
- height: "100%",
- display: "block",
- '&[inert="true"]': { display: "none" }
- }), StatelessTabPanel = ({
- children,
- hasScrollbar = !0,
- name,
- ...rest
- }) => import_react183.default.createElement(Root3, { ...rest, shouldForceMount: !0, id: name }, hasScrollbar ? import_react183.default.createElement(ScrollArea2, { vertical: !0 }, children) : children);
-
- // src/components/components/Tabs/StatelessTabsView.tsx
- var import_react184 = __toESM(require_react(), 1);
- init_theming();
- var Container6 = styled($5e8ad37a45e1c704$export$b2539bed5023c21c)(({ $simulatedGap }) => ({
- display: "flex",
- flexDirection: "column",
- height: "100%",
- ".tablist": {
- flex: "1 1 100%"
- },
- ".tablist.tablist-has-scroll": {
- marginInlineEnd: $simulatedGap
- },
- "& > :not(:first-child)": { flex: 1 }
- })), StatelessTabsView = ({
- backgroundColor,
- barInnerStyle,
- children,
- defaultSelected,
- emptyState,
- onSelectionChange,
- selected,
- showToolsWhenEmpty,
- tools,
- ...props
- }) => {
- let EmptyContent = emptyState ?? import_react184.default.createElement(EmptyTabContent, { title: "Nothing found" }), [tabListChild, ...tabPanelChildren] = import_react184.default.Children.toArray(children), hasContent = tabPanelChildren && tabPanelChildren.length > 0;
- return !showToolsWhenEmpty && !hasContent ? EmptyContent : import_react184.default.createElement(
- Container6,
- {
- ...props,
- $simulatedGap: barInnerStyle?.gap ?? 6,
- defaultSelectedKey: defaultSelected,
- onSelectionChange: (k) => onSelectionChange?.(k ? `${k}` : ""),
- selectedKey: selected
- },
- import_react184.default.createElement(
- Bar,
- {
- scrollable: !1,
- border: !0,
- backgroundColor,
- innerStyle: {
- display: "flex",
- justifyContent: "space-between",
- paddingInlineStart: 0,
- paddingInlineEnd: 10,
- // A11y: the tools must be before the tab list in the DOM for correct tab order.
- // This lets us control order without adding a wrapper div, leading to better flex
- // behavior on tools for our callees (e.g. containerType: 'inline-size' in a11y-addon).
- "> *:not(:last-child)": {
- order: 2
- },
- "> *": {
- flexShrink: 0
- },
- ...barInnerStyle,
- gap: 0
- }
- },
- tools,
- hasContent ? tabListChild : import_react184.default.createElement("div", null)
- ),
- hasContent ? tabPanelChildren : EmptyContent
- );
- };
-
- // src/components/components/Tabs/StatelessTab.tsx
- var import_react185 = __toESM(require_react(), 1);
- init_theming();
- var StyledTab = styled($5e8ad37a45e1c704$export$3e41faf802a29e71)(({ theme: theme3 }) => ({
- whiteSpace: "normal",
- display: "inline-flex",
- overflow: "hidden",
- verticalAlign: "top",
- justifyContent: "center",
- alignItems: "center",
- textAlign: "center",
- textDecoration: "none",
- scrollSnapAlign: "start",
- "&:empty": {
- display: "none"
- },
- "&[hidden]": {
- display: "none"
- },
- padding: "0 15px",
- transition: "color 0.2s linear, border-bottom-color 0.2s linear",
- height: 40,
- lineHeight: "12px",
- cursor: "pointer",
- background: "transparent",
- border: "0 solid transparent",
- borderTop: "3px solid transparent",
- borderBottom: "3px solid transparent",
- fontWeight: "bold",
- fontSize: 13,
- "&:focus-visible": {
- outline: "0 none",
- boxShadow: `inset 0 0 0 2px ${theme3.barSelectedColor}`
- },
- color: theme3.barTextColor,
- borderBottomColor: "transparent",
- "&:hover": {
- color: theme3.barHoverColor
- },
- "&[data-selected]": {
- color: theme3.barSelectedColor,
- borderBottomColor: theme3.barSelectedColor
- }
- })), StatelessTab = ({ name, ...props }) => import_react185.default.createElement(StyledTab, { id: name, ...props });
-
- // src/components/brand/StorybookLogo.tsx
- var import_react186 = __toESM(require_react(), 1), StorybookLogo = ({ alt, ...props }) => import_react186.default.createElement("svg", { width: "200px", height: "40px", viewBox: "0 0 200 40", ...props, role: "img" }, alt ? import_react186.default.createElement("title", null, alt) : null, import_react186.default.createElement("defs", null, import_react186.default.createElement(
- "path",
- {
- d: "M1.2 36.9L0 3.9c0-1.1.8-2 1.9-2.1l28-1.8a2 2 0 0 1 2.2 1.9 2 2 0 0 1 0 .1v36a2 2 0 0 1-2 2 2 2 0 0 1-.1 0L3.2 38.8a2 2 0 0 1-2-2z",
- id: "a"
- }
- )), import_react186.default.createElement("g", { fill: "none", fillRule: "evenodd" }, import_react186.default.createElement(
- "path",
- {
- d: "M53.3 31.7c-1.7 0-3.4-.3-5-.7-1.5-.5-2.8-1.1-3.9-2l1.6-3.5c2.2 1.5 4.6 2.3 7.3 2.3 1.5 0 2.5-.2 3.3-.7.7-.5 1.1-1 1.1-1.9 0-.7-.3-1.3-1-1.7s-2-.8-3.7-1.2c-2-.4-3.6-.9-4.8-1.5-1.1-.5-2-1.2-2.6-2-.5-1-.8-2-.8-3.2 0-1.4.4-2.6 1.2-3.6.7-1.1 1.8-2 3.2-2.6 1.3-.6 2.9-.9 4.7-.9 1.6 0 3.1.3 4.6.7 1.5.5 2.7 1.1 3.5 2l-1.6 3.5c-2-1.5-4.2-2.3-6.5-2.3-1.3 0-2.3.2-3 .8-.8.5-1.2 1.1-1.2 2 0 .5.2 1 .5 1.3.2.3.7.6 1.4.9l2.9.8c2.9.6 5 1.4 6.2 2.4a5 5 0 0 1 2 4.2 6 6 0 0 1-2.5 5c-1.7 1.2-4 1.9-7 1.9zm21-3.6l1.4-.1-.2 3.5-1.9.1c-2.4 0-4.1-.5-5.2-1.5-1.1-1-1.6-2.7-1.6-4.8v-6h-3v-3.6h3V11h4.8v4.6h4v3.6h-4v6c0 1.8.9 2.8 2.6 2.8zm11.1 3.5c-1.6 0-3-.3-4.3-1a7 7 0 0 1-3-2.8c-.6-1.3-1-2.7-1-4.4 0-1.6.4-3 1-4.3a7 7 0 0 1 3-2.8c1.2-.7 2.7-1 4.3-1 1.7 0 3.2.3 4.4 1a7 7 0 0 1 3 2.8c.6 1.2 1 2.7 1 4.3 0 1.7-.4 3.1-1 4.4a7 7 0 0 1-3 2.8c-1.2.7-2.7 1-4.4 1zm0-3.6c2.4 0 3.6-1.6 3.6-4.6 0-1.5-.3-2.6-1-3.4a3.2 3.2 0 0 0-2.6-1c-2.3 0-3.5 1.4-3.5 4.4 0 3 1.2 4.6 3.5 4.6zm21.7-8.8l-2.7.3c-1.3.2-2.3.5-2.8 1.2-.6.6-.9 1.4-.9 2.5v8.2H96V15.7h4.6v2.6c.8-1.8 2.5-2.8 5-3h1.3l.3 4zm14-3.5h4.8L116.4 37h-4.9l3-6.6-6.4-14.8h5l4 10 4-10zm16-.4c1.4 0 2.6.3 3.6 1 1 .6 1.9 1.6 2.5 2.8.6 1.2.9 2.7.9 4.3 0 1.6-.3 3-1 4.3a6.9 6.9 0 0 1-2.4 2.9c-1 .7-2.2 1-3.6 1-1 0-2-.2-3-.7-.8-.4-1.5-1-2-1.9v2.4h-4.7V8.8h4.8v9c.5-.8 1.2-1.4 2-1.9.9-.4 1.8-.6 3-.6zM135.7 28c1.1 0 2-.4 2.6-1.2.6-.8 1-2 1-3.4 0-1.5-.4-2.5-1-3.3s-1.5-1.1-2.6-1.1-2 .3-2.6 1.1c-.6.8-1 2-1 3.3 0 1.5.4 2.6 1 3.4.6.8 1.5 1.2 2.6 1.2zm18.9 3.6c-1.7 0-3.2-.3-4.4-1a7 7 0 0 1-3-2.8c-.6-1.3-1-2.7-1-4.4 0-1.6.4-3 1-4.3a7 7 0 0 1 3-2.8c1.2-.7 2.7-1 4.4-1 1.6 0 3 .3 4.3 1a7 7 0 0 1 3 2.8c.6 1.2 1 2.7 1 4.3 0 1.7-.4 3.1-1 4.4a7 7 0 0 1-3 2.8c-1.2.7-2.7 1-4.3 1zm0-3.6c2.3 0 3.5-1.6 3.5-4.6 0-1.5-.3-2.6-1-3.4a3.2 3.2 0 0 0-2.5-1c-2.4 0-3.6 1.4-3.6 4.4 0 3 1.2 4.6 3.6 4.6zm18 3.6c-1.7 0-3.2-.3-4.4-1a7 7 0 0 1-3-2.8c-.6-1.3-1-2.7-1-4.4 0-1.6.4-3 1-4.3a7 7 0 0 1 3-2.8c1.2-.7 2.7-1 4.4-1 1.6 0 3 .3 4.4 1a7 7 0 0 1 2.9 2.8c.6 1.2 1 2.7 1 4.3 0 1.7-.4 3.1-1 4.4a7 7 0 0 1-3 2.8c-1.2.7-2.7 1-4.3 1zm0-3.6c2.3 0 3.5-1.6 3.5-4.6 0-1.5-.3-2.6-1-3.4a3.2 3.2 0 0 0-2.5-1c-2.4 0-3.6 1.4-3.6 4.4 0 3 1.2 4.6 3.6 4.6zm27.4 3.4h-6l-6-7v7h-4.8V8.8h4.9v13.6l5.8-6.7h5.7l-6.6 7.5 7 8.2z",
- fill: "currentColor"
- }
- ), import_react186.default.createElement("mask", { id: "b", fill: "#fff" }, import_react186.default.createElement("use", { xlinkHref: "#a" })), import_react186.default.createElement("use", { fill: "#FF4785", fillRule: "nonzero", xlinkHref: "#a" }), import_react186.default.createElement(
- "path",
- {
- d: "M23.7 5L24 .2l3.9-.3.1 4.8a.3.3 0 0 1-.5.2L26 3.8l-1.7 1.4a.3.3 0 0 1-.5-.3zm-5 10c0 .9 5.3.5 6 0 0-5.4-2.8-8.2-8-8.2-5.3 0-8.2 2.8-8.2 7.1 0 7.4 10 7.6 10 11.6 0 1.2-.5 1.9-1.8 1.9-1.6 0-2.2-.9-2.1-3.6 0-.6-6.1-.8-6.3 0-.5 6.7 3.7 8.6 8.5 8.6 4.6 0 8.3-2.5 8.3-7 0-7.9-10.2-7.7-10.2-11.6 0-1.6 1.2-1.8 2-1.8.6 0 2 0 1.9 3z",
- fill: "#FFF",
- fillRule: "nonzero",
- mask: "url(#b)"
- }
- )));
-
- // src/components/brand/StorybookIcon.tsx
- var import_react187 = __toESM(require_react(), 1), StorybookIcon3 = (props) => import_react187.default.createElement("svg", { viewBox: "0 0 64 64", ...props }, import_react187.default.createElement("title", null, "Storybook icon"), import_react187.default.createElement("g", { id: "Artboard", stroke: "none", strokeWidth: "1", fill: "none", fillRule: "evenodd" }, import_react187.default.createElement(
- "path",
- {
- d: "M8.04798541,58.7875918 L6.07908839,6.32540407 C6.01406344,4.5927838 7.34257463,3.12440831 9.07303814,3.01625434 L53.6958037,0.227331489 C55.457209,0.117243658 56.974354,1.45590096 57.0844418,3.21730626 C57.0885895,3.28366922 57.0906648,3.35014546 57.0906648,3.41663791 L57.0906648,60.5834697 C57.0906648,62.3483119 55.6599776,63.7789992 53.8951354,63.7789992 C53.847325,63.7789992 53.7995207,63.7779262 53.7517585,63.775781 L11.0978899,61.8600599 C9.43669044,61.7854501 8.11034889,60.4492961 8.04798541,58.7875918 Z",
- id: "path-1",
- fill: "#FF4785",
- fillRule: "nonzero"
- }
- ), import_react187.default.createElement(
- "path",
- {
- d: "M35.9095005,24.1768792 C35.9095005,25.420127 44.2838488,24.8242707 45.4080313,23.9509748 C45.4080313,15.4847538 40.8652557,11.0358878 32.5466666,11.0358878 C24.2280775,11.0358878 19.5673077,15.553972 19.5673077,22.3311017 C19.5673077,34.1346028 35.4965208,34.3605071 35.4965208,40.7987804 C35.4965208,42.606015 34.6115646,43.6790606 32.6646607,43.6790606 C30.127786,43.6790606 29.1248356,42.3834613 29.2428298,37.9783269 C29.2428298,37.0226907 19.5673077,36.7247626 19.2723223,37.9783269 C18.5211693,48.6535354 25.1720308,51.7326752 32.7826549,51.7326752 C40.1572906,51.7326752 45.939005,47.8018145 45.939005,40.6858282 C45.939005,28.035186 29.7738035,28.3740425 29.7738035,22.1051974 C29.7738035,19.5637737 31.6617103,19.2249173 32.7826549,19.2249173 C33.9625966,19.2249173 36.0864917,19.4328883 35.9095005,24.1768792 Z",
- id: "path9_fill-path",
- fill: "#FFFFFF",
- fillRule: "nonzero"
- }
- ), import_react187.default.createElement(
- "path",
- {
- d: "M44.0461638,0.830433986 L50.1874092,0.446606143 L50.443532,7.7810017 C50.4527198,8.04410717 50.2468789,8.26484453 49.9837734,8.27403237 C49.871115,8.27796649 49.7607078,8.24184808 49.6721567,8.17209069 L47.3089847,6.3104681 L44.5110468,8.43287463 C44.3012992,8.591981 44.0022839,8.55092814 43.8431776,8.34118051 C43.7762017,8.25288717 43.742082,8.14401677 43.7466857,8.03329059 L44.0461638,0.830433986 Z",
- id: "Path",
- fill: "#FFFFFF"
- }
- )));
-
- // src/components/components/Loader/Loader.tsx
- var import_react188 = __toESM(require_react(), 1);
- init_polished_esm();
- init_theming();
-
- // src/components/components/shared/animation.ts
- init_theming();
- var rotate3602 = keyframes`
- from {
- transform: rotate(0deg);
- }
- to {
- transform: rotate(360deg);
- }
- `;
-
- // src/components/components/Loader/Loader.tsx
- var LoaderWrapper = styled.div(({ size = 32 }) => ({
- borderRadius: "50%",
- cursor: "progress",
- display: "inline-block",
- overflow: "hidden",
- position: "absolute",
- transition: "all 200ms ease-out",
- verticalAlign: "top",
- top: "50%",
- left: "50%",
- marginTop: -(size / 2),
- marginLeft: -(size / 2),
- height: size,
- width: size,
- zIndex: 4,
- borderWidth: 2,
- borderStyle: "solid",
- borderColor: "rgba(97, 97, 97, 0.29)",
- borderTopColor: "rgb(100,100,100)",
- animation: `${rotate3602} 0.7s linear infinite`,
- mixBlendMode: "difference"
- })), ProgressWrapper = styled.div({
- position: "absolute",
- display: "flex",
- flexDirection: "column",
- justifyContent: "center",
- alignItems: "center",
- width: "100%",
- height: "100%"
- }), ProgressTrack = styled.div(({ theme: theme3 }) => ({
- position: "relative",
- width: "80%",
- marginBottom: "0.75rem",
- maxWidth: 300,
- height: 5,
- borderRadius: 5,
- background: curriedTransparentize$1(0.8, theme3.color.secondary),
- overflow: "hidden",
- cursor: "progress"
- })), ProgressBar2 = styled.div(({ theme: theme3 }) => ({
- position: "absolute",
- top: 0,
- left: 0,
- height: "100%",
- background: theme3.color.secondary
- })), ProgressMessage = styled.div(({ theme: theme3 }) => ({
- minHeight: "2em",
- fontSize: `${theme3.typography.size.s1}px`,
- color: theme3.textMutedColor
- })), ErrorIcon = styled(LightningOffIcon)(({ theme: theme3 }) => ({
- width: 20,
- height: 20,
- marginBottom: "0.5rem",
- color: theme3.textMutedColor
- })), ellipsis = keyframes`
- from { content: "..." }
- 33% { content: "." }
- 66% { content: ".." }
- to { content: "..." }
- `, Ellipsis = styled.span({
- "&::after": {
- content: "'...'",
- animation: `${ellipsis} 1s linear infinite`,
- animationDelay: "1s",
- display: "inline-block",
- width: "1em",
- height: "auto"
- }
- }), Loader = ({ progress, error, size, ...props }) => {
- if (error)
- return import_react188.default.createElement(ProgressWrapper, { "aria-label": error.toString(), "aria-live": "polite", role: "status", ...props }, import_react188.default.createElement(ErrorIcon, null), import_react188.default.createElement(ProgressMessage, null, error.message));
- if (progress) {
- let { value, modules } = progress, { message } = progress;
- return modules && (message += ` ${modules.complete} / ${modules.total} modules`), import_react188.default.createElement(
- ProgressWrapper,
- {
- "aria-label": "Content is loading...",
- "aria-live": "polite",
- "aria-valuemin": 0,
- "aria-valuemax": 100,
- "aria-valuenow": value * 100,
- "aria-valuetext": message,
- role: "progressbar",
- ...props
- },
- import_react188.default.createElement(ProgressTrack, null, import_react188.default.createElement(ProgressBar2, { style: { width: `${value * 100}%` } })),
- import_react188.default.createElement(ProgressMessage, null, message, value < 1 && import_react188.default.createElement(Ellipsis, { key: message }))
- );
- }
- return import_react188.default.createElement(
- LoaderWrapper,
- {
- "aria-label": "Content is loading...",
- "aria-live": "polite",
- role: "status",
- size,
- ...props
- }
- );
- };
-
- // src/components/components/ProgressSpinner/ProgressSpinner.tsx
- var import_react189 = __toESM(require_react(), 1);
- init_theming();
- var XMLNS = "http://www.w3.org/2000/svg", rotate = keyframes({
- "0%": {
- transform: "rotate(0deg)"
- },
- "100%": {
- transform: "rotate(360deg)"
- }
- }), Wrapper8 = styled.div(({ size }) => ({
- display: "inline-flex",
- alignItems: "center",
- justifyContent: "center",
- position: "relative",
- minWidth: size,
- minHeight: size
- })), Circle = styled.svg(
- ({ size, width }) => ({
- position: "absolute",
- width: `${size}px!important`,
- height: `${size}px!important`,
- transform: "rotate(-90deg)",
- circle: {
- r: (size - Math.ceil(width)) / 2,
- cx: size / 2,
- cy: size / 2,
- opacity: 0.15,
- fill: "transparent",
- stroke: "currentColor",
- strokeWidth: width,
- strokeLinecap: "round",
- strokeDasharray: Math.PI * (size - Math.ceil(width))
- }
- }),
- ({ progress }) => progress && {
- circle: {
- opacity: 0.75
- }
- },
- ({ spinner }) => spinner && {
- animation: `${rotate} 1s linear infinite`,
- circle: {
- opacity: 0.25
- }
- }
- ), ProgressSpinner = ({
- percentage = void 0,
- running = !0,
- size = 24,
- width = 1.5,
- children = null,
- ...props
- }) => typeof percentage == "number" ? import_react189.default.createElement(Wrapper8, { size, ...props }, children, import_react189.default.createElement(Circle, { size, width, xmlns: XMLNS }, import_react189.default.createElement("circle", null)), running && import_react189.default.createElement(Circle, { size, width, xmlns: XMLNS, spinner: !0 }, import_react189.default.createElement("circle", { strokeDashoffset: Math.PI * (size - Math.ceil(width)) * (1 - percentage / 100) })), import_react189.default.createElement(Circle, { size, width, xmlns: XMLNS, progress: !0 }, import_react189.default.createElement("circle", { strokeDashoffset: Math.PI * (size - Math.ceil(width)) * (1 - percentage / 100) }))) : import_react189.default.createElement(Wrapper8, { size, ...props }, children);
-
- // src/components/components/utils/getStoryHref.ts
- init_client_logger();
- function parseQuery(queryString) {
- let query = {}, pairs = queryString.split("&");
- for (let i = 0; i < pairs.length; i++) {
- let pair = pairs[i].split("=");
- query[decodeURIComponent(pair[0])] = decodeURIComponent(pair[1] || "");
- }
- return query;
- }
- var getStoryHref = (baseUrl, storyId, additionalParams = {}) => {
- deprecate(
- "getStoryHref is deprecated and will be removed in Storybook 11, use the api.getStoryHrefs method instead"
- );
- let [url, paramsStr] = baseUrl.split("?"), params = paramsStr ? {
- ...parseQuery(paramsStr),
- ...additionalParams,
- id: storyId
- } : {
- ...additionalParams,
- id: storyId
- };
- return `${url}?${Object.entries(params).map((item) => `${item[0]}=${item[1]}`).join("&")}`;
- };
-
- // src/components/components/clipboard/ClipboardCode.tsx
- var import_react190 = __toESM(require_react(), 1);
- init_theming();
- var Code3 = styled.pre`
- line-height: 18px;
- padding: 11px 1rem;
- white-space: pre-wrap;
- background: rgba(0, 0, 0, 0.05);
- color: ${color.darkest};
- border-radius: 3px;
- margin: 1rem 0;
- width: 100%;
- display: block;
- overflow: hidden;
- font-family: ${typography.fonts.mono};
- font-size: ${typography.size.s2 - 1}px;
- `, ClipboardCode = ({ code, ...props }) => import_react190.default.createElement(Code3, { id: "clipboard-code", ...props }, code);
-
- // src/components/index.ts
- var components2 = components, resetComponents = {};
- Object.keys(components).forEach((key) => {
- resetComponents[key] = (0, import_react191.forwardRef)((props, ref) => (0, import_react191.createElement)(key, { ...props, ref }));
- });
-
- // src/manager/globals/runtime.ts
- init_theming();
- init_create();
- var globalsNameValueMap = {
- react: REACT,
- "react-dom": REACT_DOM,
- "react-dom/client": REACT_DOM_CLIENT,
- "@storybook/icons": dist_exports2,
- "storybook/manager-api": manager_api_exports,
- "storybook/theming": theming_exports,
- "storybook/theming/create": create_exports,
- "storybook/test": test_exports,
- "storybook/internal/channels": channels_exports,
- "storybook/internal/client-logger": client_logger_exports,
- "storybook/internal/components": components_exports,
- "storybook/internal/core-events": core_events_exports,
- "storybook/internal/manager-errors": manager_errors_exports,
- "storybook/internal/router": router_exports,
- "storybook/internal/types": types_exports
- };
-
- // src/manager/utils/prepareForTelemetry.ts
- init_dist();
- var import_browser_dtector = __toESM(require_browser_dtector_umd_min(), 1), browserInfo;
- function getBrowserInfo() {
- return browserInfo || (browserInfo = new import_browser_dtector.default(scope.navigator?.userAgent).getBrowserInfo()), browserInfo;
- }
- var errorMessages = [
- // It's a harmless issue with react-resize-detector that supposedly will be gone when we move to React 18.
- // https://github.com/maslianok/react-resize-detector/issues/45#issuecomment-1500958024
- "ResizeObserver loop completed with undelivered notifications.",
- "ResizeObserver loop limit exceeded",
- // Safari does not seem to provide any helpful info on window.onerror
- // https://bugs.webkit.org/show_bug.cgi?id=132945
- "Script error.",
- // When react-dev-tools is installed as a browser extension, it will log this error
- "React is running in production mode"
- ], shouldSkipError = (error) => errorMessages.includes(error?.message);
- function prepareForTelemetry(originalError) {
- let error = originalError;
- return (originalError.target === scope || originalError.currentTarget === scope || originalError.srcElement === scope) && (error = new Error(originalError.message), error.name = originalError.name || error.name), originalError.fromStorybook || (error = new UncaughtManagerError({ error })), error.browserInfo = getBrowserInfo(), error;
- }
-
- // src/manager/globals-runtime.ts
- globalPackages.forEach((key) => {
- globalThis[globalsNameReferenceMap[key]] = globalsNameValueMap[key];
- });
- var queuedErrors = [];
- globalThis.sendTelemetryError = (error) => {
- if (shouldSkipError(error))
- return;
- let channel = globalThis.__STORYBOOK_ADDONS_CHANNEL__, preparedError = prepareForTelemetry(error);
- if (!channel) {
- queuedErrors.push(preparedError);
- return;
- }
- for (; queuedErrors.length > 0; ) {
- let queuedError = queuedErrors.shift();
- channel.emit(TELEMETRY_ERROR, queuedError);
- }
- channel.emit(TELEMETRY_ERROR, preparedError);
- };
- globalThis.addEventListener("error", (args) => {
- let error = args.error || args;
- globalThis.sendTelemetryError(error);
- });
- globalThis.addEventListener("unhandledrejection", ({ reason }) => {
- globalThis.sendTelemetryError(reason);
- });
|