{"version":3,"sources":["webpack:///./pages/projects/blob/show/index.js","webpack:////build/source/ee/app/assets/javascripts/pages/projects/blob/show/index.js","webpack:///./sourcegraph/load.js","webpack:///./projects/tree/components/commit_pipeline_status.vue","webpack:///./projects/tree/services/commit_pipeline_service.js","webpack:///projects/tree/components/commit_pipeline_status.vue","webpack:///./projects/tree/components/commit_pipeline_status.vue?be78","webpack:///./projects/tree/components/commit_pipeline_status.vue?08ff","webpack:///./blob/blob_fork_suggestion.js","webpack:///./pages/projects/init_blob.js","webpack:///./loading_icon_for_legacy_js.js","webpack:///./gpg_badges.js","webpack:///./lib/utils/poll.js","webpack:////build/source/ee/app/assets/javascripts/pages/projects/shared/init_blob.js","webpack:////build/source/ee/app/assets/javascripts/path_locks.js","webpack:///./render_vue_component_for_legacy_js.js"],"names":["Vue","use","Vuex","VueApollo","VueRouter","apolloProvider","defaultClient","createDefaultClient","viewBlobEl","document","querySelector","refSwitcherEl","getElementById","projectId","projectRootPath","ref","refType","dataset","el","render","createElement","RefSelector","props","value","joinPaths","useSymbolicRefNames","queryParams","sort","on","input","selectedRef","InternalEvents","trackEvent","visitUrl","generateRefDestinationPath","initRefSwitcher","initAmbiguousRefModal","initFindFileShortcut","blobPath","projectPath","targetBranch","originalBranch","resourceId","userId","explainCodeAvailable","canDownloadCode","router","createRouter","initHeaderApp","isBlobView","store","createStore","provide","highlightWorker","HighlightWorker","parseBoolean","provideWebIdeLink","BlobContentViewer","path","initAuxiliaryViewer","initBlob","BlobViewer","forkEl","selectedBranch","sourceName","sourcePath","sourceDefaultBranch","canSyncBranch","aheadComparePath","behindComparePath","createMrPath","viewMrPath","h","ForkInfo","initForkInfo","commitPipelineStatusEl","components","CommitPipelineStatus","endpoint","initWebIdeLink","GpgBadges","fetch","codeNavEl","codeNavigationPath","definitionPathPrefix","then","m","default","blobs","tableContentsEl","TableOfContents","treeHistoryLinkEl","historyLink","mode","url","generateHistoryUrl","this","$route","params","meta","query","ref_type","GlButton","attrs","href","__","initTreeHistoryLinkApp","codeOwnersEl","branch","canViewBranchRules","branchRulesPath","CodeOwners","filePath","initSourcegraph","CommitPipelineService","constructor","fetchData","axios","get","directives","GlTooltip","GlTooltipDirective","CiIcon","GlLoadingIcon","type","String","required","data","ciStatus","isLoading","computed","statusTitle","sprintf","s__","text","hasCiStatus","_isEmpty","mounted","service","initPolling","beforeDestroy","poll","stop","methods","successCallback","res","pipelines","length","details","status","errorCallback","icon","group","createAlert","message","_this","Poll","resource","method","response","Visibility","hidden","fetchPipelineCommitData","makeRequest","change","restart","catch","component","_c","_self","_e","defaults","openButtons","forkButtons","cancelButtons","suggestionSections","actionTextPieces","BlobForkSuggestion","options","elementMap","onOpenButtonClick","bind","onCancelButtonClick","init","bindEvents","$","showSuggestionSection","forkPath","action","removeClass","attr","hideSuggestionSection","addClass","e","currentTarget","destroy","off","LineHighlighter","BlobLinePermalinkUpdater","querySelectorAll","shortcircuitPermalinkButton","addShortcutsExtension","ShortcutsNavigation","ShortcutsBlob","defaultValue","prop","_GlLoadingIcon$props$","loadingIconForLegacyJS","inline","color","size","classes","label","renderVueComponentForLegacyJS","class","tag","Promise","resolve","badges","html","children","displayError","reject","Error","queryToObject","serialize","signatures","forEach","signature","filter","commit_sha","replaceWith","notificationCallback","intervalHeader","timeoutID","canPoll","checkConditions","headers","normalizeHeaders","pollInterval","parseInt","successCodes","indexOf","clearTimeout","setTimeout","makeDelayedRequest","delay","_this2","_this3","error","HTTP_STATUS_ABORTED","enable","dataEl","toggle_path","JSON","parse","innerHTML","async","preventDefault","target","state","confirmAction","post","window","location","reload","initPathLocks","Component","vm","$mount","$forceUpdate","$el","cloneNode","$destroy"],"mappings":"kcA+BAA,UAAIC,IAAIC,KACRF,UAAIC,IAAIE,KACRH,UAAIC,IAAIG,KAER,MAAMC,EAAiB,IAAIF,IAAU,CACnCG,cAAeC,gBAGXC,EAAaC,SAASC,cAAc,qBAkC1C,GAhCwB,WACtB,MAAMC,EAAgBF,SAASG,eAAe,wBAE9C,IAAKD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,EAAGK,WAEI/P,K","file":"pages.projects.blob.show.75f08253.chunk.js","sourcesContent":["import Vue from 'vue';\n// eslint-disable-next-line no-restricted-imports\nimport Vuex from 'vuex';\nimport { GlButton } from '@gitlab/ui';\nimport VueApollo from 'vue-apollo';\nimport VueRouter from 'vue-router';\nimport { provideWebIdeLink } from 'ee_else_ce/pages/projects/shared/web_ide_link/provide_web_ide_link';\nimport TableOfContents from '~/blob/components/table_contents.vue';\nimport { BlobViewer, initAuxiliaryViewer } from '~/blob/viewer/index';\nimport { __ } from '~/locale';\nimport GpgBadges from '~/gpg_badges';\nimport createDefaultClient from '~/lib/graphql';\nimport initBlob from '~/pages/projects/init_blob';\nimport ForkInfo from '~/repository/components/fork_info.vue';\nimport initWebIdeLink from '~/pages/projects/shared/web_ide_link';\nimport CommitPipelineStatus from '~/projects/tree/components/commit_pipeline_status.vue';\nimport BlobContentViewer from '~/repository/components/blob_content_viewer.vue';\nimport '~/sourcegraph/load';\nimport createStore from '~/code_navigation/store';\nimport { generateRefDestinationPath } from '~/repository/utils/ref_switcher_utils';\nimport { generateHistoryUrl } from '~/repository/utils/url_utility';\nimport RefSelector from '~/ref/components/ref_selector.vue';\nimport { joinPaths, visitUrl } from '~/lib/utils/url_utility';\nimport { parseBoolean } from '~/lib/utils/common_utils';\nimport HighlightWorker from '~/vue_shared/components/source_viewer/workers/highlight_worker?worker';\nimport initAmbiguousRefModal from '~/ref/init_ambiguous_ref_modal';\nimport { InternalEvents } from '~/tracking';\nimport { initFindFileShortcut } from '~/projects/behaviors';\nimport initHeaderApp from '~/repository/init_header_app';\nimport createRouter from '~/repository/router';\n\nVue.use(Vuex);\nVue.use(VueApollo);\nVue.use(VueRouter);\n\nconst apolloProvider = new VueApollo({\n defaultClient: createDefaultClient(),\n});\n\nconst viewBlobEl = document.querySelector('#js-view-blob-app');\n\nconst initRefSwitcher = () => {\n const refSwitcherEl = document.getElementById('js-tree-ref-switcher');\n\n if (!refSwitcherEl) return false;\n\n const { projectId, projectRootPath, ref, refType } = refSwitcherEl.dataset;\n\n return new Vue({\n el: refSwitcherEl,\n render(createElement) {\n return createElement(RefSelector, {\n props: {\n projectId,\n value: refType ? joinPaths('refs', refType, ref) : ref,\n useSymbolicRefNames: true,\n queryParams: { sort: 'updated_desc' },\n },\n on: {\n input(selectedRef) {\n InternalEvents.trackEvent('click_ref_selector_on_blob_page');\n visitUrl(generateRefDestinationPath(projectRootPath, ref, selectedRef));\n },\n },\n });\n },\n });\n};\n\ninitRefSwitcher();\ninitAmbiguousRefModal();\ninitFindFileShortcut();\n\nif (viewBlobEl) {\n const {\n blobPath,\n projectPath,\n targetBranch,\n originalBranch,\n resourceId,\n userId,\n explainCodeAvailable,\n refType,\n canDownloadCode,\n ...dataset\n } = viewBlobEl.dataset;\n const router = createRouter(projectPath, originalBranch);\n\n initHeaderApp({ router, isBlobView: true });\n\n // eslint-disable-next-line no-new\n new Vue({\n el: viewBlobEl,\n store: createStore(),\n router,\n apolloProvider,\n provide: {\n highlightWorker: new HighlightWorker(),\n targetBranch,\n originalBranch,\n resourceId,\n userId,\n explainCodeAvailable: parseBoolean(explainCodeAvailable),\n canDownloadCode: parseBoolean(canDownloadCode),\n ...provideWebIdeLink(dataset),\n },\n render(createElement) {\n return createElement(BlobContentViewer, {\n props: {\n path: blobPath,\n projectPath,\n refType,\n },\n });\n },\n });\n\n initAuxiliaryViewer();\n initBlob();\n} else {\n new BlobViewer(); // eslint-disable-line no-new\n initBlob();\n}\n\nconst initForkInfo = () => {\n const forkEl = document.getElementById('js-fork-info');\n if (!forkEl) {\n return null;\n }\n const {\n projectPath,\n selectedBranch,\n sourceName,\n sourcePath,\n sourceDefaultBranch,\n canSyncBranch,\n aheadComparePath,\n behindComparePath,\n createMrPath,\n viewMrPath,\n } = forkEl.dataset;\n return new Vue({\n el: forkEl,\n apolloProvider,\n render(h) {\n return h(ForkInfo, {\n props: {\n canSyncBranch: parseBoolean(canSyncBranch),\n projectPath,\n selectedBranch,\n sourceName,\n sourcePath,\n sourceDefaultBranch,\n aheadComparePath,\n behindComparePath,\n createMrPath,\n viewMrPath,\n },\n });\n },\n });\n};\n\ninitForkInfo();\n\nconst commitPipelineStatusEl = document.querySelector('.js-commit-pipeline-status');\n\nif (commitPipelineStatusEl) {\n // eslint-disable-next-line no-new\n new Vue({\n el: commitPipelineStatusEl,\n components: {\n CommitPipelineStatus,\n },\n render(createElement) {\n return createElement('commit-pipeline-status', {\n props: {\n endpoint: commitPipelineStatusEl.dataset.endpoint,\n },\n });\n },\n });\n}\n\ninitWebIdeLink({ el: document.getElementById('js-blob-web-ide-link') });\n\nGpgBadges.fetch();\n\nconst codeNavEl = document.getElementById('js-code-navigation');\n\nif (codeNavEl && !viewBlobEl) {\n const { codeNavigationPath, blobPath, definitionPathPrefix } = codeNavEl.dataset;\n\n // eslint-disable-next-line promise/catch-or-return\n import('~/code_navigation').then((m) =>\n m.default({\n blobs: [{ path: blobPath, codeNavigationPath }],\n definitionPathPrefix,\n }),\n );\n}\n\nconst tableContentsEl = document.querySelector('.js-table-contents');\n\nif (tableContentsEl) {\n // eslint-disable-next-line no-new\n new Vue({\n el: tableContentsEl,\n render(h) {\n return h(TableOfContents);\n },\n });\n}\n\nconst initTreeHistoryLinkApp = (el) => {\n const { historyLink } = el.dataset;\n // eslint-disable-next-line no-new\n new Vue({\n el,\n router: new VueRouter({ mode: 'history' }),\n render(h) {\n const url = generateHistoryUrl(\n historyLink,\n this.$route.params.path,\n this.$route.meta.refType || this.$route.query.ref_type,\n );\n return h(\n GlButton,\n {\n attrs: {\n href: url.href,\n },\n },\n [__('History')],\n );\n },\n });\n};\n\nconst treeHistoryLinkEl = document.getElementById('js-commit-history-link');\n\nif (treeHistoryLinkEl) {\n initTreeHistoryLinkApp(treeHistoryLinkEl);\n}\n","import '~/pages/projects/blob/show/index';\nimport Vue from 'vue';\nimport VueApollo from 'vue-apollo';\nimport VueRouter from 'vue-router';\nimport createDefaultClient from '~/lib/graphql';\nimport initBlob from '../../shared/init_blob';\nimport CodeOwners from '../../../../vue_shared/components/code_owners/code_owners.vue';\n\ninitBlob();\n\nVue.use(VueApollo);\nVue.use(VueRouter);\n\nconst apolloProvider = new VueApollo({\n defaultClient: createDefaultClient(),\n});\n\nconst router = new VueRouter({ mode: 'history' });\n\nconst codeOwnersEl = document.querySelector('#js-code-owners');\n\nif (codeOwnersEl) {\n const { blobPath, projectPath, branch, canViewBranchRules, branchRulesPath } =\n codeOwnersEl.dataset;\n\n // eslint-disable-next-line no-new\n new Vue({\n el: document.getElementById('js-code-owners'),\n apolloProvider,\n router,\n render(h) {\n return h(CodeOwners, {\n props: {\n filePath: blobPath,\n projectPath,\n branch,\n canViewBranchRules,\n branchRulesPath,\n },\n });\n },\n });\n}\n","import initSourcegraph from './index';\n\ninitSourcegraph();\n","var render = function render(){var _vm=this,_c=_vm._self._c;return (_vm.isLoading)?_c('gl-loading-icon',{attrs:{\"size\":\"sm\",\"label\":_vm.__('Loading pipeline status')}}):(_vm.hasCiStatus)?_c('ci-icon',{attrs:{\"status\":_vm.ciStatus,\"title\":_vm.statusTitle,\"aria-label\":_vm.statusTitle}}):_vm._e()\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import axios from '~/lib/utils/axios_utils';\n\nexport default class CommitPipelineService {\n constructor(endpoint) {\n this.endpoint = endpoint;\n }\n\n fetchData() {\n return axios.get(this.endpoint);\n }\n}\n","<script>\nimport { GlLoadingIcon, GlTooltipDirective } from '@gitlab/ui';\nimport Visibility from 'visibilityjs';\nimport { isEmpty } from 'lodash';\nimport { createAlert } from '~/alert';\nimport Poll from '~/lib/utils/poll';\nimport { __, s__, sprintf } from '~/locale';\nimport CiIcon from '~/vue_shared/components/ci_icon/ci_icon.vue';\nimport CommitPipelineService from '../services/commit_pipeline_service';\n\nexport default {\n directives: {\n GlTooltip: GlTooltipDirective,\n },\n components: {\n CiIcon,\n GlLoadingIcon,\n },\n props: {\n endpoint: {\n type: String,\n required: true,\n },\n },\n data() {\n return {\n ciStatus: {},\n isLoading: true,\n };\n },\n computed: {\n statusTitle() {\n return sprintf(s__('PipelineStatusTooltip|Pipeline: %{ciStatus}'), {\n ciStatus: this.ciStatus.text,\n });\n },\n hasCiStatus() {\n return !isEmpty(this.ciStatus) && !this.isLoading;\n },\n },\n mounted() {\n this.service = new CommitPipelineService(this.endpoint);\n this.initPolling();\n },\n beforeDestroy() {\n this.poll.stop();\n },\n methods: {\n successCallback(res) {\n const { pipelines } = res.data;\n\n if (pipelines.length > 0) {\n // The pipeline entity always keeps the latest pipeline info on the `details.status`\n this.ciStatus = pipelines[0].details.status;\n } else {\n this.ciStatus = {};\n }\n\n this.isLoading = false;\n },\n errorCallback() {\n this.ciStatus = {\n text: __('not found'),\n icon: 'status_notfound',\n group: 'notfound',\n };\n this.isLoading = false;\n createAlert({\n message: __('Something went wrong on our end'),\n });\n },\n initPolling() {\n this.poll = new Poll({\n resource: this.service,\n method: 'fetchData',\n successCallback: (response) => this.successCallback(response),\n errorCallback: this.errorCallback,\n });\n\n if (!Visibility.hidden()) {\n this.isLoading = true;\n this.poll.makeRequest();\n } else {\n this.fetchPipelineCommitData();\n }\n\n Visibility.change(() => {\n if (!Visibility.hidden()) {\n this.poll.restart();\n } else {\n this.poll.stop();\n }\n });\n },\n fetchPipelineCommitData() {\n this.service.fetchData().then(this.successCallback).catch(this.errorCallback);\n },\n },\n};\n</script>\n<template>\n <gl-loading-icon v-if=\"isLoading\" size=\"sm\" :label=\"__('Loading pipeline status')\" />\n <ci-icon\n v-else-if=\"hasCiStatus\"\n :status=\"ciStatus\"\n :title=\"statusTitle\"\n :aria-label=\"statusTitle\"\n />\n</template>\n","import mod from \"-!../../../../../../node_modules/thread-loader/dist/cjs.js??ref--13-0!../../../../../../node_modules/babel-loader/lib/index.js??ref--13-1!../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./commit_pipeline_status.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../../../../node_modules/thread-loader/dist/cjs.js??ref--13-0!../../../../../../node_modules/babel-loader/lib/index.js??ref--13-1!../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./commit_pipeline_status.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./commit_pipeline_status.vue?vue&type=template&id=7fa06148\"\nimport script from \"./commit_pipeline_status.vue?vue&type=script&lang=js\"\nexport * from \"./commit_pipeline_status.vue?vue&type=script&lang=js\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","import $ from 'jquery';\n\nconst defaults = {\n // Buttons that will show the `suggestionSections`\n // has `data-fork-path`, and `data-action`\n openButtons: [],\n // Update the href(from `openButton` -> `data-fork-path`)\n // whenever a `openButton` is clicked\n forkButtons: [],\n // Buttons to hide the `suggestionSections`\n cancelButtons: [],\n // Section to show/hide\n suggestionSections: [],\n // Pieces of text that need updating depending on the action, `edit`, `replace`, `delete`\n actionTextPieces: [],\n};\n\nclass BlobForkSuggestion {\n constructor(options) {\n this.elementMap = { ...defaults, ...options };\n this.onOpenButtonClick = this.onOpenButtonClick.bind(this);\n this.onCancelButtonClick = this.onCancelButtonClick.bind(this);\n }\n\n init() {\n this.bindEvents();\n\n return this;\n }\n\n bindEvents() {\n $(this.elementMap.openButtons).on('click', this.onOpenButtonClick);\n $(this.elementMap.cancelButtons).on('click', this.onCancelButtonClick);\n }\n\n showSuggestionSection(forkPath, action = 'edit') {\n $(this.elementMap.suggestionSections).removeClass('hidden');\n $(this.elementMap.forkButtons).attr('href', forkPath);\n $(this.elementMap.actionTextPieces).text(action);\n }\n\n hideSuggestionSection() {\n $(this.elementMap.suggestionSections).addClass('hidden');\n }\n\n onOpenButtonClick(e) {\n const forkPath = $(e.currentTarget).attr('data-fork-path');\n const action = $(e.currentTarget).attr('data-action');\n this.showSuggestionSection(forkPath, action);\n }\n\n onCancelButtonClick() {\n this.hideSuggestionSection();\n }\n\n destroy() {\n $(this.elementMap.openButtons).off('click', this.onOpenButtonClick);\n $(this.elementMap.cancelButtons).off('click', this.onCancelButtonClick);\n }\n}\n\nexport default BlobForkSuggestion;\n","import { addShortcutsExtension } from '~/behaviors/shortcuts';\nimport ShortcutsBlob from '~/behaviors/shortcuts/shortcuts_blob';\nimport { shortcircuitPermalinkButton } from '~/blob/utils';\nimport ShortcutsNavigation from '~/behaviors/shortcuts/shortcuts_navigation';\nimport BlobForkSuggestion from '~/blob/blob_fork_suggestion';\nimport BlobLinePermalinkUpdater from '~/blob/blob_line_permalink_updater';\nimport LineHighlighter from '~/blob/line_highlighter';\n\nexport default () => {\n new LineHighlighter(); // eslint-disable-line no-new\n\n // eslint-disable-next-line no-new\n new BlobLinePermalinkUpdater(\n document.querySelector('#blob-content-holder'),\n '.file-line-num[data-line-number], .file-line-num[data-line-number] *',\n document.querySelectorAll('.js-data-file-blob-permalink-url, .js-blob-blame-link'),\n );\n\n shortcircuitPermalinkButton();\n\n addShortcutsExtension(ShortcutsNavigation);\n addShortcutsExtension(ShortcutsBlob);\n\n new BlobForkSuggestion({\n openButtons: document.querySelectorAll('.js-edit-blob-link-fork-toggler'),\n forkButtons: document.querySelectorAll('.js-fork-suggestion-button'),\n cancelButtons: document.querySelectorAll('.js-cancel-fork-suggestion-button'),\n suggestionSections: document.querySelectorAll('.js-file-fork-suggestion-section'),\n actionTextPieces: document.querySelectorAll('.js-file-fork-suggestion-section-action'),\n }).init();\n};\n","import { GlLoadingIcon } from '@gitlab/ui';\nimport { __ } from '~/locale';\nimport { renderVueComponentForLegacyJS } from './render_vue_component_for_legacy_js';\n\nconst defaultValue = (prop) => GlLoadingIcon.props[prop]?.default;\n\n/**\n * Returns a loading icon/spinner element.\n *\n * This should *only* be used in existing legacy areas of code where Vue is not\n * in use, as part of the migration strategy defined in\n * https://gitlab.com/groups/gitlab-org/-/epics/7626.\n *\n * @param {object} props - The props to configure the spinner.\n * @param {boolean} props.inline - Display the spinner inline; otherwise, as a block.\n * @param {string} props.color - The color of the spinner ('dark' or 'light')\n * @param {string} props.size - The size of the spinner ('sm', 'md', 'lg', 'xl')\n * @param {string[]} props.classes - Additional classes to apply to the element.\n * @param {string} props.label - The ARIA label to apply to the spinner.\n * @returns {HTMLElement}\n */\nexport const loadingIconForLegacyJS = ({\n inline = defaultValue('inline'),\n color = defaultValue('color'),\n size = defaultValue('size'),\n classes = [],\n label = __('Loading'),\n} = {}) =>\n renderVueComponentForLegacyJS(GlLoadingIcon, {\n class: classes,\n props: {\n inline,\n color,\n size,\n label,\n },\n });\n","import $ from 'jquery';\nimport { createAlert } from '~/alert';\nimport axios from '~/lib/utils/axios_utils';\nimport { queryToObject } from '~/lib/utils/url_utility';\nimport { loadingIconForLegacyJS } from '~/loading_icon_for_legacy_js';\n\nimport { __ } from '~/locale';\n\nexport default class GpgBadges {\n static fetch() {\n const tag = $('.js-signature-container');\n if (tag.length === 0) {\n return Promise.resolve();\n }\n\n const badges = $('.js-loading-signature-badge');\n\n badges.html(loadingIconForLegacyJS());\n badges.children().attr('aria-label', __('Loading'));\n\n const displayError = () =>\n createAlert({\n message: __('An error occurred while loading commit signatures'),\n });\n\n const endpoint = tag.data('signaturesPath');\n if (!endpoint) {\n displayError();\n return Promise.reject(new Error(__('Missing commit signatures endpoint!')));\n }\n\n const params = queryToObject(tag.serialize());\n return axios\n .get(endpoint, { params })\n .then(({ data }) => {\n data.signatures.forEach((signature) => {\n badges.filter(`[data-commit-sha=\"${signature.commit_sha}\"]`).replaceWith(signature.html);\n });\n })\n .catch(displayError);\n }\n}\n","import { normalizeHeaders } from './common_utils';\nimport { HTTP_STATUS_ABORTED, successCodes } from './http_status';\n\n/**\n * Polling utility for handling realtime updates.\n * Requirements: Promise based HTTP client\n *\n * Service for promise based http client and method need to be provided as props\n *\n * @example\n * new Poll({\n * resource: resource,\n * method: 'name',\n * data: {page: 1, scope: 'all'}, // optional\n * successCallback: () => {},\n * errorCallback: () => {},\n * notificationCallback: () => {}, // optional\n * }).makeRequest();\n *\n * Usage in pipelines table with visibility lib:\n *\n * const poll = new Poll({\n * resource: this.service,\n * method: 'getPipelines',\n * data: { page: pageNumber, scope },\n * successCallback: this.successCallback,\n * errorCallback: this.errorCallback,\n * notificationCallback: this.updateLoading,\n * });\n *\n * if (!Visibility.hidden()) {\n * poll.makeRequest();\n * }\n *\n * Visibility.change(() => {\n * if (!Visibility.hidden()) {\n * poll.restart();\n * } else {\n * poll.stop();\n * }\n * });\n *\n * 1. Checks for response and headers before start polling\n * 2. Interval is provided by `Poll-Interval` header.\n * 3. If `Poll-Interval` is -1, we stop polling\n * 4. If HTTP response is 200, we poll.\n * 5. If HTTP response is different from 200, we stop polling.\n *\n * @example\n * // With initial delay (for, for example, reducing unnecessary requests)\n *\n * const poll = new Poll({\n * resource: this.service,\n * method: 'fetchNotes',\n * successCallback: () => {},\n * errorCallback: () => {},\n * });\n *\n * // Performs the first request in 2.5s and then uses the `Poll-Interval` header.\n * poll.makeDelayedRequest(2500);\n *\n */\nexport default class Poll {\n constructor(options = {}) {\n this.options = options;\n this.options.data = options.data || {};\n this.options.notificationCallback =\n options.notificationCallback || function notificationCallback() {};\n\n this.intervalHeader = 'POLL-INTERVAL';\n this.timeoutID = null;\n this.canPoll = true;\n }\n\n checkConditions(response) {\n const headers = normalizeHeaders(response.headers);\n const pollInterval = parseInt(headers[this.intervalHeader], 10);\n if (pollInterval > 0 && successCodes.indexOf(response.status) !== -1 && this.canPoll) {\n if (this.timeoutID) {\n clearTimeout(this.timeoutID);\n }\n\n this.timeoutID = setTimeout(() => {\n this.makeRequest();\n }, pollInterval);\n }\n this.options.successCallback(response);\n }\n\n makeDelayedRequest(delay = 0) {\n // So we don't make our specs artificially slower\n this.timeoutID = setTimeout(\n () => this.makeRequest(),\n process.env.NODE_ENV !== 'test' ? delay : 1,\n );\n }\n\n makeRequest() {\n const { resource, method, data, errorCallback, notificationCallback } = this.options;\n\n // It's called everytime a new request is made. Useful to update the status.\n notificationCallback(true);\n\n return resource[method](data)\n .then((response) => {\n this.checkConditions(response);\n notificationCallback(false);\n })\n .catch((error) => {\n notificationCallback(false);\n if (error.status === HTTP_STATUS_ABORTED) {\n return;\n }\n errorCallback(error);\n });\n }\n\n /**\n * Stops the polling recursive chain\n * and guarantees if the timeout is already running it won't make another request by\n * cancelling the previously established timeout.\n */\n stop() {\n this.canPoll = false;\n clearTimeout(this.timeoutID);\n }\n\n /**\n * Enables polling after it has been stopped\n */\n enable(options) {\n if (options && options.data) {\n this.options.data = options.data;\n }\n\n this.canPoll = true;\n\n if (options && options.response) {\n this.checkConditions(options.response);\n }\n }\n\n /**\n * Restarts polling after it has been stopped and makes a request\n */\n restart(options) {\n this.enable(options);\n this.makeRequest();\n }\n}\n","import initPathLocks from 'ee/path_locks';\n\nexport default () => {\n const dataEl = document.getElementById('js-file-lock');\n\n if (dataEl) {\n const { toggle_path, path } = JSON.parse(dataEl.innerHTML);\n\n initPathLocks(toggle_path, path);\n }\n};\n","import $ from 'jquery';\nimport { createAlert } from '~/alert';\nimport axios from '~/lib/utils/axios_utils';\nimport { confirmAction } from '~/lib/utils/confirm_via_gl_modal/confirm_via_gl_modal';\nimport { sprintf, __ } from '~/locale';\n\nexport default function initPathLocks(url, path) {\n $('a.path-lock').on('click', async (e) => {\n e.preventDefault();\n\n const { dataset } = e.target;\n const message =\n dataset.state === 'lock'\n ? __('Are you sure you want to lock %{path}?')\n : __('Are you sure you want to unlock %{path}?');\n\n const confirmed = await confirmAction(sprintf(message, { path }));\n if (!confirmed) {\n return;\n }\n\n axios\n .post(url, {\n path,\n })\n .then(() => {\n window.location.reload();\n })\n .catch(() =>\n createAlert({\n message: __('An error occurred while initializing path locks'),\n }),\n );\n });\n}\n","import Vue from 'vue';\n\n/**\n * Returns the root element of the given Vue component.\n *\n * This should *only* be used in existing legacy areas of code where Vue is not\n * in use. For example, as part of the migration strategy defined in\n * https://gitlab.com/groups/gitlab-org/-/epics/7626.\n *\n * @param {Object} Component - The Vue component to render.\n * @param {Object} data - The data object to pass to the render function.\n * @param {string|Array} children - The children to render in the default slot\n * of the component.\n * @returns {HTMLElement}\n */\nexport const renderVueComponentForLegacyJS = (Component, data, children) => {\n const vm = new Vue({\n render(h) {\n return h(Component, data, children);\n },\n });\n\n vm.$mount();\n\n // Ensure it's rendered\n vm.$forceUpdate();\n\n const el = vm.$el.cloneNode(true);\n vm.$destroy();\n\n return el;\n};\n"],"sourceRoot":""}