'use strict';

var chunkXYYJ47OY_cjs = require('./chunk-XYYJ47OY.cjs');
var signalExit = require('signal-exit');
var ws = require('ws');

function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }

var ws__default = /*#__PURE__*/_interopDefault(ws);

// src/devtools.ts
chunkXYYJ47OY_cjs.init_cjs_shims();
var customGlobal = globalThis;
customGlobal.WebSocket ||= ws__default.default;
customGlobal.window ||= customGlobal;
customGlobal.self ||= customGlobal;
customGlobal.isDevtoolsEnabled = true;
customGlobal.window.__REACT_DEVTOOLS_COMPONENT_FILTERS__ = [
  {
    // ComponentFilterDisplayName
    type: 2,
    value: "Context.Provider",
    isEnabled: true,
    isValid: true
  },
  {
    // ComponentFilterDisplayName
    type: 2,
    value: "KubbRoot",
    isEnabled: true,
    isValid: true
  },
  {
    // ComponentFilterDisplayName
    type: 2,
    value: "KubbErrorBoundary",
    isEnabled: true,
    isValid: true
  },
  {
    // ComponentFilterDisplayName
    type: 2,
    value: "kubb-file",
    isEnabled: true,
    isValid: true
  },
  {
    // ComponentFilterDisplayName
    type: 2,
    value: "kubb-text",
    isEnabled: true,
    isValid: true
  },
  {
    // ComponentFilterDisplayName
    type: 2,
    value: "kubb-import",
    isEnabled: true,
    isValid: true
  },
  {
    // ComponentFilterDisplayName
    type: 2,
    value: "kubb-export",
    isEnabled: true,
    isValid: true
  },
  {
    // ComponentFilterDisplayName
    type: 2,
    value: "kubb-source",
    isEnabled: true,
    isValid: true
  }
];
function openDevtools() {
  let subprocess;
  import('execa').then(async (execa) => {
    console.log("Opening devtools");
    subprocess = execa.execa({ preferLocal: true })`npx react-devtools`;
  }).then(() => {
    return import('./backend-GTAVRQSK.cjs');
  }).then((devtools) => {
    console.log("Connecting devtools");
    devtools.default.connectToDevTools();
  }).catch(() => {
    console.log("Error connecting devtools");
  });
  signalExit.onExit(
    () => {
      console.log("Disconnecting devtools");
      subprocess?.kill();
    },
    { alwaysLast: false }
  );
}
openDevtools();
//# sourceMappingURL=devtools.cjs.map
//# sourceMappingURL=devtools.cjs.map