@ytsaurus/ui 1.62.0 → 1.63.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/public/build/assets-manifest.json +69 -69
- package/dist/public/build/css/7540.b48a154e.chunk.css +2 -0
- package/dist/public/build/css/7540.b48a154e.chunk.css.map +1 -0
- package/dist/public/build/css/{cluster-page-wrapper.0b62c90f.chunk.css → cluster-page-wrapper.0b6a786f.chunk.css} +2 -2
- package/dist/public/build/css/cluster-page-wrapper.0b6a786f.chunk.css.map +1 -0
- package/dist/public/build/css/{main.a99b07c5.css → main.070fd473.css} +2 -2
- package/dist/public/build/css/main.070fd473.css.map +1 -0
- package/dist/public/build/css/navigation.0a141599.chunk.css +2 -0
- package/dist/public/build/css/navigation.0a141599.chunk.css.map +1 -0
- package/dist/public/build/css/{system.17b114fc.chunk.css → system.221e5d53.chunk.css} +2 -2
- package/dist/public/build/css/{system.17b114fc.chunk.css.map → system.221e5d53.chunk.css.map} +1 -1
- package/dist/public/build/js/1110.a7382226.chunk.js +2 -0
- package/dist/public/build/js/1110.a7382226.chunk.js.map +1 -0
- package/dist/public/build/js/1394.011da2d1.chunk.js +2 -0
- package/dist/public/build/js/1394.011da2d1.chunk.js.map +1 -0
- package/dist/public/build/js/2447.35b478a9.chunk.js +2 -0
- package/dist/public/build/js/2447.35b478a9.chunk.js.map +1 -0
- package/dist/public/build/js/4364.aa1ab5fb.chunk.js +2 -0
- package/dist/public/build/js/4364.aa1ab5fb.chunk.js.map +1 -0
- package/dist/public/build/js/5451.50d8f2b2.chunk.js +3 -0
- package/dist/public/build/js/5451.50d8f2b2.chunk.js.LICENSE.txt +5 -0
- package/dist/public/build/js/5451.50d8f2b2.chunk.js.map +1 -0
- package/dist/public/build/js/5770.0d8fda01.chunk.js +2 -0
- package/dist/public/build/js/5770.0d8fda01.chunk.js.map +1 -0
- package/dist/public/build/js/{7077.b11a392b.chunk.js → 7077.7dab612c.chunk.js} +2 -2
- package/dist/public/build/js/{7077.b11a392b.chunk.js.map → 7077.7dab612c.chunk.js.map} +1 -1
- package/dist/public/build/js/7959.e0d47dec.chunk.js +2 -0
- package/dist/public/build/js/7959.e0d47dec.chunk.js.map +1 -0
- package/dist/public/build/js/{8460.b18e700b.chunk.js → 8460.2b27e2b7.chunk.js} +2 -2
- package/dist/public/build/js/{8460.b18e700b.chunk.js.map → 8460.2b27e2b7.chunk.js.map} +1 -1
- package/dist/public/build/js/{8778.8d098a1f.chunk.js → 8778.d97acdd6.chunk.js} +2 -2
- package/dist/public/build/js/8778.d97acdd6.chunk.js.map +1 -0
- package/dist/public/build/js/accounts.badfc837.chunk.js +2 -0
- package/dist/public/build/js/{accounts.63268a11.chunk.js.map → accounts.badfc837.chunk.js.map} +1 -1
- package/dist/public/build/js/{acl.aa7a9df7.chunk.js → acl.cd1fe761.chunk.js} +2 -2
- package/dist/public/build/js/acl.cd1fe761.chunk.js.map +1 -0
- package/dist/public/build/js/cluster-menu.bf57160d.chunk.js +2 -0
- package/dist/public/build/js/cluster-menu.bf57160d.chunk.js.map +1 -0
- package/dist/public/build/js/cluster-page-wrapper.c9e6c27c.chunk.js +2 -0
- package/dist/public/build/js/cluster-page-wrapper.c9e6c27c.chunk.js.map +1 -0
- package/dist/public/build/js/job.31c91355.chunk.js +2 -0
- package/dist/public/build/js/job.31c91355.chunk.js.map +1 -0
- package/dist/public/build/js/main.61fc9935.js +3 -0
- package/dist/public/build/js/main.61fc9935.js.map +1 -0
- package/dist/public/build/js/{manage-tokens.c996037c.chunk.js → manage-tokens.e9106aad.chunk.js} +2 -2
- package/dist/public/build/js/{manage-tokens.c996037c.chunk.js.map → manage-tokens.e9106aad.chunk.js.map} +1 -1
- package/dist/public/build/js/navigation.22bd542f.chunk.js +2 -0
- package/dist/public/build/js/navigation.22bd542f.chunk.js.map +1 -0
- package/dist/public/build/js/{odin.ddcd41de.chunk.js → odin.7eefabce.chunk.js} +2 -2
- package/dist/public/build/js/{odin.ddcd41de.chunk.js.map → odin.7eefabce.chunk.js.map} +1 -1
- package/dist/public/build/js/operations.3feb2deb.chunk.js +2 -0
- package/dist/public/build/js/operations.3feb2deb.chunk.js.map +1 -0
- package/dist/public/build/js/{query-results.99804b61.chunk.js → query-results.4c207fef.chunk.js} +2 -2
- package/dist/public/build/js/{query-results.99804b61.chunk.js.map → query-results.4c207fef.chunk.js.map} +1 -1
- package/dist/public/build/js/query-tracker.badbc586.chunk.js +2 -0
- package/dist/public/build/js/query-tracker.badbc586.chunk.js.map +1 -0
- package/dist/public/build/js/{runtime.8be0e5c6.js → runtime.f98c3e55.js} +2 -2
- package/dist/public/build/js/{runtime.8be0e5c6.js.map → runtime.f98c3e55.js.map} +1 -1
- package/dist/public/build/js/scheduling.73b1257c.chunk.js +2 -0
- package/dist/public/build/js/scheduling.73b1257c.chunk.js.map +1 -0
- package/dist/public/build/js/{system.6843a1a3.chunk.js → system.25e9136a.chunk.js} +2 -2
- package/dist/public/build/js/system.25e9136a.chunk.js.map +1 -0
- package/dist/public/build/js/tablet.7401a5ec.chunk.js +2 -0
- package/dist/public/build/js/tablet.7401a5ec.chunk.js.map +1 -0
- package/dist/public/build/js/{yt-df-dialog.6b4604c0.chunk.js → yt-df-dialog.69fc013a.chunk.js} +2 -2
- package/dist/public/build/js/{yt-df-dialog.6b4604c0.chunk.js.map → yt-df-dialog.69fc013a.chunk.js.map} +1 -1
- package/dist/public/build/manifest.json +64 -64
- package/dist/shared/ui-settings.d.ts +0 -1
- package/package.json +3 -3
- package/dist/public/build/css/7540.56f97199.chunk.css +0 -2
- package/dist/public/build/css/7540.56f97199.chunk.css.map +0 -1
- package/dist/public/build/css/cluster-page-wrapper.0b62c90f.chunk.css.map +0 -1
- package/dist/public/build/css/main.a99b07c5.css.map +0 -1
- package/dist/public/build/css/navigation.adb62abd.chunk.css +0 -2
- package/dist/public/build/css/navigation.adb62abd.chunk.css.map +0 -1
- package/dist/public/build/js/1110.d02f593c.chunk.js +0 -2
- package/dist/public/build/js/1110.d02f593c.chunk.js.map +0 -1
- package/dist/public/build/js/1394.f5423b9c.chunk.js +0 -2
- package/dist/public/build/js/1394.f5423b9c.chunk.js.map +0 -1
- package/dist/public/build/js/2447.d0a0e8ad.chunk.js +0 -2
- package/dist/public/build/js/2447.d0a0e8ad.chunk.js.map +0 -1
- package/dist/public/build/js/4364.277e1cfa.chunk.js +0 -2
- package/dist/public/build/js/4364.277e1cfa.chunk.js.map +0 -1
- package/dist/public/build/js/5770.c5499ce7.chunk.js +0 -2
- package/dist/public/build/js/5770.c5499ce7.chunk.js.map +0 -1
- package/dist/public/build/js/7891.2ce56be7.chunk.js +0 -3
- package/dist/public/build/js/7891.2ce56be7.chunk.js.LICENSE.txt +0 -14
- package/dist/public/build/js/7891.2ce56be7.chunk.js.map +0 -1
- package/dist/public/build/js/7959.eb292cbd.chunk.js +0 -2
- package/dist/public/build/js/7959.eb292cbd.chunk.js.map +0 -1
- package/dist/public/build/js/8778.8d098a1f.chunk.js.map +0 -1
- package/dist/public/build/js/accounts.63268a11.chunk.js +0 -2
- package/dist/public/build/js/acl.aa7a9df7.chunk.js.map +0 -1
- package/dist/public/build/js/cluster-menu.e484a2ca.chunk.js +0 -2
- package/dist/public/build/js/cluster-menu.e484a2ca.chunk.js.map +0 -1
- package/dist/public/build/js/cluster-page-wrapper.8c8aa8a1.chunk.js +0 -2
- package/dist/public/build/js/cluster-page-wrapper.8c8aa8a1.chunk.js.map +0 -1
- package/dist/public/build/js/job.5ed7166b.chunk.js +0 -2
- package/dist/public/build/js/job.5ed7166b.chunk.js.map +0 -1
- package/dist/public/build/js/main.00809a7d.js +0 -3
- package/dist/public/build/js/main.00809a7d.js.map +0 -1
- package/dist/public/build/js/navigation.c3108a21.chunk.js +0 -2
- package/dist/public/build/js/navigation.c3108a21.chunk.js.map +0 -1
- package/dist/public/build/js/operations.b353981f.chunk.js +0 -2
- package/dist/public/build/js/operations.b353981f.chunk.js.map +0 -1
- package/dist/public/build/js/query-tracker.fba0ec95.chunk.js +0 -2
- package/dist/public/build/js/query-tracker.fba0ec95.chunk.js.map +0 -1
- package/dist/public/build/js/scheduling.115669fe.chunk.js +0 -2
- package/dist/public/build/js/scheduling.115669fe.chunk.js.map +0 -1
- package/dist/public/build/js/system.6843a1a3.chunk.js.map +0 -1
- package/dist/public/build/js/tablet.40ad9054.chunk.js +0 -2
- package/dist/public/build/js/tablet.40ad9054.chunk.js.map +0 -1
- /package/dist/public/build/js/{main.00809a7d.js.LICENSE.txt → main.61fc9935.js.LICENSE.txt} +0 -0
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"js/query-results.99804b61.chunk.js","mappings":"2PAWaA,GAAQC,EAAAA,EAAAA,GAAG,qBAEjB,SAASC,EAAqBC,GAA+D,IAAnCC,EAA2BC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAG,GACrFG,EAAwB,GACxBC,EAAsB,GACtBC,EAAyB,GACzBC,EAA6B,GACnCC,IAAST,GAAO,SAACU,GACb,IAAOC,EAAwDD,EAAxDC,eAAgBC,EAAwCF,EAAxCE,YAAaC,EAA2BH,EAA3BG,WAAYC,EAAeJ,EAAfI,YAC5CH,EACAH,EAAaO,KAAKL,GACXI,EACPP,EAASQ,KAAKL,GACPG,GAAcD,EACrBN,EAAMS,KAAKL,GAEXL,EAAQU,KAAKL,EAErB,IAEA,IAAMM,EAAaX,EAAQY,KAAI,SAACP,GAAI,OAAKQ,EAAqBR,EAAK,IAC7DS,EAAWlB,EAAagB,KAAI,SAACP,GAAI,MAAM,CACzCU,MAAOV,EACPW,KAAM,CAAC,EACPC,QAAQ,EACX,IAED,MAAO,CACHC,SAAU,GACVlB,QAAS,CAACe,MAAO,UAAWC,KAAML,EAAWQ,OAAOL,IACpDb,MAAO,CACHc,MAAO,gBACPK,cAAe5B,EAAM,eACrBwB,KAAMf,EAAMW,KAAI,SAACP,GAAI,OAAKQ,EAAqBR,EAAM,CAACY,QAAQ,GAAM,KAExEf,SAAU,CACNa,MAA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B,IAAIhD,KAAMkW,EACxB,EAIJ,CACI,UACA,YACA,cACF3N,SAAQ,SAAUmlB,GAChBvX,EAAemQ,UAAUoH,GAAU,WAC/B,IAAIptB,EACJ,OAAQA,EAAKuoB,EAAU1mB,IAAInC,OAAO0tB,GAAQ/X,MAAMrV,EAAIhL,UACxD,CACJ,IAUA,aAN2C,IAA5ByxB,EAAS5Q,eACT4Q,EAAS5Q,eAEbA,C","sources":["webpack://@ytsaurus/ui/./src/ui/components/Dialog/controls/RoleListControl/utils.ts","webpack://@ytsaurus/ui/./src/ui/components/Dialog/DialogError.tsx","webpack://@ytsaurus/ui/./src/ui/components/Dialog/index.tsx","webpack://@ytsaurus/ui/./src/ui/hocs/withDelayedMount.tsx","webpack://@ytsaurus/ui/./src/ui/components/SchemaDataType/dataTypes.ts","webpack://@ytsaurus/ui/./src/ui/components/SchemaDataType/dateTypesV3.ts","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/chartkit/build/utils/react.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/chartkit/build/components/ErrorBoundary/ErrorBoundary.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/chartkit/build/utils/getErrorMessage.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/chartkit/build/components/Loader/Loader.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/chartkit/build/components/ChartKit.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/chartkit/build/index.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/chartkit/build/plugins/yagr/index.js","webpack://@ytsaurus/ui/./src/ui/components/YagrChartKit/YagrChartKit.tsx","webpack://@ytsaurus/ui/./src/ui/pages/query-tracker/QueryResultsVisualization/preparers/getPointData.ts","webpack://@ytsaurus/ui/./src/ui/pages/query-tracker/QueryResultsVisualization/preparers/splitDataByColor.ts","webpack://@ytsaurus/ui/./src/ui/pages/query-tracker/QueryResultsVisualization/preparers/utils.ts","webpack://@ytsaurus/ui/./src/ui/pages/query-tracker/QueryResultsVisualization/preparers/prepareWidgetData.ts","webpack://@ytsaurus/ui/./src/ui/pages/query-tracker/QueryResultsVisualization/preparers/d3config.ts","webpack://@ytsaurus/ui/./src/ui/pages/query-tracker/QueryResultsVisualization/preparers/scatter.ts","webpack://@ytsaurus/ui/./src/ui/pages/query-tracker/QueryResultsVisualization/preparers/bar.ts","webpack://@ytsaurus/ui/./src/ui/pages/query-tracker/QueryResultsVisualization/store/selectors.ts","webpack://@ytsaurus/ui/./src/ui/pages/query-tracker/QueryResultsVisualization/components/ChartErrorBoundary/ChartErrorBoundary.tsx","webpack://@ytsaurus/ui/./src/ui/pages/query-tracker/QueryResultsVisualization/components/EmptyPlaceholdersMessage/EmptyPlaceholdersMessage.tsx","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/chartkit/build/plugins/d3/index.js","webpack://@ytsaurus/ui/./src/ui/pages/query-tracker/QueryResultsVisualization/containers/Chart/Chart.tsx","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/icons/esm/Plus.js","webpack://@ytsaurus/ui/./src/ui/pages/query-tracker/QueryResultsVisualization/containers/PlaceholdersContainer/Placeholder/Placeholder.tsx","webpack://@ytsaurus/ui/./src/ui/pages/query-tracker/QueryResultsVisualization/containers/PlaceholdersContainer/PlaceholdersContainer.tsx","webpack://@ytsaurus/ui/./src/ui/pages/query-tracker/QueryResultsVisualization/store/actions.ts","webpack://@ytsaurus/ui/./src/ui/pages/query-tracker/QueryResultsVisualization/containers/VisualizationSelect/VisualizationSelect.tsx","webpack://@ytsaurus/ui/./src/ui/pages/query-tracker/QueryResultsVisualization/containers/ChartSettings/ChartSettings.tsx","webpack://@ytsaurus/ui/./src/ui/pages/query-tracker/QueryResultsVisualization/containers/VisualizationSelector/VisualizationSelector.tsx","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/icons/esm/ArrowsRotateRight.js","webpack://@ytsaurus/ui/./src/ui/pages/query-tracker/QueryResultsVisualization/containers/SavingIndicator/SavingIndicator.tsx","webpack://@ytsaurus/ui/./src/ui/pages/query-tracker/QueryResultsVisualization/containers/ChartValidation/ChartValidation.tsx","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/icons/esm/CircleExclamation.js","webpack://@ytsaurus/ui/./src/ui/pages/query-tracker/QueryResultsVisualization/containers/QueryResultsVisualization/QueryResultsVisualization.tsx","webpack://@ytsaurus/ui/./src/ui/hooks/useResizeObserver.tsx","webpack://@ytsaurus/ui/./src/ui/pages/query-tracker/module/query_result/utils/format.ts","webpack://@ytsaurus/ui/./src/ui/store/selectors/global/supported-features.ts","webpack://@ytsaurus/ui/./src/ui/store/thunkDispatch.ts","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/chartkit/build/i18n/index.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/chartkit/build/libs/chartkit-error/chartkit-error.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/chartkit/build/libs/settings/mergeSettingStrategy.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/chartkit/build/libs/settings/settings.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/chartkit/build/libs/settings/eventEmitter.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/chartkit/build/utils/cn.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/chartkit/build/utils/common.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/icons/esm/Gear.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/uikit/build/esm/components/Alert/AlertContext.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/uikit/build/esm/components/Alert/useAlertContext.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/uikit/build/esm/components/Alert/AlertAction.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/uikit/build/esm/components/Alert/constants.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/uikit/build/esm/components/Alert/AlertContextProvider.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/uikit/build/esm/components/Alert/AlertIcon.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/icons/esm/CircleXmarkFill.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/icons/esm/CircleXmark.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/icons/esm/CircleInfoFill.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/icons/esm/CircleCheckFill.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/icons/esm/TriangleExclamationFill.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/icons/esm/ThunderboltFill.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/uikit/build/esm/components/Alert/i18n/index.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/uikit/build/esm/components/Alert/Alert.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/uikit/build/esm/components/Alert/AlertTitle.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/uikit/build/esm/components/Alert/AlertActions.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/uikit/build/esm/components/Card/Card.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/uikit/build/esm/components/Tooltip/Tooltip.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/uikit/build/esm/hooks/private/useTooltipVisible/index.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/uikit/build/esm/hooks/private/useBoolean/useBoolean.js","webpack://@ytsaurus/ui/./node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js"],"sourcesContent":["import cn from 'bem-cn-lite';\n\nimport filter_ from 'lodash/filter';\nimport forEach_ from 'lodash/forEach';\nimport map_ from 'lodash/map';\n\nimport type {EditableManyListsItemType} from '../../../../components/Dialog';\nimport type {ResponsibleType, RoleConverted} from '../../../../utils/acl/acl-types';\nimport type {PreparedRole} from '../../../../utils/acl';\nimport {RoleListControlProps} from './RoleListControl';\n\nexport const block = cn('role-list-control');\n\nexport function prepareRoleListValue(roles: Array<PreparedRole>, otherMembers: Array<string> = []) {\n const current: typeof roles = [];\n const toAdd: typeof roles = [];\n const toRemove: typeof roles = [];\n const unrecognized: typeof roles = [];\n forEach_(roles, (item) => {\n const {isUnrecognized, isRequested, isApproved, isDepriving} = item;\n if (isUnrecognized) {\n unrecognized.push(item);\n } else if (isDepriving) {\n toRemove.push(item);\n } else if (isApproved || isRequested) {\n toAdd.push(item);\n } else {\n current.push(item);\n }\n });\n\n const currentArr = current.map((item) => prepareItemOfCurrent(item));\n const otherArr = otherMembers.map((item) => ({\n title: item,\n data: {},\n frozen: true,\n }));\n\n return {\n newItems: [],\n current: {title: 'Current', data: currentArr.concat(otherArr)},\n toAdd: {\n title: 'Will be added',\n itemClassName: block('item-to-add'),\n data: toAdd.map((item) => prepareItemOfCurrent(item, {frozen: true})),\n },\n toRemove: {\n title: 'Will be removed',\n itemClassName: block('item-to-remove'),\n data: toRemove.map((item) => prepareItemOfCurrent(item, {frozen: true})),\n },\n unrecognized: {\n title: 'Unrecognized',\n itemClassName: block('item-unrecognized'),\n data: unrecognized.map((item) => prepareItemOfCurrent(item, {frozen: true})),\n },\n };\n}\n\nfunction prepareItemOfCurrent(role: PreparedRole, extraProps: any = {}) {\n return {\n title: role.text || role.value,\n data: role,\n ...extraProps,\n };\n}\n\nexport function roleListValueToSubjectList(\n value: RoleListControlProps['value'],\n): Array<ResponsibleType> {\n const {current, newItems, toAdd} = value;\n return [\n ...newItems,\n ...manyListDataItemToSubjectList(current),\n ...manyListDataItemToSubjectList(toAdd),\n ];\n}\n\nfunction manyListDataItemToSubjectList(\n manyListDataItem: EditableManyListsItemType<RoleConverted>,\n): Array<ResponsibleType> {\n const {data} = manyListDataItem || {};\n return map_(\n filter_(data, ({removed}) => !removed),\n ({data}) => {\n const {type, value} = data || {};\n return {type: type!, value: value!};\n },\n );\n}\n\nexport function extractChangedSubjects(value: {\n current: EditableManyListsItemType<RoleConverted>;\n newItems: Array<ResponsibleType>;\n}) {\n const {current, newItems} = value;\n const added = newItems || [];\n const removed = ((current && current.data) || []).filter(({removed}) => removed);\n return {\n added: added.map(({type, value}) => {\n return type === 'users' ? {user: value} : {group: value};\n }),\n removed: removed.map(({data}) => {\n const {value, type} = data || {};\n return type === 'users' ? {user: value} : {group: value};\n }),\n };\n}\n","import React from 'react';\nimport cn from 'bem-cn-lite';\n\nimport type {FORM_ERROR as FormErrorType} from './index';\n\nimport {FIX_MY_TYPE, YTError} from '../../types';\nimport Block from '../../components/Block/Block';\n\nimport compact_ from 'lodash/compact';\nimport map_ from 'lodash/map';\n\nconst block = cn('yt-dialog-error');\n\nexport function DialogError(props: FIX_MY_TYPE) {\n return <Block {...props} className={block()} />;\n}\n\nexport function makeErrorFields(errors: Array<YTError | Error | undefined>) {\n return compact_(\n map_(errors, (error, index) => {\n return error\n ? {\n name: `error_${index}`,\n type: 'block' as const,\n extras: {\n children: <DialogError error={error} />,\n },\n }\n : undefined;\n }),\n );\n}\n\nconst FORM_ERROR: typeof FormErrorType = 'FINAL_FORM/form-error';\n\nexport function makeFormSubmitError(error: YTError) {\n return {\n validationErrors: {\n [FORM_ERROR]: <DialogError error={error} />,\n },\n };\n}\n","import React from 'react';\nimport withLazyLoading from '../../hocs/withLazyLoading';\nimport {withDelayedMount} from '../../hocs/withDelayedMount';\n\nimport type {\n registerDialogControl as RegisterDialogControlFn,\n registerDialogTabControl as RegisterDialogTabControlFn,\n YTDialogType,\n} from './Dialog';\n\nexport type * from './Dialog';\nexport * from './DialogError';\nexport * from './controls/RoleListControl/utils';\n\nexport function importYTDFDialog() {\n return import(/* webpackChunkName: \"yt-df-dialog\" */ './Dialog');\n}\n\nexport const YTDFDialog = withDelayedMount(\n withLazyLoading(\n React.lazy(async () => {\n return {default: (await importYTDFDialog()).YTDialog};\n }),\n '',\n ),\n) as YTDialogType;\n\nexport function useControlRegistration(\n fn: (params: {\n registerDialogControl: typeof RegisterDialogControlFn;\n registerDialogTabControl: typeof RegisterDialogTabControlFn;\n }) => void,\n) {\n importYTDFDialog().then(({registerDialogControl, registerDialogTabControl}) => {\n fn({registerDialogControl, registerDialogTabControl});\n });\n}\n\nexport type {RoleListControlProps} from './controls/RoleListControl/RoleListControl';\nexport const RoleListControl = withLazyLoading(\n React.lazy(async () => {\n return {default: (await importYTDFDialog()).RoleListControl};\n }),\n '',\n);\n\nexport const EditableList = withLazyLoading(\n React.lazy(async () => {\n return {default: (await importYTDFDialog()).EditableList};\n }),\n '',\n);\n\nexport const TabFieldVertical = withLazyLoading(\n React.lazy(async () => {\n return {default: (await importYTDFDialog()).TabFieldVertical};\n }),\n '',\n);\n","import React from 'react';\n\n/**\n * The hoc allows to delay mounting until `props.visible == true`.\n * The hoc might be useful to wrap components wrapped by React.lazy\n * @param Component\n * @returns\n */\nexport function withDelayedMount<P extends {visible?: boolean}>(Component: React.ComponentType<P>) {\n return function MountOnFirstVisible(props: P) {\n const [mounted, setMounted] = React.useState(false);\n React.useEffect(() => {\n if (!mounted && props.visible) {\n setMounted(true);\n }\n }, [props.visible, mounted]);\n return !mounted ? null : <Component {...props} />;\n };\n}\n","import fromPairs_ from 'lodash/fromPairs';\nimport isEqual_ from 'lodash/isEqual';\nimport zip_ from 'lodash/zip';\n\nconst STRUCT_TYPE = 'StructType';\nconst LIST_TYPE = 'ListType';\nconst STREAM_TYPE = 'StreamType';\nconst TUPLE_TYPE = 'TupleType';\nconst DICT_TYPE = 'DictType';\nexport const DATA_TYPE = 'DataType';\nconst VARIANT_TYPE = 'VariantType';\nexport const OPTIONAL_TYPE = 'OptionalType';\nconst TAGGED_TYPE = 'TaggedType';\nexport const VOID_TYPE = 'VoidType';\nconst NULL_TYPE = 'NullType';\nconst EMPTY_DICT_TYPE = 'EmptyDictType';\nconst EMPTY_LIST_TYPE = 'EmptyListType';\nexport const HISTOGRAM_TYPE = 'HistogramType';\nexport const HISTOGRAM_LIST_TYPE = 'HistogramListType';\nexport const HISTOGRAM_TUPLE_TYPE = 'HistogramTupleType';\nexport const PG_TYPE = 'PgType';\n\nexport type TypeArrayType =\n | typeof STRUCT_TYPE\n | typeof LIST_TYPE\n | typeof STREAM_TYPE\n | typeof TUPLE_TYPE\n | typeof DICT_TYPE\n | typeof DATA_TYPE\n | typeof VARIANT_TYPE\n | typeof OPTIONAL_TYPE\n | typeof TAGGED_TYPE\n | typeof VOID_TYPE\n | typeof NULL_TYPE\n | typeof EMPTY_DICT_TYPE\n | typeof EMPTY_LIST_TYPE\n | typeof HISTOGRAM_TYPE\n | typeof PG_TYPE;\n\nconst notSimpleDataTypes = ['Void', 'Yson', 'Json', 'Null'] as const;\nconst numericDataTypes = [\n 'Double',\n 'Float',\n 'Int64',\n 'Int32',\n 'Int16',\n 'Int8',\n 'Uint64',\n 'Uint32',\n 'Uint16',\n 'Uint8',\n] as const;\nconst dateTimeDataTypes = [\n 'Date',\n 'TzDate',\n 'Datetime',\n 'TzDatetime',\n 'Timestamp',\n 'TzTimestamp',\n 'Interval',\n] as const;\nconst stringDataTypes = ['String', 'Utf8', 'Json'] as const;\n\nexport type DataTypeType =\n | (typeof notSimpleDataTypes)[number]\n | (typeof numericDataTypes)[number]\n | (typeof dateTimeDataTypes)[number]\n | (typeof stringDataTypes)[number]\n | 'Bool'\n | 'Raw'\n | 'Uuid'\n | 'Dynumber'\n | string;\n\nexport function isDataTypeSimple(dataType: string) {\n return (notSimpleDataTypes as unknown as string[]).indexOf(dataType) < 0;\n}\nexport function isDataTypeNumeric(dataType: string) {\n return (numericDataTypes as unknown as string[]).indexOf(dataType) >= 0;\n}\nexport function isDataTypeDateTime(dataType: string) {\n return (dateTimeDataTypes as unknown as string[]).indexOf(dataType) >= 0;\n}\n\nexport function isDataTypeString(dataType: string) {\n return (stringDataTypes as unknown as string[]).indexOf(dataType) >= 0;\n}\n\ntype HistogramContentType = StructType | ['OptionalType', StructType];\n\nexport function isHistogramListType(\n field: TypeArray,\n): field is [typeof LIST_TYPE, StructType | ['OptionalType', StructType]] {\n if (isListType(field)) {\n return isHistogramType(field[1]);\n }\n return false;\n}\n\nexport function isHistogramType(rawField: TypeArray): rawField is HistogramContentType {\n let field = rawField;\n while (field[0] === OPTIONAL_TYPE) {\n field = field[1];\n }\n if (field[0] === STRUCT_TYPE) {\n const struct = fromPairs_(field[1]);\n return (\n ['Bins', 'Max', 'Min', 'WeightsSum'].every((key) =>\n Object.prototype.hasOwnProperty.call(struct, key),\n ) &&\n Array.isArray(struct.Bins) &&\n struct.Bins[0] === LIST_TYPE &&\n struct.Bins[1][0] === STRUCT_TYPE &&\n isEqual_(zip_(...struct.Bins[1][1])[0].sort(), ['Frequency', 'Position'])\n );\n }\n return false;\n}\n\ntype DictType = [typeof DICT_TYPE, TypeArray, TypeArray];\ntype OptionalType = [typeof OPTIONAL_TYPE, TypeArray];\nexport function isOptionalType(typeArray: unknown): typeArray is OptionalType {\n return (\n Array.isArray(typeArray) && typeArray[0] === OPTIONAL_TYPE && Array.isArray(typeArray[1])\n );\n}\ntype ListType = [typeof LIST_TYPE, TypeArray];\nexport function isListType(typeArray: unknown): typeArray is ListType {\n return Array.isArray(typeArray) && typeArray[0] === LIST_TYPE && Array.isArray(typeArray[1]);\n}\nexport type StructType = [typeof STRUCT_TYPE, [string, TypeArray][]];\nexport function isStructType(typeArray: unknown): typeArray is StructType {\n return Array.isArray(typeArray) && typeArray[0] === STRUCT_TYPE && Array.isArray(typeArray[1]);\n}\nexport type HistogramType = [\n typeof HISTOGRAM_TYPE,\n StructType | [typeof OPTIONAL_TYPE, StructType],\n];\nexport type HistogramListType = [typeof HISTOGRAM_LIST_TYPE, HistogramType];\nexport type HistogramTupleType = [typeof HISTOGRAM_TUPLE_TYPE, HistogramType[]];\n\nexport type TypeArray =\n | [typeof DATA_TYPE, DataTypeType, ...params: Array<string>]\n | OptionalType\n | [typeof TAGGED_TYPE, string, TypeArray]\n | DictType\n | ListType\n | [typeof EMPTY_DICT_TYPE]\n | [typeof EMPTY_LIST_TYPE]\n | [typeof STREAM_TYPE, TypeArray]\n | [typeof TUPLE_TYPE, TypeArray[]]\n | StructType\n | [typeof VARIANT_TYPE, TypeArray]\n | [typeof VOID_TYPE]\n | [typeof NULL_TYPE]\n | HistogramType\n | HistogramListType\n | HistogramTupleType\n | [typeof PG_TYPE, string];\n\nexport type DataTypeTuple = {\n name: 'Tuple';\n complex: true;\n type: DataType[];\n};\nexport type DataTypeStruct = {\n name: 'Struct';\n complex: true;\n struct: Struct;\n};\nexport type DataTypeVariant = {\n name: 'Variant';\n complex: true;\n struct: Struct;\n};\nexport type DataTypeList = {\n name: 'List';\n complex: true;\n type: DataType;\n};\n\nexport function isTupleDataType(dataType: DataType): dataType is DataTypeTuple {\n return dataType.name === 'Tuple';\n}\n\nexport function isListDataType(dataType: DataType): dataType is DataTypeList {\n return dataType.name === 'List';\n}\n\nexport function isEmptyListDataType(dataType: DataType): dataType is DataTypeStruct {\n return dataType.name === 'EmptyList';\n}\n\nexport function isStructDataType(dataType: DataType): dataType is DataTypeStruct {\n return dataType.name === 'Struct';\n}\n\nexport function isVariantDataType(dataType: DataType): dataType is DataTypeVariant {\n return dataType.name === 'Variant';\n}\n\nexport type StructEntry = {key: string | number; type: DataType};\ntype Struct = StructEntry[];\n\ntype ComplexDataType =\n | {\n name: 'Set';\n complex: true;\n type: DataType;\n }\n | {\n name: 'Dict';\n complex: true;\n type: DataType[];\n }\n | DataTypeStruct\n | DataTypeTuple\n | DataTypeList\n | {\n name: 'Enum';\n complex: true;\n type: {name: string | number}[];\n }\n | DataTypeVariant\n | {\n name: 'Stream';\n complex: true;\n type: DataType;\n };\nexport function isComplexDataType(dataType: DataType): dataType is ComplexDataType {\n return Boolean(dataType.complex);\n}\nexport type DataType = {\n optional?: boolean;\n optionalLevel?: number;\n tagged?: boolean;\n tags?: string[];\n simple?: boolean;\n numeric?: boolean;\n dateTime?: boolean;\n string?: boolean;\n params?: unknown[];\n complex?: boolean;\n null?: boolean;\n} & (\n | ComplexDataType\n | {\n name: 'EmptyList' | 'EmptyDict' | 'Void' | 'Null' | 'Unknown';\n }\n | {\n name: DataTypeType;\n params?: unknown[];\n }\n);\nexport function getType(typeArray: TypeArray): DataType {\n function setOptional(dataType: DataType) {\n if (dataType.optional) {\n dataType.optionalLevel = (dataType.optionalLevel || 1) + 1;\n }\n dataType.optional = true;\n return dataType;\n }\n\n function setTag(dataType: DataType, typeTag: string) {\n dataType.tagged = true;\n dataType.tags = (dataType.tags || []).concat(typeTag);\n return dataType;\n }\n\n function isEnum(variantTypes: {type: {name: string | number}}[]) {\n return variantTypes.every((variantType) => variantType.type.name === 'Void');\n }\n\n function isSet(dictType: DictType) {\n return dictType[2][0] === VOID_TYPE;\n }\n\n function getEnumValue(variantType: {key: string | number}) {\n return {\n name: variantType.key,\n };\n }\n\n function getVariantType(typeArray: TypeArray) {\n const variantType = getType(typeArray);\n switch (variantType.name) {\n case 'Tuple':\n return (variantType as DataTypeTuple).type.map((type, index) => ({\n key: index,\n type: type,\n }));\n case 'Struct':\n return (variantType as DataTypeStruct).struct;\n default:\n throw new Error(`Invalid type in Variant type: ${variantType.name}`);\n }\n }\n\n switch (typeArray[0]) {\n case DATA_TYPE:\n return {\n name: typeArray[1],\n simple: isDataTypeSimple(typeArray[1]),\n numeric: isDataTypeNumeric(typeArray[1]),\n dateTime: isDataTypeDateTime(typeArray[1]),\n string: isDataTypeString(typeArray[1]),\n params: typeArray.slice(2),\n };\n case OPTIONAL_TYPE:\n return setOptional(getType(typeArray[1]));\n case TAGGED_TYPE:\n return setTag(getType(typeArray[2]), typeArray[1]);\n case DICT_TYPE:\n if (isSet(typeArray)) {\n return {\n name: 'Set',\n complex: true,\n type: getType(typeArray[1]),\n };\n }\n return {\n name: 'Dict',\n complex: true,\n // @ts-ignore\n type: typeArray.slice(1).map(getType),\n };\n case LIST_TYPE:\n return {\n name: 'List',\n complex: true,\n type: getType(typeArray[1]),\n };\n case EMPTY_DICT_TYPE:\n return {\n name: 'EmptyDict',\n };\n case EMPTY_LIST_TYPE:\n return {\n name: 'EmptyList',\n };\n case STREAM_TYPE:\n return {\n name: 'Stream',\n complex: true,\n type: getType(typeArray[1]),\n };\n case TUPLE_TYPE:\n return {\n name: 'Tuple',\n complex: true,\n type: typeArray[1].map(getType),\n };\n case STRUCT_TYPE:\n return {\n name: 'Struct',\n complex: true,\n struct: typeArray[1].map((field) => ({key: field[0], type: getType(field[1])})),\n };\n case VARIANT_TYPE: {\n const variantType = getVariantType(typeArray[1]);\n if (isEnum(variantType)) {\n return {\n name: 'Enum',\n complex: true,\n type: variantType.map(getEnumValue),\n };\n }\n\n return {\n name: 'Variant',\n complex: true,\n struct: variantType,\n };\n }\n case VOID_TYPE:\n return {\n name: 'Void',\n };\n case NULL_TYPE:\n return {\n name: 'Null',\n null: true,\n };\n case PG_TYPE: {\n const typeName = typeArray[1];\n if (typeName.startsWith('_pg') || typeName.startsWith('pg')) {\n return {name: typeName};\n }\n return {name: typeName.startsWith('_') ? `_pg${typeName.slice(1)}` : `pg${typeName}`};\n }\n default:\n return {\n name: 'Unknown',\n };\n }\n}\n","import capitalize_ from 'lodash/capitalize';\nimport map_ from 'lodash/map';\n\nexport type Type = string | ComplexType;\n\ninterface Decimal {\n type_name: 'decimal';\n precision: number;\n scale: number;\n}\n\ninterface Dict {\n type_name: 'dict';\n key: Type;\n value: Type;\n}\n\ntype Variant = {type_name: 'variant'} & VariantData;\ntype VariantData = VariantElements | VariantMembers;\ntype VariantElements = {elements: Array<{type: Type}>};\ntype VariantMembers = {members: Array<{name: string; type: Type}>};\n\ninterface Optional {\n type_name: 'optional';\n item: Type;\n}\n\ntype Tuple = {type_name: 'tuple'} & VariantElements;\n\ninterface List {\n type_name: 'list';\n item: Type;\n}\n\ntype Struct = {type_name: 'struct'} & VariantMembers;\n\ninterface Tagged {\n type_name: 'tagged';\n tag: string;\n item: Type;\n}\n\ntype ComplexType = Decimal | Dict | Variant | Optional | Tuple | List | Struct | Tagged;\n\nexport function parseV3Type(initialType: Type, primitiveTypes: Set<string>) {\n function ysonTypeToYql(ysonType: Type) {\n return typeof ysonType === 'string'\n ? stringToYql(ysonType, primitiveTypes)\n : objectToYql(ysonType);\n }\n\n function stringToYql(ysonType: string, typesMap: Set<string>) {\n if (typesMap.has(ysonType)) {\n return ['DataType', capitalize_(ysonType)] as const;\n } else {\n return ['UnknownType'] as const;\n }\n }\n\n function objectToYql(ysonType: ComplexType): any {\n switch (ysonType.type_name) {\n case 'decimal':\n return decimalToYql(ysonType);\n case 'dict':\n return [\n 'DictType',\n ysonTypeToYql(ysonType.key),\n ysonTypeToYql(ysonType.value),\n ] as const;\n case 'optional':\n return ['OptionalType' as const, ysonTypeToYql(ysonType.item)] as const;\n case 'tuple':\n return tupleToYql(ysonType);\n case 'list':\n return ['ListType', ysonTypeToYql(ysonType.item)] as const;\n case 'struct':\n return structToYql(ysonType);\n case 'variant':\n return [\n 'VariantType',\n 'elements' in ysonType ? tupleToYql(ysonType) : structToYql(ysonType),\n ] as const;\n case 'tagged':\n return ['TaggedType', ysonType.tag, ysonTypeToYql(ysonType.item)] as const;\n default:\n // let it be a fallback for now\n return ['UnknownType'] as const;\n }\n }\n\n function tupleToYql(ysonType: VariantElements) {\n return ['TupleType', map_(ysonType.elements, ({type}) => ysonTypeToYql(type))] as const;\n }\n\n function structToYql(ysonType: VariantMembers) {\n return [\n 'StructType',\n map_(ysonType.members, ({name, type}) => [name, ysonTypeToYql(type)]),\n ] as const;\n }\n\n function decimalToYql(ysonType: {precision: number; scale: number}) {\n const {precision, scale} = ysonType;\n return ['DataType', 'Decimal', precision, scale] as const;\n }\n\n return ysonTypeToYql(initialType);\n}\n","import React from 'react';\n// For some reason React.memo drops the generic prop type and creates a regular union type\n// https://github.com/DefinitelyTyped/DefinitelyTyped/issues/37087#issuecomment-542793243\nexport const typedMemo = React.memo;\n","import React from 'react';\nimport { CHARTKIT_ERROR_CODE } from '../../libs';\nimport { getErrorMessage } from '../../utils/getErrorMessage';\nexport class ErrorBoundary extends React.Component {\n constructor() {\n super(...arguments);\n this.state = {\n error: undefined,\n };\n this.resetError = () => {\n if (this.state.error) {\n this.setState({ error: undefined });\n }\n };\n }\n static getDerivedStateFromError(error) {\n return { error };\n }\n componentDidCatch() {\n var _a, _b;\n const { error } = this.state;\n if (error) {\n (_b = (_a = this.props).onError) === null || _b === void 0 ? void 0 : _b.call(_a, { error });\n }\n }\n componentDidUpdate(prevProps) {\n if (prevProps.data !== this.props.data) {\n const { error } = this.state;\n if (error && 'code' in error && error.code === CHARTKIT_ERROR_CODE.NO_DATA) {\n this.resetError();\n }\n }\n }\n render() {\n const { error } = this.state;\n if (error) {\n const message = getErrorMessage(error);\n if (this.props.renderError) {\n return this.props.renderError({\n error,\n message,\n resetError: this.resetError,\n });\n }\n return React.createElement(\"div\", null, message);\n }\n return this.props.children;\n }\n}\n","import { i18n } from '../i18n';\nexport function getErrorMessage(error) {\n const code = 'code' in error && error.code;\n return (error.message || code || i18n('error', 'label_unknown-error')).toString();\n}\n","import { __rest } from \"tslib\";\nimport React from 'react';\nimport { Loader as BaseLoader } from '@gravity-ui/uikit';\nimport { block } from '../../utils/cn';\nimport './Loader.css';\nconst b = block('loader');\nexport const Loader = (_a) => {\n var { renderPluginLoader } = _a, props = __rest(_a, [\"renderPluginLoader\"]);\n const pluginLoader = renderPluginLoader === null || renderPluginLoader === void 0 ? void 0 : renderPluginLoader();\n // React.Suspense complains about possible undefined in \"fallback\" property\n if (typeof pluginLoader !== 'undefined') {\n return pluginLoader;\n }\n return (React.createElement(\"div\", { className: b() },\n React.createElement(BaseLoader, Object.assign({}, props))));\n};\n","import { __rest } from \"tslib\";\nimport React from 'react';\nimport { i18n } from '../i18n';\nimport { CHARTKIT_ERROR_CODE, ChartKitError, settings } from '../libs';\nimport { getRandomCKId, typedMemo } from '../utils';\nimport { cn } from '../utils/cn';\nimport { ErrorBoundary } from './ErrorBoundary/ErrorBoundary';\nimport { Loader } from './Loader/Loader';\nimport './ChartKit.css';\nconst b = cn('chartkit');\nconst ChartKitComponent = (props) => {\n const widgetRef = React.useRef();\n const { instanceRef, id: propsId, type, isMobile, renderPluginLoader } = props, restProps = __rest(props, [\"instanceRef\", \"id\", \"type\", \"isMobile\", \"renderPluginLoader\"]);\n const ckId = React.useMemo(() => getRandomCKId(), []);\n const id = propsId || ckId;\n const lang = settings.get('lang');\n const plugins = settings.get('plugins');\n const plugin = plugins.find((iteratedPlugin) => iteratedPlugin.type === type);\n if (!plugin) {\n throw new ChartKitError({\n code: CHARTKIT_ERROR_CODE.UNKNOWN_PLUGIN,\n message: i18n('error', 'label_unknown-plugin', { type }),\n });\n }\n const ChartComponent = plugin.renderer;\n React.useImperativeHandle(instanceRef, () => ({\n reflow(details) {\n var _a;\n if ((_a = widgetRef.current) === null || _a === void 0 ? void 0 : _a.reflow) {\n widgetRef.current.reflow(details);\n }\n },\n }), []);\n return (React.createElement(React.Suspense, { fallback: React.createElement(Loader, { renderPluginLoader: renderPluginLoader }) },\n React.createElement(\"div\", { className: b({ mobile: isMobile }, 'chartkit-theme_common') },\n React.createElement(ChartComponent, Object.assign({ ref: widgetRef, id: id, lang: lang }, restProps)))));\n};\nconst ChartKitComponentWithErrorBoundary = React.forwardRef(function ChartKitComponentWithErrorBoundary(props, ref) {\n return (React.createElement(ErrorBoundary, { onError: props.onError, data: props.data, renderError: props.renderError },\n React.createElement(ChartKitComponent, Object.assign({ instanceRef: ref }, props))));\n}) /* https://stackoverflow.com/a/58473012 */;\nexport const ChartKit = typedMemo(ChartKitComponentWithErrorBoundary);\n","import { ChartKit } from './components/ChartKit';\nimport { settings } from './libs';\nexport * from './types/widget-data';\nexport * from './libs/chartkit-error/chartkit-error';\nexport { settings };\nexport default ChartKit;\n","import React from 'react';\nexport * from './types';\nexport const YagrPlugin = {\n type: 'yagr',\n renderer: React.lazy(() => import('./renderer/YagrWidget')),\n};\n","import ChartKit, {settings} from '@gravity-ui/chartkit';\nimport {YagrPlugin} from '@gravity-ui/chartkit/yagr';\nexport type {RawSerieData, YagrWidgetData} from '@gravity-ui/chartkit/yagr';\n\nimport '@gravity-ui/yagr/dist/index.css';\n\nsettings.set({plugins: [YagrPlugin]});\n\nconst COLORS = ['rgb(77, 162, 241)', 'rgb(255, 61, 100)'];\n\nexport function getSerieColor(serieIndex: number) {\n return COLORS[serieIndex % COLORS.length];\n}\n\nexport default ChartKit;\n","import {FieldObject} from './types';\n\nexport const getPointValue = (value: FieldObject) => {\n switch (value.$type) {\n case 'yql.interval': {\n return Number(value.$value);\n }\n\n case 'yql.int32':\n case 'yql.int64':\n case 'yql.uint8':\n case 'yql.uint32':\n case 'yql.uint64':\n case 'yql.float':\n case 'yql.double':\n case 'yql.decimal':\n return Number(value.$value);\n default:\n return value.$rawValue;\n }\n};\n","import transform_ from 'lodash/transform';\nimport groupBy_ from 'lodash/groupBy';\nimport type {QueryResult} from './types';\nimport {getPointValue} from './getPointData';\n\nexport const splitDataByColor = ({\n rows,\n colorFieldName,\n xFieldName,\n yFieldName,\n}: {\n rows: QueryResult;\n xFieldName: string;\n yFieldName: string;\n colorFieldName: string;\n}) => {\n const xFieldPath = `${xFieldName}.$rawValue`;\n const colorFieldPath = `${colorFieldName}.$rawValue`;\n\n return transform_<\n Record<string, QueryResult>,\n Array<{name: string; data: {x: string; y: number}[]}>\n >(\n groupBy_(rows, colorFieldPath),\n (result, value, key) => {\n const data = transform_<Record<string, QueryResult>, {x: string; y: number}[]>(\n groupBy_(value, xFieldPath),\n (acc, y, x) => {\n const point = Array.isArray(y) ? y[0] : y;\n\n acc.push({\n x,\n y: Number(getPointValue(point[yFieldName])),\n });\n\n return acc;\n },\n [],\n );\n\n result.push({\n name: key,\n data,\n });\n\n return result;\n },\n [],\n );\n};\n","import type {Placeholder, Visualization} from '../types';\n\ntype VisualizationPlaceholders = {\n xPlaceholder: Placeholder | undefined;\n yPlaceholder: Placeholder | undefined;\n colorPlaceholder: Placeholder | undefined;\n};\n\nexport function getVisualizationPlaceholders(\n visualization: Visualization,\n): VisualizationPlaceholders {\n return visualization.placeholders.reduce(\n (acc: VisualizationPlaceholders, placeholder) => {\n if (placeholder.id === 'x') {\n acc.xPlaceholder = placeholder;\n }\n\n if (placeholder.id === 'y') {\n acc.yPlaceholder = placeholder;\n }\n\n if (placeholder.id === 'colors') {\n acc.colorPlaceholder = placeholder;\n }\n\n return acc;\n },\n {\n xPlaceholder: undefined,\n yPlaceholder: undefined,\n colorPlaceholder: undefined,\n },\n );\n}\n","import merge_ from 'lodash/merge';\nimport type {ChartKitWidgetData} from '@gravity-ui/chartkit';\nimport {prepareBar} from './bar';\nimport {prepareScatter} from './scatter';\nimport type {PrepareLineArgs} from './types';\nimport {buildD3Config} from './d3config';\n\nexport const prepareWidgetData = (args: PrepareLineArgs): ChartKitWidgetData => {\n const d3Config = buildD3Config(args);\n\n let data;\n\n switch (args.visualization.id) {\n case 'scatter': {\n data = prepareScatter(args);\n break;\n }\n default: {\n data = prepareBar(args);\n }\n }\n\n return merge_(data, d3Config);\n};\n","import type {ChartKitWidgetAxisType, ChartKitWidgetData} from '@gravity-ui/chartkit';\nimport type {PrepareLineArgs} from './types';\nimport {VisualizationId} from '../types';\n\n// Inspired by\n// https://github.com/datalens-tech/datalens-ui/blob/e978d82ce785d4321057942d0ff05a163c12ade7/src/server/modes/charts/plugins/datalens/d3/index.ts#L24\n\nexport function buildD3Config(args: PrepareLineArgs) {\n const chartSettings = args.visualization.chartSettings;\n\n const xAxisGridEnabled = true;\n const xAxisIsLegendEnabled = chartSettings.xAxis.legend === 'on';\n const xAxisEnableLabels = chartSettings.xAxis.labels === 'on';\n const xAxisTitle = chartSettings.xAxis.title;\n const xAxisPixelInterval = Number(chartSettings.xAxis.pixelInterval || '120');\n\n const yAxisEnableLabels = chartSettings.yAxis.labels === 'on';\n const yAxisTitle = chartSettings.yAxis.title;\n const yAxisGridEnabled = chartSettings.yAxis.grid === 'on';\n const yAxisPixelInterval = Number(chartSettings.yAxis.pixelInterval || '120');\n\n const chartWidgetData: Partial<ChartKitWidgetData> = {\n tooltip: {enabled: true},\n legend: {enabled: xAxisIsLegendEnabled},\n xAxis: {\n type: getAxisType(args.visualization.id),\n labels: {\n enabled: xAxisEnableLabels,\n },\n title: {\n text: xAxisTitle,\n },\n grid: {\n enabled: xAxisGridEnabled,\n },\n ticks: {\n pixelInterval: xAxisPixelInterval,\n },\n },\n yAxis: [\n {\n // todo: the axis type should depend on the type of field\n type: 'linear',\n lineColor: 'transparent',\n labels: {\n enabled: yAxisEnableLabels,\n },\n title: {\n text: yAxisTitle,\n },\n grid: {\n enabled: yAxisGridEnabled,\n },\n ticks: {\n pixelInterval: yAxisPixelInterval,\n },\n },\n ],\n series: {\n data: [],\n options: {\n 'bar-x': {\n barMaxWidth: 50,\n barPadding: 0.05,\n groupPadding: 0.4,\n dataSorting: {\n direction: 'desc',\n key: 'name',\n },\n },\n line: {\n lineWidth: 2,\n },\n },\n },\n chart: {\n margin: {\n top: 10,\n left: 10,\n right: 10,\n bottom: 15,\n },\n },\n };\n\n return chartWidgetData;\n}\n\n// Write this function, using reference:\n// https://github.com/datalens-tech/datalens-ui/blob/e978d82ce785d4321057942d0ff05a163c12ade7/src/server/modes/charts/plugins/datalens/preparers/helpers/axis.ts\nfunction getAxisType(visualizationId: VisualizationId): ChartKitWidgetAxisType {\n return visualizationId === 'scatter' ? 'linear' : 'category';\n}\n","import type {ChartKitWidgetData} from '@gravity-ui/chartkit';\nimport type {PrepareLineArgs} from './types';\nimport {splitDataByColor} from './splitDataByColor';\nimport {getVisualizationPlaceholders} from './utils';\n\nexport function prepareScatter(args: PrepareLineArgs): ChartKitWidgetData {\n const {visualization} = args;\n const rows = args.result;\n const {xPlaceholder, yPlaceholder, colorPlaceholder} =\n getVisualizationPlaceholders(visualization);\n const [xField] = xPlaceholder?.fields || [];\n const yFields = yPlaceholder?.fields || [];\n const [yField] = yFields;\n const [colorField] = colorPlaceholder?.fields || [];\n\n if (!xField || !yField) {\n return {\n series: {\n data: [],\n },\n };\n }\n\n if (colorField) {\n return {\n series: {\n data: splitDataByColor({\n rows,\n yFieldName: yField.name,\n xFieldName: xField.name,\n colorFieldName: colorField?.name,\n }).map((item) => ({\n data: item.data.map(({x, y}) => ({\n x: Number(x),\n y: Number(y),\n })),\n name: item.name,\n type: 'scatter',\n })),\n },\n };\n }\n\n const widgetData: ChartKitWidgetData = {\n series: {\n data: [\n {\n type: 'scatter',\n data: rows.map((row) => {\n return {\n x: Number(row[xField.name].$rawValue),\n y: Number(row[yField.name].$rawValue),\n };\n }),\n name: `${xField.name} x ${yField.name}`,\n },\n ],\n },\n };\n\n return widgetData;\n}\n","import uniq_ from 'lodash/uniq';\nimport map_ from 'lodash/map';\nimport type {ChartKitWidgetData} from '@gravity-ui/chartkit';\nimport type {PrepareLineArgs, QueryResult} from './types';\nimport {Field, VisualizationId} from '../types';\nimport {splitDataByColor} from './splitDataByColor';\nimport {getPointValue} from './getPointData';\nimport {getVisualizationPlaceholders} from './utils';\n\n// Inspired by datalens ql chart\n// https://github.com/datalens-tech/datalens-ui/blob/e978d82ce785d4321057942d0ff05a163c12ade7/src/server/modes/charts/plugins/ql/preparers/line.ts#L82\n\ninterface PrepareColoredSeriesDataArgs {\n rows: QueryResult;\n xField: Field;\n yField: Field;\n colorField: Field;\n visualizationId: VisualizationId;\n}\n\nfunction prepareColoredSeriesData({\n rows,\n xField,\n yField,\n colorField,\n visualizationId,\n}: PrepareColoredSeriesDataArgs): ChartKitWidgetData {\n const xFieldPath = `${xField.name}.$rawValue`;\n\n return {\n series: {\n data: splitDataByColor({\n rows,\n xFieldName: xField.name,\n yFieldName: yField.name,\n colorFieldName: colorField?.name,\n }).map((item) => {\n return {\n type: visualizationId,\n stacking: 'normal',\n name: item.name,\n data: item.data,\n };\n }),\n },\n xAxis: {\n type: 'category',\n categories: uniq_(map_(rows, xFieldPath) as unknown as string[]),\n },\n };\n}\n\ninterface PrepareSeriesDataArgs {\n rows: QueryResult;\n xField: Field;\n yField: Field;\n visualizationId: VisualizationId;\n yFields: Field[];\n}\n\nfunction prepareSeriesData({\n xField,\n yField,\n yFields,\n rows,\n visualizationId,\n}: PrepareSeriesDataArgs): ChartKitWidgetData {\n const result: Record<any, any> = {};\n\n let xValues: (string | number)[] = [];\n\n const dataMatrix: Record<string, any> = {};\n\n rows.forEach((row) => {\n const xRowItem = row[xField.name];\n const xValue = xRowItem.$rawValue;\n\n xValues.push(xValue);\n\n yFields.forEach((field) => {\n dataMatrix[xValue] = getPointValue(row[field.name]);\n });\n });\n\n xValues = Array.from(new Set(xValues));\n\n result.categories = xValues.map((value) => value);\n\n result.graphs = [];\n\n yFields.forEach(() => {\n const graph = {\n data: xValues.map((xValue) => {\n return dataMatrix[String(xValue)];\n }),\n };\n\n result.graphs?.push(graph);\n });\n\n return {\n series: {\n data: [\n {\n type: visualizationId,\n data: result.graphs[0].data.map((item: string, index: number) => {\n return {\n x: result.categories[index],\n y: Number(item),\n };\n }),\n name: yField.name,\n },\n ],\n },\n xAxis: {\n type: 'category',\n categories: result.categories,\n },\n };\n}\n\nexport function prepareBar(args: PrepareLineArgs): ChartKitWidgetData {\n const {visualization} = args;\n const visualizationId = visualization.id;\n const rows = args.result;\n const {xPlaceholder, yPlaceholder, colorPlaceholder} =\n getVisualizationPlaceholders(visualization);\n\n const [xField] = xPlaceholder?.fields || [];\n const yFields = yPlaceholder?.fields || [];\n const [yField] = yFields;\n const [colorField] = colorPlaceholder?.fields || [];\n\n if (!xField || !yField) {\n return {\n series: {\n data: [],\n },\n };\n }\n\n if (colorField) {\n return prepareColoredSeriesData({\n rows,\n yField,\n xField,\n colorField,\n visualizationId,\n });\n }\n\n return prepareSeriesData({\n rows,\n yField,\n xField,\n yFields,\n visualizationId,\n });\n}\n","import {createSelector} from 'reselect';\nimport get_ from 'lodash/get';\nimport {RootState} from '../../../../store/reducers/index';\nimport type {QueryResult} from '../preparers/types';\nimport type {Placeholder, PlaceholderId} from '../types';\nimport objectHash from 'object-hash';\n\nexport const selectQueryResultAllVisualizations = (state: RootState) =>\n state.queryResultsVisualization.visualizations;\n\nexport const selectQueryResultVisualization = (state: RootState) =>\n state.queryResultsVisualization.visualizations[state.queryResultsVisualization.resultIndex];\n\nexport const selectQueryResultVisualizationPlaceholders = (state: RootState) =>\n selectQueryResultVisualization(state).placeholders;\n\nexport const selectQueryResultVisualizationId = (state: RootState) =>\n selectQueryResultVisualization(state).id;\n\nexport const selectQueryResultChartSettings = (state: RootState) =>\n selectQueryResultVisualization(state).chartSettings;\n\nexport const selectQueryResultIndex = (state: RootState) =>\n state.queryResultsVisualization.resultIndex;\n\nexport const selectQueryResultChartSaved = (state: RootState) =>\n state.queryResultsVisualization.saved;\n\nexport const selectQueryId = (state: RootState) => state.queryResultsVisualization.query?.id;\n\nexport const selectQueryResult = (state: RootState) =>\n state.queryResultsVisualization.queryResults[state.queryResultsVisualization.resultIndex];\n\nexport const selectAvailableFields = (state: RootState) => {\n const result = selectQueryResult(state);\n\n const row = (result && result[0]) || {};\n\n const columns: {name: string}[] = Object.keys(row).map((name) => {\n return {\n name,\n };\n });\n\n return columns;\n};\n\nexport const resultsPlaceholdersValidation = createSelector(\n [\n selectQueryResult,\n selectQueryResultVisualizationPlaceholders,\n selectQueryResultVisualizationId,\n ],\n (queryResult, placeholders, visualizationId): Record<string, {invalid: boolean}> => {\n const hasColors = Boolean(\n placeholders.find((placeholder) => placeholder.id === 'colors')?.fields.length,\n );\n\n if (hasColors) {\n return colorsValidation(queryResult, placeholders);\n }\n\n const validationFunction =\n visualizationId === 'scatter' ? scatterValidation : lineAndBarValidation;\n\n return validationFunction(queryResult, placeholders);\n },\n);\n\nfunction scatterValidation(queryResult: QueryResult, placeholders: Placeholder[]) {\n const fields = placeholders.reduce(\n (ret: {x: null | string; y: null | string}, field) => {\n const fieldName = get_(field, 'fields.0.name');\n const fieldType = get_(field, 'id') as 'x' | 'y';\n\n if (fieldName && fieldType) {\n ret[fieldType] = fieldName;\n }\n\n return ret;\n },\n {x: null, y: null},\n );\n\n const xFieldName = fields.x;\n const yFieldName = fields.y;\n const notAllFieldsSelected = !xFieldName || !yFieldName;\n\n if (notAllFieldsSelected) {\n return {\n x: {invalid: false},\n y: {invalid: false},\n };\n }\n\n const hashes: Record<string, boolean> = {};\n\n const isPointsDuplicated = queryResult.some((item) => {\n const xValue = item[xFieldName].$rawValue;\n const yValue = item[yFieldName].$rawValue;\n // eslint-disable-next-line new-cap\n const hash = objectHash.MD5({\n xValue,\n yValue,\n });\n\n const isPointDuplicated = hashes[hash];\n\n hashes[hash] = true;\n\n return isPointDuplicated;\n });\n\n return {\n x: {invalid: isPointsDuplicated},\n y: {invalid: isPointsDuplicated},\n };\n}\n\nfunction lineAndBarValidation(queryResult: QueryResult, placeholders: Placeholder[]) {\n const fields = placeholders.reduce(\n (ret: {x: null | string; y: null | string}, field) => {\n const fieldName = get_(field, 'fields.0.name');\n const fieldType = get_(field, 'id') as 'x' | 'y';\n\n if (fieldName && fieldType) {\n ret[fieldType] = fieldName;\n }\n\n return ret;\n },\n {x: null, y: null},\n );\n\n const xFieldName = fields.x;\n const yFieldName = fields.y;\n const notAllFieldsSelected = !xFieldName || !yFieldName;\n\n if (notAllFieldsSelected) {\n return {\n x: {invalid: false},\n };\n }\n\n const xCoords: Record<string, boolean> = {};\n\n const isXCoordsDuplicated = queryResult.some((item) => {\n const xValue = item[xFieldName].$rawValue;\n\n const isXValueDuplicated = xCoords[xValue];\n\n xCoords[xValue] = true;\n\n return isXValueDuplicated;\n });\n\n return {\n x: {invalid: isXCoordsDuplicated},\n } as unknown as Record<string, {invalid: boolean}>;\n}\n\nfunction colorsValidation(queryResult: QueryResult, placeholders: Placeholder[]) {\n const fields = placeholders.reduce((acc: string[], field) => {\n const fieldName = get_(field, 'fields.0.name');\n\n if (fieldName) {\n acc.push(fieldName);\n }\n\n return acc;\n }, []);\n\n const notAllFieldsSelected = fields.length < placeholders.length;\n\n if (notAllFieldsSelected) {\n return {\n x: {invalid: false},\n };\n }\n\n const hashes: Record<string, boolean> = {};\n\n const isDataDuplicated = queryResult.some((item) => {\n const newObject = fields.reduce((acc: Record<string, string>, field: string) => {\n acc[field] = item[field].$rawValue;\n return acc;\n }, {});\n\n // eslint-disable-next-line new-cap\n const lineHash = objectHash.MD5(newObject);\n\n const isLineDuplicated = hashes[lineHash];\n\n hashes[lineHash] = true;\n\n return isLineDuplicated;\n });\n\n return {\n x: {invalid: isDataDuplicated},\n };\n}\n\nexport const selectIsPlaceholdersMissSomeFields = createSelector(\n [selectQueryResultVisualizationPlaceholders],\n (placeholders) => {\n const placeholdersMap = placeholders.reduce(\n (acc, placeholder) => {\n acc[placeholder.id] = placeholder.fields.length > 0;\n\n return acc;\n },\n {} as Record<PlaceholderId, boolean>,\n );\n\n return !placeholdersMap.x || !placeholdersMap.y;\n },\n);\n","import * as React from 'react';\nimport {useEffect, useState} from 'react';\nimport {ChartKitError} from '@gravity-ui/chartkit';\nimport {Button} from '@gravity-ui/uikit';\n\nimport './ChartErrorBoundary.scss';\n\nconst renderError = ({\n error,\n refreshClick,\n}: {\n error: ChartKitError | Error;\n refreshClick(): void;\n}) => {\n return (\n <div className=\"chart-error-boundary\">\n <div>\n <p>\n {error?.message}\n <br />\n </p>\n <Button view=\"action\" onClick={refreshClick}>\n Try again\n </Button>\n </div>\n </div>\n );\n};\n\ninterface ChartErrorBoundaryProps {\n deps: Record<string, unknown>;\n children: (args: {handleError({error}: {error: ChartKitError}): void}) => React.ReactElement;\n}\n\nexport const ChartErrorHandler = ({children, deps}: ChartErrorBoundaryProps) => {\n const [error, setError] = useState<ChartKitError>();\n\n const handleError = ({error}: {error: ChartKitError}) => {\n setError(error);\n };\n\n const handleRefreshClick = () => {\n setError(undefined);\n };\n\n useEffect(() => {\n setError(undefined);\n }, [deps]);\n\n if (error) {\n return renderError({error, refreshClick: handleRefreshClick});\n }\n\n return children({handleError});\n};\n\nexport class ChartErrorBoundary extends React.Component<\n React.PropsWithChildren<Readonly<{}>>,\n {error?: Error | ChartKitError}\n> {\n static getDerivedStateFromError(error: Error) {\n return {error};\n }\n\n constructor(props: React.PropsWithChildren<Readonly<{}>>) {\n super(props);\n\n this.state = {error: undefined};\n }\n\n componentDidCatch() {}\n\n handleRefreshClick = () => {\n this.setState({error: undefined});\n };\n\n render() {\n if (this.state.error) {\n return renderError({\n error: this.state.error,\n refreshClick: this.handleRefreshClick,\n });\n }\n\n return this.props.children;\n }\n}\n","import React from 'react';\nimport block from 'bem-cn-lite';\nimport './EmptyPlaceholdersMessage.scss';\n\nconst b = block('empty-placeholders-message');\n\nexport function EmptyPlaceholdersMessage() {\n return <div className={b()}>Add fields in X and Y placeholders</div>;\n}\n","import React from 'react';\nexport * from './types';\nexport * from './utils';\n/**\n * It is an experemental plugin\n *\n * DO NOT USE IT IN YOUR PRODUCTION\n * */\nexport const D3Plugin = {\n type: 'd3',\n renderer: React.lazy(() => import('./renderer/D3Widget')),\n};\n","import React, {useMemo} from 'react';\nimport ChartKit from '../../../../../components/YagrChartKit/YagrChartKit';\nimport {settings} from '@gravity-ui/chartkit';\nimport type {ChartKitRef} from '@gravity-ui/chartkit';\nimport {prepareWidgetData} from '../../preparers/prepareWidgetData';\nimport {useSelector} from 'react-redux';\nimport {\n selectIsPlaceholdersMissSomeFields,\n selectQueryResultVisualization,\n} from '../../store/selectors';\nimport type {QueryResult} from '../../preparers/types';\nimport {ChartErrorHandler} from '../../components/ChartErrorBoundary/ChartErrorBoundary';\nimport {EmptyPlaceholdersMessage} from '../../components/EmptyPlaceholdersMessage/EmptyPlaceholdersMessage';\nimport {D3Plugin} from '@gravity-ui/chartkit/d3';\n\nsettings.set({plugins: [...settings.get('plugins'), D3Plugin]});\n\ntype LineBasicProps = {\n result: QueryResult;\n};\n\nexport const BaseChart = React.forwardRef<ChartKitRef | undefined, LineBasicProps>(\n function BaseChartComponent({result}, ref) {\n const visualization = useSelector(selectQueryResultVisualization);\n const isPlaceholdersMissSomeFields = useSelector(selectIsPlaceholdersMissSomeFields);\n const widgetData = useMemo(() => {\n return prepareWidgetData({result, visualization});\n }, [result, visualization]);\n\n if (isPlaceholdersMissSomeFields) {\n return <EmptyPlaceholdersMessage />;\n }\n\n return (\n <ChartErrorHandler deps={widgetData}>\n {({handleError}) => (\n <ChartKit type=\"d3\" data={widgetData} ref={ref} onError={handleError} />\n )}\n </ChartErrorHandler>\n );\n },\n);\n\nexport const Chart = React.memo(BaseChart);\n","import * as React from 'react';\nconst Plus = (props) => (React.createElement(\"svg\", Object.assign({ xmlns: \"http://www.w3.org/2000/svg\", width: 16, height: 16, fill: \"none\", viewBox: \"0 0 16 16\" }, props),\n React.createElement(\"path\", { fill: \"currentColor\", fillRule: \"evenodd\", d: \"M8 1.75a.75.75 0 0 1 .75.75v4.75h4.75a.75.75 0 0 1 0 1.5H8.75v4.75a.75.75 0 0 1-1.5 0V8.75H2.5a.75.75 0 0 1 0-1.5h4.75V2.5A.75.75 0 0 1 8 1.75Z\", clipRule: \"evenodd\" })));\nexport default Plus;\n","import React from 'react';\nimport block from 'bem-cn-lite';\nimport './Placeholder.scss';\nimport {Field, Placeholder} from '../../../types';\nimport {Button, Icon, Select} from '@gravity-ui/uikit';\nimport {Plus as PlusIcon, Xmark as XmarkIcon} from '@gravity-ui/icons';\nimport {useThunkDispatch} from '../../../../../../store/thunkDispatch';\n\nconst b = block('placeholder');\n\ntype PlaceholderComponentProps = {\n placeholder: Placeholder;\n availableFields: Field[];\n};\n\nexport const PlaceholderComponent = ({placeholder, availableFields}: PlaceholderComponentProps) => {\n const {id, fields} = placeholder;\n const dispatch = useThunkDispatch();\n\n const addField = React.useCallback(\n ({field, placeholder}: {field: Field; placeholder: Placeholder}) => {\n dispatch({\n type: 'set-fields',\n data: {\n fields: [field],\n placeholderId: placeholder.id,\n },\n });\n },\n [dispatch],\n );\n\n const removeField = React.useCallback(\n ({field, placeholder}: {field: Field; placeholder: Placeholder}) => {\n dispatch({\n type: 'remove-field',\n data: {\n field,\n placeholderId: placeholder.id,\n },\n });\n },\n [dispatch],\n );\n\n const onSelectUpdate = React.useCallback(\n (value: string[]) => {\n addField({\n placeholder,\n field: availableFields.find((field) => field.name === value[0])!,\n });\n },\n [addField],\n );\n\n return (\n <div className={b()}>\n <div className={b('header')}>\n <div className={b('name')}>{id}</div>\n <Select\n value={[]}\n filterable={true}\n options={availableFields.map((field) => ({\n content: field.name,\n value: field.name,\n data: field,\n }))}\n onUpdate={onSelectUpdate}\n renderControl={({onClick, ref}) => {\n return (\n <Button onClick={onClick} ref={ref}>\n <Icon data={PlusIcon} size={16} />\n </Button>\n );\n }}\n />\n </div>\n\n {fields.map((field) => {\n return (\n <div key={field.name} className={b('field')}>\n <div className={b('field-spacer')}></div>\n <div className={b('field-title')} title={field.name}>\n {field.name}\n </div>\n <div className={b('field-actions')}>\n <Button onClick={removeField.bind(null, {field, placeholder})}>\n <Icon data={XmarkIcon} size={16} />\n </Button>\n </div>\n </div>\n );\n })}\n </div>\n );\n};\n","import React from 'react';\nimport {PlaceholderComponent} from './Placeholder/Placeholder';\nimport {Field} from '../../types';\nimport block from 'bem-cn-lite';\nimport './PlaceholdersContainer.scss';\nimport {useSelector} from 'react-redux';\nimport {selectQueryResultVisualizationPlaceholders} from '../../store/selectors';\n\nconst b = block('placeholders-container');\n\ntype PlaceholdersContainerProps = {\n availableFields: Field[];\n};\n\nexport const PlaceholdersContainer = (props: PlaceholdersContainerProps) => {\n const placeholders = useSelector(selectQueryResultVisualizationPlaceholders);\n\n return (\n <div className={b()}>\n {placeholders.map((placeholder) => (\n <div className={b('placeholder-wrapper')} key={placeholder.id}>\n <PlaceholderComponent placeholder={placeholder} {...props} />\n </div>\n ))}\n </div>\n );\n};\n","import {YTApiId, ytApiV4Id} from '../../../../rum/rum-wrap-api';\nimport {Visualization} from '../types';\n\nimport debounce_ from 'lodash/debounce';\nimport type {QueryResultVisualizationAction} from './reducer';\nimport {QueryResultMetaScheme, getQueryResultMeta, readQueryResults} from '../../module/api';\nimport {getPrimitiveTypesMap} from '../../../../store/selectors/global/supported-features';\nimport thorYPath from '../../../../common/thor/ypath';\nimport {getType} from '../../../../components/SchemaDataType/dataTypes';\nimport {Type, parseV3Type} from '../../../../components/SchemaDataType/dateTypesV3';\nimport {getQueryResultGlobalSettings} from '../../module/query_result/selectors';\nimport {prepareFormattedValue} from '../../module/query_result/utils/format';\nimport {selectQueryResult} from './selectors';\nimport {RootState} from '../../../../store/reducers/index';\nimport {AppThunkDispatch} from '../../../../store/thunkDispatch';\nimport {wrapApiPromiseByToaster} from '../../../../utils/utils';\n\ntype SaveQueryChartConfig = {\n visualizations: Visualization[];\n queryId: string;\n};\n\nconst DELAY = 5 * 1000;\n\nconst debouncedSaveQueryChartConfig = debounce_(\n (dispatch: AppThunkDispatch<QueryResultVisualizationAction>, payload: SaveQueryChartConfig) => {\n const promise = ytApiV4Id\n .alterQuery(YTApiId.alterQuery, {\n parameters: {\n query_id: payload.queryId,\n annotations: {\n ui_chart_config: payload.visualizations,\n },\n },\n })\n .then(() => {\n dispatch({\n type: 'set-visualization-saved',\n data: {\n saved: true,\n },\n });\n });\n\n wrapApiPromiseByToaster(promise, {\n toasterName: 'saveQueryChartConfig',\n skipSuccessToast: true,\n errorContent: 'Failed to save query chart config',\n });\n },\n DELAY,\n);\n\nexport function saveQueryChartConfig(payload: SaveQueryChartConfig) {\n return (dispatch: AppThunkDispatch<QueryResultVisualizationAction>) => {\n dispatch({\n type: 'set-visualization-saved',\n data: {\n saved: false,\n },\n });\n\n debouncedSaveQueryChartConfig(dispatch, payload);\n };\n}\n\nexport function newbiusLoadQueryResults({\n queryId,\n resultIndex,\n}: {\n queryId: string;\n resultIndex: number;\n}) {\n return async (dispatch: AppThunkDispatch<any>, getState: () => RootState) => {\n const queryResultAlreadyExist = selectQueryResult(getState());\n\n if (queryResultAlreadyExist) {\n return;\n }\n\n const meta = await dispatch(getQueryResultMeta(queryId, resultIndex));\n\n if (meta?.error) throw meta.error;\n\n const typeMap = getPrimitiveTypesMap(getState());\n const scheme: QueryResultMetaScheme[] = thorYPath.getValue(meta?.schema) || [];\n const columns =\n scheme.map(({name, type_v3: typeV3}) => {\n return {\n name,\n type: getType(parseV3Type(typeV3 as Type, typeMap)),\n displayName: name,\n };\n }) || [];\n\n const settings = getQueryResultGlobalSettings();\n\n const result = await dispatch(\n readQueryResults(\n queryId,\n resultIndex,\n {\n start: 0,\n end: Infinity,\n },\n columns.map(({name}) => name),\n {cellsSize: settings.cellSize},\n ),\n );\n\n const {rows, yql_type_registry: types} = result;\n\n const queryResult = rows.map((v) => {\n return Object.entries(v).reduce(\n (acc, [k, [value, typeIndex]]) => {\n acc[k] = prepareFormattedValue(value, types[Number(typeIndex)]);\n return acc;\n },\n {} as Record<string, {$type: string; $value: unknown}>,\n );\n });\n\n dispatch({\n type: 'set-query-result',\n data: {\n queryResult,\n },\n });\n };\n}\n","import React, {useCallback, useMemo} from 'react';\nimport {Select, SelectOption} from '@gravity-ui/uikit';\nimport {selectQueryResultIndex} from '../../store/selectors';\nimport {useSelector} from 'react-redux';\nimport {useThunkDispatch} from '../../../../../store/thunkDispatch';\n\ntype QueryResultSelectProps = {\n resultCount: number;\n};\n\nexport function QueryResultSelect({resultCount}: QueryResultSelectProps) {\n const resultIndex = useSelector(selectQueryResultIndex);\n const dispatch = useThunkDispatch();\n\n const options = useMemo(() => {\n const result: SelectOption[] = [];\n\n for (let i = 0; i < resultCount; i++) {\n result.push({\n value: String(i),\n content: `Result #${i + 1}`,\n });\n }\n return result;\n }, [resultCount]);\n\n const onUpdate = useCallback(([value]: string[]) => {\n dispatch({\n type: 'set-result-index',\n data: Number(value),\n });\n }, []);\n\n const value = [String(resultIndex)];\n\n if (options.length === 1) {\n return null;\n }\n\n return <Select width=\"max\" value={value} options={options} onUpdate={onUpdate} />;\n}\n","import React, {useCallback, useState} from 'react';\nimport {Gear} from '@gravity-ui/icons';\nimport {Icon} from '@gravity-ui/uikit';\nimport Button from '../../../../../components/Button/Button';\nimport {DialogField, DialogTabField, FormApi, YTDFDialog} from '../../../../../components/Dialog';\nimport type {ChartSettings} from '../../types';\nimport {useSelector} from 'react-redux';\nimport {selectQueryResultChartSettings} from '../../store/selectors';\nimport {useThunkDispatch} from '../../../../../store/thunkDispatch';\n\ntype FormValues = ChartSettings;\n\nfunction pixelIntervalValidator(value: string) {\n return !value || /^\\d+$/.test(value) ? undefined : 'Should be a number';\n}\n\nconst xAxisTab: DialogTabField<DialogField<FormValues>> = {\n type: 'tab',\n name: 'xAxis',\n title: 'X axis',\n fields: [\n {\n name: 'legend',\n caption: 'Legend',\n type: 'radio',\n extras: {\n options: [\n {\n value: 'on',\n label: 'On',\n },\n {\n value: 'off',\n label: 'Off',\n },\n ],\n },\n },\n {\n name: 'labels',\n caption: 'Labels',\n type: 'radio',\n extras: {\n options: [\n {\n value: 'on',\n label: 'On',\n },\n {\n value: 'off',\n label: 'Off',\n },\n ],\n },\n },\n {\n caption: 'Title',\n name: 'title',\n type: 'text',\n },\n {\n caption: 'Grid step, px',\n name: 'pixelInterval',\n type: 'text',\n validator: pixelIntervalValidator,\n },\n ],\n};\n\nconst yAxisTab: DialogTabField<DialogField<FormValues>> = {\n type: 'tab',\n name: 'yAxis',\n title: 'Y axis',\n fields: [\n {\n name: 'labels',\n caption: 'Labels',\n type: 'radio',\n extras: {\n options: [\n {\n value: 'on',\n label: 'On',\n },\n {\n value: 'off',\n label: 'Off',\n },\n ],\n },\n },\n {\n caption: 'Title',\n name: 'title',\n type: 'text',\n },\n {\n name: 'grid',\n caption: 'Grid',\n type: 'radio',\n extras: {\n options: [\n {\n value: 'on',\n label: 'On',\n },\n {\n value: 'off',\n label: 'Off',\n },\n ],\n },\n },\n {\n caption: 'Grid step, px',\n name: 'pixelInterval',\n type: 'text',\n validator: pixelIntervalValidator,\n },\n ],\n};\n\nconst fields: DialogTabField<DialogField<FormValues>>[] = [xAxisTab, yAxisTab];\n\nexport function ChartSettingsComponent() {\n const [visible, setVisilbility] = useState(false);\n const chartSettings = useSelector(selectQueryResultChartSettings);\n const dispatch = useThunkDispatch();\n\n const handleOnOpen = useCallback(() => {\n setVisilbility(true);\n }, [setVisilbility]);\n\n const handleOnClose = useCallback(() => {\n setVisilbility(false);\n }, [setVisilbility]);\n\n const handleOnAdd = useCallback((form: FormApi<FormValues, Partial<FormValues>>) => {\n const data = form.getState().values;\n\n dispatch({\n type: 'set-chart-settings',\n data,\n });\n\n return Promise.resolve();\n }, []);\n\n return (\n <span>\n <Button onClick={handleOnOpen}>\n <Icon data={Gear} size={16} />\n </Button>\n <YTDFDialog<FormValues>\n visible={visible}\n initialValues={chartSettings}\n onClose={handleOnClose}\n onAdd={handleOnAdd}\n fields={fields}\n />\n </span>\n );\n}\n","import React, {useCallback, useMemo} from 'react';\nimport {Select} from '@gravity-ui/uikit';\nimport type {VisualizationId} from '../../types';\nimport {useSelector} from 'react-redux';\nimport {selectQueryResultVisualizationId} from '../../store/selectors';\nimport {useThunkDispatch} from '../../../../../store/thunkDispatch';\n\nconst options = [\n {\n value: 'line',\n content: 'Line chart',\n },\n {\n value: 'bar-x',\n content: 'Bar chart',\n },\n {\n value: 'scatter',\n content: 'Scatter chart',\n },\n];\n\nexport function VisualizationSelector() {\n const visualizationId = useSelector(selectQueryResultVisualizationId);\n const dispatch = useThunkDispatch();\n\n const value = useMemo(() => {\n return [visualizationId];\n }, [visualizationId]);\n\n const onUpdate = useCallback(\n ([visualization]: string[]) => {\n dispatch({\n type: 'set-visualization',\n data: visualization as VisualizationId,\n });\n },\n [dispatch],\n );\n\n return (\n <Select<VisualizationId> width={125} value={value} options={options} onUpdate={onUpdate} />\n );\n}\n","import * as React from 'react';\nconst ArrowsRotateRight = (props) => (React.createElement(\"svg\", Object.assign({ xmlns: \"http://www.w3.org/2000/svg\", width: 16, height: 16, fill: \"none\", viewBox: \"0 0 16 16\" }, props),\n React.createElement(\"path\", { fill: \"currentColor\", fillRule: \"evenodd\", d: \"M8 1.5a6.501 6.501 0 0 0-6.445 5.649.75.75 0 1 0 1.488.194A5.001 5.001 0 0 1 11.57 4.5h-1.32a.75.75 0 0 0 0 1.5h3a.75.75 0 0 0 .75-.75v-3a.75.75 0 0 0-1.5 0v1.06A6.48 6.48 0 0 0 8 1.5Zm-5.25 13a.75.75 0 0 1-.75-.75v-3a.75.75 0 0 1 .75-.75h3a.75.75 0 0 1 0 1.5H4.43a5.001 5.001 0 0 0 8.528-2.843.75.75 0 1 1 1.487.194A6.501 6.501 0 0 1 3.5 12.691v1.059a.75.75 0 0 1-.75.75Z\", clipRule: \"evenodd\" })));\nexport default ArrowsRotateRight;\n","import React from 'react';\nimport {useSelector} from 'react-redux';\nimport {selectQueryResultChartSaved} from '../../store/selectors';\nimport {ArrowsRotateRight, CircleCheck} from '@gravity-ui/icons';\nimport {Icon, Tooltip} from '@gravity-ui/uikit';\nimport block from 'bem-cn-lite';\nimport './SavingIndicator.scss';\n\nconst b = block('saving-indicator');\n\nexport function SavingIndicator() {\n const saved = useSelector(selectQueryResultChartSaved);\n const tooltipContent = saved ? 'Saved' : 'Saving in progress';\n\n return (\n <Tooltip content={tooltipContent}>\n <Icon className={b({saved})} data={saved ? CircleCheck : ArrowsRotateRight} size={16} />\n </Tooltip>\n );\n}\n","import * as React from 'react';\nimport {useState} from 'react';\nimport {useSelector} from 'react-redux';\nimport type {AlertProps} from '@gravity-ui/uikit';\nimport {Alert, Button, Icon} from '@gravity-ui/uikit';\nimport block from 'bem-cn-lite';\nimport {resultsPlaceholdersValidation} from '../../store/selectors';\nimport {CircleExclamation as CircleExclamationIcon} from '@gravity-ui/icons';\n\nimport './ChartValidation.scss';\n\nconst b = block('chart-validation');\n\nconst Msg = () => (\n <span\n dangerouslySetInnerHTML={{\n __html: 'Your data contains duplicate values for one or more points. </br> This can lead to incorrect graph plotting. Please ensure that each point has a unique value.',\n }}\n />\n);\n\nconst ALERT_PROPS = {\n title: 'Duplicate Values',\n theme: 'warning' as AlertProps['theme'],\n message: <Msg />,\n icon: (\n <Icon className={b('field-icon', {invalid: true})} data={CircleExclamationIcon} size={16} />\n ),\n};\n\nexport const ChartValidation: React.FC<React.PropsWithChildren<{}>> = ({children}) => {\n const [isErrorHidden, hideError] = useState(false);\n const placeholdersValidation = useSelector(resultsPlaceholdersValidation);\n const hasError = placeholdersValidation?.x?.invalid || placeholdersValidation?.y?.invalid;\n const showBigAlert = hasError && !isErrorHidden;\n const showSmallAlert = isErrorHidden;\n\n if (showBigAlert) {\n return (\n <div className={b()}>\n <Alert\n {...ALERT_PROPS}\n actions={\n <Alert.Actions>\n <Button onClick={() => hideError(true)}>Show chart</Button>\n </Alert.Actions>\n }\n />\n </div>\n );\n }\n\n if (showSmallAlert) {\n return (\n <>\n <div className={b('alert')}>\n <Alert {...ALERT_PROPS} />\n </div>\n {children}\n </>\n );\n }\n\n return children;\n};\n","import * as React from 'react';\nconst CircleExclamation = (props) => (React.createElement(\"svg\", Object.assign({ xmlns: \"http://www.w3.org/2000/svg\", width: 16, height: 16, fill: \"none\", viewBox: \"0 0 16 16\" }, props),\n React.createElement(\"path\", { fill: \"currentColor\", fillRule: \"evenodd\", d: \"M8 13.5a5.5 5.5 0 1 0 0-11 5.5 5.5 0 0 0 0 11ZM8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14Zm1-4.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM8.75 5a.75.75 0 0 0-1.5 0v2.5a.75.75 0 0 0 1.5 0V5Z\", clipRule: \"evenodd\" })));\nexport default CircleExclamation;\n","import React, {useEffect} from 'react';\nimport {useDispatch, useSelector} from 'react-redux';\nimport throttle_ from 'lodash/throttle';\nimport block from 'bem-cn-lite';\nimport {type ChartKitRef} from '@gravity-ui/chartkit';\nimport {Chart} from '../Chart/Chart';\nimport {QueryItem} from '../../../module/api';\nimport useResizeObserver from '../../../../../hooks/useResizeObserver';\nimport {Loader} from '@gravity-ui/uikit';\nimport {PlaceholdersContainer} from '../PlaceholdersContainer/PlaceholdersContainer';\nimport './QueryResultsVisualization.scss';\nimport {newbiusLoadQueryResults, saveQueryChartConfig} from '../../store/actions';\nimport {\n selectAvailableFields,\n selectQueryId,\n selectQueryResult,\n selectQueryResultAllVisualizations,\n selectQueryResultIndex,\n} from '../../store/selectors';\nimport {QueryResultSelect} from '../VisualizationSelect/VisualizationSelect';\nimport {ChartSettingsComponent} from '../ChartSettings/ChartSettings';\nimport {VisualizationSelector} from '../VisualizationSelector/VisualizationSelector';\nimport {SavingIndicator} from '../SavingIndicator/SavingIndicator';\nimport {ChartErrorBoundary} from '../../components/ChartErrorBoundary/ChartErrorBoundary';\nimport {ChartValidation} from '../ChartValidation/ChartValidation';\n\nconst b = block('query-result-visualization');\n\ntype QueryResultsVisualizationProps = {\n query: QueryItem;\n index: number;\n};\n\nexport function QueryResultsVisualization({query}: QueryResultsVisualizationProps) {\n const containerRef = React.useRef<HTMLDivElement>(null);\n const chartKitRef = React.useRef<ChartKitRef>();\n const allVisualizations = useSelector(selectQueryResultAllVisualizations);\n const resultIndex = useSelector(selectQueryResultIndex);\n const queryResult = useSelector(selectQueryResult);\n const queryId = useSelector(selectQueryId);\n const availableFields = useSelector(selectAvailableFields);\n\n const dispatch = useDispatch();\n\n useEffect(() => {\n const weRecievedNewQuery = query.id !== queryId;\n\n if (weRecievedNewQuery) {\n dispatch({\n type: 'set-query',\n data: {\n query,\n },\n });\n }\n }, [query.id, queryId]);\n\n useEffect(() => {\n dispatch(\n newbiusLoadQueryResults({\n queryId: query.id,\n resultIndex,\n }),\n );\n }, [query.id, resultIndex, dispatch]);\n\n useEffect(() => {\n dispatch(\n saveQueryChartConfig({\n queryId: query.id,\n visualizations: allVisualizations,\n }),\n );\n }, [query.id, allVisualizations]);\n\n const debouncedChartResize = React.useMemo(() => {\n return throttle_(() => {\n chartKitRef.current?.reflow();\n }, 300);\n }, [chartKitRef.current]);\n\n useResizeObserver({\n element: containerRef.current ?? undefined,\n onResize: debouncedChartResize,\n });\n\n if (!queryResult) {\n return (\n <div className={b('loader-wrapper')}>\n <Loader className={b('loader')} />\n </div>\n );\n }\n\n return (\n <div className={b()} ref={containerRef}>\n <div className={b('controls-wrapper')}>\n <div className={b('group-wrapper')}>\n <QueryResultSelect resultCount={query.result_count} />\n </div>\n <div className={b('group-wrapper')}>\n <VisualizationSelector />\n <ChartSettingsComponent />\n <SavingIndicator />\n </div>\n <PlaceholdersContainer availableFields={availableFields} />\n </div>\n <div className={b('chartkit-wrapper')}>\n <ChartErrorBoundary>\n <ChartValidation>\n <Chart result={queryResult} ref={chartKitRef} />\n </ChartValidation>\n </ChartErrorBoundary>\n </div>\n </div>\n );\n}\n","import React from 'react';\nimport ResizeObserver from 'resize-observer-polyfill';\n\ninterface Props {\n element?: Element;\n onResize: ResizeObserverCallback;\n}\n\nexport default function useResizeObserver({element, onResize}: Props) {\n React.useEffect(() => {\n if (element) {\n const observer = new ResizeObserver(onResize);\n observer.observe(element);\n return () => {\n if (element) {\n observer.unobserve(element);\n }\n };\n } else {\n return undefined;\n }\n }, [element, onResize]);\n}\n","import unipika from '../../../../../common/thor/unipika';\nimport {TypeArray} from '../../../../../components/SchemaDataType/dataTypes';\nimport {UnipikaSettings} from '../../../../../components/Yson/StructuredYson/StructuredYsonTypes';\n\nconst defaultSettings: UnipikaSettings = {\n escapeWhitespace: false,\n decodeUTF8: true,\n binaryAsHex: true,\n escapeYQLStrings: true,\n omitStructNull: true,\n maxListSize: 50,\n maxStringSize: undefined,\n treatValAsData: true,\n};\n\nexport function convert(\n value: unknown,\n dataType: TypeArray,\n settings: UnipikaSettings,\n): {$type: string; $value: any; $tag?: any} {\n try {\n return unipika.converters.yql([value, dataType], settings);\n } catch (error) {\n console.log(error);\n let valueStr: string;\n try {\n valueStr = JSON.stringify(value);\n } catch {\n valueStr = String(value);\n }\n return unipika.format(\n {$value: `Failed to convert value: ${valueStr}`, $type: 'yql.string'},\n settings,\n );\n }\n}\n\nexport function formatResults(\n value: {$type: string; $value: unknown; $tag?: unknown},\n settings: UnipikaSettings = defaultSettings,\n) {\n try {\n return unipika.format(value, settings);\n } catch (error) {\n let valueStr: string;\n try {\n valueStr = JSON.stringify(value);\n } catch {\n valueStr = String(value);\n }\n return unipika.format(\n {$value: `Failed to format value: ${valueStr}`, $type: 'yql.string'},\n settings,\n );\n }\n}\n\nconst maxFormattedLength = 10000;\n\nexport function prepareFormattedValue(\n value: unknown,\n type: TypeArray,\n settings: UnipikaSettings = defaultSettings,\n) {\n const convertedValue = convert(value, type, settings);\n\n let fullValue = convertedValue;\n if (settings?.maxStringSize) {\n fullValue = convert(value, type, {\n ...settings,\n maxStringSize: undefined,\n });\n }\n\n let $rawValue = '';\n let formatValue = true;\n if (fullValue.$type === 'yql.tagged' && fullValue.$tag === 'url') {\n const node = fullValue.$value;\n if (node.$type === 'tag_value') {\n $rawValue = node.$value.text || node.$value.href;\n } else if (typeof node.$value === 'string') {\n $rawValue = node.$value;\n }\n } else {\n $rawValue = formatResults(fullValue, {\n ...settings,\n asHTML: false,\n maxStringSize: undefined,\n });\n formatValue = $rawValue.length < maxFormattedLength;\n }\n\n const $formattedValue = formatValue ? formatResults(convertedValue, settings) : `Escaped value`;\n return {\n ...fullValue,\n $formattedValue,\n $fullFormattedValue:\n convertedValue === fullValue\n ? $formattedValue\n : formatValue\n ? formatResults(fullValue, {...settings, maxStringSize: undefined})\n : '',\n $rawValue,\n };\n}\n","import {createSelector} from 'reselect';\n\nimport find_ from 'lodash/find';\nimport forEach_ from 'lodash/forEach';\nimport map_ from 'lodash/map';\nimport sortBy_ from 'lodash/sortBy';\n\nimport {RootState} from '../../../store/reducers';\nimport {getCluster} from './index';\nimport {SelectWithSubItemsProps} from '../../../components/Dialog/controls/SelectWithSubItems/SelectWithSubItems';\nimport {OperationStatisticInfo} from '../../../store/reducers/global/supported-features';\n\nconst getSupportedFeaturesRaw = (state: RootState) => state.supportedFeatures.features;\nconst getSupportedFeaturesCluster = (state: RootState) => state.supportedFeatures.featuresCluster;\n\n// Record<codec, level>\nconst RECOMMENDED_COMPRESSION_CODECS: Record<string, string> = {\n lz4: '',\n zstd_: '5',\n zlib_: '9',\n brotli_: '8',\n lzma_: '6',\n};\n\nconst RECOMMENDED = ' (recommended)';\n\nconst getSupportedFeatures = createSelector(\n [getCluster, getSupportedFeaturesCluster, getSupportedFeaturesRaw],\n (cluster, featuresCluster, features) => {\n return cluster === featuresCluster ? features : {};\n },\n);\n\nexport const getErasureCodecs = createSelector([getSupportedFeatures], (features) => {\n return map_(features.erasure_codecs, (value) => {\n return {value, text: value};\n }).sort(compareItems);\n});\n\nexport const getPrimitiveTypes = createSelector([getSupportedFeatures], (features) => {\n return sortBy_(features.primitive_types).map((value) => {\n return {value, text: value};\n });\n});\n\nexport const getPrimitiveTypesMap = createSelector([getPrimitiveTypes], (types) => {\n return new Set(types.map(({value}) => value));\n});\n\nexport const getCompressionCodecs = createSelector([getSupportedFeatures], (features) => {\n return prepareItemsSubitems(features.compression_codecs);\n});\n\nexport const makeCompressionCodecFinder = createSelector([getCompressionCodecs], ({items}) => {\n return (codec: string) => {\n if (!codec) {\n return undefined;\n }\n\n const item = find_(items, (x) => {\n return x.value === codec;\n });\n if (item) {\n return [item.value as string];\n }\n\n const [first, ...rest] = codec.split('_');\n const subCodec = rest.join('_');\n\n return [first + '_', subCodec];\n };\n});\n\nexport type CompressionCodecs = Required<\n Pick<SelectWithSubItemsProps, 'items' | 'subItemsMap' | 'labels'>\n>;\n\nfunction prepareItemsSubitems(arr: Array<string> = []): CompressionCodecs {\n const res: CompressionCodecs = {\n items: [],\n subItemsMap: {},\n labels: ['Codec:', 'level:'],\n };\n\n const {items, subItemsMap} = res;\n\n for (const item of arr) {\n const parts = item.split('_');\n const [first, ...rest] = parts;\n\n if (rest.length) {\n const value = first + '_';\n\n if (!subItemsMap[value]) {\n items.push({value, content: value});\n }\n\n const dst = (subItemsMap[value] = subItemsMap[value] || new Array<string>());\n const subValue = rest.join('_');\n dst.push({value: subValue, content: subValue});\n } else {\n items.push({value: item, content: item});\n }\n }\n\n forEach_(subItemsMap, (subItems, key) => {\n const index = items.findIndex(({value}) => value === key);\n if (index === -1) {\n return;\n }\n subItems.sort(compareItems);\n if (subItems.length === 1) {\n const value = items[index].value + subItems[0].value;\n items[index] = {value, content: value};\n delete subItemsMap[key];\n } else {\n const item = items[index];\n item.content = `${item.value}[${subItems[0].value}-${\n subItems[subItems.length - 1].value\n }]`;\n }\n\n const recommended = RECOMMENDED_COMPRESSION_CODECS[key];\n if (recommended) {\n const subItems2 = subItemsMap[key];\n if (subItems2) {\n const first = subItems2[0];\n const last = subItems2[subItems2.length - 1];\n first.content = first.value + ' (faster)';\n last.content = last.value + ' (slower & smaller)';\n\n const item = subItems2.find(({value}) => value === recommended);\n if (item) {\n item.content = item.value + RECOMMENDED;\n }\n } else {\n items[index].content += RECOMMENDED;\n }\n }\n });\n\n items.sort(compareItems);\n return res;\n}\n\nfunction compareItems(l: {value: string}, r: {value: string}) {\n if (l.value === r.value) {\n return 0;\n }\n\n if (l.value === 'none') {\n return -1;\n }\n\n if (r.value === 'none') {\n return 1;\n }\n\n const lValue = String(Number(l.value)) === l.value ? Number(l.value) : l.value;\n const rValue = String(Number(r.value)) === r.value ? Number(r.value) : r.value;\n\n return lValue < rValue ? -1 : 1;\n}\n\nexport const getOperationStatisticsDescription = createSelector(\n [getSupportedFeaturesRaw],\n ({operation_statistics_descriptions}) => {\n const byName: Record<string, OperationStatisticInfo> = {};\n const byRegexp: Array<OperationStatisticInfo & {regexp: RegExp}> = [];\n forEach_(operation_statistics_descriptions, (item, key) => {\n const idx = key.indexOf('*');\n if (idx !== -1) {\n const tmp = key.replace(/\\//g, '\\\\/').replace(/\\*/g, '[^/]*');\n byRegexp.push({\n ...item,\n regexp: new RegExp(tmp),\n });\n } else {\n byName[key] = item;\n }\n });\n\n return {\n byName,\n byRegexp,\n };\n },\n);\n","import {AnyAction} from 'redux';\nimport {ThunkDispatch} from 'redux-thunk';\nimport {RootState} from './reducers';\nimport {useDispatch} from 'react-redux';\n\nexport type AppThunkDispatch<T extends AnyAction> = ThunkDispatch<RootState, any, T>;\n\nexport const useThunkDispatch = () => useDispatch<AppThunkDispatch<AnyAction>>();\n","import { I18N } from '@gravity-ui/i18n';\nimport en from './keysets/en.json';\nimport ru from './keysets/ru.json';\nconst i18nFactory = new I18N();\nconst EN = 'en';\nconst RU = 'ru';\ni18nFactory.registerKeysets(EN, en);\ni18nFactory.registerKeysets(RU, ru);\nconst i18n = i18nFactory.i18n.bind(i18nFactory);\nexport { i18nFactory, i18n };\n","export const CHARTKIT_ERROR_CODE = {\n NO_DATA: 'ERR.CK.NO_DATA',\n INVALID_DATA: 'ERR.CK.INVALID_DATA',\n UNKNOWN: 'ERR.CK.UNKNOWN_ERROR',\n UNKNOWN_PLUGIN: 'ERR.CK.UNKNOWN_PLUGIN',\n TOO_MANY_LINES: 'ERR.CK.TOO_MANY_LINES',\n};\nexport class ChartKitError extends Error {\n constructor({ originalError, message, code = CHARTKIT_ERROR_CODE.UNKNOWN, } = {}) {\n super(message);\n this.isCustomError = true;\n this.code = code;\n if (originalError) {\n this.name = originalError.name;\n this.stack = originalError.stack;\n }\n }\n}\nexport const isChartKitError = (error) => {\n return error instanceof Error && 'isCustomError' in error;\n};\n","import isObject from 'lodash/isObject';\nimport mergeWith from 'lodash/mergeWith';\n// @ts-ignore\nexport function mergeSettingStrategy(objValue, srcValue, key) {\n if (key === 'plugins') {\n const currentPlugins = [...objValue];\n const newPlugins = [...srcValue];\n // modify existing plugins\n let newSettingsPlugins = currentPlugins.map((currentPlugin) => {\n const newPluginIndex = newPlugins.findIndex(({ type }) => type === currentPlugin.type);\n if (newPluginIndex !== -1) {\n const newPlugin = newPlugins[newPluginIndex];\n newPlugins.splice(newPluginIndex, 1);\n return {\n type: currentPlugin.type,\n renderer: newPlugin.renderer,\n };\n }\n return currentPlugin;\n });\n // add new plugins if it exist after modified\n if (newPlugins.length > 0) {\n newSettingsPlugins = [...newSettingsPlugins, ...newPlugins];\n }\n return newSettingsPlugins;\n }\n if (isObject(objValue)) {\n return mergeWith(objValue, srcValue, mergeSettingStrategy);\n }\n return srcValue;\n}\n","import { configure } from '@gravity-ui/uikit';\nimport get from 'lodash/get';\nimport mergeWith from 'lodash/mergeWith';\nimport { i18nFactory } from '../../i18n';\nimport { EventEmitter } from './eventEmitter';\nimport { mergeSettingStrategy } from './mergeSettingStrategy';\nexport const settingsEventEmitter = new EventEmitter();\nconst removeUndefinedValues = (data) => {\n return Object.entries(data).reduce((acc, [key, value]) => {\n if (typeof value !== 'undefined') {\n acc[key] = value;\n }\n return acc;\n }, {});\n};\nconst updateLang = (lang) => {\n configure({ lang });\n i18nFactory.setLang(lang);\n};\nclass ChartKitSettings {\n constructor() {\n this.settings = {\n plugins: [],\n lang: 'en',\n };\n updateLang(this.get('lang'));\n }\n get(key) {\n return get(this.settings, key);\n }\n set(updates) {\n const filteredUpdates = removeUndefinedValues(updates);\n this.settings = mergeWith(this.settings, filteredUpdates, mergeSettingStrategy);\n if (filteredUpdates.lang) {\n const lang = filteredUpdates.lang || this.get('lang');\n updateLang(lang);\n settingsEventEmitter.dispatch('change-lang', lang);\n }\n }\n}\nexport const settings = new ChartKitSettings();\n","export class EventEmitter {\n constructor() {\n this.events = {};\n }\n on(type, event) {\n if (this.events[type]) {\n this.events[type].push(event);\n }\n else {\n this.events[type] = [event];\n }\n }\n off(type, eventId) {\n if (this.events[type]) {\n this.events[type] = this.events[type].filter(({ id }) => id !== eventId);\n }\n }\n dispatch(type, args) {\n if (this.events[type]) {\n this.events[type].forEach(({ action }) => {\n action(args);\n });\n }\n }\n}\n","import { withNaming } from '@bem-react/classname';\nexport const NAMESPACE = 'chartkit-';\nexport const cn = withNaming({ e: '__', m: '_' });\nexport const block = withNaming({ n: NAMESPACE, e: '__', m: '_' });\n","export const randomString = (length, chars) => {\n let result = '';\n for (let i = length; i > 0; --i) {\n result += chars[Math.floor(Math.random() * chars.length)];\n }\n return result;\n};\nexport const getRandomCKId = () => `ck.${randomString(10, '0123456789abcdefghijklmnopqrstuvwxyz')}`;\n","import * as React from 'react';\nconst Gear = (props) => (React.createElement(\"svg\", Object.assign({ xmlns: \"http://www.w3.org/2000/svg\", width: 16, height: 16, fill: \"none\", viewBox: \"0 0 16 16\" }, props),\n React.createElement(\"g\", { clipPath: \"url(#a)\" },\n React.createElement(\"path\", { fill: \"currentColor\", fillRule: \"evenodd\", d: \"M7.199 2H8.8a.2.2 0 0 1 .2.2c0 1.808 1.958 2.939 3.524 2.034a.199.199 0 0 1 .271.073l.802 1.388a.199.199 0 0 1-.073.272c-1.566.904-1.566 3.164 0 4.069a.199.199 0 0 1 .073.271l-.802 1.388a.199.199 0 0 1-.271.073C10.958 10.863 9 11.993 9 13.8a.2.2 0 0 1-.199.2H7.2a.199.199 0 0 1-.2-.2c0-1.808-1.958-2.938-3.524-2.034a.199.199 0 0 1-.272-.073l-.8-1.388a.199.199 0 0 1 .072-.271c1.566-.905 1.566-3.165 0-4.07a.199.199 0 0 1-.073-.271l.801-1.388a.199.199 0 0 1 .272-.073C5.042 5.138 7 4.007 7 2.2c0-.11.089-.199.199-.199ZM5.5 2.2c0-.94.76-1.7 1.699-1.7H8.8c.94 0 1.7.76 1.7 1.7a.85.85 0 0 0 1.274.735 1.699 1.699 0 0 1 2.32.622l.802 1.388c.469.813.19 1.851-.622 2.32a.85.85 0 0 0 0 1.472 1.7 1.7 0 0 1 .622 2.32l-.802 1.388a1.699 1.699 0 0 1-2.32.622.85.85 0 0 0-1.274.735c0 .939-.76 1.7-1.699 1.7H7.2a1.7 1.7 0 0 1-1.699-1.7.85.85 0 0 0-1.274-.735 1.698 1.698 0 0 1-2.32-.622l-.802-1.388a1.699 1.699 0 0 1 .622-2.32.85.85 0 0 0 0-1.471 1.699 1.699 0 0 1-.622-2.321l.801-1.388a1.699 1.699 0 0 1 2.32-.622A.85.85 0 0 0 5.5 2.2Zm4 5.8a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0ZM11 8a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z\", clipRule: \"evenodd\" })),\n React.createElement(\"defs\", null,\n React.createElement(\"clipPath\", { id: \"a\" },\n React.createElement(\"path\", { fill: \"currentColor\", d: \"M0 0h16v16H0z\" })))));\nexport default Gear;\n","import React from 'react';\nexport const AlertContext = React.createContext(null);\n","'use client';\nimport React from 'react';\nimport { AlertContext } from './AlertContext';\nexport const useAlertContext = () => {\n const context = React.useContext(AlertContext);\n if (!context)\n throw new Error('Alert: `useAlertContext` hook is used out of \"AlertContext\"');\n return context;\n};\n","'use client';\nimport React from 'react';\nimport { Button } from '../Button';\nimport { useAlertContext } from './useAlertContext';\nexport const AlertAction = (props) => {\n const { view } = useAlertContext();\n return React.createElement(Button, Object.assign({ view: view === 'filled' ? 'normal-contrast' : undefined }, props));\n};\n","import { block } from '../utils/cn';\nimport './Alert.css';\nexport const DEFAULT_ICON_SIZE = 18;\nexport const bAlert = block('alert');\n","'use client';\nimport React from 'react';\nimport { AlertContext } from './AlertContext';\nexport const AlertContextProvider = ({ layout, view, children }) => {\n return React.createElement(AlertContext.Provider, { value: { layout, view } }, children);\n};\n","import React from 'react';\nimport { CircleCheck, CircleCheckFill, CircleInfo, CircleInfoFill, CircleXmark, CircleXmarkFill, Thunderbolt, ThunderboltFill, TriangleExclamation, TriangleExclamationFill, } from '@gravity-ui/icons';\nimport { Icon } from '../Icon';\nimport { colorText } from '../Text/colorText/colorText';\nimport { DEFAULT_ICON_SIZE, bAlert } from './constants';\nconst typeToIcon = {\n danger: {\n filled: CircleXmarkFill,\n outlined: CircleXmark,\n },\n info: {\n filled: CircleInfoFill,\n outlined: CircleInfo,\n },\n success: {\n filled: CircleCheckFill,\n outlined: CircleCheck,\n },\n warning: {\n filled: TriangleExclamationFill,\n outlined: TriangleExclamation,\n },\n utility: {\n filled: ThunderboltFill,\n outlined: Thunderbolt,\n },\n normal: null,\n};\nexport const AlertIcon = ({ className, theme, view = 'filled', size = DEFAULT_ICON_SIZE, }) => {\n const iconByTheme = typeToIcon[theme];\n if (!iconByTheme) {\n return null;\n }\n let color;\n if (theme === 'success') {\n color = 'positive';\n }\n else if (theme !== 'normal') {\n color = theme;\n }\n return (React.createElement(\"div\", { className: bAlert('icon', colorText({ color }, className)) },\n React.createElement(Icon, { data: iconByTheme[view], size: size })));\n};\n","import * as React from 'react';\nconst CircleXmarkFill = (props) => (React.createElement(\"svg\", Object.assign({ xmlns: \"http://www.w3.org/2000/svg\", width: 16, height: 16, fill: \"none\", viewBox: \"0 0 16 16\" }, props),\n React.createElement(\"path\", { fill: \"currentColor\", fillRule: \"evenodd\", d: \"M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14ZM6.53 5.47a.75.75 0 0 0-1.06 1.06L6.94 8 5.47 9.47a.75.75 0 1 0 1.06 1.06L8 9.06l1.47 1.47a.75.75 0 1 0 1.06-1.06L9.06 8l1.47-1.47a.75.75 0 1 0-1.06-1.06L8 6.94 6.53 5.47Z\", clipRule: \"evenodd\" })));\nexport default CircleXmarkFill;\n","import * as React from 'react';\nconst CircleXmark = (props) => (React.createElement(\"svg\", Object.assign({ xmlns: \"http://www.w3.org/2000/svg\", width: 16, height: 16, fill: \"none\", viewBox: \"0 0 16 16\" }, props),\n React.createElement(\"path\", { fill: \"currentColor\", fillRule: \"evenodd\", d: \"M13.5 8a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0ZM15 8A7 7 0 1 1 1 8a7 7 0 0 1 14 0ZM6.53 5.47a.75.75 0 0 0-1.06 1.06L6.94 8 5.47 9.47a.75.75 0 1 0 1.06 1.06L8 9.06l1.47 1.47a.75.75 0 1 0 1.06-1.06L9.06 8l1.47-1.47a.75.75 0 1 0-1.06-1.06L8 6.94 6.53 5.47Z\", clipRule: \"evenodd\" })));\nexport default CircleXmark;\n","import * as React from 'react';\nconst CircleInfoFill = (props) => (React.createElement(\"svg\", Object.assign({ xmlns: \"http://www.w3.org/2000/svg\", width: 16, height: 16, fill: \"none\", viewBox: \"0 0 16 16\" }, props),\n React.createElement(\"path\", { fill: \"currentColor\", fillRule: \"evenodd\", d: \"M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14Zm1-9.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM8 7.75a.75.75 0 0 1 .75.75V11a.75.75 0 0 1-1.5 0V8.5A.75.75 0 0 1 8 7.75Z\", clipRule: \"evenodd\" })));\nexport default CircleInfoFill;\n","import * as React from 'react';\nconst CircleCheckFill = (props) => (React.createElement(\"svg\", Object.assign({ xmlns: \"http://www.w3.org/2000/svg\", width: 16, height: 16, fill: \"none\", viewBox: \"0 0 16 16\" }, props),\n React.createElement(\"path\", { fill: \"currentColor\", fillRule: \"evenodd\", d: \"M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14Zm3.1-8.55a.75.75 0 1 0-1.2-.9L7.419 8.858 6.03 7.47a.75.75 0 0 0-1.06 1.06l2 2a.75.75 0 0 0 1.13-.08l3-4Z\", clipRule: \"evenodd\" })));\nexport default CircleCheckFill;\n","import * as React from 'react';\nconst TriangleExclamationFill = (props) => (React.createElement(\"svg\", Object.assign({ xmlns: \"http://www.w3.org/2000/svg\", width: 16, height: 16, fill: \"none\", viewBox: \"0 0 16 16\" }, props),\n React.createElement(\"path\", { fill: \"currentColor\", fillRule: \"evenodd\", d: \"M5.836 2.244c.962-1.665 3.366-1.665 4.328 0l4.917 8.505c.964 1.666-.239 3.751-2.164 3.751H3.083c-1.925 0-3.128-2.085-2.164-3.751l4.917-8.505ZM8 5a.75.75 0 0 1 .75.75v2a.75.75 0 1 1-1.5 0v-2A.75.75 0 0 1 8 5Zm1 5.75a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z\", clipRule: \"evenodd\" })));\nexport default TriangleExclamationFill;\n","import * as React from 'react';\nconst ThunderboltFill = (props) => (React.createElement(\"svg\", Object.assign({ xmlns: \"http://www.w3.org/2000/svg\", width: 16, height: 16, fill: \"none\", viewBox: \"0 0 16 16\" }, props),\n React.createElement(\"path\", { fill: \"currentColor\", d: \"m14.61 6.914-7.632 8.08a1.614 1.614 0 0 1-2.69-1.66L5.5 10H2.677A1.677 1.677 0 0 1 1.12 7.7l2.323-5.807A2.216 2.216 0 0 1 5.5.5h4c.968 0 1.637.967 1.298 1.873L10 4.5h3.569a1.431 1.431 0 0 1 1.04 2.414Z\" })));\nexport default ThunderboltFill;\n","import { addComponentKeysets } from '../../utils/addComponentKeysets';\nimport en from './en.json';\nimport ru from './ru.json';\nconst COMPONENT = 'Alert';\nexport default addComponentKeysets({ en, ru }, COMPONENT);\n","import React from 'react';\nimport { Xmark } from '@gravity-ui/icons';\nimport { Button } from '../Button';\nimport { Card } from '../Card';\nimport { Icon } from '../Icon';\nimport { colorText } from '../Text';\nimport { Flex, spacing } from '../layout';\nimport { AlertAction } from './AlertAction';\nimport { AlertActions } from './AlertActions';\nimport { AlertContextProvider } from './AlertContextProvider';\nimport { AlertIcon } from './AlertIcon';\nimport { AlertTitle } from './AlertTitle';\nimport { DEFAULT_ICON_SIZE, bAlert } from './constants';\nimport i18n from './i18n';\nexport const Alert = (props) => {\n const { theme = 'normal', view = 'filled', layout = 'vertical', message, className, corners, style, onClose, align, qa, } = props;\n return (React.createElement(AlertContextProvider, { layout: layout, view: view },\n React.createElement(Card, { style: style, className: bAlert({ corners }, spacing({ py: 4, px: 5 }, className)), theme: theme, view: view, qa: qa },\n React.createElement(Flex, { gap: \"3\", alignItems: align },\n typeof props.icon === 'undefined' ? (React.createElement(Alert.Icon, { theme: theme, view: view })) : (props.icon // ability to pass `null` as `icon` prop value\n ),\n React.createElement(Flex, { direction: layout === 'vertical' ? 'column' : 'row', gap: \"5\", grow: true },\n React.createElement(Flex, { gap: \"2\", grow: true, className: bAlert('text-content') },\n React.createElement(Flex, { direction: \"column\", gap: \"1\", grow: true, justifyContent: align },\n typeof props.title === 'string' ? (React.createElement(Alert.Title, { text: props.title })) : (props.title),\n message)),\n Array.isArray(props.actions) ? (React.createElement(Alert.Actions, { items: props.actions })) : (props.actions)),\n onClose && (React.createElement(Button, { view: \"flat\", className: bAlert('close-btn'), onClick: onClose, extraProps: {\n 'aria-label': i18n('label_close'),\n } },\n React.createElement(Icon, { data: Xmark, size: DEFAULT_ICON_SIZE, className: colorText({ color: 'secondary' }) })))))));\n};\nAlert.Icon = AlertIcon;\nAlert.Title = AlertTitle;\nAlert.Actions = AlertActions;\nAlert.Action = AlertAction;\n","import React from 'react';\nimport { Text } from '../Text';\nimport { bAlert } from './constants';\nexport const AlertTitle = ({ text, className }) => {\n return (React.createElement(Text, { variant: \"subheader-2\", className: bAlert('title', className) }, text));\n};\n","'use client';\nimport React from 'react';\nimport { Flex } from '../layout';\nimport { AlertAction } from './AlertAction';\nimport { bAlert } from './constants';\nimport { useAlertContext } from './useAlertContext';\nexport const AlertActions = ({ items, children, className }) => {\n const { layout } = useAlertContext();\n return (React.createElement(Flex, { className: bAlert('actions', { minContent: layout === 'horizontal' }, className), direction: \"row\", gap: \"3\", wrap: true, alignItems: layout === 'horizontal' ? 'center' : 'flex-start' }, (items === null || items === void 0 ? void 0 : items.map(({ handler, text }, i) => (React.createElement(AlertAction, { key: i, onClick: handler }, text)))) || children));\n};\n","'use client';\nimport { __rest } from \"tslib\";\nimport React from 'react';\nimport { useActionHandlers } from '../../hooks';\nimport { Box } from '../layout';\nimport { block } from '../utils/cn';\nimport './Card.css';\nconst b = block('card');\nexport const Card = React.forwardRef(function Card(props, ref) {\n const { type = 'container', theme, view, size = 'm', children, className, onClick, disabled, selected } = props, restProps = __rest(props, [\"type\", \"theme\", \"view\", \"size\", \"children\", \"className\", \"onClick\", \"disabled\", \"selected\"]);\n const isTypeAction = type === 'action';\n const isTypeSelection = type === 'selection';\n const isTypeContainer = type === 'container';\n /* Clickable card — only with type 'action' or 'selection' and not selected or disabled */\n const hasAction = isTypeAction || isTypeSelection;\n const isClickable = hasAction && Boolean(onClick) && !(disabled || selected);\n /* Theme only with type 'container' */\n const defaultTheme = isTypeContainer ? 'normal' : undefined;\n /* View only with type 'container' and 'selection' */\n const defaultView = isTypeContainer || isTypeSelection ? 'outlined' : undefined;\n const handleClick = isClickable ? onClick : undefined;\n const { onKeyDown } = useActionHandlers(onClick);\n return (React.createElement(Box, Object.assign({ ref: ref, role: isClickable ? 'button' : undefined, className: b({\n theme: theme || defaultTheme,\n view: view || defaultView,\n type,\n selected,\n size,\n disabled,\n clickable: isClickable,\n }, className), onClick: handleClick, onKeyDown: isClickable ? onKeyDown : undefined, tabIndex: isClickable ? 0 : undefined }, restProps), children));\n});\n","'use client';\nimport React from 'react';\nimport { useForkRef } from '../../hooks';\nimport { useTooltipVisible } from '../../hooks/private';\nimport { Popup } from '../Popup';\nimport { Text } from '../Text';\nimport { block } from '../utils/cn';\nimport './Tooltip.css';\nconst b = block('tooltip');\nconst DEFAULT_PLACEMENT = ['bottom', 'top'];\nexport const Tooltip = (props) => {\n const { children, content, disabled, placement = DEFAULT_PLACEMENT, qa, id, className, style, disablePortal, contentClassName, openDelay = 1000, closeDelay, } = props;\n const [anchorElement, setAnchorElement] = React.useState(null);\n const tooltipVisible = useTooltipVisible(anchorElement, {\n openDelay,\n closeDelay,\n preventTriggerOnFocus: true,\n });\n const renderPopup = () => {\n return (React.createElement(Popup, { id: id, role: \"tooltip\", className: b(null, className), style: style, open: tooltipVisible && !disabled, placement: placement, anchorRef: { current: anchorElement }, disablePortal: disablePortal, disableEscapeKeyDown: true, disableOutsideClick: true, disableLayer: true, qa: qa },\n React.createElement(\"div\", { className: b('content', contentClassName) },\n React.createElement(Text, { variant: \"body-short\", color: \"complementary\" }, content))));\n };\n const child = React.Children.only(children);\n const childRef = child.ref;\n const ref = useForkRef(setAnchorElement, childRef);\n return (React.createElement(React.Fragment, null,\n React.cloneElement(child, { ref }),\n anchorElement ? renderPopup() : null));\n};\n","import React from 'react';\nimport { KeyCode } from '../../../constants';\nimport { useBoolean } from '../useBoolean';\nexport const useTooltipVisible = (anchor, { openDelay = 250, closeDelay, preventTriggerOnFocus = false, }) => {\n const [tooltipVisible, showTooltip, hideTooltip] = useBoolean(false);\n const timeoutRef = React.useRef();\n const isFocusWithinRef = React.useRef(false);\n React.useEffect(() => {\n if (!anchor) {\n return undefined;\n }\n function handleMouseEnter() {\n clearTimeout(timeoutRef.current);\n timeoutRef.current = window.setTimeout(showTooltip, openDelay);\n }\n function handleMouseLeave() {\n clearTimeout(timeoutRef.current);\n timeoutRef.current = window.setTimeout(hideTooltip, closeDelay);\n }\n function handleFocusWithin(e) {\n if (!isFocusWithinRef.current && document.activeElement === e.target) {\n isFocusWithinRef.current = true;\n clearTimeout(timeoutRef.current);\n showTooltip();\n }\n }\n function handleBlurWithin(e) {\n if (isFocusWithinRef.current &&\n !e.currentTarget.contains(e.relatedTarget)) {\n isFocusWithinRef.current = false;\n clearTimeout(timeoutRef.current);\n hideTooltip();\n }\n }\n function handleKeyDown(e) {\n if (e.key === KeyCode.ESCAPE) {\n clearTimeout(timeoutRef.current);\n hideTooltip();\n }\n }\n anchor.addEventListener('mouseenter', handleMouseEnter);\n anchor.addEventListener('mouseleave', handleMouseLeave);\n anchor.addEventListener('keydown', handleKeyDown);\n if (!preventTriggerOnFocus) {\n anchor.addEventListener('focus', handleFocusWithin);\n anchor.addEventListener('blur', handleBlurWithin);\n }\n return () => {\n anchor.removeEventListener('mouseenter', handleMouseEnter);\n anchor.removeEventListener('mouseleave', handleMouseLeave);\n anchor.removeEventListener('focus', handleFocusWithin);\n anchor.removeEventListener('blur', handleBlurWithin);\n anchor.removeEventListener('keydown', handleKeyDown);\n };\n }, [anchor, showTooltip, hideTooltip, openDelay, closeDelay, preventTriggerOnFocus]);\n return tooltipVisible;\n};\n","import React from 'react';\nexport function useBoolean(initialState) {\n const [value, setValue] = React.useState(initialState);\n return [\n value,\n React.useCallback(() => setValue(true), []),\n React.useCallback(() => setValue(false), []),\n React.useCallback(() => setValue((val) => !val), []),\n ];\n}\n","/**\r\n * A collection of shims that provide minimal functionality of the ES6 collections.\r\n *\r\n * These implementations are not meant to be used outside of the ResizeObserver\r\n * modules as they cover only a limited range of use cases.\r\n */\r\n/* eslint-disable require-jsdoc, valid-jsdoc */\r\nvar MapShim = (function () {\r\n if (typeof Map !== 'undefined') {\r\n return Map;\r\n }\r\n /**\r\n * Returns index in provided array that matches the specified key.\r\n *\r\n * @param {Array<Array>} arr\r\n * @param {*} key\r\n * @returns {number}\r\n */\r\n function getIndex(arr, key) {\r\n var result = -1;\r\n arr.some(function (entry, index) {\r\n if (entry[0] === key) {\r\n result = index;\r\n return true;\r\n }\r\n return false;\r\n });\r\n return result;\r\n }\r\n return /** @class */ (function () {\r\n function class_1() {\r\n this.__entries__ = [];\r\n }\r\n Object.defineProperty(class_1.prototype, \"size\", {\r\n /**\r\n * @returns {boolean}\r\n */\r\n get: function () {\r\n return this.__entries__.length;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * @param {*} key\r\n * @returns {*}\r\n */\r\n class_1.prototype.get = function (key) {\r\n var index = getIndex(this.__entries__, key);\r\n var entry = this.__entries__[index];\r\n return entry && entry[1];\r\n };\r\n /**\r\n * @param {*} key\r\n * @param {*} value\r\n * @returns {void}\r\n */\r\n class_1.prototype.set = function (key, value) {\r\n var index = getIndex(this.__entries__, key);\r\n if (~index) {\r\n this.__entries__[index][1] = value;\r\n }\r\n else {\r\n this.__entries__.push([key, value]);\r\n }\r\n };\r\n /**\r\n * @param {*} key\r\n * @returns {void}\r\n */\r\n class_1.prototype.delete = function (key) {\r\n var entries = this.__entries__;\r\n var index = getIndex(entries, key);\r\n if (~index) {\r\n entries.splice(index, 1);\r\n }\r\n };\r\n /**\r\n * @param {*} key\r\n * @returns {void}\r\n */\r\n class_1.prototype.has = function (key) {\r\n return !!~getIndex(this.__entries__, key);\r\n };\r\n /**\r\n * @returns {void}\r\n */\r\n class_1.prototype.clear = function () {\r\n this.__entries__.splice(0);\r\n };\r\n /**\r\n * @param {Function} callback\r\n * @param {*} [ctx=null]\r\n * @returns {void}\r\n */\r\n class_1.prototype.forEach = function (callback, ctx) {\r\n if (ctx === void 0) { ctx = null; }\r\n for (var _i = 0, _a = this.__entries__; _i < _a.length; _i++) {\r\n var entry = _a[_i];\r\n callback.call(ctx, entry[1], entry[0]);\r\n }\r\n };\r\n return class_1;\r\n }());\r\n})();\n\n/**\r\n * Detects whether window and document objects are available in current environment.\r\n */\r\nvar isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined' && window.document === document;\n\n// Returns global object of a current environment.\r\nvar global$1 = (function () {\r\n if (typeof global !== 'undefined' && global.Math === Math) {\r\n return global;\r\n }\r\n if (typeof self !== 'undefined' && self.Math === Math) {\r\n return self;\r\n }\r\n if (typeof window !== 'undefined' && window.Math === Math) {\r\n return window;\r\n }\r\n // eslint-disable-next-line no-new-func\r\n return Function('return this')();\r\n})();\n\n/**\r\n * A shim for the requestAnimationFrame which falls back to the setTimeout if\r\n * first one is not supported.\r\n *\r\n * @returns {number} Requests' identifier.\r\n */\r\nvar requestAnimationFrame$1 = (function () {\r\n if (typeof requestAnimationFrame === 'function') {\r\n // It's required to use a bounded function because IE sometimes throws\r\n // an \"Invalid calling object\" error if rAF is invoked without the global\r\n // object on the left hand side.\r\n return requestAnimationFrame.bind(global$1);\r\n }\r\n return function (callback) { return setTimeout(function () { return callback(Date.now()); }, 1000 / 60); };\r\n})();\n\n// Defines minimum timeout before adding a trailing call.\r\nvar trailingTimeout = 2;\r\n/**\r\n * Creates a wrapper function which ensures that provided callback will be\r\n * invoked only once during the specified delay period.\r\n *\r\n * @param {Function} callback - Function to be invoked after the delay period.\r\n * @param {number} delay - Delay after which to invoke callback.\r\n * @returns {Function}\r\n */\r\nfunction throttle (callback, delay) {\r\n var leadingCall = false, trailingCall = false, lastCallTime = 0;\r\n /**\r\n * Invokes the original callback function and schedules new invocation if\r\n * the \"proxy\" was called during current request.\r\n *\r\n * @returns {void}\r\n */\r\n function resolvePending() {\r\n if (leadingCall) {\r\n leadingCall = false;\r\n callback();\r\n }\r\n if (trailingCall) {\r\n proxy();\r\n }\r\n }\r\n /**\r\n * Callback invoked after the specified delay. It will further postpone\r\n * invocation of the original function delegating it to the\r\n * requestAnimationFrame.\r\n *\r\n * @returns {void}\r\n */\r\n function timeoutCallback() {\r\n requestAnimationFrame$1(resolvePending);\r\n }\r\n /**\r\n * Schedules invocation of the original function.\r\n *\r\n * @returns {void}\r\n */\r\n function proxy() {\r\n var timeStamp = Date.now();\r\n if (leadingCall) {\r\n // Reject immediately following calls.\r\n if (timeStamp - lastCallTime < trailingTimeout) {\r\n return;\r\n }\r\n // Schedule new call to be in invoked when the pending one is resolved.\r\n // This is important for \"transitions\" which never actually start\r\n // immediately so there is a chance that we might miss one if change\r\n // happens amids the pending invocation.\r\n trailingCall = true;\r\n }\r\n else {\r\n leadingCall = true;\r\n trailingCall = false;\r\n setTimeout(timeoutCallback, delay);\r\n }\r\n lastCallTime = timeStamp;\r\n }\r\n return proxy;\r\n}\n\n// Minimum delay before invoking the update of observers.\r\nvar REFRESH_DELAY = 20;\r\n// A list of substrings of CSS properties used to find transition events that\r\n// might affect dimensions of observed elements.\r\nvar transitionKeys = ['top', 'right', 'bottom', 'left', 'width', 'height', 'size', 'weight'];\r\n// Check if MutationObserver is available.\r\nvar mutationObserverSupported = typeof MutationObserver !== 'undefined';\r\n/**\r\n * Singleton controller class which handles updates of ResizeObserver instances.\r\n */\r\nvar ResizeObserverController = /** @class */ (function () {\r\n /**\r\n * Creates a new instance of ResizeObserverController.\r\n *\r\n * @private\r\n */\r\n function ResizeObserverController() {\r\n /**\r\n * Indicates whether DOM listeners have been added.\r\n *\r\n * @private {boolean}\r\n */\r\n this.connected_ = false;\r\n /**\r\n * Tells that controller has subscribed for Mutation Events.\r\n *\r\n * @private {boolean}\r\n */\r\n this.mutationEventsAdded_ = false;\r\n /**\r\n * Keeps reference to the instance of MutationObserver.\r\n *\r\n * @private {MutationObserver}\r\n */\r\n this.mutationsObserver_ = null;\r\n /**\r\n * A list of connected observers.\r\n *\r\n * @private {Array<ResizeObserverSPI>}\r\n */\r\n this.observers_ = [];\r\n this.onTransitionEnd_ = this.onTransitionEnd_.bind(this);\r\n this.refresh = throttle(this.refresh.bind(this), REFRESH_DELAY);\r\n }\r\n /**\r\n * Adds observer to observers list.\r\n *\r\n * @param {ResizeObserverSPI} observer - Observer to be added.\r\n * @returns {void}\r\n */\r\n ResizeObserverController.prototype.addObserver = function (observer) {\r\n if (!~this.observers_.indexOf(observer)) {\r\n this.observers_.push(observer);\r\n }\r\n // Add listeners if they haven't been added yet.\r\n if (!this.connected_) {\r\n this.connect_();\r\n }\r\n };\r\n /**\r\n * Removes observer from observers list.\r\n *\r\n * @param {ResizeObserverSPI} observer - Observer to be removed.\r\n * @returns {void}\r\n */\r\n ResizeObserverController.prototype.removeObserver = function (observer) {\r\n var observers = this.observers_;\r\n var index = observers.indexOf(observer);\r\n // Remove observer if it's present in registry.\r\n if (~index) {\r\n observers.splice(index, 1);\r\n }\r\n // Remove listeners if controller has no connected observers.\r\n if (!observers.length && this.connected_) {\r\n this.disconnect_();\r\n }\r\n };\r\n /**\r\n * Invokes the update of observers. It will continue running updates insofar\r\n * it detects changes.\r\n *\r\n * @returns {void}\r\n */\r\n ResizeObserverController.prototype.refresh = function () {\r\n var changesDetected = this.updateObservers_();\r\n // Continue running updates if changes have been detected as there might\r\n // be future ones caused by CSS transitions.\r\n if (changesDetected) {\r\n this.refresh();\r\n }\r\n };\r\n /**\r\n * Updates every observer from observers list and notifies them of queued\r\n * entries.\r\n *\r\n * @private\r\n * @returns {boolean} Returns \"true\" if any observer has detected changes in\r\n * dimensions of it's elements.\r\n */\r\n ResizeObserverController.prototype.updateObservers_ = function () {\r\n // Collect observers that have active observations.\r\n var activeObservers = this.observers_.filter(function (observer) {\r\n return observer.gatherActive(), observer.hasActive();\r\n });\r\n // Deliver notifications in a separate cycle in order to avoid any\r\n // collisions between observers, e.g. when multiple instances of\r\n // ResizeObserver are tracking the same element and the callback of one\r\n // of them changes content dimensions of the observed target. Sometimes\r\n // this may result in notifications being blocked for the rest of observers.\r\n activeObservers.forEach(function (observer) { return observer.broadcastActive(); });\r\n return activeObservers.length > 0;\r\n };\r\n /**\r\n * Initializes DOM listeners.\r\n *\r\n * @private\r\n * @returns {void}\r\n */\r\n ResizeObserverController.prototype.connect_ = function () {\r\n // Do nothing if running in a non-browser environment or if listeners\r\n // have been already added.\r\n if (!isBrowser || this.connected_) {\r\n return;\r\n }\r\n // Subscription to the \"Transitionend\" event is used as a workaround for\r\n // delayed transitions. This way it's possible to capture at least the\r\n // final state of an element.\r\n document.addEventListener('transitionend', this.onTransitionEnd_);\r\n window.addEventListener('resize', this.refresh);\r\n if (mutationObserverSupported) {\r\n this.mutationsObserver_ = new MutationObserver(this.refresh);\r\n this.mutationsObserver_.observe(document, {\r\n attributes: true,\r\n childList: true,\r\n characterData: true,\r\n subtree: true\r\n });\r\n }\r\n else {\r\n document.addEventListener('DOMSubtreeModified', this.refresh);\r\n this.mutationEventsAdded_ = true;\r\n }\r\n this.connected_ = true;\r\n };\r\n /**\r\n * Removes DOM listeners.\r\n *\r\n * @private\r\n * @returns {void}\r\n */\r\n ResizeObserverController.prototype.disconnect_ = function () {\r\n // Do nothing if running in a non-browser environment or if listeners\r\n // have been already removed.\r\n if (!isBrowser || !this.connected_) {\r\n return;\r\n }\r\n document.removeEventListener('transitionend', this.onTransitionEnd_);\r\n window.removeEventListener('resize', this.refresh);\r\n if (this.mutationsObserver_) {\r\n this.mutationsObserver_.disconnect();\r\n }\r\n if (this.mutationEventsAdded_) {\r\n document.removeEventListener('DOMSubtreeModified', this.refresh);\r\n }\r\n this.mutationsObserver_ = null;\r\n this.mutationEventsAdded_ = false;\r\n this.connected_ = false;\r\n };\r\n /**\r\n * \"Transitionend\" event handler.\r\n *\r\n * @private\r\n * @param {TransitionEvent} event\r\n * @returns {void}\r\n */\r\n ResizeObserverController.prototype.onTransitionEnd_ = function (_a) {\r\n var _b = _a.propertyName, propertyName = _b === void 0 ? '' : _b;\r\n // Detect whether transition may affect dimensions of an element.\r\n var isReflowProperty = transitionKeys.some(function (key) {\r\n return !!~propertyName.indexOf(key);\r\n });\r\n if (isReflowProperty) {\r\n this.refresh();\r\n }\r\n };\r\n /**\r\n * Returns instance of the ResizeObserverController.\r\n *\r\n * @returns {ResizeObserverController}\r\n */\r\n ResizeObserverController.getInstance = function () {\r\n if (!this.instance_) {\r\n this.instance_ = new ResizeObserverController();\r\n }\r\n return this.instance_;\r\n };\r\n /**\r\n * Holds reference to the controller's instance.\r\n *\r\n * @private {ResizeObserverController}\r\n */\r\n ResizeObserverController.instance_ = null;\r\n return ResizeObserverController;\r\n}());\n\n/**\r\n * Defines non-writable/enumerable properties of the provided target object.\r\n *\r\n * @param {Object} target - Object for which to define properties.\r\n * @param {Object} props - Properties to be defined.\r\n * @returns {Object} Target object.\r\n */\r\nvar defineConfigurable = (function (target, props) {\r\n for (var _i = 0, _a = Object.keys(props); _i < _a.length; _i++) {\r\n var key = _a[_i];\r\n Object.defineProperty(target, key, {\r\n value: props[key],\r\n enumerable: false,\r\n writable: false,\r\n configurable: true\r\n });\r\n }\r\n return target;\r\n});\n\n/**\r\n * Returns the global object associated with provided element.\r\n *\r\n * @param {Object} target\r\n * @returns {Object}\r\n */\r\nvar getWindowOf = (function (target) {\r\n // Assume that the element is an instance of Node, which means that it\r\n // has the \"ownerDocument\" property from which we can retrieve a\r\n // corresponding global object.\r\n var ownerGlobal = target && target.ownerDocument && target.ownerDocument.defaultView;\r\n // Return the local global object if it's not possible extract one from\r\n // provided element.\r\n return ownerGlobal || global$1;\r\n});\n\n// Placeholder of an empty content rectangle.\r\nvar emptyRect = createRectInit(0, 0, 0, 0);\r\n/**\r\n * Converts provided string to a number.\r\n *\r\n * @param {number|string} value\r\n * @returns {number}\r\n */\r\nfunction toFloat(value) {\r\n return parseFloat(value) || 0;\r\n}\r\n/**\r\n * Extracts borders size from provided styles.\r\n *\r\n * @param {CSSStyleDeclaration} styles\r\n * @param {...string} positions - Borders positions (top, right, ...)\r\n * @returns {number}\r\n */\r\nfunction getBordersSize(styles) {\r\n var positions = [];\r\n for (var _i = 1; _i < arguments.length; _i++) {\r\n positions[_i - 1] = arguments[_i];\r\n }\r\n return positions.reduce(function (size, position) {\r\n var value = styles['border-' + position + '-width'];\r\n return size + toFloat(value);\r\n }, 0);\r\n}\r\n/**\r\n * Extracts paddings sizes from provided styles.\r\n *\r\n * @param {CSSStyleDeclaration} styles\r\n * @returns {Object} Paddings box.\r\n */\r\nfunction getPaddings(styles) {\r\n var positions = ['top', 'right', 'bottom', 'left'];\r\n var paddings = {};\r\n for (var _i = 0, positions_1 = positions; _i < positions_1.length; _i++) {\r\n var position = positions_1[_i];\r\n var value = styles['padding-' + position];\r\n paddings[position] = toFloat(value);\r\n }\r\n return paddings;\r\n}\r\n/**\r\n * Calculates content rectangle of provided SVG element.\r\n *\r\n * @param {SVGGraphicsElement} target - Element content rectangle of which needs\r\n * to be calculated.\r\n * @returns {DOMRectInit}\r\n */\r\nfunction getSVGContentRect(target) {\r\n var bbox = target.getBBox();\r\n return createRectInit(0, 0, bbox.width, bbox.height);\r\n}\r\n/**\r\n * Calculates content rectangle of provided HTMLElement.\r\n *\r\n * @param {HTMLElement} target - Element for which to calculate the content rectangle.\r\n * @returns {DOMRectInit}\r\n */\r\nfunction getHTMLElementContentRect(target) {\r\n // Client width & height properties can't be\r\n // used exclusively as they provide rounded values.\r\n var clientWidth = target.clientWidth, clientHeight = target.clientHeight;\r\n // By this condition we can catch all non-replaced inline, hidden and\r\n // detached elements. Though elements with width & height properties less\r\n // than 0.5 will be discarded as well.\r\n //\r\n // Without it we would need to implement separate methods for each of\r\n // those cases and it's not possible to perform a precise and performance\r\n // effective test for hidden elements. E.g. even jQuery's ':visible' filter\r\n // gives wrong results for elements with width & height less than 0.5.\r\n if (!clientWidth && !clientHeight) {\r\n return emptyRect;\r\n }\r\n var styles = getWindowOf(target).getComputedStyle(target);\r\n var paddings = getPaddings(styles);\r\n var horizPad = paddings.left + paddings.right;\r\n var vertPad = paddings.top + paddings.bottom;\r\n // Computed styles of width & height are being used because they are the\r\n // only dimensions available to JS that contain non-rounded values. It could\r\n // be possible to utilize the getBoundingClientRect if only it's data wasn't\r\n // affected by CSS transformations let alone paddings, borders and scroll bars.\r\n var width = toFloat(styles.width), height = toFloat(styles.height);\r\n // Width & height include paddings and borders when the 'border-box' box\r\n // model is applied (except for IE).\r\n if (styles.boxSizing === 'border-box') {\r\n // Following conditions are required to handle Internet Explorer which\r\n // doesn't include paddings and borders to computed CSS dimensions.\r\n //\r\n // We can say that if CSS dimensions + paddings are equal to the \"client\"\r\n // properties then it's either IE, and thus we don't need to subtract\r\n // anything, or an element merely doesn't have paddings/borders styles.\r\n if (Math.round(width + horizPad) !== clientWidth) {\r\n width -= getBordersSize(styles, 'left', 'right') + horizPad;\r\n }\r\n if (Math.round(height + vertPad) !== clientHeight) {\r\n height -= getBordersSize(styles, 'top', 'bottom') + vertPad;\r\n }\r\n }\r\n // Following steps can't be applied to the document's root element as its\r\n // client[Width/Height] properties represent viewport area of the window.\r\n // Besides, it's as well not necessary as the <html> itself neither has\r\n // rendered scroll bars nor it can be clipped.\r\n if (!isDocumentElement(target)) {\r\n // In some browsers (only in Firefox, actually) CSS width & height\r\n // include scroll bars size which can be removed at this step as scroll\r\n // bars are the only difference between rounded dimensions + paddings\r\n // and \"client\" properties, though that is not always true in Chrome.\r\n var vertScrollbar = Math.round(width + horizPad) - clientWidth;\r\n var horizScrollbar = Math.round(height + vertPad) - clientHeight;\r\n // Chrome has a rather weird rounding of \"client\" properties.\r\n // E.g. for an element with content width of 314.2px it sometimes gives\r\n // the client width of 315px and for the width of 314.7px it may give\r\n // 314px. And it doesn't happen all the time. So just ignore this delta\r\n // as a non-relevant.\r\n if (Math.abs(vertScrollbar) !== 1) {\r\n width -= vertScrollbar;\r\n }\r\n if (Math.abs(horizScrollbar) !== 1) {\r\n height -= horizScrollbar;\r\n }\r\n }\r\n return createRectInit(paddings.left, paddings.top, width, height);\r\n}\r\n/**\r\n * Checks whether provided element is an instance of the SVGGraphicsElement.\r\n *\r\n * @param {Element} target - Element to be checked.\r\n * @returns {boolean}\r\n */\r\nvar isSVGGraphicsElement = (function () {\r\n // Some browsers, namely IE and Edge, don't have the SVGGraphicsElement\r\n // interface.\r\n if (typeof SVGGraphicsElement !== 'undefined') {\r\n return function (target) { return target instanceof getWindowOf(target).SVGGraphicsElement; };\r\n }\r\n // If it's so, then check that element is at least an instance of the\r\n // SVGElement and that it has the \"getBBox\" method.\r\n // eslint-disable-next-line no-extra-parens\r\n return function (target) { return (target instanceof getWindowOf(target).SVGElement &&\r\n typeof target.getBBox === 'function'); };\r\n})();\r\n/**\r\n * Checks whether provided element is a document element (<html>).\r\n *\r\n * @param {Element} target - Element to be checked.\r\n * @returns {boolean}\r\n */\r\nfunction isDocumentElement(target) {\r\n return target === getWindowOf(target).document.documentElement;\r\n}\r\n/**\r\n * Calculates an appropriate content rectangle for provided html or svg element.\r\n *\r\n * @param {Element} target - Element content rectangle of which needs to be calculated.\r\n * @returns {DOMRectInit}\r\n */\r\nfunction getContentRect(target) {\r\n if (!isBrowser) {\r\n return emptyRect;\r\n }\r\n if (isSVGGraphicsElement(target)) {\r\n return getSVGContentRect(target);\r\n }\r\n return getHTMLElementContentRect(target);\r\n}\r\n/**\r\n * Creates rectangle with an interface of the DOMRectReadOnly.\r\n * Spec: https://drafts.fxtf.org/geometry/#domrectreadonly\r\n *\r\n * @param {DOMRectInit} rectInit - Object with rectangle's x/y coordinates and dimensions.\r\n * @returns {DOMRectReadOnly}\r\n */\r\nfunction createReadOnlyRect(_a) {\r\n var x = _a.x, y = _a.y, width = _a.width, height = _a.height;\r\n // If DOMRectReadOnly is available use it as a prototype for the rectangle.\r\n var Constr = typeof DOMRectReadOnly !== 'undefined' ? DOMRectReadOnly : Object;\r\n var rect = Object.create(Constr.prototype);\r\n // Rectangle's properties are not writable and non-enumerable.\r\n defineConfigurable(rect, {\r\n x: x, y: y, width: width, height: height,\r\n top: y,\r\n right: x + width,\r\n bottom: height + y,\r\n left: x\r\n });\r\n return rect;\r\n}\r\n/**\r\n * Creates DOMRectInit object based on the provided dimensions and the x/y coordinates.\r\n * Spec: https://drafts.fxtf.org/geometry/#dictdef-domrectinit\r\n *\r\n * @param {number} x - X coordinate.\r\n * @param {number} y - Y coordinate.\r\n * @param {number} width - Rectangle's width.\r\n * @param {number} height - Rectangle's height.\r\n * @returns {DOMRectInit}\r\n */\r\nfunction createRectInit(x, y, width, height) {\r\n return { x: x, y: y, width: width, height: height };\r\n}\n\n/**\r\n * Class that is responsible for computations of the content rectangle of\r\n * provided DOM element and for keeping track of it's changes.\r\n */\r\nvar ResizeObservation = /** @class */ (function () {\r\n /**\r\n * Creates an instance of ResizeObservation.\r\n *\r\n * @param {Element} target - Element to be observed.\r\n */\r\n function ResizeObservation(target) {\r\n /**\r\n * Broadcasted width of content rectangle.\r\n *\r\n * @type {number}\r\n */\r\n this.broadcastWidth = 0;\r\n /**\r\n * Broadcasted height of content rectangle.\r\n *\r\n * @type {number}\r\n */\r\n this.broadcastHeight = 0;\r\n /**\r\n * Reference to the last observed content rectangle.\r\n *\r\n * @private {DOMRectInit}\r\n */\r\n this.contentRect_ = createRectInit(0, 0, 0, 0);\r\n this.target = target;\r\n }\r\n /**\r\n * Updates content rectangle and tells whether it's width or height properties\r\n * have changed since the last broadcast.\r\n *\r\n * @returns {boolean}\r\n */\r\n ResizeObservation.prototype.isActive = function () {\r\n var rect = getContentRect(this.target);\r\n this.contentRect_ = rect;\r\n return (rect.width !== this.broadcastWidth ||\r\n rect.height !== this.broadcastHeight);\r\n };\r\n /**\r\n * Updates 'broadcastWidth' and 'broadcastHeight' properties with a data\r\n * from the corresponding properties of the last observed content rectangle.\r\n *\r\n * @returns {DOMRectInit} Last observed content rectangle.\r\n */\r\n ResizeObservation.prototype.broadcastRect = function () {\r\n var rect = this.contentRect_;\r\n this.broadcastWidth = rect.width;\r\n this.broadcastHeight = rect.height;\r\n return rect;\r\n };\r\n return ResizeObservation;\r\n}());\n\nvar ResizeObserverEntry = /** @class */ (function () {\r\n /**\r\n * Creates an instance of ResizeObserverEntry.\r\n *\r\n * @param {Element} target - Element that is being observed.\r\n * @param {DOMRectInit} rectInit - Data of the element's content rectangle.\r\n */\r\n function ResizeObserverEntry(target, rectInit) {\r\n var contentRect = createReadOnlyRect(rectInit);\r\n // According to the specification following properties are not writable\r\n // and are also not enumerable in the native implementation.\r\n //\r\n // Property accessors are not being used as they'd require to define a\r\n // private WeakMap storage which may cause memory leaks in browsers that\r\n // don't support this type of collections.\r\n defineConfigurable(this, { target: target, contentRect: contentRect });\r\n }\r\n return ResizeObserverEntry;\r\n}());\n\nvar ResizeObserverSPI = /** @class */ (function () {\r\n /**\r\n * Creates a new instance of ResizeObserver.\r\n *\r\n * @param {ResizeObserverCallback} callback - Callback function that is invoked\r\n * when one of the observed elements changes it's content dimensions.\r\n * @param {ResizeObserverController} controller - Controller instance which\r\n * is responsible for the updates of observer.\r\n * @param {ResizeObserver} callbackCtx - Reference to the public\r\n * ResizeObserver instance which will be passed to callback function.\r\n */\r\n function ResizeObserverSPI(callback, controller, callbackCtx) {\r\n /**\r\n * Collection of resize observations that have detected changes in dimensions\r\n * of elements.\r\n *\r\n * @private {Array<ResizeObservation>}\r\n */\r\n this.activeObservations_ = [];\r\n /**\r\n * Registry of the ResizeObservation instances.\r\n *\r\n * @private {Map<Element, ResizeObservation>}\r\n */\r\n this.observations_ = new MapShim();\r\n if (typeof callback !== 'function') {\r\n throw new TypeError('The callback provided as parameter 1 is not a function.');\r\n }\r\n this.callback_ = callback;\r\n this.controller_ = controller;\r\n this.callbackCtx_ = callbackCtx;\r\n }\r\n /**\r\n * Starts observing provided element.\r\n *\r\n * @param {Element} target - Element to be observed.\r\n * @returns {void}\r\n */\r\n ResizeObserverSPI.prototype.observe = function (target) {\r\n if (!arguments.length) {\r\n throw new TypeError('1 argument required, but only 0 present.');\r\n }\r\n // Do nothing if current environment doesn't have the Element interface.\r\n if (typeof Element === 'undefined' || !(Element instanceof Object)) {\r\n return;\r\n }\r\n if (!(target instanceof getWindowOf(target).Element)) {\r\n throw new TypeError('parameter 1 is not of type \"Element\".');\r\n }\r\n var observations = this.observations_;\r\n // Do nothing if element is already being observed.\r\n if (observations.has(target)) {\r\n return;\r\n }\r\n observations.set(target, new ResizeObservation(target));\r\n this.controller_.addObserver(this);\r\n // Force the update of observations.\r\n this.controller_.refresh();\r\n };\r\n /**\r\n * Stops observing provided element.\r\n *\r\n * @param {Element} target - Element to stop observing.\r\n * @returns {void}\r\n */\r\n ResizeObserverSPI.prototype.unobserve = function (target) {\r\n if (!arguments.length) {\r\n throw new TypeError('1 argument required, but only 0 present.');\r\n }\r\n // Do nothing if current environment doesn't have the Element interface.\r\n if (typeof Element === 'undefined' || !(Element instanceof Object)) {\r\n return;\r\n }\r\n if (!(target instanceof getWindowOf(target).Element)) {\r\n throw new TypeError('parameter 1 is not of type \"Element\".');\r\n }\r\n var observations = this.observations_;\r\n // Do nothing if element is not being observed.\r\n if (!observations.has(target)) {\r\n return;\r\n }\r\n observations.delete(target);\r\n if (!observations.size) {\r\n this.controller_.removeObserver(this);\r\n }\r\n };\r\n /**\r\n * Stops observing all elements.\r\n *\r\n * @returns {void}\r\n */\r\n ResizeObserverSPI.prototype.disconnect = function () {\r\n this.clearActive();\r\n this.observations_.clear();\r\n this.controller_.removeObserver(this);\r\n };\r\n /**\r\n * Collects observation instances the associated element of which has changed\r\n * it's content rectangle.\r\n *\r\n * @returns {void}\r\n */\r\n ResizeObserverSPI.prototype.gatherActive = function () {\r\n var _this = this;\r\n this.clearActive();\r\n this.observations_.forEach(function (observation) {\r\n if (observation.isActive()) {\r\n _this.activeObservations_.push(observation);\r\n }\r\n });\r\n };\r\n /**\r\n * Invokes initial callback function with a list of ResizeObserverEntry\r\n * instances collected from active resize observations.\r\n *\r\n * @returns {void}\r\n */\r\n ResizeObserverSPI.prototype.broadcastActive = function () {\r\n // Do nothing if observer doesn't have active observations.\r\n if (!this.hasActive()) {\r\n return;\r\n }\r\n var ctx = this.callbackCtx_;\r\n // Create ResizeObserverEntry instance for every active observation.\r\n var entries = this.activeObservations_.map(function (observation) {\r\n return new ResizeObserverEntry(observation.target, observation.broadcastRect());\r\n });\r\n this.callback_.call(ctx, entries, ctx);\r\n this.clearActive();\r\n };\r\n /**\r\n * Clears the collection of active observations.\r\n *\r\n * @returns {void}\r\n */\r\n ResizeObserverSPI.prototype.clearActive = function () {\r\n this.activeObservations_.splice(0);\r\n };\r\n /**\r\n * Tells whether observer has active observations.\r\n *\r\n * @returns {boolean}\r\n */\r\n ResizeObserverSPI.prototype.hasActive = function () {\r\n return this.activeObservations_.length > 0;\r\n };\r\n return ResizeObserverSPI;\r\n}());\n\n// Registry of internal observers. If WeakMap is not available use current shim\r\n// for the Map collection as it has all required methods and because WeakMap\r\n// can't be fully polyfilled anyway.\r\nvar observers = typeof WeakMap !== 'undefined' ? new WeakMap() : new MapShim();\r\n/**\r\n * ResizeObserver API. Encapsulates the ResizeObserver SPI implementation\r\n * exposing only those methods and properties that are defined in the spec.\r\n */\r\nvar ResizeObserver = /** @class */ (function () {\r\n /**\r\n * Creates a new instance of ResizeObserver.\r\n *\r\n * @param {ResizeObserverCallback} callback - Callback that is invoked when\r\n * dimensions of the observed elements change.\r\n */\r\n function ResizeObserver(callback) {\r\n if (!(this instanceof ResizeObserver)) {\r\n throw new TypeError('Cannot call a class as a function.');\r\n }\r\n if (!arguments.length) {\r\n throw new TypeError('1 argument required, but only 0 present.');\r\n }\r\n var controller = ResizeObserverController.getInstance();\r\n var observer = new ResizeObserverSPI(callback, controller, this);\r\n observers.set(this, observer);\r\n }\r\n return ResizeObserver;\r\n}());\r\n// Expose public methods of ResizeObserver.\r\n[\r\n 'observe',\r\n 'unobserve',\r\n 'disconnect'\r\n].forEach(function (method) {\r\n ResizeObserver.prototype[method] = function () {\r\n var _a;\r\n return (_a = observers.get(this))[method].apply(_a, arguments);\r\n };\r\n});\n\nvar index = (function () {\r\n // Export existing implementation if available.\r\n if (typeof global$1.ResizeObserver !== 'undefined') {\r\n return global$1.ResizeObserver;\r\n }\r\n return ResizeObserver;\r\n})();\n\nexport default index;\n"],"names":["block","cn","prepareRoleListValue","roles","otherMembers","arguments","length","undefined","current","toAdd","toRemove","unrecognized","forEach_","item","isUnrecognized","isRequested","isApproved","isDepriving","push","currentArr","map","prepareItemOfCurrent","otherArr","title","data","frozen","newItems","concat","itemClassName","role","extraProps","_objectSpread","text","value","roleListValueToSubjectList","_toConsumableArray","manyListDataItemToSubjectList","manyListDataItem","map_","filter_","_ref2","removed","_ref3","_ref4","type","extractChangedSubjects","added","filter","_ref5","_ref6","user","group","_ref7","_ref8","DialogError","props","_jsx","Block","className","makeErrorFields","errors","compact_","error","index","name","extras","children","FORM_ERROR","makeFormSubmitError","validationErrors","_defineProperty","importYTDFDialog","Component","YTDFDialog","withLazyLoading","React","_asyncToGenerator","_regeneratorRuntime","_callee","_context","prev","next","t0","sent","YTDialog","abrupt","stop","_React$useState","_React$useState2","_slicedToArray","mounted","setMounted","visible","_callee2","_context2","RoleListControl","EditableList","_callee3","_context3","TabFieldVertical","_callee4","_context4","STRUCT_TYPE","LIST_TYPE","STREAM_TYPE","TUPLE_TYPE","DICT_TYPE","DATA_TYPE","VARIANT_TYPE","OPTIONAL_TYPE","TAGGED_TYPE","VOID_TYPE","NULL_TYPE","EMPTY_DICT_TYPE","EMPTY_LIST_TYPE","PG_TYPE","notSimpleDataTypes","numericDataTypes","dateTimeDataTypes","stringDataTypes","isDataTypeNumeric","dataType","indexOf","isDataTypeDateTime","isDataTypeString","getType","typeArray","simple","numeric","dateTime","string","params","slice","optional","optionalLevel","setOptional","typeTag","tagged","tags","setTag","complex","struct","field","key","variantType","Error","getVariantType","every","null","typeName","startsWith","parseV3Type","initialType","primitiveTypes","ysonTypeToYql","ysonType","typesMap","has","capitalize_","stringToYql","type_name","precision","scale","decimalToYql","tupleToYql","structToYql","tag","objectToYql","elements","_ref","members","typedMemo","ErrorBoundary","constructor","super","this","state","resetError","setState","getDerivedStateFromError","componentDidCatch","_a","_b","onError","call","componentDidUpdate","prevProps","code","NO_DATA","render","message","i18n","toString","getErrorMessage","renderError","b","renderPluginLoader","pluginLoader","Object","assign","ChartKitComponent","widgetRef","instanceRef","id","propsId","isMobile","restProps","ckId","lang","settings","get","plugin","find","iteratedPlugin","UNKNOWN_PLUGIN","ChartComponent","renderer","reflow","details","fallback","mobile","ref","YagrPlugin","set","plugins","COLORS","getSerieColor","serieIndex","getPointValue","$type","Number","$value","$rawValue","splitDataByColor","rows","colorFieldName","xFieldName","yFieldName","xFieldPath","colorFieldPath","transform_","groupBy_","result","acc","y","x","point","Array","isArray","getVisualizationPlaceholders","visualization","placeholders","reduce","placeholder","xPlaceholder","yPlaceholder","colorPlaceholder","prepareWidgetData","args","d3Config","visualizationId","chartSettings","xAxisIsLegendEnabled","xAxis","legend","xAxisEnableLabels","labels","xAxisTitle","xAxisPixelInterval","pixelInterval","yAxisEnableLabels","yAxis","yAxisTitle","yAxisGridEnabled","grid","yAxisPixelInterval","tooltip","enabled","ticks","lineColor","series","options","barMaxWidth","barPadding","groupPadding","dataSorting","direction","line","lineWidth","chart","margin","top","left","right","bottom","buildD3Config","_getVisualizationPlac","fields","xField","yFields","yField","colorField","row","prepareScatter","stacking","categories","uniq_","prepareColoredSeriesData","xValues","dataMatrix","forEach","xValue","from","Set","graphs","_result$graphs","graph","String","prepareSeriesData","prepareBar","merge_","selectQueryResultAllVisualizations","queryResultsVisualization","visualizations","selectQueryResultVisualization","resultIndex","selectQueryResultVisualizationPlaceholders","selectQueryResultVisualizationId","selectQueryResultChartSettings","selectQueryResultIndex","selectQueryResultChartSaved","saved","selectQueryId","_state$queryResultsVi","query","selectQueryResult","queryResults","selectAvailableFields","keys","resultsPlaceholdersValidation","createSelector","queryResult","_placeholders$find","Boolean","fieldName","get_","invalid","hashes","some","newObject","lineHash","objectHash","isLineDuplicated","colorsValidation","scatterValidation","lineAndBarValidation","ret","fieldType","isPointsDuplicated","yValue","hash","isPointDuplicated","xCoords","isXValueDuplicated","selectIsPlaceholdersMissSomeFields","placeholdersMap","refreshClick","_jsxs","Button","view","onClick","ChartErrorHandler","deps","_useState","useState","_useState2","setError","useEffect","handleError","ChartErrorBoundary","_React$Component","_inherits","_super","_createSuper","_this","_classCallCheck","handleRefreshClick","_createClass","EmptyPlaceholdersMessage","D3Plugin","BaseChart","useSelector","isPlaceholdersMissSomeFields","widgetData","useMemo","ChartKit","Chart","xmlns","width","height","fill","viewBox","fillRule","d","clipRule","PlaceholderComponent","availableFields","dispatch","useThunkDispatch","addField","placeholderId","removeField","onSelectUpdate","Select","filterable","content","onUpdate","renderControl","Icon","PlusIcon","size","bind","XmarkIcon","PlaceholdersContainer","debouncedSaveQueryChartConfig","debounce_","payload","promise","ytApiV4Id","alterQuery","YTApiId","parameters","query_id","queryId","annotations","ui_chart_config","then","wrapApiPromiseByToaster","toasterName","skipSuccessToast","errorContent","QueryResultSelect","resultCount","i","useCallback","pixelIntervalValidator","test","caption","label","validator","ChartSettingsComponent","setVisilbility","handleOnOpen","handleOnClose","handleOnAdd","form","getState","values","Promise","resolve","Gear","initialValues","onClose","onAdd","VisualizationSelector","SavingIndicator","tooltipContent","Tooltip","CircleCheck","ArrowsRotateRight","Msg","dangerouslySetInnerHTML","__html","ALERT_PROPS","theme","icon","ChartValidation","_placeholdersValidati","_placeholdersValidati2","isErrorHidden","hideError","placeholdersValidation","showSmallAlert","_Fragment","Alert","actions","Actions","QueryResultsVisualization","_containerRef$current","containerRef","chartKitRef","allVisualizations","useDispatch","meta","typeMap","scheme","columns","types","getQueryResultMeta","getPrimitiveTypesMap","thorYPath","getValue","schema","typeV3","type_v3","displayName","getQueryResultGlobalSettings","readQueryResults","start","end","Infinity","cellsSize","cellSize","yql_type_registry","v","entries","k","_ref6$","typeIndex","prepareFormattedValue","_x","_x2","apply","newbiusLoadQueryResults","debouncedChartResize","throttle_","_chartKitRef$current","element","onResize","observer","ResizeObserver","observe","unobserve","useResizeObserver","result_count","Loader","defaultSettings","escapeWhitespace","decodeUTF8","binaryAsHex","escapeYQLStrings","omitStructNull","maxListSize","maxStringSize","treatValAsData","convert","unipika","converters","yql","valueStr","console","log","JSON","stringify","_unused","format","formatResults","_unused2","maxFormattedLength","convertedValue","fullValue","formatValue","$tag","node","href","asHTML","$formattedValue","$fullFormattedValue","getSupportedFeaturesRaw","supportedFeatures","features","RECOMMENDED_COMPRESSION_CODECS","lz4","zstd_","zlib_","brotli_","lzma_","RECOMMENDED","getSupportedFeatures","getCluster","featuresCluster","cluster","getErasureCodecs","erasure_codecs","sort","compareItems","getPrimitiveTypes","sortBy_","primitive_types","getCompressionCodecs","_step","arr","res","items","subItemsMap","_iterator","_createForOfIteratorHelper","s","n","done","parts","split","_parts","_toArray","first","rest","dst","subValue","join","err","e","f","subItems","findIndex","recommended","subItems2","last","prepareItemsSubitems","compression_codecs","makeCompressionCodecFinder","codec","find_","_codec$split","_codec$split2","l","r","getOperationStatisticsDescription","operation_statistics_descriptions","byName","byRegexp","tmp","replace","regexp","RegExp","i18nFactory","registerKeysets","CHARTKIT_ERROR_CODE","INVALID_DATA","UNKNOWN","TOO_MANY_LINES","ChartKitError","originalError","isCustomError","stack","mergeSettingStrategy","objValue","srcValue","currentPlugins","newPlugins","newSettingsPlugins","currentPlugin","newPluginIndex","newPlugin","splice","settingsEventEmitter","events","on","event","off","eventId","action","updateLang","configure","setLang","updates","filteredUpdates","withNaming","m","getRandomCKId","chars","Math","floor","random","randomString","clipPath","AlertContext","useAlertContext","context","AlertAction","bAlert","AlertContextProvider","layout","Provider","typeToIcon","danger","filled","outlined","info","CircleInfo","success","warning","TriangleExclamation","utility","Thunderbolt","normal","addComponentKeysets","en","corners","style","align","qa","Card","spacing","py","px","Flex","gap","alignItems","grow","justifyContent","Title","I","Xmark","colorText","color","iconByTheme","Text","variant","minContent","wrap","handler","Action","disabled","selected","isTypeSelection","isTypeContainer","isClickable","defaultTheme","defaultView","handleClick","onKeyDown","useActionHandlers","Box","clickable","tabIndex","DEFAULT_PLACEMENT","placement","disablePortal","contentClassName","openDelay","closeDelay","anchorElement","setAnchorElement","tooltipVisible","useTooltipVisible","preventTriggerOnFocus","child","only","childRef","useForkRef","Popup","open","anchorRef","disableEscapeKeyDown","disableOutsideClick","disableLayer","anchor","showTooltip","hideTooltip","initialState","setValue","val","useBoolean","timeoutRef","isFocusWithinRef","addEventListener","handleMouseEnter","handleMouseLeave","handleKeyDown","handleFocusWithin","handleBlurWithin","removeEventListener","clearTimeout","window","setTimeout","document","activeElement","target","currentTarget","contains","relatedTarget","ESCAPE","MapShim","Map","getIndex","entry","class_1","__entries__","defineProperty","prototype","enumerable","configurable","delete","clear","callback","ctx","_i","isBrowser","global$1","g","self","Function","requestAnimationFrame$1","requestAnimationFrame","Date","now","transitionKeys","mutationObserverSupported","MutationObserver","ResizeObserverController","connected_","mutationEventsAdded_","mutationsObserver_","observers_","onTransitionEnd_","refresh","delay","leadingCall","trailingCall","lastCallTime","resolvePending","proxy","timeoutCallback","timeStamp","throttle","addObserver","connect_","removeObserver","observers","disconnect_","updateObservers_","activeObservers","gatherActive","hasActive","broadcastActive","attributes","childList","characterData","subtree","disconnect","propertyName","getInstance","instance_","defineConfigurable","writable","getWindowOf","ownerDocument","emptyRect","createRectInit","toFloat","parseFloat","getBordersSize","styles","positions","position","isSVGGraphicsElement","SVGGraphicsElement","SVGElement","getBBox","getContentRect","bbox","getSVGContentRect","clientWidth","clientHeight","getComputedStyle","paddings","positions_1","getPaddings","horizPad","vertPad","boxSizing","round","documentElement","isDocumentElement","vertScrollbar","horizScrollbar","abs","getHTMLElementContentRect","ResizeObservation","broadcastWidth","broadcastHeight","contentRect_","isActive","rect","broadcastRect","ResizeObserverEntry","rectInit","Constr","contentRect","DOMRectReadOnly","create","ResizeObserverSPI","controller","callbackCtx","activeObservations_","observations_","TypeError","callback_","controller_","callbackCtx_","Element","observations","clearActive","observation","WeakMap","method"],"sourceRoot":""}
|
1
|
+
{"version":3,"file":"js/query-results.4c207fef.chunk.js","mappings":"2PAWaA,GAAQC,EAAAA,EAAAA,GAAG,qBAEjB,SAASC,EAAqBC,GAA+D,IAAnCC,EAA2BC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAG,GACrFG,EAAwB,GACxBC,EAAsB,GACtBC,EAAyB,GACzBC,EAA6B,GACnCC,IAAST,GAAO,SAACU,GACb,IAAOC,EAAwDD,EA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EAAoBkB,EAAY9H,OAAQ8H,EAAYnB,gBACnE,IACArsB,KAAKktB,UAAUzsB,KAAKmmB,EAAKxR,EAASwR,GAClC5mB,KAAKutB,aAPL,CAQJ,EAMAX,EAAkBtG,UAAUiH,YAAc,WACtCvtB,KAAK+sB,oBAAoBjP,OAAO,EACpC,EAMA8O,EAAkBtG,UAAU4C,UAAY,WACpC,OAAOlpB,KAAK+sB,oBAAoBx3B,OAAS,CAC7C,EACOq3B,CACX,CAnJsC,GAwJlC/D,EAA+B,oBAAZ4E,QAA0B,IAAIA,QAAY,IAAI1H,EAKjE5P,EAOA,SAASA,EAAewQ,GACpB,KAAM3mB,gBAAgBmW,GAClB,MAAM,IAAI8W,UAAU,sCAExB,IAAK33B,UAAUC,OACX,MAAM,IAAI03B,UAAU,4CAExB,IAAIJ,EAAanF,EAAyBgC,cACtCxT,EAAW,IAAI0W,EAAkBjG,EAAUkG,EAAY7sB,MAC3D6oB,EAAU7lB,IAAIhD,KAAMkW,EACxB,EAIJ,CACI,UACA,YACA,cACF3N,SAAQ,SAAUmlB,GAChBvX,EAAemQ,UAAUoH,GAAU,WAC/B,IAAIptB,EACJ,OAAQA,EAAKuoB,EAAU1mB,IAAInC,OAAO0tB,GAAQ/X,MAAMrV,EAAIhL,UACxD,CACJ,IAUA,aAN2C,IAA5ByxB,EAAS5Q,eACT4Q,EAAS5Q,eAEbA,C","sources":["webpack://@ytsaurus/ui/./src/ui/components/Dialog/controls/RoleListControl/utils.ts","webpack://@ytsaurus/ui/./src/ui/components/Dialog/DialogError.tsx","webpack://@ytsaurus/ui/./src/ui/components/Dialog/index.tsx","webpack://@ytsaurus/ui/./src/ui/hocs/withDelayedMount.tsx","webpack://@ytsaurus/ui/./src/ui/components/SchemaDataType/dataTypes.ts","webpack://@ytsaurus/ui/./src/ui/components/SchemaDataType/dateTypesV3.ts","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/chartkit/build/utils/react.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/chartkit/build/components/ErrorBoundary/ErrorBoundary.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/chartkit/build/utils/getErrorMessage.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/chartkit/build/components/Loader/Loader.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/chartkit/build/components/ChartKit.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/chartkit/build/index.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/chartkit/build/plugins/yagr/index.js","webpack://@ytsaurus/ui/./src/ui/components/YagrChartKit/YagrChartKit.tsx","webpack://@ytsaurus/ui/./src/ui/pages/query-tracker/QueryResultsVisualization/preparers/getPointData.ts","webpack://@ytsaurus/ui/./src/ui/pages/query-tracker/QueryResultsVisualization/preparers/splitDataByColor.ts","webpack://@ytsaurus/ui/./src/ui/pages/query-tracker/QueryResultsVisualization/preparers/utils.ts","webpack://@ytsaurus/ui/./src/ui/pages/query-tracker/QueryResultsVisualization/preparers/prepareWidgetData.ts","webpack://@ytsaurus/ui/./src/ui/pages/query-tracker/QueryResultsVisualization/preparers/d3config.ts","webpack://@ytsaurus/ui/./src/ui/pages/query-tracker/QueryResultsVisualization/preparers/scatter.ts","webpack://@ytsaurus/ui/./src/ui/pages/query-tracker/QueryResultsVisualization/preparers/bar.ts","webpack://@ytsaurus/ui/./src/ui/pages/query-tracker/QueryResultsVisualization/store/selectors.ts","webpack://@ytsaurus/ui/./src/ui/pages/query-tracker/QueryResultsVisualization/components/ChartErrorBoundary/ChartErrorBoundary.tsx","webpack://@ytsaurus/ui/./src/ui/pages/query-tracker/QueryResultsVisualization/components/EmptyPlaceholdersMessage/EmptyPlaceholdersMessage.tsx","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/chartkit/build/plugins/d3/index.js","webpack://@ytsaurus/ui/./src/ui/pages/query-tracker/QueryResultsVisualization/containers/Chart/Chart.tsx","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/icons/esm/Plus.js","webpack://@ytsaurus/ui/./src/ui/pages/query-tracker/QueryResultsVisualization/containers/PlaceholdersContainer/Placeholder/Placeholder.tsx","webpack://@ytsaurus/ui/./src/ui/pages/query-tracker/QueryResultsVisualization/containers/PlaceholdersContainer/PlaceholdersContainer.tsx","webpack://@ytsaurus/ui/./src/ui/pages/query-tracker/QueryResultsVisualization/store/actions.ts","webpack://@ytsaurus/ui/./src/ui/pages/query-tracker/QueryResultsVisualization/containers/VisualizationSelect/VisualizationSelect.tsx","webpack://@ytsaurus/ui/./src/ui/pages/query-tracker/QueryResultsVisualization/containers/ChartSettings/ChartSettings.tsx","webpack://@ytsaurus/ui/./src/ui/pages/query-tracker/QueryResultsVisualization/containers/VisualizationSelector/VisualizationSelector.tsx","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/icons/esm/ArrowsRotateRight.js","webpack://@ytsaurus/ui/./src/ui/pages/query-tracker/QueryResultsVisualization/containers/SavingIndicator/SavingIndicator.tsx","webpack://@ytsaurus/ui/./src/ui/pages/query-tracker/QueryResultsVisualization/containers/ChartValidation/ChartValidation.tsx","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/icons/esm/CircleExclamation.js","webpack://@ytsaurus/ui/./src/ui/pages/query-tracker/QueryResultsVisualization/containers/QueryResultsVisualization/QueryResultsVisualization.tsx","webpack://@ytsaurus/ui/./src/ui/hooks/useResizeObserver.tsx","webpack://@ytsaurus/ui/./src/ui/pages/query-tracker/module/query_result/utils/format.ts","webpack://@ytsaurus/ui/./src/ui/store/selectors/global/supported-features.ts","webpack://@ytsaurus/ui/./src/ui/store/thunkDispatch.ts","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/chartkit/build/i18n/index.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/chartkit/build/libs/chartkit-error/chartkit-error.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/chartkit/build/libs/settings/mergeSettingStrategy.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/chartkit/build/libs/settings/settings.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/chartkit/build/libs/settings/eventEmitter.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/chartkit/build/utils/cn.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/chartkit/build/utils/common.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/icons/esm/Gear.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/uikit/build/esm/components/Alert/AlertContext.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/uikit/build/esm/components/Alert/useAlertContext.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/uikit/build/esm/components/Alert/AlertAction.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/uikit/build/esm/components/Alert/constants.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/uikit/build/esm/components/Alert/AlertContextProvider.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/uikit/build/esm/components/Alert/AlertIcon.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/icons/esm/CircleXmarkFill.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/icons/esm/CircleXmark.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/icons/esm/CircleInfoFill.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/icons/esm/CircleCheckFill.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/icons/esm/TriangleExclamationFill.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/icons/esm/ThunderboltFill.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/uikit/build/esm/components/Alert/i18n/index.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/uikit/build/esm/components/Alert/Alert.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/uikit/build/esm/components/Alert/AlertTitle.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/uikit/build/esm/components/Alert/AlertActions.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/uikit/build/esm/components/Card/Card.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/uikit/build/esm/components/Tooltip/Tooltip.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/uikit/build/esm/hooks/private/useTooltipVisible/index.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/uikit/build/esm/hooks/private/useBoolean/useBoolean.js","webpack://@ytsaurus/ui/./node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js"],"sourcesContent":["import cn from 'bem-cn-lite';\n\nimport filter_ from 'lodash/filter';\nimport forEach_ from 'lodash/forEach';\nimport map_ from 'lodash/map';\n\nimport type {EditableManyListsItemType} from '../../../../components/Dialog';\nimport type {ResponsibleType, RoleConverted} from '../../../../utils/acl/acl-types';\nimport type {PreparedRole} from '../../../../utils/acl';\nimport {RoleListControlProps} from './RoleListControl';\n\nexport const block = cn('role-list-control');\n\nexport function prepareRoleListValue(roles: Array<PreparedRole>, otherMembers: Array<string> = []) {\n const current: typeof roles = [];\n const toAdd: typeof roles = [];\n const toRemove: typeof roles = [];\n const unrecognized: typeof roles = [];\n forEach_(roles, (item) => {\n const {isUnrecognized, isRequested, isApproved, isDepriving} = item;\n if (isUnrecognized) {\n unrecognized.push(item);\n } else if (isDepriving) {\n toRemove.push(item);\n } else if (isApproved || isRequested) {\n toAdd.push(item);\n } else {\n current.push(item);\n }\n });\n\n const currentArr = current.map((item) => prepareItemOfCurrent(item));\n const otherArr = otherMembers.map((item) => ({\n title: item,\n data: {},\n frozen: true,\n }));\n\n return {\n newItems: [],\n current: {title: 'Current', data: currentArr.concat(otherArr)},\n toAdd: {\n title: 'Will be added',\n itemClassName: block('item-to-add'),\n data: toAdd.map((item) => prepareItemOfCurrent(item, {frozen: true})),\n },\n toRemove: {\n title: 'Will be removed',\n itemClassName: block('item-to-remove'),\n data: toRemove.map((item) => prepareItemOfCurrent(item, {frozen: true})),\n },\n unrecognized: {\n title: 'Unrecognized',\n itemClassName: block('item-unrecognized'),\n data: unrecognized.map((item) => prepareItemOfCurrent(item, {frozen: true})),\n },\n };\n}\n\nfunction prepareItemOfCurrent(role: PreparedRole, extraProps: any = {}) {\n return {\n title: role.text || role.value,\n data: role,\n ...extraProps,\n };\n}\n\nexport function roleListValueToSubjectList(\n value: RoleListControlProps['value'],\n): Array<ResponsibleType> {\n const {current, newItems, toAdd} = value;\n return [\n ...newItems,\n ...manyListDataItemToSubjectList(current),\n ...manyListDataItemToSubjectList(toAdd),\n ];\n}\n\nfunction manyListDataItemToSubjectList(\n manyListDataItem: EditableManyListsItemType<RoleConverted>,\n): Array<ResponsibleType> {\n const {data} = manyListDataItem || {};\n return map_(\n filter_(data, ({removed}) => !removed),\n ({data}) => {\n const {type, value} = data || {};\n return {type: type!, value: value!};\n },\n );\n}\n\nexport function extractChangedSubjects(value: {\n current: EditableManyListsItemType<RoleConverted>;\n newItems: Array<ResponsibleType>;\n}) {\n const {current, newItems} = value;\n const added = newItems || [];\n const removed = ((current && current.data) || []).filter(({removed}) => removed);\n return {\n added: added.map(({type, value}) => {\n return type === 'users' ? {user: value} : {group: value};\n }),\n removed: removed.map(({data}) => {\n const {value, type} = data || {};\n return type === 'users' ? {user: value} : {group: value};\n }),\n };\n}\n","import React from 'react';\nimport cn from 'bem-cn-lite';\n\nimport type {FORM_ERROR as FormErrorType} from './index';\n\nimport {FIX_MY_TYPE, YTError} from '../../types';\nimport Block from '../../components/Block/Block';\n\nimport compact_ from 'lodash/compact';\nimport map_ from 'lodash/map';\n\nconst block = cn('yt-dialog-error');\n\nexport function DialogError(props: FIX_MY_TYPE) {\n return <Block {...props} className={block()} />;\n}\n\nexport function makeErrorFields(errors: Array<YTError | Error | undefined>) {\n return compact_(\n map_(errors, (error, index) => {\n return error\n ? {\n name: `error_${index}`,\n type: 'block' as const,\n extras: {\n children: <DialogError error={error} />,\n },\n }\n : undefined;\n }),\n );\n}\n\nconst FORM_ERROR: typeof FormErrorType = 'FINAL_FORM/form-error';\n\nexport function makeFormSubmitError(error: YTError) {\n return {\n validationErrors: {\n [FORM_ERROR]: <DialogError error={error} />,\n },\n };\n}\n","import React from 'react';\nimport withLazyLoading from '../../hocs/withLazyLoading';\nimport {withDelayedMount} from '../../hocs/withDelayedMount';\n\nimport type {\n registerDialogControl as RegisterDialogControlFn,\n registerDialogTabControl as RegisterDialogTabControlFn,\n YTDialogType,\n} from './Dialog';\n\nexport type * from './Dialog';\nexport * from './DialogError';\nexport * from './controls/RoleListControl/utils';\n\nexport function importYTDFDialog() {\n return import(/* webpackChunkName: \"yt-df-dialog\" */ './Dialog');\n}\n\nexport const YTDFDialog = withDelayedMount(\n withLazyLoading(\n React.lazy(async () => {\n return {default: (await importYTDFDialog()).YTDialog};\n }),\n '',\n ),\n) as YTDialogType;\n\nexport function useControlRegistration(\n fn: (params: {\n registerDialogControl: typeof RegisterDialogControlFn;\n registerDialogTabControl: typeof RegisterDialogTabControlFn;\n }) => void,\n) {\n importYTDFDialog().then(({registerDialogControl, registerDialogTabControl}) => {\n fn({registerDialogControl, registerDialogTabControl});\n });\n}\n\nexport type {RoleListControlProps} from './controls/RoleListControl/RoleListControl';\nexport const RoleListControl = withLazyLoading(\n React.lazy(async () => {\n return {default: (await importYTDFDialog()).RoleListControl};\n }),\n '',\n);\n\nexport const EditableList = withLazyLoading(\n React.lazy(async () => {\n return {default: (await importYTDFDialog()).EditableList};\n }),\n '',\n);\n\nexport const TabFieldVertical = withLazyLoading(\n React.lazy(async () => {\n return {default: (await importYTDFDialog()).TabFieldVertical};\n }),\n '',\n);\n","import React from 'react';\n\n/**\n * The hoc allows to delay mounting until `props.visible == true`.\n * The hoc might be useful to wrap components wrapped by React.lazy\n * @param Component\n * @returns\n */\nexport function withDelayedMount<P extends {visible?: boolean}>(Component: React.ComponentType<P>) {\n return function MountOnFirstVisible(props: P) {\n const [mounted, setMounted] = React.useState(false);\n React.useEffect(() => {\n if (!mounted && props.visible) {\n setMounted(true);\n }\n }, [props.visible, mounted]);\n return !mounted ? null : <Component {...props} />;\n };\n}\n","import fromPairs_ from 'lodash/fromPairs';\nimport isEqual_ from 'lodash/isEqual';\nimport zip_ from 'lodash/zip';\n\nconst STRUCT_TYPE = 'StructType';\nconst LIST_TYPE = 'ListType';\nconst STREAM_TYPE = 'StreamType';\nconst TUPLE_TYPE = 'TupleType';\nconst DICT_TYPE = 'DictType';\nexport const DATA_TYPE = 'DataType';\nconst VARIANT_TYPE = 'VariantType';\nexport const OPTIONAL_TYPE = 'OptionalType';\nconst TAGGED_TYPE = 'TaggedType';\nexport const VOID_TYPE = 'VoidType';\nconst NULL_TYPE = 'NullType';\nconst EMPTY_DICT_TYPE = 'EmptyDictType';\nconst EMPTY_LIST_TYPE = 'EmptyListType';\nexport const HISTOGRAM_TYPE = 'HistogramType';\nexport const HISTOGRAM_LIST_TYPE = 'HistogramListType';\nexport const HISTOGRAM_TUPLE_TYPE = 'HistogramTupleType';\nexport const PG_TYPE = 'PgType';\n\nexport type TypeArrayType =\n | typeof STRUCT_TYPE\n | typeof LIST_TYPE\n | typeof STREAM_TYPE\n | typeof TUPLE_TYPE\n | typeof DICT_TYPE\n | typeof DATA_TYPE\n | typeof VARIANT_TYPE\n | typeof OPTIONAL_TYPE\n | typeof TAGGED_TYPE\n | typeof VOID_TYPE\n | typeof NULL_TYPE\n | typeof EMPTY_DICT_TYPE\n | typeof EMPTY_LIST_TYPE\n | typeof HISTOGRAM_TYPE\n | typeof PG_TYPE;\n\nconst notSimpleDataTypes = ['Void', 'Yson', 'Json', 'Null'] as const;\nconst numericDataTypes = [\n 'Double',\n 'Float',\n 'Int64',\n 'Int32',\n 'Int16',\n 'Int8',\n 'Uint64',\n 'Uint32',\n 'Uint16',\n 'Uint8',\n] as const;\nconst dateTimeDataTypes = [\n 'Date',\n 'TzDate',\n 'Datetime',\n 'TzDatetime',\n 'Timestamp',\n 'TzTimestamp',\n 'Interval',\n] as const;\nconst stringDataTypes = ['String', 'Utf8', 'Json'] as const;\n\nexport type DataTypeType =\n | (typeof notSimpleDataTypes)[number]\n | (typeof numericDataTypes)[number]\n | (typeof dateTimeDataTypes)[number]\n | (typeof stringDataTypes)[number]\n | 'Bool'\n | 'Raw'\n | 'Uuid'\n | 'Dynumber'\n | string;\n\nexport function isDataTypeSimple(dataType: string) {\n return (notSimpleDataTypes as unknown as string[]).indexOf(dataType) < 0;\n}\nexport function isDataTypeNumeric(dataType: string) {\n return (numericDataTypes as unknown as string[]).indexOf(dataType) >= 0;\n}\nexport function isDataTypeDateTime(dataType: string) {\n return (dateTimeDataTypes as unknown as string[]).indexOf(dataType) >= 0;\n}\n\nexport function isDataTypeString(dataType: string) {\n return (stringDataTypes as unknown as string[]).indexOf(dataType) >= 0;\n}\n\ntype HistogramContentType = StructType | ['OptionalType', StructType];\n\nexport function isHistogramListType(\n field: TypeArray,\n): field is [typeof LIST_TYPE, StructType | ['OptionalType', StructType]] {\n if (isListType(field)) {\n return isHistogramType(field[1]);\n }\n return false;\n}\n\nexport function isHistogramType(rawField: TypeArray): rawField is HistogramContentType {\n let field = rawField;\n while (field[0] === OPTIONAL_TYPE) {\n field = field[1];\n }\n if (field[0] === STRUCT_TYPE) {\n const struct = fromPairs_(field[1]);\n return (\n ['Bins', 'Max', 'Min', 'WeightsSum'].every((key) =>\n Object.prototype.hasOwnProperty.call(struct, key),\n ) &&\n Array.isArray(struct.Bins) &&\n struct.Bins[0] === LIST_TYPE &&\n struct.Bins[1][0] === STRUCT_TYPE &&\n isEqual_(zip_(...struct.Bins[1][1])[0].sort(), ['Frequency', 'Position'])\n );\n }\n return false;\n}\n\ntype DictType = [typeof DICT_TYPE, TypeArray, TypeArray];\ntype OptionalType = [typeof OPTIONAL_TYPE, TypeArray];\nexport function isOptionalType(typeArray: unknown): typeArray is OptionalType {\n return (\n Array.isArray(typeArray) && typeArray[0] === OPTIONAL_TYPE && Array.isArray(typeArray[1])\n );\n}\ntype ListType = [typeof LIST_TYPE, TypeArray];\nexport function isListType(typeArray: unknown): typeArray is ListType {\n return Array.isArray(typeArray) && typeArray[0] === LIST_TYPE && Array.isArray(typeArray[1]);\n}\nexport type StructType = [typeof STRUCT_TYPE, [string, TypeArray][]];\nexport function isStructType(typeArray: unknown): typeArray is StructType {\n return Array.isArray(typeArray) && typeArray[0] === STRUCT_TYPE && Array.isArray(typeArray[1]);\n}\nexport type HistogramType = [\n typeof HISTOGRAM_TYPE,\n StructType | [typeof OPTIONAL_TYPE, StructType],\n];\nexport type HistogramListType = [typeof HISTOGRAM_LIST_TYPE, HistogramType];\nexport type HistogramTupleType = [typeof HISTOGRAM_TUPLE_TYPE, HistogramType[]];\n\nexport type TypeArray =\n | [typeof DATA_TYPE, DataTypeType, ...params: Array<string>]\n | OptionalType\n | [typeof TAGGED_TYPE, string, TypeArray]\n | DictType\n | ListType\n | [typeof EMPTY_DICT_TYPE]\n | [typeof EMPTY_LIST_TYPE]\n | [typeof STREAM_TYPE, TypeArray]\n | [typeof TUPLE_TYPE, TypeArray[]]\n | StructType\n | [typeof VARIANT_TYPE, TypeArray]\n | [typeof VOID_TYPE]\n | [typeof NULL_TYPE]\n | HistogramType\n | HistogramListType\n | HistogramTupleType\n | [typeof PG_TYPE, string];\n\nexport type DataTypeTuple = {\n name: 'Tuple';\n complex: true;\n type: DataType[];\n};\nexport type DataTypeStruct = {\n name: 'Struct';\n complex: true;\n struct: Struct;\n};\nexport type DataTypeVariant = {\n name: 'Variant';\n complex: true;\n struct: Struct;\n};\nexport type DataTypeList = {\n name: 'List';\n complex: true;\n type: DataType;\n};\n\nexport function isTupleDataType(dataType: DataType): dataType is DataTypeTuple {\n return dataType.name === 'Tuple';\n}\n\nexport function isListDataType(dataType: DataType): dataType is DataTypeList {\n return dataType.name === 'List';\n}\n\nexport function isEmptyListDataType(dataType: DataType): dataType is DataTypeStruct {\n return dataType.name === 'EmptyList';\n}\n\nexport function isStructDataType(dataType: DataType): dataType is DataTypeStruct {\n return dataType.name === 'Struct';\n}\n\nexport function isVariantDataType(dataType: DataType): dataType is DataTypeVariant {\n return dataType.name === 'Variant';\n}\n\nexport type StructEntry = {key: string | number; type: DataType};\ntype Struct = StructEntry[];\n\ntype ComplexDataType =\n | {\n name: 'Set';\n complex: true;\n type: DataType;\n }\n | {\n name: 'Dict';\n complex: true;\n type: DataType[];\n }\n | DataTypeStruct\n | DataTypeTuple\n | DataTypeList\n | {\n name: 'Enum';\n complex: true;\n type: {name: string | number}[];\n }\n | DataTypeVariant\n | {\n name: 'Stream';\n complex: true;\n type: DataType;\n };\nexport function isComplexDataType(dataType: DataType): dataType is ComplexDataType {\n return Boolean(dataType.complex);\n}\nexport type DataType = {\n optional?: boolean;\n optionalLevel?: number;\n tagged?: boolean;\n tags?: string[];\n simple?: boolean;\n numeric?: boolean;\n dateTime?: boolean;\n string?: boolean;\n params?: unknown[];\n complex?: boolean;\n null?: boolean;\n} & (\n | ComplexDataType\n | {\n name: 'EmptyList' | 'EmptyDict' | 'Void' | 'Null' | 'Unknown';\n }\n | {\n name: DataTypeType;\n params?: unknown[];\n }\n);\nexport function getType(typeArray: TypeArray): DataType {\n function setOptional(dataType: DataType) {\n if (dataType.optional) {\n dataType.optionalLevel = (dataType.optionalLevel || 1) + 1;\n }\n dataType.optional = true;\n return dataType;\n }\n\n function setTag(dataType: DataType, typeTag: string) {\n dataType.tagged = true;\n dataType.tags = (dataType.tags || []).concat(typeTag);\n return dataType;\n }\n\n function isEnum(variantTypes: {type: {name: string | number}}[]) {\n return variantTypes.every((variantType) => variantType.type.name === 'Void');\n }\n\n function isSet(dictType: DictType) {\n return dictType[2][0] === VOID_TYPE;\n }\n\n function getEnumValue(variantType: {key: string | number}) {\n return {\n name: variantType.key,\n };\n }\n\n function getVariantType(typeArray: TypeArray) {\n const variantType = getType(typeArray);\n switch (variantType.name) {\n case 'Tuple':\n return (variantType as DataTypeTuple).type.map((type, index) => ({\n key: index,\n type: type,\n }));\n case 'Struct':\n return (variantType as DataTypeStruct).struct;\n default:\n throw new Error(`Invalid type in Variant type: ${variantType.name}`);\n }\n }\n\n switch (typeArray[0]) {\n case DATA_TYPE:\n return {\n name: typeArray[1],\n simple: isDataTypeSimple(typeArray[1]),\n numeric: isDataTypeNumeric(typeArray[1]),\n dateTime: isDataTypeDateTime(typeArray[1]),\n string: isDataTypeString(typeArray[1]),\n params: typeArray.slice(2),\n };\n case OPTIONAL_TYPE:\n return setOptional(getType(typeArray[1]));\n case TAGGED_TYPE:\n return setTag(getType(typeArray[2]), typeArray[1]);\n case DICT_TYPE:\n if (isSet(typeArray)) {\n return {\n name: 'Set',\n complex: true,\n type: getType(typeArray[1]),\n };\n }\n return {\n name: 'Dict',\n complex: true,\n // @ts-ignore\n type: typeArray.slice(1).map(getType),\n };\n case LIST_TYPE:\n return {\n name: 'List',\n complex: true,\n type: getType(typeArray[1]),\n };\n case EMPTY_DICT_TYPE:\n return {\n name: 'EmptyDict',\n };\n case EMPTY_LIST_TYPE:\n return {\n name: 'EmptyList',\n };\n case STREAM_TYPE:\n return {\n name: 'Stream',\n complex: true,\n type: getType(typeArray[1]),\n };\n case TUPLE_TYPE:\n return {\n name: 'Tuple',\n complex: true,\n type: typeArray[1].map(getType),\n };\n case STRUCT_TYPE:\n return {\n name: 'Struct',\n complex: true,\n struct: typeArray[1].map((field) => ({key: field[0], type: getType(field[1])})),\n };\n case VARIANT_TYPE: {\n const variantType = getVariantType(typeArray[1]);\n if (isEnum(variantType)) {\n return {\n name: 'Enum',\n complex: true,\n type: variantType.map(getEnumValue),\n };\n }\n\n return {\n name: 'Variant',\n complex: true,\n struct: variantType,\n };\n }\n case VOID_TYPE:\n return {\n name: 'Void',\n };\n case NULL_TYPE:\n return {\n name: 'Null',\n null: true,\n };\n case PG_TYPE: {\n const typeName = typeArray[1];\n if (typeName.startsWith('_pg') || typeName.startsWith('pg')) {\n return {name: typeName};\n }\n return {name: typeName.startsWith('_') ? `_pg${typeName.slice(1)}` : `pg${typeName}`};\n }\n default:\n return {\n name: 'Unknown',\n };\n }\n}\n","import capitalize_ from 'lodash/capitalize';\nimport map_ from 'lodash/map';\n\nexport type Type = string | ComplexType;\n\ninterface Decimal {\n type_name: 'decimal';\n precision: number;\n scale: number;\n}\n\ninterface Dict {\n type_name: 'dict';\n key: Type;\n value: Type;\n}\n\ntype Variant = {type_name: 'variant'} & VariantData;\ntype VariantData = VariantElements | VariantMembers;\ntype VariantElements = {elements: Array<{type: Type}>};\ntype VariantMembers = {members: Array<{name: string; type: Type}>};\n\ninterface Optional {\n type_name: 'optional';\n item: Type;\n}\n\ntype Tuple = {type_name: 'tuple'} & VariantElements;\n\ninterface List {\n type_name: 'list';\n item: Type;\n}\n\ntype Struct = {type_name: 'struct'} & VariantMembers;\n\ninterface Tagged {\n type_name: 'tagged';\n tag: string;\n item: Type;\n}\n\ntype ComplexType = Decimal | Dict | Variant | Optional | Tuple | List | Struct | Tagged;\n\nexport function parseV3Type(initialType: Type, primitiveTypes: Set<string>) {\n function ysonTypeToYql(ysonType: Type) {\n return typeof ysonType === 'string'\n ? stringToYql(ysonType, primitiveTypes)\n : objectToYql(ysonType);\n }\n\n function stringToYql(ysonType: string, typesMap: Set<string>) {\n if (typesMap.has(ysonType)) {\n return ['DataType', capitalize_(ysonType)] as const;\n } else {\n return ['UnknownType'] as const;\n }\n }\n\n function objectToYql(ysonType: ComplexType): any {\n switch (ysonType.type_name) {\n case 'decimal':\n return decimalToYql(ysonType);\n case 'dict':\n return [\n 'DictType',\n ysonTypeToYql(ysonType.key),\n ysonTypeToYql(ysonType.value),\n ] as const;\n case 'optional':\n return ['OptionalType' as const, ysonTypeToYql(ysonType.item)] as const;\n case 'tuple':\n return tupleToYql(ysonType);\n case 'list':\n return ['ListType', ysonTypeToYql(ysonType.item)] as const;\n case 'struct':\n return structToYql(ysonType);\n case 'variant':\n return [\n 'VariantType',\n 'elements' in ysonType ? tupleToYql(ysonType) : structToYql(ysonType),\n ] as const;\n case 'tagged':\n return ['TaggedType', ysonType.tag, ysonTypeToYql(ysonType.item)] as const;\n default:\n // let it be a fallback for now\n return ['UnknownType'] as const;\n }\n }\n\n function tupleToYql(ysonType: VariantElements) {\n return ['TupleType', map_(ysonType.elements, ({type}) => ysonTypeToYql(type))] as const;\n }\n\n function structToYql(ysonType: VariantMembers) {\n return [\n 'StructType',\n map_(ysonType.members, ({name, type}) => [name, ysonTypeToYql(type)]),\n ] as const;\n }\n\n function decimalToYql(ysonType: {precision: number; scale: number}) {\n const {precision, scale} = ysonType;\n return ['DataType', 'Decimal', precision, scale] as const;\n }\n\n return ysonTypeToYql(initialType);\n}\n","import React from 'react';\n// For some reason React.memo drops the generic prop type and creates a regular union type\n// https://github.com/DefinitelyTyped/DefinitelyTyped/issues/37087#issuecomment-542793243\nexport const typedMemo = React.memo;\n","import React from 'react';\nimport { CHARTKIT_ERROR_CODE } from '../../libs';\nimport { getErrorMessage } from '../../utils/getErrorMessage';\nexport class ErrorBoundary extends React.Component {\n constructor() {\n super(...arguments);\n this.state = {\n error: undefined,\n };\n this.resetError = () => {\n if (this.state.error) {\n this.setState({ error: undefined });\n }\n };\n }\n static getDerivedStateFromError(error) {\n return { error };\n }\n componentDidCatch() {\n var _a, _b;\n const { error } = this.state;\n if (error) {\n (_b = (_a = this.props).onError) === null || _b === void 0 ? void 0 : _b.call(_a, { error });\n }\n }\n componentDidUpdate(prevProps) {\n if (prevProps.data !== this.props.data) {\n const { error } = this.state;\n if (error && 'code' in error && error.code === CHARTKIT_ERROR_CODE.NO_DATA) {\n this.resetError();\n }\n }\n }\n render() {\n const { error } = this.state;\n if (error) {\n const message = getErrorMessage(error);\n if (this.props.renderError) {\n return this.props.renderError({\n error,\n message,\n resetError: this.resetError,\n });\n }\n return React.createElement(\"div\", null, message);\n }\n return this.props.children;\n }\n}\n","import { i18n } from '../i18n';\nexport function getErrorMessage(error) {\n const code = 'code' in error && error.code;\n return (error.message || code || i18n('error', 'label_unknown-error')).toString();\n}\n","import { __rest } from \"tslib\";\nimport React from 'react';\nimport { Loader as BaseLoader } from '@gravity-ui/uikit';\nimport { block } from '../../utils/cn';\nimport './Loader.css';\nconst b = block('loader');\nexport const Loader = (_a) => {\n var { renderPluginLoader } = _a, props = __rest(_a, [\"renderPluginLoader\"]);\n const pluginLoader = renderPluginLoader === null || renderPluginLoader === void 0 ? void 0 : renderPluginLoader();\n // React.Suspense complains about possible undefined in \"fallback\" property\n if (typeof pluginLoader !== 'undefined') {\n return pluginLoader;\n }\n return (React.createElement(\"div\", { className: b() },\n React.createElement(BaseLoader, Object.assign({}, props))));\n};\n","import { __rest } from \"tslib\";\nimport React from 'react';\nimport { i18n } from '../i18n';\nimport { CHARTKIT_ERROR_CODE, ChartKitError, settings } from '../libs';\nimport { getRandomCKId, typedMemo } from '../utils';\nimport { cn } from '../utils/cn';\nimport { ErrorBoundary } from './ErrorBoundary/ErrorBoundary';\nimport { Loader } from './Loader/Loader';\nimport './ChartKit.css';\nconst b = cn('chartkit');\nconst ChartKitComponent = (props) => {\n const widgetRef = React.useRef();\n const { instanceRef, id: propsId, type, isMobile, renderPluginLoader } = props, restProps = __rest(props, [\"instanceRef\", \"id\", \"type\", \"isMobile\", \"renderPluginLoader\"]);\n const ckId = React.useMemo(() => getRandomCKId(), []);\n const id = propsId || ckId;\n const lang = settings.get('lang');\n const plugins = settings.get('plugins');\n const plugin = plugins.find((iteratedPlugin) => iteratedPlugin.type === type);\n if (!plugin) {\n throw new ChartKitError({\n code: CHARTKIT_ERROR_CODE.UNKNOWN_PLUGIN,\n message: i18n('error', 'label_unknown-plugin', { type }),\n });\n }\n const ChartComponent = plugin.renderer;\n React.useImperativeHandle(instanceRef, () => ({\n reflow(details) {\n var _a;\n if ((_a = widgetRef.current) === null || _a === void 0 ? void 0 : _a.reflow) {\n widgetRef.current.reflow(details);\n }\n },\n }), []);\n return (React.createElement(React.Suspense, { fallback: React.createElement(Loader, { renderPluginLoader: renderPluginLoader }) },\n React.createElement(\"div\", { className: b({ mobile: isMobile }, 'chartkit-theme_common') },\n React.createElement(ChartComponent, Object.assign({ ref: widgetRef, id: id, lang: lang }, restProps)))));\n};\nconst ChartKitComponentWithErrorBoundary = React.forwardRef(function ChartKitComponentWithErrorBoundary(props, ref) {\n return (React.createElement(ErrorBoundary, { onError: props.onError, data: props.data, renderError: props.renderError },\n React.createElement(ChartKitComponent, Object.assign({ instanceRef: ref }, props))));\n}) /* https://stackoverflow.com/a/58473012 */;\nexport const ChartKit = typedMemo(ChartKitComponentWithErrorBoundary);\n","import { ChartKit } from './components/ChartKit';\nimport { settings } from './libs';\nexport * from './types/widget-data';\nexport * from './libs/chartkit-error/chartkit-error';\nexport { settings };\nexport default ChartKit;\n","import React from 'react';\nexport * from './types';\nexport const YagrPlugin = {\n type: 'yagr',\n renderer: React.lazy(() => import('./renderer/YagrWidget')),\n};\n","import ChartKit, {settings} from '@gravity-ui/chartkit';\nimport {YagrPlugin} from '@gravity-ui/chartkit/yagr';\nexport type {RawSerieData, YagrWidgetData} from '@gravity-ui/chartkit/yagr';\n\nimport '@gravity-ui/yagr/dist/index.css';\n\nsettings.set({plugins: [YagrPlugin]});\n\nconst COLORS = ['rgb(77, 162, 241)', 'rgb(255, 61, 100)'];\n\nexport function getSerieColor(serieIndex: number) {\n return COLORS[serieIndex % COLORS.length];\n}\n\nexport default ChartKit;\n","import {FieldObject} from './types';\n\nexport const getPointValue = (value: FieldObject) => {\n switch (value.$type) {\n case 'yql.interval': {\n return Number(value.$value);\n }\n\n case 'yql.int32':\n case 'yql.int64':\n case 'yql.uint8':\n case 'yql.uint32':\n case 'yql.uint64':\n case 'yql.float':\n case 'yql.double':\n case 'yql.decimal':\n return Number(value.$value);\n default:\n return value.$rawValue;\n }\n};\n","import transform_ from 'lodash/transform';\nimport groupBy_ from 'lodash/groupBy';\nimport type {QueryResult} from './types';\nimport {getPointValue} from './getPointData';\n\nexport const splitDataByColor = ({\n rows,\n colorFieldName,\n xFieldName,\n yFieldName,\n}: {\n rows: QueryResult;\n xFieldName: string;\n yFieldName: string;\n colorFieldName: string;\n}) => {\n const xFieldPath = `${xFieldName}.$rawValue`;\n const colorFieldPath = `${colorFieldName}.$rawValue`;\n\n return transform_<\n Record<string, QueryResult>,\n Array<{name: string; data: {x: string; y: number}[]}>\n >(\n groupBy_(rows, colorFieldPath),\n (result, value, key) => {\n const data = transform_<Record<string, QueryResult>, {x: string; y: number}[]>(\n groupBy_(value, xFieldPath),\n (acc, y, x) => {\n const point = Array.isArray(y) ? y[0] : y;\n\n acc.push({\n x,\n y: Number(getPointValue(point[yFieldName])),\n });\n\n return acc;\n },\n [],\n );\n\n result.push({\n name: key,\n data,\n });\n\n return result;\n },\n [],\n );\n};\n","import type {Placeholder, Visualization} from '../types';\n\ntype VisualizationPlaceholders = {\n xPlaceholder: Placeholder | undefined;\n yPlaceholder: Placeholder | undefined;\n colorPlaceholder: Placeholder | undefined;\n};\n\nexport function getVisualizationPlaceholders(\n visualization: Visualization,\n): VisualizationPlaceholders {\n return visualization.placeholders.reduce(\n (acc: VisualizationPlaceholders, placeholder) => {\n if (placeholder.id === 'x') {\n acc.xPlaceholder = placeholder;\n }\n\n if (placeholder.id === 'y') {\n acc.yPlaceholder = placeholder;\n }\n\n if (placeholder.id === 'colors') {\n acc.colorPlaceholder = placeholder;\n }\n\n return acc;\n },\n {\n xPlaceholder: undefined,\n yPlaceholder: undefined,\n colorPlaceholder: undefined,\n },\n );\n}\n","import merge_ from 'lodash/merge';\nimport type {ChartKitWidgetData} from '@gravity-ui/chartkit';\nimport {prepareBar} from './bar';\nimport {prepareScatter} from './scatter';\nimport type {PrepareLineArgs} from './types';\nimport {buildD3Config} from './d3config';\n\nexport const prepareWidgetData = (args: PrepareLineArgs): ChartKitWidgetData => {\n const d3Config = buildD3Config(args);\n\n let data;\n\n switch (args.visualization.id) {\n case 'scatter': {\n data = prepareScatter(args);\n break;\n }\n default: {\n data = prepareBar(args);\n }\n }\n\n return merge_(data, d3Config);\n};\n","import type {ChartKitWidgetAxisType, ChartKitWidgetData} from '@gravity-ui/chartkit';\nimport type {PrepareLineArgs} from './types';\nimport {VisualizationId} from '../types';\n\n// Inspired by\n// https://github.com/datalens-tech/datalens-ui/blob/e978d82ce785d4321057942d0ff05a163c12ade7/src/server/modes/charts/plugins/datalens/d3/index.ts#L24\n\nexport function buildD3Config(args: PrepareLineArgs) {\n const chartSettings = args.visualization.chartSettings;\n\n const xAxisGridEnabled = true;\n const xAxisIsLegendEnabled = chartSettings.xAxis.legend === 'on';\n const xAxisEnableLabels = chartSettings.xAxis.labels === 'on';\n const xAxisTitle = chartSettings.xAxis.title;\n const xAxisPixelInterval = Number(chartSettings.xAxis.pixelInterval || '120');\n\n const yAxisEnableLabels = chartSettings.yAxis.labels === 'on';\n const yAxisTitle = chartSettings.yAxis.title;\n const yAxisGridEnabled = chartSettings.yAxis.grid === 'on';\n const yAxisPixelInterval = Number(chartSettings.yAxis.pixelInterval || '120');\n\n const chartWidgetData: Partial<ChartKitWidgetData> = {\n tooltip: {enabled: true},\n legend: {enabled: xAxisIsLegendEnabled},\n xAxis: {\n type: getAxisType(args.visualization.id),\n labels: {\n enabled: xAxisEnableLabels,\n },\n title: {\n text: xAxisTitle,\n },\n grid: {\n enabled: xAxisGridEnabled,\n },\n ticks: {\n pixelInterval: xAxisPixelInterval,\n },\n },\n yAxis: [\n {\n // todo: the axis type should depend on the type of field\n type: 'linear',\n lineColor: 'transparent',\n labels: {\n enabled: yAxisEnableLabels,\n },\n title: {\n text: yAxisTitle,\n },\n grid: {\n enabled: yAxisGridEnabled,\n },\n ticks: {\n pixelInterval: yAxisPixelInterval,\n },\n },\n ],\n series: {\n data: [],\n options: {\n 'bar-x': {\n barMaxWidth: 50,\n barPadding: 0.05,\n groupPadding: 0.4,\n dataSorting: {\n direction: 'desc',\n key: 'name',\n },\n },\n line: {\n lineWidth: 2,\n },\n },\n },\n chart: {\n margin: {\n top: 10,\n left: 10,\n right: 10,\n bottom: 15,\n },\n },\n };\n\n return chartWidgetData;\n}\n\n// Write this function, using reference:\n// https://github.com/datalens-tech/datalens-ui/blob/e978d82ce785d4321057942d0ff05a163c12ade7/src/server/modes/charts/plugins/datalens/preparers/helpers/axis.ts\nfunction getAxisType(visualizationId: VisualizationId): ChartKitWidgetAxisType {\n return visualizationId === 'scatter' ? 'linear' : 'category';\n}\n","import type {ChartKitWidgetData} from '@gravity-ui/chartkit';\nimport type {PrepareLineArgs} from './types';\nimport {splitDataByColor} from './splitDataByColor';\nimport {getVisualizationPlaceholders} from './utils';\n\nexport function prepareScatter(args: PrepareLineArgs): ChartKitWidgetData {\n const {visualization} = args;\n const rows = args.result;\n const {xPlaceholder, yPlaceholder, colorPlaceholder} =\n getVisualizationPlaceholders(visualization);\n const [xField] = xPlaceholder?.fields || [];\n const yFields = yPlaceholder?.fields || [];\n const [yField] = yFields;\n const [colorField] = colorPlaceholder?.fields || [];\n\n if (!xField || !yField) {\n return {\n series: {\n data: [],\n },\n };\n }\n\n if (colorField) {\n return {\n series: {\n data: splitDataByColor({\n rows,\n yFieldName: yField.name,\n xFieldName: xField.name,\n colorFieldName: colorField?.name,\n }).map((item) => ({\n data: item.data.map(({x, y}) => ({\n x: Number(x),\n y: Number(y),\n })),\n name: item.name,\n type: 'scatter',\n })),\n },\n };\n }\n\n const widgetData: ChartKitWidgetData = {\n series: {\n data: [\n {\n type: 'scatter',\n data: rows.map((row) => {\n return {\n x: Number(row[xField.name].$rawValue),\n y: Number(row[yField.name].$rawValue),\n };\n }),\n name: `${xField.name} x ${yField.name}`,\n },\n ],\n },\n };\n\n return widgetData;\n}\n","import uniq_ from 'lodash/uniq';\nimport map_ from 'lodash/map';\nimport type {ChartKitWidgetData} from '@gravity-ui/chartkit';\nimport type {PrepareLineArgs, QueryResult} from './types';\nimport {Field, VisualizationId} from '../types';\nimport {splitDataByColor} from './splitDataByColor';\nimport {getPointValue} from './getPointData';\nimport {getVisualizationPlaceholders} from './utils';\n\n// Inspired by datalens ql chart\n// https://github.com/datalens-tech/datalens-ui/blob/e978d82ce785d4321057942d0ff05a163c12ade7/src/server/modes/charts/plugins/ql/preparers/line.ts#L82\n\ninterface PrepareColoredSeriesDataArgs {\n rows: QueryResult;\n xField: Field;\n yField: Field;\n colorField: Field;\n visualizationId: VisualizationId;\n}\n\nfunction prepareColoredSeriesData({\n rows,\n xField,\n yField,\n colorField,\n visualizationId,\n}: PrepareColoredSeriesDataArgs): ChartKitWidgetData {\n const xFieldPath = `${xField.name}.$rawValue`;\n\n return {\n series: {\n data: splitDataByColor({\n rows,\n xFieldName: xField.name,\n yFieldName: yField.name,\n colorFieldName: colorField?.name,\n }).map((item) => {\n return {\n type: visualizationId,\n stacking: 'normal',\n name: item.name,\n data: item.data,\n };\n }),\n },\n xAxis: {\n type: 'category',\n categories: uniq_(map_(rows, xFieldPath) as unknown as string[]),\n },\n };\n}\n\ninterface PrepareSeriesDataArgs {\n rows: QueryResult;\n xField: Field;\n yField: Field;\n visualizationId: VisualizationId;\n yFields: Field[];\n}\n\nfunction prepareSeriesData({\n xField,\n yField,\n yFields,\n rows,\n visualizationId,\n}: PrepareSeriesDataArgs): ChartKitWidgetData {\n const result: Record<any, any> = {};\n\n let xValues: (string | number)[] = [];\n\n const dataMatrix: Record<string, any> = {};\n\n rows.forEach((row) => {\n const xRowItem = row[xField.name];\n const xValue = xRowItem.$rawValue;\n\n xValues.push(xValue);\n\n yFields.forEach((field) => {\n dataMatrix[xValue] = getPointValue(row[field.name]);\n });\n });\n\n xValues = Array.from(new Set(xValues));\n\n result.categories = xValues.map((value) => value);\n\n result.graphs = [];\n\n yFields.forEach(() => {\n const graph = {\n data: xValues.map((xValue) => {\n return dataMatrix[String(xValue)];\n }),\n };\n\n result.graphs?.push(graph);\n });\n\n return {\n series: {\n data: [\n {\n type: visualizationId,\n data: result.graphs[0].data.map((item: string, index: number) => {\n return {\n x: result.categories[index],\n y: Number(item),\n };\n }),\n name: yField.name,\n },\n ],\n },\n xAxis: {\n type: 'category',\n categories: result.categories,\n },\n };\n}\n\nexport function prepareBar(args: PrepareLineArgs): ChartKitWidgetData {\n const {visualization} = args;\n const visualizationId = visualization.id;\n const rows = args.result;\n const {xPlaceholder, yPlaceholder, colorPlaceholder} =\n getVisualizationPlaceholders(visualization);\n\n const [xField] = xPlaceholder?.fields || [];\n const yFields = yPlaceholder?.fields || [];\n const [yField] = yFields;\n const [colorField] = colorPlaceholder?.fields || [];\n\n if (!xField || !yField) {\n return {\n series: {\n data: [],\n },\n };\n }\n\n if (colorField) {\n return prepareColoredSeriesData({\n rows,\n yField,\n xField,\n colorField,\n visualizationId,\n });\n }\n\n return prepareSeriesData({\n rows,\n yField,\n xField,\n yFields,\n visualizationId,\n });\n}\n","import {createSelector} from 'reselect';\nimport get_ from 'lodash/get';\nimport {RootState} from '../../../../store/reducers/index';\nimport type {QueryResult} from '../preparers/types';\nimport type {Placeholder, PlaceholderId} from '../types';\nimport objectHash from 'object-hash';\n\nexport const selectQueryResultAllVisualizations = (state: RootState) =>\n state.queryResultsVisualization.visualizations;\n\nexport const selectQueryResultVisualization = (state: RootState) =>\n state.queryResultsVisualization.visualizations[state.queryResultsVisualization.resultIndex];\n\nexport const selectQueryResultVisualizationPlaceholders = (state: RootState) =>\n selectQueryResultVisualization(state).placeholders;\n\nexport const selectQueryResultVisualizationId = (state: RootState) =>\n selectQueryResultVisualization(state).id;\n\nexport const selectQueryResultChartSettings = (state: RootState) =>\n selectQueryResultVisualization(state).chartSettings;\n\nexport const selectQueryResultIndex = (state: RootState) =>\n state.queryResultsVisualization.resultIndex;\n\nexport const selectQueryResultChartSaved = (state: RootState) =>\n state.queryResultsVisualization.saved;\n\nexport const selectQueryId = (state: RootState) => state.queryResultsVisualization.query?.id;\n\nexport const selectQueryResult = (state: RootState) =>\n state.queryResultsVisualization.queryResults[state.queryResultsVisualization.resultIndex];\n\nexport const selectAvailableFields = (state: RootState) => {\n const result = selectQueryResult(state);\n\n const row = (result && result[0]) || {};\n\n const columns: {name: string}[] = Object.keys(row).map((name) => {\n return {\n name,\n };\n });\n\n return columns;\n};\n\nexport const resultsPlaceholdersValidation = createSelector(\n [\n selectQueryResult,\n selectQueryResultVisualizationPlaceholders,\n selectQueryResultVisualizationId,\n ],\n (queryResult, placeholders, visualizationId): Record<string, {invalid: boolean}> => {\n const hasColors = Boolean(\n placeholders.find((placeholder) => placeholder.id === 'colors')?.fields.length,\n );\n\n if (hasColors) {\n return colorsValidation(queryResult, placeholders);\n }\n\n const validationFunction =\n visualizationId === 'scatter' ? scatterValidation : lineAndBarValidation;\n\n return validationFunction(queryResult, placeholders);\n },\n);\n\nfunction scatterValidation(queryResult: QueryResult, placeholders: Placeholder[]) {\n const fields = placeholders.reduce(\n (ret: {x: null | string; y: null | string}, field) => {\n const fieldName = get_(field, 'fields.0.name');\n const fieldType = get_(field, 'id') as 'x' | 'y';\n\n if (fieldName && fieldType) {\n ret[fieldType] = fieldName;\n }\n\n return ret;\n },\n {x: null, y: null},\n );\n\n const xFieldName = fields.x;\n const yFieldName = fields.y;\n const notAllFieldsSelected = !xFieldName || !yFieldName;\n\n if (notAllFieldsSelected) {\n return {\n x: {invalid: false},\n y: {invalid: false},\n };\n }\n\n const hashes: Record<string, boolean> = {};\n\n const isPointsDuplicated = queryResult.some((item) => {\n const xValue = item[xFieldName].$rawValue;\n const yValue = item[yFieldName].$rawValue;\n // eslint-disable-next-line new-cap\n const hash = objectHash.MD5({\n xValue,\n yValue,\n });\n\n const isPointDuplicated = hashes[hash];\n\n hashes[hash] = true;\n\n return isPointDuplicated;\n });\n\n return {\n x: {invalid: isPointsDuplicated},\n y: {invalid: isPointsDuplicated},\n };\n}\n\nfunction lineAndBarValidation(queryResult: QueryResult, placeholders: Placeholder[]) {\n const fields = placeholders.reduce(\n (ret: {x: null | string; y: null | string}, field) => {\n const fieldName = get_(field, 'fields.0.name');\n const fieldType = get_(field, 'id') as 'x' | 'y';\n\n if (fieldName && fieldType) {\n ret[fieldType] = fieldName;\n }\n\n return ret;\n },\n {x: null, y: null},\n );\n\n const xFieldName = fields.x;\n const yFieldName = fields.y;\n const notAllFieldsSelected = !xFieldName || !yFieldName;\n\n if (notAllFieldsSelected) {\n return {\n x: {invalid: false},\n };\n }\n\n const xCoords: Record<string, boolean> = {};\n\n const isXCoordsDuplicated = queryResult.some((item) => {\n const xValue = item[xFieldName].$rawValue;\n\n const isXValueDuplicated = xCoords[xValue];\n\n xCoords[xValue] = true;\n\n return isXValueDuplicated;\n });\n\n return {\n x: {invalid: isXCoordsDuplicated},\n } as unknown as Record<string, {invalid: boolean}>;\n}\n\nfunction colorsValidation(queryResult: QueryResult, placeholders: Placeholder[]) {\n const fields = placeholders.reduce((acc: string[], field) => {\n const fieldName = get_(field, 'fields.0.name');\n\n if (fieldName) {\n acc.push(fieldName);\n }\n\n return acc;\n }, []);\n\n const notAllFieldsSelected = fields.length < placeholders.length;\n\n if (notAllFieldsSelected) {\n return {\n x: {invalid: false},\n };\n }\n\n const hashes: Record<string, boolean> = {};\n\n const isDataDuplicated = queryResult.some((item) => {\n const newObject = fields.reduce((acc: Record<string, string>, field: string) => {\n acc[field] = item[field].$rawValue;\n return acc;\n }, {});\n\n // eslint-disable-next-line new-cap\n const lineHash = objectHash.MD5(newObject);\n\n const isLineDuplicated = hashes[lineHash];\n\n hashes[lineHash] = true;\n\n return isLineDuplicated;\n });\n\n return {\n x: {invalid: isDataDuplicated},\n };\n}\n\nexport const selectIsPlaceholdersMissSomeFields = createSelector(\n [selectQueryResultVisualizationPlaceholders],\n (placeholders) => {\n const placeholdersMap = placeholders.reduce(\n (acc, placeholder) => {\n acc[placeholder.id] = placeholder.fields.length > 0;\n\n return acc;\n },\n {} as Record<PlaceholderId, boolean>,\n );\n\n return !placeholdersMap.x || !placeholdersMap.y;\n },\n);\n","import * as React from 'react';\nimport {useEffect, useState} from 'react';\nimport {ChartKitError} from '@gravity-ui/chartkit';\nimport {Button} from '@gravity-ui/uikit';\n\nimport './ChartErrorBoundary.scss';\n\nconst renderError = ({\n error,\n refreshClick,\n}: {\n error: ChartKitError | Error;\n refreshClick(): void;\n}) => {\n return (\n <div className=\"chart-error-boundary\">\n <div>\n <p>\n {error?.message}\n <br />\n </p>\n <Button view=\"action\" onClick={refreshClick}>\n Try again\n </Button>\n </div>\n </div>\n );\n};\n\ninterface ChartErrorBoundaryProps {\n deps: Record<string, unknown>;\n children: (args: {handleError({error}: {error: ChartKitError}): void}) => React.ReactElement;\n}\n\nexport const ChartErrorHandler = ({children, deps}: ChartErrorBoundaryProps) => {\n const [error, setError] = useState<ChartKitError>();\n\n const handleError = ({error}: {error: ChartKitError}) => {\n setError(error);\n };\n\n const handleRefreshClick = () => {\n setError(undefined);\n };\n\n useEffect(() => {\n setError(undefined);\n }, [deps]);\n\n if (error) {\n return renderError({error, refreshClick: handleRefreshClick});\n }\n\n return children({handleError});\n};\n\nexport class ChartErrorBoundary extends React.Component<\n React.PropsWithChildren<Readonly<{}>>,\n {error?: Error | ChartKitError}\n> {\n static getDerivedStateFromError(error: Error) {\n return {error};\n }\n\n constructor(props: React.PropsWithChildren<Readonly<{}>>) {\n super(props);\n\n this.state = {error: undefined};\n }\n\n componentDidCatch() {}\n\n handleRefreshClick = () => {\n this.setState({error: undefined});\n };\n\n render() {\n if (this.state.error) {\n return renderError({\n error: this.state.error,\n refreshClick: this.handleRefreshClick,\n });\n }\n\n return this.props.children;\n }\n}\n","import React from 'react';\nimport block from 'bem-cn-lite';\nimport './EmptyPlaceholdersMessage.scss';\n\nconst b = block('empty-placeholders-message');\n\nexport function EmptyPlaceholdersMessage() {\n return <div className={b()}>Add fields in X and Y placeholders</div>;\n}\n","import React from 'react';\nexport * from './types';\nexport * from './utils';\n/**\n * It is an experemental plugin\n *\n * DO NOT USE IT IN YOUR PRODUCTION\n * */\nexport const D3Plugin = {\n type: 'd3',\n renderer: React.lazy(() => import('./renderer/D3Widget')),\n};\n","import React, {useMemo} from 'react';\nimport ChartKit from '../../../../../components/YagrChartKit/YagrChartKit';\nimport {settings} from '@gravity-ui/chartkit';\nimport type {ChartKitRef} from '@gravity-ui/chartkit';\nimport {prepareWidgetData} from '../../preparers/prepareWidgetData';\nimport {useSelector} from 'react-redux';\nimport {\n selectIsPlaceholdersMissSomeFields,\n selectQueryResultVisualization,\n} from '../../store/selectors';\nimport type {QueryResult} from '../../preparers/types';\nimport {ChartErrorHandler} from '../../components/ChartErrorBoundary/ChartErrorBoundary';\nimport {EmptyPlaceholdersMessage} from '../../components/EmptyPlaceholdersMessage/EmptyPlaceholdersMessage';\nimport {D3Plugin} from '@gravity-ui/chartkit/d3';\n\nsettings.set({plugins: [...settings.get('plugins'), D3Plugin]});\n\ntype LineBasicProps = {\n result: QueryResult;\n};\n\nexport const BaseChart = React.forwardRef<ChartKitRef | undefined, LineBasicProps>(\n function BaseChartComponent({result}, ref) {\n const visualization = useSelector(selectQueryResultVisualization);\n const isPlaceholdersMissSomeFields = useSelector(selectIsPlaceholdersMissSomeFields);\n const widgetData = useMemo(() => {\n return prepareWidgetData({result, visualization});\n }, [result, visualization]);\n\n if (isPlaceholdersMissSomeFields) {\n return <EmptyPlaceholdersMessage />;\n }\n\n return (\n <ChartErrorHandler deps={widgetData}>\n {({handleError}) => (\n <ChartKit type=\"d3\" data={widgetData} ref={ref} onError={handleError} />\n )}\n </ChartErrorHandler>\n );\n },\n);\n\nexport const Chart = React.memo(BaseChart);\n","import * as React from 'react';\nconst Plus = (props) => (React.createElement(\"svg\", Object.assign({ xmlns: \"http://www.w3.org/2000/svg\", width: 16, height: 16, fill: \"none\", viewBox: \"0 0 16 16\" }, props),\n React.createElement(\"path\", { fill: \"currentColor\", fillRule: \"evenodd\", d: \"M8 1.75a.75.75 0 0 1 .75.75v4.75h4.75a.75.75 0 0 1 0 1.5H8.75v4.75a.75.75 0 0 1-1.5 0V8.75H2.5a.75.75 0 0 1 0-1.5h4.75V2.5A.75.75 0 0 1 8 1.75Z\", clipRule: \"evenodd\" })));\nexport default Plus;\n","import React from 'react';\nimport block from 'bem-cn-lite';\nimport './Placeholder.scss';\nimport {Field, Placeholder} from '../../../types';\nimport {Button, Icon, Select} from '@gravity-ui/uikit';\nimport {Plus as PlusIcon, Xmark as XmarkIcon} from '@gravity-ui/icons';\nimport {useThunkDispatch} from '../../../../../../store/thunkDispatch';\n\nconst b = block('placeholder');\n\ntype PlaceholderComponentProps = {\n placeholder: Placeholder;\n availableFields: Field[];\n};\n\nexport const PlaceholderComponent = ({placeholder, availableFields}: PlaceholderComponentProps) => {\n const {id, fields} = placeholder;\n const dispatch = useThunkDispatch();\n\n const addField = React.useCallback(\n ({field, placeholder}: {field: Field; placeholder: Placeholder}) => {\n dispatch({\n type: 'set-fields',\n data: {\n fields: [field],\n placeholderId: placeholder.id,\n },\n });\n },\n [dispatch],\n );\n\n const removeField = React.useCallback(\n ({field, placeholder}: {field: Field; placeholder: Placeholder}) => {\n dispatch({\n type: 'remove-field',\n data: {\n field,\n placeholderId: placeholder.id,\n },\n });\n },\n [dispatch],\n );\n\n const onSelectUpdate = React.useCallback(\n (value: string[]) => {\n addField({\n placeholder,\n field: availableFields.find((field) => field.name === value[0])!,\n });\n },\n [addField],\n );\n\n return (\n <div className={b()}>\n <div className={b('header')}>\n <div className={b('name')}>{id}</div>\n <Select\n value={[]}\n filterable={true}\n options={availableFields.map((field) => ({\n content: field.name,\n value: field.name,\n data: field,\n }))}\n onUpdate={onSelectUpdate}\n renderControl={({onClick, ref}) => {\n return (\n <Button onClick={onClick} ref={ref}>\n <Icon data={PlusIcon} size={16} />\n </Button>\n );\n }}\n />\n </div>\n\n {fields.map((field) => {\n return (\n <div key={field.name} className={b('field')}>\n <div className={b('field-spacer')}></div>\n <div className={b('field-title')} title={field.name}>\n {field.name}\n </div>\n <div className={b('field-actions')}>\n <Button onClick={removeField.bind(null, {field, placeholder})}>\n <Icon data={XmarkIcon} size={16} />\n </Button>\n </div>\n </div>\n );\n })}\n </div>\n );\n};\n","import React from 'react';\nimport {PlaceholderComponent} from './Placeholder/Placeholder';\nimport {Field} from '../../types';\nimport block from 'bem-cn-lite';\nimport './PlaceholdersContainer.scss';\nimport {useSelector} from 'react-redux';\nimport {selectQueryResultVisualizationPlaceholders} from '../../store/selectors';\n\nconst b = block('placeholders-container');\n\ntype PlaceholdersContainerProps = {\n availableFields: Field[];\n};\n\nexport const PlaceholdersContainer = (props: PlaceholdersContainerProps) => {\n const placeholders = useSelector(selectQueryResultVisualizationPlaceholders);\n\n return (\n <div className={b()}>\n {placeholders.map((placeholder) => (\n <div className={b('placeholder-wrapper')} key={placeholder.id}>\n <PlaceholderComponent placeholder={placeholder} {...props} />\n </div>\n ))}\n </div>\n );\n};\n","import {YTApiId, ytApiV4Id} from '../../../../rum/rum-wrap-api';\nimport {Visualization} from '../types';\n\nimport debounce_ from 'lodash/debounce';\nimport type {QueryResultVisualizationAction} from './reducer';\nimport {QueryResultMetaScheme, getQueryResultMeta, readQueryResults} from '../../module/api';\nimport {getPrimitiveTypesMap} from '../../../../store/selectors/global/supported-features';\nimport thorYPath from '../../../../common/thor/ypath';\nimport {getType} from '../../../../components/SchemaDataType/dataTypes';\nimport {Type, parseV3Type} from '../../../../components/SchemaDataType/dateTypesV3';\nimport {getQueryResultGlobalSettings} from '../../module/query_result/selectors';\nimport {prepareFormattedValue} from '../../module/query_result/utils/format';\nimport {selectQueryResult} from './selectors';\nimport {RootState} from '../../../../store/reducers/index';\nimport {AppThunkDispatch} from '../../../../store/thunkDispatch';\nimport {wrapApiPromiseByToaster} from '../../../../utils/utils';\n\ntype SaveQueryChartConfig = {\n visualizations: Visualization[];\n queryId: string;\n};\n\nconst DELAY = 5 * 1000;\n\nconst debouncedSaveQueryChartConfig = debounce_(\n (dispatch: AppThunkDispatch<QueryResultVisualizationAction>, payload: SaveQueryChartConfig) => {\n const promise = ytApiV4Id\n .alterQuery(YTApiId.alterQuery, {\n parameters: {\n query_id: payload.queryId,\n annotations: {\n ui_chart_config: payload.visualizations,\n },\n },\n })\n .then(() => {\n dispatch({\n type: 'set-visualization-saved',\n data: {\n saved: true,\n },\n });\n });\n\n wrapApiPromiseByToaster(promise, {\n toasterName: 'saveQueryChartConfig',\n skipSuccessToast: true,\n errorContent: 'Failed to save query chart config',\n });\n },\n DELAY,\n);\n\nexport function saveQueryChartConfig(payload: SaveQueryChartConfig) {\n return (dispatch: AppThunkDispatch<QueryResultVisualizationAction>) => {\n dispatch({\n type: 'set-visualization-saved',\n data: {\n saved: false,\n },\n });\n\n debouncedSaveQueryChartConfig(dispatch, payload);\n };\n}\n\nexport function newbiusLoadQueryResults({\n queryId,\n resultIndex,\n}: {\n queryId: string;\n resultIndex: number;\n}) {\n return async (dispatch: AppThunkDispatch<any>, getState: () => RootState) => {\n const queryResultAlreadyExist = selectQueryResult(getState());\n\n if (queryResultAlreadyExist) {\n return;\n }\n\n const meta = await dispatch(getQueryResultMeta(queryId, resultIndex));\n\n if (meta?.error) throw meta.error;\n\n const typeMap = getPrimitiveTypesMap(getState());\n const scheme: QueryResultMetaScheme[] = thorYPath.getValue(meta?.schema) || [];\n const columns =\n scheme.map(({name, type_v3: typeV3}) => {\n return {\n name,\n type: getType(parseV3Type(typeV3 as Type, typeMap)),\n displayName: name,\n };\n }) || [];\n\n const settings = getQueryResultGlobalSettings();\n\n const result = await dispatch(\n readQueryResults(\n queryId,\n resultIndex,\n {\n start: 0,\n end: Infinity,\n },\n columns.map(({name}) => name),\n {cellsSize: settings.cellSize},\n ),\n );\n\n const {rows, yql_type_registry: types} = result;\n\n const queryResult = rows.map((v) => {\n return Object.entries(v).reduce(\n (acc, [k, [value, typeIndex]]) => {\n acc[k] = prepareFormattedValue(value, types[Number(typeIndex)]);\n return acc;\n },\n {} as Record<string, {$type: string; $value: unknown}>,\n );\n });\n\n dispatch({\n type: 'set-query-result',\n data: {\n queryResult,\n },\n });\n };\n}\n","import React, {useCallback, useMemo} from 'react';\nimport {Select, SelectOption} from '@gravity-ui/uikit';\nimport {selectQueryResultIndex} from '../../store/selectors';\nimport {useSelector} from 'react-redux';\nimport {useThunkDispatch} from '../../../../../store/thunkDispatch';\n\ntype QueryResultSelectProps = {\n resultCount: number;\n};\n\nexport function QueryResultSelect({resultCount}: QueryResultSelectProps) {\n const resultIndex = useSelector(selectQueryResultIndex);\n const dispatch = useThunkDispatch();\n\n const options = useMemo(() => {\n const result: SelectOption[] = [];\n\n for (let i = 0; i < resultCount; i++) {\n result.push({\n value: String(i),\n content: `Result #${i + 1}`,\n });\n }\n return result;\n }, [resultCount]);\n\n const onUpdate = useCallback(([value]: string[]) => {\n dispatch({\n type: 'set-result-index',\n data: Number(value),\n });\n }, []);\n\n const value = [String(resultIndex)];\n\n if (options.length === 1) {\n return null;\n }\n\n return <Select width=\"max\" value={value} options={options} onUpdate={onUpdate} />;\n}\n","import React, {useCallback, useState} from 'react';\nimport {Gear} from '@gravity-ui/icons';\nimport {Icon} from '@gravity-ui/uikit';\nimport Button from '../../../../../components/Button/Button';\nimport {DialogField, DialogTabField, FormApi, YTDFDialog} from '../../../../../components/Dialog';\nimport type {ChartSettings} from '../../types';\nimport {useSelector} from 'react-redux';\nimport {selectQueryResultChartSettings} from '../../store/selectors';\nimport {useThunkDispatch} from '../../../../../store/thunkDispatch';\n\ntype FormValues = ChartSettings;\n\nfunction pixelIntervalValidator(value: string) {\n return !value || /^\\d+$/.test(value) ? undefined : 'Should be a number';\n}\n\nconst xAxisTab: DialogTabField<DialogField<FormValues>> = {\n type: 'tab',\n name: 'xAxis',\n title: 'X axis',\n fields: [\n {\n name: 'legend',\n caption: 'Legend',\n type: 'radio',\n extras: {\n options: [\n {\n value: 'on',\n label: 'On',\n },\n {\n value: 'off',\n label: 'Off',\n },\n ],\n },\n },\n {\n name: 'labels',\n caption: 'Labels',\n type: 'radio',\n extras: {\n options: [\n {\n value: 'on',\n label: 'On',\n },\n {\n value: 'off',\n label: 'Off',\n },\n ],\n },\n },\n {\n caption: 'Title',\n name: 'title',\n type: 'text',\n },\n {\n caption: 'Grid step, px',\n name: 'pixelInterval',\n type: 'text',\n validator: pixelIntervalValidator,\n },\n ],\n};\n\nconst yAxisTab: DialogTabField<DialogField<FormValues>> = {\n type: 'tab',\n name: 'yAxis',\n title: 'Y axis',\n fields: [\n {\n name: 'labels',\n caption: 'Labels',\n type: 'radio',\n extras: {\n options: [\n {\n value: 'on',\n label: 'On',\n },\n {\n value: 'off',\n label: 'Off',\n },\n ],\n },\n },\n {\n caption: 'Title',\n name: 'title',\n type: 'text',\n },\n {\n name: 'grid',\n caption: 'Grid',\n type: 'radio',\n extras: {\n options: [\n {\n value: 'on',\n label: 'On',\n },\n {\n value: 'off',\n label: 'Off',\n },\n ],\n },\n },\n {\n caption: 'Grid step, px',\n name: 'pixelInterval',\n type: 'text',\n validator: pixelIntervalValidator,\n },\n ],\n};\n\nconst fields: DialogTabField<DialogField<FormValues>>[] = [xAxisTab, yAxisTab];\n\nexport function ChartSettingsComponent() {\n const [visible, setVisilbility] = useState(false);\n const chartSettings = useSelector(selectQueryResultChartSettings);\n const dispatch = useThunkDispatch();\n\n const handleOnOpen = useCallback(() => {\n setVisilbility(true);\n }, [setVisilbility]);\n\n const handleOnClose = useCallback(() => {\n setVisilbility(false);\n }, [setVisilbility]);\n\n const handleOnAdd = useCallback((form: FormApi<FormValues, Partial<FormValues>>) => {\n const data = form.getState().values;\n\n dispatch({\n type: 'set-chart-settings',\n data,\n });\n\n return Promise.resolve();\n }, []);\n\n return (\n <span>\n <Button onClick={handleOnOpen}>\n <Icon data={Gear} size={16} />\n </Button>\n <YTDFDialog<FormValues>\n visible={visible}\n initialValues={chartSettings}\n onClose={handleOnClose}\n onAdd={handleOnAdd}\n fields={fields}\n />\n </span>\n );\n}\n","import React, {useCallback, useMemo} from 'react';\nimport {Select} from '@gravity-ui/uikit';\nimport type {VisualizationId} from '../../types';\nimport {useSelector} from 'react-redux';\nimport {selectQueryResultVisualizationId} from '../../store/selectors';\nimport {useThunkDispatch} from '../../../../../store/thunkDispatch';\n\nconst options = [\n {\n value: 'line',\n content: 'Line chart',\n },\n {\n value: 'bar-x',\n content: 'Bar chart',\n },\n {\n value: 'scatter',\n content: 'Scatter chart',\n },\n];\n\nexport function VisualizationSelector() {\n const visualizationId = useSelector(selectQueryResultVisualizationId);\n const dispatch = useThunkDispatch();\n\n const value = useMemo(() => {\n return [visualizationId];\n }, [visualizationId]);\n\n const onUpdate = useCallback(\n ([visualization]: string[]) => {\n dispatch({\n type: 'set-visualization',\n data: visualization as VisualizationId,\n });\n },\n [dispatch],\n );\n\n return (\n <Select<VisualizationId> width={125} value={value} options={options} onUpdate={onUpdate} />\n );\n}\n","import * as React from 'react';\nconst ArrowsRotateRight = (props) => (React.createElement(\"svg\", Object.assign({ xmlns: \"http://www.w3.org/2000/svg\", width: 16, height: 16, fill: \"none\", viewBox: \"0 0 16 16\" }, props),\n React.createElement(\"path\", { fill: \"currentColor\", fillRule: \"evenodd\", d: \"M8 1.5a6.501 6.501 0 0 0-6.445 5.649.75.75 0 1 0 1.488.194A5.001 5.001 0 0 1 11.57 4.5h-1.32a.75.75 0 0 0 0 1.5h3a.75.75 0 0 0 .75-.75v-3a.75.75 0 0 0-1.5 0v1.06A6.48 6.48 0 0 0 8 1.5Zm-5.25 13a.75.75 0 0 1-.75-.75v-3a.75.75 0 0 1 .75-.75h3a.75.75 0 0 1 0 1.5H4.43a5.001 5.001 0 0 0 8.528-2.843.75.75 0 1 1 1.487.194A6.501 6.501 0 0 1 3.5 12.691v1.059a.75.75 0 0 1-.75.75Z\", clipRule: \"evenodd\" })));\nexport default ArrowsRotateRight;\n","import React from 'react';\nimport {useSelector} from 'react-redux';\nimport {selectQueryResultChartSaved} from '../../store/selectors';\nimport {ArrowsRotateRight, CircleCheck} from '@gravity-ui/icons';\nimport {Icon, Tooltip} from '@gravity-ui/uikit';\nimport block from 'bem-cn-lite';\nimport './SavingIndicator.scss';\n\nconst b = block('saving-indicator');\n\nexport function SavingIndicator() {\n const saved = useSelector(selectQueryResultChartSaved);\n const tooltipContent = saved ? 'Saved' : 'Saving in progress';\n\n return (\n <Tooltip content={tooltipContent}>\n <Icon className={b({saved})} data={saved ? CircleCheck : ArrowsRotateRight} size={16} />\n </Tooltip>\n );\n}\n","import * as React from 'react';\nimport {useState} from 'react';\nimport {useSelector} from 'react-redux';\nimport type {AlertProps} from '@gravity-ui/uikit';\nimport {Alert, Button, Icon} from '@gravity-ui/uikit';\nimport block from 'bem-cn-lite';\nimport {resultsPlaceholdersValidation} from '../../store/selectors';\nimport {CircleExclamation as CircleExclamationIcon} from '@gravity-ui/icons';\n\nimport './ChartValidation.scss';\n\nconst b = block('chart-validation');\n\nconst Msg = () => (\n <span\n dangerouslySetInnerHTML={{\n __html: 'Your data contains duplicate values for one or more points. </br> This can lead to incorrect graph plotting. Please ensure that each point has a unique value.',\n }}\n />\n);\n\nconst ALERT_PROPS = {\n title: 'Duplicate Values',\n theme: 'warning' as AlertProps['theme'],\n message: <Msg />,\n icon: (\n <Icon className={b('field-icon', {invalid: true})} data={CircleExclamationIcon} size={16} />\n ),\n};\n\nexport const ChartValidation: React.FC<React.PropsWithChildren<{}>> = ({children}) => {\n const [isErrorHidden, hideError] = useState(false);\n const placeholdersValidation = useSelector(resultsPlaceholdersValidation);\n const hasError = placeholdersValidation?.x?.invalid || placeholdersValidation?.y?.invalid;\n const showBigAlert = hasError && !isErrorHidden;\n const showSmallAlert = isErrorHidden;\n\n if (showBigAlert) {\n return (\n <div className={b()}>\n <Alert\n {...ALERT_PROPS}\n actions={\n <Alert.Actions>\n <Button onClick={() => hideError(true)}>Show chart</Button>\n </Alert.Actions>\n }\n />\n </div>\n );\n }\n\n if (showSmallAlert) {\n return (\n <>\n <div className={b('alert')}>\n <Alert {...ALERT_PROPS} />\n </div>\n {children}\n </>\n );\n }\n\n return children;\n};\n","import * as React from 'react';\nconst CircleExclamation = (props) => (React.createElement(\"svg\", Object.assign({ xmlns: \"http://www.w3.org/2000/svg\", width: 16, height: 16, fill: \"none\", viewBox: \"0 0 16 16\" }, props),\n React.createElement(\"path\", { fill: \"currentColor\", fillRule: \"evenodd\", d: \"M8 13.5a5.5 5.5 0 1 0 0-11 5.5 5.5 0 0 0 0 11ZM8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14Zm1-4.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM8.75 5a.75.75 0 0 0-1.5 0v2.5a.75.75 0 0 0 1.5 0V5Z\", clipRule: \"evenodd\" })));\nexport default CircleExclamation;\n","import React, {useEffect} from 'react';\nimport {useDispatch, useSelector} from 'react-redux';\nimport throttle_ from 'lodash/throttle';\nimport block from 'bem-cn-lite';\nimport {type ChartKitRef} from '@gravity-ui/chartkit';\nimport {Chart} from '../Chart/Chart';\nimport {QueryItem} from '../../../module/api';\nimport useResizeObserver from '../../../../../hooks/useResizeObserver';\nimport {Loader} from '@gravity-ui/uikit';\nimport {PlaceholdersContainer} from '../PlaceholdersContainer/PlaceholdersContainer';\nimport './QueryResultsVisualization.scss';\nimport {newbiusLoadQueryResults, saveQueryChartConfig} from '../../store/actions';\nimport {\n selectAvailableFields,\n selectQueryId,\n selectQueryResult,\n selectQueryResultAllVisualizations,\n selectQueryResultIndex,\n} from '../../store/selectors';\nimport {QueryResultSelect} from '../VisualizationSelect/VisualizationSelect';\nimport {ChartSettingsComponent} from '../ChartSettings/ChartSettings';\nimport {VisualizationSelector} from '../VisualizationSelector/VisualizationSelector';\nimport {SavingIndicator} from '../SavingIndicator/SavingIndicator';\nimport {ChartErrorBoundary} from '../../components/ChartErrorBoundary/ChartErrorBoundary';\nimport {ChartValidation} from '../ChartValidation/ChartValidation';\n\nconst b = block('query-result-visualization');\n\ntype QueryResultsVisualizationProps = {\n query: QueryItem;\n index: number;\n};\n\nexport function QueryResultsVisualization({query}: QueryResultsVisualizationProps) {\n const containerRef = React.useRef<HTMLDivElement>(null);\n const chartKitRef = React.useRef<ChartKitRef>();\n const allVisualizations = useSelector(selectQueryResultAllVisualizations);\n const resultIndex = useSelector(selectQueryResultIndex);\n const queryResult = useSelector(selectQueryResult);\n const queryId = useSelector(selectQueryId);\n const availableFields = useSelector(selectAvailableFields);\n\n const dispatch = useDispatch();\n\n useEffect(() => {\n const weRecievedNewQuery = query.id !== queryId;\n\n if (weRecievedNewQuery) {\n dispatch({\n type: 'set-query',\n data: {\n query,\n },\n });\n }\n }, [query.id, queryId]);\n\n useEffect(() => {\n dispatch(\n newbiusLoadQueryResults({\n queryId: query.id,\n resultIndex,\n }),\n );\n }, [query.id, resultIndex, dispatch]);\n\n useEffect(() => {\n dispatch(\n saveQueryChartConfig({\n queryId: query.id,\n visualizations: allVisualizations,\n }),\n );\n }, [query.id, allVisualizations]);\n\n const debouncedChartResize = React.useMemo(() => {\n return throttle_(() => {\n chartKitRef.current?.reflow();\n }, 300);\n }, [chartKitRef.current]);\n\n useResizeObserver({\n element: containerRef.current ?? undefined,\n onResize: debouncedChartResize,\n });\n\n if (!queryResult) {\n return (\n <div className={b('loader-wrapper')}>\n <Loader className={b('loader')} />\n </div>\n );\n }\n\n return (\n <div className={b()} ref={containerRef}>\n <div className={b('controls-wrapper')}>\n <div className={b('group-wrapper')}>\n <QueryResultSelect resultCount={query.result_count} />\n </div>\n <div className={b('group-wrapper')}>\n <VisualizationSelector />\n <ChartSettingsComponent />\n <SavingIndicator />\n </div>\n <PlaceholdersContainer availableFields={availableFields} />\n </div>\n <div className={b('chartkit-wrapper')}>\n <ChartErrorBoundary>\n <ChartValidation>\n <Chart result={queryResult} ref={chartKitRef} />\n </ChartValidation>\n </ChartErrorBoundary>\n </div>\n </div>\n );\n}\n","import React from 'react';\nimport ResizeObserver from 'resize-observer-polyfill';\n\ninterface Props {\n element?: Element;\n onResize: ResizeObserverCallback;\n}\n\nexport default function useResizeObserver({element, onResize}: Props) {\n React.useEffect(() => {\n if (element) {\n const observer = new ResizeObserver(onResize);\n observer.observe(element);\n return () => {\n if (element) {\n observer.unobserve(element);\n }\n };\n } else {\n return undefined;\n }\n }, [element, onResize]);\n}\n","import unipika from '../../../../../common/thor/unipika';\nimport {TypeArray} from '../../../../../components/SchemaDataType/dataTypes';\nimport {UnipikaSettings} from '../../../../../components/Yson/StructuredYson/StructuredYsonTypes';\n\nconst defaultSettings: UnipikaSettings = {\n escapeWhitespace: false,\n decodeUTF8: true,\n binaryAsHex: true,\n escapeYQLStrings: true,\n omitStructNull: true,\n maxListSize: 50,\n maxStringSize: undefined,\n treatValAsData: true,\n};\n\nexport function convert(\n value: unknown,\n dataType: TypeArray,\n settings: UnipikaSettings,\n): {$type: string; $value: any; $tag?: any} {\n try {\n return unipika.converters.yql([value, dataType], settings);\n } catch (error) {\n console.log(error);\n let valueStr: string;\n try {\n valueStr = JSON.stringify(value);\n } catch {\n valueStr = String(value);\n }\n return unipika.format(\n {$value: `Failed to convert value: ${valueStr}`, $type: 'yql.string'},\n settings,\n );\n }\n}\n\nexport function formatResults(\n value: {$type: string; $value: unknown; $tag?: unknown},\n settings: UnipikaSettings = defaultSettings,\n) {\n try {\n return unipika.format(value, settings);\n } catch (error) {\n let valueStr: string;\n try {\n valueStr = JSON.stringify(value);\n } catch {\n valueStr = String(value);\n }\n return unipika.format(\n {$value: `Failed to format value: ${valueStr}`, $type: 'yql.string'},\n settings,\n );\n }\n}\n\nconst maxFormattedLength = 10000;\n\nexport function prepareFormattedValue(\n value: unknown,\n type: TypeArray,\n settings: UnipikaSettings = defaultSettings,\n) {\n const convertedValue = convert(value, type, settings);\n\n let fullValue = convertedValue;\n if (settings?.maxStringSize) {\n fullValue = convert(value, type, {\n ...settings,\n maxStringSize: undefined,\n });\n }\n\n let $rawValue = '';\n let formatValue = true;\n if (fullValue.$type === 'yql.tagged' && fullValue.$tag === 'url') {\n const node = fullValue.$value;\n if (node.$type === 'tag_value') {\n $rawValue = node.$value.text || node.$value.href;\n } else if (typeof node.$value === 'string') {\n $rawValue = node.$value;\n }\n } else {\n $rawValue = formatResults(fullValue, {\n ...settings,\n asHTML: false,\n maxStringSize: undefined,\n });\n formatValue = $rawValue.length < maxFormattedLength;\n }\n\n const $formattedValue = formatValue ? formatResults(convertedValue, settings) : `Escaped value`;\n return {\n ...fullValue,\n $formattedValue,\n $fullFormattedValue:\n convertedValue === fullValue\n ? $formattedValue\n : formatValue\n ? formatResults(fullValue, {...settings, maxStringSize: undefined})\n : '',\n $rawValue,\n };\n}\n","import {createSelector} from 'reselect';\n\nimport find_ from 'lodash/find';\nimport forEach_ from 'lodash/forEach';\nimport map_ from 'lodash/map';\nimport sortBy_ from 'lodash/sortBy';\n\nimport {RootState} from '../../../store/reducers';\nimport {getCluster} from './index';\nimport {SelectWithSubItemsProps} from '../../../components/Dialog/controls/SelectWithSubItems/SelectWithSubItems';\nimport {OperationStatisticInfo} from '../../../store/reducers/global/supported-features';\n\nconst getSupportedFeaturesRaw = (state: RootState) => state.supportedFeatures.features;\nconst getSupportedFeaturesCluster = (state: RootState) => state.supportedFeatures.featuresCluster;\n\n// Record<codec, level>\nconst RECOMMENDED_COMPRESSION_CODECS: Record<string, string> = {\n lz4: '',\n zstd_: '5',\n zlib_: '9',\n brotli_: '8',\n lzma_: '6',\n};\n\nconst RECOMMENDED = ' (recommended)';\n\nconst getSupportedFeatures = createSelector(\n [getCluster, getSupportedFeaturesCluster, getSupportedFeaturesRaw],\n (cluster, featuresCluster, features) => {\n return cluster === featuresCluster ? features : {};\n },\n);\n\nexport const getErasureCodecs = createSelector([getSupportedFeatures], (features) => {\n return map_(features.erasure_codecs, (value) => {\n return {value, text: value};\n }).sort(compareItems);\n});\n\nexport const getPrimitiveTypes = createSelector([getSupportedFeatures], (features) => {\n return sortBy_(features.primitive_types).map((value) => {\n return {value, text: value};\n });\n});\n\nexport const getPrimitiveTypesMap = createSelector([getPrimitiveTypes], (types) => {\n return new Set(types.map(({value}) => value));\n});\n\nexport const getCompressionCodecs = createSelector([getSupportedFeatures], (features) => {\n return prepareItemsSubitems(features.compression_codecs);\n});\n\nexport const makeCompressionCodecFinder = createSelector([getCompressionCodecs], ({items}) => {\n return (codec: string) => {\n if (!codec) {\n return undefined;\n }\n\n const item = find_(items, (x) => {\n return x.value === codec;\n });\n if (item) {\n return [item.value as string];\n }\n\n const [first, ...rest] = codec.split('_');\n const subCodec = rest.join('_');\n\n return [first + '_', subCodec];\n };\n});\n\nexport type CompressionCodecs = Required<\n Pick<SelectWithSubItemsProps, 'items' | 'subItemsMap' | 'labels'>\n>;\n\nfunction prepareItemsSubitems(arr: Array<string> = []): CompressionCodecs {\n const res: CompressionCodecs = {\n items: [],\n subItemsMap: {},\n labels: ['Codec:', 'level:'],\n };\n\n const {items, subItemsMap} = res;\n\n for (const item of arr) {\n const parts = item.split('_');\n const [first, ...rest] = parts;\n\n if (rest.length) {\n const value = first + '_';\n\n if (!subItemsMap[value]) {\n items.push({value, content: value});\n }\n\n const dst = (subItemsMap[value] = subItemsMap[value] || new Array<string>());\n const subValue = rest.join('_');\n dst.push({value: subValue, content: subValue});\n } else {\n items.push({value: item, content: item});\n }\n }\n\n forEach_(subItemsMap, (subItems, key) => {\n const index = items.findIndex(({value}) => value === key);\n if (index === -1) {\n return;\n }\n subItems.sort(compareItems);\n if (subItems.length === 1) {\n const value = items[index].value + subItems[0].value;\n items[index] = {value, content: value};\n delete subItemsMap[key];\n } else {\n const item = items[index];\n item.content = `${item.value}[${subItems[0].value}-${\n subItems[subItems.length - 1].value\n }]`;\n }\n\n const recommended = RECOMMENDED_COMPRESSION_CODECS[key];\n if (recommended) {\n const subItems2 = subItemsMap[key];\n if (subItems2) {\n const first = subItems2[0];\n const last = subItems2[subItems2.length - 1];\n first.content = first.value + ' (faster)';\n last.content = last.value + ' (slower & smaller)';\n\n const item = subItems2.find(({value}) => value === recommended);\n if (item) {\n item.content = item.value + RECOMMENDED;\n }\n } else {\n items[index].content += RECOMMENDED;\n }\n }\n });\n\n items.sort(compareItems);\n return res;\n}\n\nfunction compareItems(l: {value: string}, r: {value: string}) {\n if (l.value === r.value) {\n return 0;\n }\n\n if (l.value === 'none') {\n return -1;\n }\n\n if (r.value === 'none') {\n return 1;\n }\n\n const lValue = String(Number(l.value)) === l.value ? Number(l.value) : l.value;\n const rValue = String(Number(r.value)) === r.value ? Number(r.value) : r.value;\n\n return lValue < rValue ? -1 : 1;\n}\n\nexport const getOperationStatisticsDescription = createSelector(\n [getSupportedFeaturesRaw],\n ({operation_statistics_descriptions}) => {\n const byName: Record<string, OperationStatisticInfo> = {};\n const byRegexp: Array<OperationStatisticInfo & {regexp: RegExp}> = [];\n forEach_(operation_statistics_descriptions, (item, key) => {\n const idx = key.indexOf('*');\n if (idx !== -1) {\n const tmp = key.replace(/\\//g, '\\\\/').replace(/\\*/g, '[^/]*');\n byRegexp.push({\n ...item,\n regexp: new RegExp(tmp),\n });\n } else {\n byName[key] = item;\n }\n });\n\n return {\n byName,\n byRegexp,\n };\n },\n);\n","import {AnyAction} from 'redux';\nimport {ThunkDispatch} from 'redux-thunk';\nimport {RootState} from './reducers';\nimport {useDispatch} from 'react-redux';\n\nexport type AppThunkDispatch<T extends AnyAction> = ThunkDispatch<RootState, any, T>;\n\nexport const useThunkDispatch = () => useDispatch<AppThunkDispatch<AnyAction>>();\n","import { I18N } from '@gravity-ui/i18n';\nimport en from './keysets/en.json';\nimport ru from './keysets/ru.json';\nconst i18nFactory = new I18N();\nconst EN = 'en';\nconst RU = 'ru';\ni18nFactory.registerKeysets(EN, en);\ni18nFactory.registerKeysets(RU, ru);\nconst i18n = i18nFactory.i18n.bind(i18nFactory);\nexport { i18nFactory, i18n };\n","export const CHARTKIT_ERROR_CODE = {\n NO_DATA: 'ERR.CK.NO_DATA',\n INVALID_DATA: 'ERR.CK.INVALID_DATA',\n UNKNOWN: 'ERR.CK.UNKNOWN_ERROR',\n UNKNOWN_PLUGIN: 'ERR.CK.UNKNOWN_PLUGIN',\n TOO_MANY_LINES: 'ERR.CK.TOO_MANY_LINES',\n};\nexport class ChartKitError extends Error {\n constructor({ originalError, message, code = CHARTKIT_ERROR_CODE.UNKNOWN, } = {}) {\n super(message);\n this.isCustomError = true;\n this.code = code;\n if (originalError) {\n this.name = originalError.name;\n this.stack = originalError.stack;\n }\n }\n}\nexport const isChartKitError = (error) => {\n return error instanceof Error && 'isCustomError' in error;\n};\n","import isObject from 'lodash/isObject';\nimport mergeWith from 'lodash/mergeWith';\n// @ts-ignore\nexport function mergeSettingStrategy(objValue, srcValue, key) {\n if (key === 'plugins') {\n const currentPlugins = [...objValue];\n const newPlugins = [...srcValue];\n // modify existing plugins\n let newSettingsPlugins = currentPlugins.map((currentPlugin) => {\n const newPluginIndex = newPlugins.findIndex(({ type }) => type === currentPlugin.type);\n if (newPluginIndex !== -1) {\n const newPlugin = newPlugins[newPluginIndex];\n newPlugins.splice(newPluginIndex, 1);\n return {\n type: currentPlugin.type,\n renderer: newPlugin.renderer,\n };\n }\n return currentPlugin;\n });\n // add new plugins if it exist after modified\n if (newPlugins.length > 0) {\n newSettingsPlugins = [...newSettingsPlugins, ...newPlugins];\n }\n return newSettingsPlugins;\n }\n if (isObject(objValue)) {\n return mergeWith(objValue, srcValue, mergeSettingStrategy);\n }\n return srcValue;\n}\n","import { configure } from '@gravity-ui/uikit';\nimport get from 'lodash/get';\nimport mergeWith from 'lodash/mergeWith';\nimport { i18nFactory } from '../../i18n';\nimport { EventEmitter } from './eventEmitter';\nimport { mergeSettingStrategy } from './mergeSettingStrategy';\nexport const settingsEventEmitter = new EventEmitter();\nconst removeUndefinedValues = (data) => {\n return Object.entries(data).reduce((acc, [key, value]) => {\n if (typeof value !== 'undefined') {\n acc[key] = value;\n }\n return acc;\n }, {});\n};\nconst updateLang = (lang) => {\n configure({ lang });\n i18nFactory.setLang(lang);\n};\nclass ChartKitSettings {\n constructor() {\n this.settings = {\n plugins: [],\n lang: 'en',\n };\n updateLang(this.get('lang'));\n }\n get(key) {\n return get(this.settings, key);\n }\n set(updates) {\n const filteredUpdates = removeUndefinedValues(updates);\n this.settings = mergeWith(this.settings, filteredUpdates, mergeSettingStrategy);\n if (filteredUpdates.lang) {\n const lang = filteredUpdates.lang || this.get('lang');\n updateLang(lang);\n settingsEventEmitter.dispatch('change-lang', lang);\n }\n }\n}\nexport const settings = new ChartKitSettings();\n","export class EventEmitter {\n constructor() {\n this.events = {};\n }\n on(type, event) {\n if (this.events[type]) {\n this.events[type].push(event);\n }\n else {\n this.events[type] = [event];\n }\n }\n off(type, eventId) {\n if (this.events[type]) {\n this.events[type] = this.events[type].filter(({ id }) => id !== eventId);\n }\n }\n dispatch(type, args) {\n if (this.events[type]) {\n this.events[type].forEach(({ action }) => {\n action(args);\n });\n }\n }\n}\n","import { withNaming } from '@bem-react/classname';\nexport const NAMESPACE = 'chartkit-';\nexport const cn = withNaming({ e: '__', m: '_' });\nexport const block = withNaming({ n: NAMESPACE, e: '__', m: '_' });\n","export const randomString = (length, chars) => {\n let result = '';\n for (let i = length; i > 0; --i) {\n result += chars[Math.floor(Math.random() * chars.length)];\n }\n return result;\n};\nexport const getRandomCKId = () => `ck.${randomString(10, '0123456789abcdefghijklmnopqrstuvwxyz')}`;\n","import * as React from 'react';\nconst Gear = (props) => (React.createElement(\"svg\", Object.assign({ xmlns: \"http://www.w3.org/2000/svg\", width: 16, height: 16, fill: \"none\", viewBox: \"0 0 16 16\" }, props),\n React.createElement(\"g\", { clipPath: \"url(#a)\" },\n React.createElement(\"path\", { fill: \"currentColor\", fillRule: \"evenodd\", d: \"M7.199 2H8.8a.2.2 0 0 1 .2.2c0 1.808 1.958 2.939 3.524 2.034a.199.199 0 0 1 .271.073l.802 1.388a.199.199 0 0 1-.073.272c-1.566.904-1.566 3.164 0 4.069a.199.199 0 0 1 .073.271l-.802 1.388a.199.199 0 0 1-.271.073C10.958 10.863 9 11.993 9 13.8a.2.2 0 0 1-.199.2H7.2a.199.199 0 0 1-.2-.2c0-1.808-1.958-2.938-3.524-2.034a.199.199 0 0 1-.272-.073l-.8-1.388a.199.199 0 0 1 .072-.271c1.566-.905 1.566-3.165 0-4.07a.199.199 0 0 1-.073-.271l.801-1.388a.199.199 0 0 1 .272-.073C5.042 5.138 7 4.007 7 2.2c0-.11.089-.199.199-.199ZM5.5 2.2c0-.94.76-1.7 1.699-1.7H8.8c.94 0 1.7.76 1.7 1.7a.85.85 0 0 0 1.274.735 1.699 1.699 0 0 1 2.32.622l.802 1.388c.469.813.19 1.851-.622 2.32a.85.85 0 0 0 0 1.472 1.7 1.7 0 0 1 .622 2.32l-.802 1.388a1.699 1.699 0 0 1-2.32.622.85.85 0 0 0-1.274.735c0 .939-.76 1.7-1.699 1.7H7.2a1.7 1.7 0 0 1-1.699-1.7.85.85 0 0 0-1.274-.735 1.698 1.698 0 0 1-2.32-.622l-.802-1.388a1.699 1.699 0 0 1 .622-2.32.85.85 0 0 0 0-1.471 1.699 1.699 0 0 1-.622-2.321l.801-1.388a1.699 1.699 0 0 1 2.32-.622A.85.85 0 0 0 5.5 2.2Zm4 5.8a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0ZM11 8a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z\", clipRule: \"evenodd\" })),\n React.createElement(\"defs\", null,\n React.createElement(\"clipPath\", { id: \"a\" },\n React.createElement(\"path\", { fill: \"currentColor\", d: \"M0 0h16v16H0z\" })))));\nexport default Gear;\n","import React from 'react';\nexport const AlertContext = React.createContext(null);\n","'use client';\nimport React from 'react';\nimport { AlertContext } from './AlertContext';\nexport const useAlertContext = () => {\n const context = React.useContext(AlertContext);\n if (!context)\n throw new Error('Alert: `useAlertContext` hook is used out of \"AlertContext\"');\n return context;\n};\n","'use client';\nimport React from 'react';\nimport { Button } from '../Button';\nimport { useAlertContext } from './useAlertContext';\nexport const AlertAction = (props) => {\n const { view } = useAlertContext();\n return React.createElement(Button, Object.assign({ view: view === 'filled' ? 'normal-contrast' : undefined }, props));\n};\n","import { block } from '../utils/cn';\nimport './Alert.css';\nexport const DEFAULT_ICON_SIZE = 18;\nexport const bAlert = block('alert');\n","'use client';\nimport React from 'react';\nimport { AlertContext } from './AlertContext';\nexport const AlertContextProvider = ({ layout, view, children }) => {\n return React.createElement(AlertContext.Provider, { value: { layout, view } }, children);\n};\n","import React from 'react';\nimport { CircleCheck, CircleCheckFill, CircleInfo, CircleInfoFill, CircleXmark, CircleXmarkFill, Thunderbolt, ThunderboltFill, TriangleExclamation, TriangleExclamationFill, } from '@gravity-ui/icons';\nimport { Icon } from '../Icon';\nimport { colorText } from '../Text/colorText/colorText';\nimport { DEFAULT_ICON_SIZE, bAlert } from './constants';\nconst typeToIcon = {\n danger: {\n filled: CircleXmarkFill,\n outlined: CircleXmark,\n },\n info: {\n filled: CircleInfoFill,\n outlined: CircleInfo,\n },\n success: {\n filled: CircleCheckFill,\n outlined: CircleCheck,\n },\n warning: {\n filled: TriangleExclamationFill,\n outlined: TriangleExclamation,\n },\n utility: {\n filled: ThunderboltFill,\n outlined: Thunderbolt,\n },\n normal: null,\n};\nexport const AlertIcon = ({ className, theme, view = 'filled', size = DEFAULT_ICON_SIZE, }) => {\n const iconByTheme = typeToIcon[theme];\n if (!iconByTheme) {\n return null;\n }\n let color;\n if (theme === 'success') {\n color = 'positive';\n }\n else if (theme !== 'normal') {\n color = theme;\n }\n return (React.createElement(\"div\", { className: bAlert('icon', colorText({ color }, className)) },\n React.createElement(Icon, { data: iconByTheme[view], size: size })));\n};\n","import * as React from 'react';\nconst CircleXmarkFill = (props) => (React.createElement(\"svg\", Object.assign({ xmlns: \"http://www.w3.org/2000/svg\", width: 16, height: 16, fill: \"none\", viewBox: \"0 0 16 16\" }, props),\n React.createElement(\"path\", { fill: \"currentColor\", fillRule: \"evenodd\", d: \"M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14ZM6.53 5.47a.75.75 0 0 0-1.06 1.06L6.94 8 5.47 9.47a.75.75 0 1 0 1.06 1.06L8 9.06l1.47 1.47a.75.75 0 1 0 1.06-1.06L9.06 8l1.47-1.47a.75.75 0 1 0-1.06-1.06L8 6.94 6.53 5.47Z\", clipRule: \"evenodd\" })));\nexport default CircleXmarkFill;\n","import * as React from 'react';\nconst CircleXmark = (props) => (React.createElement(\"svg\", Object.assign({ xmlns: \"http://www.w3.org/2000/svg\", width: 16, height: 16, fill: \"none\", viewBox: \"0 0 16 16\" }, props),\n React.createElement(\"path\", { fill: \"currentColor\", fillRule: \"evenodd\", d: \"M13.5 8a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0ZM15 8A7 7 0 1 1 1 8a7 7 0 0 1 14 0ZM6.53 5.47a.75.75 0 0 0-1.06 1.06L6.94 8 5.47 9.47a.75.75 0 1 0 1.06 1.06L8 9.06l1.47 1.47a.75.75 0 1 0 1.06-1.06L9.06 8l1.47-1.47a.75.75 0 1 0-1.06-1.06L8 6.94 6.53 5.47Z\", clipRule: \"evenodd\" })));\nexport default CircleXmark;\n","import * as React from 'react';\nconst CircleInfoFill = (props) => (React.createElement(\"svg\", Object.assign({ xmlns: \"http://www.w3.org/2000/svg\", width: 16, height: 16, fill: \"none\", viewBox: \"0 0 16 16\" }, props),\n React.createElement(\"path\", { fill: \"currentColor\", fillRule: \"evenodd\", d: \"M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14Zm1-9.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM8 7.75a.75.75 0 0 1 .75.75V11a.75.75 0 0 1-1.5 0V8.5A.75.75 0 0 1 8 7.75Z\", clipRule: \"evenodd\" })));\nexport default CircleInfoFill;\n","import * as React from 'react';\nconst CircleCheckFill = (props) => (React.createElement(\"svg\", Object.assign({ xmlns: \"http://www.w3.org/2000/svg\", width: 16, height: 16, fill: \"none\", viewBox: \"0 0 16 16\" }, props),\n React.createElement(\"path\", { fill: \"currentColor\", fillRule: \"evenodd\", d: \"M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14Zm3.1-8.55a.75.75 0 1 0-1.2-.9L7.419 8.858 6.03 7.47a.75.75 0 0 0-1.06 1.06l2 2a.75.75 0 0 0 1.13-.08l3-4Z\", clipRule: \"evenodd\" })));\nexport default CircleCheckFill;\n","import * as React from 'react';\nconst TriangleExclamationFill = (props) => (React.createElement(\"svg\", Object.assign({ xmlns: \"http://www.w3.org/2000/svg\", width: 16, height: 16, fill: \"none\", viewBox: \"0 0 16 16\" }, props),\n React.createElement(\"path\", { fill: \"currentColor\", fillRule: \"evenodd\", d: \"M5.836 2.244c.962-1.665 3.366-1.665 4.328 0l4.917 8.505c.964 1.666-.239 3.751-2.164 3.751H3.083c-1.925 0-3.128-2.085-2.164-3.751l4.917-8.505ZM8 5a.75.75 0 0 1 .75.75v2a.75.75 0 1 1-1.5 0v-2A.75.75 0 0 1 8 5Zm1 5.75a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z\", clipRule: \"evenodd\" })));\nexport default TriangleExclamationFill;\n","import * as React from 'react';\nconst ThunderboltFill = (props) => (React.createElement(\"svg\", Object.assign({ xmlns: \"http://www.w3.org/2000/svg\", width: 16, height: 16, fill: \"none\", viewBox: \"0 0 16 16\" }, props),\n React.createElement(\"path\", { fill: \"currentColor\", d: \"m14.61 6.914-7.632 8.08a1.614 1.614 0 0 1-2.69-1.66L5.5 10H2.677A1.677 1.677 0 0 1 1.12 7.7l2.323-5.807A2.216 2.216 0 0 1 5.5.5h4c.968 0 1.637.967 1.298 1.873L10 4.5h3.569a1.431 1.431 0 0 1 1.04 2.414Z\" })));\nexport default ThunderboltFill;\n","import { addComponentKeysets } from '../../utils/addComponentKeysets';\nimport en from './en.json';\nimport ru from './ru.json';\nconst COMPONENT = 'Alert';\nexport default addComponentKeysets({ en, ru }, COMPONENT);\n","import React from 'react';\nimport { Xmark } from '@gravity-ui/icons';\nimport { Button } from '../Button';\nimport { Card } from '../Card';\nimport { Icon } from '../Icon';\nimport { colorText } from '../Text';\nimport { Flex, spacing } from '../layout';\nimport { AlertAction } from './AlertAction';\nimport { AlertActions } from './AlertActions';\nimport { AlertContextProvider } from './AlertContextProvider';\nimport { AlertIcon } from './AlertIcon';\nimport { AlertTitle } from './AlertTitle';\nimport { DEFAULT_ICON_SIZE, bAlert } from './constants';\nimport i18n from './i18n';\nexport const Alert = (props) => {\n const { theme = 'normal', view = 'filled', layout = 'vertical', message, className, corners, style, onClose, align, qa, } = props;\n return (React.createElement(AlertContextProvider, { layout: layout, view: view },\n React.createElement(Card, { style: style, className: bAlert({ corners }, spacing({ py: 4, px: 5 }, className)), theme: theme, view: view, qa: qa },\n React.createElement(Flex, { gap: \"3\", alignItems: align },\n typeof props.icon === 'undefined' ? (React.createElement(Alert.Icon, { theme: theme, view: view })) : (props.icon // ability to pass `null` as `icon` prop value\n ),\n React.createElement(Flex, { direction: layout === 'vertical' ? 'column' : 'row', gap: \"5\", grow: true },\n React.createElement(Flex, { gap: \"2\", grow: true, className: bAlert('text-content') },\n React.createElement(Flex, { direction: \"column\", gap: \"1\", grow: true, justifyContent: align },\n typeof props.title === 'string' ? (React.createElement(Alert.Title, { text: props.title })) : (props.title),\n message)),\n Array.isArray(props.actions) ? (React.createElement(Alert.Actions, { items: props.actions })) : (props.actions)),\n onClose && (React.createElement(Button, { view: \"flat\", className: bAlert('close-btn'), onClick: onClose, extraProps: {\n 'aria-label': i18n('label_close'),\n } },\n React.createElement(Icon, { data: Xmark, size: DEFAULT_ICON_SIZE, className: colorText({ color: 'secondary' }) })))))));\n};\nAlert.Icon = AlertIcon;\nAlert.Title = AlertTitle;\nAlert.Actions = AlertActions;\nAlert.Action = AlertAction;\n","import React from 'react';\nimport { Text } from '../Text';\nimport { bAlert } from './constants';\nexport const AlertTitle = ({ text, className }) => {\n return (React.createElement(Text, { variant: \"subheader-2\", className: bAlert('title', className) }, text));\n};\n","'use client';\nimport React from 'react';\nimport { Flex } from '../layout';\nimport { AlertAction } from './AlertAction';\nimport { bAlert } from './constants';\nimport { useAlertContext } from './useAlertContext';\nexport const AlertActions = ({ items, children, className }) => {\n const { layout } = useAlertContext();\n return (React.createElement(Flex, { className: bAlert('actions', { minContent: layout === 'horizontal' }, className), direction: \"row\", gap: \"3\", wrap: true, alignItems: layout === 'horizontal' ? 'center' : 'flex-start' }, (items === null || items === void 0 ? void 0 : items.map(({ handler, text }, i) => (React.createElement(AlertAction, { key: i, onClick: handler }, text)))) || children));\n};\n","'use client';\nimport { __rest } from \"tslib\";\nimport React from 'react';\nimport { useActionHandlers } from '../../hooks';\nimport { Box } from '../layout';\nimport { block } from '../utils/cn';\nimport './Card.css';\nconst b = block('card');\nexport const Card = React.forwardRef(function Card(props, ref) {\n const { type = 'container', theme, view, size = 'm', children, className, onClick, disabled, selected } = props, restProps = __rest(props, [\"type\", \"theme\", \"view\", \"size\", \"children\", \"className\", \"onClick\", \"disabled\", \"selected\"]);\n const isTypeAction = type === 'action';\n const isTypeSelection = type === 'selection';\n const isTypeContainer = type === 'container';\n /* Clickable card — only with type 'action' or 'selection' and not selected or disabled */\n const hasAction = isTypeAction || isTypeSelection;\n const isClickable = hasAction && Boolean(onClick) && !(disabled || selected);\n /* Theme only with type 'container' */\n const defaultTheme = isTypeContainer ? 'normal' : undefined;\n /* View only with type 'container' and 'selection' */\n const defaultView = isTypeContainer || isTypeSelection ? 'outlined' : undefined;\n const handleClick = isClickable ? onClick : undefined;\n const { onKeyDown } = useActionHandlers(onClick);\n return (React.createElement(Box, Object.assign({ ref: ref, role: isClickable ? 'button' : undefined, className: b({\n theme: theme || defaultTheme,\n view: view || defaultView,\n type,\n selected,\n size,\n disabled,\n clickable: isClickable,\n }, className), onClick: handleClick, onKeyDown: isClickable ? onKeyDown : undefined, tabIndex: isClickable ? 0 : undefined }, restProps), children));\n});\n","'use client';\nimport React from 'react';\nimport { useForkRef } from '../../hooks';\nimport { useTooltipVisible } from '../../hooks/private';\nimport { Popup } from '../Popup';\nimport { Text } from '../Text';\nimport { block } from '../utils/cn';\nimport './Tooltip.css';\nconst b = block('tooltip');\nconst DEFAULT_PLACEMENT = ['bottom', 'top'];\nexport const Tooltip = (props) => {\n const { children, content, disabled, placement = DEFAULT_PLACEMENT, qa, id, className, style, disablePortal, contentClassName, openDelay = 1000, closeDelay, } = props;\n const [anchorElement, setAnchorElement] = React.useState(null);\n const tooltipVisible = useTooltipVisible(anchorElement, {\n openDelay,\n closeDelay,\n preventTriggerOnFocus: true,\n });\n const renderPopup = () => {\n return (React.createElement(Popup, { id: id, role: \"tooltip\", className: b(null, className), style: style, open: tooltipVisible && !disabled, placement: placement, anchorRef: { current: anchorElement }, disablePortal: disablePortal, disableEscapeKeyDown: true, disableOutsideClick: true, disableLayer: true, qa: qa },\n React.createElement(\"div\", { className: b('content', contentClassName) },\n React.createElement(Text, { variant: \"body-short\", color: \"complementary\" }, content))));\n };\n const child = React.Children.only(children);\n const childRef = child.ref;\n const ref = useForkRef(setAnchorElement, childRef);\n return (React.createElement(React.Fragment, null,\n React.cloneElement(child, { ref }),\n anchorElement ? renderPopup() : null));\n};\n","import React from 'react';\nimport { KeyCode } from '../../../constants';\nimport { useBoolean } from '../useBoolean';\nexport const useTooltipVisible = (anchor, { openDelay = 250, closeDelay, preventTriggerOnFocus = false, }) => {\n const [tooltipVisible, showTooltip, hideTooltip] = useBoolean(false);\n const timeoutRef = React.useRef();\n const isFocusWithinRef = React.useRef(false);\n React.useEffect(() => {\n if (!anchor) {\n return undefined;\n }\n function handleMouseEnter() {\n clearTimeout(timeoutRef.current);\n timeoutRef.current = window.setTimeout(showTooltip, openDelay);\n }\n function handleMouseLeave() {\n clearTimeout(timeoutRef.current);\n timeoutRef.current = window.setTimeout(hideTooltip, closeDelay);\n }\n function handleFocusWithin(e) {\n if (!isFocusWithinRef.current && document.activeElement === e.target) {\n isFocusWithinRef.current = true;\n clearTimeout(timeoutRef.current);\n showTooltip();\n }\n }\n function handleBlurWithin(e) {\n if (isFocusWithinRef.current &&\n !e.currentTarget.contains(e.relatedTarget)) {\n isFocusWithinRef.current = false;\n clearTimeout(timeoutRef.current);\n hideTooltip();\n }\n }\n function handleKeyDown(e) {\n if (e.key === KeyCode.ESCAPE) {\n clearTimeout(timeoutRef.current);\n hideTooltip();\n }\n }\n anchor.addEventListener('mouseenter', handleMouseEnter);\n anchor.addEventListener('mouseleave', handleMouseLeave);\n anchor.addEventListener('keydown', handleKeyDown);\n if (!preventTriggerOnFocus) {\n anchor.addEventListener('focus', handleFocusWithin);\n anchor.addEventListener('blur', handleBlurWithin);\n }\n return () => {\n anchor.removeEventListener('mouseenter', handleMouseEnter);\n anchor.removeEventListener('mouseleave', handleMouseLeave);\n anchor.removeEventListener('focus', handleFocusWithin);\n anchor.removeEventListener('blur', handleBlurWithin);\n anchor.removeEventListener('keydown', handleKeyDown);\n };\n }, [anchor, showTooltip, hideTooltip, openDelay, closeDelay, preventTriggerOnFocus]);\n return tooltipVisible;\n};\n","import React from 'react';\nexport function useBoolean(initialState) {\n const [value, setValue] = React.useState(initialState);\n return [\n value,\n React.useCallback(() => setValue(true), []),\n React.useCallback(() => setValue(false), []),\n React.useCallback(() => setValue((val) => !val), []),\n ];\n}\n","/**\r\n * A collection of shims that provide minimal functionality of the ES6 collections.\r\n *\r\n * These implementations are not meant to be used outside of the ResizeObserver\r\n * modules as they cover only a limited range of use cases.\r\n */\r\n/* eslint-disable require-jsdoc, valid-jsdoc */\r\nvar MapShim = (function () {\r\n if (typeof Map !== 'undefined') {\r\n return Map;\r\n }\r\n /**\r\n * Returns index in provided array that matches the specified key.\r\n *\r\n * @param {Array<Array>} arr\r\n * @param {*} key\r\n * @returns {number}\r\n */\r\n function getIndex(arr, key) {\r\n var result = -1;\r\n arr.some(function (entry, index) {\r\n if (entry[0] === key) {\r\n result = index;\r\n return true;\r\n }\r\n return false;\r\n });\r\n return result;\r\n }\r\n return /** @class */ (function () {\r\n function class_1() {\r\n this.__entries__ = [];\r\n }\r\n Object.defineProperty(class_1.prototype, \"size\", {\r\n /**\r\n * @returns {boolean}\r\n */\r\n get: function () {\r\n return this.__entries__.length;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * @param {*} key\r\n * @returns {*}\r\n */\r\n class_1.prototype.get = function (key) {\r\n var index = getIndex(this.__entries__, key);\r\n var entry = this.__entries__[index];\r\n return entry && entry[1];\r\n };\r\n /**\r\n * @param {*} key\r\n * @param {*} value\r\n * @returns {void}\r\n */\r\n class_1.prototype.set = function (key, value) {\r\n var index = getIndex(this.__entries__, key);\r\n if (~index) {\r\n this.__entries__[index][1] = value;\r\n }\r\n else {\r\n this.__entries__.push([key, value]);\r\n }\r\n };\r\n /**\r\n * @param {*} key\r\n * @returns {void}\r\n */\r\n class_1.prototype.delete = function (key) {\r\n var entries = this.__entries__;\r\n var index = getIndex(entries, key);\r\n if (~index) {\r\n entries.splice(index, 1);\r\n }\r\n };\r\n /**\r\n * @param {*} key\r\n * @returns {void}\r\n */\r\n class_1.prototype.has = function (key) {\r\n return !!~getIndex(this.__entries__, key);\r\n };\r\n /**\r\n * @returns {void}\r\n */\r\n class_1.prototype.clear = function () {\r\n this.__entries__.splice(0);\r\n };\r\n /**\r\n * @param {Function} callback\r\n * @param {*} [ctx=null]\r\n * @returns {void}\r\n */\r\n class_1.prototype.forEach = function (callback, ctx) {\r\n if (ctx === void 0) { ctx = null; }\r\n for (var _i = 0, _a = this.__entries__; _i < _a.length; _i++) {\r\n var entry = _a[_i];\r\n callback.call(ctx, entry[1], entry[0]);\r\n }\r\n };\r\n return class_1;\r\n }());\r\n})();\n\n/**\r\n * Detects whether window and document objects are available in current environment.\r\n */\r\nvar isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined' && window.document === document;\n\n// Returns global object of a current environment.\r\nvar global$1 = (function () {\r\n if (typeof global !== 'undefined' && global.Math === Math) {\r\n return global;\r\n }\r\n if (typeof self !== 'undefined' && self.Math === Math) {\r\n return self;\r\n }\r\n if (typeof window !== 'undefined' && window.Math === Math) {\r\n return window;\r\n }\r\n // eslint-disable-next-line no-new-func\r\n return Function('return this')();\r\n})();\n\n/**\r\n * A shim for the requestAnimationFrame which falls back to the setTimeout if\r\n * first one is not supported.\r\n *\r\n * @returns {number} Requests' identifier.\r\n */\r\nvar requestAnimationFrame$1 = (function () {\r\n if (typeof requestAnimationFrame === 'function') {\r\n // It's required to use a bounded function because IE sometimes throws\r\n // an \"Invalid calling object\" error if rAF is invoked without the global\r\n // object on the left hand side.\r\n return requestAnimationFrame.bind(global$1);\r\n }\r\n return function (callback) { return setTimeout(function () { return callback(Date.now()); }, 1000 / 60); };\r\n})();\n\n// Defines minimum timeout before adding a trailing call.\r\nvar trailingTimeout = 2;\r\n/**\r\n * Creates a wrapper function which ensures that provided callback will be\r\n * invoked only once during the specified delay period.\r\n *\r\n * @param {Function} callback - Function to be invoked after the delay period.\r\n * @param {number} delay - Delay after which to invoke callback.\r\n * @returns {Function}\r\n */\r\nfunction throttle (callback, delay) {\r\n var leadingCall = false, trailingCall = false, lastCallTime = 0;\r\n /**\r\n * Invokes the original callback function and schedules new invocation if\r\n * the \"proxy\" was called during current request.\r\n *\r\n * @returns {void}\r\n */\r\n function resolvePending() {\r\n if (leadingCall) {\r\n leadingCall = false;\r\n callback();\r\n }\r\n if (trailingCall) {\r\n proxy();\r\n }\r\n }\r\n /**\r\n * Callback invoked after the specified delay. It will further postpone\r\n * invocation of the original function delegating it to the\r\n * requestAnimationFrame.\r\n *\r\n * @returns {void}\r\n */\r\n function timeoutCallback() {\r\n requestAnimationFrame$1(resolvePending);\r\n }\r\n /**\r\n * Schedules invocation of the original function.\r\n *\r\n * @returns {void}\r\n */\r\n function proxy() {\r\n var timeStamp = Date.now();\r\n if (leadingCall) {\r\n // Reject immediately following calls.\r\n if (timeStamp - lastCallTime < trailingTimeout) {\r\n return;\r\n }\r\n // Schedule new call to be in invoked when the pending one is resolved.\r\n // This is important for \"transitions\" which never actually start\r\n // immediately so there is a chance that we might miss one if change\r\n // happens amids the pending invocation.\r\n trailingCall = true;\r\n }\r\n else {\r\n leadingCall = true;\r\n trailingCall = false;\r\n setTimeout(timeoutCallback, delay);\r\n }\r\n lastCallTime = timeStamp;\r\n }\r\n return proxy;\r\n}\n\n// Minimum delay before invoking the update of observers.\r\nvar REFRESH_DELAY = 20;\r\n// A list of substrings of CSS properties used to find transition events that\r\n// might affect dimensions of observed elements.\r\nvar transitionKeys = ['top', 'right', 'bottom', 'left', 'width', 'height', 'size', 'weight'];\r\n// Check if MutationObserver is available.\r\nvar mutationObserverSupported = typeof MutationObserver !== 'undefined';\r\n/**\r\n * Singleton controller class which handles updates of ResizeObserver instances.\r\n */\r\nvar ResizeObserverController = /** @class */ (function () {\r\n /**\r\n * Creates a new instance of ResizeObserverController.\r\n *\r\n * @private\r\n */\r\n function ResizeObserverController() {\r\n /**\r\n * Indicates whether DOM listeners have been added.\r\n *\r\n * @private {boolean}\r\n */\r\n this.connected_ = false;\r\n /**\r\n * Tells that controller has subscribed for Mutation Events.\r\n *\r\n * @private {boolean}\r\n */\r\n this.mutationEventsAdded_ = false;\r\n /**\r\n * Keeps reference to the instance of MutationObserver.\r\n *\r\n * @private {MutationObserver}\r\n */\r\n this.mutationsObserver_ = null;\r\n /**\r\n * A list of connected observers.\r\n *\r\n * @private {Array<ResizeObserverSPI>}\r\n */\r\n this.observers_ = [];\r\n this.onTransitionEnd_ = this.onTransitionEnd_.bind(this);\r\n this.refresh = throttle(this.refresh.bind(this), REFRESH_DELAY);\r\n }\r\n /**\r\n * Adds observer to observers list.\r\n *\r\n * @param {ResizeObserverSPI} observer - Observer to be added.\r\n * @returns {void}\r\n */\r\n ResizeObserverController.prototype.addObserver = function (observer) {\r\n if (!~this.observers_.indexOf(observer)) {\r\n this.observers_.push(observer);\r\n }\r\n // Add listeners if they haven't been added yet.\r\n if (!this.connected_) {\r\n this.connect_();\r\n }\r\n };\r\n /**\r\n * Removes observer from observers list.\r\n *\r\n * @param {ResizeObserverSPI} observer - Observer to be removed.\r\n * @returns {void}\r\n */\r\n ResizeObserverController.prototype.removeObserver = function (observer) {\r\n var observers = this.observers_;\r\n var index = observers.indexOf(observer);\r\n // Remove observer if it's present in registry.\r\n if (~index) {\r\n observers.splice(index, 1);\r\n }\r\n // Remove listeners if controller has no connected observers.\r\n if (!observers.length && this.connected_) {\r\n this.disconnect_();\r\n }\r\n };\r\n /**\r\n * Invokes the update of observers. It will continue running updates insofar\r\n * it detects changes.\r\n *\r\n * @returns {void}\r\n */\r\n ResizeObserverController.prototype.refresh = function () {\r\n var changesDetected = this.updateObservers_();\r\n // Continue running updates if changes have been detected as there might\r\n // be future ones caused by CSS transitions.\r\n if (changesDetected) {\r\n this.refresh();\r\n }\r\n };\r\n /**\r\n * Updates every observer from observers list and notifies them of queued\r\n * entries.\r\n *\r\n * @private\r\n * @returns {boolean} Returns \"true\" if any observer has detected changes in\r\n * dimensions of it's elements.\r\n */\r\n ResizeObserverController.prototype.updateObservers_ = function () {\r\n // Collect observers that have active observations.\r\n var activeObservers = this.observers_.filter(function (observer) {\r\n return observer.gatherActive(), observer.hasActive();\r\n });\r\n // Deliver notifications in a separate cycle in order to avoid any\r\n // collisions between observers, e.g. when multiple instances of\r\n // ResizeObserver are tracking the same element and the callback of one\r\n // of them changes content dimensions of the observed target. Sometimes\r\n // this may result in notifications being blocked for the rest of observers.\r\n activeObservers.forEach(function (observer) { return observer.broadcastActive(); });\r\n return activeObservers.length > 0;\r\n };\r\n /**\r\n * Initializes DOM listeners.\r\n *\r\n * @private\r\n * @returns {void}\r\n */\r\n ResizeObserverController.prototype.connect_ = function () {\r\n // Do nothing if running in a non-browser environment or if listeners\r\n // have been already added.\r\n if (!isBrowser || this.connected_) {\r\n return;\r\n }\r\n // Subscription to the \"Transitionend\" event is used as a workaround for\r\n // delayed transitions. This way it's possible to capture at least the\r\n // final state of an element.\r\n document.addEventListener('transitionend', this.onTransitionEnd_);\r\n window.addEventListener('resize', this.refresh);\r\n if (mutationObserverSupported) {\r\n this.mutationsObserver_ = new MutationObserver(this.refresh);\r\n this.mutationsObserver_.observe(document, {\r\n attributes: true,\r\n childList: true,\r\n characterData: true,\r\n subtree: true\r\n });\r\n }\r\n else {\r\n document.addEventListener('DOMSubtreeModified', this.refresh);\r\n this.mutationEventsAdded_ = true;\r\n }\r\n this.connected_ = true;\r\n };\r\n /**\r\n * Removes DOM listeners.\r\n *\r\n * @private\r\n * @returns {void}\r\n */\r\n ResizeObserverController.prototype.disconnect_ = function () {\r\n // Do nothing if running in a non-browser environment or if listeners\r\n // have been already removed.\r\n if (!isBrowser || !this.connected_) {\r\n return;\r\n }\r\n document.removeEventListener('transitionend', this.onTransitionEnd_);\r\n window.removeEventListener('resize', this.refresh);\r\n if (this.mutationsObserver_) {\r\n this.mutationsObserver_.disconnect();\r\n }\r\n if (this.mutationEventsAdded_) {\r\n document.removeEventListener('DOMSubtreeModified', this.refresh);\r\n }\r\n this.mutationsObserver_ = null;\r\n this.mutationEventsAdded_ = false;\r\n this.connected_ = false;\r\n };\r\n /**\r\n * \"Transitionend\" event handler.\r\n *\r\n * @private\r\n * @param {TransitionEvent} event\r\n * @returns {void}\r\n */\r\n ResizeObserverController.prototype.onTransitionEnd_ = function (_a) {\r\n var _b = _a.propertyName, propertyName = _b === void 0 ? '' : _b;\r\n // Detect whether transition may affect dimensions of an element.\r\n var isReflowProperty = transitionKeys.some(function (key) {\r\n return !!~propertyName.indexOf(key);\r\n });\r\n if (isReflowProperty) {\r\n this.refresh();\r\n }\r\n };\r\n /**\r\n * Returns instance of the ResizeObserverController.\r\n *\r\n * @returns {ResizeObserverController}\r\n */\r\n ResizeObserverController.getInstance = function () {\r\n if (!this.instance_) {\r\n this.instance_ = new ResizeObserverController();\r\n }\r\n return this.instance_;\r\n };\r\n /**\r\n * Holds reference to the controller's instance.\r\n *\r\n * @private {ResizeObserverController}\r\n */\r\n ResizeObserverController.instance_ = null;\r\n return ResizeObserverController;\r\n}());\n\n/**\r\n * Defines non-writable/enumerable properties of the provided target object.\r\n *\r\n * @param {Object} target - Object for which to define properties.\r\n * @param {Object} props - Properties to be defined.\r\n * @returns {Object} Target object.\r\n */\r\nvar defineConfigurable = (function (target, props) {\r\n for (var _i = 0, _a = Object.keys(props); _i < _a.length; _i++) {\r\n var key = _a[_i];\r\n Object.defineProperty(target, key, {\r\n value: props[key],\r\n enumerable: false,\r\n writable: false,\r\n configurable: true\r\n });\r\n }\r\n return target;\r\n});\n\n/**\r\n * Returns the global object associated with provided element.\r\n *\r\n * @param {Object} target\r\n * @returns {Object}\r\n */\r\nvar getWindowOf = (function (target) {\r\n // Assume that the element is an instance of Node, which means that it\r\n // has the \"ownerDocument\" property from which we can retrieve a\r\n // corresponding global object.\r\n var ownerGlobal = target && target.ownerDocument && target.ownerDocument.defaultView;\r\n // Return the local global object if it's not possible extract one from\r\n // provided element.\r\n return ownerGlobal || global$1;\r\n});\n\n// Placeholder of an empty content rectangle.\r\nvar emptyRect = createRectInit(0, 0, 0, 0);\r\n/**\r\n * Converts provided string to a number.\r\n *\r\n * @param {number|string} value\r\n * @returns {number}\r\n */\r\nfunction toFloat(value) {\r\n return parseFloat(value) || 0;\r\n}\r\n/**\r\n * Extracts borders size from provided styles.\r\n *\r\n * @param {CSSStyleDeclaration} styles\r\n * @param {...string} positions - Borders positions (top, right, ...)\r\n * @returns {number}\r\n */\r\nfunction getBordersSize(styles) {\r\n var positions = [];\r\n for (var _i = 1; _i < arguments.length; _i++) {\r\n positions[_i - 1] = arguments[_i];\r\n }\r\n return positions.reduce(function (size, position) {\r\n var value = styles['border-' + position + '-width'];\r\n return size + toFloat(value);\r\n }, 0);\r\n}\r\n/**\r\n * Extracts paddings sizes from provided styles.\r\n *\r\n * @param {CSSStyleDeclaration} styles\r\n * @returns {Object} Paddings box.\r\n */\r\nfunction getPaddings(styles) {\r\n var positions = ['top', 'right', 'bottom', 'left'];\r\n var paddings = {};\r\n for (var _i = 0, positions_1 = positions; _i < positions_1.length; _i++) {\r\n var position = positions_1[_i];\r\n var value = styles['padding-' + position];\r\n paddings[position] = toFloat(value);\r\n }\r\n return paddings;\r\n}\r\n/**\r\n * Calculates content rectangle of provided SVG element.\r\n *\r\n * @param {SVGGraphicsElement} target - Element content rectangle of which needs\r\n * to be calculated.\r\n * @returns {DOMRectInit}\r\n */\r\nfunction getSVGContentRect(target) {\r\n var bbox = target.getBBox();\r\n return createRectInit(0, 0, bbox.width, bbox.height);\r\n}\r\n/**\r\n * Calculates content rectangle of provided HTMLElement.\r\n *\r\n * @param {HTMLElement} target - Element for which to calculate the content rectangle.\r\n * @returns {DOMRectInit}\r\n */\r\nfunction getHTMLElementContentRect(target) {\r\n // Client width & height properties can't be\r\n // used exclusively as they provide rounded values.\r\n var clientWidth = target.clientWidth, clientHeight = target.clientHeight;\r\n // By this condition we can catch all non-replaced inline, hidden and\r\n // detached elements. Though elements with width & height properties less\r\n // than 0.5 will be discarded as well.\r\n //\r\n // Without it we would need to implement separate methods for each of\r\n // those cases and it's not possible to perform a precise and performance\r\n // effective test for hidden elements. E.g. even jQuery's ':visible' filter\r\n // gives wrong results for elements with width & height less than 0.5.\r\n if (!clientWidth && !clientHeight) {\r\n return emptyRect;\r\n }\r\n var styles = getWindowOf(target).getComputedStyle(target);\r\n var paddings = getPaddings(styles);\r\n var horizPad = paddings.left + paddings.right;\r\n var vertPad = paddings.top + paddings.bottom;\r\n // Computed styles of width & height are being used because they are the\r\n // only dimensions available to JS that contain non-rounded values. It could\r\n // be possible to utilize the getBoundingClientRect if only it's data wasn't\r\n // affected by CSS transformations let alone paddings, borders and scroll bars.\r\n var width = toFloat(styles.width), height = toFloat(styles.height);\r\n // Width & height include paddings and borders when the 'border-box' box\r\n // model is applied (except for IE).\r\n if (styles.boxSizing === 'border-box') {\r\n // Following conditions are required to handle Internet Explorer which\r\n // doesn't include paddings and borders to computed CSS dimensions.\r\n //\r\n // We can say that if CSS dimensions + paddings are equal to the \"client\"\r\n // properties then it's either IE, and thus we don't need to subtract\r\n // anything, or an element merely doesn't have paddings/borders styles.\r\n if (Math.round(width + horizPad) !== clientWidth) {\r\n width -= getBordersSize(styles, 'left', 'right') + horizPad;\r\n }\r\n if (Math.round(height + vertPad) !== clientHeight) {\r\n height -= getBordersSize(styles, 'top', 'bottom') + vertPad;\r\n }\r\n }\r\n // Following steps can't be applied to the document's root element as its\r\n // client[Width/Height] properties represent viewport area of the window.\r\n // Besides, it's as well not necessary as the <html> itself neither has\r\n // rendered scroll bars nor it can be clipped.\r\n if (!isDocumentElement(target)) {\r\n // In some browsers (only in Firefox, actually) CSS width & height\r\n // include scroll bars size which can be removed at this step as scroll\r\n // bars are the only difference between rounded dimensions + paddings\r\n // and \"client\" properties, though that is not always true in Chrome.\r\n var vertScrollbar = Math.round(width + horizPad) - clientWidth;\r\n var horizScrollbar = Math.round(height + vertPad) - clientHeight;\r\n // Chrome has a rather weird rounding of \"client\" properties.\r\n // E.g. for an element with content width of 314.2px it sometimes gives\r\n // the client width of 315px and for the width of 314.7px it may give\r\n // 314px. And it doesn't happen all the time. So just ignore this delta\r\n // as a non-relevant.\r\n if (Math.abs(vertScrollbar) !== 1) {\r\n width -= vertScrollbar;\r\n }\r\n if (Math.abs(horizScrollbar) !== 1) {\r\n height -= horizScrollbar;\r\n }\r\n }\r\n return createRectInit(paddings.left, paddings.top, width, height);\r\n}\r\n/**\r\n * Checks whether provided element is an instance of the SVGGraphicsElement.\r\n *\r\n * @param {Element} target - Element to be checked.\r\n * @returns {boolean}\r\n */\r\nvar isSVGGraphicsElement = (function () {\r\n // Some browsers, namely IE and Edge, don't have the SVGGraphicsElement\r\n // interface.\r\n if (typeof SVGGraphicsElement !== 'undefined') {\r\n return function (target) { return target instanceof getWindowOf(target).SVGGraphicsElement; };\r\n }\r\n // If it's so, then check that element is at least an instance of the\r\n // SVGElement and that it has the \"getBBox\" method.\r\n // eslint-disable-next-line no-extra-parens\r\n return function (target) { return (target instanceof getWindowOf(target).SVGElement &&\r\n typeof target.getBBox === 'function'); };\r\n})();\r\n/**\r\n * Checks whether provided element is a document element (<html>).\r\n *\r\n * @param {Element} target - Element to be checked.\r\n * @returns {boolean}\r\n */\r\nfunction isDocumentElement(target) {\r\n return target === getWindowOf(target).document.documentElement;\r\n}\r\n/**\r\n * Calculates an appropriate content rectangle for provided html or svg element.\r\n *\r\n * @param {Element} target - Element content rectangle of which needs to be calculated.\r\n * @returns {DOMRectInit}\r\n */\r\nfunction getContentRect(target) {\r\n if (!isBrowser) {\r\n return emptyRect;\r\n }\r\n if (isSVGGraphicsElement(target)) {\r\n return getSVGContentRect(target);\r\n }\r\n return getHTMLElementContentRect(target);\r\n}\r\n/**\r\n * Creates rectangle with an interface of the DOMRectReadOnly.\r\n * Spec: https://drafts.fxtf.org/geometry/#domrectreadonly\r\n *\r\n * @param {DOMRectInit} rectInit - Object with rectangle's x/y coordinates and dimensions.\r\n * @returns {DOMRectReadOnly}\r\n */\r\nfunction createReadOnlyRect(_a) {\r\n var x = _a.x, y = _a.y, width = _a.width, height = _a.height;\r\n // If DOMRectReadOnly is available use it as a prototype for the rectangle.\r\n var Constr = typeof DOMRectReadOnly !== 'undefined' ? DOMRectReadOnly : Object;\r\n var rect = Object.create(Constr.prototype);\r\n // Rectangle's properties are not writable and non-enumerable.\r\n defineConfigurable(rect, {\r\n x: x, y: y, width: width, height: height,\r\n top: y,\r\n right: x + width,\r\n bottom: height + y,\r\n left: x\r\n });\r\n return rect;\r\n}\r\n/**\r\n * Creates DOMRectInit object based on the provided dimensions and the x/y coordinates.\r\n * Spec: https://drafts.fxtf.org/geometry/#dictdef-domrectinit\r\n *\r\n * @param {number} x - X coordinate.\r\n * @param {number} y - Y coordinate.\r\n * @param {number} width - Rectangle's width.\r\n * @param {number} height - Rectangle's height.\r\n * @returns {DOMRectInit}\r\n */\r\nfunction createRectInit(x, y, width, height) {\r\n return { x: x, y: y, width: width, height: height };\r\n}\n\n/**\r\n * Class that is responsible for computations of the content rectangle of\r\n * provided DOM element and for keeping track of it's changes.\r\n */\r\nvar ResizeObservation = /** @class */ (function () {\r\n /**\r\n * Creates an instance of ResizeObservation.\r\n *\r\n * @param {Element} target - Element to be observed.\r\n */\r\n function ResizeObservation(target) {\r\n /**\r\n * Broadcasted width of content rectangle.\r\n *\r\n * @type {number}\r\n */\r\n this.broadcastWidth = 0;\r\n /**\r\n * Broadcasted height of content rectangle.\r\n *\r\n * @type {number}\r\n */\r\n this.broadcastHeight = 0;\r\n /**\r\n * Reference to the last observed content rectangle.\r\n *\r\n * @private {DOMRectInit}\r\n */\r\n this.contentRect_ = createRectInit(0, 0, 0, 0);\r\n this.target = target;\r\n }\r\n /**\r\n * Updates content rectangle and tells whether it's width or height properties\r\n * have changed since the last broadcast.\r\n *\r\n * @returns {boolean}\r\n */\r\n ResizeObservation.prototype.isActive = function () {\r\n var rect = getContentRect(this.target);\r\n this.contentRect_ = rect;\r\n return (rect.width !== this.broadcastWidth ||\r\n rect.height !== this.broadcastHeight);\r\n };\r\n /**\r\n * Updates 'broadcastWidth' and 'broadcastHeight' properties with a data\r\n * from the corresponding properties of the last observed content rectangle.\r\n *\r\n * @returns {DOMRectInit} Last observed content rectangle.\r\n */\r\n ResizeObservation.prototype.broadcastRect = function () {\r\n var rect = this.contentRect_;\r\n this.broadcastWidth = rect.width;\r\n this.broadcastHeight = rect.height;\r\n return rect;\r\n };\r\n return ResizeObservation;\r\n}());\n\nvar ResizeObserverEntry = /** @class */ (function () {\r\n /**\r\n * Creates an instance of ResizeObserverEntry.\r\n *\r\n * @param {Element} target - Element that is being observed.\r\n * @param {DOMRectInit} rectInit - Data of the element's content rectangle.\r\n */\r\n function ResizeObserverEntry(target, rectInit) {\r\n var contentRect = createReadOnlyRect(rectInit);\r\n // According to the specification following properties are not writable\r\n // and are also not enumerable in the native implementation.\r\n //\r\n // Property accessors are not being used as they'd require to define a\r\n // private WeakMap storage which may cause memory leaks in browsers that\r\n // don't support this type of collections.\r\n defineConfigurable(this, { target: target, contentRect: contentRect });\r\n }\r\n return ResizeObserverEntry;\r\n}());\n\nvar ResizeObserverSPI = /** @class */ (function () {\r\n /**\r\n * Creates a new instance of ResizeObserver.\r\n *\r\n * @param {ResizeObserverCallback} callback - Callback function that is invoked\r\n * when one of the observed elements changes it's content dimensions.\r\n * @param {ResizeObserverController} controller - Controller instance which\r\n * is responsible for the updates of observer.\r\n * @param {ResizeObserver} callbackCtx - Reference to the public\r\n * ResizeObserver instance which will be passed to callback function.\r\n */\r\n function ResizeObserverSPI(callback, controller, callbackCtx) {\r\n /**\r\n * Collection of resize observations that have detected changes in dimensions\r\n * of elements.\r\n *\r\n * @private {Array<ResizeObservation>}\r\n */\r\n this.activeObservations_ = [];\r\n /**\r\n * Registry of the ResizeObservation instances.\r\n *\r\n * @private {Map<Element, ResizeObservation>}\r\n */\r\n this.observations_ = new MapShim();\r\n if (typeof callback !== 'function') {\r\n throw new TypeError('The callback provided as parameter 1 is not a function.');\r\n }\r\n this.callback_ = callback;\r\n this.controller_ = controller;\r\n this.callbackCtx_ = callbackCtx;\r\n }\r\n /**\r\n * Starts observing provided element.\r\n *\r\n * @param {Element} target - Element to be observed.\r\n * @returns {void}\r\n */\r\n ResizeObserverSPI.prototype.observe = function (target) {\r\n if (!arguments.length) {\r\n throw new TypeError('1 argument required, but only 0 present.');\r\n }\r\n // Do nothing if current environment doesn't have the Element interface.\r\n if (typeof Element === 'undefined' || !(Element instanceof Object)) {\r\n return;\r\n }\r\n if (!(target instanceof getWindowOf(target).Element)) {\r\n throw new TypeError('parameter 1 is not of type \"Element\".');\r\n }\r\n var observations = this.observations_;\r\n // Do nothing if element is already being observed.\r\n if (observations.has(target)) {\r\n return;\r\n }\r\n observations.set(target, new ResizeObservation(target));\r\n this.controller_.addObserver(this);\r\n // Force the update of observations.\r\n this.controller_.refresh();\r\n };\r\n /**\r\n * Stops observing provided element.\r\n *\r\n * @param {Element} target - Element to stop observing.\r\n * @returns {void}\r\n */\r\n ResizeObserverSPI.prototype.unobserve = function (target) {\r\n if (!arguments.length) {\r\n throw new TypeError('1 argument required, but only 0 present.');\r\n }\r\n // Do nothing if current environment doesn't have the Element interface.\r\n if (typeof Element === 'undefined' || !(Element instanceof Object)) {\r\n return;\r\n }\r\n if (!(target instanceof getWindowOf(target).Element)) {\r\n throw new TypeError('parameter 1 is not of type \"Element\".');\r\n }\r\n var observations = this.observations_;\r\n // Do nothing if element is not being observed.\r\n if (!observations.has(target)) {\r\n return;\r\n }\r\n observations.delete(target);\r\n if (!observations.size) {\r\n this.controller_.removeObserver(this);\r\n }\r\n };\r\n /**\r\n * Stops observing all elements.\r\n *\r\n * @returns {void}\r\n */\r\n ResizeObserverSPI.prototype.disconnect = function () {\r\n this.clearActive();\r\n this.observations_.clear();\r\n this.controller_.removeObserver(this);\r\n };\r\n /**\r\n * Collects observation instances the associated element of which has changed\r\n * it's content rectangle.\r\n *\r\n * @returns {void}\r\n */\r\n ResizeObserverSPI.prototype.gatherActive = function () {\r\n var _this = this;\r\n this.clearActive();\r\n this.observations_.forEach(function (observation) {\r\n if (observation.isActive()) {\r\n _this.activeObservations_.push(observation);\r\n }\r\n });\r\n };\r\n /**\r\n * Invokes initial callback function with a list of ResizeObserverEntry\r\n * instances collected from active resize observations.\r\n *\r\n * @returns {void}\r\n */\r\n ResizeObserverSPI.prototype.broadcastActive = function () {\r\n // Do nothing if observer doesn't have active observations.\r\n if (!this.hasActive()) {\r\n return;\r\n }\r\n var ctx = this.callbackCtx_;\r\n // Create ResizeObserverEntry instance for every active observation.\r\n var entries = this.activeObservations_.map(function (observation) {\r\n return new ResizeObserverEntry(observation.target, observation.broadcastRect());\r\n });\r\n this.callback_.call(ctx, entries, ctx);\r\n this.clearActive();\r\n };\r\n /**\r\n * Clears the collection of active observations.\r\n *\r\n * @returns {void}\r\n */\r\n ResizeObserverSPI.prototype.clearActive = function () {\r\n this.activeObservations_.splice(0);\r\n };\r\n /**\r\n * Tells whether observer has active observations.\r\n *\r\n * @returns {boolean}\r\n */\r\n ResizeObserverSPI.prototype.hasActive = function () {\r\n return this.activeObservations_.length > 0;\r\n };\r\n return ResizeObserverSPI;\r\n}());\n\n// Registry of internal observers. If WeakMap is not available use current shim\r\n// for the Map collection as it has all required methods and because WeakMap\r\n// can't be fully polyfilled anyway.\r\nvar observers = typeof WeakMap !== 'undefined' ? new WeakMap() : new MapShim();\r\n/**\r\n * ResizeObserver API. Encapsulates the ResizeObserver SPI implementation\r\n * exposing only those methods and properties that are defined in the spec.\r\n */\r\nvar ResizeObserver = /** @class */ (function () {\r\n /**\r\n * Creates a new instance of ResizeObserver.\r\n *\r\n * @param {ResizeObserverCallback} callback - Callback that is invoked when\r\n * dimensions of the observed elements change.\r\n */\r\n function ResizeObserver(callback) {\r\n if (!(this instanceof ResizeObserver)) {\r\n throw new TypeError('Cannot call a class as a function.');\r\n }\r\n if (!arguments.length) {\r\n throw new TypeError('1 argument required, but only 0 present.');\r\n }\r\n var controller = ResizeObserverController.getInstance();\r\n var observer = new ResizeObserverSPI(callback, controller, this);\r\n observers.set(this, observer);\r\n }\r\n return ResizeObserver;\r\n}());\r\n// Expose public methods of ResizeObserver.\r\n[\r\n 'observe',\r\n 'unobserve',\r\n 'disconnect'\r\n].forEach(function (method) {\r\n ResizeObserver.prototype[method] = function () {\r\n var _a;\r\n return (_a = observers.get(this))[method].apply(_a, arguments);\r\n };\r\n});\n\nvar index = (function () {\r\n // Export existing implementation if available.\r\n if (typeof global$1.ResizeObserver !== 'undefined') {\r\n return global$1.ResizeObserver;\r\n }\r\n return ResizeObserver;\r\n})();\n\nexport default index;\n"],"names":["block","cn","prepareRoleListValue","roles","otherMembers","arguments","length","undefined","current","toAdd","toRemove","unrecognized","forEach_","item","isUnrecognized","isRequested","isApproved","isDepriving","push","currentArr","map","prepareItemOfCurrent","otherArr","title","data","frozen","newItems","concat","itemClassName","role","extraProps","_objectSpread","text","value","roleListValueToSubjectList","_toConsumableArray","manyListDataItemToSubjectList","manyListDataItem","map_","filter_","_ref2","removed","_ref3","_ref4","type","extractChangedSubjects","added","filter","_ref5","_ref6","user","group","_ref7","_ref8","DialogError","props","_jsx","Block","className","makeErrorFields","errors","compact_","error","index","name","extras","children","FORM_ERROR","makeFormSubmitError","validationErrors","_defineProperty","importYTDFDialog","Component","YTDFDialog","withLazyLoading","React","_asyncToGenerator","_regeneratorRuntime","_callee","_context","prev","next","t0","sent","YTDialog","abrupt","stop","_React$useState","_React$useState2","_slicedToArray","mounted","setMounted","visible","_callee2","_context2","RoleListControl","EditableList","_callee3","_context3","TabFieldVertical","_callee4","_context4","STRUCT_TYPE","LIST_TYPE","STREAM_TYPE","TUPLE_TYPE","DICT_TYPE","DATA_TYPE","VARIANT_TYPE","OPTIONAL_TYPE","TAGGED_TYPE","VOID_TYPE","NULL_TYPE","EMPTY_DICT_TYPE","EMPTY_LIST_TYPE","PG_TYPE","notSimpleDataTypes","numericDataTypes","dateTimeDataTypes","stringDataTypes","isDataTypeNumeric","dataType","indexOf","isDataTypeDateTime","isDataTypeString","getType","typeArray","simple","numeric","dateTime","string","params","slice","optional","optionalLevel","setOptional","typeTag","tagged","tags","setTag","complex","struct","field","key","variantType","Error","getVariantType","every","null","typeName","startsWith","parseV3Type","initialType","primitiveTypes","ysonTypeToYql","ysonType","typesMap","has","capitalize_","stringToYql","type_name","precision","scale","decimalToYql","tupleToYql","structToYql","tag","objectToYql","elements","_ref","members","typedMemo","ErrorBoundary","constructor","super","this","state","resetError","setState","getDerivedStateFromError","componentDidCatch","_a","_b","onError","call","componentDidUpdate","prevProps","code","NO_DATA","render","message","i18n","toString","getErrorMessage","renderError","b","renderPluginLoader","pluginLoader","Object","assign","ChartKitComponent","widgetRef","instanceRef","id","propsId","isMobile","restProps","ckId","lang","settings","get","plugin","find","iteratedPlugin","UNKNOWN_PLUGIN","ChartComponent","renderer","reflow","details","fallback","mobile","ref","YagrPlugin","set","plugins","COLORS","getSerieColor","serieIndex","getPointValue","$type","Number","$value","$rawValue","splitDataByColor","rows","colorFieldName","xFieldName","yFieldName","xFieldPath","colorFieldPath","transform_","groupBy_","result","acc","y","x","point","Array","isArray","getVisualizationPlaceholders","visualization","placeholders","reduce","placeholder","xPlaceholder","yPlaceholder","colorPlaceholder","prepareWidgetData","args","d3Config","visualizationId","chartSettings","xAxisIsLegendEnabled","xAxis","legend","xAxisEnableLabels","labels","xAxisTitle","xAxisPixelInterval","pixelInterval","yAxisEnableLabels","yAxis","yAxisTitle","yAxisGridEnabled","grid","yAxisPixelInterval","tooltip","enabled","ticks","lineColor","series","options","barMaxWidth","barPadding","groupPadding","dataSorting","direction","line","lineWidth","chart","margin","top","left","right","bottom","buildD3Config","_getVisualizationPlac","fields","xField","yFields","yField","colorField","row","prepareScatter","stacking","categories","uniq_","prepareColoredSeriesData","xValues","dataMatrix","forEach","xValue","from","Set","graphs","_result$graphs","graph","String","prepareSeriesData","prepareBar","merge_","selectQueryResultAllVisualizations","queryResultsVisualization","visualizations","selectQueryResultVisualization","resultIndex","selectQueryResultVisualizationPlaceholders","selectQueryResultVisualizationId","selectQueryResultChartSettings","selectQueryResultIndex","selectQueryResultChartSaved","saved","selectQueryId","_state$queryResultsVi","query","selectQueryResult","queryResults","selectAvailableFields","keys","resultsPlaceholdersValidation","createSelector","queryResult","_placeholders$find","Boolean","fieldName","get_","invalid","hashes","some","newObject","lineHash","objectHash","isLineDuplicated","colorsValidation","scatterValidation","lineAndBarValidation","ret","fieldType","isPointsDuplicated","yValue","hash","isPointDuplicated","xCoords","isXValueDuplicated","selectIsPlaceholdersMissSomeFields","placeholdersMap","refreshClick","_jsxs","Button","view","onClick","ChartErrorHandler","deps","_useState","useState","_useState2","setError","useEffect","handleError","ChartErrorBoundary","_React$Component","_inherits","_super","_createSuper","_this","_classCallCheck","handleRefreshClick","_createClass","EmptyPlaceholdersMessage","D3Plugin","BaseChart","useSelector","isPlaceholdersMissSomeFields","widgetData","useMemo","ChartKit","Chart","xmlns","width","height","fill","viewBox","fillRule","d","clipRule","PlaceholderComponent","availableFields","dispatch","useThunkDispatch","addField","placeholderId","removeField","onSelectUpdate","Select","filterable","content","onUpdate","renderControl","Icon","PlusIcon","size","bind","XmarkIcon","PlaceholdersContainer","debouncedSaveQueryChartConfig","debounce_","payload","promise","ytApiV4Id","alterQuery","YTApiId","parameters","query_id","queryId","annotations","ui_chart_config","then","wrapApiPromiseByToaster","toasterName","skipSuccessToast","errorContent","QueryResultSelect","resultCount","i","useCallback","pixelIntervalValidator","test","caption","label","validator","ChartSettingsComponent","setVisilbility","handleOnOpen","handleOnClose","handleOnAdd","form","getState","values","Promise","resolve","Gear","initialValues","onClose","onAdd","VisualizationSelector","SavingIndicator","tooltipContent","Tooltip","CircleCheck","ArrowsRotateRight","Msg","dangerouslySetInnerHTML","__html","ALERT_PROPS","theme","icon","ChartValidation","_placeholdersValidati","_placeholdersValidati2","isErrorHidden","hideError","placeholdersValidation","showSmallAlert","_Fragment","Alert","actions","Actions","QueryResultsVisualization","_containerRef$current","containerRef","chartKitRef","allVisualizations","useDispatch","meta","typeMap","scheme","columns","types","getQueryResultMeta","getPrimitiveTypesMap","thorYPath","getValue","schema","typeV3","type_v3","displayName","getQueryResultGlobalSettings","readQueryResults","start","end","Infinity","cellsSize","cellSize","yql_type_registry","v","entries","k","_ref6$","typeIndex","prepareFormattedValue","_x","_x2","apply","newbiusLoadQueryResults","debouncedChartResize","throttle_","_chartKitRef$current","element","onResize","observer","ResizeObserver","observe","unobserve","useResizeObserver","result_count","Loader","defaultSettings","escapeWhitespace","decodeUTF8","binaryAsHex","escapeYQLStrings","omitStructNull","maxListSize","maxStringSize","treatValAsData","convert","unipika","converters","yql","valueStr","console","log","JSON","stringify","_unused","format","formatResults","_unused2","maxFormattedLength","convertedValue","fullValue","formatValue","$tag","node","href","asHTML","$formattedValue","$fullFormattedValue","getSupportedFeaturesRaw","supportedFeatures","features","RECOMMENDED_COMPRESSION_CODECS","lz4","zstd_","zlib_","brotli_","lzma_","RECOMMENDED","getSupportedFeatures","getCluster","featuresCluster","cluster","getErasureCodecs","erasure_codecs","sort","compareItems","getPrimitiveTypes","sortBy_","primitive_types","getCompressionCodecs","_step","arr","res","items","subItemsMap","_iterator","_createForOfIteratorHelper","s","n","done","parts","split","_parts","_toArray","first","rest","dst","subValue","join","err","e","f","subItems","findIndex","recommended","subItems2","last","prepareItemsSubitems","compression_codecs","makeCompressionCodecFinder","codec","find_","_codec$split","_codec$split2","l","r","getOperationStatisticsDescription","operation_statistics_descriptions","byName","byRegexp","tmp","replace","regexp","RegExp","i18nFactory","registerKeysets","CHARTKIT_ERROR_CODE","INVALID_DATA","UNKNOWN","TOO_MANY_LINES","ChartKitError","originalError","isCustomError","stack","mergeSettingStrategy","objValue","srcValue","currentPlugins","newPlugins","newSettingsPlugins","currentPlugin","newPluginIndex","newPlugin","splice","settingsEventEmitter","events","on","event","off","eventId","action","updateLang","configure","setLang","updates","filteredUpdates","withNaming","m","getRandomCKId","chars","Math","floor","random","randomString","clipPath","AlertContext","useAlertContext","context","AlertAction","bAlert","AlertContextProvider","layout","Provider","typeToIcon","danger","filled","outlined","info","CircleInfo","success","warning","TriangleExclamation","utility","Thunderbolt","normal","addComponentKeysets","en","corners","style","align","qa","Card","spacing","py","px","Flex","gap","alignItems","grow","justifyContent","Title","I","Xmark","colorText","color","iconByTheme","Text","variant","minContent","wrap","handler","Action","disabled","selected","isTypeSelection","isTypeContainer","isClickable","defaultTheme","defaultView","handleClick","onKeyDown","useActionHandlers","Box","clickable","tabIndex","DEFAULT_PLACEMENT","placement","disablePortal","contentClassName","openDelay","closeDelay","anchorElement","setAnchorElement","tooltipVisible","useTooltipVisible","preventTriggerOnFocus","child","only","childRef","useForkRef","Popup","open","anchorRef","disableEscapeKeyDown","disableOutsideClick","disableLayer","anchor","showTooltip","hideTooltip","initialState","setValue","val","useBoolean","timeoutRef","isFocusWithinRef","addEventListener","handleMouseEnter","handleMouseLeave","handleKeyDown","handleFocusWithin","handleBlurWithin","removeEventListener","clearTimeout","window","setTimeout","document","activeElement","target","currentTarget","contains","relatedTarget","ESCAPE","MapShim","Map","getIndex","entry","class_1","__entries__","defineProperty","prototype","enumerable","configurable","delete","clear","callback","ctx","_i","isBrowser","global$1","g","self","Function","requestAnimationFrame$1","requestAnimationFrame","Date","now","transitionKeys","mutationObserverSupported","MutationObserver","ResizeObserverController","connected_","mutationEventsAdded_","mutationsObserver_","observers_","onTransitionEnd_","refresh","delay","leadingCall","trailingCall","lastCallTime","resolvePending","proxy","timeoutCallback","timeStamp","throttle","addObserver","connect_","removeObserver","observers","disconnect_","updateObservers_","activeObservers","gatherActive","hasActive","broadcastActive","attributes","childList","characterData","subtree","disconnect","propertyName","getInstance","instance_","defineConfigurable","writable","getWindowOf","ownerDocument","emptyRect","createRectInit","toFloat","parseFloat","getBordersSize","styles","positions","position","isSVGGraphicsElement","SVGGraphicsElement","SVGElement","getBBox","getContentRect","bbox","getSVGContentRect","clientWidth","clientHeight","getComputedStyle","paddings","positions_1","getPaddings","horizPad","vertPad","boxSizing","round","documentElement","isDocumentElement","vertScrollbar","horizScrollbar","abs","getHTMLElementContentRect","ResizeObservation","broadcastWidth","broadcastHeight","contentRect_","isActive","rect","broadcastRect","ResizeObserverEntry","rectInit","Constr","contentRect","DOMRectReadOnly","create","ResizeObserverSPI","controller","callbackCtx","activeObservations_","observations_","TypeError","callback_","controller_","callbackCtx_","Element","observations","clearActive","observation","WeakMap","method"],"sourceRoot":""}
|