"use strict";
(globalThis["webpackChunk"] = globalThis["webpackChunk"] || []).push([[4775],{

/***/ 75183
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   A: () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
var ChangeTypes;
(function (ChangeTypes) {
    ChangeTypes["Interaction"] = "Interaction";
    ChangeTypes["HandlesUpdated"] = "HandlesUpdated";
    ChangeTypes["StatsUpdated"] = "StatsUpdated";
    ChangeTypes["InitialSetup"] = "InitialSetup";
    ChangeTypes["Completed"] = "Completed";
    ChangeTypes["InterpolationUpdated"] = "InterpolationUpdated";
    ChangeTypes["History"] = "History";
    ChangeTypes["MetadataReferenceModified"] = "MetadataReferenceModified";
    ChangeTypes["LabelChange"] = "LabelChange";
})(ChangeTypes || (ChangeTypes = {}));
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ChangeTypes);


/***/ },

/***/ 94021
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   A: () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
var Events;
(function (Events) {
    Events["TOOL_ACTIVATED"] = "CORNERSTONE_TOOLS_TOOL_ACTIVATED";
    Events["TOOLGROUP_VIEWPORT_ADDED"] = "CORNERSTONE_TOOLS_TOOLGROUP_VIEWPORT_ADDED";
    Events["TOOLGROUP_VIEWPORT_REMOVED"] = "CORNERSTONE_TOOLS_TOOLGROUP_VIEWPORT_REMOVED";
    Events["TOOL_MODE_CHANGED"] = "CORNERSTONE_TOOLS_TOOL_MODE_CHANGED";
    Events["CROSSHAIR_TOOL_CENTER_CHANGED"] = "CORNERSTONE_TOOLS_CROSSHAIR_TOOL_CENTER_CHANGED";
    Events["VOLUMECROPPINGCONTROL_TOOL_CHANGED"] = "CORNERSTONE_TOOLS_VOLUMECROPPINGCONTROL_TOOL_CHANGED";
    Events["VOLUMECROPPING_TOOL_CHANGED"] = "CORNERSTONE_TOOLS_VOLUMECROPPING_TOOL_CHANGED";
    Events["STACK_PREFETCH_COMPLETE"] = "CORNERSTONE_TOOLS_STACK_PREFETCH_COMPLETE";
    Events["ANNOTATION_ADDED"] = "CORNERSTONE_TOOLS_ANNOTATION_ADDED";
    Events["ANNOTATION_COMPLETED"] = "CORNERSTONE_TOOLS_ANNOTATION_COMPLETED";
    Events["ANNOTATION_MODIFIED"] = "CORNERSTONE_TOOLS_ANNOTATION_MODIFIED";
    Events["ANNOTATION_REMOVED"] = "CORNERSTONE_TOOLS_ANNOTATION_REMOVED";
    Events["ANNOTATION_SELECTION_CHANGE"] = "CORNERSTONE_TOOLS_ANNOTATION_SELECTION_CHANGE";
    Events["ANNOTATION_LOCK_CHANGE"] = "CORNERSTONE_TOOLS_ANNOTATION_LOCK_CHANGE";
    Events["ANNOTATION_VISIBILITY_CHANGE"] = "CORNERSTONE_TOOLS_ANNOTATION_VISIBILITY_CHANGE";
    Events["ANNOTATION_RENDERED"] = "CORNERSTONE_TOOLS_ANNOTATION_RENDERED";
    Events["ANNOTATION_CUT_MERGE_PROCESS_COMPLETED"] = "CORNERSTONE_TOOLS_ANNOTATION_CUT_MERGE_PROCESS_COMPLETED";
    Events["ANNOTATION_INTERPOLATION_PROCESS_COMPLETED"] = "CORNERSTONE_TOOLS_ANNOTATION_INTERPOLATION_PROCESS_COMPLETED";
    Events["INTERPOLATED_ANNOTATIONS_REMOVED"] = "CORNERSTONE_TOOLS_INTERPOLATED_ANNOTATIONS_REMOVED";
    Events["SEGMENTATION_MODIFIED"] = "CORNERSTONE_TOOLS_SEGMENTATION_MODIFIED";
    Events["SEGMENTATION_RENDERED"] = "CORNERSTONE_TOOLS_SEGMENTATION_RENDERED";
    Events["SEGMENTATION_REPRESENTATION_ADDED"] = "CORNERSTONE_TOOLS_SEGMENTATION_REPRESENTATION_ADDED";
    Events["SEGMENTATION_ADDED"] = "CORNERSTONE_TOOLS_SEGMENTATION_ADDED";
    Events["SEGMENTATION_REPRESENTATION_MODIFIED"] = "CORNERSTONE_TOOLS_SEGMENTATION_REPRESENTATION_MODIFIED";
    Events["SEGMENTATION_REMOVED"] = "CORNERSTONE_TOOLS_SEGMENTATION_REMOVED";
    Events["SEGMENTATION_REPRESENTATION_REMOVED"] = "CORNERSTONE_TOOLS_SEGMENTATION_REPRESENTATION_REMOVED";
    Events["SEGMENTATION_DATA_MODIFIED"] = "CORNERSTONE_TOOLS_SEGMENTATION_DATA_MODIFIED";
    Events["HISTORY_UNDO"] = "CORNERSTONE_TOOLS_HISTORY_UNDO";
    Events["HISTORY_REDO"] = "CORNERSTONE_TOOLS_HISTORY_REDO";
    Events["KEY_DOWN"] = "CORNERSTONE_TOOLS_KEY_DOWN";
    Events["KEY_UP"] = "CORNERSTONE_TOOLS_KEY_UP";
    Events["MOUSE_DOWN"] = "CORNERSTONE_TOOLS_MOUSE_DOWN";
    Events["MOUSE_UP"] = "CORNERSTONE_TOOLS_MOUSE_UP";
    Events["MOUSE_DOWN_ACTIVATE"] = "CORNERSTONE_TOOLS_MOUSE_DOWN_ACTIVATE";
    Events["MOUSE_DRAG"] = "CORNERSTONE_TOOLS_MOUSE_DRAG";
    Events["MOUSE_MOVE"] = "CORNERSTONE_TOOLS_MOUSE_MOVE";
    Events["MOUSE_CLICK"] = "CORNERSTONE_TOOLS_MOUSE_CLICK";
    Events["MOUSE_DOUBLE_CLICK"] = "CORNERSTONE_TOOLS_MOUSE_DOUBLE_CLICK";
    Events["MOUSE_WHEEL"] = "CORNERSTONE_TOOLS_MOUSE_WHEEL";
    Events["TOUCH_START"] = "CORNERSTONE_TOOLS_TOUCH_START";
    Events["TOUCH_START_ACTIVATE"] = "CORNERSTONE_TOOLS_TOUCH_START_ACTIVATE";
    Events["TOUCH_PRESS"] = "CORNERSTONE_TOOLS_TOUCH_PRESS";
    Events["TOUCH_DRAG"] = "CORNERSTONE_TOOLS_TOUCH_DRAG";
    Events["TOUCH_END"] = "CORNERSTONE_TOOLS_TOUCH_END";
    Events["TOUCH_TAP"] = "CORNERSTONE_TOOLS_TAP";
    Events["TOUCH_SWIPE"] = "CORNERSTONE_TOOLS_SWIPE";
})(Events || (Events = {}));
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Events);


/***/ },

/***/ 18682
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   A: () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
var SegmentationRepresentations;
(function (SegmentationRepresentations) {
    SegmentationRepresentations["Labelmap"] = "Labelmap";
    SegmentationRepresentations["Contour"] = "Contour";
    SegmentationRepresentations["Surface"] = "Surface";
})(SegmentationRepresentations || (SegmentationRepresentations = {}));
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (SegmentationRepresentations);


/***/ },

/***/ 84093
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   A: () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
var StrategyCallbacks;
(function (StrategyCallbacks) {
    StrategyCallbacks["CalculateCursorGeometry"] = "calculateCursorGeometry";
    StrategyCallbacks["RenderCursor"] = "renderCursor";
    StrategyCallbacks["OnInteractionStart"] = "onInteractionStart";
    StrategyCallbacks["OnInteractionEnd"] = "onInteractionEnd";
    StrategyCallbacks["Preview"] = "preview";
    StrategyCallbacks["RejectPreview"] = "rejectPreview";
    StrategyCallbacks["AcceptPreview"] = "acceptPreview";
    StrategyCallbacks["Fill"] = "fill";
    StrategyCallbacks["Interpolate"] = "interpolate";
    StrategyCallbacks["StrategyFunction"] = "strategyFunction";
    StrategyCallbacks["CreateIsInThreshold"] = "createIsInThreshold";
    StrategyCallbacks["Initialize"] = "initialize";
    StrategyCallbacks["INTERNAL_setValue"] = "setValue";
    StrategyCallbacks["AddPreview"] = "addPreview";
    StrategyCallbacks["ComputeInnerCircleRadius"] = "computeInnerCircleRadius";
    StrategyCallbacks["GetStatistics"] = "getStatistics";
    StrategyCallbacks["EnsureImageVolumeFor3DManipulation"] = "ensureImageVolumeFor3DManipulation";
    StrategyCallbacks["EnsureSegmentationVolumeFor3DManipulation"] = "ensureSegmentationVolumeFor3DManipulation";
})(StrategyCallbacks || (StrategyCallbacks = {}));
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (StrategyCallbacks);


/***/ },

/***/ 66452
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   i: () => (/* binding */ MouseBindings),
/* harmony export */   q: () => (/* binding */ KeyboardBindings)
/* harmony export */ });
var MouseBindings;
(function (MouseBindings) {
    MouseBindings[MouseBindings["Primary"] = 1] = "Primary";
    MouseBindings[MouseBindings["Secondary"] = 2] = "Secondary";
    MouseBindings[MouseBindings["Primary_And_Secondary"] = 3] = "Primary_And_Secondary";
    MouseBindings[MouseBindings["Auxiliary"] = 4] = "Auxiliary";
    MouseBindings[MouseBindings["Primary_And_Auxiliary"] = 5] = "Primary_And_Auxiliary";
    MouseBindings[MouseBindings["Secondary_And_Auxiliary"] = 6] = "Secondary_And_Auxiliary";
    MouseBindings[MouseBindings["Primary_And_Secondary_And_Auxiliary"] = 7] = "Primary_And_Secondary_And_Auxiliary";
    MouseBindings[MouseBindings["Fourth_Button"] = 8] = "Fourth_Button";
    MouseBindings[MouseBindings["Fifth_Button"] = 16] = "Fifth_Button";
    MouseBindings[MouseBindings["Wheel"] = 524288] = "Wheel";
    MouseBindings[MouseBindings["Wheel_Primary"] = 524289] = "Wheel_Primary";
})(MouseBindings || (MouseBindings = {}));
var KeyboardBindings;
(function (KeyboardBindings) {
    KeyboardBindings[KeyboardBindings["Shift"] = 16] = "Shift";
    KeyboardBindings[KeyboardBindings["Ctrl"] = 17] = "Ctrl";
    KeyboardBindings[KeyboardBindings["Alt"] = 18] = "Alt";
    KeyboardBindings[KeyboardBindings["Meta"] = 91] = "Meta";
    KeyboardBindings[KeyboardBindings["ShiftCtrl"] = 1617] = "ShiftCtrl";
    KeyboardBindings[KeyboardBindings["ShiftAlt"] = 1618] = "ShiftAlt";
    KeyboardBindings[KeyboardBindings["ShiftMeta"] = 1691] = "ShiftMeta";
    KeyboardBindings[KeyboardBindings["CtrlAlt"] = 1718] = "CtrlAlt";
    KeyboardBindings[KeyboardBindings["CtrlMeta"] = 1791] = "CtrlMeta";
    KeyboardBindings[KeyboardBindings["AltMeta"] = 1891] = "AltMeta";
})(KeyboardBindings || (KeyboardBindings = {}));



/***/ },

/***/ 49892
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   A: () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
var ToolModes;
(function (ToolModes) {
    ToolModes["Active"] = "Active";
    ToolModes["Passive"] = "Passive";
    ToolModes["Enabled"] = "Enabled";
    ToolModes["Disabled"] = "Disabled";
})(ToolModes || (ToolModes = {}));
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ToolModes);


/***/ },

/***/ 10401
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   H: () => (/* binding */ Swipe)
/* harmony export */ });
var Swipe;
(function (Swipe) {
    Swipe["UP"] = "UP";
    Swipe["DOWN"] = "DOWN";
    Swipe["LEFT"] = "LEFT";
    Swipe["RIGHT"] = "RIGHT";
})(Swipe || (Swipe = {}));



/***/ },

/***/ 29857
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);

// EXPORTS
__webpack_require__.d(__webpack_exports__, {
  AnnotationStyleStates: () => (/* reexport */ enums_AnnotationStyleStates),
  ChangeTypes: () => (/* reexport */ ChangeTypes/* default */.A),
  Events: () => (/* reexport */ Events/* default */.A),
  KeyboardBindings: () => (/* reexport */ ToolBindings/* KeyboardBindings */.q),
  MeasurementType: () => (/* reexport */ MeasurementType),
  MouseBindings: () => (/* reexport */ ToolBindings/* MouseBindings */.i),
  SegmentationRepresentations: () => (/* reexport */ SegmentationRepresentations/* default */.A),
  StrategyCallbacks: () => (/* reexport */ StrategyCallbacks/* default */.A),
  Swipe: () => (/* reexport */ Touch/* Swipe */.H),
  ToolModes: () => (/* reexport */ ToolModes/* default */.A),
  WorkerTypes: () => (/* reexport */ WorkerTypes)
});

// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/enums/ToolBindings.js
var ToolBindings = __webpack_require__(66452);
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/enums/ToolModes.js
var ToolModes = __webpack_require__(49892);
;// ../../../node_modules/@cornerstonejs/tools/dist/esm/enums/AnnotationStyleStates.js
var AnnotationStyleStates;
(function (AnnotationStyleStates) {
    AnnotationStyleStates["Default"] = "";
    AnnotationStyleStates["Highlighted"] = "Highlighted";
    AnnotationStyleStates["Selected"] = "Selected";
    AnnotationStyleStates["Locked"] = "Locked";
    AnnotationStyleStates["AutoGenerated"] = "AutoGenerated";
})(AnnotationStyleStates || (AnnotationStyleStates = {}));
/* harmony default export */ const enums_AnnotationStyleStates = (AnnotationStyleStates);

// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/enums/Events.js
var Events = __webpack_require__(94021);
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/enums/SegmentationRepresentations.js
var SegmentationRepresentations = __webpack_require__(18682);
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/enums/Touch.js
var Touch = __webpack_require__(10401);
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/enums/StrategyCallbacks.js
var StrategyCallbacks = __webpack_require__(84093);
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/enums/ChangeTypes.js
var ChangeTypes = __webpack_require__(75183);
;// ../../../node_modules/@cornerstonejs/tools/dist/esm/enums/WorkerTypes.js
var WorkerTypes_ChangeTypes;
(function (ChangeTypes) {
    ChangeTypes["POLYSEG_CONTOUR_TO_LABELMAP"] = "Converting Contour to Labelmap";
    ChangeTypes["POLYSEG_SURFACE_TO_LABELMAP"] = "Converting Surfaces to Labelmap";
    ChangeTypes["POLYSEG_CONTOUR_TO_SURFACE"] = "Converting Contour to Surface";
    ChangeTypes["POLYSEG_LABELMAP_TO_SURFACE"] = "Converting Labelmap to Surface";
    ChangeTypes["SURFACE_CLIPPING"] = "Clipping Surfaces";
    ChangeTypes["COMPUTE_STATISTICS"] = "Computing Statistics";
    ChangeTypes["INTERPOLATE_LABELMAP"] = "Interpolating Labelmap";
    ChangeTypes["COMPUTE_LARGEST_BIDIRECTIONAL"] = "Computing Largest Bidirectional";
    ChangeTypes["GENERATE_CONTOUR_SETS"] = "Generating Contour Sets";
})(WorkerTypes_ChangeTypes || (WorkerTypes_ChangeTypes = {}));
/* harmony default export */ const WorkerTypes = (WorkerTypes_ChangeTypes);

;// ../../../node_modules/@cornerstonejs/tools/dist/esm/enums/MeasurementType.js
var MeasurementType;
(function (MeasurementType) {
    MeasurementType["Linear"] = "Linear";
    MeasurementType["Area"] = "Area";
    MeasurementType["Volume"] = "Volume";
    MeasurementType["Pixel"] = "Pixel";
})(MeasurementType || (MeasurementType = {}));

;// ../../../node_modules/@cornerstonejs/tools/dist/esm/enums/index.js













/***/ },

/***/ 28024
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   C: () => (/* binding */ setShowPercentage),
/* harmony export */   w: () => (/* binding */ showPercentage)
/* harmony export */ });
// Global state to control whether to show the percentage in the overlay
let showPercentage = true;

/**
 * Sets whether to show the pleura percentage in the viewport overlay
 * @param value - Boolean indicating whether to show the percentage
 */
function setShowPercentage(value) {
  showPercentage = value;
}

/***/ },

/***/ 55015
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {


// EXPORTS
__webpack_require__.d(__webpack_exports__, {
  "default": () => (/* binding */ usAnnotation_src)
});

// UNUSED EXPORTS: setShowPercentage, showPercentage

;// ../../../extensions/usAnnotation/package.json
const package_namespaceObject = /*#__PURE__*/JSON.parse('{"UU":"@ohif/extension-ultrasound-pleura-bline"}');
;// ../../../extensions/usAnnotation/src/id.js

const id = package_namespaceObject.UU;

// EXTERNAL MODULE: ../../../node_modules/react/index.js
var react = __webpack_require__(86326);
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/index.js
var esm = __webpack_require__(4667);
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js + 1 modules
var dist_esm = __webpack_require__(15327);
// EXTERNAL MODULE: ../../core/src/index.ts + 69 modules
var src = __webpack_require__(42356);
// EXTERNAL MODULE: ../../../node_modules/react-i18next/dist/es/index.js + 15 modules
var es = __webpack_require__(99993);
// EXTERNAL MODULE: ../../ui-next/src/index.ts + 3075 modules
var ui_next_src = __webpack_require__(12517);
;// ../../../extensions/usAnnotation/src/panels/USAnnotationPanel.tsx







/**
 * A side panel that drives the ultrasound annotation workflow.
 * It provides controls for managing annotations, toggling display options,
 * and downloading annotations as JSON.
 * @returns The USAnnotationPanel component
 */
function USAnnotationPanel() {
  const {
    t
  } = (0,es/* useTranslation */.Bd)('USAnnotationPanel');
  const {
    servicesManager,
    commandsManager
  } = (0,src/* useSystem */.Jg)();

  /** ──────────────────────────────────────────────────────
   * Local state – purely UI related (no business logic).   */

  const {
    viewportGridService,
    cornerstoneViewportService,
    measurementService
  } = servicesManager.services;

  // UI state variables
  const [depthGuide, setDepthGuide] = (0,react.useState)(true);
  const [autoAdd, setAutoAdd] = (0,react.useState)(true);
  const [showPleuraPct, setShowPleuraPct] = (0,react.useState)(true);
  const [showOverlay, setShowOverlay] = (0,react.useState)(true);

  // Data state variables
  const [annotatedFrames, setAnnotatedFrames] = (0,react.useState)([]);
  const [imageIdsToObserve, setImageIdsToObserve] = (0,react.useState)([]);
  const [labels, setLabels] = (0,react.useState)([]);

  /** ──────────────────────────────────────────────────────
   * Helper – commands bridging back to OHIF services.       */

  /**
   * Switches the active annotation type (pleura or B-line)
   * @param type - The annotation type to switch to
   */
  const switchAnnotation = type => {
    commandsManager.runCommand('setToolActive', {
      toolName: esm.UltrasoundPleuraBLineTool.toolName
    });
    commandsManager.runCommand('switchUSAnnotation', {
      annotationType: type
    });
  };

  /**
   * Deletes the last annotation of the specified type
   * @param type - The annotation type to delete
   */
  const deleteLast = type => {
    commandsManager.runCommand('deleteLastAnnotation', {
      annotationType: type
    });
    updateAnnotatedFrames();
  };

  /**
   * Sets the depth guide display state
   * @param value - Boolean indicating whether to show the depth guide
   */
  const setDepthGuideCommand = value => {
    commandsManager.runCommand('setDepthGuide', {
      value
    });
    setDepthGuide(value);
  };
  /**
   * Sets the auto-add annotations state
   * When enabled, all frames are monitored for annotations
   * When disabled, only manually added frames are monitored
   * @param value - Boolean indicating whether to auto-add annotations
   */
  const setAutoAddCommand = value => {
    if (value) {
      setImageIdsToObserve([]);
    } else {
      const imageIds = annotatedFrames.map(item => item.imageId);
      if (imageIds.length > 0) {
        setImageIdsToObserve(imageIds);
      } else {
        setImageIdsToObserve(['Manual']);
      }
    }
    setAutoAdd(value);
  };
  /**
   * Sets whether to show the pleura percentage in the viewport overlay
   * @param value - Boolean indicating whether to show the percentage
   */
  const setShowPleuraPercentageCommand = value => {
    commandsManager.runCommand('setShowPleuraPercentage', {
      value
    });
    setShowPleuraPct(value);
  };
  /**
   * Sets whether to show the fan overlay in the viewport
   * @param value - Boolean indicating whether to show the overlay
   */
  const setShowOverlayCommand = value => {
    commandsManager.runCommand('setDisplayFanAnnotation', {
      value
    });
    commandsManager.runCommand('setShowPleuraPercentage', {
      value
    });
    setShowOverlay(value);
  };
  /**
   * Downloads the annotations as a JSON file
   * Uses the labels and imageIdsToObserve state variables
   */
  const downloadJSON = () => {
    commandsManager.runCommand('downloadJSON', {
      labels,
      imageIds: imageIdsToObserve
    });
  };

  /**
   * Adds the current image ID to the list of monitored image IDs
   * Only works when auto-add is disabled
   */
  const addCurrentImageId = () => {
    if (!autoAdd) {
      const activeViewportId = viewportGridService.getActiveViewportId();
      const viewport = cornerstoneViewportService.getCornerstoneViewport(activeViewportId);
      const currentImageId = viewport.getCurrentImageId();
      const imageIds = [...imageIdsToObserve];
      if (!imageIds.includes(currentImageId)) {
        imageIds.push(currentImageId);
      }
      setImageIdsToObserve(imageIds);
    }
  };

  /**
   * Handles clicking on a row in the annotated frames table
   * Scrolls the viewport to the selected frame
   * @param item - The annotated frame item that was clicked
   */
  const handleRowClick = item => {
    const activeViewportId = viewportGridService.getActiveViewportId();
    const viewport = cornerstoneViewportService.getCornerstoneViewport(activeViewportId);
    dist_esm.utilities.scroll(viewport, {
      delta: item.frame - viewport.getCurrentImageIdIndex()
    });
  };

  /**
   * Render helpers so the JSX doesn’t become spaghetti.     */
  const renderWorkflowToggles = () => /*#__PURE__*/react.createElement(ui_next_src/* PanelSection */.aUM.Content, null, /*#__PURE__*/react.createElement("div", {
    className: "space-y-3 p-2 text-sm text-white"
  }, /*#__PURE__*/react.createElement("div", {
    className: "flex items-center"
  }, /*#__PURE__*/react.createElement(ui_next_src/* Switch */.dOG, {
    id: "depth-guide-switch",
    className: "mr-3",
    checked: depthGuide,
    onCheckedChange: () => setDepthGuideCommand(!depthGuide)
  }), /*#__PURE__*/react.createElement("label", {
    htmlFor: "depth-guide-switch",
    className: "cursor-pointer",
    onClick: () => setDepthGuideCommand(!depthGuide)
  }, t('Depth guide toggle'))), /*#__PURE__*/react.createElement("div", {
    className: "flex items-center"
  }, /*#__PURE__*/react.createElement(ui_next_src/* Switch */.dOG, {
    id: "pleura-percentage-switch",
    className: "mr-3",
    checked: showPleuraPct,
    onCheckedChange: () => setShowPleuraPercentageCommand(!showPleuraPct)
  }), /*#__PURE__*/react.createElement("label", {
    htmlFor: "pleura-percentage-switch",
    className: "cursor-pointer",
    onClick: () => setShowPleuraPercentageCommand(!showPleuraPct)
  }, t('Show pleura percentage')))));
  const renderSectorAnnotations = () => /*#__PURE__*/react.createElement(ui_next_src/* PanelSection */.aUM.Content, null, /*#__PURE__*/react.createElement("div", {
    className: "flex flex-col gap-4 p-2"
  }, /*#__PURE__*/react.createElement(ui_next_src/* Label */.JU7, null, t('Sector Annotations')), /*#__PURE__*/react.createElement("div", {
    className: "flex items-center gap-2"
  }, /*#__PURE__*/react.createElement(ui_next_src/* Tabs */.tUM, {
    defaultValue: esm.UltrasoundPleuraBLineTool.USPleuraBLineAnnotationType.BLINE,
    onValueChange: newValue => switchAnnotation(newValue)
  }, /*#__PURE__*/react.createElement(ui_next_src/* TabsList */.j7C, null, /*#__PURE__*/react.createElement(ui_next_src/* TabsTrigger */.Xib, {
    value: esm.UltrasoundPleuraBLineTool.USPleuraBLineAnnotationType.PLEURA
  }, /*#__PURE__*/react.createElement(ui_next_src/* Icons */.FI1.Plus, null), " ", t('Pleura line')), /*#__PURE__*/react.createElement(ui_next_src/* TabsTrigger */.Xib, {
    value: esm.UltrasoundPleuraBLineTool.USPleuraBLineAnnotationType.BLINE
  }, /*#__PURE__*/react.createElement(ui_next_src/* Icons */.FI1.Plus, null), " ", t('B-line')), /*#__PURE__*/react.createElement(ui_next_src/* Separator */.wvv, {
    orientation: "vertical"
  }), /*#__PURE__*/react.createElement(ui_next_src/* Separator */.wvv, {
    orientation: "vertical"
  }))), /*#__PURE__*/react.createElement(ui_next_src/* DropdownMenu */.rId, null, /*#__PURE__*/react.createElement(ui_next_src/* DropdownMenuTrigger */.tyb, {
    asChild: true
  }, /*#__PURE__*/react.createElement(ui_next_src/* Button */.$nd, {
    variant: "ghost",
    className: "ml-auto"
  }, /*#__PURE__*/react.createElement(ui_next_src/* Icons */.FI1.More, null))), /*#__PURE__*/react.createElement(ui_next_src/* DropdownMenuContent */.SQm, null, /*#__PURE__*/react.createElement(ui_next_src/* DropdownMenuItem */._26, {
    onClick: () => deleteLast(esm.UltrasoundPleuraBLineTool.USPleuraBLineAnnotationType.BLINE)
  }, /*#__PURE__*/react.createElement(ui_next_src/* Icons */.FI1.Delete, {
    className: "text-foreground"
  }), /*#__PURE__*/react.createElement("span", {
    className: "pl-2"
  }, t('B-line annotation'))), /*#__PURE__*/react.createElement(ui_next_src/* DropdownMenuItem */._26, {
    onClick: () => deleteLast(esm.UltrasoundPleuraBLineTool.USPleuraBLineAnnotationType.PLEURA)
  }, /*#__PURE__*/react.createElement(ui_next_src/* Icons */.FI1.Delete, {
    className: "text-foreground"
  }), /*#__PURE__*/react.createElement("span", {
    className: "pl-2"
  }, t('Pleura annotation')))))), /*#__PURE__*/react.createElement("div", {
    className: "mt-2 flex items-center gap-2"
  }, /*#__PURE__*/react.createElement(ui_next_src/* Switch */.dOG, {
    id: "show-overlay-switch",
    checked: showOverlay,
    onCheckedChange: () => setShowOverlayCommand(!showOverlay),
    className: "data-[state=checked]:bg-blue-500"
  }), /*#__PURE__*/react.createElement("label", {
    htmlFor: "show-overlay-switch",
    className: "cursor-pointer text-blue-300"
  }, t('Show Overlay'))), /*#__PURE__*/react.createElement("hr", {
    className: "border-t border-gray-800"
  })));
  const renderAnnotatedFrames = () => /*#__PURE__*/react.createElement(ui_next_src/* ScrollArea */.FKN, {
    className: "h-full"
  }, /*#__PURE__*/react.createElement(ui_next_src/* PanelSection */.aUM.Content, null, /*#__PURE__*/react.createElement("div", {
    className: "mb-4 flex items-center justify-between"
  }, /*#__PURE__*/react.createElement(ui_next_src/* Button */.$nd, {
    variant: "ghost",
    onClick: () => downloadJSON()
  }, /*#__PURE__*/react.createElement(ui_next_src/* Icons */.FI1.Download, {
    className: "h-5 w-5"
  }), /*#__PURE__*/react.createElement("span", null, t('JSON'))), /*#__PURE__*/react.createElement(ui_next_src/* Button */.$nd, {
    variant: "ghost",
    onClick: () => setShowOverlayCommand(!showOverlay)
  }, showOverlay ? /*#__PURE__*/react.createElement(ui_next_src/* Icons */.FI1.Hide, {
    className: "h-5 w-5"
  }) : /*#__PURE__*/react.createElement(ui_next_src/* Icons */.FI1.Show, {
    className: "h-5 w-5"
  }))), /*#__PURE__*/react.createElement("div", {
    className: "w-full overflow-hidden"
  }, /*#__PURE__*/react.createElement("table", {
    className: "w-full border-collapse text-sm"
  }, /*#__PURE__*/react.createElement("thead", null, /*#__PURE__*/react.createElement("tr", {
    className: "border-b border-blue-900 text-blue-300"
  }, /*#__PURE__*/react.createElement("th", null), /*#__PURE__*/react.createElement("th", {
    className: "py-2 px-3 text-left"
  }, t('Frame')), /*#__PURE__*/react.createElement("th", {
    className: "py-2 px-3 text-center"
  }, t('Pleura lines')), /*#__PURE__*/react.createElement("th", {
    className: "py-2 px-3 text-center"
  }, t('B-lines')), /*#__PURE__*/react.createElement("th", {
    className: "w-10"
  }))), /*#__PURE__*/react.createElement("tbody", null, annotatedFrames.map(item => /*#__PURE__*/react.createElement("tr", {
    key: item.frame,
    className: `border-b border-blue-900 ${item.frame === 5 ? 'bg-cyan-800 bg-opacity-30' : ''}`,
    onClick: () => handleRowClick(item),
    style: {
      cursor: 'pointer'
    }
  }, /*#__PURE__*/react.createElement("td", {
    className: "py-3 px-3"
  }, item.index), /*#__PURE__*/react.createElement("td", {
    className: "py-3 px-3"
  }, item.frame + 1), /*#__PURE__*/react.createElement("td", {
    className: "py-3 px-3 text-center"
  }, item.pleura), /*#__PURE__*/react.createElement("td", {
    className: "py-3 px-3 text-center"
  }, item.bLine), /*#__PURE__*/react.createElement("td", {
    className: "py-3 px-3 text-right"
  }, item.frame === 5 && /*#__PURE__*/react.createElement("div", {
    className: "flex items-center justify-end"
  }, /*#__PURE__*/react.createElement(ui_next_src/* Button */.$nd, {
    variant: "ghost",
    className: "p-0 text-blue-300"
  }, /*#__PURE__*/react.createElement(ui_next_src/* Icons */.FI1.EyeVisible, null)), /*#__PURE__*/react.createElement(ui_next_src/* Button */.$nd, {
    variant: "ghost",
    className: "ml-2 p-0 text-blue-300"
  }, /*#__PURE__*/react.createElement(ui_next_src/* Icons */.FI1.More, null)))))))))));
  const updateAnnotatedFrames = () => {
    const activeViewportId = viewportGridService.getActiveViewportId();
    const viewport = cornerstoneViewportService.getCornerstoneViewport(activeViewportId);
    // copying to avoid mutating the original array
    const imageIdsMonitored = [...imageIdsToObserve];
    const imageIdFilter = imageId => {
      if (imageIdsMonitored.length === 0) {
        return true;
      }
      return imageIdsMonitored.includes(imageId);
    };
    const mapping = esm.UltrasoundPleuraBLineTool.countAnnotations(viewport.element, imageIdFilter);
    if (!mapping) {
      setAnnotatedFrames([]);
      return;
    }
    const keys = Array.from(mapping.keys());
    const updatedFrames = keys.map((key, index) => {
      const {
        pleura,
        bLine,
        frame
      } = mapping.get(key) || {
        pleura: 0,
        bLine: 0,
        frame: 0
      };
      return {
        imageId: key,
        index: index + 1,
        frame,
        pleura,
        bLine
      };
    });
    setAnnotatedFrames(updatedFrames);
  };
  /**
   * Callback function that is called when an annotation is modified
   * Updates the annotatedFrames state with the latest annotation data
   */
  const annotationModified = react.useCallback(event => {
    if (event.detail.annotation.metadata.toolName === esm.UltrasoundPleuraBLineTool.toolName) {
      updateAnnotatedFrames();
    }
  }, [viewportGridService, cornerstoneViewportService, imageIdsToObserve]);
  (0,react.useEffect)(() => {
    dist_esm.eventTarget.addEventListener(esm.Enums.Events.ANNOTATION_MODIFIED, annotationModified);
    const {
      unsubscribe
    } = measurementService.subscribe(measurementService.EVENTS.MEASUREMENT_REMOVED, () => {
      updateAnnotatedFrames();
    });
    return () => {
      dist_esm.eventTarget.removeEventListener(esm.Enums.Events.ANNOTATION_MODIFIED, annotationModified);
      unsubscribe();
    };
  }, [annotationModified, measurementService]);

  /**
   * ──────────────────────────────────────────────────────
   *  🖼  Final Render                                      */
  return /*#__PURE__*/react.createElement("div", {
    className: "h-full bg-black text-white",
    style: {
      minWidth: 240,
      maxWidth: 480,
      width: '100%'
    }
  }, /*#__PURE__*/react.createElement(ui_next_src/* PanelSection */.aUM, null, /*#__PURE__*/react.createElement(ui_next_src/* PanelSection */.aUM.Header, null, t('Workflow')), renderWorkflowToggles()), /*#__PURE__*/react.createElement(ui_next_src/* PanelSection */.aUM, null, /*#__PURE__*/react.createElement(ui_next_src/* PanelSection */.aUM.Header, null, t('Annotations')), renderSectorAnnotations()), /*#__PURE__*/react.createElement(ui_next_src/* PanelSection */.aUM, {
    className: "flex-1"
  }, /*#__PURE__*/react.createElement(ui_next_src/* PanelSection */.aUM.Header, null, t('Annotated Frames')), renderAnnotatedFrames()));
}
;// ../../../extensions/usAnnotation/src/getPanelModule.tsx



/**
 * Creates and returns the panel module for ultrasound annotation
 * @param params - Object containing commandsManager, servicesManager, and extensionManager
 * @returns Array of panel configurations
 */
const getPanelModule = ({
  commandsManager,
  servicesManager,
  extensionManager
}) => {
  /**
   * Wrapper component for the USAnnotationPanel that injects the required props
   * @param props - Component props including configuration
   * @returns The wrapped USAnnotationPanel component
   */
  const wrappedUSAnnotationPanel = ({
    configuration
  }) => {
    return /*#__PURE__*/react.createElement(USAnnotationPanel, null);
  };
  return [{
    name: 'USAnnotationPanel',
    iconName: 'tab-linear',
    iconLabel: 'US Annotation',
    label: 'USAnnotation',
    component: wrappedUSAnnotationPanel
  }];
};
/* harmony default export */ const src_getPanelModule = (getPanelModule);
;// ../../../extensions/usAnnotation/src/getInstanceByImageId.ts
/**
 * Retrieves the DICOM instance associated with a specific imageId
 * @param services - The OHIF services object
 * @param imageId - The image ID to find the instance for
 * @returns The DICOM instance object or undefined if not found
 */
function getInstanceByImageId(services, imageId) {
  const activeDisplaySets = services.displaySetService.getActiveDisplaySets();
  const displaySet = activeDisplaySets.find(displaySet => displaySet?.imageIds?.includes(imageId));
  return displaySet?.instance;
}
// EXTERNAL MODULE: ../../../extensions/usAnnotation/src/PleuraBlinePercentage.ts
var PleuraBlinePercentage = __webpack_require__(28024);
;// ../../../extensions/usAnnotation/src/getCommandsModule.ts





const {
  downloadBlob
} = src/* utils */.Wp;
const {
  transformWorldToIndex
} = dist_esm.utilities;

/**
 * Creates and returns the commands module for ultrasound annotation
 * @param params - Extension parameters including servicesManager and commandsManager
 * @returns The commands module with actions and definitions
 */
function commandsModule({
  servicesManager
}) {
  const {
    viewportGridService,
    toolGroupService,
    cornerstoneViewportService
  } = servicesManager.services;
  const actions = {
    /**
     * Switches the active ultrasound annotation type
     * @param options - Object containing the annotationType to switch to
     */
    switchUSPleuraBLineAnnotation: ({
      annotationType
    }) => {
      const activeViewportId = viewportGridService.getActiveViewportId();
      const toolGroup = toolGroupService.getToolGroupForViewport(activeViewportId);
      if (!toolGroup) {
        return;
      }
      const usAnnotation = toolGroup.getToolInstance(esm.UltrasoundPleuraBLineTool.toolName);
      if (usAnnotation) {
        usAnnotation.setActiveAnnotationType(annotationType);
      }
    },
    /**
     * Convenience method to switch to pleura line annotation type
     */
    switchUSPleuraBLineAnnotationToPleuraLine: () => {
      actions.switchUSPleuraBLineAnnotation({
        annotationType: esm.UltrasoundPleuraBLineTool.USPleuraBLineAnnotationType.PLEURA
      });
    },
    /**
     * Convenience method to switch to B-line annotation type
     */
    switchUSPleuraBLineAnnotationToBLine: () => {
      actions.switchUSPleuraBLineAnnotation({
        annotationType: esm.UltrasoundPleuraBLineTool.USPleuraBLineAnnotationType.BLINE
      });
    },
    /**
     * Deletes the last annotation of the specified type
     * @param options - Object containing the annotationType to delete
     */
    deleteLastUSPleuraBLineAnnotation: ({
      annotationType
    }) => {
      const activeViewportId = viewportGridService.getActiveViewportId();
      const toolGroup = toolGroupService.getToolGroupForViewport(activeViewportId);
      if (!toolGroup) {
        return;
      }
      const usAnnotation = toolGroup.getToolInstance(esm.UltrasoundPleuraBLineTool.toolName);
      if (usAnnotation) {
        const viewport = cornerstoneViewportService.getCornerstoneViewport(activeViewportId);
        usAnnotation.deleteLastAnnotationType(viewport.element, annotationType);
        viewport.render();
      }
    },
    /**
     * Convenience method to delete the last pleura line annotation
     */
    deleteLastPleuraAnnotation: () => {
      actions.deleteLastUSPleuraBLineAnnotation({
        annotationType: esm.UltrasoundPleuraBLineTool.USPleuraBLineAnnotationType.PLEURA
      });
    },
    /**
     * Convenience method to delete the last B-line annotation
     */
    deleteLastBLineAnnotation: () => {
      actions.deleteLastUSPleuraBLineAnnotation({
        annotationType: esm.UltrasoundPleuraBLineTool.USPleuraBLineAnnotationType.BLINE
      });
    },
    /**
     * Toggles a boolean attribute of the ultrasound annotation tool
     * @param options - Object containing the attribute name to toggle
     */
    toggleUSToolAttribute: ({
      attribute
    }) => {
      const activeViewportId = viewportGridService.getActiveViewportId();
      const toolGroup = toolGroupService.getToolGroupForViewport(activeViewportId);
      if (!toolGroup) {
        return;
      }
      const configuration = toolGroup.getToolConfiguration(esm.UltrasoundPleuraBLineTool.toolName);
      if (!configuration) {
        return;
      }
      toolGroup.setToolConfiguration(esm.UltrasoundPleuraBLineTool.toolName, {
        [attribute]: !configuration[attribute]
      });
      const viewport = cornerstoneViewportService.getCornerstoneViewport(activeViewportId);
      viewport.render();
    },
    /**
     * Sets a specific attribute of the ultrasound annotation tool to a given value
     * @param options - Object containing the attribute name and value to set
     */
    setUSToolAttribute: ({
      attribute,
      value
    }) => {
      const activeViewportId = viewportGridService.getActiveViewportId();
      const toolGroup = toolGroupService.getToolGroupForViewport(activeViewportId);
      if (!toolGroup) {
        return;
      }
      const configuration = toolGroup.getToolConfiguration(esm.UltrasoundPleuraBLineTool.toolName);
      if (!configuration) {
        return;
      }
      toolGroup.setToolConfiguration(esm.UltrasoundPleuraBLineTool.toolName, {
        [attribute]: value
      });
      const viewport = cornerstoneViewportService.getCornerstoneViewport(activeViewportId);
      viewport.render();
    },
    /**
     * Toggles the display of fan annotations
     */
    toggleDisplayFanAnnotation: () => {
      actions.toggleUSToolAttribute({
        attribute: 'showFanAnnotations'
      });
    },
    /**
     * Toggles the display of the depth guide
     */
    toggleDepthGuide: () => {
      actions.toggleUSToolAttribute({
        attribute: 'drawDepthGuide'
      });
    },
    /**
     * Sets the depth guide display state
     * @param options - Object containing the boolean value to set
     */
    setDepthGuide: ({
      value
    }) => {
      actions.setUSToolAttribute({
        attribute: 'drawDepthGuide',
        value
      });
    },
    /**
     * Sets the fan annotation display state
     * @param options - Object containing the boolean value to set
     */
    setDisplayFanAnnotation: ({
      value
    }) => {
      actions.setUSToolAttribute({
        attribute: 'showFanAnnotations',
        value
      });
    },
    /**
     * Sets whether to show the pleura percentage in the viewport overlay
     * @param options - Object containing the boolean value to set
     */
    setShowPleuraPercentage: ({
      value
    }) => {
      (0,PleuraBlinePercentage/* setShowPercentage */.C)(value);
      // Trigger ANNOTATION_MODIFIED event to update the overlay
      (0,dist_esm.triggerEvent)(dist_esm.eventTarget, esm.Enums.Events.ANNOTATION_MODIFIED, {
        annotation: {
          metadata: {
            toolName: esm.UltrasoundPleuraBLineTool.toolName
          }
        }
      });
    },
    /**
     * Generates a JSON representation of the ultrasound annotations
     * @param labels - Array of annotation labels
     * @param imageIds - Array of image IDs to include in the JSON
     * @returns A JSON object containing the annotations data or undefined if generation fails
     */
    generateUSPleuraBLineAnnotationsJSON: (labels = [], imageIds = []) => {
      const activeViewportId = viewportGridService.getActiveViewportId();
      const viewport = cornerstoneViewportService.getCornerstoneViewport(activeViewportId);
      if (!viewport) {
        return;
      }
      const {
        imageData
      } = viewport.getImageData() || {};
      if (!imageData) {
        return;
      }
      const toolGroup = toolGroupService.getToolGroupForViewport(activeViewportId);
      if (!toolGroup) {
        return;
      }
      const usAnnotation = toolGroup.getToolInstance(esm.UltrasoundPleuraBLineTool.toolName);
      if (usAnnotation) {
        const configuration = toolGroup.getToolConfiguration(esm.UltrasoundPleuraBLineTool.toolName);
        const imageId = viewport.getCurrentImageId();
        const filterImageIds = imageId => {
          if (imageIds.length === 0) {
            return true;
          } else {
            return imageIds.includes(imageId);
          }
        };
        const annotations = esm.UltrasoundPleuraBLineTool.filterAnnotations(viewport.element, filterImageIds);
        const frame_annotations = {};
        const viewportImageIds = viewport.getImageIds();
        annotations.forEach(annotation => {
          const imageId = annotation.metadata.referencedImageId;
          const {
            annotationType
          } = annotation.data;
          const [point1, point2] = annotation.data.handles.points;
          const p1 = transformWorldToIndex(imageData, point1);
          const p2 = transformWorldToIndex(imageData, point2);
          const imageIdIndex = viewportImageIds.indexOf(imageId);
          if (frame_annotations[imageIdIndex] === undefined) {
            frame_annotations[imageIdIndex] = {
              pleura_lines: [],
              b_lines: []
            };
          }
          if (annotationType === esm.UltrasoundPleuraBLineTool.USPleuraBLineAnnotationType.PLEURA) {
            frame_annotations[imageIdIndex].pleura_lines.push([[p1[0], p1[1], 0], [p2[0], p2[1], 0]]);
          } else if (annotationType === esm.UltrasoundPleuraBLineTool.USPleuraBLineAnnotationType.BLINE) {
            frame_annotations[imageIdIndex].b_lines.push([[p1[0], p1[1], 0], [p2[0], p2[1], 0]]);
          }
        });
        const instance = getInstanceByImageId(servicesManager.services, imageId);
        const json = {
          SOPInstanceUID: instance.SOPInstanceUID,
          GrayscaleConversion: false,
          mask_type: 'fan',
          angle1: configuration.startAngle,
          angle2: configuration.endAngle,
          center_rows_px: configuration.center[0],
          center_cols_px: configuration.center[1],
          radius1: configuration.innerRadius,
          radius2: configuration.outerRadius,
          image_size_rows: instance.rows,
          image_size_cols: instance.columns,
          AnnotationLabels: labels,
          frame_annotations
        };
        return json;
      }
    },
    /**
     * Downloads the ultrasound annotations as a JSON file
     * @param options - Object containing labels and imageIds arrays
     */
    downloadUSPleuraBLineAnnotationsJSON({
      labels = [],
      imageIds = []
    }) {
      const json = actions.generateUSPleuraBLineAnnotationsJSON(labels, imageIds);
      if (!json) {
        return;
      }

      // Convert JSON object to a string
      const jsonString = JSON.stringify(json, null, 2);

      // Create a blob with the JSON data
      const blob = new Blob([jsonString], {
        type: 'application/json'
      });
      downloadBlob(blob, {
        filename: `ultrasound_annotations_${new Date().toISOString().slice(0, 10)}.json`
      });

      // Append to the document, click to download, and remove
      document.body.appendChild(a);
      a.click();
      document.body.removeChild(a);

      // Clean up by revoking the URL
      URL.revokeObjectURL(url);
    }
  };
  const definitions = {
    switchUSAnnotation: {
      commandFn: actions.switchUSPleuraBLineAnnotation
    },
    deleteLastAnnotation: {
      commandFn: actions.deleteLastUSPleuraBLineAnnotation
    },
    toggleDepthGuide: {
      commandFn: actions.toggleDepthGuide
    },
    setDepthGuide: {
      commandFn: actions.setDepthGuide
    },
    setShowPleuraPercentage: {
      commandFn: actions.setShowPleuraPercentage
    },
    toggleUSToolAttribute: {
      commandFn: actions.toggleUSToolAttribute
    },
    setUSToolAttribute: {
      commandFn: actions.setUSToolAttribute
    },
    toggleDisplayFanAnnotation: {
      commandFn: actions.toggleDisplayFanAnnotation
    },
    setDisplayFanAnnotation: {
      commandFn: actions.setDisplayFanAnnotation
    },
    generateJSON: {
      commandFn: actions.generateUSPleuraBLineAnnotationsJSON
    },
    downloadJSON: {
      commandFn: actions.downloadUSPleuraBLineAnnotationsJSON
    },
    switchUSAnnotationToPleuraLine: {
      commandFn: actions.switchUSPleuraBLineAnnotationToPleuraLine
    },
    switchUSAnnotationToBLine: {
      commandFn: actions.switchUSPleuraBLineAnnotationToBLine
    },
    deleteLastPleuraAnnotation: {
      commandFn: actions.deleteLastPleuraAnnotation
    },
    deleteLastBLineAnnotation: {
      commandFn: actions.deleteLastBLineAnnotation
    }
  };
  return {
    actions,
    definitions,
    defaultContext: 'CORNERSTONE'
  };
}
/* harmony default export */ const getCommandsModule = (commandsModule);
;// ../../../extensions/usAnnotation/src/index.ts




/**
 * You can remove any of the following modules if you don't need them.
 */
/* harmony default export */ const usAnnotation_src = ({
  /**
   * Only required property. Should be a unique value across all extensions.
   * You ID can be anything you want, but it should be unique.
   */
  id: id,
  /**
   * PanelModule should provide a list of panels that will be available in OHIF
   * for Modes to consume and render. Each panel is defined by a {name,
   * iconName, iconLabel, label, component} object. Example of a panel module
   * is the StudyBrowserPanel that is provided by the default extension in OHIF.
   */
  getPanelModule: src_getPanelModule,
  /**
   * CommandsModule should provide a list of commands that will be available in OHIF
   * for Modes to consume and use in the viewports. Each command is defined by
   * an object of { actions, definitions, defaultContext } where actions is an
   * object of functions, definitions is an object of available commands, their
   * options, and defaultContext is the default context for the command to run against.
   */
  getCommandsModule: getCommandsModule
});


/***/ }

}]);