{"version":3,"file":"index.mjs","sources":["../../../../../node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react-jsx-runtime.development.js","../../../../../node_modules/.pnpm/react@18.3.1/node_modules/react/jsx-runtime.js","../../../../../node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../src/js-frameworks/react/contexts/Insight.context.tsx","../../../src/js-frameworks/react/hooks/usePixel.ts","../../../src/js-frameworks/react/hooks/use-iterator-pixel.ts","../../../src/js-frameworks/react/hooks/useDebouncedCallback.ts","../../../src/js-frameworks/react/hooks/useDebouncedValue.ts","../../../src/js-frameworks/react/hooks/useInsight.ts","../../../src/js-frameworks/react/hooks/useWebSocket.ts"],"sourcesContent":["/**\n * @license React\n * react-jsx-runtime.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nif (process.env.NODE_ENV !== \"production\") {\n  (function() {\n'use strict';\n\nvar React = require('react');\n\n// ATTENTION\n// When adding new symbols to this file,\n// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'\n// The Symbol used to tag the ReactElement-like types.\nvar REACT_ELEMENT_TYPE = Symbol.for('react.element');\nvar REACT_PORTAL_TYPE = Symbol.for('react.portal');\nvar REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');\nvar REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');\nvar REACT_PROFILER_TYPE = Symbol.for('react.profiler');\nvar REACT_PROVIDER_TYPE = Symbol.for('react.provider');\nvar REACT_CONTEXT_TYPE = Symbol.for('react.context');\nvar REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');\nvar REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');\nvar REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');\nvar REACT_MEMO_TYPE = Symbol.for('react.memo');\nvar REACT_LAZY_TYPE = Symbol.for('react.lazy');\nvar REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');\nvar MAYBE_ITERATOR_SYMBOL = Symbol.iterator;\nvar FAUX_ITERATOR_SYMBOL = '@@iterator';\nfunction getIteratorFn(maybeIterable) {\n  if (maybeIterable === null || typeof maybeIterable !== 'object') {\n    return null;\n  }\n\n  var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];\n\n  if (typeof maybeIterator === 'function') {\n    return maybeIterator;\n  }\n\n  return null;\n}\n\nvar ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n\nfunction error(format) {\n  {\n    {\n      for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n        args[_key2 - 1] = arguments[_key2];\n      }\n\n      printWarning('error', format, args);\n    }\n  }\n}\n\nfunction printWarning(level, format, args) {\n  // When changing this logic, you might want to also\n  // update consoleWithStackDev.www.js as well.\n  {\n    var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n    var stack = ReactDebugCurrentFrame.getStackAddendum();\n\n    if (stack !== '') {\n      format += '%s';\n      args = args.concat([stack]);\n    } // eslint-disable-next-line react-internal/safe-string-coercion\n\n\n    var argsWithFormat = args.map(function (item) {\n      return String(item);\n    }); // Careful: RN currently depends on this prefix\n\n    argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it\n    // breaks IE9: https://github.com/facebook/react/issues/13610\n    // eslint-disable-next-line react-internal/no-production-logging\n\n    Function.prototype.apply.call(console[level], console, argsWithFormat);\n  }\n}\n\n// -----------------------------------------------------------------------------\n\nvar enableScopeAPI = false; // Experimental Create Event Handle API.\nvar enableCacheElement = false;\nvar enableTransitionTracing = false; // No known bugs, but needs performance testing\n\nvar enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber\n// stuff. Intended to enable React core members to more easily debug scheduling\n// issues in DEV builds.\n\nvar enableDebugTracing = false; // Track which Fiber(s) schedule render work.\n\nvar REACT_MODULE_REFERENCE;\n\n{\n  REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');\n}\n\nfunction isValidElementType(type) {\n  if (typeof type === 'string' || typeof type === 'function') {\n    return true;\n  } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).\n\n\n  if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing  || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden  || type === REACT_OFFSCREEN_TYPE || enableScopeAPI  || enableCacheElement  || enableTransitionTracing ) {\n    return true;\n  }\n\n  if (typeof type === 'object' && type !== null) {\n    if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object\n    // types supported by any Flight configuration anywhere since\n    // we don't know which Flight build this will end up being used\n    // with.\n    type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {\n      return true;\n    }\n  }\n\n  return false;\n}\n\nfunction getWrappedName(outerType, innerType, wrapperName) {\n  var displayName = outerType.displayName;\n\n  if (displayName) {\n    return displayName;\n  }\n\n  var functionName = innerType.displayName || innerType.name || '';\n  return functionName !== '' ? wrapperName + \"(\" + functionName + \")\" : wrapperName;\n} // Keep in sync with react-reconciler/getComponentNameFromFiber\n\n\nfunction getContextName(type) {\n  return type.displayName || 'Context';\n} // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead.\n\n\nfunction getComponentNameFromType(type) {\n  if (type == null) {\n    // Host root, text node or just invalid type.\n    return null;\n  }\n\n  {\n    if (typeof type.tag === 'number') {\n      error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.');\n    }\n  }\n\n  if (typeof type === 'function') {\n    return type.displayName || type.name || null;\n  }\n\n  if (typeof type === 'string') {\n    return type;\n  }\n\n  switch (type) {\n    case REACT_FRAGMENT_TYPE:\n      return 'Fragment';\n\n    case REACT_PORTAL_TYPE:\n      return 'Portal';\n\n    case REACT_PROFILER_TYPE:\n      return 'Profiler';\n\n    case REACT_STRICT_MODE_TYPE:\n      return 'StrictMode';\n\n    case REACT_SUSPENSE_TYPE:\n      return 'Suspense';\n\n    case REACT_SUSPENSE_LIST_TYPE:\n      return 'SuspenseList';\n\n  }\n\n  if (typeof type === 'object') {\n    switch (type.$$typeof) {\n      case REACT_CONTEXT_TYPE:\n        var context = type;\n        return getContextName(context) + '.Consumer';\n\n      case REACT_PROVIDER_TYPE:\n        var provider = type;\n        return getContextName(provider._context) + '.Provider';\n\n      case REACT_FORWARD_REF_TYPE:\n        return getWrappedName(type, type.render, 'ForwardRef');\n\n      case REACT_MEMO_TYPE:\n        var outerName = type.displayName || null;\n\n        if (outerName !== null) {\n          return outerName;\n        }\n\n        return getComponentNameFromType(type.type) || 'Memo';\n\n      case REACT_LAZY_TYPE:\n        {\n          var lazyComponent = type;\n          var payload = lazyComponent._payload;\n          var init = lazyComponent._init;\n\n          try {\n            return getComponentNameFromType(init(payload));\n          } catch (x) {\n            return null;\n          }\n        }\n\n      // eslint-disable-next-line no-fallthrough\n    }\n  }\n\n  return null;\n}\n\nvar assign = Object.assign;\n\n// Helpers to patch console.logs to avoid logging during side-effect free\n// replaying on render function. This currently only patches the object\n// lazily which won't cover if the log function was extracted eagerly.\n// We could also eagerly patch the method.\nvar disabledDepth = 0;\nvar prevLog;\nvar prevInfo;\nvar prevWarn;\nvar prevError;\nvar prevGroup;\nvar prevGroupCollapsed;\nvar prevGroupEnd;\n\nfunction disabledLog() {}\n\ndisabledLog.__reactDisabledLog = true;\nfunction disableLogs() {\n  {\n    if (disabledDepth === 0) {\n      /* eslint-disable react-internal/no-production-logging */\n      prevLog = console.log;\n      prevInfo = console.info;\n      prevWarn = console.warn;\n      prevError = console.error;\n      prevGroup = console.group;\n      prevGroupCollapsed = console.groupCollapsed;\n      prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099\n\n      var props = {\n        configurable: true,\n        enumerable: true,\n        value: disabledLog,\n        writable: true\n      }; // $FlowFixMe Flow thinks console is immutable.\n\n      Object.defineProperties(console, {\n        info: props,\n        log: props,\n        warn: props,\n        error: props,\n        group: props,\n        groupCollapsed: props,\n        groupEnd: props\n      });\n      /* eslint-enable react-internal/no-production-logging */\n    }\n\n    disabledDepth++;\n  }\n}\nfunction reenableLogs() {\n  {\n    disabledDepth--;\n\n    if (disabledDepth === 0) {\n      /* eslint-disable react-internal/no-production-logging */\n      var props = {\n        configurable: true,\n        enumerable: true,\n        writable: true\n      }; // $FlowFixMe Flow thinks console is immutable.\n\n      Object.defineProperties(console, {\n        log: assign({}, props, {\n          value: prevLog\n        }),\n        info: assign({}, props, {\n          value: prevInfo\n        }),\n        warn: assign({}, props, {\n          value: prevWarn\n        }),\n        error: assign({}, props, {\n          value: prevError\n        }),\n        group: assign({}, props, {\n          value: prevGroup\n        }),\n        groupCollapsed: assign({}, props, {\n          value: prevGroupCollapsed\n        }),\n        groupEnd: assign({}, props, {\n          value: prevGroupEnd\n        })\n      });\n      /* eslint-enable react-internal/no-production-logging */\n    }\n\n    if (disabledDepth < 0) {\n      error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');\n    }\n  }\n}\n\nvar ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;\nvar prefix;\nfunction describeBuiltInComponentFrame(name, source, ownerFn) {\n  {\n    if (prefix === undefined) {\n      // Extract the VM specific prefix used by each line.\n      try {\n        throw Error();\n      } catch (x) {\n        var match = x.stack.trim().match(/\\n( *(at )?)/);\n        prefix = match && match[1] || '';\n      }\n    } // We use the prefix to ensure our stacks line up with native stack frames.\n\n\n    return '\\n' + prefix + name;\n  }\n}\nvar reentry = false;\nvar componentFrameCache;\n\n{\n  var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;\n  componentFrameCache = new PossiblyWeakMap();\n}\n\nfunction describeNativeComponentFrame(fn, construct) {\n  // If something asked for a stack inside a fake render, it should get ignored.\n  if ( !fn || reentry) {\n    return '';\n  }\n\n  {\n    var frame = componentFrameCache.get(fn);\n\n    if (frame !== undefined) {\n      return frame;\n    }\n  }\n\n  var control;\n  reentry = true;\n  var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.\n\n  Error.prepareStackTrace = undefined;\n  var previousDispatcher;\n\n  {\n    previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function\n    // for warnings.\n\n    ReactCurrentDispatcher.current = null;\n    disableLogs();\n  }\n\n  try {\n    // This should throw.\n    if (construct) {\n      // Something should be setting the props in the constructor.\n      var Fake = function () {\n        throw Error();\n      }; // $FlowFixMe\n\n\n      Object.defineProperty(Fake.prototype, 'props', {\n        set: function () {\n          // We use a throwing setter instead of frozen or non-writable props\n          // because that won't throw in a non-strict mode function.\n          throw Error();\n        }\n      });\n\n      if (typeof Reflect === 'object' && Reflect.construct) {\n        // We construct a different control for this case to include any extra\n        // frames added by the construct call.\n        try {\n          Reflect.construct(Fake, []);\n        } catch (x) {\n          control = x;\n        }\n\n        Reflect.construct(fn, [], Fake);\n      } else {\n        try {\n          Fake.call();\n        } catch (x) {\n          control = x;\n        }\n\n        fn.call(Fake.prototype);\n      }\n    } else {\n      try {\n        throw Error();\n      } catch (x) {\n        control = x;\n      }\n\n      fn();\n    }\n  } catch (sample) {\n    // This is inlined manually because closure doesn't do it for us.\n    if (sample && control && typeof sample.stack === 'string') {\n      // This extracts the first frame from the sample that isn't also in the control.\n      // Skipping one frame that we assume is the frame that calls the two.\n      var sampleLines = sample.stack.split('\\n');\n      var controlLines = control.stack.split('\\n');\n      var s = sampleLines.length - 1;\n      var c = controlLines.length - 1;\n\n      while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {\n        // We expect at least one stack frame to be shared.\n        // Typically this will be the root most one. However, stack frames may be\n        // cut off due to maximum stack limits. In this case, one maybe cut off\n        // earlier than the other. We assume that the sample is longer or the same\n        // and there for cut off earlier. So we should find the root most frame in\n        // the sample somewhere in the control.\n        c--;\n      }\n\n      for (; s >= 1 && c >= 0; s--, c--) {\n        // Next we find the first one that isn't the same which should be the\n        // frame that called our sample function and the control.\n        if (sampleLines[s] !== controlLines[c]) {\n          // In V8, the first line is describing the message but other VMs don't.\n          // If we're about to return the first line, and the control is also on the same\n          // line, that's a pretty good indicator that our sample threw at same line as\n          // the control. I.e. before we entered the sample frame. So we ignore this result.\n          // This can happen if you passed a class to function component, or non-function.\n          if (s !== 1 || c !== 1) {\n            do {\n              s--;\n              c--; // We may still have similar intermediate frames from the construct call.\n              // The next one that isn't the same should be our match though.\n\n              if (c < 0 || sampleLines[s] !== controlLines[c]) {\n                // V8 adds a \"new\" prefix for native classes. Let's remove it to make it prettier.\n                var _frame = '\\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled \"<anonymous>\"\n                // but we have a user-provided \"displayName\"\n                // splice it in to make the stack more readable.\n\n\n                if (fn.displayName && _frame.includes('<anonymous>')) {\n                  _frame = _frame.replace('<anonymous>', fn.displayName);\n                }\n\n                {\n                  if (typeof fn === 'function') {\n                    componentFrameCache.set(fn, _frame);\n                  }\n                } // Return the line we found.\n\n\n                return _frame;\n              }\n            } while (s >= 1 && c >= 0);\n          }\n\n          break;\n        }\n      }\n    }\n  } finally {\n    reentry = false;\n\n    {\n      ReactCurrentDispatcher.current = previousDispatcher;\n      reenableLogs();\n    }\n\n    Error.prepareStackTrace = previousPrepareStackTrace;\n  } // Fallback to just using the name if we couldn't make it throw.\n\n\n  var name = fn ? fn.displayName || fn.name : '';\n  var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';\n\n  {\n    if (typeof fn === 'function') {\n      componentFrameCache.set(fn, syntheticFrame);\n    }\n  }\n\n  return syntheticFrame;\n}\nfunction describeFunctionComponentFrame(fn, source, ownerFn) {\n  {\n    return describeNativeComponentFrame(fn, false);\n  }\n}\n\nfunction shouldConstruct(Component) {\n  var prototype = Component.prototype;\n  return !!(prototype && prototype.isReactComponent);\n}\n\nfunction describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {\n\n  if (type == null) {\n    return '';\n  }\n\n  if (typeof type === 'function') {\n    {\n      return describeNativeComponentFrame(type, shouldConstruct(type));\n    }\n  }\n\n  if (typeof type === 'string') {\n    return describeBuiltInComponentFrame(type);\n  }\n\n  switch (type) {\n    case REACT_SUSPENSE_TYPE:\n      return describeBuiltInComponentFrame('Suspense');\n\n    case REACT_SUSPENSE_LIST_TYPE:\n      return describeBuiltInComponentFrame('SuspenseList');\n  }\n\n  if (typeof type === 'object') {\n    switch (type.$$typeof) {\n      case REACT_FORWARD_REF_TYPE:\n        return describeFunctionComponentFrame(type.render);\n\n      case REACT_MEMO_TYPE:\n        // Memo may contain any component type so we recursively resolve it.\n        return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);\n\n      case REACT_LAZY_TYPE:\n        {\n          var lazyComponent = type;\n          var payload = lazyComponent._payload;\n          var init = lazyComponent._init;\n\n          try {\n            // Lazy may contain any component type so we recursively resolve it.\n            return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);\n          } catch (x) {}\n        }\n    }\n  }\n\n  return '';\n}\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nvar loggedTypeFailures = {};\nvar ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n\nfunction setCurrentlyValidatingElement(element) {\n  {\n    if (element) {\n      var owner = element._owner;\n      var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n      ReactDebugCurrentFrame.setExtraStackFrame(stack);\n    } else {\n      ReactDebugCurrentFrame.setExtraStackFrame(null);\n    }\n  }\n}\n\nfunction checkPropTypes(typeSpecs, values, location, componentName, element) {\n  {\n    // $FlowFixMe This is okay but Flow doesn't know it.\n    var has = Function.call.bind(hasOwnProperty);\n\n    for (var typeSpecName in typeSpecs) {\n      if (has(typeSpecs, typeSpecName)) {\n        var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to\n        // fail the render phase where it didn't fail before. So we log it.\n        // After these have been cleaned up, we'll let them throw.\n\n        try {\n          // This is intentionally an invariant that gets caught. It's the same\n          // behavior as without this statement except with a better message.\n          if (typeof typeSpecs[typeSpecName] !== 'function') {\n            // eslint-disable-next-line react-internal/prod-error-codes\n            var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');\n            err.name = 'Invariant Violation';\n            throw err;\n          }\n\n          error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');\n        } catch (ex) {\n          error$1 = ex;\n        }\n\n        if (error$1 && !(error$1 instanceof Error)) {\n          setCurrentlyValidatingElement(element);\n\n          error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1);\n\n          setCurrentlyValidatingElement(null);\n        }\n\n        if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {\n          // Only monitor this failure once because there tends to be a lot of the\n          // same error.\n          loggedTypeFailures[error$1.message] = true;\n          setCurrentlyValidatingElement(element);\n\n          error('Failed %s type: %s', location, error$1.message);\n\n          setCurrentlyValidatingElement(null);\n        }\n      }\n    }\n  }\n}\n\nvar isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare\n\nfunction isArray(a) {\n  return isArrayImpl(a);\n}\n\n/*\n * The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol\n * and Temporal.* types. See https://github.com/facebook/react/pull/22064.\n *\n * The functions in this module will throw an easier-to-understand,\n * easier-to-debug exception with a clear errors message message explaining the\n * problem. (Instead of a confusing exception thrown inside the implementation\n * of the `value` object).\n */\n// $FlowFixMe only called in DEV, so void return is not possible.\nfunction typeName(value) {\n  {\n    // toStringTag is needed for namespaced types like Temporal.Instant\n    var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;\n    var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object';\n    return type;\n  }\n} // $FlowFixMe only called in DEV, so void return is not possible.\n\n\nfunction willCoercionThrow(value) {\n  {\n    try {\n      testStringCoercion(value);\n      return false;\n    } catch (e) {\n      return true;\n    }\n  }\n}\n\nfunction testStringCoercion(value) {\n  // If you ended up here by following an exception call stack, here's what's\n  // happened: you supplied an object or symbol value to React (as a prop, key,\n  // DOM attribute, CSS property, string ref, etc.) and when React tried to\n  // coerce it to a string using `'' + value`, an exception was thrown.\n  //\n  // The most common types that will cause this exception are `Symbol` instances\n  // and Temporal objects like `Temporal.Instant`. But any object that has a\n  // `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this\n  // exception. (Library authors do this to prevent users from using built-in\n  // numeric operators like `+` or comparison operators like `>=` because custom\n  // methods are needed to perform accurate arithmetic or comparison.)\n  //\n  // To fix the problem, coerce this object or symbol value to a string before\n  // passing it to React. The most reliable way is usually `String(value)`.\n  //\n  // To find which value is throwing, check the browser or debugger console.\n  // Before this exception was thrown, there should be `console.error` output\n  // that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the\n  // problem and how that type was used: key, atrribute, input value prop, etc.\n  // In most cases, this console output also shows the component and its\n  // ancestor components where the exception happened.\n  //\n  // eslint-disable-next-line react-internal/safe-string-coercion\n  return '' + value;\n}\nfunction checkKeyStringCoercion(value) {\n  {\n    if (willCoercionThrow(value)) {\n      error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));\n\n      return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n    }\n  }\n}\n\nvar ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;\nvar RESERVED_PROPS = {\n  key: true,\n  ref: true,\n  __self: true,\n  __source: true\n};\nvar specialPropKeyWarningShown;\nvar specialPropRefWarningShown;\nvar didWarnAboutStringRefs;\n\n{\n  didWarnAboutStringRefs = {};\n}\n\nfunction hasValidRef(config) {\n  {\n    if (hasOwnProperty.call(config, 'ref')) {\n      var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;\n\n      if (getter && getter.isReactWarning) {\n        return false;\n      }\n    }\n  }\n\n  return config.ref !== undefined;\n}\n\nfunction hasValidKey(config) {\n  {\n    if (hasOwnProperty.call(config, 'key')) {\n      var getter = Object.getOwnPropertyDescriptor(config, 'key').get;\n\n      if (getter && getter.isReactWarning) {\n        return false;\n      }\n    }\n  }\n\n  return config.key !== undefined;\n}\n\nfunction warnIfStringRefCannotBeAutoConverted(config, self) {\n  {\n    if (typeof config.ref === 'string' && ReactCurrentOwner.current && self && ReactCurrentOwner.current.stateNode !== self) {\n      var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);\n\n      if (!didWarnAboutStringRefs[componentName]) {\n        error('Component \"%s\" contains the string ref \"%s\". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', getComponentNameFromType(ReactCurrentOwner.current.type), config.ref);\n\n        didWarnAboutStringRefs[componentName] = true;\n      }\n    }\n  }\n}\n\nfunction defineKeyPropWarningGetter(props, displayName) {\n  {\n    var warnAboutAccessingKey = function () {\n      if (!specialPropKeyWarningShown) {\n        specialPropKeyWarningShown = true;\n\n        error('%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);\n      }\n    };\n\n    warnAboutAccessingKey.isReactWarning = true;\n    Object.defineProperty(props, 'key', {\n      get: warnAboutAccessingKey,\n      configurable: true\n    });\n  }\n}\n\nfunction defineRefPropWarningGetter(props, displayName) {\n  {\n    var warnAboutAccessingRef = function () {\n      if (!specialPropRefWarningShown) {\n        specialPropRefWarningShown = true;\n\n        error('%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);\n      }\n    };\n\n    warnAboutAccessingRef.isReactWarning = true;\n    Object.defineProperty(props, 'ref', {\n      get: warnAboutAccessingRef,\n      configurable: true\n    });\n  }\n}\n/**\n * Factory method to create a new React element. This no longer adheres to\n * the class pattern, so do not use new to call it. Also, instanceof check\n * will not work. Instead test $$typeof field against Symbol.for('react.element') to check\n * if something is a React Element.\n *\n * @param {*} type\n * @param {*} props\n * @param {*} key\n * @param {string|object} ref\n * @param {*} owner\n * @param {*} self A *temporary* helper to detect places where `this` is\n * different from the `owner` when React.createElement is called, so that we\n * can warn. We want to get rid of owner and replace string `ref`s with arrow\n * functions, and as long as `this` and owner are the same, there will be no\n * change in behavior.\n * @param {*} source An annotation object (added by a transpiler or otherwise)\n * indicating filename, line number, and/or other information.\n * @internal\n */\n\n\nvar ReactElement = function (type, key, ref, self, source, owner, props) {\n  var element = {\n    // This tag allows us to uniquely identify this as a React Element\n    $$typeof: REACT_ELEMENT_TYPE,\n    // Built-in properties that belong on the element\n    type: type,\n    key: key,\n    ref: ref,\n    props: props,\n    // Record the component responsible for creating this element.\n    _owner: owner\n  };\n\n  {\n    // The validation flag is currently mutative. We put it on\n    // an external backing store so that we can freeze the whole object.\n    // This can be replaced with a WeakMap once they are implemented in\n    // commonly used development environments.\n    element._store = {}; // To make comparing ReactElements easier for testing purposes, we make\n    // the validation flag non-enumerable (where possible, which should\n    // include every environment we run tests in), so the test framework\n    // ignores it.\n\n    Object.defineProperty(element._store, 'validated', {\n      configurable: false,\n      enumerable: false,\n      writable: true,\n      value: false\n    }); // self and source are DEV only properties.\n\n    Object.defineProperty(element, '_self', {\n      configurable: false,\n      enumerable: false,\n      writable: false,\n      value: self\n    }); // Two elements created in two different places should be considered\n    // equal for testing purposes and therefore we hide it from enumeration.\n\n    Object.defineProperty(element, '_source', {\n      configurable: false,\n      enumerable: false,\n      writable: false,\n      value: source\n    });\n\n    if (Object.freeze) {\n      Object.freeze(element.props);\n      Object.freeze(element);\n    }\n  }\n\n  return element;\n};\n/**\n * https://github.com/reactjs/rfcs/pull/107\n * @param {*} type\n * @param {object} props\n * @param {string} key\n */\n\nfunction jsxDEV(type, config, maybeKey, source, self) {\n  {\n    var propName; // Reserved names are extracted\n\n    var props = {};\n    var key = null;\n    var ref = null; // Currently, key can be spread in as a prop. This causes a potential\n    // issue if key is also explicitly declared (ie. <div {...props} key=\"Hi\" />\n    // or <div key=\"Hi\" {...props} /> ). We want to deprecate key spread,\n    // but as an intermediary step, we will use jsxDEV for everything except\n    // <div {...props} key=\"Hi\" />, because we aren't currently able to tell if\n    // key is explicitly declared to be undefined or not.\n\n    if (maybeKey !== undefined) {\n      {\n        checkKeyStringCoercion(maybeKey);\n      }\n\n      key = '' + maybeKey;\n    }\n\n    if (hasValidKey(config)) {\n      {\n        checkKeyStringCoercion(config.key);\n      }\n\n      key = '' + config.key;\n    }\n\n    if (hasValidRef(config)) {\n      ref = config.ref;\n      warnIfStringRefCannotBeAutoConverted(config, self);\n    } // Remaining properties are added to a new props object\n\n\n    for (propName in config) {\n      if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n        props[propName] = config[propName];\n      }\n    } // Resolve default props\n\n\n    if (type && type.defaultProps) {\n      var defaultProps = type.defaultProps;\n\n      for (propName in defaultProps) {\n        if (props[propName] === undefined) {\n          props[propName] = defaultProps[propName];\n        }\n      }\n    }\n\n    if (key || ref) {\n      var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n      if (key) {\n        defineKeyPropWarningGetter(props, displayName);\n      }\n\n      if (ref) {\n        defineRefPropWarningGetter(props, displayName);\n      }\n    }\n\n    return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n  }\n}\n\nvar ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;\nvar ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;\n\nfunction setCurrentlyValidatingElement$1(element) {\n  {\n    if (element) {\n      var owner = element._owner;\n      var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n      ReactDebugCurrentFrame$1.setExtraStackFrame(stack);\n    } else {\n      ReactDebugCurrentFrame$1.setExtraStackFrame(null);\n    }\n  }\n}\n\nvar propTypesMisspellWarningShown;\n\n{\n  propTypesMisspellWarningShown = false;\n}\n/**\n * Verifies the object is a ReactElement.\n * See https://reactjs.org/docs/react-api.html#isvalidelement\n * @param {?object} object\n * @return {boolean} True if `object` is a ReactElement.\n * @final\n */\n\n\nfunction isValidElement(object) {\n  {\n    return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n  }\n}\n\nfunction getDeclarationErrorAddendum() {\n  {\n    if (ReactCurrentOwner$1.current) {\n      var name = getComponentNameFromType(ReactCurrentOwner$1.current.type);\n\n      if (name) {\n        return '\\n\\nCheck the render method of `' + name + '`.';\n      }\n    }\n\n    return '';\n  }\n}\n\nfunction getSourceInfoErrorAddendum(source) {\n  {\n    if (source !== undefined) {\n      var fileName = source.fileName.replace(/^.*[\\\\\\/]/, '');\n      var lineNumber = source.lineNumber;\n      return '\\n\\nCheck your code at ' + fileName + ':' + lineNumber + '.';\n    }\n\n    return '';\n  }\n}\n/**\n * Warn if there's no key explicitly set on dynamic arrays of children or\n * object keys are not valid. This allows us to keep track of children between\n * updates.\n */\n\n\nvar ownerHasKeyUseWarning = {};\n\nfunction getCurrentComponentErrorInfo(parentType) {\n  {\n    var info = getDeclarationErrorAddendum();\n\n    if (!info) {\n      var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;\n\n      if (parentName) {\n        info = \"\\n\\nCheck the top-level render call using <\" + parentName + \">.\";\n      }\n    }\n\n    return info;\n  }\n}\n/**\n * Warn if the element doesn't have an explicit key assigned to it.\n * This element is in an array. The array could grow and shrink or be\n * reordered. All children that haven't already been validated are required to\n * have a \"key\" property assigned to it. Error statuses are cached so a warning\n * will only be shown once.\n *\n * @internal\n * @param {ReactElement} element Element that requires a key.\n * @param {*} parentType element's parent's type.\n */\n\n\nfunction validateExplicitKey(element, parentType) {\n  {\n    if (!element._store || element._store.validated || element.key != null) {\n      return;\n    }\n\n    element._store.validated = true;\n    var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);\n\n    if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {\n      return;\n    }\n\n    ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a\n    // property, it may be the creator of the child that's responsible for\n    // assigning it a key.\n\n    var childOwner = '';\n\n    if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) {\n      // Give the component that originally created this child.\n      childOwner = \" It was passed a child from \" + getComponentNameFromType(element._owner.type) + \".\";\n    }\n\n    setCurrentlyValidatingElement$1(element);\n\n    error('Each child in a list should have a unique \"key\" prop.' + '%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);\n\n    setCurrentlyValidatingElement$1(null);\n  }\n}\n/**\n * Ensure that every element either is passed in a static location, in an\n * array with an explicit keys property defined, or in an object literal\n * with valid key property.\n *\n * @internal\n * @param {ReactNode} node Statically passed child of any type.\n * @param {*} parentType node's parent's type.\n */\n\n\nfunction validateChildKeys(node, parentType) {\n  {\n    if (typeof node !== 'object') {\n      return;\n    }\n\n    if (isArray(node)) {\n      for (var i = 0; i < node.length; i++) {\n        var child = node[i];\n\n        if (isValidElement(child)) {\n          validateExplicitKey(child, parentType);\n        }\n      }\n    } else if (isValidElement(node)) {\n      // This element was passed in a valid location.\n      if (node._store) {\n        node._store.validated = true;\n      }\n    } else if (node) {\n      var iteratorFn = getIteratorFn(node);\n\n      if (typeof iteratorFn === 'function') {\n        // Entry iterators used to provide implicit keys,\n        // but now we print a separate warning for them later.\n        if (iteratorFn !== node.entries) {\n          var iterator = iteratorFn.call(node);\n          var step;\n\n          while (!(step = iterator.next()).done) {\n            if (isValidElement(step.value)) {\n              validateExplicitKey(step.value, parentType);\n            }\n          }\n        }\n      }\n    }\n  }\n}\n/**\n * Given an element, validate that its props follow the propTypes definition,\n * provided by the type.\n *\n * @param {ReactElement} element\n */\n\n\nfunction validatePropTypes(element) {\n  {\n    var type = element.type;\n\n    if (type === null || type === undefined || typeof type === 'string') {\n      return;\n    }\n\n    var propTypes;\n\n    if (typeof type === 'function') {\n      propTypes = type.propTypes;\n    } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.\n    // Inner props are checked in the reconciler.\n    type.$$typeof === REACT_MEMO_TYPE)) {\n      propTypes = type.propTypes;\n    } else {\n      return;\n    }\n\n    if (propTypes) {\n      // Intentionally inside to avoid triggering lazy initializers:\n      var name = getComponentNameFromType(type);\n      checkPropTypes(propTypes, element.props, 'prop', name, element);\n    } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {\n      propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:\n\n      var _name = getComponentNameFromType(type);\n\n      error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');\n    }\n\n    if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {\n      error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');\n    }\n  }\n}\n/**\n * Given a fragment, validate that it can only be provided with fragment props\n * @param {ReactElement} fragment\n */\n\n\nfunction validateFragmentProps(fragment) {\n  {\n    var keys = Object.keys(fragment.props);\n\n    for (var i = 0; i < keys.length; i++) {\n      var key = keys[i];\n\n      if (key !== 'children' && key !== 'key') {\n        setCurrentlyValidatingElement$1(fragment);\n\n        error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);\n\n        setCurrentlyValidatingElement$1(null);\n        break;\n      }\n    }\n\n    if (fragment.ref !== null) {\n      setCurrentlyValidatingElement$1(fragment);\n\n      error('Invalid attribute `ref` supplied to `React.Fragment`.');\n\n      setCurrentlyValidatingElement$1(null);\n    }\n  }\n}\n\nvar didWarnAboutKeySpread = {};\nfunction jsxWithValidation(type, props, key, isStaticChildren, source, self) {\n  {\n    var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to\n    // succeed and there will likely be errors in render.\n\n    if (!validType) {\n      var info = '';\n\n      if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {\n        info += ' You likely forgot to export your component from the file ' + \"it's defined in, or you might have mixed up default and named imports.\";\n      }\n\n      var sourceInfo = getSourceInfoErrorAddendum(source);\n\n      if (sourceInfo) {\n        info += sourceInfo;\n      } else {\n        info += getDeclarationErrorAddendum();\n      }\n\n      var typeString;\n\n      if (type === null) {\n        typeString = 'null';\n      } else if (isArray(type)) {\n        typeString = 'array';\n      } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {\n        typeString = \"<\" + (getComponentNameFromType(type.type) || 'Unknown') + \" />\";\n        info = ' Did you accidentally export a JSX literal instead of a component?';\n      } else {\n        typeString = typeof type;\n      }\n\n      error('React.jsx: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);\n    }\n\n    var element = jsxDEV(type, props, key, source, self); // The result can be nullish if a mock or a custom function is used.\n    // TODO: Drop this when these are no longer allowed as the type argument.\n\n    if (element == null) {\n      return element;\n    } // Skip key warning if the type isn't valid since our key validation logic\n    // doesn't expect a non-string/function type and can throw confusing errors.\n    // We don't want exception behavior to differ between dev and prod.\n    // (Rendering will throw with a helpful message and as soon as the type is\n    // fixed, the key warnings will appear.)\n\n\n    if (validType) {\n      var children = props.children;\n\n      if (children !== undefined) {\n        if (isStaticChildren) {\n          if (isArray(children)) {\n            for (var i = 0; i < children.length; i++) {\n              validateChildKeys(children[i], type);\n            }\n\n            if (Object.freeze) {\n              Object.freeze(children);\n            }\n          } else {\n            error('React.jsx: Static children should always be an array. ' + 'You are likely explicitly calling React.jsxs or React.jsxDEV. ' + 'Use the Babel transform instead.');\n          }\n        } else {\n          validateChildKeys(children, type);\n        }\n      }\n    }\n\n    {\n      if (hasOwnProperty.call(props, 'key')) {\n        var componentName = getComponentNameFromType(type);\n        var keys = Object.keys(props).filter(function (k) {\n          return k !== 'key';\n        });\n        var beforeExample = keys.length > 0 ? '{key: someKey, ' + keys.join(': ..., ') + ': ...}' : '{key: someKey}';\n\n        if (!didWarnAboutKeySpread[componentName + beforeExample]) {\n          var afterExample = keys.length > 0 ? '{' + keys.join(': ..., ') + ': ...}' : '{}';\n\n          error('A props object containing a \"key\" prop is being spread into JSX:\\n' + '  let props = %s;\\n' + '  <%s {...props} />\\n' + 'React keys must be passed directly to JSX without using spread:\\n' + '  let props = %s;\\n' + '  <%s key={someKey} {...props} />', beforeExample, componentName, afterExample, componentName);\n\n          didWarnAboutKeySpread[componentName + beforeExample] = true;\n        }\n      }\n    }\n\n    if (type === REACT_FRAGMENT_TYPE) {\n      validateFragmentProps(element);\n    } else {\n      validatePropTypes(element);\n    }\n\n    return element;\n  }\n} // These two functions exist to still get child warnings in dev\n// even with the prod transform. This means that jsxDEV is purely\n// opt-in behavior for better messages but that we won't stop\n// giving you warnings if you use production apis.\n\nfunction jsxWithValidationStatic(type, props, key) {\n  {\n    return jsxWithValidation(type, props, key, true);\n  }\n}\nfunction jsxWithValidationDynamic(type, props, key) {\n  {\n    return jsxWithValidation(type, props, key, false);\n  }\n}\n\nvar jsx =  jsxWithValidationDynamic ; // we may want to special case jsxs internally to take advantage of static children.\n// for now we can ship identical prod functions\n\nvar jsxs =  jsxWithValidationStatic ;\n\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.jsx = jsx;\nexports.jsxs = jsxs;\n  })();\n}\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n  module.exports = require('./cjs/react-jsx-runtime.production.min.js');\n} else {\n  module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n","/**\n * @license React\n * react-jsx-runtime.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var f=require(\"react\"),k=Symbol.for(\"react.element\"),l=Symbol.for(\"react.fragment\"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};\nfunction q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=\"\"+g);void 0!==a.key&&(e=\"\"+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}exports.Fragment=l;exports.jsx=q;exports.jsxs=q;\n","import {\r\n\tcreateContext,\r\n\tuseCallback,\r\n\tuseEffect,\r\n\tuseMemo,\r\n\tuseState,\r\n} from \"react\";\r\nimport { Env, Insight, type MCPToolRequest } from \"../../..\";\r\n\r\n/**\r\n * Context of the react data\r\n */\r\nexport const InsightContext = createContext<\r\n\t| {\r\n\t\t\tisInitialized: Insight[\"isInitialized\"];\r\n\t\t\tisAuthorized: Insight[\"isAuthorized\"];\r\n\t\t\tisReady: Insight[\"isReady\"];\r\n\t\t\terror: Insight[\"error\"];\r\n\t\t\tsystem: Insight[\"system\"];\r\n\t\t\tactions: Insight[\"actions\"];\r\n\t\t\tinsightId: Insight[\"insightId\"];\r\n\t\t\ttool?: MCPToolRequest;\r\n\t  }\r\n\t| undefined\r\n>(undefined);\r\n\r\ninterface InsightProviderProps {\r\n\t/**\r\n\t * Content to render with the insight\r\n\t */\r\n\tchildren: React.ReactNode;\r\n\r\n\t/**\r\n\t * Options to load into the app\r\n\t */\r\n\toptions?: Parameters<Insight[\"initialize\"]>[0];\r\n\r\n\t/**\r\n\t * Whether to destroy the insight on unmount\r\n\t * Defaults to true\r\n\t */\r\n\tdestroyOnUnmount?: boolean;\r\n}\r\n\r\nexport const InsightProvider = (props: InsightProviderProps) => {\r\n\tconst { children, options, destroyOnUnmount = true } = props;\r\n\r\n\t// create the new insight on load\r\n\tconst insight = useMemo(() => {\r\n\t\treturn new Insight();\r\n\t}, []);\r\n\r\n\tconst [isInitialized, setIsInitialized] =\r\n\t\tuseState<Insight[\"isInitialized\"]>(false);\r\n\tconst [isAuthorized, setIsAuthorized] =\r\n\t\tuseState<Insight[\"isAuthorized\"]>(false);\r\n\tconst [isReady, setIsReady] = useState<Insight[\"isReady\"]>(false);\r\n\tconst [error, setError] = useState<Insight[\"error\"]>(null);\r\n\tconst [system, setSystem] = useState<Insight[\"system\"]>(null);\r\n\tconst [insightId, setInsightId] = useState<Insight[\"insightId\"]>(\"\");\r\n\r\n\t/**\r\n\t * Sync the insight with react\r\n\t */\r\n\tconst syncInsight = useCallback(() => {\r\n\t\tsetError(insight.error);\r\n\t\tsetSystem(insight.system);\r\n\t\tsetIsAuthorized(insight.isAuthorized);\r\n\t\tsetIsInitialized(insight.isInitialized);\r\n\t\tsetIsReady(insight.isReady);\r\n\t\tsetInsightId(insight.insightId);\r\n\t}, [insight]);\r\n\r\n\tconst wrappedActions = useMemo(() => {\r\n\t\treturn Object.keys(insight.actions).reduce(\r\n\t\t\t(acc, val) => {\r\n\t\t\t\tacc[val] = async (...args: unknown[]) => {\r\n\t\t\t\t\t// wait for the action to complete\r\n\t\t\t\t\tconst response = await insight.actions[val].apply(null, [\r\n\t\t\t\t\t\t...args,\r\n\t\t\t\t\t]);\r\n\r\n\t\t\t\t\t// sync it\r\n\t\t\t\t\tsyncInsight();\r\n\r\n\t\t\t\t\t// return the response\r\n\t\t\t\t\treturn response;\r\n\t\t\t\t};\r\n\r\n\t\t\t\treturn acc;\r\n\t\t\t},\r\n\t\t\t{} as Insight[\"actions\"],\r\n\t\t);\r\n\t}, [insight, insight.actions, syncInsight]);\r\n\r\n\t// initialize the insight / destroy\r\n\t// biome-ignore lint/correctness/useExhaustiveDependencies: options is checked in the string\r\n\tuseEffect(() => {\r\n\t\t// initialize the insight\r\n\t\tinsight.initialize(options).finally(() => syncInsight());\r\n\r\n\t\treturn () => {\r\n\t\t\tif (destroyOnUnmount) {\r\n\t\t\t\t// destroy the insight\r\n\t\t\t\tinsight.destroy().finally(() => {\r\n\t\t\t\t\t// update the state\r\n\t\t\t\t\tsyncInsight();\r\n\t\t\t\t});\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// update the state without destroying\r\n\t\t\tsyncInsight();\r\n\t\t};\r\n\t}, [insight, JSON.stringify(options), destroyOnUnmount, syncInsight]);\r\n\r\n\treturn (\r\n\t\t<InsightContext.Provider\r\n\t\t\tvalue={{\r\n\t\t\t\tisInitialized: isInitialized,\r\n\t\t\t\tisAuthorized: isAuthorized,\r\n\t\t\t\tisReady: isReady,\r\n\t\t\t\terror: error,\r\n\t\t\t\tsystem: system,\r\n\t\t\t\tactions: wrappedActions,\r\n\t\t\t\tinsightId: insightId,\r\n\t\t\t\t// ENV.TOOL should not change once the insight is ready\r\n\t\t\t\ttool: Env.TOOL ?? null,\r\n\t\t\t}}\r\n\t\t>\r\n\t\t\t{children}\r\n\t\t</InsightContext.Provider>\r\n\t);\r\n};\r\n","import {\r\n\tuseCallback,\r\n\tuseContext,\r\n\tuseEffect,\r\n\tuseMemo,\r\n\tuseRef,\r\n\tuseState,\r\n} from \"react\";\r\nimport { runPixel } from \"../../../api\";\r\nimport { InsightContext } from \"../contexts\";\r\n\r\ninterface PixelState<D> {\r\n\t/** Status of the pixel call */\r\n\tstatus: \"INITIAL\" | \"LOADING\" | \"SUCCESS\" | \"ERROR\";\r\n\t/** Data returned from the pixel call */\r\n\tdata: D;\r\n\t/** Error returned from the pixel call */\r\n\terror?: Error;\r\n}\r\n\r\nexport interface PixelConfig<D> {\r\n\t/** Initial Data */\r\n\tdata: D;\r\n\r\n\t/** Callback triggered on success */\r\n\tonSuccess: (data: D) => void;\r\n\r\n\t/** Callback triggered on error */\r\n\tonError: (data: D, error: Error) => void;\r\n\r\n\t/** Callback triggered at the end */\r\n\tonFinal: () => void;\r\n}\r\n\r\ninterface usePixel<D> extends PixelState<D> {\r\n\t/** Refresh and reexecute the pixel */\r\n\trefresh: () => void;\r\n\t/** Update the data with new information */\r\n\tupdate: (data: D) => void;\r\n}\r\n\r\n/**\r\n * Send a command to the backend and recieve a response. This is intended to be used by a single pixel statement (nothing seperated by ;)\r\n *\r\n * @param pixel - pixel string to call\r\n *\r\n * @returns Information about the pixel response\r\n */\r\nexport function usePixel<D>(\r\n\tpixel: string,\r\n\tconfig?: Partial<PixelConfig<D>>,\r\n\tinsightId?: string,\r\n): usePixel<D> {\r\n\tconst context = useContext(InsightContext);\r\n\tconst resolvedInsightId = insightId ?? context?.insightId;\r\n\r\n\t// Memoize the initial data\r\n\t// biome-ignore lint/correctness/useExhaustiveDependencies: config?.data is handled by deep check\r\n\tconst initialData = useMemo(() => {\r\n\t\treturn config?.data;\r\n\t}, [JSON.stringify(config?.data)]);\r\n\r\n\t// track the call backs in a config\r\n\tconst callbacksRef = useRef<{\r\n\t\tonSuccess: PixelConfig<D>[\"onSuccess\"];\r\n\t\tonError: PixelConfig<D>[\"onError\"];\r\n\t\tonFinal: PixelConfig<D>[\"onFinal\"];\r\n\t}>({\r\n\t\tonSuccess: () => null,\r\n\t\tonError: () => null,\r\n\t\tonFinal: () => null,\r\n\t});\r\n\r\n\tuseEffect(() => {\r\n\t\tcallbacksRef.current = {\r\n\t\t\tonSuccess: config?.onSuccess || (() => null),\r\n\t\t\tonError: config?.onError || (() => null),\r\n\t\t\tonFinal: config?.onFinal || (() => null),\r\n\t\t};\r\n\t}, [config?.onSuccess, config?.onError, config?.onFinal]);\r\n\r\n\t// store the state\r\n\tconst [count, setCount] = useState(0);\r\n\tconst [state, setState] = useState<PixelState<D>>({\r\n\t\tstatus: \"INITIAL\",\r\n\t\tdata: config?.data,\r\n\t});\r\n\r\n\t/**\r\n\t * Increment the count, triggering a refresh of the pixel\r\n\t */\r\n\tconst refresh = useCallback(() => {\r\n\t\tsetCount((prev) => prev + 1);\r\n\t}, []);\r\n\r\n\t/**\r\n\t * Update the state with new data\r\n\t */\r\n\tconst update = useCallback((data: D, error?: Error) => {\r\n\t\tsetState((prev) => ({\r\n\t\t\t...prev,\r\n\t\t\tdata: data,\r\n\t\t\terror: error,\r\n\t\t}));\r\n\t}, []);\r\n\r\n\t// biome-ignore lint/correctness/useExhaustiveDependencies(count): count is necessary\r\n\tuseEffect(() => {\r\n\t\t// no command reset it\r\n\t\tif (!pixel) {\r\n\t\t\tsetState({\r\n\t\t\t\tstatus: \"INITIAL\",\r\n\t\t\t\tdata: initialData,\r\n\t\t\t});\r\n\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// track if it has been cancelled\r\n\t\tlet isCancelled = false;\r\n\r\n\t\tsetState({\r\n\t\t\tstatus: \"LOADING\",\r\n\t\t\tdata: initialData,\r\n\t\t});\r\n\r\n\t\trunPixel<[D]>(pixel, resolvedInsightId)\r\n\t\t\t.then((response) => {\r\n\t\t\t\t// ignore if its cancelled\r\n\t\t\t\tif (isCancelled) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tconst { output, operationType } = response.pixelReturn[0];\r\n\r\n\t\t\t\t// track the errors\r\n\t\t\t\tif (operationType.indexOf(\"ERROR\") > -1) {\r\n\t\t\t\t\tconst error = output as string;\r\n\r\n\t\t\t\t\tthrow new Error(error);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// set as success\r\n\t\t\t\tsetState({\r\n\t\t\t\t\tstatus: \"SUCCESS\",\r\n\t\t\t\t\tdata: output,\r\n\t\t\t\t});\r\n\r\n\t\t\t\tcallbacksRef.current.onSuccess(output);\r\n\t\t\t})\r\n\t\t\t.catch((error) => {\r\n\t\t\t\t// ignore if its cancelled\r\n\t\t\t\tif (isCancelled) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tsetState({\r\n\t\t\t\t\tstatus: \"ERROR\",\r\n\t\t\t\t\tdata: initialData,\r\n\t\t\t\t\terror: error,\r\n\t\t\t\t});\r\n\r\n\t\t\t\tcallbacksRef.current.onError(initialData, error);\r\n\t\t\t})\r\n\t\t\t.finally(() => {\r\n\t\t\t\t// ignore if its cancelled\r\n\t\t\t\tif (isCancelled) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tcallbacksRef.current.onFinal();\r\n\t\t\t});\r\n\r\n\t\treturn () => {\r\n\t\t\tisCancelled = true;\r\n\t\t};\r\n\t}, [count, pixel, resolvedInsightId, initialData]);\r\n\r\n\treturn {\r\n\t\t...state,\r\n\t\trefresh: refresh,\r\n\t\tupdate: update,\r\n\t};\r\n}\r\n","import { useCallback, useEffect, useRef, useState } from \"react\";\r\nimport { usePixel } from \"./usePixel\";\r\n\r\nexport interface UseIteratorPixelOptions<T> {\r\n\t/** Number of items to fetch per page */\r\n\tlimit?: number;\r\n\r\n\t/** Insight ID to use for pixel calls; defaults to the app's shared insight */\r\n\tinsightId?: string;\r\n\r\n\t/** Callback when data is successfully loaded */\r\n\tonSuccess?: (data: T[], isLoadingMore: boolean) => void;\r\n\r\n\t/** Callback when an error occurs */\r\n\tonError?: (error: Error) => void;\r\n}\r\n\r\nexport interface UseIteratorPixelReturn<T> {\r\n\t/** Current accumulated data */\r\n\tdata: T[];\r\n\r\n\t/** Total count of the data */\r\n\ttotalCount: number;\r\n\r\n\t/** Track if errored */\r\n\tisError: boolean;\r\n\r\n\t/** Error if status is ERROR */\r\n\terror: Error | null;\r\n\r\n\t/** Whether currently loading */\r\n\tisLoading: boolean;\r\n\r\n\t/** Whether there are more items to load */\r\n\thasMore: boolean;\r\n\r\n\t/** Load the next set of items */\r\n\tnext: () => void;\r\n\r\n\t/** Reset the state */\r\n\treset: () => void;\r\n}\r\n\r\n/**\r\n * Hook for handling paginated/iterator pixel queries with automatic accumulation\r\n *\r\n * @param pixelQuery - Function that generates the pixel query with limit and offset\r\n * @param getTotalCount - Function to extract total count from response\r\n * @param getData - Function to extract data array from response\r\n * @param dependencies - Dependencies that trigger a reset when changed\r\n * @param options - Configuration options\r\n *\r\n * @example\r\n * ```tsx\r\n * const { data, hasMore, next, isLoading } = useIteratorPixel(\r\n *   (limit, offset) => `GetWorkspaceRooms(workspaceId=[\"${id}\"], limit=[${limit}], offset=[${offset}]);`,\r\n *   (response) => response.total_count,\r\n *   (response) => response.rooms,\r\n *   { limit: 25 },\r\n *   [id]\r\n * );\r\n * ```\r\n */\r\nexport function useIteratorPixel<TResponse, TItem>(\r\n\tpixelQuery: (limit: number, offset: number) => string,\r\n\tgetTotalCount: (response: TResponse) => number,\r\n\tgetData: (response: TResponse) => TItem[],\r\n\toptions: UseIteratorPixelOptions<TItem> = {},\r\n\tdependencies: React.DependencyList = [],\r\n): UseIteratorPixelReturn<TItem> {\r\n\tconst { limit = 25, insightId, onSuccess, onError } = options;\r\n\r\n\tconst [offset, setOffset] = useState(0);\r\n\tconst [allData, setAllData] = useState<TItem[]>([]);\r\n\tconst [totalCount, setTotalCount] = useState(0);\r\n\tconst isLoadingMoreRef = useRef(false);\r\n\r\n\t// Generate the pixel query\r\n\tconst query = pixelQuery(limit, offset);\r\n\r\n\t// Use the standard usePixel hook\r\n\tconst pixel = usePixel<TResponse>(\r\n\t\tquery,\r\n\t\t{\r\n\t\t\tdata: null as TResponse,\r\n\t\t\tonSuccess: (response) => {\r\n\t\t\t\tconst newData = getData(response);\r\n\t\t\t\tconst count = getTotalCount(response);\r\n\r\n\t\t\t\tsetTotalCount(count);\r\n\r\n\t\t\t\tif (offset === 0) {\r\n\t\t\t\t\t// First load or reset - replace all data\r\n\t\t\t\t\tsetAllData(newData);\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// Loading more - append data\r\n\t\t\t\t\tsetAllData((prev) => [...prev, ...newData]);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (onSuccess) {\r\n\t\t\t\t\tonSuccess(newData, offset > 0);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tonError: (_data, error) => {\r\n\t\t\t\tif (onError && error instanceof Error) {\r\n\t\t\t\t\tonError(error);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tonFinal: () => {\r\n\t\t\t\tisLoadingMoreRef.current = false;\r\n\t\t\t},\r\n\t\t},\r\n\t\tinsightId,\r\n\t);\r\n\r\n\t/**\r\n\t * Get the next set of items\r\n\t */\r\n\tconst next = useCallback(() => {\r\n\t\tif (\r\n\t\t\t!isLoadingMoreRef.current &&\r\n\t\t\tpixel.status !== \"LOADING\" &&\r\n\t\t\tallData.length < totalCount\r\n\t\t) {\r\n\t\t\tisLoadingMoreRef.current = true;\r\n\t\t\tsetOffset((prev) => prev + limit);\r\n\t\t}\r\n\t}, [pixel.status, allData.length, totalCount, limit]);\r\n\r\n\t/**\r\n\t * Reset the state\r\n\t */\r\n\tconst reset = useCallback(() => {\r\n\t\tsetOffset(0);\r\n\t\tisLoadingMoreRef.current = false;\r\n\r\n\t\t// get the data\r\n\t\tpixel.refresh();\r\n\t}, [pixel.refresh]);\r\n\r\n\t/**\r\n\t * Reset when dependencies change\r\n\t */\r\n\tuseEffect(\r\n\t\t() => {\r\n\t\t\tsetOffset(0);\r\n\t\t\tsetAllData([]);\r\n\t\t\tsetTotalCount(0);\r\n\t\t\tisLoadingMoreRef.current = false;\r\n\t\t},\r\n\r\n\t\t// biome-ignore lint/correctness/useExhaustiveDependencies: suppress exhaustive dependencies check\r\n\t\tdependencies,\r\n\t);\r\n\r\n\treturn {\r\n\t\tdata: allData,\r\n\t\ttotalCount: totalCount,\r\n\t\tisError: pixel.status === \"ERROR\",\r\n\t\terror: pixel.error,\r\n\t\tisLoading: pixel.status === \"LOADING\" || isLoadingMoreRef.current,\r\n\t\thasMore: allData.length < totalCount,\r\n\t\tnext: next,\r\n\t\treset: reset,\r\n\t};\r\n}\r\n","import { useCallback, useEffect, useRef } from \"react\";\r\n\r\n/**\r\n * Debounce a callback\r\n * @param callback - new value\r\n * @param delay - delay timer\r\n * @returns debounced value\r\n */\r\nexport function useDebouncedCallback<T extends (...args: unknown[]) => unknown>(\r\n\tcallback: T,\r\n\tdelay: number,\r\n): (...args: Parameters<T>) => void {\r\n\tconst timeoutRef = useRef<ReturnType<typeof setTimeout>>();\r\n\tconst callbackRef = useRef(callback);\r\n\r\n\t// set whenever it changes\r\n\tuseEffect(() => {\r\n\t\tcallbackRef.current = callback;\r\n\t}, [callback]);\r\n\r\n\t// clear on unmount\r\n\tuseEffect(() => {\r\n\t\treturn () => {\r\n\t\t\tif (timeoutRef.current) {\r\n\t\t\t\tclearTimeout(timeoutRef.current);\r\n\t\t\t}\r\n\t\t};\r\n\t}, []);\r\n\r\n\tconst debouncedCallback = useCallback(\r\n\t\t(...args: Parameters<T>) => {\r\n\t\t\tif (timeoutRef.current) {\r\n\t\t\t\tclearTimeout(timeoutRef.current);\r\n\t\t\t}\r\n\r\n\t\t\ttimeoutRef.current = setTimeout(() => {\r\n\t\t\t\tcallbackRef.current(...args);\r\n\t\t\t}, delay);\r\n\t\t},\r\n\t\t[delay],\r\n\t);\r\n\r\n\treturn debouncedCallback;\r\n}\r\n","import { useEffect, useRef, useState } from \"react\";\r\n\r\n/**\r\n * Debounce a value\r\n * @param value - new value\r\n * @param delay - delay timer\r\n * @returns debounced value\r\n */\r\nexport const useDebouncedValue = <T>(value: T, delay = 500) => {\r\n\tconst [debouncedValue, setDebouncedValue] = useState<T>(undefined);\r\n\tconst timeoutRef = useRef<ReturnType<typeof setTimeout>>();\r\n\r\n\tuseEffect(() => {\r\n\t\ttimeoutRef.current = setTimeout(() => {\r\n\t\t\tsetDebouncedValue(value);\r\n\t\t}, delay);\r\n\r\n\t\treturn () => {\r\n\t\t\tclearTimeout(timeoutRef.current);\r\n\t\t};\r\n\t}, [value, delay]);\r\n\r\n\treturn debouncedValue;\r\n};\r\n","import { useContext } from \"react\";\r\nimport { InsightContext } from \"../contexts\";\r\n\r\n/**\r\n * Access the current insight\r\n */\r\nexport const useInsight = () => {\r\n\tconst context = useContext(InsightContext);\r\n\tif (context === undefined) {\r\n\t\tthrow new Error(\"useInsight must be used within InsightProvider\");\r\n\t}\r\n\r\n\treturn context;\r\n};\r\n","import { useCallback, useEffect, useRef, useState } from \"react\";\r\nimport {\r\n\tInsightWebSocket,\r\n\ttype InsightWebSocketOptions,\r\n\ttype WebSocketStatus,\r\n} from \"../../../api/websocket\";\r\n\r\ninterface UseWebSocketOptions\r\n\textends Pick<\r\n\t\tInsightWebSocketOptions,\r\n\t\t\"reconnect\" | \"maxReconnectAttempts\"\r\n\t> {\r\n\t/** Connect automatically on mount (default: true) */\r\n\tautoConnect?: boolean;\r\n}\r\n\r\ninterface UseWebSocketReturn {\r\n\t/** Send a pixel expression over the WebSocket */\r\n\tsend: (pixel: string) => void;\r\n\t/** Start a streamer on the backend (e.g. watch(\"claude_code\", { roomId: \"abc\" })) */\r\n\twatch: (type: string, params?: Record<string, unknown>) => void;\r\n\t/** Stop a streamer on the backend */\r\n\tunwatch: (type: string, params?: Record<string, unknown>) => void;\r\n\t/** The last message received from the server */\r\n\tlastMessage: unknown | null;\r\n\t/** Current connection status */\r\n\tstatus: WebSocketStatus;\r\n\t/** Convenience boolean for status === \"connected\" */\r\n\tisConnected: boolean;\r\n\t/** Manually open the connection */\r\n\tconnect: () => void;\r\n\t/** Manually close the connection */\r\n\tclose: () => void;\r\n}\r\n\r\n/**\r\n * React hook for managing a WebSocket connection to the insightSocket endpoint.\r\n *\r\n * @param insightId - The insight ID to connect with\r\n * @param options - Optional configuration\r\n *\r\n * @example\r\n * ```tsx\r\n * function MyComponent({ insightId }: { insightId: string }) {\r\n *   const { send, lastMessage, isConnected } = useWebSocket(insightId);\r\n *\r\n *   return (\r\n *     <div>\r\n *       <p>Connected: {isConnected ? \"Yes\" : \"No\"}</p>\r\n *       <button onClick={() => send(\"GetSystemConfig();\")}>Send</button>\r\n *       <pre>{JSON.stringify(lastMessage, null, 2)}</pre>\r\n *     </div>\r\n *   );\r\n * }\r\n * ```\r\n */\r\nexport function useWebSocket(\r\n\tinsightId: string,\r\n\toptions: UseWebSocketOptions = {},\r\n): UseWebSocketReturn {\r\n\tconst { autoConnect = true, reconnect, maxReconnectAttempts } = options;\r\n\r\n\tconst [lastMessage, setLastMessage] = useState<unknown | null>(null);\r\n\tconst [status, setStatus] = useState<WebSocketStatus>(\"disconnected\");\r\n\tconst wsRef = useRef<InsightWebSocket | null>(null);\r\n\r\n\tuseEffect(() => {\r\n\t\tconst ws = new InsightWebSocket(insightId, {\r\n\t\t\tonMessage: setLastMessage,\r\n\t\t\tonStatusChange: setStatus,\r\n\t\t\treconnect,\r\n\t\t\tmaxReconnectAttempts,\r\n\t\t});\r\n\r\n\t\twsRef.current = ws;\r\n\r\n\t\tif (autoConnect) {\r\n\t\t\tws.connect();\r\n\t\t}\r\n\r\n\t\treturn () => {\r\n\t\t\tws.close();\r\n\t\t\twsRef.current = null;\r\n\t\t};\r\n\t}, [insightId, autoConnect, reconnect, maxReconnectAttempts]);\r\n\r\n\tconst send = useCallback((pixel: string) => {\r\n\t\twsRef.current?.send(pixel);\r\n\t}, []);\r\n\r\n\tconst watch = useCallback(\r\n\t\t(type: string, params?: Record<string, unknown>) => {\r\n\t\t\twsRef.current?.watch(type, params);\r\n\t\t},\r\n\t\t[],\r\n\t);\r\n\r\n\tconst unwatch = useCallback(\r\n\t\t(type: string, params?: Record<string, unknown>) => {\r\n\t\t\twsRef.current?.unwatch(type, params);\r\n\t\t},\r\n\t\t[],\r\n\t);\r\n\r\n\tconst connect = useCallback(() => {\r\n\t\twsRef.current?.connect();\r\n\t}, []);\r\n\r\n\tconst close = useCallback(() => {\r\n\t\twsRef.current?.close();\r\n\t}, []);\r\n\r\n\treturn {\r\n\t\tsend,\r\n\t\twatch,\r\n\t\tunwatch,\r\n\t\tlastMessage,\r\n\t\tstatus,\r\n\t\tisConnected: status === \"connected\",\r\n\t\tconnect,\r\n\t\tclose,\r\n\t};\r\n}\r\n"],"names":["process","env","NODE_ENV","React","require$$0","REACT_ELEMENT_TYPE","Symbol","for","REACT_PORTAL_TYPE","REACT_FRAGMENT_TYPE","REACT_STRICT_MODE_TYPE","REACT_PROFILER_TYPE","REACT_PROVIDER_TYPE","REACT_CONTEXT_TYPE","REACT_FORWARD_REF_TYPE","REACT_SUSPENSE_TYPE","REACT_SUSPENSE_LIST_TYPE","REACT_MEMO_TYPE","REACT_LAZY_TYPE","REACT_OFFSCREEN_TYPE","MAYBE_ITERATOR_SYMBOL","iterator","ReactSharedInternals","__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","error","format","_len2","arguments","length","args","Array","_key2","level","ReactDebugCurrentFrame","stack","getStackAddendum","concat","argsWithFormat","map","item","String","unshift","Function","prototype","apply","call","console","printWarning","REACT_MODULE_REFERENCE","getContextName","type","displayName","getComponentNameFromType","tag","name","$$typeof","_context","outerType","innerType","wrapperName","functionName","getWrappedName","render","outerName","lazyComponent","payload","_payload","init","_init","x","prevLog","prevInfo","prevWarn","prevError","prevGroup","prevGroupCollapsed","prevGroupEnd","assign","Object","disabledDepth","disabledLog","__reactDisabledLog","prefix","ReactCurrentDispatcher","describeBuiltInComponentFrame","source","ownerFn","undefined","Error","match","trim","componentFrameCache","reentry","PossiblyWeakMap","WeakMap","Map","describeNativeComponentFrame","fn","construct","control","frame","get","previousDispatcher","previousPrepareStackTrace","prepareStackTrace","current","log","info","warn","group","groupCollapsed","groupEnd","props","configurable","enumerable","value","writable","defineProperties","disableLogs","Fake","defineProperty","set","Reflect","sample","sampleLines","split","controlLines","s","c","_frame","replace","includes","reenableLogs","syntheticFrame","describeUnknownElementTypeFrameInDEV","isReactComponent","hasOwnProperty","loggedTypeFailures","setCurrentlyValidatingElement","element","owner","_owner","_source","setExtraStackFrame","isArrayImpl","isArray","a","testStringCoercion","checkKeyStringCoercion","e","willCoercionThrow","toStringTag","constructor","typeName","specialPropKeyWarningShown","specialPropRefWarningShown","ReactCurrentOwner","RESERVED_PROPS","key","ref","__self","__source","jsxDEV","config","maybeKey","self","propName","getter","getOwnPropertyDescriptor","isReactWarning","hasValidKey","hasValidRef","warnIfStringRefCannotBeAutoConverted","defaultProps","warnAboutAccessingKey","defineKeyPropWarningGetter","warnAboutAccessingRef","defineRefPropWarningGetter","_store","freeze","ReactElement","propTypesMisspellWarningShown","ReactCurrentOwner$1","ReactDebugCurrentFrame$1","setCurrentlyValidatingElement$1","isValidElement","object","getDeclarationErrorAddendum","ownerHasKeyUseWarning","validateExplicitKey","parentType","validated","currentComponentErrorInfo","parentName","getCurrentComponentErrorInfo","childOwner","validateChildKeys","node","i","child","iteratorFn","maybeIterable","maybeIterator","getIteratorFn","entries","step","next","done","validatePropTypes","propTypes","typeSpecs","values","location","componentName","has","bind","typeSpecName","error$1","err","ex","message","checkPropTypes","PropTypes","getDefaultProps","isReactClassApproved","didWarnAboutKeySpread","jsxWithValidation","isStaticChildren","validType","getModuleId","isValidElementType","keys","typeString","children","filter","k","beforeExample","join","fragment","validateFragmentProps","jsx","jsxs","reactJsxRuntime_development","Fragment","jsxRuntimeModule","exports","f","l","m","n","p","q","g","b","d","h","reactJsxRuntime_production_min","require$$1","InsightContext","createContext","InsightProvider","options","destroyOnUnmount","insight","useMemo","Insight","isInitialized","setIsInitialized","useState","isAuthorized","setIsAuthorized","isReady","setIsReady","setError","system","setSystem","insightId","setInsightId","syncInsight","useCallback","wrappedActions","actions","reduce","acc","val","__awaiter","response","useEffect","initialize","finally","destroy","JSON","stringify","_jsx","Provider","tool","_a","Env","TOOL","usePixel","pixel","context","useContext","resolvedInsightId","initialData","data","callbacksRef","useRef","onSuccess","onError","onFinal","count","setCount","state","setState","status","refresh","prev","update","isCancelled","runPixel","then","output","operationType","pixelReturn","indexOf","catch","useIteratorPixel","pixelQuery","getTotalCount","getData","dependencies","limit","offset","setOffset","allData","setAllData","totalCount","setTotalCount","isLoadingMoreRef","newData","_data","reset","isError","isLoading","hasMore","useDebouncedCallback","callback","delay","timeoutRef","callbackRef","clearTimeout","setTimeout","useDebouncedValue","debouncedValue","setDebouncedValue","useInsight","useWebSocket","autoConnect","reconnect","maxReconnectAttempts","lastMessage","setLastMessage","setStatus","wsRef","ws","InsightWebSocket","onMessage","onStatusChange","connect","close","send","watch","params","unwatch","isConnected"],"mappings":";;;;;;;;;+BAY6B,eAAzBA,QAAQC,IAAIC,UACd,WAGF,IAAIC,EAAQC,EAMRC,EAAqBC,OAAOC,IAAI,iBAChCC,EAAoBF,OAAOC,IAAI,gBAC/BE,EAAsBH,OAAOC,IAAI,kBACjCG,EAAyBJ,OAAOC,IAAI,qBACpCI,EAAsBL,OAAOC,IAAI,kBACjCK,EAAsBN,OAAOC,IAAI,kBACjCM,EAAqBP,OAAOC,IAAI,iBAChCO,EAAyBR,OAAOC,IAAI,qBACpCQ,EAAsBT,OAAOC,IAAI,kBACjCS,EAA2BV,OAAOC,IAAI,uBACtCU,EAAkBX,OAAOC,IAAI,cAC7BW,EAAkBZ,OAAOC,IAAI,cAC7BY,EAAuBb,OAAOC,IAAI,mBAClCa,EAAwBd,OAAOe,SAgBnC,IAAIC,EAAuBnB,EAAMoB,mDAEjC,SAASC,EAAMC,GAGT,IAAK,IAAIC,EAAQC,UAAUC,OAAQC,EAAO,IAAIC,MAAMJ,EAAQ,EAAIA,EAAQ,EAAI,GAAIK,EAAQ,EAAGA,EAAQL,EAAOK,IACxGF,EAAKE,EAAQ,GAAKJ,UAAUI,IAQpC,SAAsBC,EAA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