"use strict";
/*
 * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
 * This devtool is neither made for production nor for readable output files.
 * It uses "eval()" calls to create a separate source file in the browser devtools.
 * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
 * or disable the default devtool with "devtool: false".
 * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
 */
(self["webpackChunk_JUPYTERLAB_CORE_OUTPUT"] = self["webpackChunk_JUPYTERLAB_CORE_OUTPUT"] || []).push([["vendors-node_modules_mermaid_dist_chunks_mermaid_core_diagram-QEK2KX5R_mjs"],{

/***/ "../node_modules/mermaid/dist/chunks/mermaid.core/chunk-4BX2VUAB.mjs":
/*!***************************************************************************!*\
  !*** ../node_modules/mermaid/dist/chunks/mermaid.core/chunk-4BX2VUAB.mjs ***!
  \***************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   populateCommonDb: () => (/* binding */ populateCommonDb)\n/* harmony export */ });\n/* harmony import */ var _chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./chunk-AGHRB4JF.mjs */ \"../node_modules/mermaid/dist/chunks/mermaid.core/chunk-AGHRB4JF.mjs\");\n\n\n// src/diagrams/common/populateCommonDb.ts\nfunction populateCommonDb(ast, db) {\n  if (ast.accDescr) {\n    db.setAccDescription?.(ast.accDescr);\n  }\n  if (ast.accTitle) {\n    db.setAccTitle?.(ast.accTitle);\n  }\n  if (ast.title) {\n    db.setDiagramTitle?.(ast.title);\n  }\n}\n(0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_0__.__name)(populateCommonDb, \"populateCommonDb\");\n\n\n\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/mermaid/dist/chunks/mermaid.core/chunk-4BX2VUAB.mjs?");

/***/ }),

/***/ "../node_modules/mermaid/dist/chunks/mermaid.core/diagram-QEK2KX5R.mjs":
/*!*****************************************************************************!*\
  !*** ../node_modules/mermaid/dist/chunks/mermaid.core/diagram-QEK2KX5R.mjs ***!
  \*****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   diagram: () => (/* binding */ diagram)\n/* harmony export */ });\n/* harmony import */ var _chunk_EXTU4WIE_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./chunk-EXTU4WIE.mjs */ \"../node_modules/mermaid/dist/chunks/mermaid.core/chunk-EXTU4WIE.mjs\");\n/* harmony import */ var _chunk_4BX2VUAB_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./chunk-4BX2VUAB.mjs */ \"../node_modules/mermaid/dist/chunks/mermaid.core/chunk-4BX2VUAB.mjs\");\n/* harmony import */ var _chunk_S3R3BYOJ_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./chunk-S3R3BYOJ.mjs */ \"../node_modules/mermaid/dist/chunks/mermaid.core/chunk-S3R3BYOJ.mjs\");\n/* harmony import */ var _chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./chunk-ABZYJK2D.mjs */ \"../node_modules/mermaid/dist/chunks/mermaid.core/chunk-ABZYJK2D.mjs\");\n/* harmony import */ var _chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./chunk-AGHRB4JF.mjs */ \"../node_modules/mermaid/dist/chunks/mermaid.core/chunk-AGHRB4JF.mjs\");\n/* harmony import */ var _mermaid_js_parser__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mermaid-js/parser */ \"../node_modules/@mermaid-js/parser/dist/mermaid-parser.core.mjs\");\n\n\n\n\n\n\n// src/diagrams/radar/db.ts\nvar defaultOptions = {\n  showLegend: true,\n  ticks: 5,\n  max: null,\n  min: 0,\n  graticule: \"circle\"\n};\nvar defaultRadarData = {\n  axes: [],\n  curves: [],\n  options: defaultOptions\n};\nvar data = structuredClone(defaultRadarData);\nvar DEFAULT_RADAR_CONFIG = _chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_3__.defaultConfig_default.radar;\nvar getConfig2 = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_4__.__name)(() => {\n  const config = (0,_chunk_S3R3BYOJ_mjs__WEBPACK_IMPORTED_MODULE_2__.cleanAndMerge)({\n    ...DEFAULT_RADAR_CONFIG,\n    ...(0,_chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_3__.getConfig)().radar\n  });\n  return config;\n}, \"getConfig\");\nvar getAxes = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_4__.__name)(() => data.axes, \"getAxes\");\nvar getCurves = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_4__.__name)(() => data.curves, \"getCurves\");\nvar getOptions = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_4__.__name)(() => data.options, \"getOptions\");\nvar setAxes = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_4__.__name)((axes) => {\n  data.axes = axes.map((axis) => {\n    return {\n      name: axis.name,\n      label: axis.label ?? axis.name\n    };\n  });\n}, \"setAxes\");\nvar setCurves = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_4__.__name)((curves) => {\n  data.curves = curves.map((curve) => {\n    return {\n      name: curve.name,\n      label: curve.label ?? curve.name,\n      entries: computeCurveEntries(curve.entries)\n    };\n  });\n}, \"setCurves\");\nvar computeCurveEntries = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_4__.__name)((entries) => {\n  if (entries[0].axis == void 0) {\n    return entries.map((entry) => entry.value);\n  }\n  const axes = getAxes();\n  if (axes.length === 0) {\n    throw new Error(\"Axes must be populated before curves for reference entries\");\n  }\n  return axes.map((axis) => {\n    const entry = entries.find((entry2) => entry2.axis?.$refText === axis.name);\n    if (entry === void 0) {\n      throw new Error(\"Missing entry for axis \" + axis.label);\n    }\n    return entry.value;\n  });\n}, \"computeCurveEntries\");\nvar setOptions = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_4__.__name)((options) => {\n  const optionMap = options.reduce(\n    (acc, option) => {\n      acc[option.name] = option;\n      return acc;\n    },\n    {}\n  );\n  data.options = {\n    showLegend: optionMap.showLegend?.value ?? defaultOptions.showLegend,\n    ticks: optionMap.ticks?.value ?? defaultOptions.ticks,\n    max: optionMap.max?.value ?? defaultOptions.max,\n    min: optionMap.min?.value ?? defaultOptions.min,\n    graticule: optionMap.graticule?.value ?? defaultOptions.graticule\n  };\n}, \"setOptions\");\nvar clear2 = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_4__.__name)(() => {\n  (0,_chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_3__.clear)();\n  data = structuredClone(defaultRadarData);\n}, \"clear\");\nvar db = {\n  getAxes,\n  getCurves,\n  getOptions,\n  setAxes,\n  setCurves,\n  setOptions,\n  getConfig: getConfig2,\n  clear: clear2,\n  setAccTitle: _chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_3__.setAccTitle,\n  getAccTitle: _chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_3__.getAccTitle,\n  setDiagramTitle: _chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_3__.setDiagramTitle,\n  getDiagramTitle: _chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_3__.getDiagramTitle,\n  getAccDescription: _chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_3__.getAccDescription,\n  setAccDescription: _chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_3__.setAccDescription\n};\n\n// src/diagrams/radar/parser.ts\n\nvar populate = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_4__.__name)((ast) => {\n  (0,_chunk_4BX2VUAB_mjs__WEBPACK_IMPORTED_MODULE_1__.populateCommonDb)(ast, db);\n  const { axes, curves, options } = ast;\n  db.setAxes(axes);\n  db.setCurves(curves);\n  db.setOptions(options);\n}, \"populate\");\nvar parser = {\n  parse: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_4__.__name)(async (input) => {\n    const ast = await (0,_mermaid_js_parser__WEBPACK_IMPORTED_MODULE_5__.parse)(\"radar\", input);\n    _chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_4__.log.debug(ast);\n    populate(ast);\n  }, \"parse\")\n};\n\n// src/diagrams/radar/renderer.ts\nvar draw = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_4__.__name)((_text, id, _version, diagram2) => {\n  const db2 = diagram2.db;\n  const axes = db2.getAxes();\n  const curves = db2.getCurves();\n  const options = db2.getOptions();\n  const config = db2.getConfig();\n  const title = db2.getDiagramTitle();\n  const svg = (0,_chunk_EXTU4WIE_mjs__WEBPACK_IMPORTED_MODULE_0__.selectSvgElement)(id);\n  const g = drawFrame(svg, config);\n  const maxValue = options.max ?? Math.max(...curves.map((curve) => Math.max(...curve.entries)));\n  const minValue = options.min;\n  const radius = Math.min(config.width, config.height) / 2;\n  drawGraticule(g, axes, radius, options.ticks, options.graticule);\n  drawAxes(g, axes, radius, config);\n  drawCurves(g, axes, curves, minValue, maxValue, options.graticule, config);\n  drawLegend(g, curves, options.showLegend, config);\n  g.append(\"text\").attr(\"class\", \"radarTitle\").text(title).attr(\"x\", 0).attr(\"y\", -config.height / 2 - config.marginTop);\n}, \"draw\");\nvar drawFrame = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_4__.__name)((svg, config) => {\n  const totalWidth = config.width + config.marginLeft + config.marginRight;\n  const totalHeight = config.height + config.marginTop + config.marginBottom;\n  const center = {\n    x: config.marginLeft + config.width / 2,\n    y: config.marginTop + config.height / 2\n  };\n  svg.attr(\"viewbox\", `0 0 ${totalWidth} ${totalHeight}`).attr(\"width\", totalWidth).attr(\"height\", totalHeight);\n  return svg.append(\"g\").attr(\"transform\", `translate(${center.x}, ${center.y})`);\n}, \"drawFrame\");\nvar drawGraticule = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_4__.__name)((g, axes, radius, ticks, graticule) => {\n  if (graticule === \"circle\") {\n    for (let i = 0; i < ticks; i++) {\n      const r = radius * (i + 1) / ticks;\n      g.append(\"circle\").attr(\"r\", r).attr(\"class\", \"radarGraticule\");\n    }\n  } else if (graticule === \"polygon\") {\n    const numAxes = axes.length;\n    for (let i = 0; i < ticks; i++) {\n      const r = radius * (i + 1) / ticks;\n      const points = axes.map((_, j) => {\n        const angle = 2 * j * Math.PI / numAxes - Math.PI / 2;\n        const x = r * Math.cos(angle);\n        const y = r * Math.sin(angle);\n        return `${x},${y}`;\n      }).join(\" \");\n      g.append(\"polygon\").attr(\"points\", points).attr(\"class\", \"radarGraticule\");\n    }\n  }\n}, \"drawGraticule\");\nvar drawAxes = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_4__.__name)((g, axes, radius, config) => {\n  const numAxes = axes.length;\n  for (let i = 0; i < numAxes; i++) {\n    const label = axes[i].label;\n    const angle = 2 * i * Math.PI / numAxes - Math.PI / 2;\n    g.append(\"line\").attr(\"x1\", 0).attr(\"y1\", 0).attr(\"x2\", radius * config.axisScaleFactor * Math.cos(angle)).attr(\"y2\", radius * config.axisScaleFactor * Math.sin(angle)).attr(\"class\", \"radarAxisLine\");\n    g.append(\"text\").text(label).attr(\"x\", radius * config.axisLabelFactor * Math.cos(angle)).attr(\"y\", radius * config.axisLabelFactor * Math.sin(angle)).attr(\"class\", \"radarAxisLabel\");\n  }\n}, \"drawAxes\");\nfunction drawCurves(g, axes, curves, minValue, maxValue, graticule, config) {\n  const numAxes = axes.length;\n  const radius = Math.min(config.width, config.height) / 2;\n  curves.forEach((curve, index) => {\n    if (curve.entries.length !== numAxes) {\n      return;\n    }\n    const points = curve.entries.map((entry, i) => {\n      const angle = 2 * Math.PI * i / numAxes - Math.PI / 2;\n      const r = relativeRadius(entry, minValue, maxValue, radius);\n      const x = r * Math.cos(angle);\n      const y = r * Math.sin(angle);\n      return { x, y };\n    });\n    if (graticule === \"circle\") {\n      g.append(\"path\").attr(\"d\", closedRoundCurve(points, config.curveTension)).attr(\"class\", `radarCurve-${index}`);\n    } else if (graticule === \"polygon\") {\n      g.append(\"polygon\").attr(\"points\", points.map((p) => `${p.x},${p.y}`).join(\" \")).attr(\"class\", `radarCurve-${index}`);\n    }\n  });\n}\n(0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_4__.__name)(drawCurves, \"drawCurves\");\nfunction relativeRadius(value, minValue, maxValue, radius) {\n  const clippedValue = Math.min(Math.max(value, minValue), maxValue);\n  return radius * (clippedValue - minValue) / (maxValue - minValue);\n}\n(0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_4__.__name)(relativeRadius, \"relativeRadius\");\nfunction closedRoundCurve(points, tension) {\n  const numPoints = points.length;\n  let d = `M${points[0].x},${points[0].y}`;\n  for (let i = 0; i < numPoints; i++) {\n    const p0 = points[(i - 1 + numPoints) % numPoints];\n    const p1 = points[i];\n    const p2 = points[(i + 1) % numPoints];\n    const p3 = points[(i + 2) % numPoints];\n    const cp1 = {\n      x: p1.x + (p2.x - p0.x) * tension,\n      y: p1.y + (p2.y - p0.y) * tension\n    };\n    const cp2 = {\n      x: p2.x - (p3.x - p1.x) * tension,\n      y: p2.y - (p3.y - p1.y) * tension\n    };\n    d += ` C${cp1.x},${cp1.y} ${cp2.x},${cp2.y} ${p2.x},${p2.y}`;\n  }\n  return `${d} Z`;\n}\n(0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_4__.__name)(closedRoundCurve, \"closedRoundCurve\");\nfunction drawLegend(g, curves, showLegend, config) {\n  if (!showLegend) {\n    return;\n  }\n  const legendX = (config.width / 2 + config.marginRight) * 3 / 4;\n  const legendY = -(config.height / 2 + config.marginTop) * 3 / 4;\n  const lineHeight = 20;\n  curves.forEach((curve, index) => {\n    const itemGroup = g.append(\"g\").attr(\"transform\", `translate(${legendX}, ${legendY + index * lineHeight})`);\n    itemGroup.append(\"rect\").attr(\"width\", 12).attr(\"height\", 12).attr(\"class\", `radarLegendBox-${index}`);\n    itemGroup.append(\"text\").attr(\"x\", 16).attr(\"y\", 0).attr(\"class\", \"radarLegendText\").text(curve.label);\n  });\n}\n(0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_4__.__name)(drawLegend, \"drawLegend\");\nvar renderer = { draw };\n\n// src/diagrams/radar/styles.ts\nvar genIndexStyles = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_4__.__name)((themeVariables, radarOptions) => {\n  let sections = \"\";\n  for (let i = 0; i < themeVariables.THEME_COLOR_LIMIT; i++) {\n    const indexColor = themeVariables[`cScale${i}`];\n    sections += `\n\t\t.radarCurve-${i} {\n\t\t\tcolor: ${indexColor};\n\t\t\tfill: ${indexColor};\n\t\t\tfill-opacity: ${radarOptions.curveOpacity};\n\t\t\tstroke: ${indexColor};\n\t\t\tstroke-width: ${radarOptions.curveStrokeWidth};\n\t\t}\n\t\t.radarLegendBox-${i} {\n\t\t\tfill: ${indexColor};\n\t\t\tfill-opacity: ${radarOptions.curveOpacity};\n\t\t\tstroke: ${indexColor};\n\t\t}\n\t\t`;\n  }\n  return sections;\n}, \"genIndexStyles\");\nvar buildRadarStyleOptions = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_4__.__name)((radar) => {\n  const defaultThemeVariables = (0,_chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_3__.getThemeVariables)();\n  const currentConfig = (0,_chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_3__.getConfig)();\n  const themeVariables = (0,_chunk_S3R3BYOJ_mjs__WEBPACK_IMPORTED_MODULE_2__.cleanAndMerge)(defaultThemeVariables, currentConfig.themeVariables);\n  const radarOptions = (0,_chunk_S3R3BYOJ_mjs__WEBPACK_IMPORTED_MODULE_2__.cleanAndMerge)(themeVariables.radar, radar);\n  return { themeVariables, radarOptions };\n}, \"buildRadarStyleOptions\");\nvar styles = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_4__.__name)(({ radar } = {}) => {\n  const { themeVariables, radarOptions } = buildRadarStyleOptions(radar);\n  return `\n\t.radarTitle {\n\t\tfont-size: ${themeVariables.fontSize};\n\t\tcolor: ${themeVariables.titleColor};\n\t\tdominant-baseline: hanging;\n\t\ttext-anchor: middle;\n\t}\n\t.radarAxisLine {\n\t\tstroke: ${radarOptions.axisColor};\n\t\tstroke-width: ${radarOptions.axisStrokeWidth};\n\t}\n\t.radarAxisLabel {\n\t\tdominant-baseline: middle;\n\t\ttext-anchor: middle;\n\t\tfont-size: ${radarOptions.axisLabelFontSize}px;\n\t\tcolor: ${radarOptions.axisColor};\n\t}\n\t.radarGraticule {\n\t\tfill: ${radarOptions.graticuleColor};\n\t\tfill-opacity: ${radarOptions.graticuleOpacity};\n\t\tstroke: ${radarOptions.graticuleColor};\n\t\tstroke-width: ${radarOptions.graticuleStrokeWidth};\n\t}\n\t.radarLegendText {\n\t\ttext-anchor: start;\n\t\tfont-size: ${radarOptions.legendFontSize}px;\n\t\tdominant-baseline: hanging;\n\t}\n\t${genIndexStyles(themeVariables, radarOptions)}\n\t`;\n}, \"styles\");\n\n// src/diagrams/radar/diagram.ts\nvar diagram = {\n  parser,\n  db,\n  renderer,\n  styles\n};\n\n\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/mermaid/dist/chunks/mermaid.core/diagram-QEK2KX5R.mjs?");

/***/ })

}]);