"use strict";(()=>{var te=Object.defineProperty;var o=(T,E)=>te(T,"name",{value:E,configurable:!0});(globalThis.webpackChunk=globalThis.webpackChunk||[]).push([["discussions"],{67105:(T,E,a)=>{var l=a(6741),d=a(64463),v=a(65935);(0,d.N7)(".js-discussions-goto-answer-button",{add:e=>{const t=e.getAttribute("href"),n=document.querySelector(t);n&&(0,l.RB)(e,"click",s=>{if(t){s.preventDefault();let m="center";n.getBoundingClientRect().height>=window.innerHeight&&(m="start"),n.scrollIntoView({behavior:"smooth",block:m})}},{capture:!0})}}),(0,d.N7)(".js-discussions-title-container",{add:e=>{e.querySelector(".js-discussions-goto-answer-button")?h():f()}});function h(){const e=document.querySelector(".js-discussion");e&&e.classList.add("answered")}o(h,"removeMarkAsAnswerButtons");function f(){const e=document.querySelector(".js-discussion");e&&e.classList.remove("answered")}o(f,"addMarkAsAnswerButtons"),(0,v.AC)(".js-discussion-comment-mark-answer",async function(e,t){await c(e,t)}),(0,v.AC)(".js-discussion-comment-unmark-answer",async function(e,t){await c(e,t)});async function c(e,t){const n=await t.html();let s=e;const m=e.closest("[data-replace-remote-form-target]");if(m){const y=m.getAttribute("data-replace-remote-form-target");s=y?document.getElementById(y):m}s.replaceWith(n.html)}o(c,"replaceAnswerForm");var i=a(59753),r=a(45075);(0,r.w4)("keyup",".js-discussion-category-name-field",function(){const e=document.querySelector(".js-discussion-category-form");if(!e)return;const t=e.querySelector(".js-discussion-category-name-field"),n=e.querySelector(".js-submit-discussion-category");t.value.length>0&&(n.disabled=!1)}),(0,i.on)("click",".js-discussion-category-toggle-emoji-picker",function(e){const n=u(e).querySelector(".js-discussion-category-emoji-picker");n.hidden=!n.hidden}),(0,i.on)("click",".js-discussion-category-emoji-button",function(e){if(!(e.currentTarget instanceof HTMLButtonElement))return;const t=u(e),n=t.querySelector(".js-discussion-category-emoji-field");n.value=e.currentTarget.value;const s=t.querySelector(".js-discussion-category-custom-emoji");s.innerHTML=e.currentTarget.innerHTML;for(const y of t.querySelectorAll(".selected-emoji"))y.classList.remove("selected-emoji");e.currentTarget.classList.add("selected-emoji");const m=t.querySelector(".js-discussion-category-emoji-picker");m.hidden=!0});function u(e){return e.currentTarget.closest(".js-discussion-category-form")}o(u,"getDiscussionCategoryContainer");function b(e){var t;const n=document.querySelector("#category-select-header"),s=document.querySelector(".js-discussion-category-select-label"),m=(t=e.querySelector(".js-discussion-category-emoji"))==null?void 0:t.cloneNode(!0),y=document.createTextNode(e.getAttribute("data-category-name")),C=e.getAttribute("data-supports-polls"),B=document.createElement("span");n instanceof HTMLElement&&(B.setAttribute("id","category-select-header"),B.setAttribute("class","css-truncate css-truncate-target"),B.setAttribute("data-supports-polls",C),m instanceof HTMLElement&&(m.classList.add("mr-2"),B.appendChild(m)),B.appendChild(y),n.replaceWith(B),s instanceof HTMLElement&&(s.hidden=!1))}o(b,"updateHeader");function p(e){const t=document.querySelector("#discussion_poll_form");!t||(t.hidden=!e)}o(p,"displayPollForm"),(0,i.on)("click",".js-poll-option-template-button",function(e){var t;const s=e.currentTarget.parentElement,m=s.querySelector(".js-poll-option-destroy-field"),y=s.closest(".js-discussion-poll-form-component");m?(m.value="true",(t=m.nextElementSibling)==null||t.classList.remove("js-poll-option"),s.hidden=!0):s.remove();const C=document.querySelector(".js-add-poll-option");(C==null?void 0:C.hidden)&&(C.hidden=!1,C.setAttribute("aria-hidden","false")),y&&(0,i.f)(y,"pollOptionRemoved")}),(0,i.on)("click",".js-add-poll-option",function(e){const t=e.currentTarget,n=document.querySelector("#poll-option-container"),s=+n.getAttribute("data-poll-options-limit"),m=document.querySelector(".js-poll-option-template"),y=n.getAttribute("data-new-discussion")==="true";if(n&&m){const B=m.cloneNode(!0);B.hidden=!1;const Y=B.querySelector(".js-poll-option-template-input");if(y)Y.name="discussion[poll_attributes][options_attributes][][option]";else{const At=n.getAttribute("data-poll-option-next-key");Y.name=`discussion[poll_attributes][options_attributes][${At}][option]`,n.setAttribute("data-poll-option-next-key",`${parseInt(At)+1}`)}n.appendChild(B)}const C=n.querySelectorAll(".js-poll-option").length;t&&C>=s&&(t.hidden=!0,t.setAttribute("aria-hidden","true"))}),(0,i.on)("change","#js-verify-searched",function(e){const t=e.currentTarget,n=document.querySelector("#submit"),s=document.querySelector("#new_discussion");s instanceof HTMLFormElement&&s.checkValidity()&&n&&(n.disabled=!t.checked)}),(0,i.on)("change","#js-discussion-title",function(e){const t=e.currentTarget,n=document.querySelector("#js-similar-search-link");if(n instanceof HTMLAnchorElement&&t instanceof HTMLInputElement){const s=n.getAttribute("data-path");n.href=`${s}${encodeURIComponent(t.value)}`}}),(0,i.on)("details-menu-selected",".js-discussion-category-select",function(e){const t=e.detail.relatedTarget,n=document.querySelector("#discussion_category_id"),s=document.querySelector("#submit"),m=document.querySelector("#new_discussion"),y=document.querySelector("#js-verify-searched");let C=!0;y instanceof HTMLInputElement&&(C=y.checked,s instanceof HTMLButtonElement&&!C&&(s.disabled=!0)),b(t);const B=t.getAttribute("data-supports-polls");if(n instanceof HTMLInputElement){if(n.setAttribute("value",t.id),B==="true"){const Y=document.querySelector(".js-previewable-comment-form");(Y==null?void 0:Y.classList.contains("preview-selected"))||p(!0)}else p(!1);m instanceof HTMLFormElement&&m.checkValidity()&&C&&(s==null||s.removeAttribute("disabled"))}},{capture:!0});var w=a(29719);(0,d.N7)(".js-discussions-comment-actions-button",{subscribe:e=>(0,l.RB)(e,"mouseover",M,{capture:!1,once:!0})}),(0,i.on)("click",".js-discussions-comment-actions-button",function({currentTarget:e}){R(e)}),(0,d.N7)(".js-discussions-comment-actions-rendered-button",{add:e=>W(e)});function M(e){const t=e.currentTarget;g(t)}o(M,"handleMouseover");function W(e){const t=e.closest(".timeline-comment-actions");if(!!t&&t.hasAttribute("data-open-after-click")){t.removeAttribute("data-open-after-click");const n=e.closest("details");if(!n)return;n.setAttribute("open","")}}o(W,"conditionallyOpenMenu");async function g(e){if(!e)return;const t=e.closest(".timeline-comment-actions");if(!t)return;const n=t.querySelector(".js-discussions-comment-actions-container");if(!n)return;const s=n.getAttribute("data-comment-actions-url");if(!s)return;const m=await(0,w.a)(document,s);!m||n.replaceWith(m)}o(g,"insertCommentActions");function R(e){if(!e)return;const t=e.closest(".timeline-comment-actions");!t||t.setAttribute("data-open-after-click","")}o(R,"setClickAfterInsert");var x=a(69567),$=a(55741);(0,d.N7)(".js-discussions-comment-edit-button",{subscribe:e=>(0,l.RB)(e,"click",Z,{capture:!1,once:!0})}),(0,d.N7)(".js-task-list-container .contains-task-list",{add:async e=>I(e)}),(0,d.N7)(".js-discussion-poll-form-component",{subscribe:e=>(0,l.RB)(e,"pollOptionRemoved",X)}),(0,r.w4)("keyup",".js-discussion-poll-form-component input",X);async function I(e){const t=e.closest(".js-comment"),n=j(t);if(n){if(n.querySelector(".js-preview-body"))return;const m=n.getAttribute("data-permissions-url"),y=L(n).targetType;m&&y&&await H(m,y)&&(J(t),D(t))}}o(I,"conditionallyRenderEditForm");async function H(e,t){return(await(await fetch(e,{headers:{Accept:"application/json"}})).json())[t].update}o(H,"fetchAndReturnUpdatePermission");function Z(e){const n=e.currentTarget.closest(".js-comment");J(n),D(n),G(n)}o(Z,"handleClick");function X(e){const n=e.currentTarget.closest(".js-comment");if(n){const s=n.querySelector(".js-discussion-poll-form-component");s&&nt(n,(0,$.T)(s))}}o(X,"handlePollModificationEvent");function D(e){const t=e.querySelector(".js-discussions-markdown-toolbar-placeholder:last-child");if(t){const n={textareaId:t.getAttribute("data-textarea-id")};A("template.js-discussions-markdown-toolbar-template",t,n)}}o(D,"insertMarkdownToolbar");function G(e){const t=e.querySelector(".js-discussions-poll-edit-placeholder");if(t){const n=t.getAttribute("data-poll-edit-url");if(n==="")return;A("template.js-discussions-poll-edit-template",t,{pollEditUrl:n})}}o(G,"insertPollEditForm");function J(e){const t=j(e);if(t){const n=L(t);A("template.js-discussions-edit-form-template",t,n),q(e,n)}}o(J,"insertEditForm");function q(e,t){const n=F(e);n&&A("template.js-discussions-edit-actions-template",n,t)}o(q,"insertEditFormActions");function tt(e){const t=F(e);t&&A("template.js-discussions-poll-confirmation-template",t,{})}o(tt,"insertPollEditConfirmationPrompt");function nt(e,t){const n=j(e);if(n.getAttribute("data-poll-confirmation")==="true"!==t)if(t)tt(e),n.setAttribute("data-poll-confirmation","true");else{const m=L(n);q(e,m),n.setAttribute("data-poll-confirmation","false")}}o(nt,"toggleFormActionVariant");function j(e){return e.querySelector(".js-edit-comment-form-container")}o(j,"editFormTargetContainer");function F(e){return e.querySelector(".js-discussions-edit-form-actions")}o(F,"editFormActionsContainer");function L(e){return{bodyVersion:e.getAttribute("data-body-version"),outerDivClasses:e.getAttribute("data-outer-div-classes"),repositoryId:e.getAttribute("data-repository-id"),targetBody:e.getAttribute("data-target-body"),targetType:e.getAttribute("data-target-type"),textareaId:e.getAttribute("data-textarea-id"),slashCommandUrl:e.getAttribute("data-slash-command-url"),pollEditUrl:e.getAttribute("data-poll-edit-url")}}o(L,"editFormTemplateReplacements");function A(e,t,n){const s=document.querySelector(e);s&&(t.innerHTML="",t.appendChild(new x.R(s,n)))}o(A,"insertTemplate"),(0,d.N7)(".js-optimistic-reaction-render-button",{subscribe:e=>(0,l.RB)(e,"click",S,{capture:!1})});function S(e){const t=e.currentTarget;if(t){const n=new _(t);setTimeout(()=>{n.render()},1)}}o(S,"handleReactionEvent");class _{constructor(t){this.clickedReactionButton=t}render(){if(!this.isReactionAlreadyRendered)return this.addNewReactionGroup();this.isAddingReaction?this.addReactionToGroup():this.removeReactionFromGroup()}addReactionToGroup(){this.existingReactionGroupCountContainer&&this.existingReactionGroup&&(this.existingReactionGroup.removeAttribute("hidden"),this.existingReactionGroup.classList.add("user-has-reacted"),this.existingReactionGroupCountContainer.textContent=`${this.existingReactionGroupCount+1}`,this.addReactionToPopoverReactionButtons())}removeReactionFromGroup(){var t;this.existingReactionGroupCount===1&&this.existingReactionGroup.setAttribute("hidden",""),this.existingReactionGroupCountContainer.textContent=`${this.existingReactionGroupCount-1}`,(t=this.existingReactionGroup)==null||t.classList.remove("user-has-reacted"),this.removeReactionFromPopoverReactionButtons()}addNewReactionGroup(){const t=this.newEmojiButtonFromTemplate();this.newEmojiButtonTemplateContainer&&t&&this.commentReactionsContainer&&(this.nextButtonGroup?this.reactionGroupsContainer.insertBefore(t,this.nextButtonGroup):this.reactionGroupsContainer.append(t),t.classList.add(this.tooltipPositionClass),this.addReactionToPopoverReactionButtons(),this.commentReactionsContainer.classList.contains("d-md-none")&&this.commentReactionsContainer.classList.add("has-reactions"))}newEmojiButtonFromTemplate(){if(this.newEmojiButtonTemplateContainer){const n=this.newEmojiButtonTemplateContainer.content.querySelector(".js-reaction-group-button");if(n)return n.cloneNode(!0)}}get nextButtonGroup(){if(this.newEmojiButtonFromTemplatePosition!==void 0&&this.newEmojiButtonFromTemplatePosition!==null){const t=this.reactionGroupsContainer.children;for(const n of t)if(Number(n.getAttribute("data-button-index-position"))>this.newEmojiButtonFromTemplatePosition)return n}}get commentContainer(){return this.clickedReactionButton.closest(".js-comment")}get buttonsContainer(){return this.commentContainer.querySelector(".js-reaction-buttons-container")}get reactionContent(){return this.clickedReactionButton.getAttribute("data-reaction-content")}get reactionGroup(){return this.buttonsContainer.querySelector(`.js-comment-reactions-options g-emoji[alias='${this.reactionContent}'`)}get existingReactionGroup(){if(this.reactionGroup)return this.reactionGroup.closest(".js-reaction-group-button")}get existingReactionGroupCountContainer(){if(this.existingReactionGroup)return this.existingReactionGroup.querySelector(".js-discussion-reaction-group-count")}get newEmojiButtonTemplateContainer(){return document.getElementById(`emoji-reaction-button-template-${this.reactionContent}`)}get commentReactionsContainer(){return this.buttonsContainer.closest(".js-reaction-buttons-container")}get reactionGroupsContainer(){return this.buttonsContainer.querySelector(".js-comment-reactions-options")}get isReactionAlreadyRendered(){return!!this.reactionGroup}get isAddingReaction(){if(this.existingReactionGroup)return!this.existingReactionGroup.classList.contains("user-has-reacted")}get existingReactionGroupCount(){return this.existingReactionGroupCountContainer?Number(this.existingReactionGroupCountContainer.innerHTML):0}get newEmojiButtonFromTemplatePosition(){const t=this.newEmojiButtonFromTemplate();if(t)return Number(t.getAttribute("data-button-index-position"))}get tooltipPositionClass(){return this.buttonsContainer.querySelectorAll("button").length>1?"tooltipped-s":"tooltipped-se"}addReactionToPopoverReactionButtons(){const t=this.commentContainer.querySelectorAll(".js-add-reaction-popover");for(const n of t){const s=n.querySelector(`button[data-reaction-content="${this.reactionContent}"]`);s.classList.add("border","color-border-default","color-bg-accent"),s.value.match(/unreact/)||(s.value=s.value.replace(/react/,"unreact"))}}removeReactionFromPopoverReactionButtons(){const t=this.commentContainer.querySelectorAll(".js-add-reaction-popover");for(const n of t){const s=n.querySelector(`button[data-reaction-content="${this.reactionContent}"]`);s.classList.remove("border","color-border-default","color-bg-accent"),s.value.match(/unreact/)&&(s.value=s.value.replace(/unreact/,"react"))}}}o(_,"OptimisticReactionRenderer");var N=a(97730);(0,d.N7)(".js-inline-comment-form-container",{add:e=>U(e)}),(0,i.on)("click",".js-discussions-previewable-comment-form",function({currentTarget:e}){P(e,{willFocus:!0})}),(0,d.N7)(".js-discussions-previewable-comment-form-auto-replace",{add:e=>P(e,{willFocus:!1})}),(0,i.on)("quote-selection",".js-discussion-quote-selection",function(e){const t=e.detail,n=t.closest(".js-timeline-discussion-comment");if(!n)return;const s=t.range;P(n,{willFocus:!0}),t.range=s});function U(e){const t=e.closest(".discussion-timeline-item.js-comment-container");t&&t.getAttribute("data-open-edit-form-after-load")==="true"&&(t.setAttribute("data-open-edit-form-after-load","false"),P(e,{willFocus:!0}))}o(U,"conditionallyInsertForm");function P(e,t){const n=e.closest(".js-timeline-discussion-comment"),s=n.querySelector(".js-discussions-previewable-comment-form-container");if(!s)return;const m=s.getAttribute("data-parent-comment-id"),y=s.getAttribute("data-anchor-id"),C=s.getAttribute("data-back-page"),B=document.querySelector("template.js-new-comment-template");m&&B&&!s.querySelector(".js-discussion-comment-form")&&(s.innerHTML="",s.appendChild(new x.R(B,{id:m,random:crypto.randomUUID(),anchorId:y,backPage:C}))),t.willFocus&&(0,N.j)(n)}o(P,"insertForm"),(0,v.AC)(".js-discussions-previewable-comment-form-container .js-discussion-comment-form",async function(e,t){var n;await t.text(),(0,N.w)(e),(n=e.closest(".js-discussions-previewable-comment-form-container").querySelector(".js-comment-form-error"))==null||n.classList.add("d-none")});var V=a(32750),k=a(36162),z=a(15205),et=a(56238),at=a(41311);async function ot(){const e=O(),t=e.value,s=t.slice(0,e.selectionEnd).split(/\s+/).pop();st().hidden=!1,O().setAttribute("aria-expanded","true");const[m,y]=s.split(":");y!=null?await Pt(m,y):Dt(m);const C=Lt();t.trim().length>0?(C.hidden=!1,(0,V.T_)(Q())):(C.hidden=!0,(0,V.QZ)(Q()))}o(ot,"updateSearchSuggestionResults");function Ct(){const e=O();e.value="",e.getAttribute("data-initial-value").trim().length===0?ot():(0,et.Bt)(Q())}o(Ct,"handleSearchClear");function Tt(e){switch(e.detail.hotkey){case"Enter":if(O().value.trim()!==""||lt().querySelector(".js-navigation-item.navigation-focus"))return;(0,et.Bt)(Q());return;case"Escape":st().hidden=!0,O().setAttribute("aria-expanded","false");break}}o(Tt,"handleSearchInputKeydown");function _t(e){if(e&&e.target){const t=e.target,n=O();n!=null&&n.setAttribute("aria-activedescendant",t.id)}}o(_t,"handleSearchFormFocus");function ct(){(0,V.jK)(Q()),st().hidden=!0,O().setAttribute("aria-expanded","false")}o(ct,"hideSearchSuggestions");function Rt(e){const t=O(),n=e.target;if(n.hasAttribute("data-search")){(0,et.Bt)(Q());return}let s=n.getAttribute("data-value");s[s.length-1]!==":"&&(s+=" ");const m=t.value.slice(0,t.selectionEnd).replace(/\S+$/,""),y=t.value.slice(t.selectionEnd);let C="";y.length>0&&y[0]!==" "&&(C=" "),t.value=m+s+C+y,e.preventDefault(),t.focus();const B=m.length+s.length;t.setSelectionRange(B,B),(0,i.f)(t,"input")}o(Rt,"handleSelectedSuggestionResultEvent");function Ft(){const e=O(),t=e.value.length;e.setSelectionRange(t,t),e.focus(),ct()}o(Ft,"restoreSearchInputFocus");function Q(){return document.querySelector(".js-discussion-search-form")}o(Q,"getSearchForm");function O(){return document.querySelector(".js-discussion-search-input")}o(O,"getSearchInput");function st(){return document.querySelector(".js-discussion-search-autocomplete-dropdown")}o(st,"getSearchAutocompleteDropdown");function lt(){return document.querySelector(".js-discussion-search-autocomplete-results")}o(lt,"getSearchAutocompleteResultsContainer");function Lt(){return document.querySelector(".js-discussion-search-clear")}o(Lt,"getSearchClearButton");const xt=(0,z.Z)(Bt);function Bt(){return[{value:"author:",description:"filter by discussion author"},{value:"category:",description:"filter by discussion category"},{value:"is:",description:"filter by answered or unanswered"},{value:"label:",description:"filter by discussion label"}]}o(Bt,"fetchQualifierSuggestions");async function Pt(e,t){const n=Mt(e),s=dt(n,t).then(m=>m.map(y=>({value:`${e}:${y.value}`,description:y.description})));mt(s)}o(Pt,"renderValueSuggestions");async function Mt(e){switch(e){case"author":return It();case"category":return qt();case"label":return kt();case"is":return Ot();default:return[]}}o(Mt,"fetchSuggestionsForQualifier");const ut=(0,z.Z)(async e=>await(await fetch(e,{headers:{Accept:"application/json"}})).json());async function It(){const e=O().getAttribute("data-suggestable-authors-path");return ut(e)}o(It,"fetchAuthorSuggestions");async function qt(){return JSON.parse(O().getAttribute("data-suggestable-categories"))}o(qt,"fetchCategorySuggestions");async function kt(){const e=O().getAttribute("data-suggestable-labels-path");return ut(e)}o(kt,"fetchLabelSuggestions");async function Ot(){return[{value:"answered"},{value:"unanswered"}]}o(Ot,"fetchTypeSuggestions");function Dt(e){const t=xt(),n=dt(t,e,{fuzzy:!1}).then(s=>s.length===0?t:s);mt(n)}o(Dt,"renderQualifierSuggestions");async function dt(e,t,{fuzzy:n}={fuzzy:!0}){const s=await e,m=t.trim();return!m||m.length===0?s:s.filter(y=>n?y.value.includes(m):y.value.startsWith(m))}o(dt,"filterSuggestionsList");async function mt(e){const t=e.then(n=>n.length===0?k.dy``:ft());(0,k.sY)(k.dy`
${Nt()} ${(0,at.C)(t,ft())}
${(0,at.C)(Ut(e),k.dy` loading... `)}
`,lt())}o(mt,"renderSuggestionDropdown");function ft(){return k.dy`
Suggested filters
`}o(ft,"renderSuggestionsTitle");function Nt(){const e=O().value.trim();return e.length===0?k.dy``:k.dy`
`}o(Nt,"renderSearchSuggestion");async function Ut(e){return(await e).map((n,s)=>k.dy`
${n.value}
${n.description}
`)}o(Ut,"renderSuggestionList");var $t=a(29946);(0,i.on)("focusin",".js-discussion-search-input",ot),(0,i.on)("focusout:delay",".js-discussion-search-input",ct),(0,i.on)("navigation:open",".js-discussion-search-form",e=>{Rt(e)}),(0,i.on)("navigation:focus",".js-discussion-search-form",e=>{_t(e)}),(0,i.on)("navigation:keydown",".js-discussion-search-form",e=>{Tt(e)}),(0,d.N7)(".js-discussion-search-input",e=>{e.addEventListener("input",ot)}),(0,i.on)("click",".js-discussion-search-clear",Ct);let it=!1;(0,i.on)("submit",".js-discussion-search-form",()=>(it=!0,!0));function pt(){it&&Ft(),it=!1}o(pt,"restoreFocus"),document.addEventListener("pjax:end",pt),document.addEventListener($t.QE.SUCCESS,pt);var Ht=a(42150);(0,d.N7)(".js-confetti-party",()=>{(0,Ht.Z)()}),(0,i.on)("change",".js-discussion-spotlight-preview-trigger",function(e){const t=e.currentTarget,s=t.closest("form").querySelectorAll(`input[name="${t.name}"]`);for(const m of s){const y=m.closest("label");m.checked?y.setAttribute("aria-selected","true"):y.setAttribute("aria-selected","false")}Vt(t)}),(0,i.on)("click",".js-toggle-manage-discussion-spotlight",function(e){e.target instanceof HTMLElement});function Vt(e){const n=ht(e).querySelector(".js-discussion-spotlight-preview");Gt(n)}o(Vt,"previewTriggerChanged");async function Gt(e){const t=ht(e),n=e.getAttribute("data-url"),s=new URL(n,window.location.origin),m=t.querySelector(".js-discussion-spotlight-form");s.search+=(s.search?"&":"")+(0,et.qC)(m);let y;try{y=await(0,w.a)(document,s.toString())}catch{return}e.replaceWith(y)}o(Gt,"updateSpotlightPreview");function ht(e){return e.closest(".js-manage-discussion-spotlight-container")}o(ht,"getManageSpotlightContainer"),(0,v.AC)(".js-spotlight-notice-dismiss",async function(e,t){await t.text(),e.closest(".js-notice").remove(),document.querySelector(".js-discussions-categories")&&document.querySelector(".js-discussions-categories").classList.remove("v-hidden")}),(0,d.N7)(".js-discussion-spotlights-sortable",{async add(e){const{Sortable:t}=await a.e("app_assets_modules_github_sortable-behavior_ts").then(a.bind(a,36962));t.create(e,{animation:150,handle:".js-discussion-spotlight-handle",onUpdate:async()=>{const n=e.getAttribute("data-update-url"),m=Array.from(e.querySelectorAll(".js-discussion-spotlight")).map(C=>C.getAttribute("data-id")),y=e.parentElement.querySelector(".js-data-url-csrf");!y||await fetch(n,{method:"PUT",mode:"same-origin",body:JSON.stringify({spotlight_ids:m}),headers:{"Content-Type":"application/json",Accept:"application/json","Scoped-CSRF-Token":y.value,"X-Requested-With":"XMLHttpRequest"}})}})}}),(0,i.on)("click",".js-discussion-comment-thread-expand-button",function({currentTarget:e}){const t=gt(e);!t||Wt(t)}),(0,i.on)("click",".js-discussions-fetch-all-paginated-comments",function({currentTarget:e}){const t=gt(e);!t||Kt(t)});function Wt(e){Xt(e)&&e.setAttribute("data-open-edit-form-after-load","true")}o(Wt,"conditionallyOpenEditFormAfterLoad");function Kt(e){const t=e.querySelector(".js-discussion-comment-thread-expand-button");t&&(e.setAttribute("data-open-edit-form-after-load","true"),t.click())}o(Kt,"clickShowMoreButton");function gt(e){return e.closest(".discussion-timeline-item.js-comment-container")}o(gt,"commentContainerFor");function Xt(e){const t=e.querySelector(".js-inline-comment-form-container");return t?t.classList.contains("open"):!1}o(Xt,"isReplyFormOpen"),(0,d.N7)(".js-remove-error-state-on-click > details",{add:e=>Qt(e)});function Qt(e){var t;const n=(t=document.getElementById("discussion_category_id"))==null?void 0:t.getAttribute("value");if(!n)return;const s=e.querySelector(`.discussion-category-${n}`);!s||s.click()}o(Qt,"conditionallyReselectCategory");var ee=a(62805),vt=a(12981);const Zt=o(async(e,t,n,s)=>{const m=new FormData;m.append("question",n);for(const y of s)m.append("options[]",y);return await fetch(e,{body:m,method:"POST",mode:"same-origin",headers:{"Scoped-CSRF-Token":t}})},"sendRequest");class yt{constructor(t){this.pollForm=t,this.pollPreviewUrl=this.pollForm.getAttribute("data-poll-preview-url")||""}hide(){var t;this.pollForm.hidden=!0,(t=this.pollForm)==null||t.setAttribute("aria-hidden","true")}show(){var t;this.pollForm.hidden=!1,(t=this.pollForm)==null||t.setAttribute("aria-hidden","false")}getCsrfInputValue(){const t=this.pollForm.querySelector(".js-poll-preview-url-post-csrf");return t?t.value:""}getOptions(){const t=[],n=this.pollForm.querySelector("#poll-option-container");if(!n)return t;const s=n.querySelectorAll(".js-poll-option");for(const m of s)m.value&&t.push(m.value);return t}getQuestion(){const t=this.pollForm.querySelector(".js-poll-form-input-question");return t?t.value:""}}o(yt,"PollFormElement");class bt{constructor(t){this.pollFormElement=t}hidePollForm(){this.pollFormElement.hide()}showPollForm(){this.pollFormElement.show()}async getPreview(){const t=this.pollFormElement.getQuestion(),n=this.pollFormElement.getOptions();return t&&n.length>0?await(await Zt(this.pollFormElement.pollPreviewUrl,this.pollFormElement.getCsrfInputValue(),t,n)).text():""}}o(bt,"Poll");let K;(0,d.N7)(".js-discussion-poll-form-component",e=>{K=new bt(new yt(e))}),(0,i.on)("preview:rendered",".js-previewable-comment-form",async function(e){if(!K)return;const n=e.currentTarget.querySelector(".comment-body"),s=await K.getPreview();n.append((0,vt.r)(document,s)),K.hidePollForm()}),(0,i.on)("poll-preview:toggle:off",".js-discussion-poll-form-component",async function(){if(!K)return;const e=document.querySelector(".js-discussion-category-select");if(e){const t=e.querySelector("#category-select-header");if(!t)return;t.getAttribute("data-supports-polls")==="true"&&K.showPollForm()}else K.showPollForm()});const zt=o(async(e,t,n)=>{const s=new FormData;return s.append("option_id",n),await fetch(e,{body:s,method:"POST",mode:"same-origin",headers:{"Scoped-CSRF-Token":t}})},"polls_voting_sendRequest");class Et{constructor(t){this.optionsElement=t}checkedValue(){var t;const n=(t=this.optionsElement)==null?void 0:t.querySelector(".js-discussion-poll-option:checked");return n==null?void 0:n.value}hide(){var t;this.optionsElement&&(this.optionsElement.hidden=!0),(t=this.optionsElement)==null||t.setAttribute("aria-hidden","true")}show(){var t;this.optionsElement&&(this.optionsElement.hidden=!1),(t=this.optionsElement)==null||t.setAttribute("aria-hidden","false")}}o(Et,"PollOptionsElement");class wt{constructor(t){this.resultsElement=t}hide(){var t;this.resultsElement&&(this.resultsElement.hidden=!0),(t=this.resultsElement)==null||t.setAttribute("aria-hidden","true")}show(){var t;this.resultsElement&&(this.resultsElement.hidden=!1),(t=this.resultsElement)==null||t.setAttribute("aria-hidden","false")}}o(wt,"PollResultsElement");class St{constructor(t){this.pollForm=t,this.resultsElement=new wt(t.querySelector(".js-discussion-poll-results")),this.optionsElement=new Et(t.querySelector(".js-discussion-poll-options")),this.hideResultsButton=t.querySelector(".js-poll-hide-results"),this.showResultsButton=t.querySelector(".js-poll-show-results"),this.voteButton=t.querySelector(".js-discussion-poll-vote-button"),this.voteUrl=this.pollForm.getAttribute("data-vote-url")||"",this.pollUrl=this.pollForm.getAttribute("data-poll-url")||"",this.pollLocked=this.pollForm.getAttribute("data-poll-locked")||""}getCsrfInputValue(){const t=this.pollForm.querySelector(".js-data-url-post-csrf");return t?t.value:""}hideResults(){var t,n,s,m;this.resultsElement.hide(),this.optionsElement.show(),this.hideResultsButton&&(this.hideResultsButton.hidden=!0),(t=this.hideResultsButton)==null||t.setAttribute("aria-hidden","true"),this.showResultsButton&&(this.showResultsButton.hidden=!1),(n=this.showResultsButton)==null||n.setAttribute("aria-hidden","false"),this.pollLocked==="true"?(s=this.voteButton)==null||s.setAttribute("aria-disabled","true"):(m=this.voteButton)==null||m.setAttribute("aria-disabled","false")}showResults(){var t,n,s;this.resultsElement.show(),this.optionsElement.hide(),this.hideResultsButton&&(this.hideResultsButton.hidden=!1),(t=this.hideResultsButton)==null||t.setAttribute("aria-hidden","false"),this.showResultsButton&&(this.showResultsButton.hidden=!0),(n=this.showResultsButton)==null||n.setAttribute("aria-hidden","true"),(s=this.voteButton)==null||s.setAttribute("aria-disabled","true")}}o(St,"polls_voting_PollFormElement");class jt{constructor(t){this.pollFormElement=t,this.bindHideResultsClick(t.hideResultsButton),this.bindShowResultsClick(t.showResultsButton),this.bindVoteClick(t.voteButton)}bindHideResultsClick(t){t==null||t.addEventListener("click",async()=>{this.hideResults()})}bindShowResultsClick(t){t==null||t.addEventListener("click",async()=>{this.showResults()})}bindVoteClick(t){t==null||t.addEventListener("click",async()=>{this.vote()})}async vote(){const t=this.pollFormElement.optionsElement.checkedValue();if(t&&(await zt(this.pollFormElement.voteUrl,this.pollFormElement.getCsrfInputValue(),t)).ok)try{const m=await(await fetch(this.pollFormElement.pollUrl,{headers:{Accept:"text/html"}})).text();this.pollFormElement.pollForm.replaceWith((0,vt.r)(document,m))}catch{return}}hideResults(){this.pollFormElement.hideResults()}showResults(){this.pollFormElement.showResults()}}o(jt,"polls_voting_Poll"),(0,d.N7)(".js-discussion-poll-component",e=>{new jt(new St(e))});var Yt=a(7739);const Jt=new IntersectionObserver(function(e){for(const t of e)t.isIntersecting&&(t.target.hidden=!0)},{root:null,rootMargin:"0px",threshold:.1});(0,d.N7)(".js-whats-new",e=>Jt.observe(e)),(0,i.on)("click",".js-whats-new-state",e=>{var t;((t=e.target)==null?void 0:t.parentNode).scrollIntoView({behavior:"smooth",block:"start"})});const rt=o(()=>{const e=document.querySelector(".js-whats-new-state");!e||(e.hidden=!1)},"showWhatsNew");document.addEventListener("pjax:end",rt),document.addEventListener("turbo:load",rt),async function(){await Yt.x,setTimeout(rt,1e3)}()},47930:(T,E,a)=>{a.d(E,{S:()=>h});function l(f){const c=document.querySelectorAll(f);if(c.length>0)return c[c.length-1]}o(l,"queryLast");function d(){const f=l("meta[name=analytics-location]");return f?f.content:window.location.pathname}o(d,"pagePathname");function v(){const f=l("meta[name=analytics-location-query-strip]");let c="";f||(c=window.location.search);const i=l("meta[name=analytics-location-params]");i&&(c+=(c?"&":"?")+i.content);for(const r of document.querySelectorAll("meta[name=analytics-param-rename]")){const u=r.content.split(":",2);c=c.replace(new RegExp(`(^|[?&])${u[0]}($|=)`,"g"),`$1${u[1]}$2`)}return c}o(v,"pageQuery");function h(){return`${window.location.protocol}//${window.location.host}${d()+v()}`}o(h,"requestUri")},22485:(T,E,a)=>{a.d(E,{N:()=>v,x:()=>h});var l=a(7739);let d=null;(async function(){await l.x,f()})();function v(i){h(c(i))}o(v,"announceFromElement");function h(i){!d||(d.textContent="",d.textContent=i)}o(h,"announce");function f(){d=document.createElement("div"),d.setAttribute("aria-live","polite"),d.classList.add("sr-only"),document.body.append(d)}o(f,"createNoticeContainer");function c(i){return(i.getAttribute("aria-label")||i.innerText||"").trim()}o(c,"getTextContent")},42150:(T,E,a)=>{a.d(E,{Z:()=>nt});const l=Math.random,d=Math.cos,v=Math.sin,h=Math.PI,f=h*2,c=40,i=3,r=12-i,u=10,b=100,p=-.1,w=-p-p,M=.13,W=.18,g=.4,R=.7-g;let x,$;const I=[],H=["#6a737d","#0366d6","#28a745","#ffd33d","#f66a0a","#6f42c1","#ea4aaa"];function Z(){const j=Math.floor(Math.random()*H.length);return H[j]}o(Z,"colorTheme");function X(j,F,L){return(1-d(h*L))/2*(F-j)+j}o(X,"interpolation");const D=1/u,G=D+D;function J(){const j=[D,1-D];let F=1-G;const L=[0,1];for(;F;){let A=F*l(),S,_,N,U,P;for(S=0,_=j.length,F=0;S<_;S+=2){if(U=j[S],P=j[S+1],N=P-U,A0;S-=2)_=S-1,U=j[_],P=j[S],U>=V&&Uk?j[_]=k:j.splice(_,2):UV&&(P<=k?j[S]=V:j.splice(S,0,V,k));for(S=0,_=j.length,F=0;S<_;S+=2)F+=j[S+1]-j[S]}return L.sort()}o(J,"createPoisson");const q=document.createElement("div");q.style.position="fixed",q.style.top="0",q.style.left="0",q.style.width="100%",q.style.height="0",q.style.overflow="visible",q.style.zIndex="9999";class tt{constructor(F){this.frame=0,this.outer=document.createElement("div"),this.inner=document.createElement("div"),this.outer.appendChild(this.inner),this.outer.style.position="absolute",this.outer.style.width=`${i+r*l()}px`,this.outer.style.height=`${i+r*l()}px`,this.inner.style.width="100%",this.inner.style.height="100%",this.inner.style.backgroundColor=F(),this.outer.style.perspective="50px",this.outer.style.transform=`rotate(${360*l()}deg)`,this.theta=360*l(),this.axis=`rotate3D(${d(360*l())},${d(360*l())},0,`,this.inner.style.transform=`${this.axis}${this.theta}deg)`,this.dTheta=g+R*l(),this.x=window.innerWidth*l(),this.y=-b,this.dx=v(p+w*l()),this.dy=M+W*l(),this.outer.style.left=`${this.x}px`,this.outer.style.top=`${this.y}px`,this.splineX=J(),this.splineY=[];const L=this.splineX.length-1;for(let A=1;A=this.splineX[_];)S=_++;const N=X(this.splineY[S],this.splineY[_],(A-this.splineX[S])/(this.splineX[_]-this.splineX[S]));return A*=f,this.inner.style.transform=`${this.axis}${this.theta}deg)`,this.outer.style.left=`${this.x+N*d(A)}px`,this.outer.style.top=`${this.y+N*v(A)}px`,this.y>F+b}}o(tt,"Confetto");function nt(j){const F=j==null?5e3:j;if(!$){document.body.appendChild(q);const L=o(()=>{const _=new tt(Z);I.push(_),q.appendChild(_.outer),x=window.setTimeout(L,c*l())},"addConfetto");L();let A;const S=o(_=>{const N=A?_-A:0;A=_;const U=window.innerHeight;for(let P=I.length-1;P>=0;--P)I[P].update(U,N)&&(q.removeChild(I[P].outer),I.splice(P,1));if(x||I.length){$=requestAnimationFrame(S);return}document.body.removeChild(q),$=void 0},"loop");window.setTimeout(function(){clearTimeout(x),x=void 0},F),requestAnimationFrame(S)}}o(nt,"poof")},97730:(T,E,a)=>{a.d(E,{j:()=>h,w:()=>f});var l=a(59753),d=a(55741),v=a(45075);(0,l.on)("click",".js-toggle-inline-comment-form",function(c){const i=c.currentTarget.closest(".js-line-comments");h(i)}),(0,l.on)("quote-selection",".js-line-comments",function(c){h(c.currentTarget),c.stopPropagation()}),(0,v.w4)("keydown",".js-inline-comment-form-container form .js-comment-field",function(c){const i=c.target;if(!i.classList.contains("js-navigation-enable")&&c.key==="Escape"&&i.value.length===0){const r=i.closest("form");f(r),c.preventDefault()}}),(0,l.on)("click",".js-hide-inline-comment-form",function(c){const i=c.currentTarget.closest("form");!(0,d.T)(i)||confirm(c.target.getAttribute("data-confirm-cancel-text"))?f(i):c.preventDefault()});function h(c){var i;const r=c.querySelector(".js-inline-comment-form-container");r.classList.add("open"),(i=r.querySelector(".js-write-tab"))==null||i.click(),r.querySelector(".js-comment-field").focus(),(0,l.f)(r,"inlinecomment:focus")}o(h,"focusForm");function f(c){c.reset();const i=c.closest(".js-inline-comment-form-container");i.classList.remove("open");const r=i.querySelector(".js-multi-line-preview");r&&(r.hidden=!0),(0,l.f)(i,"inlinecomment:collapse")}o(f,"blurForm")},62805:(T,E,a)=>{var l=a(22485),d=a(64463);const v=o(async(i,r,u,b)=>{const p=new FormData;return b===!0&&p.append("upvote","true"),await fetch(i,{body:u==="delete"?"":p,method:u,mode:"same-origin",headers:{"Scoped-CSRF-Token":r}})},"sendRequest");class h{constructor(r){this.voteCountElement=r}getLabel(){var r;return((r=this.voteCountElement)==null?void 0:r.getAttribute("data-upvote-label"))||""}getText(){var r;return((r=this.voteCountElement)==null?void 0:r.textContent)||""}}o(h,"VoteCountElement");class f{constructor(r){this.voteForm=r,this.voteButton=this.voteForm.querySelector(".js-upvote-button"),this.defaultVoteCountElement=new h(r.querySelector(".js-default-vote-count")),this.upvotedCountElement=new h(r.querySelector(".js-upvoted-vote-count")),this.url=this.voteForm.getAttribute("data-url")||""}isUpvoted(){return this.voteForm.getAttribute("data-upvoted")==="true"}getCsrfDeleteInputValue(){const r=this.voteForm.querySelector(".js-data-url-delete-csrf");return r?r.value:""}getCsrfPutInputValue(){const r=this.voteForm.querySelector(".js-data-url-put-csrf");return r?r.value:""}simulateUpvote(){var r,u,b,p;this.voteForm.setAttribute("data-upvoted","true"),this.voteForm.getAttribute("data-new-upvote")&&((r=this.voteForm.querySelector(".js-upvote-button"))==null||r.classList.add("user-has-reacted","color-bg-accent"),(u=this.voteForm.querySelector(".js-upvote-button"))==null||u.classList.remove("color-fg-muted")),this.voteForm.classList.add("is-upvoted"),(b=this.voteButton)==null||b.setAttribute("aria-label",this.upvotedCountElement.getLabel()),(p=this.voteButton)==null||p.setAttribute("aria-pressed","true"),(0,l.x)(`${this.upvotedCountElement.getText()} Upvotes`)}simulateUpvoteDeletion(){var r,u,b,p;this.voteForm.setAttribute("data-upvoted","false"),this.voteForm.getAttribute("data-new-upvote")&&((r=this.voteForm.querySelector(".js-upvote-button"))==null||r.classList.remove("user-has-reacted","color-bg-accent"),(u=this.voteForm.querySelector(".js-upvote-button"))==null||u.classList.add("color-fg-muted")),this.voteForm.classList.remove("is-upvoted"),(b=this.voteButton)==null||b.setAttribute("aria-label",this.defaultVoteCountElement.getLabel()),(p=this.voteButton)==null||p.setAttribute("aria-pressed","false"),(0,l.x)(`${this.defaultVoteCountElement.getText()} Upvotes`)}displayUpVoteError(r){const u=this.voteForm.querySelector(".js-upvote-error");u instanceof HTMLElement&&(u.textContent=r,u.hidden=!1)}hideVoteErrors(){const r=this.voteForm.querySelector(".js-upvote-error");r instanceof HTMLElement&&(r.hidden=!0)}}o(f,"VoteFormElement");class c{constructor(r){this.voteFormElement=r}animateUpvote(r){r?this.voteFormElement.simulateUpvoteDeletion():this.voteFormElement.simulateUpvote()}animateUpvoteUndo(r){r?this.voteFormElement.simulateUpvote():this.voteFormElement.simulateUpvoteDeletion()}async click(){this.voteFormElement.hideVoteErrors();const r=this.voteFormElement.isUpvoted(),u=r?this.voteFormElement.getCsrfDeleteInputValue():this.voteFormElement.getCsrfPutInputValue(),b=r?"delete":"put";this.animateUpvote(r);const p=await v(this.voteFormElement.url,u,b,!r);if(!p.ok){const w=await p.json();this.voteFormElement.displayUpVoteError(w.error),this.animateUpvoteUndo(r)}}}o(c,"Upvote"),(0,d.N7)(".js-upvote-button",i=>{if(!(i instanceof HTMLElement)||!(i.parentElement instanceof HTMLElement))return;const r=new c(new f(i.parentElement));i.addEventListener("click",async()=>{await r.click()})})},7739:(T,E,a)=>{a.d(E,{C:()=>d,x:()=>l});const l=function(){return document.readyState==="interactive"||document.readyState==="complete"?Promise.resolve():new Promise(v=>{document.addEventListener("DOMContentLoaded",()=>{v()})})}(),d=function(){return document.readyState==="complete"?Promise.resolve():new Promise(v=>{window.addEventListener("load",v)})}()},29719:(T,E,a)=>{a.d(E,{D:()=>h,a:()=>v});var l=a(17463),d=a(12981);async function v(f,c,i){const r=new Request(c,i);r.headers.append("X-Requested-With","XMLHttpRequest");const u=await self.fetch(r);if(u.status<200||u.status>=300)throw new Error(`HTTP ${u.status}${u.statusText||""}`);return(0,l.t)((0,l.P)(f),u),(0,d.r)(f,await u.text())}o(v,"fetchSafeDocumentFragment");function h(f,c,i=1e3){return o(async function r(u){const b=new Request(f,c);b.headers.append("X-Requested-With","XMLHttpRequest");const p=await self.fetch(b);if(p.status<200||p.status>=300)throw new Error(`HTTP ${p.status}${p.statusText||""}`);if(p.status===200)return p;if(p.status===202)return await new Promise(w=>setTimeout(w,u)),r(u*1.5);throw new Error(`Unexpected ${p.status} response status from poll endpoint`)},"poll")(i)}o(h,"fetchPoll")},55741:(T,E,a)=>{a.d(E,{M:()=>v,T:()=>h});var l=a(14840),d=a(56238);function v(g,R=!1){return h(g)||b(g,R)||M(g)||W(g)}o(v,"hasInteractions");function h(g){for(const R of g.querySelectorAll("input, textarea"))if((R instanceof HTMLInputElement||R instanceof HTMLTextAreaElement)&&f(R))return!0;return!1}o(h,"hasDirtyFields");function f(g){if(g instanceof HTMLInputElement&&(g.type==="checkbox"||g.type==="radio")){if(g.checked!==g.defaultChecked)return!0}else if(g.value!==g.defaultValue)return!0;return!1}o(f,"formFieldValueChanged");let c;async function i(g,R){c=g;try{await R()}finally{c=null}}o(i,"withActiveElement");function r(g){return c instanceof Element?c:g&&g.ownerDocument&&g.ownerDocument.activeElement?g.ownerDocument.activeElement:null}o(r,"getActiveElement");let u;document.addEventListener("mouseup",function(g){u=g.target});function b(g,R){const x=r(g);return x===null||R&&x===g?!1:x===g&&(0,d.sw)(x)||g.contains(x)&&!w(x)?!0:u instanceof Element&&g.contains(u)&&!!u.closest("details[open] > summary")}o(b,"hasFocus");const p="a[href], button";function w(g){var R;if(g instanceof l.Z)return!0;const x=g instanceof HTMLAnchorElement||g instanceof HTMLButtonElement,$=(R=g.parentElement)==null?void 0:R.classList.contains("task-list-item");if(x&&$)return!0;if(!(u instanceof Element))return!1;const I=g.closest(p);if(!I)return!1;const H=u.closest(p);return I===H}o(w,"activeElementIsSafe");function M(g){return g.matches(":active:enabled")}o(M,"hasMousedown");function W(g){return!!(g.closest(".is-dirty")||g.querySelector(".is-dirty"))}o(W,"markedAsDirty")},17463:(T,E,a)=>{a.d(E,{P:()=>l,t:()=>v});function l(h){const f=[...h.querySelectorAll("meta[name=html-safe-nonce]")].map(c=>c.content);if(f.length<1)throw new Error("could not find html-safe-nonce on document");return f}o(l,"getDocumentHtmlSafeNonces");class d extends Error{constructor(f,c){super(`${f} for HTTP ${c.status}`);this.response=c}}o(d,"ResponseError");function v(h,f,c=!1){const i=f.headers.get("content-type")||"";if(!c&&!i.startsWith("text/html"))throw new d(`expected response with text/html, but was ${i}`,f);if(c&&!(i.startsWith("text/html")||i.startsWith("application/json")))throw new d(`expected response with text/html or application/json, but was ${i}`,f);const r=f.headers.get("x-html-safe");if(r){if(!h.includes(r))throw new d("response X-HTML-Safe nonce did not match",f)}else throw new d("missing X-HTML-Safe nonce",f)}o(v,"verifyResponseHtmlSafeNonce")},45075:(T,E,a)=>{a.d(E,{ZG:()=>f,q6:()=>i,w4:()=>c});var l=a(8439);let d=!1;const v=new l.Z;function h(r){const u=r.target;if(u instanceof HTMLElement&&u.nodeType!==Node.DOCUMENT_NODE)for(const b of v.matches(u))b.data.call(null,u)}o(h,"handleFocus");function f(r,u){d||(d=!0,document.addEventListener("focus",h,!0)),v.add(r,u),document.activeElement instanceof HTMLElement&&document.activeElement.matches(r)&&u(document.activeElement)}o(f,"onFocus");function c(r,u,b){function p(w){const M=w.currentTarget;!M||(M.removeEventListener(r,b),M.removeEventListener("blur",p))}o(p,"blurHandler"),f(u,function(w){w.addEventListener(r,b),w.addEventListener("blur",p)})}o(c,"onKey");function i(r,u){function b(p){const{currentTarget:w}=p;!w||(w.removeEventListener("input",u),w.removeEventListener("blur",b))}o(b,"blurHandler"),f(r,function(p){p.addEventListener("input",u),p.addEventListener("blur",b)})}o(i,"onInput")},12981:(T,E,a)=>{a.d(E,{r:()=>l});function l(d,v){const h=d.createElement("template");return h.innerHTML=v,d.importNode(h.content,!0)}o(l,"parseHTML")},97474:(T,E,a)=>{a.d(E,{Z:()=>l});function l(d){var v,h;const f=(h=(v=d.head)==null?void 0:v.querySelector('meta[name="expected-hostname"]'))==null?void 0:h.content;if(!f)return!1;const c=f.replace(/\.$/,"").split(".").slice(-2).join("."),i=d.location.hostname.replace(/\.$/,"").split(".").slice(-2).join(".");return c!==i}o(l,"detectProxySite")},84818:(T,E,a)=>{a.d(E,{Z:()=>d});class l{getItem(){return null}setItem(){}removeItem(){}clear(){}key(){return null}get length(){return 0}}o(l,"NoOpStorage");function d(v,h={throwQuotaErrorsOnSet:!1},f=window){let c;try{c=f[v]}catch{c=new l}const{throwQuotaErrorsOnSet:i}=h;function r(p){try{return c.getItem(p)}catch{return null}}o(r,"getItem");function u(p,w){try{c.setItem(p,w)}catch(M){if(i&&M.message.toLowerCase().includes("quota"))throw M}}o(u,"setItem");function b(p){try{c.removeItem(p)}catch{}}return o(b,"removeItem"),{getItem:r,setItem:u,removeItem:b}}o(d,"safeStorage")},24216:(T,E,a)=>{a.d(E,{LS:()=>v,cl:()=>h,rV:()=>d});var l=a(84818);const{getItem:d,setItem:v,removeItem:h}=(0,l.Z)("sessionStorage")},29946:(T,E,a)=>{a.d(E,{Ak:()=>W,F2:()=>D,F6:()=>I,FP:()=>w,LD:()=>p,OE:()=>b,Po:()=>u,QE:()=>h,Rl:()=>Z,Xk:()=>x,Ys:()=>$,aN:()=>X,wP:()=>H});var l=a(24216),d=a(47930),v=a(45922);const h=Object.freeze({INITIAL:"soft-nav:initial",SUCCESS:"soft-nav:success",ERROR:"soft-nav:error",FRAME_UPDATE:"soft-nav:frame-update",START:"soft-nav:start",END:"soft-nav:end"}),f="soft-navigation-fail",c="soft-navigation-referrer",i="soft-navigation-marker",r="reload";function u(){return(0,l.rV)(i)==="1"}o(u,"inSoftNavigation");function b(){return Boolean(g())}o(b,"hasSoftNavFailure");function p(){performance.mark(i),(0,l.LS)(i,"1"),(0,l.LS)(c,(0,d.S)()||window.location.href)}o(p,"startSoftNav");function w(){(0,l.LS)(i,"0")}o(w,"endSoftNav");function M(){(0,l.LS)(i,"0"),(0,l.cl)(c),(0,l.cl)(f)}o(M,"clearSoftNav");function W(G){(0,l.LS)(f,G||r)}o(W,"setSoftNavFailReason");function g(){return(0,l.rV)(f)}o(g,"getSoftNavFailReason");let R=0;function x(){R+=1,document.dispatchEvent(new CustomEvent(h.SUCCESS,{detail:R}))}o(x,"softNavSucceeded");function $(){const G=g()||r;document.dispatchEvent(new CustomEvent(h.ERROR,{detail:G})),R=0,M(),(0,v.b)({turboFailureReason:G})}o($,"softNavFailed");function I(){document.dispatchEvent(new CustomEvent(h.INITIAL)),R=0,M()}o(I,"softNavInitial");function H(){return(0,l.rV)(c)||document.referrer}o(H,"getSoftNavReferrer");function Z(){return performance.getEntriesByName(i).length===0?0:performance.measure(i,i).duration}o(Z,"getDurationSinceLastSoftNav");function X(){document.dispatchEvent(new Event(h.START))}o(X,"beginProgressBar");function D(){document.dispatchEvent(new Event(h.END))}o(D,"completeProgressBar")},45922:(T,E,a)=>{a.d(E,{b:()=>h});var l=a(97474),d=a(7739);let v=[];function h(u,b=!1){u.timestamp===void 0&&(u.timestamp=new Date().getTime()),u.loggedIn=r(),v.push(u),b?i():c()}o(h,"sendStats");let f=null;async function c(){await d.C,f==null&&(f=window.requestIdleCallback(i))}o(c,"scheduleSendStats");function i(){var u,b;if(f=null,!v.length||(0,l.Z)(document))return;const p=(b=(u=document.head)==null?void 0:u.querySelector('meta[name="browser-stats-url"]'))==null?void 0:b.content;if(!p)return;const w=JSON.stringify({stats:v});try{navigator.sendBeacon&&navigator.sendBeacon(p,w)}catch{}v=[]}o(i,"flushStats");function r(){var u,b;return!!((b=(u=document.head)==null?void 0:u.querySelector('meta[name="user-login"]'))==null?void 0:b.content)}o(r,"isLoggedIn"),document.addEventListener("pagehide",i),document.addEventListener("visibilitychange",i)}},T=>{var E=o(l=>T(T.s=l),"__webpack_exec__");T.O(0,["vendors-node_modules_selector-observer_dist_index_esm_js","vendors-node_modules_lit-html_lit-html_js","vendors-node_modules_delegated-events_dist_index_js-node_modules_github_details-dialog-elemen-63debe","vendors-node_modules_github_remote-form_dist_index_js-node_modules_lit-html_directives_until_-50084b","app_assets_modules_github_form_ts-app_assets_modules_github_navigation_ts"],()=>E(67105));var a=T.O()}]);})();
//# sourceMappingURL=discussions-94188b076c4b.js.map