import { _ as _sfc_main$3 } from './chunk-aab02bfe.js'; import { NInputNumber, NIcon, NScrollbar, NDivider, NFormItem } from 'naive-ui'; import { a as __unplugin_components_0 } from './chunk-6003391e.js'; import { _ as __unplugin_components_3 } from './chunk-4e7a6a8d.js'; import { _ as _sfc_main$2, a as __unplugin_components_1 } from './chunk-8109fd17.js'; import { defineComponent, unref, withCtx, createVNode, createTextVNode, nextTick, useSSRContext, computed, openBlock, createBlock, Fragment, renderList, createCommentVNode, isRef } from 'vue'; import { ssrRenderAttrs, ssrRenderList, ssrRenderComponent, ssrRenderStyle } from 'vue/server-renderer'; import { Trash, Plus } from '@vicons/tabler'; import { useTemplateRefsList, useVModel, useStorage } from '@vueuse/core'; import _ from 'lodash'; import { u as useCopy } from './chunk-77c5cc16.js'; import 'pinia'; import './chunk-11f44f81.js'; import './chunk-35c3d701.js'; function computeAverage({ data }) { if (data.length === 0) { return 0; } return _.sum(data) / data.length; } function computeVariance({ data }) { const mean = computeAverage({ data }); const squaredDiffs = data.map((value) => (value - mean) ** 2); return computeAverage({ data: squaredDiffs }); } function arrayToMarkdownTable({ data, headerMap = {} }) { if (!Array.isArray(data) || data.length === 0) { return ""; } const headers = Object.keys(data[0]); const rows = data.map((obj) => Object.values(obj)); const headerRow = `| ${headers.map((header) => headerMap[header] ?? header).join(" | ")} |`; const separatorRow = `| ${headers.map(() => "---").join(" | ")} |`; const dataRows = rows.map((row) => `| ${row.join(" | ")} |`).join("\n"); return `${headerRow} ${separatorRow} ${dataRows}`; } const _sfc_main$1 = /* @__PURE__ */ defineComponent({ __name: "dynamic-values", __ssrInlineRender: true, props: { values: {} }, emits: ["update:values"], setup(__props, { emit }) { const props = __props; const refs = useTemplateRefsList(); const values = useVModel(props, "values", emit); async function addValue() { values.value.push(null); await nextTick(); refs.value.at(-1)?.focus(); } function onInputEnter(index) { if (index === values.value.length - 1) { addValue(); return; } refs.value.at(index + 1)?.focus(); } return (_ctx, _push, _parent, _attrs) => { const _component_c_tooltip = _sfc_main$2; const _component_c_button = __unplugin_components_0; const _component_n_icon = NIcon; _push(`