1(this.webpackJsonp=this.webpackJsonp||[]).push([["commons-pages.projects.blob.show-pages.projects.show-pages.projects.snippets.show-pages.projects.tre-c684fcf6"],{"+kWK":function(e,t,i){"use strict";var r=i("4Qts"),o=i("HTBS"),a=i("1s/W"),n=i("IZAz"),s=i("/lV4"),l=i("0DeP"),c=i("IAmF"),d=i("RBc6"),u={name:"UserAvatarImage",components:{GlTooltip:r.a,GlAvatar:o.a},mixins:[c.a],props:{lazy:{type:Boolean,required:!1,default:!1},imgSrc:{type:String,required:!1,default:n.a},cssClasses:{type:String,required:!1,default:""},imgAlt:{type:String,required:!1,default:Object(s.a)("user avatar")},size:{type:[Number,Object],required:!0},tooltipText:{type:String,required:!1,default:""},tooltipPlacement:{type:String,required:!1,default:"top"},pseudo:{type:Boolean,required:!1,default:!1}},computed:{sanitizedSource(){const e=""===this.imgSrc||null===this.imgSrc?n.a:this.imgSrc;return Object(d.a)(e,this.maximumSize)},maximumSize(){return Object(a.a)(this.size)?2*Math.max(...Object.values(this.size)):2*this.size},resultantSrcAttribute(){return this.lazy?l.b:this.sanitizedSource}}},h=i("tBpV"),p=Object(h.a)(u,(function(){var e=this,t=e._self._c;return t("span",{ref:"userAvatar"},[t("gl-avatar",{staticClass:"gl-bg-cover",class:{lazy:e.lazy,[e.cssClasses]:!0},style:e.pseudo?{backgroundImage:`url('${e.sanitizedSource}')`}:null,attrs:{src:e.pseudo?void 0:e.resultantSrcAttribute,"data-src":e.sanitizedSource,size:e.size,alt:e.imgAlt,"data-testid":"user-avatar-image"}}),e.tooltipText||e.glSlots().default?t("gl-tooltip",{attrs:{target:function(){return e.$refs.userAvatar},placement:e.tooltipPlacement,boundary:"window"}},[e._t("default",(function(){return[e._v(e._s(e.tooltipText))]}))],2):e._e()],1)}),[],!1,null,null,null);t.a=p.exports},"0SQv":function(e,t,i){"use strict";i("aFm2"),i("z6RN"),i("R9qC");var r=i("hPph"),o=i.n(r),a=i("2Kqc"),n=i.n(a),s=i("7F3p"),l=i("8Igx"),c=i("ZUW3"),d=Object(c.b)({name:"UserCalloutDismisser",props:{featureName:{type:String,required:!0},skipQuery:{type:Boolean,required:!1,default:!1}},data:()=>({currentUser:null,isDismissedLocal:!1,queryError:null}),apollo:{currentUser:{query:n.a,update:e=>null==e?void 0:e.currentUser,error(e){Object(l.b)(e),s.b(e),this.queryError=e},skip(){return this.skipQuery}}},computed:{featureNameEnumValue(){return this.featureName.toUpperCase()},isLoadingQuery(){return this.$apollo.queries.currentUser.loading},isAnonUser(){return!(this.skipQuery||this.queryError||this.isLoadingQuery||this.currentUser)},isDismissedRemote(){var e,t,i=this;return(null!==(e=null===(t=this.currentUser)||void 0===t||null===(t=t.callouts)||void 0===t?void 0:t.nodes)&&void 0!==e?e:[]).some((function({featureName:e}){return e===i.featureNameEnumValue}))},isDismissed(){return this.isDismissedLocal||this.isDismissedRemote},slotProps(){const{dismiss:e,shouldShowCallout:t}=this;return{dismiss:e,shouldShowCallout:t}},shouldShowCallout(){return!(this.isLoadingQuery||this.isDismissed||this.queryError||this.isAnonUser)}},methods:{async dismiss(){this.isDismissedLocal=!0;const e={mutation:o.a,variables:{input:{featureName:this.featureName}}};this.skipQuery||(e.refetchQueries=[{query:n.a}]);try{var t;const{data:i}=await this.$apollo.mutate(e),r=null==i||null===(t=i.userCalloutCreate)||void 0===t?void 0:t.errors;if((null==r?void 0:r.length)>0){const e="User callout dismissal failed: "+r.join(", ");s.b(new Error(e))}}catch(e){Object(l.b)(e),s.b(e)}}},render(){return Object(c.a)(this)(this.slotProps)}}),u=i("tBpV"),h=Object(u.a)(d,void 0,void 0,!1,null,null,null);t.a=h.exports},"1lkC":function(e,t,i){"use strict";var r=i("zIFf"),o=i("2TqH"),a=i("AxB5"),n=i("LZPs"),s=i("pDO9"),l=i("K6VW"),c=i("ygVz"),d=i("3twG"),u=i("NmEs"),h=i("/lV4"),p=i("qLpH"),m=i("n7CP");var b={name:"BlamePreferences",i18n:{blamePreferences:Object(h.i)("Blame|Blame preferences"),showAgeIndicator:Object(h.i)("Blame|Show age indicator legend"),ignoreSpecificRevs:Object(h.i)("Blame|Ignore specific revisions"),learnToIgnore:Object(h.i)("Blame|Learn to ignore specific revisions")},docsLink:Object(p.a)("user/project/repository/files/git_blame.md",{anchor:"ignore-specific-revisions"}),directives:{GlTooltip:r.a},components:{GlDisclosureDropdown:o.a,GlDisclosureDropdownItem:a.a,GlFormCheckbox:n.a,GlDropdownDivider:s.a,GlToggle:l.a},mixins:[c.a.mixin()],props:{hasRevsFile:{type:Boolean,required:!0},showAgeIndicatorToggle:{type:Boolean,required:!1,default:!0}},emits:["toggle-age-indicator"],data:()=>({isIgnoring:Object(u.G)(Object(d.q)("ignore_revs")),isLoading:!1,showAgeIndicator:!1}),created(){this.showAgeIndicator=this.loadShowAgeIndicator()},mounted(){this.$emit("toggle-age-indicator",this.showAgeIndicator)},methods:{loadShowAgeIndicator:()=>!!m.a.canUseLocalStorage()&&"true"===localStorage.getItem("blame_show_age_indicator"),toggleAgeIndicator(){this.showAgeIndicator=!this.showAgeIndicator,m.a.canUseLocalStorage()&&localStorage.setItem("blame_show_age_indicator",String(this.showAgeIndicator)),this.trackEvent("toggle_inline_blame_age_indicator_on_blob_page",{property:this.showAgeIndicator?"show":"hide"}),this.$emit("toggle-age-indicator",this.showAgeIndicator)},toggleIgnoreRevs(){this.isIgnoring=!this.isIgnoring,this.isLoading=!0,Object(d.T)(Object(d.N)({ignore_revs:this.isIgnoring}))},visitDocs(){Object(d.T)(this.$options.docsLink)}}},g=i("tBpV"),v=Object(g.a)(b,(function(){var e=this,t=e._self._c;return t("gl-disclosure-dropdown",{directives:[{name:"gl-tooltip",rawName:"v-gl-tooltip.hover",modifiers:{hover:!0}}],attrs:{title:e.$options.i18n.blamePreferences,"toggle-text":e.$options.i18n.blamePreferences,loading:e.isLoading,"auto-close":!1,icon:"preferences","text-sr-only":"",placement:"bottom-end"},scopedSlots:e._u([{key:"header",fn:function(){return[t("div",{staticClass:"gl-border-b gl-p-4 gl-font-bold"},[e._v("\n "+e._s(e.$options.i18n.blamePreferences)+"\n ")])]},proxy:!0}])},[e._v(" "),e.showAgeIndicatorToggle?[t("gl-disclosure-dropdown-item",{attrs:{"data-testid":"age-indicator-toggle"},scopedSlots:e._u([{key:"list-item",fn:function(){return[t("gl-toggle",{staticClass:"gl-justify-between [&_.gl-toggle-label]:gl-font-normal",attrs:{value:e.showAgeIndicator,label:e.$options.i18n.showAgeIndicator,"label-position":"left"},on:{change:e.toggleAgeIndicator}})]},proxy:!0}],null,!1,1786081561)}
1),e._v(" "),t("gl-dropdown-divider")]:e._e(),e._v(" "),e.hasRevsFile?[t("gl-disclosure-dropdown-item",{attrs:{"data-testid":"ignore-revs-item"},on:{action:e.toggleIgnoreRevs},scopedSlots:e._u([{key:"list-item",fn:function(){return[t("gl-form-checkbox",{staticClass:"gl-pointer-events-none -gl-mb-3",attrs:{checked:e.isIgnoring,"data-testid":"ignore-revs-checkbox"}},[e._v(e._s(e.$options.i18n.ignoreSpecificRevs))])]},proxy:!0}])}),e._v(" "),t("gl-dropdown-divider"),e._v(" "),t("gl-disclosure-dropdown-item",{staticClass:"gl-p-4",attrs:{"data-testid":"learn-to-ignore-item"},on:{action:e.visitDocs}},[e._v(e._s(e.$options.i18n.learnToIgnore))])]:[t("div",{staticClass:"gl-m-3"},[t("gl-disclosure-dropdown-item",{attrs:{"data-testid":"learn-to-ignore-item"},on:{action:e.visitDocs}},[e._v(e._s(e.$options.i18n.learnToIgnore))])],1)]],2)}),[],!1,null,null,null);t.a=v.exports},"2mEV":function(e,t,i){"use strict";var r=i("yN/U"),o=i("Jx7q"),a=i("HTBS"),n=i("d85j"),s=i("pmDQ"),l=i("/lV4"),c=i("bOix"),d=i("IZAz"),u={name:"CommitPopover",components:{GlPopover:r.a,GlLink:o.a,GlAvatar:a.a,GlIcon:n.a,GlTruncate:s.a},props:{popoverTargetId:{type:String,required:!0},commit:{type:Object,required:!0}},computed:{authorName(){var e;return(null===(e=this.commit.author)||void 0===e?void 0:e.name)||this.commit.authorName||""},avatarUrl(){var e;return(null===(e=this.commit.author)||void 0===e?void 0:e.avatarUrl)||this.commit.authorGravatar||this.commit.avatarUrl||d.a},authoredDate(){var e;return null===(e=this.commit)||void 0===e?void 0:e.authoredDate},commitUrl(){return this.commit.webPath||this.commit.commitUrl},authoredText(){if(!this.authoredDate)return"";const e=Object(c.D)().format(new Date(this.authoredDate));return Object(l.j)(Object(l.a)("Authored %{timeago}"),{timeago:e})}}},h=i("tBpV"),p=Object(h.a)(u,(function(){var e=this,t=e._self._c;return t("gl-popover",{attrs:{container:"viewport",target:e.popoverTargetId,placement:"top",boundary:"viewport","data-testid":"commit-popover"}},[t("div",{staticClass:"gl-flex gl-flex-col gl-gap-3"},[t("div",{staticClass:"gl-text-subtle",attrs:{"data-testid":"commit-authored-time"}},[e._v("\n "+e._s(e.authoredText)+"\n ")]),e._v(" "),t("gl-link",{staticClass:"gl-h-5 gl-text-default hover:gl-text-default",attrs:{href:e.commitUrl,"data-testid":"commit-title-link"}},[t("gl-truncate",{staticClass:"gl-font-bold",attrs:{text:e.commit.title,lines:2,"with-tooltip":""}})],1),e._v(" "),t("div",{staticClass:"gl-flex gl-items-center gl-gap-4"},[t("div",{staticClass:"gl-inline-flex gl-items-center gl-gap-2 gl-text-subtle"},[t("gl-avatar",{attrs:{src:e.avatarUrl,size:16,alt:e.authorName}}),e._v(" "),t("span",{attrs:{"data-testid":"commit-author"}},[e._v(e._s(e.authorName))])],1),e._v(" "),t("div",{staticClass:"gl-inline-flex gl-items-center gl-gap-2"},[t("gl-icon",{staticClass:"gl-text-subtle",attrs:{name:"commit",size:14}}),e._v(" "),t("gl-link",{staticClass:"gl-font-monospace gl-text-subtle hover:gl-text-default",attrs:{href:e.commitUrl,"data-testid":"commit-sha-link"}},[e._v("\n "+e._s(e.commit.shortId)+"\n ")])],1)])],1)])}),[],!1,null,null,null);t.a=p.exports},"67aS":function(e,t,i){"use strict";var r=i("NnjE"),o=i("Mp8J"),a=i("MA/v"),n=i("RQlu"),s=i("NmEs"),l=i("D+x4"),c=i("ViwD"),d=i("QBfH"),u={name:"RichViewer",components:{MarkdownFieldView:n.a},directives:{SafeHtml:o.a},mixins:[c.a],props:{isSnippet:{type:Boolean,default:!1,required:!1}},emits:[d.a],data:()=>({isLoading:!0,initialContent:null,remainingContent:[]}),computed:{rawContent(){return this.initialContent||this.richViewer||this.content},isMarkup(){return this.type===d.g},forbiddenAttrs(){const e=[...l.a.FORBID_ATTR,"data-lines-path"];return this.isSnippet&&e.push("style"),e}},created(){this.optimizeMarkupRendering()},mounted(){this.renderRemainingMarkup(),Object(a.handleBlobRichViewer)(this.$refs.content,this.type)},methods:{optimizeMarkupRendering(){if(!this.isMarkup)return;const e=document.createElement("div");e.innerHTML=Object(l.b)(this.rawContent,{...l.a,FORBID_ATTR:this.forbiddenAttrs});const t=e.querySelector(d.f);if(!t)return;const i=[...t.childNodes].slice(0,d.b);this.remainingContent=[...t.childNodes].slice(d.b),t.innerHTML="",t.append(...i),this.initialContent=e.outerHTML},renderRemainingMarkup(){var e=this;if(!this.isMarkup||!this.remainingContent.length)return void this.onContentLoaded();const t=this.$refs.content.$el.querySelector(d.f);for(let i=0;i<this.remainingContent.length;i+=d.b){const r=i+d.b,o=this.remainingContent.slice(i,r);setTimeout((function(){t.append(...o),r<e.remainingContent.length||e.onContentLoaded()}),i)}},onContentLoaded(){this.$emit(d.a),Object(s.n)(),this.isLoading=!1}}
1,safeHtmlConfig:{...l.a,FORBID_ATTR:[...l.a.FORBID_ATTR,"data-lines-path"]}},h=i("tBpV"),p=Object(h.a)(u,(function(){return(0,this._self._c)("markdown-field-view",{directives:[{name:"safe-html",rawName:"v-safe-html:[$options.safeHtmlConfig]",value:this.rawContent,expression:"rawContent",arg:this.$options.safeHtmlConfig}],ref:"content",attrs:{"is-loading":this.isLoading}})}),[],!1,null,null,null).exports,m=(i("RFHG"),i("z6RN"),i("xuo1"),i("ZzK0"),i("BzOf"),i("UezY"),i("hG7+"),i("3twG")),b=i("/lV4"),g=i("jlnU"),v=i("L9Ro"),f=i("bds0"),w=i("s6YX"),_=i.n(w);const y=[d.d,d.e,d.c];var B={name:"SimpleViewer",components:{Blame:v.a},directives:{SafeHtml:o.a},mixins:[c.a],inject:["blobHash"],i18n:{blameErrorMessage:Object(b.a)("Unable to load blame information. Please try again.")},props:{blobPath:{type:String,required:!0},shouldPreloadBlame:{type:Boolean,required:!1,default:!1},showBlame:{type:Boolean,required:!1,default:!1},isBlameLinkHidden:{type:Boolean,required:!1,default:!1},projectPath:{type:String,required:!1,default:""},lineNumbers:{type:Number,required:!0},currentRef:{type:String,required:!1,default:""},blamePath:{type:String,required:!1,default:""}},data:()=>({highlightedLines:[],blameData:[],fromLine:1,toLine:d.h}),computed:{showBlameLink(){return!this.isBlameLinkHidden&&!this.showBlame},blameInfoForRange(){var e=this;return this.blameData.reduce((function(t,i,r){return Object(f.d)(e.blameData,r)&&t.push({...i,blameOffset:Object(f.a)(i.lineno,r)}),t}),[])}},watch:{shouldPreloadBlame:{handler(e){e&&this.requestBlameInfo(this.fromLine,this.toLine)}},showBlame:{handler(e){Object(f.e)(this.blameData,e),this.requestBlameInfo(this.fromLine,this.toLine)},immediate:!0},blameData:{handler(e){this.showBlame&&Object(f.e)(e,!0)},immediate:!0}},mounted(){const{hash:e}=window.location;e&&this.scrollToLine(e,!0),this.toLine=this.lineNumbers<=d.h?this.lineNumbers:d.h},methods:{scrollToLine(e,t=!1){var i;const r=e&&this.$el.querySelector(e);if(!r)return;const o=r.id.replace(/^LC?/,""),a=null===(i=this.$el.querySelector("#L"+o))||void 0===i?void 0:i.closest(".diff-line-num"),n=this.$el.querySelector("#LC"+o);this.highlightedLines.forEach((function(e){return e.classList.remove(...y)})),this.highlightedLines=[n,a].filter(Boolean),this.highlightedLines.forEach((function(e){return e.classList.add(...y)})),t&&r.scrollIntoView({behavior:"smooth",block:"center"})},async requestBlameInfo(e,t){if(this.showBlame||this.shouldPreloadBlame)try{var i,r;const{data:o}=await this.$apollo.query({query:_.a,variables:{ref:this.currentRef,fullPath:this.projectPath,filePath:this.blobPath,fromLine:e,toLine:t,ignoreRevs:Object(s.G)(Object(m.q)("ignore_revs"))}}),a=null==o||null===(i=o.project)||void 0===i||null===(i=i.repository)||void 0===i||null===(i=i.blobs)||void 0===i?void 0:i.nodes[0],n=null==a||null===(r=a.blame)||void 0===r?void 0:r.groups,l=this.blameData.includes(n[0]);n&&!l&&this.blameData.push(...n),this.toLine<this.lineNumbers&&(this.fromLine+=d.h,this.toLine+=d.h,this.requestBlameInfo(this.fromLine,this.toLine))}catch(e){var o,a;const t=(null===(o=e.graphQLErrors)||void 0===o||null===(o=o[0])||void 0===o?void 0:o.message)||this.$options.i18n.blameErrorMessage;
1Object(g.createAlert)({message:t,parent:null===(a=this.$refs.fileContent)||void 0===a?void 0:a.parentElement,dismissible:!1,captureError:!0,error:e})}}}},O=Object(h.a)(B,(function(){var e=this,t=e._self._c;return t("div",[t("div",{staticClass:"flash-container gl-mb-3"}),e._v(" "),t("div",{ref:"fileContent",staticClass:"file-content code code-syntax-highlight-theme js-syntax-highlight gl-flex"},[e.showBlame&&e.blameInfoForRange.length?t("blame",{attrs:{"blame-info":e.blameInfoForRange,"project-path":e.projectPath}}):e._e(),e._v(" "),t("div",{staticClass:"line-numbers !gl-px-0"},e._l(e.lineNumbers,(function(i){return t("div",{key:i,staticClass:"diff-line-num line-links gl-flex"},[e.showBlameLink?t("a",{staticClass:"file-line-blame -gl-mx-2 gl-select-none !gl-shadow-none",attrs:{href:`${e.blamePath}#L${i}`}}):e._e(),e._v(" "),t("a",{key:i,staticClass:"file-line-num gl-select-none !gl-shadow-none",attrs:{id:"L"+i,href:"#L"+i,"data-line-number":i},on:{click:function(t){return e.scrollToLine("#LC"+i)}}},[e._v("\n "+e._s(i)+"\n ")])])})),0),e._v(" "),t("div",{staticClass:"blob-content gl-flex gl-w-full gl-flex-col gl-overflow-y-auto"},[t("pre",{staticClass:"code highlight !gl-p-0"},[t("code",{directives:[{name:"safe-html",rawName:"v-safe-html",value:e.content,expression:"content"}],attrs:{"data-blob-hash":e.blobHash}})])])],1)])}),[],!1,null,null,null).exports,S=(i("B++/"),i("47t/"),i("dIEn")),L=i("Jx7q"),E=i("7bJy"),T={name:"BlobContentError",components:{GlSprintf:S.a,GlLink:L.a},props:{viewerError:{type:String,required:!0},blob:{type:Object,required:!1,default:function(){return{}}}},emits:[E.d,E.e],computed:{notStoredExternally(){return this.viewerError!==E.c.REASONS.EXTERNAL.id},renderErrorReason(){var e=this;const t=Object.keys(E.c.REASONS).find((function(t){return E.c.REASONS[t].id===e.viewerError})),i=E.c.REASONS[t].text;return this.notStoredExternally?i:i[this.blob.externalStorage||"default"]},renderErrorOptions(){return[{...E.c.OPTIONS.LOAD,condition:this.shouldShowLoadBtn},{...E.c.OPTIONS.SHOW_SOURCE,condition:this.shouldShowSourceBtn},{...E.c.OPTIONS.DOWNLOAD,href:this.blob.rawPath}]},shouldShowLoadBtn(){return this.viewerError===E.c.REASONS.COLLAPSED.id},shouldShowSourceBtn(){return this.blob.richViewer&&this.blob.renderedAsText&&this.notStoredExternally}},errorMessage:Object(b.a)("Content could not be displayed: %{reason}. Options to address this: %{options}.")},C=Object(h.a)(T,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"file-content code"},[t("div",{staticClass:"!gl-py-6 !gl-text-center"},[t("gl-sprintf",{attrs:{message:e.$options.errorMessage},scopedSlots:e._u([{key:"reason",fn:function(){return[e._v(e._s(e.renderErrorReason))]},proxy:!0},{key:"options",fn:function(){return[e._l(e.renderErrorOptions,(function(i){return[i.condition?t("span",{key:i.text},[t("gl-link",{attrs:{href:i.href,target:i.target},on:{click:function(t){i.event&&e.$emit(i.event)}}},[e._v(e._s(i.text))]),e._v("\n "+e._s(i.conjunction)+"\n ")],1):e._e()]}))]},proxy:!0}])})],1)])}),[],!1,null,null,null).exports,I={name:"BlobContent",components:{GlLoadingIcon:r.a,BlobContentError:C},props:{blob:{type:Object,required:!1,default:function(){return{}}},projectPath:{type:String,required:!1,default:""},currentRef:{type:String,required:!1,default:""},content:{type:String,default:"",required:!1},shouldPreloadBlame:{type:Boolean,required:!1,default:!1},showBlame:{type:Boolean,required:!1,default:!1},isRawContent:{type:Boolean,default:!1,required:!1},richViewer:{type:String,default:"",required:!1},loading:{type:Boolean,default:!0,required:!1},activeViewer:{type:Object,required:!0},isBlameLinkHidden:{type:Boolean,required:!1,default:!1},hideLineNumbers:{type:Boolean,required:!1,default:!1},isSnippet:{type:Boolean,required:!1,default:!1}},emits:[E.d,E.e],data:()=>({richContentLoaded:!1}),computed:{viewer(){switch(this.activeViewer.type){case"rich":return p;default:return O}},viewerError(){return this.activeViewer.renderError},lineNumbers(){var e,t;const i=(null===(e=this.blob)||void 0===e?void 0:e.rawTextBlob)||this.content;return(null==i||null===(t=i.split("\n"))||void 0===t?void 0:t.length)||0},isContentLoaded(){return this.activeViewer.type===E.k?!this.loading&&this.richContentLoaded:!this.loading}},BLOB_RENDER_EVENT_LOAD:E.d,BLOB_RENDER_EVENT_SHOW_SOURCE:E.e},x=Object(h.a)(I,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"blob-viewer",attrs:{"data-type":e.activeViewer.type,"data-loaded":e.isContentLoaded}},[e.loading?t("gl-loading-icon",{staticClass:"!gl-mx-auto !gl-my-6",attrs:{size:"lg",color:"dark"}}):[e.viewerError?t("blob-content-error",{attrs:{"viewer-error":e.viewerError,blob:e.blob},on:e._d({},[e.$options.BLOB_RENDER_EVENT_LOAD,function(t){return e.$emit(e.$options.BLOB_RENDER_EVENT_LOAD)},e.$options.BLOB_RENDER_EVENT_SHOW_SOURCE,function(t){return e.$emit(e.$options.BLOB_RENDER_EVENT_SHOW_SOURCE)}])}):t(e.viewer,{ref:"contentViewer",tag:"component",attrs:{content:e.content,"current-ref":e.currentRef,"project-path":e.projectPath,"blob-path":e.blob.path||"","rich-viewer":e.richViewer,"is-snippet"
1:e.isSnippet,"is-raw-content":e.isRawContent,"should-preload-blame":e.shouldPreloadBlame,"show-blame":e.showBlame,"file-name":e.blob.name,"blame-path":e.blob.blamePath,type:e.activeViewer.fileType,"line-numbers":e.lineNumbers,"is-blame-link-hidden":e.isBlameLinkHidden,"hide-line-numbers":e.hideLineNumbers,"data-testid":"blob-viewer-file-content"},on:{"rich-content-loaded":function(t){e.richContentLoaded=!0}}})]],2)}),[],!1,null,null,null);t.a=x.exports},"6L/t":function(e,t,i){"use strict";i("ZzK0"),i("z6RN"),i("BzOf");var r=i("4Fqu"),o=i("CbCZ"),a=i("2TqH"),n=i("zIFf"),s=i("/lV4"),l=i("3twG"),c=i("C5t3"),d=i("7bJy"),u={name:"BlobHeaderDefaultActions",i18n:{BTN_DOWNLOAD_AS_MARKDOWN_TITLE:d.g,BTN_DOWNLOAD_AS_PDF_TITLE:d.h},components:{GlButtonGroup:r.a,GlButton:o.a,GlDisclosureDropdown:a.a},directives:{GlTooltip:n.a},inject:{blobHash:{default:""},canDownloadCode:{default:!0},fileType:{default:""}},props:{rawPath:{type:String,required:!0},activeViewer:{type:String,default:d.n,required:!1},hasRenderError:{type:Boolean,required:!1,default:!1},isBinary:{type:Boolean,required:!1,default:!1},environmentName:{type:String,required:!1,default:null},environmentPath:{type:String,required:!1,default:null},isEmpty:{type:Boolean,required:!1,default:!1},overrideCopy:{type:Boolean,required:!1,default:!1}}
1,emits:["copy"],computed:{downloadUrl(){return Object(l.N)({inline:!1},{url:Object(l.H)(this.rawPath,Object(l.l)())})},copyDisabled(){return this.activeViewer===d.k},getBlobHashTarget(){return this.overrideCopy?null:`[data-blob-hash="${this.blobHash}"]`},showCopyButton(){return!this.hasRenderError&&!this.isBinary},environmentTitle(){return Object(s.j)(Object(s.i)("BlobViewer|View on %{environmentName}"),{environmentName:this.environmentName})},isPdfFile(){var e;return null===(e=this.fileType)||void 0===e?void 0:e.includes("pdf")},isMarkdownFile(){var e;return Object(c.c)(null===(e=this.rawPath)||void 0===e?void 0:e.split("?")[0])},showDownloadDropdown(){return!this.isEmpty&&this.canDownloadCode&&this.isMarkdownFile},downloadDropdownItems(){return[{text:this.$options.i18n.BTN_DOWNLOAD_AS_MARKDOWN_TITLE,href:this.downloadUrl,extraAttrs:{rel:"noopener noreferrer"}},{text:this.$options.i18n.BTN_DOWNLOAD_AS_PDF_TITLE,action:function(){document.querySelectorAll("img").forEach((function(e){return e.setAttribute("loading","eager")})),document.querySelectorAll("details").forEach((function(e){return e.setAttribute("open","")})),window.print()}}]},openInNewWindowUrl(){return Object(l.N)({inline:!0},{url:Object(l.H)(this.rawPath,Object(l.l)())})}},methods:{onCopy(){this.overrideCopy&&this.$emit("copy")}},BTN_COPY_CONTENTS_TITLE:d.f,BTN_DOWNLOAD_TITLE:d.i,BTN_RAW_TITLE:d.j},h=i("tBpV"),p=Object(h.a)(u,(function(){var e=this,t=e._self._c;return t("gl-button-group",{staticClass:"gl-hidden @sm/panel:gl-inline-flex",attrs:{"data-testid":"default-actions-container"}},[e._t("prepend"),e._v(" "),!e.isEmpty&&e.showCopyButton?t("gl-button",{directives:[{name:"gl-tooltip",rawName:"v-gl-tooltip.hover",modifiers:{hover:!0}}],staticClass:"js-copy-blob-source-btn",attrs:{"aria-label":e.$options.BTN_COPY_CONTENTS_TITLE,title:e.$options.BTN_COPY_CONTENTS_TITLE,disabled:e.copyDisabled,"data-clipboard-target":e.getBlobHashTarget,"data-testid":"copy-contents-button",icon:"copy-to-cl
1ipboard",category:"primary",variant:"default"},on:{click:e.onCopy}}):e._e(),e._v(" "),e.isEmpty||e.isBinary?e._e():t("gl-button",{directives:[{name:"gl-tooltip",rawName:"v-gl-tooltip.hover",modifiers:{hover:!0}}],attrs:{"aria-label":e.$options.BTN_RAW_TITLE,title:e.$options.BTN_RAW_TITLE,href:e.rawPath,target:"_blank",icon:"doc-code",category:"primary",variant:"default"}}),e._v(" "),e.showDownloadDropdown?t("gl-disclosure-dropdown",{directives:[{name:"gl-tooltip",rawName:"v-gl-tooltip.hover",modifiers:{hover:!0}}],attrs:{title:e.$options.BTN_DOWNLOAD_TITLE,"aria-label":e.$options.BTN_DOWNLOAD_TITLE,items:e.downloadDropdownItems,icon:"download",category:"primary",variant:"default","data-testid":"download-dropdown"}}):!e.isEmpty&&e.canDownloadCode?t("gl-button",{directives:[{name:"gl-tooltip",rawName:"v-gl-tooltip.hover",modifiers:{hover:!0}}],attrs:{"aria-label":e.$options.BTN_DOWNLOAD_TITLE,title:e.$options.BTN_DOWNLOAD_TITLE,href:e.downloadUrl,"data-testid":"download-button",target:"_blank",icon:"download",category:"primary",variant:"default"}}
1):e._e(),e._v(" "),!e.isEmpty&&e.isPdfFile?t("gl-button",{directives:[{name:"gl-tooltip",rawName:"v-gl-tooltip.hover",modifiers:{hover:!0}}],attrs:{"aria-label":e.s__("BlobViewer|Open in a new window"),title:e.s__("BlobViewer|Open in a new window"),href:e.openInNewWindowUrl,"data-testid":"open-new-window-button",target:"_blank",rel:"noopener noreferrer",icon:"external-link",category:"primary",variant:"default"}}):e._e(),e._v(" "),e.environmentName&&e.environmentPath?t("gl-button",{directives:[{name:"gl-tooltip",rawName:"v-gl-tooltip.hover",modifiers:{hover:!0}}],attrs:{"aria-label":e.environmentTitle,title:e.environmentTitle,href:e.environmentPath,"data-testid":"environment",target:"_blank",icon:"external-link",category:"primary",variant:"default"}}):e._e()],2)}),[],!1,null,null,null).exports,m=i("CGBp"),b=i("IAmF"),g=i("1lkC"),v=i("TdMR"),f={name:"BlameHeader",components:{BlamePreferences:g.a,BlameLegend:v.a},inject:["hasRevsFile"],data:()=>({showAgeIndicator:!1}),methods:{onToggleAgeIndicator(e){this.showAgeIndicator=e}}},w=Object(h.a)(f,(function(){var e=this._self._c;return e("div",{staticClass:"gl-flex gl-flex-wrap gl-items-center gl-gap-3"},[this.showAgeIndicator?e("blame-legend"):this._e(),this._v(" "),e("blame-preferences",{attrs:{"has-revs-file":this.hasRevsFile},on:{"toggle-age-indicator":this.onToggleAgeIndicator}})],1)}),[],!1,null,null,null).exports,_=i("9/Bc"),y=i("Jx7q"),B=i("SNRI"),O={name:"BlobHeaderFilepath",components:{FileIcon:i("9dZE").a,GlBadge:_.a,GlLink:y.a},props:{blob:{type:Object,required:!0},showPath:{type:Boolean,required:!1,default:!0},showAsLink:{type:Boolean,required:!1,default:!1},showBlobSize:{type:Boolean,required:!1,default:!0}},computed:{blobSize(){return Object(B.f)(this.blob.size)},showLfsBadge(){return this.blob.storedExternally&&"lfs"===this.blob.externalStorage},fileName(){return this.showPath?this.blob.path:this.blob.name},linkHref(){var e;return this.showAsLink?{href:null===(e=this.blob)||void 0===e?void 0:e.webPath}:{}}}},S=Object(h.a)(O,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"file-header-content gl-flex gl-items-center gl-leading-1"},[e._t("filepath-prepend"),e._v(" "),e.fileName?[t("file-icon",{attrs:{"file-name":e.fileName,size:16,"aria-hidden":"true","css-classes":"gl-mr-3"}}),e._v(" "),t(e.showAsLink?"gl-link":"strong",e._b({tag:"component",staticClass:"file-title-name js-blob-header-filepath gl-break-all gl-font-bold gl-text-strong",class:{"!gl-text-blue-700 hover:gl-cursor-pointer":e.showAsLink},attrs:{"data-testid":"file-title-content"}},"component",e.linkHref,!1),[e._v(e._s(e.fileName))])]:e._e(),e._v(" "),e.showBlobSize?t("small",{staticClass:"gl-mx-3 gl-pt-2 gl-text-subtle"},[e._v(e._s(e.blobSize))]):e._e(),e._v(" "),e.showLfsBadge?t("gl-badge",[e._v(e._s(e.__("LFS")))]):e._e()],2)}),[],!1,null,null,null).exports,L=i("s0v2"),E=i("ygVz"),T=i("yN/U"),C={name:"InlineBlamePopover",i18n:{title:Object(s.a)("Blame is now in page"),body:Object(s.a)("You can now view blame annotations directly on this page by selecting the Blame view.")},components:{GlPopover:T.a},props:{targetElement:{type:Function,required:!0}},emits:["dismiss"],data:()=>({isTargetVisible:!0,popoverKey:0}),computed:{resolvedTarget(){return this.targetElement()}},mounted(){this.bind(this.resolvedTarget)},beforeDestroy(){this.unbind(this.resolvedTarget)},methods:{onTargetClick(){this.$emit("dismiss")},bind(e){var t=this;e&&(e.addEventListener("click",this.onTargetClick),"function"==typeof window.IntersectionObserver&&(this.observer=new IntersectionObserver((function([e]){t.isTargetVisible=e.isIntersecting})),this.observer.observe(e)),this.resizeObserver=new ResizeObserver((function(){clearTimeout(t.resizeTimer),t.resizeTimer=setTimeout((function(){t.popoverKey+=1}),150)})),this.resizeObserver.observe(document.querySelector(".content-wrapper")||document.body))},unbind(e){var t,i;e&&(e.removeEventListener("click",this.onTargetClick),null===(t=this.observer)||void 0===t||t.disconnect(),this.observer=null,null===(i=this.resizeObserver)||void 0===i||i.disconnect(),this.resizeObserver=null,clearTimeout(this.resizeTimer))}}},I=Object(h.a)(C,(function(){var e=this;return(0,e._self._c)("gl-popover",{key:e.popoverKey,attrs:{show:e.isTargetVisible,"show-close-button":"",placement:"bottom",triggers:"manual",target:e.resolvedTarget,title:e.$options.i18n.title,"css-classes":"gl-z-200"},on:{"close-button-clicked":function(t){return e.$emit("dismiss")}}},[e._v("\n "+e._s(e.$options.i18n.body)+"\n")])}
1),[],!1,null,null,null).exports,x=i("0SQv"),j={name:"BlobHeaderViewerSwitcher",components:{GlButtonGroup:r.a,GlButton:o.a,InlineBlamePopover:I,UserCalloutDismisser:x.a},directives:{GlTooltip:n.a,GlHoverLoad:L.a},mixins:[E.a.mixin()],props:{value:{type:String,default:d.n,required:!1},showViewerToggles:{type:Boolean,required:!1,default:!1},showBlameToggle:{type:Boolean,required:!1,default:!1}},emits:["blame-loading-started","blame","input","preload-blame"],computed:{isSimpleViewer(){return this.value===d.n},isRichViewer(){return this.value===d.k},isBlameViewer(){return this.value===d.b}},methods:{switchToViewer(e){e===d.b&&(this.$emit("blame-loading-started"),this.$emit("blame"),this.trackEvent("open_blame_viewer_on_blob_page")),e!==this.value&&this.$emit("input",e)}},SIMPLE_BLOB_VIEWER:d.n,RICH_BLOB_VIEWER:d.k,SIMPLE_BLOB_VIEWER_TITLE:d.p,SIMPLE_BLOB_VIEWER_LABEL:d.o,RICH_BLOB_VIEWER_TITLE:d.m,RICH_BLOB_VIEWER_LABEL:d.l,BLAME_TITLE:d.a,BLAME_VIEWER:d.b},q={name:"BlobHeader",components:{BlameHeader:w,ViewerSwitcher:Object(h.a)(j,(function(){var e=this,t=e._self._c;return t("gl-button-group",{staticClass:"js-blob-viewer-switcher"},[e.showViewerToggles?t("gl-button",{directives:[{name:"gl-tooltip",rawName:"v-gl-tooltip.hover",modifiers:{hover:!0}}],staticClass:"js-blob-viewer-switch-btn",attrs:{"aria-label":e.$options.SIMPLE_BLOB_VIEWER_TITLE,title:e.$options.SIMPLE_BLOB_VIEWER_TITLE,selected:e.isSimpleViewer,"aria-pressed":String(e.isSimpleViewer),"data-testid":"simple-blob-viewer-button",category:"primary",variant:"default","data-viewer":"simple"},on:{click:function(t){return e.switchToViewer(e.$options.SIMPLE_BLOB_VIEWER)}}},[e._v(e._s(e.$options.SIMPLE_BLOB_VIEWER_LABEL))]):e._e(),e._v(" "),e.showViewerToggles?t("gl-button",{directives:[{name:"gl-tooltip",rawName:"v-gl-tooltip.hover",modifiers:{hover:!0}}],staticClass:"js-blob-viewer-switch-btn",attrs:{"aria-label":e.$options.RICH_BLOB_VIEWER_TITLE,title:e.$options.RICH_BLOB_VIEWER_TITLE,selected:e.isRichViewer,"aria-pressed":String(e.isRichViewer),icon:"","data-testid":"rich-blob-viewer-button",category:"primary",variant:"default","data-viewer":"rich"},on:{click:function(t){return e.switchToViewer(e.$options.RICH_BLOB_VIEWER)}}},[e._v(e._s(e.$options.RICH_BLOB_VIEWER_LABEL))]):e._e(),e._v(" "),e.showBlameToggle?t("gl-button",{directives:[{name:"gl-tooltip",rawName:"v-gl-tooltip.hover",modifiers:{hover:!0}},{name:"gl-hover-load",rawName:"v-gl-hover-load",value:function(){return e.$emit("preload-blame")},expression:"() => $emit('preload-blame')"}],ref:"blameButton",attrs:{"data-testid":"blame-button",title:e.$options.BLAME_TITLE,selected:e.isBlameViewer,"aria-pressed":String(e.isBlameViewer),category:"primary",variant:"default"},on:{focus:function(t){return e.$emit("preload-blame")},click:function(t){return e.switchToViewer(e.$options.BLAME_VIEWER)}}},[e._v(e._s(e.__("Blame")))]):e._e(),e._v(" "),e.showBlameToggle?t("user-callout-dismisser",{attrs:{"feature-name":"inline_blame_popover"},scopedSlots:e._u([{key:"default",fn:function({dismiss:i,shouldShowCallout:r}){return[r?t("inline-blame-popover",{attrs:{"target-element":function(){var t;return null===(t=e.$refs.blameButton)||void 0===t?void 0:t.$el}},on:{dismiss:i}}):e._e()]}}],null,!1,1014795789)}
1):e._e()],1)}),[],!1,null,null,null).exports,DefaultActions:p,BlobFilepath:S,TableOfContents:i("ND+z").a},mixins:[m.a,b.a],props:{blob:{type:Object,required:!0},hideViewerSwitcher:{type:Boolean,required:!1,default:!1},isBinary:{type:Boolean,required:!1,default:!1},activeViewerType:{type:String,required:!1,default:d.n},hasRenderError:{type:Boolean,required:!1,default:!1},showPath:{type:Boolean,required:!1,default:!0},showPathAsLink:{type:Boolean,required:!1,default:!1},overrideCopy:{type:Boolean,required:!1,default:!1},showBlameToggle:{type:Boolean,required:!1,default:!1},showBlobSize:{type:Boolean,required:!1,default:!0},showBlameInfo:{type:Boolean,required:!1,default:!1}},emits:["viewer-changed","copy"],data(){return{viewer:this.hideViewerSwitcher?null:this.activeViewerType}},computed:{isEmpty(){return"0"===this.blob.rawSize}},watch:{showBlameInfo(e){e||this.viewer!==d.b||(this.viewer=this.activeViewerType)},viewer(e,t){e!==d.b&&e!==t&&this.$emit("viewer-changed",e)}},methods:{proxyCopyRequest(){this.$emit("copy")}},RICH_BLOB_VIEWER:d.k},k=Object(h.a)(q,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"js-file-title file-title-flex-parent gl-sticky -gl-top-1 gl-z-4 gl-flex-wrap gl-justify-between gl-gap-3 gl-px-4 gl-py-3 @xl/panel:gl-flex-nowrap"},[t("div",{staticClass:"gl-flex gl-gap-3 @xl/panel:gl-mb-0"},[t("blob-filepath",{attrs:{blob:e.blob,"show-path":e.showPath,"show-as-link":e.showPathAsLink,"show-blob-size":e.showBlobSize},scopedSlots:e._u([e.glSlots().prepend?{key:"filepath-prepend",fn:function(){return[e._t("prepend")]},proxy:!0}:null],null,!0)})],1),e._v(" "),t("div",{staticClass:"file-actions gl-ml-auto gl-flex gl-flex-wrap gl-items-center gl-gap-3"},[e.showBlameInfo?t("blame-header"):e._e(),e._v(" "),e.activeViewerType===e.$options.RICH_BLOB_VIEWER?t("table-of-contents",{staticClass:"gl-pr-2"}):e._e(),e._v(" "),e.hideViewerSwitcher?e._e():t("viewer-switcher",e._g({attrs:{"show-blame-toggle":e.showBlameToggle,"show-viewer-toggles":Boolean(e.blob.simpleViewer&&e.blob.richViewer)},model:{value:e.viewer,callback:function(t){e.viewer=t},expression:"viewer"}},e.glListeners())),e._v(" "),e._t("ee-duo-workflow-action",null,{dataTestId:"ee-duo-workflow-action"}),e._v(" "),e._t("actions"),e._v(" "),t("default-actions",{attrs:{"raw-path":e.blob.externalStorageUrl||e.blob.rawPath,"active-viewer":e.viewer,"has-render-error":e.hasRenderError,"is-binary":e.isBinary,"environment-name":e.blob.environmentFormattedExternalUrl,"environment-path":e.blob.environmentExternalUrlForRouteMap,"is-empty":e.isEmpty,"override-copy":e.overrideCopy},on:{copy:e.proxyCopyRequest},scopedSlots:e._u([e.glSlots()["orbit-action"]?{key:"prepend",fn:function(){return[e._t("orbit-action")]},proxy:!0}:null],null,!0)})],2)])}),[],!1,null,null,null);t.a=k.exports},"9dZE":function(e,t,i){"use strict";var r=i("9P+O"),o=i("NnjE"),a=i("d85j"),n=i("5c3i"),s={name:"FileIcon",components:{GlLoadingIcon:o.a,GlIcon:a.a},props:{fileName:{type:String,required:!0},fileMode:{type:String,required:!1,default:""},folder:{type:Boolean,required:!1,default:!1},submodule:{type:Boolean,required:!1,default:!1},opened:{type:Boolean,required:!1,default:!1},loading:{type:Boolean,required:!1,default:!1},size:{type:Number,required:!1,default:16}
1,cssClasses:{type:String,required:!1,default:""}},computed:{isSymlink(){return this.fileMode===n.k},spriteHref(){const e=this.submodule?"folder-git":Object(r.getIconForFile)(this.fileName)||"file";return`${gon.sprite_file_icons}#${e}`},folderIconName(){return this.opened?"folder-open":"folder"},iconSizeClass(){return this.size?"s"+this.size:""}}},l=i("tBpV"),c=Object(l.a)(s,(function(){var e=this,t=e._self._c;return t("span",[e.loading?t("gl-loading-icon",{attrs:{size:"sm",inline:!0}}):e.isSymlink?t("gl-icon",{attrs:{name:"symlink",size:e.size}}):e.folder?t("gl-icon",{staticClass:"folder-icon",attrs:{name:e.folderIconName,size:e.size}}):t("svg",{key:e.spriteHref,class:[e.iconSizeClass,e.cssClasses]},[t("use",{attrs:{href:e.spriteHref}})])],1)}),[],!1,null,null,null);t.a=c.exports},L9Ro:function(e,t,i){"use strict";i("3UXl"),i("iyoE");var r=i("zIFf"),o=i("Mp8J"),a=i("bds0"),n=i("TPPX"),s=i("ho4C"),l=i("CbCZ"),c=i("Jx7q"),d=i("pmDQ"),u=i("3twG"),h=i("6qJk"),p=i("/lV4"),m=i("IZAz"),b=i("FxFN"),g=i("Fsq/"),v=i("+kWK"),f=i("2mEV"),w={name:"BlameCommitInfo",components:{GlButton:l.a,GlLink:c.a,GlTruncate:d.a,TimeagoTooltip:g.a,UserAvatarImage:v.a,CommitPopover:f.a},directives:{GlTooltip:r.a},props:{commit:{type:Object,required:!0},previousPath:{type:String,required:!1,default:null},projectPath:{type:String,required:!1,default:null}},data:()=>({popoverTargetId:Object(s.a)("blame-commit-popover-")}),computed:{commitTitle(){return this.commit.title||""},avatarLinkAltText(){return Object(p.j)(Object(p.a)("%{username}'s avatar"),{username:this.commit.authorName})},avatarUrl(){return this.commit.authorGravatar||this.commit.avatarUrl||this.$options.defaultAvatarUrl},commitUrl(){return this.commit.webPath||this.commit.commitUrl},hasMessage(){return Boolean(this.commit.message||this.commit.title)},previousBlameUrl(){return this.previousPath&&this.commit.parentSha&&this.projectPath?Object(h.c)(this.projectPath,Object(u.A)(this.commit.parentSha,this.previousPath),{blame:1}):null},author(){return this.commit.author},authorUserId(){var e;return null!==(e=this.author)&&void 0!==e&&e.id?Object(b.e)(this.author.id):null},authorUsername(){var e;return(null===(e=this.author)||void 0===e?void 0:e.username)||""},authorWebPath(){var e;return(null===(e=this.author)||void 0===e?void 0:e.webPath)||""},avatarWrapperProps(){return this.author?{href:this.authorWebPath,"data-user-id":this.authorUserId,"data-username":this.authorUsername,class:"js-user-link","data-testid":"commit-author-link"}:{}}},defaultAvatarUrl:m.a,i18n:{viewBlamePrior:Object(p.a)("View blame prior to this change")}},_=i("tBpV"),y=Object(_.a)(w,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"gl-flex gl-w-full gl-items-center gl-gap-3",staticStyle:{height:"var(--source-line-height)"},attrs:{"data-testid":"blame-commit-info"}},[t("timeago-tooltip",{staticClass:"gl-w-12 gl-shrink-0 gl-truncate gl-text-sm gl-text-subtle",attrs:{time:e.commit.authoredDate||e.commit.committedDate,"tooltip-placement":"top","data-testid":"commit-time"}}),e._v(" "),t(e.author?"a":"span",e._b({tag:"component",staticClass:"gl-pb-[0.15rem]"},"component",e.avatarWrapperProps,!1),[t("user-avatar-image",{attrs:{"img-src":e.avatarUrl,size:16,"img-alt":e.avatarLinkAltText,"data-testid":"commit-author-avatar",lazy:""}})],1),e._v(" "),t("div",{staticClass:"gl-min-w-0 gl-flex-1"},[t("gl-link",{staticClass:"gl-text-sm gl-text-default hover:gl-text-default focus-visible:gl-focus-inset",class:{"gl-italic":!e.hasMessage},attrs:{id:e.popoverTargetId,href:e.commitUrl,"data-testid":"commit-message-link"}},[t("gl-truncate",{staticClass:"gl-pb-2",attrs:{text:e.commitTitle}})],1),e._v(" "),t("commit-popover",{staticClass:"gl-z-3",attrs:{"popover-target-id":e.popoverTargetId,commit:e.commit}})],1),e._v(" "),t("gl-button",{directives:[{name:"gl-tooltip",rawName:"v-gl-tooltip"}],staticClass:"!gl-text-subtle focus:!gl-focus-inset",class:{"gl-invisible":!e.previousBlameUrl},staticStyle:{"min-height":"var(--source-line-height)"},attrs:{href:e.previousBlameUrl,title:e.$options.i18n.viewBlamePrior,"aria-label":e.$options.i18n.viewBlamePrior,category:"tertiary",size:"small",icon:"doc-versions","data-event-tracking":"click_previous_blame_on_blob_page","data-testid":"view-previous-blame-button"}})],1)}),[],!1,null,null,null).exports,B=i("lOtf"),O={name:"BlameInfo",BLAME_AGE_COLORS:n.d,components:{BlameCommitInfo:y,BlameColumnResizer:B.a},directives:{GlTooltip:r.a,SafeHtml:o.a},props:{blameInfo:{type:Array,required:!0},projectPath:{type:String,required:!1,default:null}},data:()=>({containerHeight:0,containerWidth:n.e}),computed:{processedBlameInfo(){var e=this;return this.blameInfo.map((function(t,i){var r,o;const a=null!==(r=null===(o=t.commitData)||void 0===o?void 0:o.ageMapClass)&&void 0!==r?r:"",n=e.$options.BLAME_AGE_COLORS[a]||"transparent",s=e.calculateCommitHeight(t,e.blameInfo[i+1]);return{...t,style:{"--blame-indicator-top":t.blameOffset,"--blame-indicator-color":n,"--blame-indicator-height":s+"px"}}}))}},watch:{blameInfo:{handler(){var e=this;this.$nextTick((function(){e.updateContainerHeight()}))},deep:!0}},mounted(){this.updateContainerHeight()},methods:{calculateCommitHeight(e,t){const i=parseInt(e.blameOffset,10)||0,{lineno:r,span:o}=e;if(o){const e=Object(a.a)(r+o);return null===e?0:Math.max(parseInt(e,10)-i,0)}if(!t)return this.containerHeight-i;const n=parseInt(t.blameOffset,10)||0;return Math.max(n-i,0)},updateContainerHeight(){this.$el&&(this.containerHeight=this.$el.offsetHeight)}}},S=i("LPAU"),L=i.n(S),E=i("pDul"),T=i.n(E),C={insert:"head",singleton:!1},I=(L()(T.a,C),T.a.locals,Object(_.a)(O,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"blame gl-border-r gl-bg-subtle",style:{width:e.containerWidth+"px"}},[t("blame-column-resizer",{model:{value:e.containerWidth,callback:function(t){e.containerWidth=t},expression:"containerWidth"}}),e._v(" "),t("div",{staticClass:"blame-commit !gl-border-none"},[e.blameInfo.length?e._l(e.processedBlameInfo,(function(e,i){return t("span",{key:"indicator-"+i,ref:"indicator-"+i,refInFor:!0,staticClass:"blame-commit-wrapper",style:e.style,attrs:{"aria-hidden":"true"}})}
1)):e._e(),e._v(" "),e.blameInfo.length?e._l(e.blameInfo,(function(i,r){return t("blame-commit-info",{key:r,staticClass:"gl-absolute gl-flex gl-px-3",class:{"gl-border-t":"0px"!==i.blameOffset},style:{top:i.blameOffset},attrs:{commit:i.commit,span:i.span,"previous-path":i.previousPath,"project-path":e.projectPath}})})):e._e()],2)],1)}),[],!1,null,"53a2221b",null));t.a=I.exports},"MA/v":function(e,t,i){"use strict";i.r(t),i.d(t,"initAuxiliaryViewer",(function(){return m})),i.d(t,"handleBlobRichViewer",(function(){return b})),i.d(t,"BlobViewer",(function(){return g}));i("ZzK0"),i("z6RN"),i("BzOf");var r=i("D+x4"),o=i("EJYk"),a=i("jlnU"),n=i("/lV4"),s=i("0ch9"),l=i("lnTC"),c=i("nc9B"),d=i("2ibD"),u=i("NmEs"),h=i("J7NB");const p=function(e){const t=e,{url:i}=t.dataset;return!i||t.dataset.loaded||t.dataset.loading?Promise.resolve(t):(t.dataset.loading="true",d.a.get(i).then((function({data:e}){const i=e.html;return t.innerHTML=Object(r.b)(i),window.requestIdleCallback((function(){delete t.dataset.loading})),t})))},m=function(){const e=document.querySelector('.blob-viewer[data-type="auxiliary"]');e&&p(e)},b=function(e,t){e&&t&&function(e){switch(e){case"notebook":return Promise.all([i.e("2a2971ea"),i.e("ab0bdf92"),i.e("e6cfe3ee"),i.e("a66b50b9"),i.e("notebook_viewer")]).then(i.bind(null,"k9KH"));case"openapi":return Promise.all([i.e("665079cc"),i.e("openapi_viewer")]).then(i.bind(null,"NoLt"));case"csv":return Promise.all([i.e("2a2971ea"),i.e("ab0bdf92"),i.e("7eda1a06"),i.e("e6cfe3ee"),i.e("csv_viewer")]).then(i.bind(null,"l+3u"));case"pdf":return Promise.all([i.e("2a2971ea"),i.e("ab0bdf92"),i.e("a66b50b9"),i.e("vendors-pdf_viewer"),i.e("pdf_viewer")]).then(i.bind(null,"5EiH"));case"sketch":return Promise.all([i.e("ab0bdf92"),i.e("8b44a7ac"),i.e("1da4db1e"),i.e("sketch_viewer")]).then(i.bind(null,"vm94"));case"stl":return Promise.all([i.e("vendors-stl_viewer"),i.e("stl_viewer")]).then(i.bind(null,"p/rF"));default:return Promise.resolve()}}(t).then((function(t){return null==t?void 0:t.default(e)})).catch((function(e){throw Object(a.createAlert)({message:Object(n.a)("Error loading file viewer.")}),e}))};class g{constructor(){var e;Object(l.a)({mark:s.E});const t=document.querySelector('.blob-viewer[data-type="rich"]'),i=null==t||null===(e=t.dataset)||void 0===e?void 0:e.richType;m(),b(t,i),this.initMainViewers()}initMainViewers(){this.fileHolder=document.querySelector(".file-holder"),this.fileHolder&&(this.switcher=document.querySelector(".js-blob-viewer-switcher"),this.switcherBtns=document.querySelectorAll(".js-blob-viewer-switch-btn"),this.copySourceBtn=document.querySelector(".js-copy-blob-source-btn"),this.copySourceBtnTooltip=document.querySelector(".js-copy-blob-source-btn-tooltip"),this.simpleViewer=this.fileHolder.querySelector('.blob-viewer[data-type="simple"]'),this.richViewer=this.fileHolder.querySelector('.blob-viewer[data-type="rich"]'),this.initBindings(),this.switchToInitialViewer())}switchToInitialViewer(){let e=this.fileHolder.querySelector(".blob-viewer:not(.hidden)").dataset.type;this.switcher&&0===window.location.hash.indexOf("#L")&&(e="simple"),this.switchToViewer(e)}initBindings(){var e=this;this.switcherBtns.length&&Array.from(this.switcherBtns).forEach((function(t){t.addEventListener("click",e.switchViewHandler.bind(e))})),this.copySourceBtn&&this.copySourceBtn.addEventListener("click",(function(){return e.copySourceBtn.classList.contains("disabled")?e.copySourceBtn.blur():e.switchToViewer("simple")}))}switchViewHandler(e){const t=e.currentTarget;e.preventDefault(),this.switchToViewer(t.dataset.viewer)}toggleCopyButtonState(){this.copySourceBtn&&(this.simpleViewer.dataset.loaded?(this.copySourceBtnTooltip.setAttribute("title",Object(n.a)("Copy file contents")),this.copySourceBtn.classList.remove("disabled")):this.activeViewer===this.simpleViewer?(this.copySourceBtnTooltip.setAttribute("title",Object(n.a)("Wait for the file to load to copy its contents")),this.copySourceBtn.classList.add("disabled")):(this.copySourceBtnTooltip.setAttribute("title",Object(n.a)("Switch to the source to copy the file contents")),this.copySourceBtn.classList.add("disabled")),Object(c.c)(this.copySourceBtnTooltip))}switchToViewer(e){var t=this;Object(l.a)({mark:s.F});const i=this.fileHolder.querySelector(`.blob-viewer[data-type='${e}']`);if(this.activeViewer===i)return;const r=document.querySelector(".js-blob-viewer-switch-btn.selected"),c=document.querySelector(`.js-blob-viewer-switch-btn[data-viewer='${e}']`),d=this.fileHolder.querySelector(`.blob-viewer:not([data-type='${e}'])`);r&&r.classList.remove("selected"),c&&(c.classList.add("selected"),c.blur()),d&&d.classList.add("hidden"),i.classList.remove("hidden"),this.activeViewer=i,this.toggleCopyButtonState(),p(i).then((function(e){Object(o.a)(e),window.requestIdleCallback((function(){t.fileHolder.dis
1patchEvent(new CustomEvent("highlight:line")),Object(u.n)(),e.dataset.loaded="true",t.toggleCopyButtonState(),h.a.$emit("show-blob-interaction-zones",e.dataset.path)})),Object(l.a)({mark:s.D,measures:[{name:s.C,start:s.E},{name:s.G,start:s.F}]})})).catch((function(){return Object(a.createAlert)({message:Object(n.a)("Error loading viewer")})}))}}},"ND+z":function(e,t,i){"use strict";i("3UXl"),i("iyoE"),i("UezY"),i("z6RN"),i("hG7+");var r=i("2TqH");const o=["!gl-pl-5","!gl-pl-6","!gl-pl-7","!gl-pl-8","!gl-pl-9","!gl-pl-10"];function a(e){return parseInt(e.tagName.match(/\d+/)[0],10)}var n={name:"TableContents",components:{GlDisclosureDropdown:r.a},data:()=>({isHidden:!1,items:[]}),mounted(){var e=this;const t=this.$el.closest(".file-holder");this.blobViewer=null==t?void 0:t.querySelector(".blob-viewer");const i=function(t){return e.blobViewer.getAttribute(t)};this.observer=new MutationObserver((function(){e.blobViewer.classList.contains("hidden")||"rich"!==i("data-type")?e.isHidden=!0:"true"===i("data-loaded")&&(e.isHidden=!1,e.generateHeaders(),e.observer.disconnect())})),this.blobViewer&&this.observer.observe(this.blobViewer,{attributes:!0})},beforeDestroy(){this.observer&&this.observer.disconnect()},methods:{generateHeaders(){const e=[...this.blobViewer.querySelectorAll("h1,h2,h3,h4,h5,h6")];if(0===e.length)return;const t=a(e[0]);this.items=e.filter((function(e){return e.querySelector("a.anchor")})).map((function(e){const i=Math.max(a(e)-t,0);let r;const n=e.querySelector("a.anchor");return r=e.id?n.getAttribute("href"):"#"+n.getAttribute("id"),{text:e.textContent.trim(),href:r,extraAttrs:{class:o[i]}}}))}}},s=i("tBpV"),l=Object(s.a)(n,(function(){var e=this._self._c;return e("div",{staticClass:"gl-contents"},[!this.isHidden&&this.items.length?e("gl-disclosure-dropdown",{staticClass:"!gl-pr-0",attrs:{"toggle-text":this.__("Table of contents"),"text-sr-only":"",icon:"list-bulleted",items:this.items}}):this._e()],1)}),[],!1,null,null,null);t.a=l.exports},RQlu:function(e,t,i){"use strict";var r=i("EJYk"),o={name:"FieldView",props:{isLoading:{type:Boolean,required:!1,default:!1}},watch:{isLoading(){this.handleGFM()}},mounted(){this.handleGFM()},methods:{handleGFM(){this.isLoading||Object(r.a)(this.$el)}}},a=i("tBpV"),n=Object(a.a)(o,(function(){return(0,this._self._c)("div",[this._t("default")],2)}),[],!1,null,null,null);t.a=n.exports},pDO9:function(e,t,i){"use strict";var r=i("zNqO"),o=i("n64d"),a=i("eOJu");const n={tag:{type:String,required:!1,default:"hr"}};var s={name:"GlDropdownDivider",components:{BDropdownDivider:Object(r.c)({name:o.e,functional:!0,props:n,render:(e,{props:t,data:i})=>e("li",Object(r.e)(Object(a.j)(i,["attrs"]),{attrs:{role:"presentation"}}),[e(t.tag,{staticClass:"dropdown-divider",attrs:{...i.attrs||{},role:"separator","aria-orientation":"horizontal"},ref:"divider"})])})},inheritAttrs:!1},l=i("tBpV"),c=Object(l.a)(s,(function(){return(0,this._self._c)("b-dropdown-divider",this._g(this._b({staticClass:"gl-dropdown-divider"},"b-dropdown-divider",this.$attrs,!1),this.$listeners))}),[],!1,null,null,null);t.a=c.exports},pDul:function(e,t,i){(e.exports=i("VNgF")(!1)).push([e.i,"\n.blame-commit-wrapper[data-v-53a2221b]::before {\n content: '';\n position: absolute;\n left: 0;\n top: var(--blame-indicator-top);\n height: var(--blame-indicator-height);\n width: 3px;\n background-color: var(--blame-indicator-color);\n pointer-events: none;\n}\n",""])}}]); 2//# sourceMappingURL=commons-pages.projects.blob.show-pages.projects.show-pages.projects.snippets.show-pages.projects.tre-c684fcf6.829c99b9.chunk.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.