performance.mark("js-parse-end:13579-400db39e690a5cfd.js"); "use strict";(globalThis.webpackChunk_github_ui_github_ui=globalThis.webpackChunk_github_ui_github_ui||[]).push([["13579"],{40322(e,t,s){s.d(t,{M:()=>a});var i=s(16518),l=s(83821);class a extends l.Q{constructor(e,t){super(e,i.ak.HasValue,t)}}},18310(e,t,s){s.d(t,{X_:()=>eV,$q:()=>A,pv:()=>M,Dv:()=>eI,_N:()=>e_,kr:()=>i.k,AM:()=>C,C2:()=>ep,tQ:()=>B,n5:()=>eS,aF:()=>K,a2:()=>q,LB:()=>eM,ac:()=>H,W$:()=>es,Ws:()=>Q,IL:()=>eN,Or:()=>I,Pd:()=>eC,ne:()=>Y,KX:()=>R,uB:()=>en,rL:()=>P,NN:()=>em,A6:()=>eo,HD:()=>el,Wq:()=>g,Ge:()=>X,d$:()=>ea,Bc:()=>ew,tW:()=>ed,Qh:()=>ex,z_:()=>E,E:()=>eh.E,AR:()=>f,Jx:()=>ev.J,ws:()=>b,$W:()=>F,NT:()=>ee,jf:()=>U,Qq:()=>J,RY:()=>eT,I4:()=>ei,Ag:()=>er,pH:()=>eg.I,uy:()=>d,dR:()=>L,jd:()=>W,FG:()=>ey,WE:()=>et,kL:()=>e$,sW:()=>eb,PT:()=>eu,FZ:()=>m,_O:()=>$});var i=s(65502),l=s(17243),a=s(47903),r=s(16518),o=s(14705),n=s(4069),u=s(91385),p=s(61876);let c=[">=","<=",">","<"];class d extends p.e{filterValues;constructor(e,t,s){super(e,s),this.filterValues=t.map(e=>({...e,ariaLabel:`${e.displayName}, ${this.displayName}`}))}getfilterKeys(){return[{key:this.key,aliases:this.aliases,displayName:this.displayName,description:this.description,priority:this.priority,icon:this.icon,options:this.options}]}getSuggestions(e,t,s,i){if(!this.shouldGetSuggestions(t))return null;let l=(0,o.DS)(t,i),a=t.provider.key,p=[];if((0,o.uT)(t)&&this.options.filterTypes.valueless&&!t.raw.startsWith("-")&&p.push((0,o.jL)(this.displayName,this.icon)),(0,o.uT)(t)&&this.options.filterTypes.hasValue&&!t.raw.startsWith("-")&&p.push((0,o.Ms)(this.displayName,this.icon)),this.options.filterTypes.exclusive&&""===l&&(0,o.aK)(t)&&!t.raw.startsWith("-")){let e=(0,o.m1)(a);p.unshift(e)}if(!this.allowsFilterValues())return p;let d=c.find(e=>l===e||l===`${e}@`);if(!l&&!d)return p.concat(this.filterValues);for(let e of this.filterValues){let{value:t,displayName:i}=e,a=(0,o.I8)(t),h={...e,type:r.ak.Value},y=a&&!c.find(e=>a.startsWith(e));if(this.type===r.CH.Date&&y)h.value=`${d??""}${a}`;else{let t=!!a&&(0,u.qA)(l,a),r=!!s.aliasMatching&&e.aliases&&e.aliases.some(e=>(0,u.qA)(l,e)),o=!!i&&(0,u.qA)(l,i);if(!a||!t&&!o&&!r)continue}e.priority-=(0,n.dt)(l,a),p.push(h)}return p}validateFilterBlockValues(e,t,s,i){return s.map((e,s)=>{if(!this.allowsFilterValues())return{...e,valid:!1,validations:[{type:r.b.InvalidValue,message:a.D.filterValuesUnsupported(this.key)}]};if(!this.options.filterTypes.multiValue&&(t.operator===r.tl.Between&&s>1||t.operator!==r.tl.Between&&s>0))return h(e,this.key);let i=(0,o.M5)(e.value);return i?t.operator===r.tl.Between&&c.some(e=>i.startsWith(e))?v(e,i,this.key):{...e,valid:!0}:y(e,this.key)})}getValueRowProps(e){let t=this.options.renderValueVisual?.(e);return{text:e.displayName??(0,o.I8)(e.value)??"",description:e.description,leadingVisual:this.options.renderValueVisual?t??null:(0,o.J)(e)}}}let h=(e,t)=>({...e,valid:!1,validations:[{type:r.b.MultiValueUnsupported,message:a.D.filterMultiValueFalse(t)}]}),y=(e,t)=>({...e,valid:!1,validations:[{type:r.b.EmptyValue,message:a.D.filterValueEmpty(t)}]}),v=(e,t,s)=>({...e,valid:!1,validations:[{type:r.b.InvalidValue,message:a.D.filterInvalidValue(s,t)}]});class g extends d{constructor(e,t=l.bO,s){super(e,t,{...o.Oo,...s,filterTypes:{...o.Oo.filterTypes,...s?.filterTypes}}),this.type=r.CH.Boolean}validateFilterBlockValues(e,t,s,i){return s.map((e,t)=>{if(!this.allowsFilterValues())return{...e,valid:!1,validations:[{type:r.b.InvalidValue,message:a.D.filterValuesUnsupported(this.key)}]};if(!this.options.filterTypes.multiValue&&t>0)return h(e,this.key);let s=(0,o.M5)(e.value);if(!s)return y(e,this.key);let l=void 0!==this.filterValues.find(e=>(0,o.I8)(e.value)===s||i?.aliasMatching&&e.aliases?.includes(s)),n=this.filterValues.find(e=>(0,o.SH)((0,o.I8)(e.value)??"",s));return n?{...e,...n,valid:!0,value:e.value}:{...e,valid:l}})}}class f extends g{constructor(e){super(l._i.archived,l.sS.archived,{...e,filterTypes:{...e?.filterTypes,multiValue:!1,valueless:!1}})}}class m extends g{constructor(e){super(l._i.draft,l.sS.draft,{...e,filterTypes:{multiValue:!1,valueless:!1,...e?.filterTypes}}),this.type=r.CH.Boolean}}var V=s(12907);let T=/^(?:>|<|>=|<=)?(\d{4}-\d{1,2}-\d{1,2})?$/,k=/^(?:>|<|>=|<=)?(\d{4}-\d{1,2})?$/,x=/^(?:>|<|>=|<=)?(\d{4})?$/,S=/^(?:>|<|>=|<=)?(\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}Z?)$/,w=/^(?:>|<|>=|<=)?(\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\+\d{2}:\d{2})$/,_=/^(?:>|<|>=|<=)?(@[A-Za-z]+)([+-]\d+[mdwqy])?$/,N=[">=","<=",">","<"];class C extends d{constructor(e,t,s){super(e,t,{...V.dQ,...s,filterTypes:{...V.dQ.filterTypes,multiKey:!1,multiValue:!1,...s?.filterTypes}}),this.type=r.CH.Date,this.filterValues=t.map(e=>({...e,ariaLabel:`${e.displayName}, ${this.displayName}`}))}validateFilterBlockValues(e,t,s,i){return s.map((e,s)=>{if(!this.allowsFilterValues())return{...e,valid:!1,validations:[{type:r.b.InvalidValue,message:a.D.filterValuesUnsupported(this.key)}]};if(!this.options.filterTypes.multiValue&&(t.operator===r.tl.Between&&s>1||t.operator!==r.tl.Between&&s>0))return h(e,this.key);let i=(0,o.M5)(e.value);if(!i)return y(e,this.key);if(t.operator===r.tl.Between&&N.some(e=>i.startsWith(e)))return v(e,i,this.key);let l=!0;if(i)if("*"===i)l=!0;else if(_.test(i)){let[,e]=_.exec(i)??[];l=void 0!==this.filterValues.find(t=>(0,o.I8)(t.value)===e)}else{let e=null;w.test(i)?e=w.exec(i)?.[1]??null:S.test(i)?e=S.exec(i)?.[1]??null:T.test(i)?e=T.exec(i)?.[1]??null:k.test(i)?e=k.exec(i)?.[1]??null:x.test(i)&&(e=x.exec(i)?.[1]??null),l=!!e&&!isNaN(Date.parse(e))}return{...e,valid:l}})}}class b extends C{constructor(e){super(l._i.closed,l.sS.closed,e),this.type=r.CH.Date}}class $ extends C{constructor(e){const t={filterTypes:{valueless:!1}};super(l._i.created,l.sS.created,{...t,...e,filterTypes:{...t.filterTypes,...e?.filterTypes}}),this.type=r.CH.Date}}class I extends C{constructor(e){const t={...e,filterTypes:{...e?.filterTypes,multiValue:!1}};super(l._i.merged,l.sS.merged,t),this.type=r.CH.Date}}class M extends C{constructor(e){super(l._i.updated,l.sS.updated,{...e,filterTypes:{hasValue:!1,...e?.filterTypes}}),this.type=r.CH.Date}}s(40322);var D=s(38621);class H extends i.k{constructor(e,t){super(e,t),this.suggestionEndpoint="/_filter/issues",this.validationEndpoint="/_filter/issues/validate",this.type=r.CH.Select}async getSuggestions(e,t,s,i){return this.processSuggestions(e,t,this.#e.bind(this),i)}getIconData(e){return"open"===e.state?{icon:D.IssueOpenedIcon,iconColor:"var(--fgColor-success, var(--color-success-fg))"}:"not_planned"===e.stateReason?{icon:D.SkipIcon,iconColor:"var(-fgColor-muted, var(--color-neutral-emphasis))"}:{icon:D.IssueClosedIcon,iconColor:"var(--fgColor-done, var(--color-done-fg))"}}rankSuggestion(e,t){let{ariaLabel:s,description:i}=t,a=s?.split(",")[0]??"",r=l.E4;return e&&(a&&(r-=(0,n.dt)(e,a)),i&&(r-=(0,n.dt)(e,i))),{...t,priority:r}}#e(e,t){let{title:s,titleHtml:i,nwoReference:l}=e;return this.rankSuggestion(t,{type:r.ak.Value,displayName:s,displayNameHtml:i,ariaLabel:`${s}, ${this.displayName}`,description:l,inlineDescription:!1,value:l??"",...this.getIconData(e)})}validateValue(e,t,s){let i=(0,o.M5)(t.value);return!!i&&(s?{displayName:s.title,value:i}:!e.context.repo&&!e.context.org&&{value:l.rt})}getValueRowProps(e){let t=this.options.renderValueVisual?.(e);return{text:e.displayName??(0,o.I8)(e.value)??"",description:e.description,descriptionVariant:"block",leadingVisual:this.options.renderValueVisual?t??null:(0,o.J)(e,this.icon,!0)}}}class A extends H{constructor(e,t){super(e||l._i.parentIssue,t),this.providerContext=new URLSearchParams({parent:"true"})}}class B extends H{constructor(e,t){super(e||l._i.blocking,{filterTypes:{hasValue:!0},...t})}}class P extends H{constructor(e,t){super(e||l._i.blockedBy,{filterTypes:{hasValue:!0},...t})}}class U extends p.e{constructor(e,t){super(e,t),Object.assign(this,e),this.key=e.key,this.icon=e.icon,this.displayName=e.displayName??(0,o.ZH)(e.key),this.options={...V.dQ,...t,filterTypes:{...V.dQ.filterTypes,multiValue:!1,valueless:!1,...t?.filterTypes}},this.priority=this.options.priority}getSuggestions(e,t,s,i){if(!this.shouldGetSuggestions(t))return null;let l=(0,o.DS)(t,i),a=t.provider.key,r=[];if((0,o.uT)(t)&&this.options.filterTypes.valueless&&!t.raw.startsWith("-")&&r.push((0,o.jL)(this.displayName,this.icon)),(0,o.uT)(t)&&this.options.filterTypes.hasValue&&!t.raw.startsWith("-")&&r.push((0,o.Ms)(this.displayName,this.icon)),this.options.filterTypes.exclusive&&""===l&&(0,o.aK)(t)&&!t.raw.startsWith("-")){let e=(0,o.m1)(a);r.unshift(e)}return r}validateFilterBlockValues(e,t,s){return s.map(e=>({...e,valid:!0}))}getValueRowProps(){return{text:""}}}class L extends U{constructor(e){super(l._i.base,e)}}class Q extends U{constructor(e){super(l._i.head,e)}}class W extends U{constructor(e){super(l._i.inBody,e)}}class E extends U{constructor(e){super(l._i.inComments,e)}}class F extends U{constructor(e){super(l._i.inTitle,e)}}class R extends U{constructor(e){super(l._i.sha,e)}}class K extends i.k{constructor(e){super(l._i.label,e),this.suggestionEndpoint="/_filter/labels",this.validationEndpoint="/_filter/labels/validate",this.type=r.CH.Select}async getSuggestions(e,t,s,i){return this.processSuggestions(e,t,this.processSuggestion.bind(this),i)}getIconData(e,t){return t.repo?{iconColor:e.color?.startsWith("#")?e.color:`#${e.color}`,description:e.description,inlineDescription:!1}:{icon:this.icon}}rankSuggestion(e,t){let{value:s}=t,i=(0,o.M5)(s)||"",a=l.E4;return e&&i&&(a-=(0,n.dt)(e,i)),{...t,priority:a}}processSuggestion(e,t,s){return this.rankSuggestion(t,{type:r.ak.Value,displayName:e.name,displayNameHtml:e.nameHtml,ariaLabel:`${e.name}, ${this.displayName}`,value:e.name??"",...this.getIconData(e,s.context)})}validateValue(e,t,s){let i=(0,o.M5)(t.value);return!!i&&(s?{iconColor:s.color?.startsWith("#")?s.color:`#${s.color}`,value:i,displayName:s.name,...this.getIconData(s,e.context)}:!e.context.repo&&{value:l.rt})}getValueRowProps(e){let t=this.options.renderValueVisual?.(e);return{text:e.displayName??(0,o.I8)(e.value)??"",description:e.description,descriptionVariant:"block",leadingVisual:this.options.renderValueVisual?t??null:(0,o.J)(e,this.icon)}}}class q extends i.k{constructor(e){super(l._i.language,e),this.suggestionEndpoint="/_filter/languages",this.validationEndpoint="/_filter/languages/validate",this.type=r.CH.Select}async getSuggestions(e,t,s,i){return this.processSuggestions(e,t,this.#e.bind(this),i)}rankSuggestion(e,t){let s=(0,o.M5)(t.value),i=l.E4;return e&&s&&(i-=(0,n.dt)(e,s)),{...t,priority:i}}#e(e,t){return this.rankSuggestion(t,{type:r.ak.Value,displayName:e.name,ariaLabel:`${e.name}, ${this.displayName}`,value:e.name??"",iconColor:e.color?.startsWith("#")?e.color:`#${e.color}`})}validateValue(e,t,s){let i=(0,o.M5)(t.value);return!!s&&!!i&&{iconColor:s.color?.startsWith("#")?s.color:`#${s.color}`,value:i,displayName:s.name}}getValueRowProps(e){let t=this.options.renderValueVisual?.(e);return{text:e.displayName??(0,o.I8)(e.value)??"",description:e.description,descriptionVariant:"block",leadingVisual:this.options.renderValueVisual?t??null:(0,o.J)(e,this.icon)}}}class J extends i.k{constructor(e){super(l._i.milestone,e),this.suggestionEndpoint="/_filter/milestones",this.validationEndpoint="/_filter/milestones/validate",this.type=r.CH.Select}async getSuggestions(e,t,s,i){return this.processSuggestions(e,t,this.#e.bind(this),i)}rankSuggestion(e,t){let s=(0,o.M5)(t.value),i=l.E4;return e&&s&&(i-=(0,n.dt)(e,s)),{...t,priority:i}}#e(e,t){let{id:s,title:i,description:l}=e;return this.rankSuggestion(t,{id:s,type:r.ak.Value,displayName:i,ariaLabel:`${i}, ${this.displayName}`,value:i,description:l,inlineDescription:!1,icon:this.icon})}validateValue(e,t,s){let i=(0,o.M5)(t.value);return!!i&&(s?{value:i,displayName:s.title,description:s.description}:!e.context.repo&&!e.context.org&&{value:l.rt})}getValueRowProps(e){let t=this.options.renderValueVisual?.(e);return{text:e.displayName??(0,o.I8)(e.value)??"",description:e.description,descriptionVariant:"block",leadingVisual:this.options.renderValueVisual?t??null:(0,o.J)(e,this.icon,!0)}}}let O=/^(?!-)(?:>|<|>=|<=)?(\d+)$/,j=/^(?:>|<|>=|<=)?-(\d+)$/,G=/^(?:>|<|>=|<=)?(\d+\.\d+|\d+)$/,Z=/^(?:>|<|>=|<=)?-(\d+\.\d+|\d+)$/,z=[">=","<=",">","<"];class Y extends d{positive;negative;decimal;constructor(e,t,s){super(e,t,{...V.dQ,...s,filterTypes:{...V.dQ.filterTypes,valueless:!1,exclusive:!1,multiKey:!1,multiValue:!1,...s?.filterTypes}}),this.positive=s?.positive??!0,this.negative=s?.negative??!1,this.decimal=s?.decimal??!1,this.filterValues=t.map(e=>({...e,ariaLabel:`${e.displayName}, ${this.displayName}`})),this.type=r.CH.Number}validateFilterBlockValues(e,t,s){return s.map((e,s)=>{if(!this.allowsFilterValues())return{...e,valid:!1,validations:[{type:r.b.InvalidValue,message:a.D.filterValuesUnsupported(this.key)}]};if(!this.options.filterTypes.multiValue&&(t.operator===r.tl.Between&&s>1||t.operator!==r.tl.Between&&s>0))return h(e,this.key);let i=(0,o.M5)(e.value);if(!i)return y(e,this.key);if(t.operator===r.tl.Between&&z.some(e=>i.startsWith(e)))return v(e,i,this.key);let l=!1,n=!1,u=!1;if(this.decimal){let e=i.match(G);u=(l=(e?.length??0)>0&&e?.[0]===i)&&i.includes(".")}else{let e=i.match(O);l=(e?.length??0)>0&&e?.[0]===i}if(this.decimal){let e=i.match(Z);(n=(e?.length??0)>0&&e?.[0]===i)&&i.includes(".")&&(u=!0)}else{let e=i.match(j);n=(e?.length??0)>0&&e?.[0]===i}let p=l||n,c=this.positive&&l||this.negative&&n,d=this.decimal||!u;return{...e,valid:p&&c&&d}})}}class X extends Y{constructor(e){const t={filterTypes:{multiValue:!1,valueless:!1}};super(l._i.comments,l.sS.comments,{...t,...e,filterTypes:{...t.filterTypes,...e?.filterTypes}})}}class ee extends Y{constructor(e){const t={filterTypes:{multiValue:!1,valueless:!1}};super(l._i.interactions,l.sS.interactions,{...t,...e,filterTypes:{...t.filterTypes,...e?.filterTypes}})}}class et extends Y{constructor(e){super(l._i.reactions,l.sS.reactions,{...e,filterTypes:{multiValue:!1,valueless:!1,...e?.filterTypes}})}}class es extends d{strictMatching;constructor(e,t,s){super(e,t,s),this.filterValues=t.map(e=>({...e,ariaLabel:`${e.displayName}, ${this.displayName}`})),this.strictMatching=s?.strictMatching??!0,this.type=this.strictMatching?r.CH.Select:r.CH.Text}validateFilterBlockValues(e,t,s,i){return s.map((e,t)=>{if(!this.allowsFilterValues())return{...e,valid:!1,validations:[{type:r.b.InvalidValue,message:a.D.filterValuesUnsupported(this.key)}]};if(!this.options.filterTypes.multiValue&&t>0)return h(e,this.key);let s=(0,o.M5)(e.value);if(!s)return y(e,this.key);let l=void 0!==this.filterValues.find(e=>(0,o.I8)(e.value)===s||i?.aliasMatching&&e.aliases?.includes(s)),n=this.filterValues.find(e=>(0,o.SH)((0,o.I8)(e.value)??"",s));return n?{...e,...n,valid:!0,value:e.value}:{...e,valid:!this.strictMatching||l}})}}class ei extends es{constructor(e,t){const s=e?.map(e=>l.VT[e]).filter(Boolean)??[],i={filterTypes:{valueless:!1}};super(l._i.is,s?.length>0?s:l.sS.is,{...i,...t,filterTypes:{...i.filterTypes,hasValue:!1,...t?.filterTypes}})}}class el extends es{constructor(e,t){const s=e?.map(e=>l.oO[e]).filter(Boolean)??[],i={filterTypes:{valueless:!1,multiValue:!0}};super(l._i.in,s?.length>0?s:l.sS.in,{...i,...t,filterTypes:{...i.filterTypes,...t?.filterTypes}})}}class ea extends es{constructor(e,t){const s={...t,filterTypes:{...t?.filterTypes,multiValue:!1,valueless:!1}},i=e?.map(e=>l.Ez[e]).filter(Boolean)??[];super(l._i.linked,i?.length>0?i:l.sS.linked,s)}}class er extends es{constructor(e){super(l._i.reason,l.sS.reason,{...e,filterTypes:{hasValue:!1,...e?.filterTypes}})}}class eo extends es{constructor(e){super(l._i.review,l.sS.review,e)}}class en extends es{constructor(e,t){const s=[...e.map(e=>l.$c[e]).flat().filter(Boolean)??[],...e?.includes("reactions")?l.OV:[]];super(l._i.sort,s?.length>0?s:l.sS.sort,t)}}class eu extends es{stateContext;constructor(e="mixed",t){const s=(0,o.Lu)(e),i={filterTypes:{valueless:!1}};super(l._i.state,s,{...i,...t,filterTypes:{...i.filterTypes,hasValue:!1,...t?.filterTypes}}),this.stateContext=e}}class ep extends es{constructor(e){super(l._i.status,l.sS.status,e)}}let ec={boolean:D.CheckCircleIcon,select:D.SingleSelectIcon,text:D.TypographyIcon,date:D.CalendarIcon,number:D.NumberIcon};class ed{subKeys;filterProviders;constructor(e,t){const{subKeys:s,...i}=e;this.subKeys=s,this.filterProviders=s.map(e=>{let s={...e,type:e.type,key:`${i.key}.${e.key}`,displayName:e.displayName??e.key,description:e.description,priority:l.a6,icon:e.icon??ec[e.type]};if(e.type===r.CH.Boolean)return new g(s,void 0,t);{if(e.type===r.CH.Select)return new es(s,e.values,{...e.options,filterTypes:{...V.dQ.filterTypes,...e.options?.filterTypes}});if(e.type===r.CH.Text)return new U(s,e.options);if(e.type===r.CH.Date)return new C(s,e.values||[],{...e.options,filterTypes:{...V.dQ.filterTypes,...e.options?.filterTypes}});if(e.type===r.CH.Number)return new Y(s,e.values||[],{...e.options,filterTypes:{...V.dQ.filterTypes,...e.options?.filterTypes}});let t=new d(s,e.values||[],{...e.options,filterTypes:{...V.dQ.filterTypes,...e.options?.filterTypes}});return t.type=s.type,t}}),this.filterProviders.push(new d({...i,key:`${i.key}.`},[],t))}}var eh=s(45928);class ey extends i.k{constructor(e){super(l._i.project,e),this.suggestionEndpoint="/_filter/projects",this.validationEndpoint="/_filter/projects/validate",this.type=r.CH.Select}async getSuggestions(e,t,s,i){return this.processSuggestions(e,t,this.#e.bind(this),i)}rankSuggestion(e,t){let{description:s,displayName:i}=t,a=l.E4;return e&&(i&&(a-=(0,n.dt)(e,i)),s&&(a-=(0,n.dt)(e,s))),{...t,priority:a}}#e(e,t){let{title:s,value:i}=e;return this.rankSuggestion(t,{type:r.ak.Value,displayName:s,ariaLabel:`${s}, ${this.displayName}`,value:(0,o.$4)(i)??"",description:i,inlineDescription:!1})}validateValue(e,t,s){let i=(0,o.M5)(t.value);return!!i&&(s?{displayName:s.title,value:i}:!e.context.repo&&!e.context.org&&{value:l.rt})}getValueRowProps(e){return{text:e.displayName??(0,o.I8)(e.value)??"",description:e.description,descriptionVariant:"block"}}}var ev=s(34355),eg=s(92324);class ef extends i.k{constructor(e,t,s){super(e,s),this.suggestionEndpoint="/_filter/teams",this.validationEndpoint="/_filter/teams/validate",this.type=r.CH.Select}async getSuggestions(e,t,s,i){return this.processSuggestions(e,t,this.#e.bind(this),i)}#e(e,t){let{name:s,combinedSlug:i,avatarUrl:l}=e;return this.rankSuggestion(t,{type:r.ak.Value,displayName:s,value:(0,o.$4)(i)??"",ariaLabel:`${s}, ${this.displayName}`,description:i,inlineDescription:!0,icon:l?void 0:this.icon,avatar:l?{url:l,type:r.uW.Team}:void 0})}rankSuggestion(e,t){let{displayName:s,description:i}=t,a=l.E4;return e&&(s&&(a-=(0,n.dt)(e,s)),i&&(a-=(0,n.dt)(e,i))),{...t,priority:a}}validateValue(e,t,s){let i=(0,o.M5)(t.value);return!!i&&(s?{avatar:s.avatarUrl?{url:s.avatarUrl,type:r.uW.Team}:void 0,value:i,displayName:s.name}:!e.context.repo&&!e.context.org&&{value:l.rt})}getValueRowProps(e){let t=this.options.renderValueVisual?.(e);return{text:e.displayName??(0,o.I8)(e.value)??"",description:e.description,descriptionVariant:"inline",leadingVisual:this.options.renderValueVisual?t??null:(0,o.J)(e,this.icon)}}}class em extends ef{constructor(e,t){super(l._i.team,e,t)}}class eV extends ef{constructor(e,t){super(l._i.teamReviewRequested,e,t)}}let eT="@copilot",ek={type:r.ak.Value,value:"@me",ariaLabel:"@me, Signed-in user",displayName:"Me",description:"Signed-in user",inlineDescription:!0,priority:1,icon:D.ArrowSwitchIcon,iconColor:"var(--fgColor-done, var(--color-done-fg))"};class ex extends i.k{showAtMe;showAtCopilot;currentUserLogin;currentUserAvatarUrl;includeBots;copilotQueryParamKey;constructor(e,t,s){super(e,s),this.suggestionEndpoint="/_filter/users",this.validationEndpoint="/_filter/users/validate",this.currentUserLogin=t?.currentUserLogin,this.currentUserAvatarUrl=t?.currentUserAvatarUrl,this.includeBots=t?.includeBots??!1,this.type=r.CH.User,this.showAtMe=t?.showAtMe??!0,this.showAtCopilot=t?.showAtCopilot??!1}async getSuggestions(e,t,s,i){this.includeBots&&e.addQueryParam("include_bots","1"),this.copilotQueryParamKey&&e.addQueryParam(this.copilotQueryParamKey,"1");let l=await this.processSuggestions(e,t,this.processSuggestion.bind(this),i)??[],a=(0,o.DS)(t,i),n=+(l[0]?.type===r.ak.NoValue);if(this.showAtMe&&(""===a||(0,u.qA)(a,"@me"))&&(0,o.aK)(t)&&t.value?.values.findIndex(e=>"@me"===e.value)<0&&this.allowsFilterValues()&&(l.splice(n,0,ek),n++),(""===a||(0,u.qA)(a,eT))&&(0,o.aK)(t)&&t.value?.values.findIndex(e=>e.value===eT)<0&&this.allowsFilterValues()){let e=l.findIndex(e=>e.value===eT);if(e>-1){let[t]=l.splice(e,1);this.showAtCopilot&&t&&(l.splice(n,0,t),n++)}}return l}processSuggestion(e,t){let{login:s,name:i,avatarUrl:l,isCopilot:a}=e;if(a)return{type:r.ak.Value,value:eT,ariaLabel:`${eT}, Your AI pair programmer`,displayName:s,description:"Your AI pair programmer",inlineDescription:!0,priority:1,icon:D.CopilotIcon,avatarUrl:l?{url:l,type:r.uW.User}:void 0,iconColor:"var(--fgColor-done, var(--color-done-fg))"};return this.rankSuggestion(t,{type:r.ak.Value,value:s,ariaLabel:`${s}, ${i}, ${this.displayName}`,description:i,inlineDescription:!0,icon:l?void 0:this.icon,avatar:l?{url:l,type:r.uW.User}:void 0})}rankSuggestion(e,t){let{value:s,description:i}=t,a=(0,o.M5)(s),r=l.E4;if(e){if(a){let t=(0,n.dt)(e,a);r-=(t!==n.IP?t:1)*.75}if(i){let t=(0,n.dt)(e,i);r-=(t!==n.IP?t:1)*.25}}return"@me"===a&&(r=1),{...t,priority:r}}getMetaSuggestions(e){let t,s=[];return this.showAtMe&&"@me".startsWith(e)&&s.push(ek),this.options.filterTypes.hasValue&&"*".startsWith(e)&&s.push((t=this.displayName,{type:r.ak.Value,value:"*",displayName:`Has ${t.toLocaleLowerCase()}`,ariaLabel:`Has ${t}, ${t}`,priority:1,icon:D.PlusCircleIcon})),s}validateValue(e,t,s){let i=(0,o.M5)(t.value);return"@me"===i?{avatar:this.currentUserAvatarUrl?{url:this.currentUserAvatarUrl,type:r.uW.User}:void 0,value:i}:this.options.filterTypes.hasValue&&"*"===i||s&&this.showAtCopilot&&i===eT?{avatar:void 0,value:i}:s&&i?{avatar:s.avatarUrl?{url:s.avatarUrl,type:r.uW.User}:void 0,value:i,displayName:s.name}:!e.context.repo&&!e.context.org&&{value:l.rt}}validateFilterValue(e,t,s){let i=new URLSearchParams(t);return this.copilotQueryParamKey&&i.append(this.copilotQueryParamKey,"1"),super.validateFilterValue(e,i,s)}getValueRowProps(e){let t=this.options.renderValueVisual?.(e);return{text:e.displayName??(0,o.I8)(e.value)??"",description:e.description,descriptionVariant:"inline",leadingVisual:this.options.renderValueVisual?t??null:(0,o.J)(e,this.icon)}}}class eS extends ex{constructor(e,t){super(l.yV.assignee,e,t),this.copilotQueryParamKey=e?.showAtCopilot?"show_assignee_copilot":void 0}}class ew extends ex{constructor(e,t){const s={filterTypes:{multiValue:!1,valueless:!1}};super(l.yV.author,{...e,includeBots:!0},{...s,...t,filterTypes:{...s.filterTypes,...t?.filterTypes}}),this.copilotQueryParamKey=e?.showAtCopilot?"show_author_copilot":void 0}}class e_ extends ex{constructor(e,t){super(l.yV.commenter,e,t)}}class eN extends ex{constructor(e,t){super(l.yV.involves,e,t),this.copilotQueryParamKey=e?.showAtCopilot?"show_involves_copilot":void 0}}class eC extends ex{constructor(e,t){super(l.yV.mentions,e,t)}}class eb extends ex{constructor(e,t){super(l.yV.reviewedBy,e,t),this.copilotQueryParamKey=e?.showAtCopilot?"show_pull_request_reviewer_copilot":void 0}}class e$ extends ex{constructor(e,t){super(l.yV.reviewRequested,e,t),this.copilotQueryParamKey=e?.showAtCopilot?"show_pull_request_reviewer_copilot":void 0}}class eI extends ex{constructor(e,t){super(l.yV.user,e,t)}}class eM extends ex{constructor(e,t){super(l.yV.userReviewRequested,e,t)}}},83821(e,t,s){s.d(t,{Q:()=>c});var i=s(4069),l=s(91385),a=s(12907),r=s(17243),o=s(16518),n=s(14705),u=s(61876);let p={[o.ak.HasValue]:r._i.has,[o.ak.NoValue]:r._i.no};class c extends u.e{filterValues;constructor(e,t,s){super(p[t],s),this.options={...a.dQ,...s,filterTypes:{...a.dQ.filterTypes,valueless:!1,...s?.filterTypes}},this.type=o.CH.Select,this.filterValues=e.map(e=>({...e,ariaLabel:`${e.displayName}, ${this.displayName}`}))}getSuggestions(e,t,s,a){if(!this.shouldGetSuggestions(t))return null;let r=(0,n.DS)(t,a),u=[];if(!r)return this.filterValues.filter(t=>(0,n.Di)(e,this.key,(0,n.M5)(t.value)).length<1);for(let t of this.filterValues){let{value:s,displayName:a}=t,p=(0,n.I8)(s),c=!!p&&(0,l.qA)(r,p),d=!!a&&(0,l.qA)(r,a);!((0,n.Di)(e,this.key,(0,n.M5)(p)).length>0)&&p&&(c||d)&&(t.priority-=(0,i.dt)(r,p),u.push({...t,type:o.ak.Value}))}return u}validateFilterBlockValues(e,t,s){return s.map((i,l)=>{let a=(0,n.I8)(i.value),r=(0,n.Di)(e,this.key,(0,n.M5)(a)).sort((e,t)=>e.id-t.id),o=!!a&&!!this.filterValues.find(e=>(0,n.SH)((0,n.I8)(e.value)??"",a));return r[0]?.id!==void 0&&(t.id!==r[0].id||s.findIndex(e=>e.value===a)