flipper-plugin-player-ui-devtools
Version:
A Flipper plugin able to interact with an active Player instance
1,366 lines (1,350 loc) • 10.7 MB
JavaScript
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __commonJS = (cb2, mod) => function __require() {
return mod || (0, cb2[__getOwnPropNames(cb2)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
};
var __export = (target, all) => {
for (var name2 in all)
__defProp(target, name2, { get: all[name2], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var __publicField = (obj, key, value) => {
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
return value;
};
// ../../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/node_modules/.aspect_rules_js/ts-nested-error@1.2.1/node_modules/ts-nested-error/build/nested-error.js
var require_nested_error = __commonJS({
"../../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/node_modules/.aspect_rules_js/ts-nested-error@1.2.1/node_modules/ts-nested-error/build/nested-error.js"(exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.toError = exports.NestedError = void 0;
var NestedError5 = class extends Error {
constructor(message, ...innerErrors) {
super(message);
const thisErrorReport = NestedError5.getErrorReport(this);
if (innerErrors.length === 1) {
const innerError = toError(innerErrors[0]);
this.innerErrors = [innerError];
const errReport = NestedError5.getErrorReport(innerError);
this.stack = `${thisErrorReport}
======= INNER ERROR =======
${errReport}`;
return;
}
this.innerErrors = innerErrors.map((err) => toError(err));
const innerErrorReports = this.innerErrors.map((error2, idx) => {
const errReport = NestedError5.getErrorReport(error2);
return `======= INNER ERROR (${idx + 1} of ${innerErrors.length}) =======
${errReport}`;
}).join("\n\n");
this.stack = `${thisErrorReport}
${innerErrorReports}`;
}
get innerError() {
return this.innerErrors.length === 0 ? null : this.innerErrors[0];
}
static rethrow(message) {
return (...errs) => {
throw new this(message, ...errs);
};
}
};
exports.NestedError = NestedError5;
NestedError5.getErrorReport = typeof new Error().stack === "string" ? (err) => err.stack : (err) => `${err.name}: ${err.message}`;
NestedError5.prototype.name = "NestedError";
function toError(err) {
try {
return err instanceof Error ? err : new Error(`Value that is not an instance of Error was thrown: ${err}`);
} catch {
return new Error("Failed to stringify non-instance of Error that was thrown.This is possibly due to the fact that toString() method of the valuedoesn't return a primitive value.");
}
}
exports.toError = toError;
}
});
// ../../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/node_modules/.aspect_rules_js/dlv@1.1.3/node_modules/dlv/dist/dlv.umd.js
var require_dlv_umd = __commonJS({
"../../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/node_modules/.aspect_rules_js/dlv@1.1.3/node_modules/dlv/dist/dlv.umd.js"(exports, module2) {
!function(t5, n) {
"object" == typeof exports && "undefined" != typeof module2 ? module2.exports = function(t6, n2, e, i, o) {
for (n2 = n2.split ? n2.split(".") : n2, i = 0; i < n2.length; i++)
t6 = t6 ? t6[n2[i]] : o;
return t6 === o ? e : t6;
} : "function" == typeof define && define.amd ? define(function() {
return function(t6, n2, e, i, o) {
for (n2 = n2.split ? n2.split(".") : n2, i = 0; i < n2.length; i++)
t6 = t6 ? t6[n2[i]] : o;
return t6 === o ? e : t6;
};
}) : t5.dlv = function(t6, n2, e, i, o) {
for (n2 = n2.split ? n2.split(".") : n2, i = 0; i < n2.length; i++)
t6 = t6 ? t6[n2[i]] : o;
return t6 === o ? e : t6;
};
}(exports);
}
});
// ../../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/node_modules/.aspect_rules_js/timm@1.7.1/node_modules/timm/lib/timm.js
var require_timm = __commonJS({
"../../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/node_modules/.aspect_rules_js/timm@1.7.1/node_modules/timm/lib/timm.js"(exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.clone = clone3;
exports.addLast = addLast3;
exports.addFirst = addFirst;
exports.removeLast = removeLast;
exports.removeFirst = removeFirst;
exports.insert = insert2;
exports.removeAt = removeAt3;
exports.replaceAt = replaceAt;
exports.getIn = getIn;
exports.set = set3;
exports.setIn = setIn9;
exports.update = update;
exports.updateIn = updateIn;
exports.merge = merge3;
exports.mergeDeep = mergeDeep;
exports.mergeIn = mergeIn;
exports.omit = omit7;
exports.addDefaults = addDefaults;
exports.default = void 0;
var INVALID_ARGS = "INVALID_ARGS";
var IS_DEV = true;
function throwStr(msg) {
throw new Error(msg);
}
function getKeysAndSymbols(obj) {
const keys3 = Object.keys(obj);
if (Object.getOwnPropertySymbols) {
return keys3.concat(Object.getOwnPropertySymbols(obj));
}
return keys3;
}
var hasOwnProperty = {}.hasOwnProperty;
function clone3(obj0) {
if (Array.isArray(obj0))
return obj0.slice();
const obj = obj0;
const keys3 = getKeysAndSymbols(obj);
const out = {};
for (let i = 0; i < keys3.length; i++) {
const key = keys3[i];
out[key] = obj[key];
}
return out;
}
function isObject4(o) {
return o != null && typeof o === "object";
}
function addLast3(array, val) {
if (Array.isArray(val))
return array.concat(val);
return array.concat([val]);
}
function addFirst(array, val) {
if (Array.isArray(val))
return val.concat(array);
return [val].concat(array);
}
function removeLast(array) {
if (!array.length)
return array;
return array.slice(0, array.length - 1);
}
function removeFirst(array) {
if (!array.length)
return array;
return array.slice(1);
}
function insert2(array, idx, val) {
return array.slice(0, idx).concat(Array.isArray(val) ? val : [val]).concat(array.slice(idx));
}
function removeAt3(array, idx) {
if (idx >= array.length || idx < 0)
return array;
return array.slice(0, idx).concat(array.slice(idx + 1));
}
function replaceAt(array, idx, newItem) {
if (array[idx] === newItem)
return array;
const len = array.length;
const result = Array(len);
for (let i = 0; i < len; i++) {
result[i] = array[i];
}
result[idx] = newItem;
return result;
}
function getIn(obj, path2) {
if (!Array.isArray(path2)) {
throwStr(IS_DEV ? "A path array should be provided when calling getIn()" : INVALID_ARGS);
}
if (obj == null)
return void 0;
let ptr = obj;
for (let i = 0; i < path2.length; i++) {
const key = path2[i];
ptr = ptr != null ? ptr[key] : void 0;
if (ptr === void 0)
return ptr;
}
return ptr;
}
function set3(obj0, key, val) {
let obj = obj0;
if (obj == null)
obj = typeof key === "number" ? [] : {};
if (obj[key] === val)
return obj;
const obj2 = clone3(obj);
obj2[key] = val;
return obj2;
}
function setIn9(obj, path2, val) {
if (!path2.length)
return val;
return doSetIn(obj, path2, val, 0);
}
function doSetIn(obj, path2, val, idx) {
let newValue;
const key = path2[idx];
if (idx === path2.length - 1) {
newValue = val;
} else {
const nestedObj = isObject4(obj) && isObject4(obj[key]) ? obj[key] : typeof path2[idx + 1] === "number" ? [] : {};
newValue = doSetIn(nestedObj, path2, val, idx + 1);
}
return set3(obj, key, newValue);
}
function update(obj, key, fnUpdate) {
const prevVal = obj == null ? void 0 : obj[key];
const nextVal = fnUpdate(prevVal);
return set3(obj, key, nextVal);
}
function updateIn(obj, path2, fnUpdate) {
const prevVal = getIn(obj, path2);
const nextVal = fnUpdate(prevVal);
return setIn9(obj, path2, nextVal);
}
function merge3(a2, b2, c2, d, e, f, ...rest) {
return rest.length ? doMerge.call(null, false, false, a2, b2, c2, d, e, f, ...rest) : doMerge(false, false, a2, b2, c2, d, e, f);
}
function mergeDeep(a2, b2, c2, d, e, f, ...rest) {
return rest.length ? doMerge.call(null, false, true, a2, b2, c2, d, e, f, ...rest) : doMerge(false, true, a2, b2, c2, d, e, f);
}
function mergeIn(a2, path2, b2, c2, d, e, f, ...rest) {
let prevVal = getIn(a2, path2);
if (prevVal == null)
prevVal = {};
let nextVal;
if (rest.length) {
nextVal = doMerge.call(null, false, false, prevVal, b2, c2, d, e, f, ...rest);
} else {
nextVal = doMerge(false, false, prevVal, b2, c2, d, e, f);
}
return setIn9(a2, path2, nextVal);
}
function omit7(obj, attrs) {
const omitList = Array.isArray(attrs) ? attrs : [attrs];
let fDoSomething = false;
for (let i = 0; i < omitList.length; i++) {
if (hasOwnProperty.call(obj, omitList[i])) {
fDoSomething = true;
break;
}
}
if (!fDoSomething)
return obj;
const out = {};
const keys3 = getKeysAndSymbols(obj);
for (let i = 0; i < keys3.length; i++) {
const key = keys3[i];
if (omitList.indexOf(key) >= 0)
continue;
out[key] = obj[key];
}
return out;
}
function addDefaults(a2, b2, c2, d, e, f, ...rest) {
return rest.length ? doMerge.call(null, true, false, a2, b2, c2, d, e, f, ...rest) : doMerge(true, false, a2, b2, c2, d, e, f);
}
function doMerge(fAddDefaults, fDeep, first, ...rest) {
let out = first;
if (!(out != null)) {
throwStr(IS_DEV ? "At least one object should be provided to merge()" : INVALID_ARGS);
}
let fChanged = false;
for (let idx = 0; idx < rest.length; idx++) {
const obj = rest[idx];
if (obj == null)
continue;
const keys3 = getKeysAndSymbols(obj);
if (!keys3.length)
continue;
for (let j = 0; j <= keys3.length; j++) {
const key = keys3[j];
if (fAddDefaults && out[key] !== void 0)
continue;
let nextVal = obj[key];
if (fDeep && isObject4(out[key]) && isObject4(nextVal)) {
nextVal = doMerge(fAddDefaults, fDeep, out[key], nextVal);
}
if (nextVal === void 0 || nextVal === out[key])
continue;
if (!fChanged) {
fChanged = true;
out = clone3(out);
}
out[key] = nextVal;
}
}
return out;
}
var timm = {
clone: clone3,
addLast: addLast3,
addFirst,
removeLast,
removeFirst,
insert: insert2,
removeAt: removeAt3,
replaceAt,
getIn,
set: set3,
setIn: setIn9,
update,
updateIn,
merge: merge3,
mergeDeep,
mergeIn,
omit: omit7,
addDefaults
};
var _default = timm;
exports.default = _default;
}
});
// ../../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/node_modules/.aspect_rules_js/p-defer@3.0.0/node_modules/p-defer/index.js
var require_p_defer = __commonJS({
"../../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/node_modules/.aspect_rules_js/p-defer@3.0.0/node_modules/p-defer/index.js"(exports, module2) {
"use strict";
var pDefer = () => {
const deferred3 = {};
deferred3.promise = new Promise((resolve, reject) => {
deferred3.resolve = resolve;
deferred3.reject = reject;
});
return deferred3;
};
module2.exports = pDefer;
}
});
// ../../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/node_modules/.aspect_rules_js/queue-microtask@1.2.3/node_modules/queue-microtask/index.js
var require_queue_microtask = __commonJS({
"../../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/node_modules/.aspect_rules_js/queue-microtask@1.2.3/node_modules/queue-microtask/index.js"(exports, module2) {
var promise;
module2.exports = typeof queueMicrotask === "function" ? queueMicrotask.bind(typeof window !== "undefined" ? window : global) : (cb2) => (promise || (promise = Promise.resolve())).then(cb2).catch((err) => setTimeout(() => {
throw err;
}, 0));
}
});
// ../../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/node_modules/.aspect_rules_js/sorted-array@2.0.4/node_modules/sorted-array/sorted-array.js
var require_sorted_array = __commonJS({
"../../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/node_modules/.aspect_rules_js/sorted-array@2.0.4/node_modules/sorted-array/sorted-array.js"(exports, module2) {
var SortedArray4 = function() {
var SortedArray5 = defclass({
constructor: function(array, compare2) {
this.array = [];
this.compare = compare2 || compareDefault;
var length3 = array.length, index = 0;
while (index < length3)
this.insert(array[index++]);
},
insert: function(element) {
var array = this.array, compare2 = this.compare, high = array.length - 1, low = 0, pos = -1, index, ordering;
while (high >= low) {
index = (high + low) / 2 >>> 0;
ordering = compare2(array[index], element);
if (ordering < 0)
low = index + 1;
else if (ordering > 0)
high = index - 1;
else {
pos = index;
break;
}
;
}
if (pos === -1) {
pos = high;
}
pos++;
high = array.length - 1;
while (pos < high && compare2(element, array[pos]) === 0) {
pos++;
}
index = array.length;
array.push(element);
while (index > pos) {
array[index] = array[--index];
}
array[pos] = element;
return this;
},
search: function(element) {
var array = this.array, compare2 = this.compare, high = array.length - 1, low = 0, index, ordering;
while (high >= low) {
index = (high + low) / 2 >>> 0;
ordering = compare2(array[index], element);
if (ordering < 0)
low = index + 1;
else if (ordering > 0)
high = index - 1;
else
return index;
}
return -1;
},
remove: function(element) {
var index = this.search(element);
if (index >= 0)
this.array.splice(index, 1);
return this;
}
});
SortedArray5.comparing = function(property, array) {
return new SortedArray5(array, function(a2, b2) {
return compareDefault(a2[property], b2[property]);
});
};
return SortedArray5;
function defclass(prototype) {
var constructor = prototype.constructor;
constructor.prototype = prototype;
return constructor;
}
function compareDefault(a2, b2) {
if (a2 < b2)
return -1;
else if (a2 > b2)
return 1;
else
return 0;
}
}();
if (typeof module2 === "object")
module2.exports = SortedArray4;
if (typeof define === "function" && define.amd)
define(function() {
return SortedArray4;
});
}
});
// ../../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/node_modules/.aspect_rules_js/react-error-boundary@3.1.4_react_18.3.1/node_modules/react-error-boundary/dist/react-error-boundary.umd.js
var require_react_error_boundary_umd = __commonJS({
"../../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/node_modules/.aspect_rules_js/react-error-boundary@3.1.4_react_18.3.1/node_modules/react-error-boundary/dist/react-error-boundary.umd.js"(exports, module2) {
(function(global2, factory2) {
typeof exports === "object" && typeof module2 !== "undefined" ? factory2(exports, require("react")) : typeof define === "function" && define.amd ? define(["exports", "react"], factory2) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, factory2(global2.ReactErrorBoundary = {}, global2.React));
})(exports, function(exports2, React58) {
"use strict";
function _interopNamespace(e) {
if (e && e.__esModule)
return e;
var n = /* @__PURE__ */ Object.create(null);
if (e) {
Object.keys(e).forEach(function(k) {
if (k !== "default") {
var d = Object.getOwnPropertyDescriptor(e, k);
Object.defineProperty(n, k, d.get ? d : {
enumerable: true,
get: function() {
return e[k];
}
});
}
});
}
n["default"] = e;
return Object.freeze(n);
}
var React__namespace = /* @__PURE__ */ _interopNamespace(React58);
function _setPrototypeOf(o, p) {
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf2(o2, p2) {
o2.__proto__ = p2;
return o2;
};
return _setPrototypeOf(o, p);
}
function _inheritsLoose(subClass, superClass) {
subClass.prototype = Object.create(superClass.prototype);
subClass.prototype.constructor = subClass;
_setPrototypeOf(subClass, superClass);
}
var changedArray = function changedArray2(a2, b2) {
if (a2 === void 0) {
a2 = [];
}
if (b2 === void 0) {
b2 = [];
}
return a2.length !== b2.length || a2.some(function(item, index) {
return !Object.is(item, b2[index]);
});
};
var initialState3 = {
error: null
};
var ErrorBoundary3 = /* @__PURE__ */ function(_React$Component) {
_inheritsLoose(ErrorBoundary4, _React$Component);
function ErrorBoundary4() {
var _this;
for (var _len = arguments.length, _args = new Array(_len), _key = 0; _key < _len; _key++) {
_args[_key] = arguments[_key];
}
_this = _React$Component.call.apply(_React$Component, [this].concat(_args)) || this;
_this.state = initialState3;
_this.resetErrorBoundary = function() {
var _this$props;
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
args[_key2] = arguments[_key2];
}
_this.props.onReset == null ? void 0 : (_this$props = _this.props).onReset.apply(_this$props, args);
_this.reset();
};
return _this;
}
ErrorBoundary4.getDerivedStateFromError = function getDerivedStateFromError(error2) {
return {
error: error2
};
};
var _proto = ErrorBoundary4.prototype;
_proto.reset = function reset() {
this.setState(initialState3);
};
_proto.componentDidCatch = function componentDidCatch(error2, info) {
var _this$props$onError, _this$props2;
(_this$props$onError = (_this$props2 = this.props).onError) == null ? void 0 : _this$props$onError.call(_this$props2, error2, info);
};
_proto.componentDidUpdate = function componentDidUpdate(prevProps, prevState) {
var error2 = this.state.error;
var resetKeys = this.props.resetKeys;
if (error2 !== null && prevState.error !== null && changedArray(prevProps.resetKeys, resetKeys)) {
var _this$props$onResetKe, _this$props3;
(_this$props$onResetKe = (_this$props3 = this.props).onResetKeysChange) == null ? void 0 : _this$props$onResetKe.call(_this$props3, prevProps.resetKeys, resetKeys);
this.reset();
}
};
_proto.render = function render2() {
var error2 = this.state.error;
var _this$props4 = this.props, fallbackRender2 = _this$props4.fallbackRender, FallbackComponent = _this$props4.FallbackComponent, fallback = _this$props4.fallback;
if (error2 !== null) {
var _props = {
error: error2,
resetErrorBoundary: this.resetErrorBoundary
};
if (/* @__PURE__ */ React__namespace.isValidElement(fallback)) {
return fallback;
} else if (typeof fallbackRender2 === "function") {
return fallbackRender2(_props);
} else if (FallbackComponent) {
return /* @__PURE__ */ React__namespace.createElement(FallbackComponent, _props);
} else {
throw new Error("react-error-boundary requires either a fallback, fallbackRender, or FallbackComponent prop");
}
}
return this.props.children;
};
return ErrorBoundary4;
}(React__namespace.Component);
function withErrorBoundary2(Component3, errorBoundaryProps) {
var Wrapped = function Wrapped2(props) {
return /* @__PURE__ */ React__namespace.createElement(ErrorBoundary3, errorBoundaryProps, /* @__PURE__ */ React__namespace.createElement(Component3, props));
};
var name2 = Component3.displayName || Component3.name || "Unknown";
Wrapped.displayName = "withErrorBoundary(" + name2 + ")";
return Wrapped;
}
function useErrorHandler(givenError) {
var _React$useState = React__namespace.useState(null), error2 = _React$useState[0], setError = _React$useState[1];
if (givenError != null)
throw givenError;
if (error2 != null)
throw error2;
return setError;
}
exports2.ErrorBoundary = ErrorBoundary3;
exports2.useErrorHandler = useErrorHandler;
exports2.withErrorBoundary = withErrorBoundary2;
Object.defineProperty(exports2, "__esModule", { value: true });
});
}
});
// ../../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/node_modules/.aspect_rules_js/leven@3.1.0/node_modules/leven/index.js
var require_leven = __commonJS({
"../../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/node_modules/.aspect_rules_js/leven@3.1.0/node_modules/leven/index.js"(exports, module2) {
"use strict";
var array = [];
var charCodeCache = [];
var leven2 = (left, right) => {
if (left === right) {
return 0;
}
const swap = left;
if (left.length > right.length) {
left = right;
right = swap;
}
let leftLength = left.length;
let rightLength = right.length;
while (leftLength > 0 && left.charCodeAt(~-leftLength) === right.charCodeAt(~-rightLength)) {
leftLength--;
rightLength--;
}
let start = 0;
while (start < leftLength && left.charCodeAt(start) === right.charCodeAt(start)) {
start++;
}
leftLength -= start;
rightLength -= start;
if (leftLength === 0) {
return rightLength;
}
let bCharCode;
let result;
let temp;
let temp2;
let i = 0;
let j = 0;
while (i < leftLength) {
charCodeCache[i] = left.charCodeAt(start + i);
array[i] = ++i;
}
while (j < rightLength) {
bCharCode = right.charCodeAt(start + j);
temp = j++;
result = j;
for (i = 0; i < leftLength; i++) {
temp2 = bCharCode === charCodeCache[i] ? temp : temp + 1;
temp = array[i];
result = array[i] = temp > result ? temp2 > result ? result + 1 : temp2 : temp2 > temp ? temp + 1 : temp2;
}
}
return result;
};
module2.exports = leven2;
module2.exports.default = leven2;
}
});
// ../../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/node_modules/.aspect_rules_js/react-error-boundary@4.0.13_react_18.3.1/node_modules/react-error-boundary/dist/react-error-boundary.cjs.js
var require_react_error_boundary_cjs = __commonJS({
"../../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/node_modules/.aspect_rules_js/react-error-boundary@4.0.13_react_18.3.1/node_modules/react-error-boundary/dist/react-error-boundary.cjs.js"(exports) {
"use strict";
"use client";
Object.defineProperty(exports, "__esModule", { value: true });
var react = require("react");
var ErrorBoundaryContext2 = react.createContext(null);
var initialState3 = {
didCatch: false,
error: null
};
var ErrorBoundary3 = class extends react.Component {
constructor(props) {
super(props);
this.resetErrorBoundary = this.resetErrorBoundary.bind(this);
this.state = initialState3;
}
static getDerivedStateFromError(error2) {
return {
didCatch: true,
error: error2
};
}
resetErrorBoundary() {
const {
error: error2
} = this.state;
if (error2 !== null) {
var _this$props$onReset, _this$props;
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
(_this$props$onReset = (_this$props = this.props).onReset) === null || _this$props$onReset === void 0 ? void 0 : _this$props$onReset.call(_this$props, {
args,
reason: "imperative-api"
});
this.setState(initialState3);
}
}
componentDidCatch(error2, info) {
var _this$props$onError, _this$props2;
(_this$props$onError = (_this$props2 = this.props).onError) === null || _this$props$onError === void 0 ? void 0 : _this$props$onError.call(_this$props2, error2, info);
}
componentDidUpdate(prevProps, prevState) {
const {
didCatch
} = this.state;
const {
resetKeys
} = this.props;
if (didCatch && prevState.error !== null && hasArrayChanged(prevProps.resetKeys, resetKeys)) {
var _this$props$onReset2, _this$props3;
(_this$props$onReset2 = (_this$props3 = this.props).onReset) === null || _this$props$onReset2 === void 0 ? void 0 : _this$props$onReset2.call(_this$props3, {
next: resetKeys,
prev: prevProps.resetKeys,
reason: "keys"
});
this.setState(initialState3);
}
}
render() {
const {
children,
fallbackRender: fallbackRender2,
FallbackComponent,
fallback
} = this.props;
const {
didCatch,
error: error2
} = this.state;
let childToRender = children;
if (didCatch) {
const props = {
error: error2,
resetErrorBoundary: this.resetErrorBoundary
};
if (typeof fallbackRender2 === "function") {
childToRender = fallbackRender2(props);
} else if (FallbackComponent) {
childToRender = react.createElement(FallbackComponent, props);
} else if (fallback === null || react.isValidElement(fallback)) {
childToRender = fallback;
} else {
throw error2;
}
}
return react.createElement(ErrorBoundaryContext2.Provider, {
value: {
didCatch,
error: error2,
resetErrorBoundary: this.resetErrorBoundary
}
}, childToRender);
}
};
function hasArrayChanged() {
let a2 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
let b2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
return a2.length !== b2.length || a2.some((item, index) => !Object.is(item, b2[index]));
}
function assertErrorBoundaryContext(value) {
if (value == null || typeof value.didCatch !== "boolean" || typeof value.resetErrorBoundary !== "function") {
throw new Error("ErrorBoundaryContext not found");
}
}
function useErrorBoundary2() {
const context = react.useContext(ErrorBoundaryContext2);
assertErrorBoundaryContext(context);
const [state2, setState] = react.useState({
error: null,
hasError: false
});
const memoized = react.useMemo(() => ({
resetBoundary: () => {
context.resetErrorBoundary();
setState({
error: null,
hasError: false
});
},
showBoundary: (error2) => setState({
error: error2,
hasError: true
})
}), [context.resetErrorBoundary]);
if (state2.hasError) {
throw state2.error;
}
return memoized;
}
function withErrorBoundary2(component, errorBoundaryProps) {
const Wrapped = react.forwardRef((props, ref) => react.createElement(ErrorBoundary3, errorBoundaryProps, react.createElement(component, {
...props,
ref
})));
const name2 = component.displayName || component.name || "Unknown";
Wrapped.displayName = "withErrorBoundary(".concat(name2, ")");
return Wrapped;
}
exports.ErrorBoundary = ErrorBoundary3;
exports.ErrorBoundaryContext = ErrorBoundaryContext2;
exports.useErrorBoundary = useErrorBoundary2;
exports.withErrorBoundary = withErrorBoundary2;
}
});
// ../../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/node_modules/.aspect_rules_js/@emotion+sheet@1.2.2/node_modules/@emotion/sheet/dist/emotion-sheet.cjs.dev.js
var require_emotion_sheet_cjs_dev = __commonJS({
"../../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/node_modules/.aspect_rules_js/@emotion+sheet@1.2.2/node_modules/@emotion/sheet/dist/emotion-sheet.cjs.dev.js"(exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
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");
tag.setAttribute("data-emotion", options.key);
if (options.nonce !== void 0) {
tag.setAttribute("nonce", options.nonce);
}
tag.appendChild(document.createTextNode(""));
tag.setAttribute("data-s", "");
return tag;
}
var StyleSheet = /* @__PURE__ */ function() {
function StyleSheet2(options) {
var _this = this;
this._insertTag = function(tag) {
var before;
if (_this.tags.length === 0) {
if (_this.insertionPoint) {
before = _this.insertionPoint.nextSibling;
} else if (_this.prepend) {
before = _this.container.firstChild;
} else {
before = _this.before;
}
} else {
before = _this.tags[_this.tags.length - 1].nextSibling;
}
_this.container.insertBefore(tag, before);
_this.tags.push(tag);
};
this.isSpeedy = options.speedy === void 0 ? false : 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;
_proto.hydrate = function hydrate(nodes) {
nodes.forEach(this._insertTag);
};
_proto.insert = function insert2(rule) {
if (this.ctr % (this.isSpeedy ? 65e3 : 1) === 0) {
this._insertTag(createStyleElement(this));
}
var tag = this.tags[this.tags.length - 1];
if (true) {
var isImportRule = rule.charCodeAt(0) === 64 && rule.charCodeAt(1) === 105;
if (isImportRule && this._alreadyInsertedOrderInsensitiveRule) {
console.error("You're attempting to insert the following rule:\n" + rule + "\n\n`@import` rules must be before all other types of rules in a stylesheet but other rules have already been inserted. Please ensure that `@import` rules are before all other rules.");
}
this._alreadyInsertedOrderInsensitiveRule = this._alreadyInsertedOrderInsensitiveRule || !isImportRule;
}
if (this.isSpeedy) {
var sheet = sheetForTag(tag);
try {
sheet.insertRule(rule, sheet.cssRules.length);
} catch (e) {
if (!/:(-moz-placeholder|-moz-focus-inner|-moz-focusring|-ms-input-placeholder|-moz-read-write|-moz-read-only|-ms-clear|-ms-expand|-ms-reveal){/.test(rule)) {
console.error('There was a problem inserting the following rule: "' + rule + '"', e);
}
}
} else {
tag.appendChild(document.createTextNode(rule));
}
this.ctr++;
};
_proto.flush = function flush() {
this.tags.forEach(function(tag) {
return tag.parentNode && tag.parentNode.removeChild(tag);
});
this.tags = [];
this.ctr = 0;
if (true) {
this._alreadyInsertedOrderInsensitiveRule = false;
}
};
return StyleSheet2;
}();
exports.StyleSheet = StyleSheet;
}
});
// ../../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/node_modules/.aspect_rules_js/@emotion+sheet@1.2.2/node_modules/@emotion/sheet/dist/emotion-sheet.cjs.js
var require_emotion_sheet_cjs = __commonJS({
"../../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/node_modules/.aspect_rules_js/@emotion+sheet@1.2.2/node_modules/@emotion/sheet/dist/emotion-sheet.cjs.js"(exports, module2) {
"use strict";
if (false) {
module2.exports = null;
} else {
module2.exports = require_emotion_sheet_cjs_dev();
}
}
});
// ../../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/node_modules/.aspect_rules_js/stylis@4.2.0/node_modules/stylis/dist/umd/stylis.js
var require_stylis = __commonJS({
"../../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/node_modules/.aspect_rules_js/stylis@4.2.0/node_modules/stylis/dist/umd/stylis.js"(exports, module2) {
(function(e, r2) {
typeof exports === "object" && typeof module2 !== "undefined" ? r2(exports) : typeof define === "function" && define.amd ? define(["exports"], r2) : (e = e || self, r2(e.stylis = {}));
})(exports, function(e) {
"use strict";
var r2 = "-ms-";
var a2 = "-moz-";
var c2 = "-webkit-";
var n = "comm";
var t5 = "rule";
var s = "decl";
var i = "@page";
var u = "@media";
var o = "@import";
var f = "@charset";
var l = "@viewport";
var p = "@supports";
var h = "@document";
var v = "@namespace";
var d = "@keyframes";
var b2 = "@font-face";
var w = "@counter-style";
var m = "@font-feature-values";
var g = "@layer";
var k = Math.abs;
var $ = String.fromCharCode;
var x = Object.assign;
function E(e2, r3) {
return M(e2, 0) ^ 45 ? (((r3 << 2 ^ M(e2, 0)) << 2 ^ M(e2, 1)) << 2 ^ M(e2, 2)) << 2 ^ M(e2, 3) : 0;
}
function y(e2) {
return e2.trim();
}
function T(e2, r3) {
return (e2 = r3.exec(e2)) ? e2[0] : e2;
}
function A(e2, r3, a3) {
return e2.replace(r3, a3);
}
function O(e2, r3) {
return e2.indexOf(r3);
}
function M(e2, r3) {
return e2.charCodeAt(r3) | 0;
}
function C2(e2, r3, a3) {
return e2.slice(r3, a3);
}
function R(e2) {
return e2.length;
}
function S(e2) {
return e2.length;
}
function z(e2, r3) {
return r3.push(e2), e2;
}
function N(e2, r3) {
return e2.map(r3).join("");
}
e.line = 1;
e.column = 1;
e.length = 0;
e.position = 0;
e.character = 0;
e.characters = "";
function P2(r3, a3, c3, n2, t6, s2, i2) {
return { value: r3, root: a3, parent: c3, type: n2, props: t6, children: s2, line: e.line, column: e.column, length: i2, return: "" };
}
function j(e2, r3) {
return x(P2("", null, null, "", null, null, 0), e2, { length: -e2.length }, r3);
}
function U() {
return e.character;
}
function _() {
e.character = e.position > 0 ? M(e.characters, --e.position) : 0;
if (e.column--, e.character === 10)
e.column = 1, e.line--;
return e.character;
}
function F() {
e.character = e.position < e.length ? M(e.characters, e.position++) : 0;
if (e.column++, e.character === 10)
e.column = 1, e.line++;
return e.character;
}
function I() {
return M(e.characters, e.position);
}
function L() {
return e.position;
}
function D(r3, a3) {
return C2(e.characters, r3, a3);
}
function Y(e2) {
switch (e2) {
case 0:
case 9:
case 10:
case 13:
case 32:
return 5;
case 33:
case 43:
case 44:
case 47:
case 62:
case 64:
case 126:
case 59:
case 123:
case 125:
return 4;
case 58:
return 3;
case 34:
case 39:
case 40:
case 91:
return 2;
case 41:
case 93:
return 1;
}
return 0;
}
function K(r3) {
return e.line = e.column = 1, e.length = R(e.characters = r3), e.position = 0, [];
}
function V(r3) {
return e.characters = "", r3;
}
function W(r3) {
return y(D(e.position - 1, q(r3 === 91 ? r3 + 2 : r3 === 40 ? r3 + 1 : r3)));
}
function B(e2) {
return V(H(K(e2)));
}
function G(r3) {
while (e.character = I())
if (e.character < 33)
F();
else
break;
return Y(r3) > 2 || Y(e.character) > 3 ? "" : " ";
}
function H(r3) {
while (F())
switch (Y(e.character)) {
case 0:
z(Q(e.position - 1), r3);
break;
case 2:
z(W(e.character), r3);
break;
default:
z($(e.character), r3);
}
return r3;
}
function Z(r3, a3) {
while (--a3 && F())
if (e.character < 48 || e.character > 102 || e.character > 57 && e.character < 65 || e.character > 70 && e.character < 97)
break;
return D(r3, L() + (a3 < 6 && I() == 32 && F() == 32));
}
function q(r3) {
while (F())
switch (e.character) {
case r3:
return e.position;
case 34:
case 39:
if (r3 !== 34 && r3 !== 39)
q(e.character);
break;
case 40:
if (r3 === 41)
q(r3);
break;
case 92:
F();
break;
}
return e.position;
}
function J(r3, a3) {
while (F())
if (r3 + e.character === 47 + 10)
break;
else if (r3 + e.character === 42 + 42 && I() === 47)
break;
return "/*" + D(a3, e.position - 1) + "*" + $(r3 === 47 ? r3 : F());
}
function Q(r3) {
while (!Y(I()))
F();
return D(r3, e.position);
}
function X(e2) {
return V(ee("", null, null, null, [""], e2 = K(e2), 0, [0], e2));
}
function ee(e2, r3, a3, c3, n2, t6, s2, i2, u2) {
var o2 = 0;
var f2 = 0;
var l2 = s2;
var p2 = 0;
var h2 = 0;
var v2 = 0;
var d2 = 1;
var b3 = 1;
var w2 = 1;
var m2 = 0;
var g2 = "";
var k2 = n2;
var x2 = t6;
var E2 = c3;
var y2 = g2;
while (b3)
switch (v2 = m2, m2 = F()) {
case 40:
if (v2 != 108 && M(y2, l2 - 1) == 58) {
if (O(y2 += A(W(m2), "&", "&\f"), "&\f") != -1)
w2 = -1;
break;
}
case 34:
case 39:
case 91:
y2 += W(m2);
break;
case 9:
case 10:
case 13:
case 32:
y2 += G(v2);
break;
case 92:
y2 += Z(L() - 1, 7);
continue;
case 47:
switch (I()) {
case 42:
case 47:
z(ae(J(F(), L()), r3, a3), u2);
break;
default:
y2 += "/";
}
break;
case 123 * d2:
i2[o2++] = R(y2) * w2;
case 125 * d2:
case 59:
case 0:
switch (m2) {
case 0:
case 125:
b3 = 0;
case 59 + f2:
if (w2 == -1)
y2 = A(y2, /\f/g, "");
if (h2 > 0 && R(y2) - l2)
z(h2 > 32 ? ce(y2 + ";", c3, a3, l2 - 1) : ce(A(y2, " ", "") + ";", c3, a3, l2 - 2), u2);
break;
case 59:
y2 += ";";
default:
z(E2 = re(y2, r3, a3, o2, f2, n2, i2, g2, k2 = [], x2 = [], l2), t6);
if (m2 === 123)
if (f2 === 0)
ee(y2, r3, E2, E2, k2, t6, l2, i2, x2);
else
switch (p2 === 99 && M(y2, 3) === 110 ? 100 : p2) {
case 100:
case 108:
case 109:
case 115:
ee(e2, E2, E2, c3 && z(re(e2, E2, E2, 0, 0, n2, i2, g2, n2, k2 = [], l2), x2), n2, x2, l2, i2, c3 ? k2 : x2);
break;
default:
ee(y2, E2, E2, E2, [""], x2, 0, i2, x2);
}
}
o2 = f2 = h2 = 0, d2 = w2 = 1, g2 = y2 = "", l2 = s2;
break;
case 58:
l2 = 1 + R(y2), h2 = v2;
default:
if (d2 < 1) {
if (m2 == 123)
--d2;
else if (m2 == 125 && d2++ == 0 && _() == 125)
continue;
}
switch (y2 += $(m2), m2 * d2) {
case 38:
w2 = f2 > 0 ? 1 : (y2 += "\f", -1);
break;
case 44:
i2[o2++] = (R(y2) - 1) * w2, w2 = 1;
break;
case 64:
if (I() === 45)
y2 += W(F());
p2 = I(), f2 = l2 = R(g2 = y2 += Q(L())), m2++;
break;
case 45:
if (v2 === 45 && R(y2) == 2)
d2 = 0;
}
}
return t6;
}
function re(e2, r3, a3, c3, n2, s2, i2, u2, o2, f2, l2) {
var p2 = n2 - 1;
var h2 = n2 === 0 ? s2 : [""];
var v2 = S(h2);
for (var d2 = 0, b3 = 0, w2 = 0; d2 < c3; ++d2)
for (var m2 = 0, g2 = C2(e2, p2 + 1, p2 = k(b3 = i2[d2])), $2 = e2; m2 < v2; ++m2)
if ($2 = y(b3 > 0 ? h2[m2] + " " + g2 : A(g2, /&\f/g, h2[m2])))
o2[w2++] = $2;
return P2(e2, r3, a3, n2 === 0 ? t5 : u2, o2, f2, l2);
}
function ae(e2, r3, a3) {
return P2(e2, r3, a3, n, $(U()), C2(e2, 2, -2), 0);
}
function ce(e2, r3, a3, c3) {
return P2(e2, r3, a3, s, C2(e2, 0, c3), C2(e2, c3 + 1, -1), c3);
}
function ne(e2, n2, t6) {
switch (E(e2, n2)) {
case 5103:
return c2 + "print-" + e2 + e2;
case 5737:
case 4201:
case 3177:
case 3433:
case 1641:
case 4457:
case 2921:
case 5572:
case 6356:
case 5844:
case 3191:
case 6645:
case 3005:
case 6391:
case 5879:
case 5623:
case 6135:
case 4599:
case 4855:
case 4215:
case 6389:
case 5109:
case 5365:
case 5621:
case 3829:
return c2 + e2 + e2;
case 4789:
return a2 + e2 + e2;
case 5349:
case 4246:
case 4810:
case 6968:
case 2756:
return c2 + e2 + a2 + e2 + r2 + e2 + e2;
case 5936:
switch (M(e2, n2 + 11)) {
case 114:
return c2 + e2 + r2 + A(e2, /[svh]\w+-[tblr]{2}/, "tb") + e2;
case 108:
return c2 + e2 + r2 + A(e2, /[svh]\w+-[tblr]{2}/, "tb-rl") + e2;
case 45:
return c2 + e2 + r2 + A(e2, /[svh]\w+-[tblr]{2}/, "lr") + e2;
}
case 6828:
case 4268:
case 2903:
return c2 + e2 + r2 + e2 + e2;
case 6165:
return c2 + e2 + r2 + "flex-" + e2 + e2;
case 5187:
return c2 + e2 + A(e2, /(\w+).+(:[^]+)/, c2 + "box-$1$2" + r2 + "flex-$1$2") + e2;
case 5443:
return c2 + e2 + r2 + "flex-item-" + A(e2, /flex-|-self/g, "") + (!T(e2, /flex-|baseline/) ? r2 + "grid-row-" + A(e2, /flex-|-self/g, "") : "") + e2;
case 4675:
return c2 + e2 + r2 + "flex-line-pack" + A(e2, /align-content|flex-|-self/g, "") + e2;
case 5548:
return c2 + e2 + r2 + A(e2, "shrink", "negative") + e2;
case 5292:
return c2 + e2 + r2 + A(e2, "basis", "preferred-size") + e2;
case 6060:
return c2 + "box-" + A(e2, "-grow", "") + c2 + e2 + r2 + A(e2, "grow", "positive") + e2;
case 4554:
return c2 + A(e2, /([^-])(transform)/g, "$1" + c2 + "$2") + e2;
case 6187:
return A(A(A(e2, /(zoom-|grab)/, c2 + "$1"), /(image-set)/, c2 + "$1"), e2, "") + e2;
case 5495:
case 3959:
return A(e2, /(image-set\([^]*)/, c2 + "$1$`$1");
case 4968:
return A(A(e2, /(.+:)(flex-)?(.*)/, c2 + "box-pack:$3" + r2 + "flex-pack:$3"), /s.+-b[^;]+/, "justify") + c2 + e2 + e2;
case 4200:
if (!T(e2, /flex-|baseline/))
return r2 + "grid-column-align" + C2(e2, n2) + e2;
break;
case 2592:
case 3360:
return r2 + A(e2, "template-", "") + e2;
case 4384:
case 3616:
if (t6 && t6.some(function(e3, r3) {
return n2 = r3, T(e3.props, /grid-\w+-end/);
})) {
return ~O(e2 + (t6 = t6[n2].value), "span") ? e2 : r2 + A(e2, "-start", "") + e2 + r2 + "grid-row-span:" + (~O(t6, "span") ? T(t6, /\d+/) : +T(t6, /\d+/) - +T(e2, /\d+/)) + ";";
}
return r2 + A(e2, "-start", "") + e2;
case 4896:
case 4128:
return t6 && t6.some(function(e3) {
return T(e3.props, /grid-\w+-start/);
}) ? e2 : r2 + A(A(e2, "-end", "-span"), "span ", "") + e2;
case 4095:
case 3583:
case 4068:
case 2532:
return A(e2, /(.+)-inline(.+)/, c2 + "$1$2") + e2;
case 8116:
case 7