@corva/ui 3.45.1 → 3.45.2
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/cjs-bundle/components/OffsetWellPickerV5/OffsetWellPickerV5.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/OffsetWellPickerV5.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/effects/useLoadAllWellsCompanySafeguard.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/stores/filter-store/utils/normalizeFilters.js +1 -1
- package/components/OffsetWellPickerV5/OffsetWellPickerV5.d.ts.map +1 -1
- package/components/OffsetWellPickerV5/OffsetWellPickerV5.js +1 -1
- package/components/OffsetWellPickerV5/OffsetWellPickerV5.js.map +1 -1
- package/components/OffsetWellPickerV5/effects/useLoadAllWellsCompanySafeguard.d.ts +1 -0
- package/components/OffsetWellPickerV5/effects/useLoadAllWellsCompanySafeguard.d.ts.map +1 -1
- package/components/OffsetWellPickerV5/effects/useLoadAllWellsCompanySafeguard.js +1 -1
- package/components/OffsetWellPickerV5/stores/filter-store/utils/normalizeFilters.d.ts.map +1 -1
- package/components/OffsetWellPickerV5/stores/filter-store/utils/normalizeFilters.js +1 -1
- package/components/OffsetWellPickerV5/stores/filter-store/utils/normalizeFilters.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/helpers/defineProperty";import o from"@babel/runtime/helpers/slicedToArray";import n from"@babel/runtime/regenerator";import{useState as s,useRef as r,useMemo as i,useEffect as c,useCallback as p,useLayoutEffect as l}from"react";import m from"classnames";import{uniqBy as a,uniq as u,sortBy as d,isEmpty as j}from"lodash";import{Replay as f}from"@material-ui/icons";import{Table as C,TableHead as v}from"@material-ui/core";import{useAdvancedWells as A}from"./effects/useAdvancedWells.js";import{useBicWells as h}from"./effects/useBicWells.js";import{useCompanyMetricKey as S}from"./effects/useCompanyMetricKey.js";import{useFilterOptions as g}from"./effects/useFilterOptions.js";import{useFilteredWells as V}from"./effects/useFilteredWells.js";import{useSortedWells as I}from"./effects/useSortedWells.js";import"./effects/useAssetsData.js";import{useTableColumns as b}from"./effects/useTableColumns.js";import{useCompanyProvider as T}from"./effects/useCompanyProvider.js";import{useCompanies as D}from"./effects/useCompanies.js";import{usePinnedWells as x}from"./effects/usePinnedWells.js";import{useSearchedWells as P}from"./effects/useSearchedWells.js";import{useViewportWells as y}from"./effects/useViewportWells/useViewportWells.js";import{useTileLoading as F}from"./effects/useTileLoading.js";import{useInitialBounds as W}from"./effects/useInitialBounds.js";import{useLoadAllWellsCompanySafeguard as w}from"./effects/useLoadAllWellsCompanySafeguard.js";import{useAllWells as B}from"./effects/useAllWells/useAllWells.js";import"./stores/viewport-store/ViewportStoreContext.js";import"./stores/viewport-store/ViewportStoreProvider.js";import"zustand";import"lodash/isEqual";import{useViewportStore as k}from"./stores/viewport-store/useViewportStore.js";import{useFetchSubjectWell as M}from"./effects/useFetchSubjectWell.js";import{AppHeader as L}from"./components/AppHeader/AppHeader.js";import{Filter as O}from"./components/Filter/Filter.js";import"./components/Filter/components/MultiFilterSelect/MultiFilterSelect.js";import"./components/Filter/components/SingleFilterSelect/SingleFilterSelect.js";import"./components/Filter/components/StatusFilterSelect/StatusFilterSelect.js";import"./components/Filter/components/PeriodFilterSelect/PeriodFilterSelect.js";import"./components/Filter/components/WellSectionSelect/WellSectionSelect.js";import{WellsMap as E}from"./components/Map/WellsMap.js";import{OffsetWellsTable as H}from"./components/OffsetWellsTable/OffsetWellsTable.js";import{OffsetWellsTableHead as R}from"./components/OffsetWellsTable/OffsetWellsTableHead.js";import{AdvancedSearch as N}from"./components/OffsetWellsTable/AdvancedSearch/AdvancedSearch.js";import{ALL_SECTION_KEY as G,COMPANY_PROVIDERS_FOR_IDAS as q,FilterType as z,ROWS_PER_PAGE as U,RESYNC_STATUS as Z,MAX_OFFSET_SIZE as K,DEFAULT_RADIUS_MILES as _}from"./constants.js";import{SEARCH_CATEGORIES as X}from"./components/OffsetWellsTable/AdvancedSearch/constants.js";import{getCoordinatedWells as J}from"./utils/index.js";import{getIsImperial as Q}from"./utils/getIsImperial.js";import{usePickerPropsStore as Y}from"./stores/picker-props-store/usePickerPropsStore.js";import{useFilterStore as $}from"./stores/filter-store/useFilterStore.js";import{useViewStore as ee}from"./stores/view-store/useViewStore.js";import"./stores/selection-tool-store/SelectionToolStoreContext.js";import"./stores/selection-tool-store/SelectionToolStoreProvider.js";import{useSelectionToolStore as te}from"./stores/selection-tool-store/useSelectionToolStore.js";import{normalizeFilters as oe}from"./stores/filter-store/utils/normalizeFilters.js";import"uuid";import"@babel/runtime/helpers/toConsumableArray";import"lodash/set";import"lodash/get";import"lodash/unset";import"moment";import"../../clients/jsonApi/index.js";import"../../clients/subscriptions/constants.js";import"../../clients/subscriptions.v1.js";import"../../clients/subscriptions/subscriptions-client.factory.js";import"../../clients/api/apiCore.js";import"../../clients/constants.js";import"../../clients/sso/auth0.js";import"../../clients/sso/oauth2.js";import{fetchWellsByRigIds as ne}from"./api/wells/fetchWellsByRigIds.js";import"./api/shared/dataFormatter.js";import se from"./OffsetWellPickerV5.module.css.js";import re from"./components/OffsetWellsTable/OffsetWellsTable.module.css.js";import"../../utils/index.js";import{jsx as ie,jsxs as ce}from"react/jsx-runtime";import"@material-ui/core/Snackbar";import"../Notifications/Toast.js";import"../Notifications/Notifications.scss.js";import{NotificationsContainer as pe}from"../Notifications/NotificationsContainer.js";import le from"../../styles/typography/index.js";import"../../styles/counter/counter.module.scss.js";import"../DevCenter/DevCenterAppContainer/components/IsInsideIsolatedDcAppProvider/IsInsideIsolatedDcAppProvider.js";import"../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js";import"../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js";import"@icon-park/react/es/all";import"../../icons/IconParkProvider.js";import"../../icons/customIcons/icons/AddMessage.js";import"../../icons/customIcons/icons/Attention.js";import"../../icons/customIcons/icons/Collapse.js";import"../../icons/customIcons/icons/Dashboard.js";import"../../icons/customIcons/icons/Expand.js";import"../../icons/customIcons/icons/FolderClosed.js";import"../../icons/customIcons/icons/FolderClosedFilled.js";import"../../icons/customIcons/icons/FolderOpened.js";import"../../icons/customIcons/icons/GreaterOrEqual.js";import"../../icons/customIcons/icons/LessOrEqual.js";import"../../icons/customIcons/icons/Search.js";import"../../icons/customIcons/icons/SearchOne.js";import"../../icons/customIcons/icons/Wellhub.js";import"../../icons/customIcons/icons/MultiRuler.js";import"../../icons/customIcons/icons/Checkbox.js";import"../../icons/customIcons/icons/CheckboxChecked.js";import"../../icons/customIcons/icons/CheckboxIndeterminate.js";import"../../icons/customIcons/icons/Radio.js";import"../../icons/customIcons/icons/RadioChecked.js";import"../../icons/customIcons/icons/SimulFrac.js";import"../../icons/customIcons/icons/ZipperFrac.js";import"../../icons/customIcons/icons/CautionFilled.js";import"../../icons/customIcons/icons/MoreApp.js";import"../../icons/customIcons/icons/Pad.js";import"../../icons/customIcons/icons/DrilloutUnit.js";import"../../icons/customIcons/icons/FracFleet.js";import"../../icons/customIcons/icons/Global.js";import"../../icons/customIcons/icons/Program.js";import"../../icons/customIcons/icons/Rig.js";import"../../icons/customIcons/icons/Well.js";import"../../icons/customIcons/icons/Gap.js";import"../../icons/customIcons/icons/Pin.js";import"../../icons/customIcons/icons/CloseOneFilled.js";import"../../icons/customIcons/icons/AttentionFilled.js";import"../../icons/customIcons/icons/CheckOneFilled.js";import"../../icons/customIcons/icons/Archive.js";import"../../icons/customIcons/icons/ArchiveCancel.js";import"../../icons/customIcons/icons/Unarchive.js";import"../../icons/customIcons/icons/Archived.js";import"../../icons/customIcons/icons/InterventionUnit.js";import"../../icons/customIcons/icons/CloudDelete.js";import"../../icons/customIcons/icons/Lasso.js";import"../../icons/customIcons/icons/Radius.js";import"../../utils/mobileDetect.js";import"../IconButton/index.js";import"../../constants/goals.js";import"../../constants/segment.js";import"../../constants/alerts.js";import"../../constants/apps.js";import"../../constants/drillstring.js";import"../../constants/completion.js";import"../../constants/appPackages.js";import"../../constants/notifications.js";import"../../constants/feed.js";import"../../constants/bha.js";import"../../constants/corvaCompanyId.js";import"../GradientManager/configuration/constants.js";import"../Modal/CorvaModal.css.js";import"../IconMenu/index.js";import"../StyledMenuItem/index.js";import"../AppIcon/AppIcon.js";import"../DevCenter/AppHeader/AppHeader.js";import"../DevCenter/AppSideBar/AppSideBar.js";import"../DevCenter/AppsDataProvider/AppsDataProvider.js";import"../DevCenter/AppContext.js";import"../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import"../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import"@babel/runtime/helpers/objectWithoutProperties";import"react-router";import"../DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import"../DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js";import"../DevCenter/DevCenterAppContainer/components/AppSettingsDialog/components/RemoveAppButton.js";import"../DevCenter/DevCenterAppContainer/components/AppSettingsDialog/components/SettingsAccordion.js";import"../DevCenter/DevCenterAppContainer/components/AnnotationsButton/AnnotationsButton.js";import"../../componentsV2/Text/Text.js";import"../../componentsV2/Grid/Grid.js";import"../../componentsV2/Grid/Cell.js";import"../../componentsV2/Header/Header.scss.js";import{Button as me}from"../../componentsV2/Button/Button.js";import"../../componentsV2/ButtonIcon/ButtonIcon.js";import{Tooltip as ae}from"../../componentsV2/Tooltip/Tooltip.js";import"../../componentsV2/Popover/Popover.js";import"../../componentsV2/Radio/Radio.js";import"../../componentsV2/RadioAndCheckboxGroup/RadioAndCheckboxGroup.scss.js";import"../../componentsV2/Checkbox/Checkbox.js";import"../../componentsV2/TextInput/TextInput.js";import"../../componentsV2/Label/Label.js";import"../../componentsV2/TextEndTruncated/TextEndTruncated.scss.js";import"../../componentsV2/TextMiddleTruncated/TextMiddleTruncated.constants.js";import"../../componentsV2/TextMiddleTruncated/TextMiddleTruncated.scss.js";import"../../componentsV2/TextLink/TextLink.js";import{LoaderCircular as ue}from"../../componentsV2/LoaderCircular/LoaderCircular.js";import"../../componentsV2/Chip/Chip.js";import"../../componentsV2/ChipAlert/ChipAlert.js";import"../../componentsV2/ChipIndicator/ChipIndicator.js";import"../../componentsV2/Avatar/Avatar.js";import"../../componentsV2/AvatarGroup/AvatarGroup.js";import"@material-ui/lab";import"../../componentsV2/ToggleButtons/ToggleButtons.scss.js";import"../../componentsV2/Paper/Paper.js";import"../../componentsV2/ModalWindow/ModalWindow.js";import{Modal as de}from"../../componentsV2/Modal/Modal.js";import"../../componentsV2/Menu/Menu.js";import"../../componentsV2/utils.js";import"../../componentsV2/Hint/Hint.scss.js";import"../../componentsV2/Counter/Counter.js";import"../../componentsV2/BadgeBase/BadgeBase.scss.js";import"../../componentsV2/TemplatesControl/TemplatesControl.js";import"../../componentsV2/TemplatesControl/utils.js";import"../../componentsV2/TemplatesControl/icons/folder/index.js";import"../../componentsV2/TemplatesControl/Store/utils.js";import"../../componentsV2/TemplatesControl/types.js";import"../../permissions/PermissionsContext.js";import"../../permissions/constants/index.js";import"../../permissions/withPermissionsHOC.js";import"../../permissions/ProvidePermissions.js";import"../../componentsV2/BadgeDot/BadgeDot.scss.js";import"../../componentsV2/LoaderLinear/LoaderLinear.scss.js";import"../../componentsV2/LoaderLogo/LoaderLogo.constants.js";import"../../componentsV2/LoaderLogo/LoaderLogo.scss.js";import"../../componentsV2/Switch/Switch.js";import"../../componentsV2/Tabs/Tabs.js";import"../../componentsV2/EmptyState/EmptyState.scss.js";import"../../componentsV2/FileIcon/FileIcon.js";import"../../componentsV2/Tag/Tag.js";import"react-dropzone";import"../../componentsV2/FilesDropzone/FilesDropzone.scss.js";import"../../componentsV2/FilesLoader/FilesLoader.scss.js";import"../../componentsV2/FilesProcessor/FilesProcessor.scss.js";import"../../componentsV2/Skeleton/Skeleton.scss.js";import"../../utils/main.js";import"../../componentsV2/CopyToClipboard/CopyToClipboard.scss.js";import"../../componentsV2/Stepper/Step/Step.scss.js";import"../../componentsV2/Stepper/Stepper.scss.js";import"../../componentsV2/ButtonLive/ButtonLive.js";import"../../componentsV2/ButtonText/ButtonText.js";import"../../componentsV2/IndicatorLive/IndicatorLive.js";import"../../componentsV2/Accordion/Accordion.scss.js";import"../../componentsV2/Breadcrumbs/Breadcrumbs.scss.js";import"../../componentsV2/BadgeComment/BadgeComment.js";import"../../componentsV2/AppContainer/AppContainer.js";import"../../componentsV2/AppContainer/AppContainer.constants.js";import"../../componentsV2/AppFooter/AppFooter.js";import"immutable";import"../../componentsV2/AppCommonsProvider/AppCommonsContext.js";import"../../componentsV2/AppHeader/AppHeader.constants.js";import"../../componentsV2/AppHeader/AppBadge/AppBadge.scss.js";import"../../componentsV2/AppHeader/AppAssets/utils.js";import"../../componentsV2/AppHeader/AppAssets/AppAssets.scss.js";import"../PadModeSelect/PadModeSelect.js";import"../../componentsV2/AppHeader/PadMode/PadMode.scss.js";import"../../constants/streamSourceType.js";import"../../types/shared/Completions.js";import"../PadModeSelect/types.js";import"lodash/flatten";import"lodash/partition";import"../../componentsV2/PadModeSelect/FracModeLabel/FracModeLabel.js";import"../../componentsV2/PadModeSelect/FracModeLabel/FracModeLabel.constants.js";import"../../componentsV2/PadModeSelect/WellStreamActivityStatus/WellStreamActivityStatus.scss.js";import"../../componentsV2/PadModeSelect/PadModeSelect.constants.js";import"../../componentsV2/PadModeSelect/PadModeSelect.scss.js";import"querystring";import"uuid/v1";import"jsona";import"../../utils/env.js";import"../StatusBadge/constants.js";import"lodash/isEmpty";import"lodash/sortBy";import"../DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchContext.js";import{useGlobalOffsetWellsSync as je}from"../../effects/useGlobalOffsetWellsSync.js";import"../../componentsV2/AppHeader/V3/VersionSelect/VersionSelect.js";import"../../componentsV2/UniversalLink/UniversalLink.scss.js";import"../../componentsV2/AppHeader/V3/AssetChips/AssetChips.scss.js";import"../../componentsV2/AppHeader/V3/DqStatusIcon/DqStatusIcon.js";import"../../componentsV2/AppHeader/V3/DqStatusIcon/DqStatusIcon.constants.js";import"../../componentsV2/AppFooter/DqPopover/DqStatusIcon/DqStatusIcon.js";import"../../componentsV2/AppDqPopover/DqAlertTooltip/DqAlertTooltip.scss.js";import"../../componentsV2/AppDqPopover/DqAlert/DqAlert.scss.js";import"../../componentsV2/AppDqPopover/DqAsset/DqAsset.scss.js";import"../../componentsV2/AppDqPopover/AppDqPopover.scss.js";import"../../utils/getSingleAsset.js";import"../../componentsV2/AppHeader/V3/AssetSelector/AssetSelectorChip/AssetSelectorChip.js";import"../../componentsV2/AppHeader/V3/AssetSelector/constants.js";import"../../componentsV2/AppHeader/V3/AssetSelector/AssetSelectorSelect/AssetSelectorSelect.scss.js";import"../../componentsV2/AppHeader/V3/AssetSelector/AssetSelectorSelect/loadAssets.js";import"../../componentsV2/AppHeader/V3/AssetSelector/AssetSelector.scss.js";import"../../componentsV2/AppHeader/V3/AppTitle/AppTitle.constants.js";import"../../componentsV2/AppContainer/headerCommon.scss.js";import"../../componentsV2/AppHeader/V3/AppTitle/AppTitle.scss.js";import"../../componentsV2/AppHeader/V3/constants.scss.js";import"@babel/runtime/helpers/typeof";import"../../componentsV2/AppHeader/V3/SettingsButton/SettingsButton.js";import"../../componentsV2/AppHeader/V3/SettingsButton/SettingsButton.constants.js";import"../../componentsV2/AppSettings/AppSettings.js";import"../../componentsV2/AppSettings/AppSettings.constants.js";import"../../componentsV2/AppSettings/AppSettingsPinningContext.js";import"../../componentsV2/AppSizeProvider/AppSizeProvider.js";import"../../componentsV2/AppHeader/V3/Actions/Actions.constants.js";import"../../componentsV2/AppHeader/V3/Actions/Actions.scss.js";import"../../componentsV2/AppHeader/V3/AppHeaderV3.scss.js";import"../../componentsV2/AppHeader/AppHeader.scss.js";import"../../componentsV2/OffsetWellsButton/OffsetWellsButton.js";import"../../componentsV2/Autocomplete/Autocomplete.scss.js";import"../../componentsV2/Menu/MenuItem/MenuItem.js";import"../../componentsV2/Autocomplete/AutocompleteListBox.js";import"../../componentsV2/AppSettingsDivider/AppSettingsDivider.scss.js";import"../../componentsV2/WellArchivedMessage/WellArchivedMessage.js";import"../../componentsV2/DatePicker/DatePicker.js";import"../../componentsV2/DragHandle/DragHandle.js";import"../../componentsV2/CompletionsOffsetWellPicker/CompletionsOffsetWellPicker.js";import"../DevCenter/DevCenterAppContainer/components/FullscreenButton/FullscreenButton.js";import"../DevCenter/DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js";import"../DevCenter/DevCenterAppContainer/components/DevCenterAppView/DevCenterAppView.js";import"../DevCenter/DevCenterAppContainer/components/RestoreAppSizeButton/index.js";import"rollbar";import"@rollbar/react";import"../DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchButton.scss.js";import"../DevCenter/DevCenterAppContainer/DevCenterAppContainer.css.js";import"../Icons/AnnotationIcon.js";import"../Annotations/components/AnnotationsList/index.js";import"../Annotations/components/LastAnnotation/index.js";import"../Annotations/AnnotationsContext.js";import"../Toaster/Toaster.js";import"../HelpCenter/HelpCenterIcon.js";import"../DevCenter/NavigationBar/NavigationBar.js";import"../DevCenter/SideBar/SideBar.js";import"../DevCenter/AppSettingsPopover/AppSettingsPopover.js";import"../DevCenter/AppFilterPanelLayout/AppFilterPanelLayout.js";import"../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js";import"../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js";import"../AssetEditor/index.js";import"../AssetEditorV2/index.js";import"../AppVersionsSelect/AppVersionsSelect.js";import fe from"../LoadingIndicator/LoadingIndicator.js";import"../Typography.js";import"../RealTimeValuesSidebar/RealTimeSidebar.js";import"../CollapsableSidebar.js";import"../DateTimePicker/index.js";import"../DatePicker/index.js";import"../ErrorBoundary/ErrorBoundary.js";import"../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import"../SlateFormattedText/SlateFormattedText.js";import"../SlateFormattedText/RenderElements.js";import"slate";import"../EmptyState/EmptyState.js";import"../ParameterCharts/ParameterCharts.js";import"../ParameterCharts/AddEditTrack.js";import"../ChartActionsList/ChartActionsList.js";import"../CopyToClipboard/CopyToClipboard.js";import"../AssetEditor/AssetEditorAutocomplete.js";import"../AssetEditor/SingleAssetEditor.js";import"react-color";import"../SettingEditors/ColorEditor/style.css.js";import"../SettingEditors/DropdownEditor/index.js";import"../SwitchControl/index.js";import"../ColorPicker/ColorPicker.js";import"../Chart/components/ChartButton.js";import"../Chart/components/ChartButtons.js";import"../Chart/components/ChartWrapper.js";import"../Chart/components/AxisDropdown.js";import"../Chart/components/ChartSelect.js";import"../Chart/components/buttons/DragToZoomButton.js";import"../Chart/components/buttons/ZoomInButton.js";import"../Chart/components/buttons/ZoomOutButton.js";import"../Chart/components/buttons/PanButton.js";import"../Chart/components/buttons/ResetZoomButton.js";import"../Chart/components/buttons/HideAxesButton.js";import"../Chart/components/buttons/ChartTypeButton.js";import"../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../TruncatedText/index.js";import"../MiddleTruncatedText/MiddleTruncatedText.js";import"../RangeSlider/constants.js";import"../RangeSlider/Input.css.js";import"../RangeSlider/RangeSlider.css.js";import"../AdvancedSlider/AdvancedSlider.js";import"../Breadcrumbs/index.js";import"../VirtualizedTable/index.js";import"../EmptyView/EmptyView.js";import"../EmptyView/EmptyAppView/EmptyAppView.js";import"../Button/components/Button/index.js";import"moment-timezone";import"../Button/components/LiveButton/components/LiveButtonStateIndicator/index.js";import"../Button/components/LiveButton/styles.js";import"../ContextMenuItem/index.js";import"../FolderMenuItem/index.js";import"../EditableItem/EditableItem/index.js";import"../EditableItem/EditableItemWithBadge/index.js";import"../Checkbox/index.js";import"../FolderMenuItemWithLinks/index.js";import"../TextField/index.js";import"../Chip/index.js";import"../Counter/index.js";import"../AnchorsList/AnchorsList.js";import"../Select/index.js";import"../Select/SelectFilterBy.js";import"../CustomSelect/index.js";import"../Tabs/Tabs.js";import"../Tabs/Tab.js";import"../ResizableTable/ResizableTable.js";import"../GradientPicker/GradientPicker.js";import"../GradientManager/GradientList.js";import"@material-ui/icons/AddCircle";import"../GradientManager/GradientPreview/GradientPreview.js";import"../GradientManager/GradientSelect.styles.js";import"../GradientManager/GradientManager.styles.js";import"../Drillstring/BHASchematic.js";import"../Drillstring/BHATable/index.js";import"../Drillstring/BHAComponentIcon.js";import"../Drillstring/BHAComponentDetail/index.js";import"../Drillstring/BHATileIcon.js";import"../Drillstring/BHATile/BHATile.js";import"../Drillstring/BHAList/BHAList.js";import"../Drillstring/BHAComponentsTable/BHAComponentsTable.js";import"../Casing/CasingTable/index.js";import"../Casing/CasingComponentIcon.js";import"../Casing/CasingTileIcon.js";import"../Casing/CasingTableV2/CasingTableV2.js";import"../Casing/CasingTile/CasingTile.js";import"../DisabledSettingsMessage/DisabledSettingsMessage.js";import"../WellSummary/WellSummaryItemLabel.js";import"../WellSummary/WellSummaryItemTitle.js";import"../WellSummary/WellSummaryItemValue.js";import"../WellSummary/ActivitySummaryChart.js";import"../WellSummary/FracWirelineTimeChart.js";import"../BICOffsetPickerDialog/index.js";import"../OffsetWellButton/OffsetWellButton.js";import"../OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../OffsetWellPickerV3/index.js";import"../OffsetWellChips/Chip.js";import"../OffsetWellChips/ChipsContainer.js";import"./OffsetWellPickerV5WithStore.js";import"../OffsetWellMap/OffsetWellMap.js";import"../ConfirmationDialog.js";import"../TextLink/index.js";import"../Avatar/index.js";import"../Template/TemplatePopover/index.js";import"../Template/TemplateSharingDialog/index.js";import"../MenuItem/index.js";import"../MiddleTruncate/MiddleTruncate.js";import"../PinnableFilters/PinnableFilters.js";import"../HeaderLayout/HeaderLayout.js";import"../PadOffsetsPicker/PadOffsetsPicker.js";import"../PadOffsetsPicker/OffsetAssetChip.js";import"../PadOffsetsPicker/OffsetAssetsListExpander.js";import"../PadOffsetsPicker/StagesSelector.js";import"../PadOffsetsPickerV2/PadOffsetsPickerV2.js";import"../Table/TableToolbar/TableToolbar.js";import"../Table/TableContainer/TableContainer.js";import"../Table/TableCell/TableCell.js";import"../Table/TablePagination/TablePagination.js";import"../Table/TablePaginationActions/TablePaginationActions.js";import"../Tooltip/ScrollableTooltip.js";import"../PriceInput/PriceInput.js";import"../LabelsCounter/LabelsCounter.js";import"../Stepper/Stepper.js";import"../Stepper/Step/Step.js";import"../Stepper/StepsWrapper.js";import"../Comment/CommentIcon/index.js";import"../FilesLoader/FilesLoader.js";import"../../componentsV2/FileIcon/icons/ArchiveFileIcon.js";import"../../componentsV2/FileIcon/icons/CSVFileIcon.js";import"../../componentsV2/FileIcon/icons/DocFileIcon.js";import"../../componentsV2/FileIcon/icons/EDMFileIcon.js";import"../../componentsV2/FileIcon/icons/ExcelFileIcon.js";import"../../componentsV2/FileIcon/icons/ImageFileIcon.js";import"../../componentsV2/FileIcon/icons/JsonFileIcon.js";import"../../componentsV2/FileIcon/icons/LasFileIcon.js";import"../../componentsV2/FileIcon/icons/OtherFileIcon.js";import"../../componentsV2/FileIcon/icons/PdfFileIcon.js";import"../../componentsV2/FileIcon/icons/PowerPointFileIcon.js";import"../../componentsV2/FileIcon/icons/TxtFileIcon.js";import"../../componentsV2/FileIcon/icons/UnknownFileIcon.js";import"../../componentsV2/FileIcon/icons/VideoFileIcon.js";import"../../componentsV2/FileIcon/icons/XmlFileIcon.js";import"../SearchInput/index.js";import"../FeedItem/FeedItem.js";import"../FeedItem/FeedItemEditProvider/FeedItemEditProvider.js";import"../PostInput/PostInput.js";import"../KeyboardDateTimePicker.js";import"../AddComment/Popover.js";import"../AddComment/Popup.js";import"../StageDesignVActual/ComparisonBar/ComparisonBar.js";import"../StageDesignVActual/ElementsComparison/ElementsComparison.js";import"../StageDesignVActual/ComparisonHeader.js";import"../StageDesignVActual/ComparisonRow.js";import"../EmbeddedApp/DevCenterEmbeddedApp.js";import"../EmbeddedApp/EmbeddedApp.js";import"../Autocomplete/Autocomplete.js";import"../DocumentViewer/DocumentViewer.js";import"../ColorPickerPalette/ColorPickerPalette.js";import"../Search/Search.js";import"../Search/components/Listbox.js";import"../Search/components/Paper.js";import"../Search/components/RecentSearches.js";import"../Search/components/Groups.js";import"../Search/components/SelectAllListItem.js";import"../StatusBadge/index.js";import"../Attachment/index.js";import"../EmojiIconButton.js";import"../FileUploadIconButton.js";import"../FilePreview/index.js";import"../FailedFileUploading.js";import"../UserMention/index.js";import"../CommentsInfo/index.js";import"../CommentInput/index.js";import"../Comment/index.js";import"../CommentLoader.js";import"../AssetNameLabel/AssetStatusBadge.js";import"../AssetEditorV2/components/PrimaryAssetSelect.js";import"../AssetEditorV2/components/SecondaryAssetSelect.js";import"../AssetEditorV2/components/SelectItem.js";import"../AssetEditorV2/components/MultipleAssetsToggle.js";import"../AssetEditorV2/components/PrimaryAssetSelectV2.js";import"../EChartsWrapper/EChartsWrapper.js";import"../AssetsMultipleSelector/AssetsMultipleSelector.js";import"@material-ui/icons/Close";import"@material-ui/icons/GetApp";import"../GoogleDocsViewer/index.js";import"../NewDocumentViewer/effects/useFileContent.js";import"../NewDocumentViewer/styles.js";import"../FilesLoaderV2/styles.js";import"../FilesDropzone/styles.js";import"../FilesProcessor/styles.js";import"../Hint/styles.js";import"@babel/runtime/helpers/taggedTemplateLiteral";import"fparser";import"../Formula/useFormulaStyles.js";import"../Formula/RootXIcon.js";import"../Formula/FormulaTextEditor.js";import"../Formula/CloseSuggestion.js";import"../Formula/SuggestionsMenu.js";import{showInfoNotification as Ce}from"../../utils/notificationToasts.js";function ve(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function Ae(e){for(var o=1;o<arguments.length;o++){var n=null!=arguments[o]?arguments[o]:{};o%2?ve(Object(n),!0).forEach((function(o){t(e,o,n[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ve(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var he="OffsetWellPickerV5",Se=function(){var ve,Se=Y((function(e){return e.open})),ge=Y((function(e){return e.isWDUser})),Ve=Y((function(e){return e.defaultSubjectWell})),Ie=Y((function(e){return e.currentUser})),be=Y((function(e){return e.offsetSettings})),Te=Y((function(e){return e.isViewOnly})),De=Y((function(e){return e.onClose})),xe=Y((function(e){return e.onSave})),Pe=Y((function(e){return e.maxOffsetSize})),ye=Y((function(e){return e.localMaxOffsetSize})),Fe=Y((function(e){return e.syncAutoEnabled})),We=s(null),we=o(We,2),Be=we[0],ke=we[1],Me=r(null),Le=Math.min(Pe+1,ye+1,K+1),Oe=Math.min(Math.max(Le,ye+1),K+1),Ee=null==Ve?void 0:Ve.asset_id,He=M(Ee),Re=o(He,1)[0],Ne=i((function(){var e,t=null==Re||null===(e=Re.topHole)||void 0===e?void 0:e.coordinates;if(!t)return null;var n=o(t,2);return{latitude:n[0],longitude:n[1]}}),[Re]);je(be,xe,Oe);var Ge=ee((function(e){return e.isFilterExpanded})),qe=ee((function(e){return e.isMapHidden})),ze=ee((function(e){return e.isHScrollMoved})),Ue=ee((function(e){return e.setIsHScrollMoved})),Ze=ee((function(e){return e.isVScrollMoved})),Ke=ee((function(e){return e.setIsVScrollMoved})),_e=ee((function(e){return e.isAdvancedSearchHidden})),Xe=ee((function(e){return e.setIsAdvancedSearchHidden})),Je=Y((function(e){return e.isLoadAllWells})),Qe=Y((function(e){return e.resetIsLoadAllWells})),Ye=Y((function(e){return e.shouldRecenter})),$e=Y((function(e){return e.setShouldRecenter})),et=+(null==Ve?void 0:Ve.companyId)||+(null==Ie?void 0:Ie.company_id),tt=Ee>0,ot=$((function(e){return e.filters})),nt=$((function(e){return e.setFilters})),st=$((function(e){return e.resetFilters})),rt=te((function(e){return e.reset})),it=k((function(e){return e.wells})),ct=k((function(e){return e.bounds})),pt=D({open:Se}),lt=pt.canViewCompanies,mt=pt.canViewCompaniesLoading,at=pt.companies,ut=s([]),dt=o(ut,2),jt=dt[0],ft=dt[1],Ct=s((function(){var e;return null!==(e=null==be?void 0:be.lastSelectionZone)&&void 0!==e?e:null})),vt=o(Ct,2),At=vt[0],ht=vt[1],St=r(new Set),gt=s([]),Vt=o(gt,2),It=Vt[0],bt=Vt[1],Tt=s(!1),Dt=o(Tt,2),xt=Dt[0],Pt=Dt[1];y(!Je);var yt=w({companies:at,canViewCompanies:lt,canViewCompaniesLoading:mt}).isSafeguardReady;B(Je,yt),W({subjectWellCoords:Ne,hasSubjectWell:null!=Ee,open:Se,ghostZone:At});var Ft=F(),Wt=s((null==be?void 0:be.wellSection)||G),wt=o(Wt,2),Bt=wt[0],kt=wt[1],Mt=r(!0),Lt=s(!0),Ot=o(Lt,2),Et=Ot[0],Ht=Ot[1],Rt=Oe<=(null==jt?void 0:jt.length),Nt=r(),Gt=s(!0),qt=o(Gt,2),zt=qt[0],Ut=qt[1];c((function(){if(Se&&Rt&&Ce("App can’t process more than (".concat(Oe-1,") Offset Wells.")),!Se){var e,t,o=new Set(Nt.current||[]);(null==be||null===(e=be.selectedWellIds)||void 0===e?void 0:e.length)===(null===(t=Nt.current)||void 0===t?void 0:t.length)&&((null==be?void 0:be.selectedWellIds)||[]).every((function(e){return o.has(e)}))||(Mt.current=!0),Nt.current=null==be?void 0:be.selectedWellIds}}),[Rt,Se,be,Oe]);var Zt=i((function(){return Array.from(it.values())}),[it]),Kt=Ft||0===Zt.length&&null===ct,_t=x(null==be?void 0:be.selectedWellIds),Xt=o(_t,2),Jt=Xt[0],Qt=Xt[1],Yt=P(),$t=o(Yt,3),eo=$t[0],to=$t[1],oo=$t[2],no=i((function(){if(!Zt)return null;var e=Zt;if(null!=Jt&&Jt.length){var t=new Set(e.map((function(e){return e.id}))),o=Jt.filter((function(e){return!t.has(e.id)}));o.length>0&&(e=e.concat(o))}if(null!=eo&&eo.length){var n=new Set(e.map((function(e){return e.id}))),s=eo.filter((function(e){return!n.has(e.id)}));s.length>0&&(e=e.concat(s))}return Re&&!e.some((function(e){return e.id===Re.id}))&&(e=[Re].concat(e)),e}),[Zt,Re,Jt,eo]),so=T(et),ro=o(so,1)[0],io=h(Ee,no),co=o(io,8),po=co[0],lo=co[1],mo=co[2],ao=co[3],uo=co[4],jo=co[5],fo=co[6],Co=co[7],vo=i((function(){return!!po&&po.some((function(e){return e.value!==G}))}),[po]);c((function(){Ut(!0),lo(null),ao(null)}),[ao,lo,Ee]);var Ao=S(et,null==be?void 0:be.metricsKeys),ho=o(Ao,2),So=ho[0],go=ho[1],Vo=A(no,po,mo,Ee,So,Se),Io=o(Vo,4),bo=Io[0],To=Io[1],Do=Io[2],xo=Io[3],Po=bo||Do,yo=i((function(){if(!Po||null==at||!at.length)return Po;var e={};return at.forEach((function(t){e[t.id]=t.name})),Po.map((function(t){return Ae(Ae({},t),{},{companyName:e[t.companyId]||"Null"})}))}),[Po,at]),Fo=i((function(){return Re?yo&&yo.find((function(e){return e.id===Re.id}))||Re:null}),[Re,yo]),Wo=!(Kt||To||Qt||to);c((function(){if(Wo){var t,o=(t=e(n.mark((function e(){var t,o,s,r,i,c,p,l,m,a,u,d;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=void 0===(null==be?void 0:be.isSynced)||(null==be?void 0:be.isSynced),o=!0,!t){e.next=20;break}if(r=mo[G]||[],i=new Set(r),c=((null==be?void 0:be.selectedWellIds)||[]).every((function(e){return i.has(e)})),r.length===(null==be||null===(s=be.selectedWellIds)||void 0===s?void 0:s.length)&&c){e.next=17;break}return e.next=9,J(r,Ee);case 9:p=e.sent,l=p.slice(0,ye+1).map((function(e){return e.id})),m=Ae(Ae({},be),{},{subjectWellId:Ee,selectedWellIds:l,offsetWellsLimited:Oe<=l.length}),a=new Set(l),u=p.filter((function(e){return a.has(e.id)})),xe(m,u),e.next=18;break;case 17:o=!1;case 18:e.next=21;break;case 20:o=!1;case 21:if(o){e.next=26;break}return e.next=24,J((null==be?void 0:be.selectedWellIds)||[],Ee);case 24:d=e.sent,xe(be,d);case 26:case"end":return e.stop()}}),e)}))),function(){return t.apply(this,arguments)});Fe&&zt&&be&&mo&&(o(),Ut(!1))}}),[be,mo,Ee,Oe,Fe,Wo,zt,Le,ye,xe]);var wo=g(yo,at,lt),Bo=b(So,lt,vo),ko=V(yo,ot),Mo=i((function(){return yo?a(yo,"id").length:0}),[yo]),Lo=i((function(){if(!ko)return ko;var e=new Map((null==yo?void 0:yo.map((function(e){return[e.id,e]})))||[]),t=jt.map((function(t){return e.get(t.id)||t})),o=((null==Co?void 0:Co[Bt])||[]).map((function(t){return e.get(t)})).filter((function(e){return void 0!==e}));return a(t.concat(o).concat(ko),"id")}),[yo,ko,jt,Co,Bt]);c((function(){if(ko&&Wo&&Mt.current){var e=new Set((null==be?void 0:be.selectedWellIds)||[]),t=yo.filter((function(t){return e.has(t.id)})),o=new Set(t.map((function(e){return e.id}))),n=jt.filter((function(t){return e.has(t.id)&&!o.has(t.id)}));t=t.concat(n),Fo&&(t=t.concat(Fo)),ft(a(t,"id")),Mt.current=!1}}),[yo,ko,null==be?void 0:be.selectedWellIds,Wo,Fo,jt]),c((function(){if(null!=yo&&yo.length&&0!==St.current.size){var e=St.current,t=yo.filter((function(t){return e.has(t.id)}));if(t.length>0){var o=t.map((function(e){return e.id}));bt((function(e){return e.filter((function(e){return!o.includes(e)}))})),ht(null),ft((function(e){var o=t.slice(0,Math.max(0,Oe-e.length));return a(e.concat(o),"id")})),t.forEach((function(t){return e.delete(t.id)}))}}}),[yo,Oe]);var Oo,Eo,Ho,Ro=I(Fo,Lo,jt,Ht,null==be?void 0:be.selectedWellIds),No=o(Ro,5),Go=No[0],qo=No[1],zo=No[2],Uo=No[3],Zo=No[4],Ko=p((Oo=e(n.mark((function e(t,o,s,r){var i,c,p,l,m,d,j;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(ht(null),s!==X.well.name){e.next=5;break}i=o,e.next=22;break;case 5:if(r&&0!==r.length){e.next=7;break}return e.abrupt("return");case 7:return Ht(!0),e.prev=8,e.next=11,ne(r,null);case 11:c=e.sent,i=c.map((function(e){return e.id})),e.next=19;break;case 15:return e.prev=15,e.t0=e.catch(8),console.error("Failed to fetch wells for rigs:",e.t0),e.abrupt("return");case 19:return e.prev=19,Ht(!1),e.finish(19);case 22:if(p=new Set(i),l=yo.filter((function(e){var t=e.id;return p.has(t)})),!(t&&l.length<i.length)){e.next=32;break}if(m=new Set(l.map((function(e){return e.id}))),!((d=i.filter((function(e){return!m.has(e)}))).length>0)){e.next=32;break}return bt((function(e){return e.concat(d)})),e.next=31,oo(d);case 31:d.forEach((function(e){return St.current.add(e)}));case 32:t?(j=l.slice(0,Math.min(l.length,Oe-jt.length))).length>0&&ft((function(e){return a(e.concat(j),"id")})):ft((function(e){return u(e.filter((function(e){var t=e.id;return!l.find((function(e){return e.id===t}))})))}));case 33:case"end":return e.stop()}}),e,null,[[8,15,19,22]])}))),function(e,t,o,n){return Oo.apply(this,arguments)}),[yo,Oe,jt.length,oo,Ht]),_o=p((function(){Xe(!0)}),[Xe]),Xo=p((function(e){go(e)}),[go]),Jo=p((function(e,t){go((function(o){return o.map((function(o){return o===e?t:o}))}))}),[go]),Qo=p((function(e,t){qo(e),Uo(t)}),[qo,Uo]),Yo=p((function(e,t){ht(null),ft(t?function(t){if(t.length>=Oe)return t;var o=(null==yo?void 0:yo.find((function(t){return t.id===e.id})))||e;return t.concat(o)}:function(t){return t.filter((function(t){return t.id!==e.id}))})}),[yo,Oe]),$o=p((function(e){if(ht(null),e){var t=Fo?ko.concat(Fo):ko,o=d(a(t,"id"),"distance");ft(o.slice(0,Oe))}else ft(Fo?[Fo]:[])}),[ko,Fo,Oe]),en=p((function(e,t){ft((function(o){var n=new Set(o.map((function(e){return e.id}))),s=e.filter((function(e){return!n.has(e.id)})),r=s.length;if(0===r)return setTimeout((function(){return null==t?void 0:t({attempted:0,added:0})}),0),o;var i=Oe-o.length,c=s.slice(0,i),p=c.length,l=c.map((function(e){return(null==yo?void 0:yo.find((function(t){return t.id===e.id})))||e}));return setTimeout((function(){return null==t?void 0:t({attempted:r,added:p})}),0),a(o.concat(l),"id")}))}),[yo,Oe]),tn=p((function(e){ht(e)}),[]),on=p((Eo=e(n.mark((function e(t){var o,s,r,i,c,p;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!Co){e.next=15;break}if(o=Co[t]||[],s=new Map((null==no?void 0:no.map((function(e){return[e.id,e]})))||[]),r=o.filter((function(e){return!s.has(e)})),i=[],!(r.length>0)){e.next=9;break}return e.next=8,oo(r);case 8:i=e.sent;case 9:i.forEach((function(e){return s.set(e.id,e)})),c=o.map((function(e){return s.get(e)})).filter((function(e){return void 0!==e})),p=d(c,"distance"),ft(p.slice(0,Le)),e.next=16;break;case 15:ft(Fo?[Fo]:[]);case 16:case"end":return e.stop()}}),e)}))),function(e){return Eo.apply(this,arguments)}),[Co,no,oo,Le,Fo]),nn=p((Ho=e(n.mark((function e(t){return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return kt(t),e.next=3,on(t);case 3:case"end":return e.stop()}}),e)}))),function(e){return Ho.apply(this,arguments)}),[on]),sn=i((function(){return jt.find((function(e){return e.id===Ee}))?jt.length-1:jt.length}),[jt,Ee]),rn=i((function(){if(!mo)return!1;var e=jt.map((function(e){return e.id})),t=mo[Bt]||[];if(Math.min(t.length,Le)!==e.length)return!1;var o=new Set(t);return e.every((function(e){return o.has(e)}))}),[mo,jt,Bt,Le]),cn=i((function(){return!!ro&&q.includes(ro)}),[ro]),pn=i((function(){return cn?"IDAS generated offsets.":ge?"Offset Selection App.":"WellHub."}),[cn,ge]),ln=p((function(){De();var e=jt.map((function(e){return e.id})),t=Ae(Ae({},be),{},{companyId:et,subjectWellId:Ee,selectedWellIds:e,filters:oe(ot),metricsKeys:So,wellSection:Bt,isSynced:rn,mapHidden:qe,filterExpanded:Ge,offsetWellsLimited:Rt,lastSelectionZone:At,isLoadAllWells:Je});xe(t,jt)}),[De,jt,be,et,Ee,ot,So,Bt,rn,qe,Ge,Rt,At,Je,xe]);c((function(){xt&&0===St.current.size&&(Pt(!1),ln())}),[xt,jt,ln]);var mn=function(){var e,t,o=new Set((null==be?void 0:be.selectedWellIds)||[]),n=(yo||[]).filter((function(e){return o.has(e.id)}));if(null!=Jt&&Jt.length){var s=new Set(n.map((function(e){return e.id}))),r=Jt.filter((function(e){return o.has(e.id)&&!s.has(e.id)}));n=n.concat(r)}Fo&&(n=n.concat(Fo)),ft(a(n,"id")),ht(null!==(e=null==be?void 0:be.lastSelectionZone)&&void 0!==e?e:null);var i=Ae(Ae({},be),{},{mapHidden:qe,filterExpanded:Ge});xe(i);var c=oe(null==be?void 0:be.filters);nt(Ae(Ae({},c),{},{radius:null!==(t=null==c?void 0:c.radius)&&void 0!==t?t:_})),kt((null==be?void 0:be.wellSection)||G),Qe(),De()},an=Et||Kt,un=i((function(){return!!tt&&(!an&&(!rn||(!(j(ot)||!ot[z.sideTracks])||Bt!==G)))}),[tt,rn,ot,Bt,an]),dn=p(e(n.mark((function e(){return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return st(),rt(),ht(null),kt(G),e.next=6,on(G);case 6:case"end":return e.stop()}}),e)}))),[st,rt,on]),jn=!yo||!po||!Zo,fn=s(U),Cn=o(fn,2),vn=Cn[0],An=Cn[1],hn=s([]),Sn=o(hn,2),gn=Sn[0],Vn=Sn[1],In=r(),bn=r(),Tn=r(0),Dn=r(!1);c((function(){if(Zo){var e=Zo.slice(0,vn);Vn(e)}}),[Zo,vn,Fo]),l((function(){Dn.current||bn.current&&Tn.current>0&&(bn.current.scrollTop=Tn.current)}),[gn]),c((function(){if(In.current){var e=In.current.querySelector(".".concat(re.wellNameFixed));e&&(ze?e.classList.remove(re.noShadow):e.classList.add(re.noShadow))}}),[ze,gn]);var xn=i((function(){return a(gn,"id")}),[gn]),Pn=i((function(){var e=xn.filter((function(e){return e.checked}));return[e,xn.length!==e.length&&Boolean(e.length)&&!Rt,e.length===xn.length||Rt]}),[xn,Rt]),yn=o(Pn,3),Fn=yn[0],Wn=yn[1],wn=yn[2],Bn=i((function(){return Q()}),[]);c((function(){uo===Z.SUCCEEDED&&dn()}),[mo,dn,uo]);return ie(de,{open:Se,onClose:mn,size:"fullscreen",className:se.modalDialog,title:ie(L,{totalCount:Mo,filteredCount:null!==(ve=null==ko?void 0:ko.length)&&void 0!==ve?ve:0,selectedCount:sn,maxOffsetWellNumber:Oe,isXtoProvider:cn,resyncStatus:uo,setResyncStatus:jo,metricsKeys:So,onChangeMetricsKeys:Xo}),actions:!Te&&ce("div",{className:se.actionsWrapper,children:[!jn&&un?ie(ae,{placement:"bottom-start",title:"Reset to Synced Offsets in ".concat(ge?"Offset App":"Wellhub"),children:ie("div",{children:ie(me,{"data-testid":"".concat(he,"_reset"),onClick:dn,color:"primary",startIcon:ie(f,{}),children:"Reset to Defaults"})})}):tt&&ce("div",{children:[ie("span",{className:m(le.regular12,le.colors.t6),children:"The offset list is being automatically populated by "}),ie("span",{className:m(le.medium12,le.colors.t6),children:pn})]}),ce("div",{className:se.buttonGap,children:[ie(me,{"data-testid":"".concat(he,"_cancel"),onClick:mn,color:"primary",children:"Cancel"}),ce(me,{"data-testid":"".concat(he,"_selectedWells"),variant:"contained",color:"primary",onClick:function(){St.current.size>0?Pt(!0):ln()},disabled:xt,prefix:xt?ie(ue,{size:16}):void 0,children:["Select (",sn,")"]})]})]}),children:ce("div",{className:m(se.offsetWellDialog),children:[ie(pe,{}),jn?ie(fe,{}):ce("div",{className:m(se.contentWrapper,t({},se.contentBlocked,an)),children:[ce("div",{className:se.columnsContainer,children:[!qe&&Se&&ie("div",{className:se.leftColumn,children:ie(E,{ref:Me,mapHidden:qe,subjectWell:Fo,offsetWellIds:jt.map((function(e){return e.id})),wells:Lo,handleChangeOffsetWell:Yo,onBatchSelectWells:en,activeWellId:Be,selectionZone:At,onSelectionZoneConfirm:tn,shouldRecenter:Ye,onRecenterComplete:function(){return $e(!1)}})}),ce("div",{className:se.rightColumn,ref:bn,onScroll:function(e){e.target&&(Tn.current=e.target.scrollTop,_e&&(e.target.scrollLeft=0,Xe(!1)),e.target.scrollLeft<=5&&ze&&Ue(!1),e.target.scrollLeft>5&&!ze&&Ue(!0),e.target.scrollTop<=0&&Ze&&Ke(!1),e.target.scrollTop>0&&!Ze&&Ke(!0),e.target.scrollHeight!==e.target.offsetHeight&&Math.round(e.target.scrollTop+e.target.offsetHeight+2)>=e.target.scrollHeight&&vn<Zo.length&&An((function(e){return e+U})))},children:[ie(O,{isHidden:!Ge,filterOptions:wo,wellSections:po,selectedWellSection:Bt,onChangeBicWells:nn,isSafeguardReady:yt}),ie("div",{className:re.stickyTableWrapper,children:ce(C,{"aria-label":"ows table head",innerRef:In,className:re.stickyTable,children:[ie(v,{children:ie(R,{columnsWithDict:Bo,metricsKeys:So,sortBy:Go,sortDirection:zo,indeterminate:Wn,isAllWellsSelected:wn,onChangeSort:Qo,onUpdateMetricsKey:Jo,handleChangeAllOffsetWells:$o,wellNameStyle:re.wellNameFixed,isImperial:Bn,isTaColumnVisible:!!fo.length,isWellSectionColumnVisible:vo})}),Te&&ie("div",{className:m(se.topGradient,t({},se.topGradientScrolled,Ze))})]})}),!Te&&ce("div",{className:m(re.searchCellWrapper),children:[ie("div",{className:re.searchCell,children:ie(N,{companyIds:null,subjectWellId:Ee,onChange:Ko,selectedWellIds:Fn.map((function(e){return e.id})),onHideAdvancedSearch:_o,loadingAssetIds:It})}),ie("div",{className:m(se.topGradient,t({},se.topGradientScrolled,Ze))})]}),ie(H,{isTableLoading:an,subjectWellId:Ee,columnsWithDict:Bo,wells:gn,metricsKeys:So,handleChangeOffsetWell:Yo,isLastWell:Zo.length<=vn,isLimitedOffsetWells:Rt,maxOffsetWellNumber:Oe,wellSections:po,setActiveWellId:ke,onRowClick:function(e){var t;return null===(t=Me.current)||void 0===t?void 0:t.flyToWell(e)},taScores:fo,isWellSectionColumnVisible:vo,loadingWellIds:xo,scrollContainerRef:bn,isAnimatingRef:Dn})]})]}),Te&&tt&&ce("div",{className:se.viewOnlyInfoContainer,children:[ie("span",{className:m(le.regular12,le.colors.t6),children:"The offset list is being automatically populated by "}),ie("span",{className:m(le.medium12,le.colors.t6),children:pn})]})]})]})})};export{Se as OffsetWellPickerV5};
|
|
1
|
+
import e from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/helpers/defineProperty";import o from"@babel/runtime/helpers/slicedToArray";import n from"@babel/runtime/regenerator";import{useState as s,useRef as r,useMemo as i,useEffect as c,useCallback as p,useLayoutEffect as l}from"react";import m from"classnames";import{uniqBy as a,uniq as u,sortBy as d,isEmpty as j}from"lodash";import{Replay as f}from"@material-ui/icons";import{Table as C,TableHead as v}from"@material-ui/core";import{useAdvancedWells as A}from"./effects/useAdvancedWells.js";import{useBicWells as h}from"./effects/useBicWells.js";import{useCompanyMetricKey as S}from"./effects/useCompanyMetricKey.js";import{useFilterOptions as g}from"./effects/useFilterOptions.js";import{useFilteredWells as V}from"./effects/useFilteredWells.js";import{useSortedWells as I}from"./effects/useSortedWells.js";import"./effects/useAssetsData.js";import{useTableColumns as b}from"./effects/useTableColumns.js";import{useCompanyProvider as T}from"./effects/useCompanyProvider.js";import{useCompanies as D}from"./effects/useCompanies.js";import{usePinnedWells as x}from"./effects/usePinnedWells.js";import{useSearchedWells as P}from"./effects/useSearchedWells.js";import{useViewportWells as y}from"./effects/useViewportWells/useViewportWells.js";import{useTileLoading as F}from"./effects/useTileLoading.js";import{useInitialBounds as W}from"./effects/useInitialBounds.js";import{useLoadAllWellsCompanySafeguard as w}from"./effects/useLoadAllWellsCompanySafeguard.js";import{useAllWells as B}from"./effects/useAllWells/useAllWells.js";import"./stores/viewport-store/ViewportStoreContext.js";import"./stores/viewport-store/ViewportStoreProvider.js";import"zustand";import"lodash/isEqual";import{useViewportStore as k}from"./stores/viewport-store/useViewportStore.js";import{useFetchSubjectWell as M}from"./effects/useFetchSubjectWell.js";import{AppHeader as L}from"./components/AppHeader/AppHeader.js";import{Filter as O}from"./components/Filter/Filter.js";import"./components/Filter/components/MultiFilterSelect/MultiFilterSelect.js";import"./components/Filter/components/SingleFilterSelect/SingleFilterSelect.js";import"./components/Filter/components/StatusFilterSelect/StatusFilterSelect.js";import"./components/Filter/components/PeriodFilterSelect/PeriodFilterSelect.js";import"./components/Filter/components/WellSectionSelect/WellSectionSelect.js";import{WellsMap as E}from"./components/Map/WellsMap.js";import{OffsetWellsTable as H}from"./components/OffsetWellsTable/OffsetWellsTable.js";import{OffsetWellsTableHead as R}from"./components/OffsetWellsTable/OffsetWellsTableHead.js";import{AdvancedSearch as N}from"./components/OffsetWellsTable/AdvancedSearch/AdvancedSearch.js";import{ALL_SECTION_KEY as G,COMPANY_PROVIDERS_FOR_IDAS as q,FilterType as z,ROWS_PER_PAGE as U,RESYNC_STATUS as Z,MAX_OFFSET_SIZE as K,DEFAULT_RADIUS_MILES as _}from"./constants.js";import{SEARCH_CATEGORIES as X}from"./components/OffsetWellsTable/AdvancedSearch/constants.js";import{getCoordinatedWells as J}from"./utils/index.js";import{getIsImperial as Q}from"./utils/getIsImperial.js";import{usePickerPropsStore as Y}from"./stores/picker-props-store/usePickerPropsStore.js";import{useFilterStore as $}from"./stores/filter-store/useFilterStore.js";import{useViewStore as ee}from"./stores/view-store/useViewStore.js";import"./stores/selection-tool-store/SelectionToolStoreContext.js";import"./stores/selection-tool-store/SelectionToolStoreProvider.js";import{useSelectionToolStore as te}from"./stores/selection-tool-store/useSelectionToolStore.js";import{normalizeFilters as oe}from"./stores/filter-store/utils/normalizeFilters.js";import"uuid";import"@babel/runtime/helpers/toConsumableArray";import"lodash/set";import"lodash/get";import"lodash/unset";import"moment";import"../../clients/jsonApi/index.js";import"../../clients/subscriptions/constants.js";import"../../clients/subscriptions.v1.js";import"../../clients/subscriptions/subscriptions-client.factory.js";import"../../clients/api/apiCore.js";import"../../clients/constants.js";import"../../clients/sso/auth0.js";import"../../clients/sso/oauth2.js";import{fetchWellsByRigIds as ne}from"./api/wells/fetchWellsByRigIds.js";import"./api/shared/dataFormatter.js";import se from"./OffsetWellPickerV5.module.css.js";import re from"./components/OffsetWellsTable/OffsetWellsTable.module.css.js";import"../../utils/index.js";import{jsx as ie,jsxs as ce}from"react/jsx-runtime";import"@material-ui/core/Snackbar";import"../Notifications/Toast.js";import"../Notifications/Notifications.scss.js";import{NotificationsContainer as pe}from"../Notifications/NotificationsContainer.js";import le from"../../styles/typography/index.js";import"../../styles/counter/counter.module.scss.js";import"../DevCenter/DevCenterAppContainer/components/IsInsideIsolatedDcAppProvider/IsInsideIsolatedDcAppProvider.js";import"../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js";import"../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js";import"@icon-park/react/es/all";import"../../icons/IconParkProvider.js";import"../../icons/customIcons/icons/AddMessage.js";import"../../icons/customIcons/icons/Attention.js";import"../../icons/customIcons/icons/Collapse.js";import"../../icons/customIcons/icons/Dashboard.js";import"../../icons/customIcons/icons/Expand.js";import"../../icons/customIcons/icons/FolderClosed.js";import"../../icons/customIcons/icons/FolderClosedFilled.js";import"../../icons/customIcons/icons/FolderOpened.js";import"../../icons/customIcons/icons/GreaterOrEqual.js";import"../../icons/customIcons/icons/LessOrEqual.js";import"../../icons/customIcons/icons/Search.js";import"../../icons/customIcons/icons/SearchOne.js";import"../../icons/customIcons/icons/Wellhub.js";import"../../icons/customIcons/icons/MultiRuler.js";import"../../icons/customIcons/icons/Checkbox.js";import"../../icons/customIcons/icons/CheckboxChecked.js";import"../../icons/customIcons/icons/CheckboxIndeterminate.js";import"../../icons/customIcons/icons/Radio.js";import"../../icons/customIcons/icons/RadioChecked.js";import"../../icons/customIcons/icons/SimulFrac.js";import"../../icons/customIcons/icons/ZipperFrac.js";import"../../icons/customIcons/icons/CautionFilled.js";import"../../icons/customIcons/icons/MoreApp.js";import"../../icons/customIcons/icons/Pad.js";import"../../icons/customIcons/icons/DrilloutUnit.js";import"../../icons/customIcons/icons/FracFleet.js";import"../../icons/customIcons/icons/Global.js";import"../../icons/customIcons/icons/Program.js";import"../../icons/customIcons/icons/Rig.js";import"../../icons/customIcons/icons/Well.js";import"../../icons/customIcons/icons/Gap.js";import"../../icons/customIcons/icons/Pin.js";import"../../icons/customIcons/icons/CloseOneFilled.js";import"../../icons/customIcons/icons/AttentionFilled.js";import"../../icons/customIcons/icons/CheckOneFilled.js";import"../../icons/customIcons/icons/Archive.js";import"../../icons/customIcons/icons/ArchiveCancel.js";import"../../icons/customIcons/icons/Unarchive.js";import"../../icons/customIcons/icons/Archived.js";import"../../icons/customIcons/icons/InterventionUnit.js";import"../../icons/customIcons/icons/CloudDelete.js";import"../../icons/customIcons/icons/Lasso.js";import"../../icons/customIcons/icons/Radius.js";import"../../utils/mobileDetect.js";import"../IconButton/index.js";import"../../constants/goals.js";import"../../constants/segment.js";import"../../constants/alerts.js";import"../../constants/apps.js";import"../../constants/drillstring.js";import"../../constants/completion.js";import"../../constants/appPackages.js";import"../../constants/notifications.js";import"../../constants/feed.js";import"../../constants/bha.js";import"../../constants/corvaCompanyId.js";import"../GradientManager/configuration/constants.js";import"../Modal/CorvaModal.css.js";import"../IconMenu/index.js";import"../StyledMenuItem/index.js";import"../AppIcon/AppIcon.js";import"../DevCenter/AppHeader/AppHeader.js";import"../DevCenter/AppSideBar/AppSideBar.js";import"../DevCenter/AppsDataProvider/AppsDataProvider.js";import"../DevCenter/AppContext.js";import"../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import"../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import"@babel/runtime/helpers/objectWithoutProperties";import"react-router";import"../DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import"../DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js";import"../DevCenter/DevCenterAppContainer/components/AppSettingsDialog/components/RemoveAppButton.js";import"../DevCenter/DevCenterAppContainer/components/AppSettingsDialog/components/SettingsAccordion.js";import"../DevCenter/DevCenterAppContainer/components/AnnotationsButton/AnnotationsButton.js";import"../../componentsV2/Text/Text.js";import"../../componentsV2/Grid/Grid.js";import"../../componentsV2/Grid/Cell.js";import"../../componentsV2/Header/Header.scss.js";import{Button as me}from"../../componentsV2/Button/Button.js";import"../../componentsV2/ButtonIcon/ButtonIcon.js";import{Tooltip as ae}from"../../componentsV2/Tooltip/Tooltip.js";import"../../componentsV2/Popover/Popover.js";import"../../componentsV2/Radio/Radio.js";import"../../componentsV2/RadioAndCheckboxGroup/RadioAndCheckboxGroup.scss.js";import"../../componentsV2/Checkbox/Checkbox.js";import"../../componentsV2/TextInput/TextInput.js";import"../../componentsV2/Label/Label.js";import"../../componentsV2/TextEndTruncated/TextEndTruncated.scss.js";import"../../componentsV2/TextMiddleTruncated/TextMiddleTruncated.constants.js";import"../../componentsV2/TextMiddleTruncated/TextMiddleTruncated.scss.js";import"../../componentsV2/TextLink/TextLink.js";import{LoaderCircular as ue}from"../../componentsV2/LoaderCircular/LoaderCircular.js";import"../../componentsV2/Chip/Chip.js";import"../../componentsV2/ChipAlert/ChipAlert.js";import"../../componentsV2/ChipIndicator/ChipIndicator.js";import"../../componentsV2/Avatar/Avatar.js";import"../../componentsV2/AvatarGroup/AvatarGroup.js";import"@material-ui/lab";import"../../componentsV2/ToggleButtons/ToggleButtons.scss.js";import"../../componentsV2/Paper/Paper.js";import"../../componentsV2/ModalWindow/ModalWindow.js";import{Modal as de}from"../../componentsV2/Modal/Modal.js";import"../../componentsV2/Menu/Menu.js";import"../../componentsV2/utils.js";import"../../componentsV2/Hint/Hint.scss.js";import"../../componentsV2/Counter/Counter.js";import"../../componentsV2/BadgeBase/BadgeBase.scss.js";import"../../componentsV2/TemplatesControl/TemplatesControl.js";import"../../componentsV2/TemplatesControl/utils.js";import"../../componentsV2/TemplatesControl/icons/folder/index.js";import"../../componentsV2/TemplatesControl/Store/utils.js";import"../../componentsV2/TemplatesControl/types.js";import"../../permissions/PermissionsContext.js";import"../../permissions/constants/index.js";import"../../permissions/withPermissionsHOC.js";import"../../permissions/ProvidePermissions.js";import"../../componentsV2/BadgeDot/BadgeDot.scss.js";import"../../componentsV2/LoaderLinear/LoaderLinear.scss.js";import"../../componentsV2/LoaderLogo/LoaderLogo.constants.js";import"../../componentsV2/LoaderLogo/LoaderLogo.scss.js";import"../../componentsV2/Switch/Switch.js";import"../../componentsV2/Tabs/Tabs.js";import"../../componentsV2/EmptyState/EmptyState.scss.js";import"../../componentsV2/FileIcon/FileIcon.js";import"../../componentsV2/Tag/Tag.js";import"react-dropzone";import"../../componentsV2/FilesDropzone/FilesDropzone.scss.js";import"../../componentsV2/FilesLoader/FilesLoader.scss.js";import"../../componentsV2/FilesProcessor/FilesProcessor.scss.js";import"../../componentsV2/Skeleton/Skeleton.scss.js";import"../../utils/main.js";import"../../componentsV2/CopyToClipboard/CopyToClipboard.scss.js";import"../../componentsV2/Stepper/Step/Step.scss.js";import"../../componentsV2/Stepper/Stepper.scss.js";import"../../componentsV2/ButtonLive/ButtonLive.js";import"../../componentsV2/ButtonText/ButtonText.js";import"../../componentsV2/IndicatorLive/IndicatorLive.js";import"../../componentsV2/Accordion/Accordion.scss.js";import"../../componentsV2/Breadcrumbs/Breadcrumbs.scss.js";import"../../componentsV2/BadgeComment/BadgeComment.js";import"../../componentsV2/AppContainer/AppContainer.js";import"../../componentsV2/AppContainer/AppContainer.constants.js";import"../../componentsV2/AppFooter/AppFooter.js";import"immutable";import"../../componentsV2/AppCommonsProvider/AppCommonsContext.js";import"../../componentsV2/AppHeader/AppHeader.constants.js";import"../../componentsV2/AppHeader/AppBadge/AppBadge.scss.js";import"../../componentsV2/AppHeader/AppAssets/utils.js";import"../../componentsV2/AppHeader/AppAssets/AppAssets.scss.js";import"../PadModeSelect/PadModeSelect.js";import"../../componentsV2/AppHeader/PadMode/PadMode.scss.js";import"../../constants/streamSourceType.js";import"../../types/shared/Completions.js";import"../PadModeSelect/types.js";import"lodash/flatten";import"lodash/partition";import"../../componentsV2/PadModeSelect/FracModeLabel/FracModeLabel.js";import"../../componentsV2/PadModeSelect/FracModeLabel/FracModeLabel.constants.js";import"../../componentsV2/PadModeSelect/WellStreamActivityStatus/WellStreamActivityStatus.scss.js";import"../../componentsV2/PadModeSelect/PadModeSelect.constants.js";import"../../componentsV2/PadModeSelect/PadModeSelect.scss.js";import"querystring";import"uuid/v1";import"jsona";import"../../utils/env.js";import"../StatusBadge/constants.js";import"lodash/isEmpty";import"lodash/sortBy";import"../DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchContext.js";import{useGlobalOffsetWellsSync as je}from"../../effects/useGlobalOffsetWellsSync.js";import"../../componentsV2/AppHeader/V3/VersionSelect/VersionSelect.js";import"../../componentsV2/UniversalLink/UniversalLink.scss.js";import"../../componentsV2/AppHeader/V3/AssetChips/AssetChips.scss.js";import"../../componentsV2/AppHeader/V3/DqStatusIcon/DqStatusIcon.js";import"../../componentsV2/AppHeader/V3/DqStatusIcon/DqStatusIcon.constants.js";import"../../componentsV2/AppFooter/DqPopover/DqStatusIcon/DqStatusIcon.js";import"../../componentsV2/AppDqPopover/DqAlertTooltip/DqAlertTooltip.scss.js";import"../../componentsV2/AppDqPopover/DqAlert/DqAlert.scss.js";import"../../componentsV2/AppDqPopover/DqAsset/DqAsset.scss.js";import"../../componentsV2/AppDqPopover/AppDqPopover.scss.js";import"../../utils/getSingleAsset.js";import"../../componentsV2/AppHeader/V3/AssetSelector/AssetSelectorChip/AssetSelectorChip.js";import"../../componentsV2/AppHeader/V3/AssetSelector/constants.js";import"../../componentsV2/AppHeader/V3/AssetSelector/AssetSelectorSelect/AssetSelectorSelect.scss.js";import"../../componentsV2/AppHeader/V3/AssetSelector/AssetSelectorSelect/loadAssets.js";import"../../componentsV2/AppHeader/V3/AssetSelector/AssetSelector.scss.js";import"../../componentsV2/AppHeader/V3/AppTitle/AppTitle.constants.js";import"../../componentsV2/AppContainer/headerCommon.scss.js";import"../../componentsV2/AppHeader/V3/AppTitle/AppTitle.scss.js";import"../../componentsV2/AppHeader/V3/constants.scss.js";import"@babel/runtime/helpers/typeof";import"../../componentsV2/AppHeader/V3/SettingsButton/SettingsButton.js";import"../../componentsV2/AppHeader/V3/SettingsButton/SettingsButton.constants.js";import"../../componentsV2/AppSettings/AppSettings.js";import"../../componentsV2/AppSettings/AppSettings.constants.js";import"../../componentsV2/AppSettings/AppSettingsPinningContext.js";import"../../componentsV2/AppSizeProvider/AppSizeProvider.js";import"../../componentsV2/AppHeader/V3/Actions/Actions.constants.js";import"../../componentsV2/AppHeader/V3/Actions/Actions.scss.js";import"../../componentsV2/AppHeader/V3/AppHeaderV3.scss.js";import"../../componentsV2/AppHeader/AppHeader.scss.js";import"../../componentsV2/OffsetWellsButton/OffsetWellsButton.js";import"../../componentsV2/Autocomplete/Autocomplete.scss.js";import"../../componentsV2/Menu/MenuItem/MenuItem.js";import"../../componentsV2/Autocomplete/AutocompleteListBox.js";import"../../componentsV2/AppSettingsDivider/AppSettingsDivider.scss.js";import"../../componentsV2/WellArchivedMessage/WellArchivedMessage.js";import"../../componentsV2/DatePicker/DatePicker.js";import"../../componentsV2/DragHandle/DragHandle.js";import"../../componentsV2/CompletionsOffsetWellPicker/CompletionsOffsetWellPicker.js";import"../DevCenter/DevCenterAppContainer/components/FullscreenButton/FullscreenButton.js";import"../DevCenter/DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js";import"../DevCenter/DevCenterAppContainer/components/DevCenterAppView/DevCenterAppView.js";import"../DevCenter/DevCenterAppContainer/components/RestoreAppSizeButton/index.js";import"rollbar";import"@rollbar/react";import"../DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchButton.scss.js";import"../DevCenter/DevCenterAppContainer/DevCenterAppContainer.css.js";import"../Icons/AnnotationIcon.js";import"../Annotations/components/AnnotationsList/index.js";import"../Annotations/components/LastAnnotation/index.js";import"../Annotations/AnnotationsContext.js";import"../Toaster/Toaster.js";import"../HelpCenter/HelpCenterIcon.js";import"../DevCenter/NavigationBar/NavigationBar.js";import"../DevCenter/SideBar/SideBar.js";import"../DevCenter/AppSettingsPopover/AppSettingsPopover.js";import"../DevCenter/AppFilterPanelLayout/AppFilterPanelLayout.js";import"../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js";import"../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js";import"../AssetEditor/index.js";import"../AssetEditorV2/index.js";import"../AppVersionsSelect/AppVersionsSelect.js";import fe from"../LoadingIndicator/LoadingIndicator.js";import"../Typography.js";import"../RealTimeValuesSidebar/RealTimeSidebar.js";import"../CollapsableSidebar.js";import"../DateTimePicker/index.js";import"../DatePicker/index.js";import"../ErrorBoundary/ErrorBoundary.js";import"../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import"../SlateFormattedText/SlateFormattedText.js";import"../SlateFormattedText/RenderElements.js";import"slate";import"../EmptyState/EmptyState.js";import"../ParameterCharts/ParameterCharts.js";import"../ParameterCharts/AddEditTrack.js";import"../ChartActionsList/ChartActionsList.js";import"../CopyToClipboard/CopyToClipboard.js";import"../AssetEditor/AssetEditorAutocomplete.js";import"../AssetEditor/SingleAssetEditor.js";import"react-color";import"../SettingEditors/ColorEditor/style.css.js";import"../SettingEditors/DropdownEditor/index.js";import"../SwitchControl/index.js";import"../ColorPicker/ColorPicker.js";import"../Chart/components/ChartButton.js";import"../Chart/components/ChartButtons.js";import"../Chart/components/ChartWrapper.js";import"../Chart/components/AxisDropdown.js";import"../Chart/components/ChartSelect.js";import"../Chart/components/buttons/DragToZoomButton.js";import"../Chart/components/buttons/ZoomInButton.js";import"../Chart/components/buttons/ZoomOutButton.js";import"../Chart/components/buttons/PanButton.js";import"../Chart/components/buttons/ResetZoomButton.js";import"../Chart/components/buttons/HideAxesButton.js";import"../Chart/components/buttons/ChartTypeButton.js";import"../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../TruncatedText/index.js";import"../MiddleTruncatedText/MiddleTruncatedText.js";import"../RangeSlider/constants.js";import"../RangeSlider/Input.css.js";import"../RangeSlider/RangeSlider.css.js";import"../AdvancedSlider/AdvancedSlider.js";import"../Breadcrumbs/index.js";import"../VirtualizedTable/index.js";import"../EmptyView/EmptyView.js";import"../EmptyView/EmptyAppView/EmptyAppView.js";import"../Button/components/Button/index.js";import"moment-timezone";import"../Button/components/LiveButton/components/LiveButtonStateIndicator/index.js";import"../Button/components/LiveButton/styles.js";import"../ContextMenuItem/index.js";import"../FolderMenuItem/index.js";import"../EditableItem/EditableItem/index.js";import"../EditableItem/EditableItemWithBadge/index.js";import"../Checkbox/index.js";import"../FolderMenuItemWithLinks/index.js";import"../TextField/index.js";import"../Chip/index.js";import"../Counter/index.js";import"../AnchorsList/AnchorsList.js";import"../Select/index.js";import"../Select/SelectFilterBy.js";import"../CustomSelect/index.js";import"../Tabs/Tabs.js";import"../Tabs/Tab.js";import"../ResizableTable/ResizableTable.js";import"../GradientPicker/GradientPicker.js";import"../GradientManager/GradientList.js";import"@material-ui/icons/AddCircle";import"../GradientManager/GradientPreview/GradientPreview.js";import"../GradientManager/GradientSelect.styles.js";import"../GradientManager/GradientManager.styles.js";import"../Drillstring/BHASchematic.js";import"../Drillstring/BHATable/index.js";import"../Drillstring/BHAComponentIcon.js";import"../Drillstring/BHAComponentDetail/index.js";import"../Drillstring/BHATileIcon.js";import"../Drillstring/BHATile/BHATile.js";import"../Drillstring/BHAList/BHAList.js";import"../Drillstring/BHAComponentsTable/BHAComponentsTable.js";import"../Casing/CasingTable/index.js";import"../Casing/CasingComponentIcon.js";import"../Casing/CasingTileIcon.js";import"../Casing/CasingTableV2/CasingTableV2.js";import"../Casing/CasingTile/CasingTile.js";import"../DisabledSettingsMessage/DisabledSettingsMessage.js";import"../WellSummary/WellSummaryItemLabel.js";import"../WellSummary/WellSummaryItemTitle.js";import"../WellSummary/WellSummaryItemValue.js";import"../WellSummary/ActivitySummaryChart.js";import"../WellSummary/FracWirelineTimeChart.js";import"../BICOffsetPickerDialog/index.js";import"../OffsetWellButton/OffsetWellButton.js";import"../OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../OffsetWellPickerV3/index.js";import"../OffsetWellChips/Chip.js";import"../OffsetWellChips/ChipsContainer.js";import"./OffsetWellPickerV5WithStore.js";import"../OffsetWellMap/OffsetWellMap.js";import"../ConfirmationDialog.js";import"../TextLink/index.js";import"../Avatar/index.js";import"../Template/TemplatePopover/index.js";import"../Template/TemplateSharingDialog/index.js";import"../MenuItem/index.js";import"../MiddleTruncate/MiddleTruncate.js";import"../PinnableFilters/PinnableFilters.js";import"../HeaderLayout/HeaderLayout.js";import"../PadOffsetsPicker/PadOffsetsPicker.js";import"../PadOffsetsPicker/OffsetAssetChip.js";import"../PadOffsetsPicker/OffsetAssetsListExpander.js";import"../PadOffsetsPicker/StagesSelector.js";import"../PadOffsetsPickerV2/PadOffsetsPickerV2.js";import"../Table/TableToolbar/TableToolbar.js";import"../Table/TableContainer/TableContainer.js";import"../Table/TableCell/TableCell.js";import"../Table/TablePagination/TablePagination.js";import"../Table/TablePaginationActions/TablePaginationActions.js";import"../Tooltip/ScrollableTooltip.js";import"../PriceInput/PriceInput.js";import"../LabelsCounter/LabelsCounter.js";import"../Stepper/Stepper.js";import"../Stepper/Step/Step.js";import"../Stepper/StepsWrapper.js";import"../Comment/CommentIcon/index.js";import"../FilesLoader/FilesLoader.js";import"../../componentsV2/FileIcon/icons/ArchiveFileIcon.js";import"../../componentsV2/FileIcon/icons/CSVFileIcon.js";import"../../componentsV2/FileIcon/icons/DocFileIcon.js";import"../../componentsV2/FileIcon/icons/EDMFileIcon.js";import"../../componentsV2/FileIcon/icons/ExcelFileIcon.js";import"../../componentsV2/FileIcon/icons/ImageFileIcon.js";import"../../componentsV2/FileIcon/icons/JsonFileIcon.js";import"../../componentsV2/FileIcon/icons/LasFileIcon.js";import"../../componentsV2/FileIcon/icons/OtherFileIcon.js";import"../../componentsV2/FileIcon/icons/PdfFileIcon.js";import"../../componentsV2/FileIcon/icons/PowerPointFileIcon.js";import"../../componentsV2/FileIcon/icons/TxtFileIcon.js";import"../../componentsV2/FileIcon/icons/UnknownFileIcon.js";import"../../componentsV2/FileIcon/icons/VideoFileIcon.js";import"../../componentsV2/FileIcon/icons/XmlFileIcon.js";import"../SearchInput/index.js";import"../FeedItem/FeedItem.js";import"../FeedItem/FeedItemEditProvider/FeedItemEditProvider.js";import"../PostInput/PostInput.js";import"../KeyboardDateTimePicker.js";import"../AddComment/Popover.js";import"../AddComment/Popup.js";import"../StageDesignVActual/ComparisonBar/ComparisonBar.js";import"../StageDesignVActual/ElementsComparison/ElementsComparison.js";import"../StageDesignVActual/ComparisonHeader.js";import"../StageDesignVActual/ComparisonRow.js";import"../EmbeddedApp/DevCenterEmbeddedApp.js";import"../EmbeddedApp/EmbeddedApp.js";import"../Autocomplete/Autocomplete.js";import"../DocumentViewer/DocumentViewer.js";import"../ColorPickerPalette/ColorPickerPalette.js";import"../Search/Search.js";import"../Search/components/Listbox.js";import"../Search/components/Paper.js";import"../Search/components/RecentSearches.js";import"../Search/components/Groups.js";import"../Search/components/SelectAllListItem.js";import"../StatusBadge/index.js";import"../Attachment/index.js";import"../EmojiIconButton.js";import"../FileUploadIconButton.js";import"../FilePreview/index.js";import"../FailedFileUploading.js";import"../UserMention/index.js";import"../CommentsInfo/index.js";import"../CommentInput/index.js";import"../Comment/index.js";import"../CommentLoader.js";import"../AssetNameLabel/AssetStatusBadge.js";import"../AssetEditorV2/components/PrimaryAssetSelect.js";import"../AssetEditorV2/components/SecondaryAssetSelect.js";import"../AssetEditorV2/components/SelectItem.js";import"../AssetEditorV2/components/MultipleAssetsToggle.js";import"../AssetEditorV2/components/PrimaryAssetSelectV2.js";import"../EChartsWrapper/EChartsWrapper.js";import"../AssetsMultipleSelector/AssetsMultipleSelector.js";import"@material-ui/icons/Close";import"@material-ui/icons/GetApp";import"../GoogleDocsViewer/index.js";import"../NewDocumentViewer/effects/useFileContent.js";import"../NewDocumentViewer/styles.js";import"../FilesLoaderV2/styles.js";import"../FilesDropzone/styles.js";import"../FilesProcessor/styles.js";import"../Hint/styles.js";import"@babel/runtime/helpers/taggedTemplateLiteral";import"fparser";import"../Formula/useFormulaStyles.js";import"../Formula/RootXIcon.js";import"../Formula/FormulaTextEditor.js";import"../Formula/CloseSuggestion.js";import"../Formula/SuggestionsMenu.js";import{showInfoNotification as Ce}from"../../utils/notificationToasts.js";function ve(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function Ae(e){for(var o=1;o<arguments.length;o++){var n=null!=arguments[o]?arguments[o]:{};o%2?ve(Object(n),!0).forEach((function(o){t(e,o,n[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ve(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var he="OffsetWellPickerV5",Se=function(){var ve,Se=Y((function(e){return e.open})),ge=Y((function(e){return e.isWDUser})),Ve=Y((function(e){return e.defaultSubjectWell})),Ie=Y((function(e){return e.currentUser})),be=Y((function(e){return e.offsetSettings})),Te=Y((function(e){return e.isViewOnly})),De=Y((function(e){return e.onClose})),xe=Y((function(e){return e.onSave})),Pe=Y((function(e){return e.maxOffsetSize})),ye=Y((function(e){return e.localMaxOffsetSize})),Fe=Y((function(e){return e.syncAutoEnabled})),We=s(null),we=o(We,2),Be=we[0],ke=we[1],Me=r(null),Le=Math.min(Pe+1,ye+1,K+1),Oe=Math.min(Math.max(Le,ye+1),K+1),Ee=null==Ve?void 0:Ve.asset_id,He=M(Ee),Re=o(He,1)[0],Ne=i((function(){var e,t=null==Re||null===(e=Re.topHole)||void 0===e?void 0:e.coordinates;if(!t)return null;var n=o(t,2);return{latitude:n[0],longitude:n[1]}}),[Re]);je(be,xe,Oe);var Ge=ee((function(e){return e.isFilterExpanded})),qe=ee((function(e){return e.isMapHidden})),ze=ee((function(e){return e.isHScrollMoved})),Ue=ee((function(e){return e.setIsHScrollMoved})),Ze=ee((function(e){return e.isVScrollMoved})),Ke=ee((function(e){return e.setIsVScrollMoved})),_e=ee((function(e){return e.isAdvancedSearchHidden})),Xe=ee((function(e){return e.setIsAdvancedSearchHidden})),Je=Y((function(e){return e.isLoadAllWells})),Qe=Y((function(e){return e.resetIsLoadAllWells})),Ye=Y((function(e){return e.shouldRecenter})),$e=Y((function(e){return e.setShouldRecenter})),et=+(null==Ve?void 0:Ve.companyId)||+(null==Ie?void 0:Ie.company_id),tt=Ee>0,ot=$((function(e){return e.filters})),nt=$((function(e){return e.setFilters})),st=$((function(e){return e.resetFilters})),rt=te((function(e){return e.reset})),it=k((function(e){return e.wells})),ct=k((function(e){return e.bounds})),pt=D({open:Se}),lt=pt.canViewCompanies,mt=pt.canViewCompaniesLoading,at=pt.companies,ut=s([]),dt=o(ut,2),jt=dt[0],ft=dt[1],Ct=s((function(){var e;return null!==(e=null==be?void 0:be.lastSelectionZone)&&void 0!==e?e:null})),vt=o(Ct,2),At=vt[0],ht=vt[1],St=r(new Set),gt=s([]),Vt=o(gt,2),It=Vt[0],bt=Vt[1],Tt=s(!1),Dt=o(Tt,2),xt=Dt[0],Pt=Dt[1];y(!Je);var yt=w({companies:at,canViewCompanies:lt,canViewCompaniesLoading:mt}),Ft=yt.isSafeguardReady,Wt=yt.resetSafeguard;B(Je,Ft),W({subjectWellCoords:Ne,hasSubjectWell:null!=Ee,open:Se,ghostZone:At});var wt=F(),Bt=s((null==be?void 0:be.wellSection)||G),kt=o(Bt,2),Mt=kt[0],Lt=kt[1],Ot=r(!0),Et=s(!0),Ht=o(Et,2),Rt=Ht[0],Nt=Ht[1],Gt=Oe<=(null==jt?void 0:jt.length),qt=r(),zt=s(!0),Ut=o(zt,2),Zt=Ut[0],Kt=Ut[1];c((function(){if(Se&&Gt&&Ce("App can’t process more than (".concat(Oe-1,") Offset Wells.")),!Se){var e,t,o=new Set(qt.current||[]);(null==be||null===(e=be.selectedWellIds)||void 0===e?void 0:e.length)===(null===(t=qt.current)||void 0===t?void 0:t.length)&&((null==be?void 0:be.selectedWellIds)||[]).every((function(e){return o.has(e)}))||(Ot.current=!0),qt.current=null==be?void 0:be.selectedWellIds}}),[Gt,Se,be,Oe]);var _t=i((function(){return Array.from(it.values())}),[it]),Xt=wt||0===_t.length&&null===ct,Jt=x(null==be?void 0:be.selectedWellIds),Qt=o(Jt,2),Yt=Qt[0],$t=Qt[1],eo=P(),to=o(eo,3),oo=to[0],no=to[1],so=to[2],ro=i((function(){if(!_t)return null;var e=_t;if(null!=Yt&&Yt.length){var t=new Set(e.map((function(e){return e.id}))),o=Yt.filter((function(e){return!t.has(e.id)}));o.length>0&&(e=e.concat(o))}if(null!=oo&&oo.length){var n=new Set(e.map((function(e){return e.id}))),s=oo.filter((function(e){return!n.has(e.id)}));s.length>0&&(e=e.concat(s))}return Re&&!e.some((function(e){return e.id===Re.id}))&&(e=[Re].concat(e)),e}),[_t,Re,Yt,oo]),io=T(et),co=o(io,1)[0],po=h(Ee,ro),lo=o(po,8),mo=lo[0],ao=lo[1],uo=lo[2],jo=lo[3],fo=lo[4],Co=lo[5],vo=lo[6],Ao=lo[7],ho=i((function(){return!!mo&&mo.some((function(e){return e.value!==G}))}),[mo]);c((function(){Kt(!0),ao(null),jo(null)}),[jo,ao,Ee]);var So=S(et,null==be?void 0:be.metricsKeys),go=o(So,2),Vo=go[0],Io=go[1],bo=A(ro,mo,uo,Ee,Vo,Se),To=o(bo,4),Do=To[0],xo=To[1],Po=To[2],yo=To[3],Fo=Do||Po,Wo=i((function(){if(!Fo||null==at||!at.length)return Fo;var e={};return at.forEach((function(t){e[t.id]=t.name})),Fo.map((function(t){return Ae(Ae({},t),{},{companyName:e[t.companyId]||"Null"})}))}),[Fo,at]),wo=i((function(){return Re?Wo&&Wo.find((function(e){return e.id===Re.id}))||Re:null}),[Re,Wo]),Bo=!(Xt||xo||$t||no);c((function(){if(Bo){var t,o=(t=e(n.mark((function e(){var t,o,s,r,i,c,p,l,m,a,u,d;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=void 0===(null==be?void 0:be.isSynced)||(null==be?void 0:be.isSynced),o=!0,!t){e.next=20;break}if(r=uo[G]||[],i=new Set(r),c=((null==be?void 0:be.selectedWellIds)||[]).every((function(e){return i.has(e)})),r.length===(null==be||null===(s=be.selectedWellIds)||void 0===s?void 0:s.length)&&c){e.next=17;break}return e.next=9,J(r,Ee);case 9:p=e.sent,l=p.slice(0,ye+1).map((function(e){return e.id})),m=Ae(Ae({},be),{},{subjectWellId:Ee,selectedWellIds:l,offsetWellsLimited:Oe<=l.length}),a=new Set(l),u=p.filter((function(e){return a.has(e.id)})),xe(m,u),e.next=18;break;case 17:o=!1;case 18:e.next=21;break;case 20:o=!1;case 21:if(o){e.next=26;break}return e.next=24,J((null==be?void 0:be.selectedWellIds)||[],Ee);case 24:d=e.sent,xe(be,d);case 26:case"end":return e.stop()}}),e)}))),function(){return t.apply(this,arguments)});Fe&&Zt&&be&&uo&&(o(),Kt(!1))}}),[be,uo,Ee,Oe,Fe,Bo,Zt,Le,ye,xe]);var ko=g(Wo,at,lt),Mo=b(Vo,lt,ho),Lo=V(Wo,ot),Oo=i((function(){return Wo?a(Wo,"id").length:0}),[Wo]),Eo=i((function(){if(!Lo)return Lo;var e=new Map((null==Wo?void 0:Wo.map((function(e){return[e.id,e]})))||[]),t=jt.map((function(t){return e.get(t.id)||t})),o=((null==Ao?void 0:Ao[Mt])||[]).map((function(t){return e.get(t)})).filter((function(e){return void 0!==e}));return a(t.concat(o).concat(Lo),"id")}),[Wo,Lo,jt,Ao,Mt]);c((function(){if(Lo&&Bo&&Ot.current){var e=new Set((null==be?void 0:be.selectedWellIds)||[]),t=Wo.filter((function(t){return e.has(t.id)})),o=new Set(t.map((function(e){return e.id}))),n=jt.filter((function(t){return e.has(t.id)&&!o.has(t.id)}));t=t.concat(n),wo&&(t=t.concat(wo)),ft(a(t,"id")),Ot.current=!1}}),[Wo,Lo,null==be?void 0:be.selectedWellIds,Bo,wo,jt]),c((function(){if(null!=Wo&&Wo.length&&0!==St.current.size){var e=St.current,t=Wo.filter((function(t){return e.has(t.id)}));if(t.length>0){var o=t.map((function(e){return e.id}));bt((function(e){return e.filter((function(e){return!o.includes(e)}))})),ht(null),ft((function(e){var o=t.slice(0,Math.max(0,Oe-e.length));return a(e.concat(o),"id")})),t.forEach((function(t){return e.delete(t.id)}))}}}),[Wo,Oe]);var Ho,Ro,No,Go=I(wo,Eo,jt,Nt,null==be?void 0:be.selectedWellIds),qo=o(Go,5),zo=qo[0],Uo=qo[1],Zo=qo[2],Ko=qo[3],_o=qo[4],Xo=p((Ho=e(n.mark((function e(t,o,s,r){var i,c,p,l,m,d,j;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(ht(null),s!==X.well.name){e.next=5;break}i=o,e.next=22;break;case 5:if(r&&0!==r.length){e.next=7;break}return e.abrupt("return");case 7:return Nt(!0),e.prev=8,e.next=11,ne(r,null);case 11:c=e.sent,i=c.map((function(e){return e.id})),e.next=19;break;case 15:return e.prev=15,e.t0=e.catch(8),console.error("Failed to fetch wells for rigs:",e.t0),e.abrupt("return");case 19:return e.prev=19,Nt(!1),e.finish(19);case 22:if(p=new Set(i),l=Wo.filter((function(e){var t=e.id;return p.has(t)})),!(t&&l.length<i.length)){e.next=32;break}if(m=new Set(l.map((function(e){return e.id}))),!((d=i.filter((function(e){return!m.has(e)}))).length>0)){e.next=32;break}return bt((function(e){return e.concat(d)})),e.next=31,so(d);case 31:d.forEach((function(e){return St.current.add(e)}));case 32:t?(j=l.slice(0,Math.min(l.length,Oe-jt.length))).length>0&&ft((function(e){return a(e.concat(j),"id")})):ft((function(e){return u(e.filter((function(e){var t=e.id;return!l.find((function(e){return e.id===t}))})))}));case 33:case"end":return e.stop()}}),e,null,[[8,15,19,22]])}))),function(e,t,o,n){return Ho.apply(this,arguments)}),[Wo,Oe,jt.length,so,Nt]),Jo=p((function(){Xe(!0)}),[Xe]),Qo=p((function(e){Io(e)}),[Io]),Yo=p((function(e,t){Io((function(o){return o.map((function(o){return o===e?t:o}))}))}),[Io]),$o=p((function(e,t){Uo(e),Ko(t)}),[Uo,Ko]),en=p((function(e,t){ht(null),ft(t?function(t){if(t.length>=Oe)return t;var o=(null==Wo?void 0:Wo.find((function(t){return t.id===e.id})))||e;return t.concat(o)}:function(t){return t.filter((function(t){return t.id!==e.id}))})}),[Wo,Oe]),tn=p((function(e){if(ht(null),e){var t=wo?Lo.concat(wo):Lo,o=d(a(t,"id"),"distance");ft(o.slice(0,Oe))}else ft(wo?[wo]:[])}),[Lo,wo,Oe]),on=p((function(e,t){ft((function(o){var n=new Set(o.map((function(e){return e.id}))),s=e.filter((function(e){return!n.has(e.id)})),r=s.length;if(0===r)return setTimeout((function(){return null==t?void 0:t({attempted:0,added:0})}),0),o;var i=Oe-o.length,c=s.slice(0,i),p=c.length,l=c.map((function(e){return(null==Wo?void 0:Wo.find((function(t){return t.id===e.id})))||e}));return setTimeout((function(){return null==t?void 0:t({attempted:r,added:p})}),0),a(o.concat(l),"id")}))}),[Wo,Oe]),nn=p((function(e){ht(e)}),[]),sn=p((Ro=e(n.mark((function e(t){var o,s,r,i,c,p;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!Ao){e.next=15;break}if(o=Ao[t]||[],s=new Map((null==ro?void 0:ro.map((function(e){return[e.id,e]})))||[]),r=o.filter((function(e){return!s.has(e)})),i=[],!(r.length>0)){e.next=9;break}return e.next=8,so(r);case 8:i=e.sent;case 9:i.forEach((function(e){return s.set(e.id,e)})),c=o.map((function(e){return s.get(e)})).filter((function(e){return void 0!==e})),p=d(c,"distance"),ft(p.slice(0,Le)),e.next=16;break;case 15:ft(wo?[wo]:[]);case 16:case"end":return e.stop()}}),e)}))),function(e){return Ro.apply(this,arguments)}),[Ao,ro,so,Le,wo]),rn=p((No=e(n.mark((function e(t){return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Lt(t),e.next=3,sn(t);case 3:case"end":return e.stop()}}),e)}))),function(e){return No.apply(this,arguments)}),[sn]),cn=i((function(){return jt.find((function(e){return e.id===Ee}))?jt.length-1:jt.length}),[jt,Ee]),pn=i((function(){if(!uo)return!1;var e=jt.map((function(e){return e.id})),t=uo[Mt]||[];if(Math.min(t.length,Le)!==e.length)return!1;var o=new Set(t);return e.every((function(e){return o.has(e)}))}),[uo,jt,Mt,Le]),ln=i((function(){return!!co&&q.includes(co)}),[co]),mn=i((function(){return ln?"IDAS generated offsets.":ge?"Offset Selection App.":"WellHub."}),[ln,ge]),an=p((function(){Wt(),De();var e=jt.map((function(e){return e.id})),t=Ae(Ae({},be),{},{companyId:et,subjectWellId:Ee,selectedWellIds:e,filters:oe(ot),metricsKeys:Vo,wellSection:Mt,isSynced:pn,mapHidden:qe,filterExpanded:Ge,offsetWellsLimited:Gt,lastSelectionZone:At,isLoadAllWells:Je});xe(t,jt)}),[Wt,De,jt,be,et,Ee,ot,Vo,Mt,pn,qe,Ge,Gt,At,Je,xe]);c((function(){xt&&0===St.current.size&&(Pt(!1),an())}),[xt,jt,an]);var un=function(){var e,t,o=new Set((null==be?void 0:be.selectedWellIds)||[]),n=(Wo||[]).filter((function(e){return o.has(e.id)}));if(null!=Yt&&Yt.length){var s=new Set(n.map((function(e){return e.id}))),r=Yt.filter((function(e){return o.has(e.id)&&!s.has(e.id)}));n=n.concat(r)}wo&&(n=n.concat(wo)),ft(a(n,"id")),ht(null!==(e=null==be?void 0:be.lastSelectionZone)&&void 0!==e?e:null);var i=Ae(Ae({},be),{},{mapHidden:qe,filterExpanded:Ge});xe(i);var c=oe(null==be?void 0:be.filters);nt(Ae(Ae({},c),{},{radius:null!==(t=null==c?void 0:c.radius)&&void 0!==t?t:_})),Lt((null==be?void 0:be.wellSection)||G),Qe(),Wt(),De()},dn=Rt||Xt,jn=i((function(){return!!tt&&(!dn&&(!pn||(!(j(ot)||!ot[z.sideTracks])||Mt!==G)))}),[tt,pn,ot,Mt,dn]),fn=p(e(n.mark((function e(){return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return st(),rt(),ht(null),Lt(G),e.next=6,sn(G);case 6:case"end":return e.stop()}}),e)}))),[st,rt,sn]),Cn=!Wo||!mo||!_o,vn=s(U),An=o(vn,2),hn=An[0],Sn=An[1],gn=s([]),Vn=o(gn,2),In=Vn[0],bn=Vn[1],Tn=r(),Dn=r(),xn=r(0),Pn=r(!1);c((function(){if(_o){var e=_o.slice(0,hn);bn(e)}}),[_o,hn,wo]),l((function(){Pn.current||Dn.current&&xn.current>0&&(Dn.current.scrollTop=xn.current)}),[In]),c((function(){if(Tn.current){var e=Tn.current.querySelector(".".concat(re.wellNameFixed));e&&(ze?e.classList.remove(re.noShadow):e.classList.add(re.noShadow))}}),[ze,In]);var yn=i((function(){return a(In,"id")}),[In]),Fn=i((function(){var e=yn.filter((function(e){return e.checked}));return[e,yn.length!==e.length&&Boolean(e.length)&&!Gt,e.length===yn.length||Gt]}),[yn,Gt]),Wn=o(Fn,3),wn=Wn[0],Bn=Wn[1],kn=Wn[2],Mn=i((function(){return Q()}),[]);c((function(){fo===Z.SUCCEEDED&&fn()}),[uo,fn,fo]);return ie(de,{open:Se,onClose:un,size:"fullscreen",className:se.modalDialog,title:ie(L,{totalCount:Oo,filteredCount:null!==(ve=null==Lo?void 0:Lo.length)&&void 0!==ve?ve:0,selectedCount:cn,maxOffsetWellNumber:Oe,isXtoProvider:ln,resyncStatus:fo,setResyncStatus:Co,metricsKeys:Vo,onChangeMetricsKeys:Qo}),actions:!Te&&ce("div",{className:se.actionsWrapper,children:[!Cn&&jn?ie(ae,{placement:"bottom-start",title:"Reset to Synced Offsets in ".concat(ge?"Offset App":"Wellhub"),children:ie("div",{children:ie(me,{"data-testid":"".concat(he,"_reset"),onClick:fn,color:"primary",startIcon:ie(f,{}),children:"Reset to Defaults"})})}):tt&&ce("div",{children:[ie("span",{className:m(le.regular12,le.colors.t6),children:"The offset list is being automatically populated by "}),ie("span",{className:m(le.medium12,le.colors.t6),children:mn})]}),ce("div",{className:se.buttonGap,children:[ie(me,{"data-testid":"".concat(he,"_cancel"),onClick:un,color:"primary",children:"Cancel"}),ce(me,{"data-testid":"".concat(he,"_selectedWells"),variant:"contained",color:"primary",onClick:function(){St.current.size>0?Pt(!0):an()},disabled:xt,prefix:xt?ie(ue,{size:16}):void 0,children:["Select (",cn,")"]})]})]}),children:ce("div",{className:m(se.offsetWellDialog),children:[ie(pe,{}),Cn?ie(fe,{}):ce("div",{className:m(se.contentWrapper,t({},se.contentBlocked,dn)),children:[ce("div",{className:se.columnsContainer,children:[!qe&&Se&&ie("div",{className:se.leftColumn,children:ie(E,{ref:Me,mapHidden:qe,subjectWell:wo,offsetWellIds:jt.map((function(e){return e.id})),wells:Eo,handleChangeOffsetWell:en,onBatchSelectWells:on,activeWellId:Be,selectionZone:At,onSelectionZoneConfirm:nn,shouldRecenter:Ye,onRecenterComplete:function(){return $e(!1)}})}),ce("div",{className:se.rightColumn,ref:Dn,onScroll:function(e){e.target&&(xn.current=e.target.scrollTop,_e&&(e.target.scrollLeft=0,Xe(!1)),e.target.scrollLeft<=5&&ze&&Ue(!1),e.target.scrollLeft>5&&!ze&&Ue(!0),e.target.scrollTop<=0&&Ze&&Ke(!1),e.target.scrollTop>0&&!Ze&&Ke(!0),e.target.scrollHeight!==e.target.offsetHeight&&Math.round(e.target.scrollTop+e.target.offsetHeight+2)>=e.target.scrollHeight&&hn<_o.length&&Sn((function(e){return e+U})))},children:[ie(O,{isHidden:!Ge,filterOptions:ko,wellSections:mo,selectedWellSection:Mt,onChangeBicWells:rn,isSafeguardReady:Ft}),ie("div",{className:re.stickyTableWrapper,children:ce(C,{"aria-label":"ows table head",innerRef:Tn,className:re.stickyTable,children:[ie(v,{children:ie(R,{columnsWithDict:Mo,metricsKeys:Vo,sortBy:zo,sortDirection:Zo,indeterminate:Bn,isAllWellsSelected:kn,onChangeSort:$o,onUpdateMetricsKey:Yo,handleChangeAllOffsetWells:tn,wellNameStyle:re.wellNameFixed,isImperial:Mn,isTaColumnVisible:!!vo.length,isWellSectionColumnVisible:ho})}),Te&&ie("div",{className:m(se.topGradient,t({},se.topGradientScrolled,Ze))})]})}),!Te&&ce("div",{className:m(re.searchCellWrapper),children:[ie("div",{className:re.searchCell,children:ie(N,{companyIds:null,subjectWellId:Ee,onChange:Xo,selectedWellIds:wn.map((function(e){return e.id})),onHideAdvancedSearch:Jo,loadingAssetIds:It})}),ie("div",{className:m(se.topGradient,t({},se.topGradientScrolled,Ze))})]}),ie(H,{isTableLoading:dn,subjectWellId:Ee,columnsWithDict:Mo,wells:In,metricsKeys:Vo,handleChangeOffsetWell:en,isLastWell:_o.length<=hn,isLimitedOffsetWells:Gt,maxOffsetWellNumber:Oe,wellSections:mo,setActiveWellId:ke,onRowClick:function(e){var t;return null===(t=Me.current)||void 0===t?void 0:t.flyToWell(e)},taScores:vo,isWellSectionColumnVisible:ho,loadingWellIds:yo,scrollContainerRef:Dn,isAnimatingRef:Pn})]})]}),Te&&tt&&ce("div",{className:se.viewOnlyInfoContainer,children:[ie("span",{className:m(le.regular12,le.colors.t6),children:"The offset list is being automatically populated by "}),ie("span",{className:m(le.medium12,le.colors.t6),children:mn})]})]})]})})};export{Se as OffsetWellPickerV5};
|
|
2
2
|
//# sourceMappingURL=OffsetWellPickerV5.js.map
|