UNPKG

storybook

Version:

Storybook: Develop, document, and test UI components in isolation

1,729 lines (1,712 loc) • 713 kB
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 __name = (target, value) => __defProp(target, "name", { value, configurable: true }); var __require = /* @__PURE__ */ ((x2) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x2, { get: (a2, b2) => (typeof require !== "undefined" ? require : a2)[b2] }) : x2)(function(x2) { if (typeof require !== "undefined") return require.apply(this, arguments); throw Error('Dynamic require of "' + x2 + '" is not supported'); }); var __commonJS = (cb, mod) => function __require2() { 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: 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 __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: true }) : target, mod )); // ../node_modules/prop-types/lib/ReactPropTypesSecret.js var require_ReactPropTypesSecret = __commonJS({ "../node_modules/prop-types/lib/ReactPropTypesSecret.js"(exports, module) { "use strict"; var ReactPropTypesSecret = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"; module.exports = ReactPropTypesSecret; } }); // ../node_modules/prop-types/factoryWithThrowingShims.js var require_factoryWithThrowingShims = __commonJS({ "../node_modules/prop-types/factoryWithThrowingShims.js"(exports, module) { "use strict"; var ReactPropTypesSecret = require_ReactPropTypesSecret(); function emptyFunction() { } __name(emptyFunction, "emptyFunction"); function emptyFunctionWithReset() { } __name(emptyFunctionWithReset, "emptyFunctionWithReset"); emptyFunctionWithReset.resetWarningCache = emptyFunction; module.exports = function() { function shim(props, propName, componentName, location, propFullName, secret) { if (secret === ReactPropTypesSecret) { return; } var err = new Error( "Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types" ); err.name = "Invariant Violation"; throw err; } __name(shim, "shim"); ; shim.isRequired = shim; function getShim() { return shim; } __name(getShim, "getShim"); ; var ReactPropTypes = { array: shim, bigint: shim, bool: shim, func: shim, number: shim, object: shim, string: shim, symbol: shim, any: shim, arrayOf: getShim, element: shim, elementType: shim, instanceOf: getShim, node: shim, objectOf: getShim, oneOf: getShim, oneOfType: getShim, shape: getShim, exact: getShim, checkPropTypes: emptyFunctionWithReset, resetWarningCache: emptyFunction }; ReactPropTypes.PropTypes = ReactPropTypes; return ReactPropTypes; }; } }); // ../node_modules/prop-types/index.js var require_prop_types = __commonJS({ "../node_modules/prop-types/index.js"(exports, module) { if (false) { ReactIs = null; throwOnDirectAccess = true; module.exports = null(ReactIs.isElement, throwOnDirectAccess); } else { module.exports = require_factoryWithThrowingShims()(); } var ReactIs; var throwOnDirectAccess; } }); // ../node_modules/react-fast-compare/index.js var require_react_fast_compare = __commonJS({ "../node_modules/react-fast-compare/index.js"(exports, module) { var hasElementType = typeof Element !== "undefined"; var hasMap = typeof Map === "function"; var hasSet = typeof Set === "function"; var hasArrayBuffer = typeof ArrayBuffer === "function" && !!ArrayBuffer.isView; function equal2(a2, b2) { if (a2 === b2) return true; if (a2 && b2 && typeof a2 == "object" && typeof b2 == "object") { if (a2.constructor !== b2.constructor) return false; var length, i2, keys; if (Array.isArray(a2)) { length = a2.length; if (length != b2.length) return false; for (i2 = length; i2-- !== 0; ) if (!equal2(a2[i2], b2[i2])) return false; return true; } var it; if (hasMap && a2 instanceof Map && b2 instanceof Map) { if (a2.size !== b2.size) return false; it = a2.entries(); while (!(i2 = it.next()).done) if (!b2.has(i2.value[0])) return false; it = a2.entries(); while (!(i2 = it.next()).done) if (!equal2(i2.value[1], b2.get(i2.value[0]))) return false; return true; } if (hasSet && a2 instanceof Set && b2 instanceof Set) { if (a2.size !== b2.size) return false; it = a2.entries(); while (!(i2 = it.next()).done) if (!b2.has(i2.value[0])) return false; return true; } if (hasArrayBuffer && ArrayBuffer.isView(a2) && ArrayBuffer.isView(b2)) { length = a2.length; if (length != b2.length) return false; for (i2 = length; i2-- !== 0; ) if (a2[i2] !== b2[i2]) return false; return true; } if (a2.constructor === RegExp) return a2.source === b2.source && a2.flags === b2.flags; if (a2.valueOf !== Object.prototype.valueOf && typeof a2.valueOf === "function" && typeof b2.valueOf === "function") return a2.valueOf() === b2.valueOf(); if (a2.toString !== Object.prototype.toString && typeof a2.toString === "function" && typeof b2.toString === "function") return a2.toString() === b2.toString(); keys = Object.keys(a2); length = keys.length; if (length !== Object.keys(b2).length) return false; for (i2 = length; i2-- !== 0; ) if (!Object.prototype.hasOwnProperty.call(b2, keys[i2])) return false; if (hasElementType && a2 instanceof Element) return false; for (i2 = length; i2-- !== 0; ) { if ((keys[i2] === "_owner" || keys[i2] === "__v" || keys[i2] === "__o") && a2.$$typeof) { continue; } if (!equal2(a2[keys[i2]], b2[keys[i2]])) return false; } return true; } return a2 !== a2 && b2 !== b2; } __name(equal2, "equal"); module.exports = /* @__PURE__ */ __name(function isEqual(a2, b2) { try { return equal2(a2, b2); } catch (error) { if ((error.message || "").match(/stack|recursion/i)) { console.warn("react-fast-compare cannot handle circular refs"); return false; } throw error; } }, "isEqual"); } }); // ../node_modules/invariant/browser.js var require_browser = __commonJS({ "../node_modules/invariant/browser.js"(exports, module) { "use strict"; var invariant = /* @__PURE__ */ __name(function(condition, format, a2, b2, c2, d2, e2, f2) { if (false) { if (format === void 0) { throw new Error("invariant requires an error message argument"); } } if (!condition) { var error; if (format === void 0) { error = new Error( "Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings." ); } else { var args = [a2, b2, c2, d2, e2, f2]; var argIndex = 0; error = new Error( format.replace(/%s/g, function() { return args[argIndex++]; }) ); error.name = "Invariant Violation"; } error.framesToPop = 1; throw error; } }, "invariant"); module.exports = invariant; } }); // ../node_modules/shallowequal/index.js var require_shallowequal = __commonJS({ "../node_modules/shallowequal/index.js"(exports, module) { module.exports = /* @__PURE__ */ __name(function shallowEqual(objA, objB, compare, compareContext) { var ret = compare ? compare.call(compareContext, objA, objB) : void 0; if (ret !== void 0) { return !!ret; } if (objA === objB) { return true; } if (typeof objA !== "object" || !objA || typeof objB !== "object" || !objB) { return false; } var keysA = Object.keys(objA); var keysB = Object.keys(objB); if (keysA.length !== keysB.length) { return false; } var bHasOwnProperty = Object.prototype.hasOwnProperty.bind(objB); for (var idx = 0; idx < keysA.length; idx++) { var key = keysA[idx]; if (!bHasOwnProperty(key)) { return false; } var valueA = objA[key]; var valueB = objB[key]; ret = compare ? compare.call(compareContext, valueA, valueB, key) : void 0; if (ret === false || ret === void 0 && valueA !== valueB) { return false; } } return true; }, "shallowEqual"); } }); // ../node_modules/memoizerific/memoizerific.js var require_memoizerific = __commonJS({ "../node_modules/memoizerific/memoizerific.js"(exports, module) { (function(f2) { if (typeof exports === "object" && typeof module !== "undefined") { module.exports = f2(); } else if (typeof define === "function" && define.amd) { define([], f2); } else { var g2; if (typeof window !== "undefined") { g2 = window; } else if (typeof global !== "undefined") { g2 = global; } else if (typeof self !== "undefined") { g2 = self; } else { g2 = this; } g2.memoizerific = f2(); } })(function() { var define2, module2, exports2; return (/* @__PURE__ */ __name(function e2(t2, n3, r3) { function s2(o4, u2) { if (!n3[o4]) { if (!t2[o4]) { var a2 = typeof __require == "function" && __require; if (!u2 && a2) return a2(o4, true); if (i2) return i2(o4, true); var f2 = new Error("Cannot find module '" + o4 + "'"); throw f2.code = "MODULE_NOT_FOUND", f2; } var l3 = n3[o4] = { exports: {} }; t2[o4][0].call(l3.exports, function(e3) { var n4 = t2[o4][1][e3]; return s2(n4 ? n4 : e3); }, l3, l3.exports, e2, t2, n3, r3); } return n3[o4].exports; } __name(s2, "s"); var i2 = typeof __require == "function" && __require; for (var o3 = 0; o3 < r3.length; o3++) s2(r3[o3]); return s2; }, "e"))({ 1: [function(_dereq_, module3, exports3) { module3.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_, module3, exports3) { function Similar() { this.list = []; this.lastItem = void 0; this.size = 0; return this; } __name(Similar, "Similar"); Similar.prototype.get = function(key) { var index; if (this.lastItem && this.isEqual(this.lastItem.key, key)) { return this.lastItem.val; } index = this.indexOf(key); if (index >= 0) { this.lastItem = this.list[index]; return this.list[index].val; } return void 0; }; Similar.prototype.set = function(key, val) { var index; if (this.lastItem && this.isEqual(this.lastItem.key, key)) { this.lastItem.val = val; return this; } index = this.indexOf(key); if (index >= 0) { this.lastItem = this.list[index]; this.list[index].val = val; return this; } this.lastItem = { key, val }; this.list.push(this.lastItem); this.size++; return this; }; Similar.prototype.delete = function(key) { var index; if (this.lastItem && this.isEqual(this.lastItem.key, key)) { this.lastItem = void 0; } index = this.indexOf(key); if (index >= 0) { this.size--; return this.list.splice(index, 1)[0]; } return void 0; }; Similar.prototype.has = function(key) { var index; if (this.lastItem && this.isEqual(this.lastItem.key, key)) { return true; } index = this.indexOf(key); if (index >= 0) { this.lastItem = this.list[index]; return true; } return false; }; Similar.prototype.forEach = function(callback, thisArg) { var i2; for (i2 = 0; i2 < this.size; i2++) { callback.call(thisArg || this, this.list[i2].val, this.list[i2].key, this); } }; Similar.prototype.indexOf = function(key) { var i2; for (i2 = 0; i2 < this.size; i2++) { if (this.isEqual(this.list[i2].key, key)) { return i2; } } return -1; }; Similar.prototype.isEqual = function(val1, val2) { return val1 === val2 || val1 !== val1 && val2 !== val2; }; module3.exports = Similar; }, {}], 3: [function(_dereq_, module3, exports3) { var MapOrSimilar = _dereq_("map-or-similar"); module3.exports = function(limit) { var cache = new MapOrSimilar(false), lru = []; return function(fn) { var memoizerific2 = /* @__PURE__ */ __name(function() { var currentCache = cache, newMap, fnResult, argsLengthMinusOne = arguments.length - 1, lruPath = Array(argsLengthMinusOne + 1), isMemoized = true, i2; if ((memoizerific2.numArgs || memoizerific2.numArgs === 0) && memoizerific2.numArgs !== argsLengthMinusOne + 1) { throw new Error("Memoizerific functions should always be called with the same number of arguments"); } for (i2 = 0; i2 < argsLengthMinusOne; i2++) { lruPath[i2] = { cacheItem: currentCache, arg: arguments[i2] }; if (currentCache.has(arguments[i2])) { currentCache = currentCache.get(arguments[i2]); continue; } isMemoized = false; newMap = new MapOrSimilar(false); currentCache.set(arguments[i2], newMap); currentCache = newMap; } if (isMemoized) { if (currentCache.has(arguments[argsLengthMinusOne])) { fnResult = currentCache.get(arguments[argsLengthMinusOne]); } else { isMemoized = false; } } if (!isMemoized) { fnResult = fn.apply(null, arguments); currentCache.set(arguments[argsLengthMinusOne], fnResult); } if (limit > 0) { lruPath[argsLengthMinusOne] = { cacheItem: currentCache, arg: arguments[argsLengthMinusOne] }; if (isMemoized) { moveToMostRecentLru(lru, lruPath); } else { lru.push(lruPath); } if (lru.length > limit) { removeCachedResult(lru.shift()); } } memoizerific2.wasMemoized = isMemoized; memoizerific2.numArgs = argsLengthMinusOne + 1; return fnResult; }, "memoizerific"); memoizerific2.limit = limit; memoizerific2.wasMemoized = false; memoizerific2.cache = cache; memoizerific2.lru = lru; return memoizerific2; }; }; function moveToMostRecentLru(lru, lruPath) { var lruLen = lru.length, lruPathLen = lruPath.length, isMatch, i2, ii; for (i2 = 0; i2 < lruLen; i2++) { isMatch = true; for (ii = 0; ii < lruPathLen; ii++) { if (!isEqual(lru[i2][ii].arg, lruPath[ii].arg)) { isMatch = false; break; } } if (isMatch) { break; } } lru.push(lru.splice(i2, 1)[0]); } __name(moveToMostRecentLru, "moveToMostRecentLru"); function removeCachedResult(removedLru) { var removedLruLen = removedLru.length, currentLru = removedLru[removedLruLen - 1], tmp, i2; currentLru.cacheItem.delete(currentLru.arg); for (i2 = removedLruLen - 2; i2 >= 0; i2--) { currentLru = removedLru[i2]; tmp = currentLru.cacheItem.get(currentLru.arg); if (!tmp || !tmp.size) { currentLru.cacheItem.delete(currentLru.arg); } else { break; } } } __name(removeCachedResult, "removeCachedResult"); function isEqual(val1, val2) { return val1 === val2 || val1 !== val1 && val2 !== val2; } __name(isEqual, "isEqual"); }, { "map-or-similar": 1 }] }, {}, [3])(3); }); } }); // ../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: true }); exports.encodeString = encodeString; var hexTable = Array.from({ length: 256 }, (_2, i2) => "%" + ((i2 < 16 ? "0" : "") + i2.toString(16)).toUpperCase()); var 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(str) { const len = str.length; if (len === 0) { return ""; } let out = ""; let lastPos = 0; let i2 = 0; outer: for (; i2 < len; i2++) { let c2 = str.charCodeAt(i2); while (c2 < 128) { if (noEscape[c2] !== 1) { if (lastPos < i2) out += str.slice(lastPos, i2); lastPos = i2 + 1; out += hexTable[c2]; } if (++i2 === len) break outer; c2 = str.charCodeAt(i2); } if (lastPos < i2) out += str.slice(lastPos, i2); if (c2 < 2048) { lastPos = i2 + 1; out += hexTable[192 | c2 >> 6] + hexTable[128 | c2 & 63]; continue; } if (c2 < 55296 || c2 >= 57344) { lastPos = i2 + 1; out += hexTable[224 | c2 >> 12] + hexTable[128 | c2 >> 6 & 63] + hexTable[128 | c2 & 63]; continue; } ++i2; if (i2 >= len) { throw new Error("URI malformed"); } const c22 = str.charCodeAt(i2) & 1023; lastPos = i2 + 1; c2 = 65536 + ((c2 & 1023) << 10 | c22); out += hexTable[240 | c2 >> 18] + hexTable[128 | c2 >> 12 & 63] + hexTable[128 | c2 >> 6 & 63] + hexTable[128 | c2 & 63]; } if (lastPos === 0) return str; if (lastPos < len) return out + str.slice(lastPos); return out; } __name(encodeString, "encodeString"); } }); // ../node_modules/picoquery/lib/shared.js var require_shared = __commonJS({ "../node_modules/picoquery/lib/shared.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.defaultOptions = exports.defaultShouldSerializeObject = exports.defaultValueSerializer = void 0; var string_util_js_1 = require_string_util(); var defaultValueSerializer = /* @__PURE__ */ __name((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; } if (value instanceof Date) { return (0, string_util_js_1.encodeString)(value.toISOString()); } return ""; }, "defaultValueSerializer"); exports.defaultValueSerializer = defaultValueSerializer; var defaultShouldSerializeObject = /* @__PURE__ */ __name((val) => { return val instanceof Date; }, "defaultShouldSerializeObject"); exports.defaultShouldSerializeObject = defaultShouldSerializeObject; var identityFunc = /* @__PURE__ */ __name((v2) => v2, "identityFunc"); exports.defaultOptions = { nesting: true, nestingSyntax: "dot", arrayRepeat: false, 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: true }); exports.getDeepObject = getDeepObject; exports.stringifyObject = stringifyObject; var shared_js_1 = require_shared(); var string_util_js_1 = require_string_util(); function isPrototypeKey(value) { return value === "__proto__" || value === "constructor" || value === "prototype"; } __name(isPrototypeKey, "isPrototypeKey"); function getDeepObject(obj, key, nextKey, forceObject, forceArray) { if (isPrototypeKey(key)) return obj; const currObj = obj[key]; if (typeof currObj === "object" && currObj !== null) { return currObj; } if (!forceObject && (forceArray || typeof nextKey === "number" || typeof nextKey === "string" && nextKey * 0 === 0 && nextKey.indexOf(".") === -1)) { return obj[key] = []; } return obj[key] = {}; } __name(getDeepObject, "getDeepObject"); var MAX_DEPTH = 20; var strBracketPair = "[]"; var strBracketLeft = "["; var strBracketRight = "]"; var strDot = "."; function stringifyObject(obj, options2, depth = 0, parentKey, isProbableArray) { const { 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 = shared_js_1.defaultOptions.delimiter, valueSerializer = shared_js_1.defaultOptions.valueSerializer, shouldSerializeObject = shared_js_1.defaultOptions.shouldSerializeObject } = options2; const strDelimiter = typeof delimiter === "number" ? String.fromCharCode(delimiter) : delimiter; const useArrayRepeatKey = isProbableArray === true && arrayRepeat; const shouldUseDot = nestingSyntax === "dot" || nestingSyntax === "js" && !isProbableArray; if (depth > MAX_DEPTH) { return ""; } let result = ""; let firstKey = true; let valueIsProbableArray = false; for (const key in obj) { const value = obj[key]; if (value === void 0) { continue; } let path; if (parentKey) { path = parentKey; if (useArrayRepeatKey) { if (arrayRepeatSyntax === "bracket") { path += strBracketPair; } } else if (shouldUseDot) { path += strDot; path += key; } else { path += strBracketLeft; path += key; path += strBracketRight; } } else { path = key; } if (!firstKey) { result += strDelimiter; } if (typeof value === "object" && value !== null && !shouldSerializeObject(value)) { valueIsProbableArray = value.pop !== void 0; if (nesting || arrayRepeat && valueIsProbableArray) { result += stringifyObject(value, options2, depth + 1, path, valueIsProbableArray); } } else { result += (0, string_util_js_1.encodeString)(path); result += "="; result += valueSerializer(value, key); } if (firstKey) { firstKey = false; } } return result; } __name(stringifyObject, "stringifyObject"); } }); // ../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: true }); exports.decodeURIComponent = decodeURIComponent; var UTF8_ACCEPT = 12; var UTF8_REJECT = 0; var 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 decodeURIComponent(uri) { let percentPosition = uri.indexOf("%"); if (percentPosition === -1) { return uri; } const length = uri.length; let decoded = ""; let last = 0; let codepoint = 0; let startOfOctets = percentPosition; let state = UTF8_ACCEPT; while (percentPosition > -1 && percentPosition < length) { const high = hexCodeToInt(uri[percentPosition + 1], 4); const low = hexCodeToInt(uri[percentPosition + 2], 0); const byte = high | low; const type = UTF8_DATA[byte]; state = UTF8_DATA[256 + state + type]; codepoint = codepoint << 6 | byte & UTF8_DATA[364 + type]; if (state === UTF8_ACCEPT) { decoded += uri.slice(last, startOfOctets); decoded += codepoint <= 65535 ? String.fromCharCode(codepoint) : String.fromCharCode(55232 + (codepoint >> 10), 56320 + (codepoint & 1023)); codepoint = 0; last = percentPosition + 3; percentPosition = startOfOctets = uri.indexOf("%", last); } else if (state === UTF8_REJECT) { return null; } else { percentPosition += 3; if (percentPosition < length && uri.charCodeAt(percentPosition) === 37) continue; return null; } } return decoded + uri.slice(last); } __name(decodeURIComponent, "decodeURIComponent"); 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(c2, shift) { const i2 = HEX[c2]; return i2 === void 0 ? 255 : i2 << shift; } __name(hexCodeToInt, "hexCodeToInt"); } }); // ../node_modules/picoquery/lib/parse.js var require_parse = __commonJS({ "../node_modules/picoquery/lib/parse.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.numberValueDeserializer = exports.numberKeyDeserializer = void 0; exports.parse = parse; var object_util_js_1 = require_object_util(); var shared_js_1 = require_shared(); var decode_uri_component_js_1 = require_decode_uri_component(); var numberKeyDeserializer = /* @__PURE__ */ __name((key) => { const asNumber = Number(key); if (!Number.isNaN(asNumber)) { return asNumber; } return key; }, "numberKeyDeserializer"); exports.numberKeyDeserializer = numberKeyDeserializer; var numberValueDeserializer = /* @__PURE__ */ __name((value) => { const asNumber = Number(value); if (!Number.isNaN(asNumber)) { return asNumber; } return value; }, "numberValueDeserializer"); exports.numberValueDeserializer = numberValueDeserializer; var regexPlus = /\+/g; var Empty = /* @__PURE__ */ __name(function() { }, "Empty"); Empty.prototype = /* @__PURE__ */ Object.create(null); function computeKeySlice(input, startIndex, endIndex, keyHasPlus, shouldDecodeKey) { let chunk = input.substring(startIndex, endIndex); if (keyHasPlus) { chunk = chunk.replace(regexPlus, " "); } if (shouldDecodeKey) { chunk = (0, decode_uri_component_js_1.decodeURIComponent)(chunk) || chunk; } return chunk; } __name(computeKeySlice, "computeKeySlice"); function parse(input, options2) { const { 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 = shared_js_1.defaultOptions.delimiter } = options2 ?? {}; const charDelimiter = typeof delimiter === "string" ? delimiter.charCodeAt(0) : delimiter; const isJsNestingSyntax = nestingSyntax === "js"; const result = new Empty(); if (typeof input !== "string") { return result; } const inputLength = input.length; let value = ""; let startingIndex = -1; let equalityIndex = -1; let keySeparatorIndex = -1; let currentObj = result; let lastKey = void 0; let currentKey = ""; let keyChunk = ""; let shouldDecodeKey = false; let shouldDecodeValue = false; let keyHasPlus = false; let valueHasPlus = false; let keyIsDot = false; let hasBothKeyValuePair = false; let c2 = 0; let arrayRepeatBracketIndex = -1; let prevIndex = -1; let prevChar = -1; for (let i2 = 0; i2 < inputLength + 1; i2++) { c2 = i2 !== inputLength ? input.charCodeAt(i2) : charDelimiter; if (c2 === charDelimiter) { hasBothKeyValuePair = equalityIndex > startingIndex; if (!hasBothKeyValuePair) { equalityIndex = i2; } if (keySeparatorIndex !== equalityIndex - 1) { keyChunk = computeKeySlice(input, keySeparatorIndex + 1, arrayRepeatBracketIndex > -1 ? arrayRepeatBracketIndex : equalityIndex, keyHasPlus, shouldDecodeKey); currentKey = keyDeserializer(keyChunk); if (lastKey !== void 0) { currentObj = (0, object_util_js_1.getDeepObject)(currentObj, lastKey, currentKey, isJsNestingSyntax && keyIsDot, void 0); } } if (hasBothKeyValuePair || currentKey !== "") { if (hasBothKeyValuePair) { value = input.slice(equalityIndex + 1, i2); if (valueHasPlus) { value = value.replace(regexPlus, " "); } if (shouldDecodeValue) { value = (0, decode_uri_component_js_1.decodeURIComponent)(value) || value; } } const newValue = valueDeserializer(value, currentKey); if (arrayRepeat) { const currentValue = currentObj[currentKey]; if (currentValue === void 0) { if (arrayRepeatBracketIndex > -1) { currentObj[currentKey] = [newValue]; } else { currentObj[currentKey] = newValue; } } else if (currentValue.pop) { currentValue.push(newValue); } else { currentObj[currentKey] = [currentValue, newValue]; } } else currentObj[currentKey] = newValue; } value = ""; startingIndex = i2; equalityIndex = i2; shouldDecodeKey = false; shouldDecodeValue = false; keyHasPlus = false; valueHasPlus = false; keyIsDot = false; arrayRepeatBracketIndex = -1; keySeparatorIndex = i2; currentObj = result; lastKey = void 0; currentKey = ""; } else if (c2 === 93) { if (arrayRepeat && arrayRepeatSyntax === "bracket") { if (prevChar === 91) { arrayRepeatBracketIndex = prevIndex; } } if (nesting && (nestingSyntax === "index" || isJsNestingSyntax) && equalityIndex <= startingIndex) { if (keySeparatorIndex !== prevIndex) { keyChunk = computeKeySlice(input, keySeparatorIndex + 1, i2, keyHasPlus, shouldDecodeKey); currentKey = keyDeserializer(keyChunk); if (lastKey !== void 0) { currentObj = (0, object_util_js_1.getDeepObject)(currentObj, lastKey, currentKey, void 0, void 0); } lastKey = currentKey; keyHasPlus = false; shouldDecodeKey = false; } keySeparatorIndex = i2; keyIsDot = false; } } else if (c2 === 46) { if (nesting && (nestingSyntax === "dot" || isJsNestingSyntax) && equalityIndex <= startingIndex) { if (keySeparatorIndex !== prevIndex) { keyChunk = computeKeySlice(input, keySeparatorIndex + 1, i2, keyHasPlus, shouldDecodeKey); currentKey = keyDeserializer(keyChunk); if (lastKey !== void 0) { currentObj = (0, object_util_js_1.getDeepObject)(currentObj, lastKey, currentKey, isJsNestingSyntax); } lastKey = currentKey; keyHasPlus = false; shouldDecodeKey = false; } keyIsDot = true; keySeparatorIndex = i2; } } else if (c2 === 91) { if (nesting && (nestingSyntax === "index" || isJsNestingSyntax) && equalityIndex <= startingIndex) { if (keySeparatorIndex !== prevIndex) { keyChunk = computeKeySlice(input, keySeparatorIndex + 1, i2, keyHasPlus, shouldDecodeKey); currentKey = keyDeserializer(keyChunk); if (isJsNestingSyntax && lastKey !== void 0) { currentObj = (0, object_util_js_1.getDeepObject)(currentObj, lastKey, currentKey, isJsNestingSyntax); } lastKey = currentKey; keyHasPlus = false; shouldDecodeKey = false; keyIsDot = false; } keySeparatorIndex = i2; } } else if (c2 === 61) { if (equalityIndex <= startingIndex) { equalityIndex = i2; } else { shouldDecodeValue = true; } } else if (c2 === 43) { if (equalityIndex > startingIndex) { valueHasPlus = true; } else { keyHasPlus = true; } } else if (c2 === 37) { if (equalityIndex > startingIndex) { shouldDecodeValue = true; } else { shouldDecodeKey = true; } } prevIndex = i2; prevChar = c2; } return result; } __name(parse, "parse"); } }); // ../node_modules/picoquery/lib/stringify.js var require_stringify = __commonJS({ "../node_modules/picoquery/lib/stringify.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.stringify = stringify2; var object_util_js_1 = require_object_util(); function stringify2(input, options2) { if (input === null || typeof input !== "object") { return ""; } const optionsObj = options2 ?? {}; return (0, object_util_js_1.stringifyObject)(input, optionsObj); } __name(stringify2, "stringify"); } }); // ../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(o3, m2, k2, k22) { if (k22 === void 0) k22 = k2; var desc = Object.getOwnPropertyDescriptor(m2, k2); if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: /* @__PURE__ */ __name(function() { return m2[k2]; }, "get") }; } Object.defineProperty(o3, k22, desc); } : function(o3, m2, k2, k22) { if (k22 === void 0) k22 = k2; o3[k22] = m2[k2]; }); var __exportStar = exports && exports.__exportStar || function(m2, exports2) { for (var p2 in m2) if (p2 !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p2)) __createBinding(exports2, m2, p2); }; Object.defineProperty(exports, "__esModule", { value: true }); exports.stringify = exports.parse = void 0; var parse_js_1 = require_parse(); Object.defineProperty(exports, "parse", { enumerable: true, get: /* @__PURE__ */ __name(function() { return parse_js_1.parse; }, "get") }); var stringify_js_1 = require_stringify(); Object.defineProperty(exports, "stringify", { enumerable: true, get: /* @__PURE__ */ __name(function() { return stringify_js_1.stringify; }, "get") }); __exportStar(require_shared(), exports); } }); // ../node_modules/toggle-selection/index.js var require_toggle_selection = __commonJS({ "../node_modules/toggle-selection/index.js"(exports, module) { module.exports = function() { var selection = document.getSelection(); if (!selection.rangeCount) { return function() { }; } var active = document.activeElement; var ranges = []; for (var i2 = 0; i2 < selection.rangeCount; i2++) { ranges.push(selection.getRangeAt(i2)); } switch (active.tagName.toUpperCase()) { // .toUpperCase handles XHTML case "INPUT": case "TEXTAREA": active.blur(); break; default: active = null; break; } selection.removeAllRanges(); return function() { selection.type === "Caret" && selection.removeAllRanges(); if (!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, module) { "use strict"; var deselectCurrent = require_toggle_selection(); var clipboardToIE11Formatting = { "text/plain": "Text", "text/html": "Url", "default": "Text" }; var defaultMessage = "Copy to clipboard: #{key}, Enter"; function format(message) { var copyKey = (/mac os x/i.test(navigator.userAgent) ? "\u2318" : "Ctrl") + "+C"; return message.replace(/#{\s*key\s*}/g, copyKey); } __name(format, "format"); function copy3(text, options2) { var debug, message, reselectPrevious, range, selection, mark, success = false; if (!options2) { options2 = {}; } debug = options2.debug || false; 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(e2) { e2.stopPropagation(); if (options2.format) { e2.preventDefault(); if (typeof e2.clipboardData === "undefined") { debug && console.warn("unable to use e.clipboardData"); debug && console.warn("trying IE specific stuff"); window.clipboardData.clearData(); var format2 = clipboardToIE11Formatting[options2.format] || clipboardToIE11Formatting["default"]; window.clipboardData.setData(format2, text); } else { e2.clipboardData.clearData(); e2.clipboardData.setData(options2.format, text); } } if (options2.onCopy) { e2.preventDefault(); options2.onCopy(e2.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 = true; } catch (err) { debug && console.error("unable to copy using execCommand: ", err); debug && console.warn("trying IE specific stuff"); try { window.clipboardData.setData(options2.format || "text", text); options2.onCopy && options2.onCopy(window.clipboardData); success = true; } catch (err2) { debug && console.error("unable to copy using clipboardData: ", err2); debug && console.error("falling back to prompt"); message = format("message" in options2 ? options2.message : defaultMessage); window.prompt(message, text); } } finally { if (selection) { if (typeof selection.removeRange == "function") { selection.removeRange(range); } else { selection.removeAllRanges(); } } if (mark) { document.body.removeChild(mark); } reselectPrevious(); } return success; } __name(copy3, "copy"); module.exports = copy3; } }); // ../node_modules/downshift/node_modules/react-is/cjs/react-is.production.min.js var require_react_is_production_min = __commonJS({ "../node_modules/downshift/node_modules/react-is/cjs/react-is.production.min.js"(exports) { "use strict"; var b2 = Symbol.for("react.element"); var c2 = Symbol.for("react.portal"); var d2 = Symbol.for("react.fragment"); var e2 = Symbol.for("react.strict_mode"); var f2 = Symbol.for("react.profiler"); var g2 = Symbol.for("react.provider"); var h2 = Symbol.for("react.context"); var k2 = Symbol.for("react.server_context"); var l3 = Symbol.for("react.forward_ref"); var m2 = Symbol.for("react.suspense"); var n3 = Symbol.for("react.suspense_list"); var p2 = Symbol.for("react.memo"); var q2 = Symbol.for("react.lazy"); var t2 = Symbol.for("react.offscreen"); var u2; u2 = Symbol.for("react.module.reference"); function v2(a2) { if ("object" === typeof a2 && null !== a2) { var r3 = a2.$$typeof; switch (r3) { case b2: switch (a2 = a2.type, a2) { case d2: case f2: case e2: case m2: case n3: return a2; default: switch (a2 = a2 && a2.$$typeof, a2) { case k2: case h2: case l3: case q2: case p2: case g2: return a2; default: return r3; } } case c2: return r3; } } } __name(v2, "v"); exports.ContextConsumer = h2; exports.ContextProvider = g2; exports.Element = b2; exports.ForwardRef =