performance.mark("js-parse-end:62712-a24ec231243f7876.js"); "use strict";(globalThis.webpackChunk_github_ui_github_ui=globalThis.webpackChunk_github_ui_github_ui||[]).push([["62712"],{13739(e,t,r){r.d(t,{mf:()=>L.RelayEnvironmentProvider,VB:()=>F,SD:()=>H,E7:()=>G});var a=r(40961),n=r(69487),i=r(13759),s=r(78597),o=r(26316),l=r(25649),u=r(73537);let c=["NOT_FOUND","SAML","SERVICE_UNAVAILABLE","FORBIDDEN","AUTHENTICATION"];var d=r(5045),h=r(46943);new RegExp(/^\/[\w-_]*\/[\w-_]*\/issues\/\d*$/);class p extends Error{catalogService;constructor(e,t,r){super(e,t),this.catalogService=r,this.name="ValidationError"}}class f extends Error{retryAfter;resetTime;constructor(e,t,...r){super(...r),this.retryAfter=e,this.resetTime=t,this.name="RateLimitError"}}class m extends Error{constructor(...e){super(...e),this.name="ServiceUnavailableError"}}class y extends Error{constructor(...e){super(...e),this.name="NotAcceptableError"}}class g extends Error{constructor(...e){super(...e),this.name="SecFetchHeaderError"}}class E extends Error{constructor(...e){super(...e),this.name="FetchNetworkError"}}class w extends Error{constructor(...e){super(...e),this.name="NoiseError"}}async function b(e,t,r){if(e.status>401&&404!==e.status){var a,n;let i=await e.text(),s={url:e.url,timestamp:new Date().toISOString(),persistedQueryId:t,persistedQueryName:r,failureRequestId:e.headers.get("X-Github-Request-Id")},o=`HTTP error (${e.status}): ${i||"No additional text"}. Error Info: ${JSON.stringify(s)}`;if(429===e.status)throw new f(Number(e.headers.get("Retry-After")),Number(e.headers.get("X-RateLimit-Reset")),o,{cause:e.status});if(a=e.status,n=i,418===a||410===a||403===a&&n.toLowerCase().includes("cloudflare")?0:1){if(503===e.status)throw new m(o,{cause:e.status});else if(406===e.status)throw new y(o,{cause:e.status});else if(422===e.status&&(i.includes("sec-fetch-dest")||i.includes("sec-fetch-site")))throw new g(o,{cause:e.status})}else throw new w(o,{cause:e.status});throw Error(o,{cause:e.status})}}async function v(e,t,r,a="GET",n,i,s,o,l){return(await _(e,t,r,a,{isSubscription:!1,scope:void 0,preheatSource:l},n,i,s,o)).response}async function _(e,t,r,a="POST",s={},u,d,h,f){let m=JSON.stringify((0,n.stableCopy)({persistedQueryName:t,query:e,variables:r,...s.scopeObject?{scopeObject:s.scopeObject}:{}})),{isSubscription:y,scope:g,subscriptionTopic:E,dispatchTime:w}=s,b=u;void 0===u||""!==u&&u.endsWith("/_graphql")||((0,l.N7)(Error(`fetchGraphQL received invalid baseUrl - must end with /_graphql persistedQueryId: ${e}, persistedQueryName: ${t}, invalidBaseUrl: ${u}`)),b=void 0);let v=function(e,t,r,a,n,i,s="/_graphql"){let l=[];if("GET"===e&&l.push(`body=${t}`),r&&l.push("subscription=1"),n&&l.push(`scope=${encodeURIComponent(n)}`),a&&l.push(`subscriptionTopic=${encodeURIComponent(a)}`),i&&l.push(`dispatchTime=${encodeURIComponent(i)}`),o.cg){let e=new URL(o.cg.location.href,o.cg.location.origin).searchParams.get("_features");e&&l.push(`_features=${e}`)}return l.length>0?`${s}?${l.join("&")}`:s}(a,encodeURIComponent(m),y,E,g,w,b),T=null;try{let{subscriptionId:r,requestId:n,json:o}=await S(v,a,e,t,m,d,s.preheatSource);if(T=r,!function(e,t,r){let a=("errors"in e?e.errors:[]).filter(e=>!c.includes(e.type));if("errors"in e&&a.length){let t=a.map(e=>`GraphQL error: ${e.type}: ${e.message} (path: ${e.path})`).join(", "),n=new p(`${t} (Persisted query id: ${r})`,{cause:a},e.extensions?.query_owning_catalog_service);(0,l.N7)(n)}if(!("data"in e)){let a=function e(t){if(null==t)return t;if(Array.isArray(t))return t.map(t=>null==t?t:"object"==typeof t?e(t):"[FILTERED]");if("object"==typeof t){let r={};for(let a in t)if(Object.prototype.hasOwnProperty.call(t,a)){let n=t[a];"errors"===a||null==n?r[a]=n:"object"==typeof n?r[a]=e(n):r[a]="[FILTERED]"}return r}return t}(e),n=Error(`Expected data property in response: ${JSON.stringify(a)}. persistedQueryId: ${r}, requestId: ${t}`);(0,l.N7)(n)}}(o,n,e),o)if(f){let e={__trace:{...o?.__trace,cache_result:"refresh"}};(0,i.Av)(e)}else(0,i.Av)(o);return{subscriptionId:T,response:o}}catch(e){if(h){let t,r=e?.name;"RateLimitError"===(t=e?.name)||"SecFetchHeaderError"===t||"NotAcceptableError"===t||"FetchNetworkError"===t||"NoiseError"===t||"ServiceUnavailableError"===t&&(0,l.ff)()||(0,l.N7)(e);let a={};if(("RateLimitError"===r||"ServiceUnavailableError"===r)&&(a={backoff:!0,errorType:r},"RateLimitError"===r)){let t=e.retryAfter;void 0===t||isNaN(t)||(a={...a,retryAfter:t});let r=e.resetTime;void 0===r||isNaN(r)||(a={...a,resetTime:r})}return h.error(e),{subscriptionId:T,response:{errors:[{message:"An error occurred while fetching data. Please try again later."}],extensions:a}}}throw e}}async function S(e,t,r,a,n,s,o){return T((0,i.RD)(e),t,r,a,n,s,o)}async function T(e,t,r,a,n,i,c){let p,f,m={...(0,d.kt)(),...c?{"X-GITHUB-PREHEAT":c}:{}};i?.issues_react_perf_test&&(m["X-LUC-Environment"]="issues");let y=(p="GET"===t?await fetch(e,{method:t,cache:"no-cache",credentials:"include",headers:{Accept:"application/json",...m}}):await (0,s.DI)(e,{method:t,headers:{Accept:"application/json",...m},...n?{body:n}:void 0})).headers.get("X-Subscription-ID"),g=p.headers.get("X-Github-Request-Id")||"",v=p.status;if(h.z.checkResponse(p),await b(p,r,a),404===v&&"POST"===t)throw o.cg?.location.reload(),Error("Reloading page due to 404 on GraphQL mutation for unauthenticated user.");try{f=await p.json()}catch(a){let r={error:a instanceof Error?`${a.name}: ${a.message}`:String(a),status:v,url:e,requestId:g};if(a instanceof Error&&"TypeError"===a.name&&"Failed to fetch"===a.message)throw new E(`Network error while reading response. Please check your connection and try again. ${JSON.stringify(r)}`);if(404===v&&"GET"===t&&(0,u.G7)("fetch_graphql_filter_404_noise"))throw new w(`Failed to parse server response. Please try again later. ${JSON.stringify(r)}`,{cause:v});throw(0,l.N7)(Error(`Failed to parse server JSON response ${JSON.stringify(r)}`)),Error(`Failed to parse server response. Please try again later. ${JSON.stringify(r)}`)}return{subscriptionId:y,requestId:g,json:f,status:v}}let A=[{kind:"linked",handle(e,t,r){if(null!=t&&t.getType()===n.ROOT_TYPE&&"node"===e.name&&r.hasOwnProperty("id"))return r.id}},{kind:"pluralLinked",handle(e,t,r){if(null!=t&&t.getType()===n.ROOT_TYPE&&"nodes"===e.name&&r.hasOwnProperty("ids"))return r.ids}}];var N=r(79708),R=r(86830),O=r(69982);function C(e){return(0,O.unstable_scheduleCallback)(O.unstable_LowPriority,e)}var I=r(37337),x=r(25989),k=r(66743),D=r(7909),P=r(81306),q=r(59767),L=r(18312);function $(e){let t=e?.ttl,r=e?.defaultValues,a=e?.[x.Zm.EXCLUDE_FROM_CACHE_KEY],n=e?.preheatSource,i=e?.skipCache;return{cacheTTL:t,defaultValues:r,keysToExclude:a,preheatSource:n,skipCache:i,skipNetwork:e?.[x.Zm.SKIP_NETWORK],cacheEnabledForQuery:void 0!==t&&t>0}}async function j({params:e,variables:t,baseUrl:r,enabledFeatures:a,observer:n,isClientSideCachingEnabled:i,cache:s,metadata:o,preloadSubscriptions:l}){if(!e.id)throw Error("Params has no id property!");let{cacheTTL:u,defaultValues:c,keysToExclude:d,preheatSource:h,skipCache:p,skipNetwork:f,cacheEnabledForQuery:m}=$(o),y="mutation"===e.operationKind?"POST":"GET",g=i=>v(e.id,e.name,t,y,r,a,n,i,p?"force_refresh":h);return s&&i&&m&&"mutation"!==e.operationKind?s.persisterFn({queryFn:g,observer:n,preloadSubscriptions:l},{queryId:e.id,queryName:e.name,variables:t},u,{preheat_source:h,[x.Zm.EXCLUDE_FROM_CACHE_KEY]:d,[x.Zm.SKIP_NETWORK]:f,skip_cache:p},c):g()}let U={cancel:()=>!1,schedule:e=>((0,a.unstable_batchedUpdates)(e),"")};class F{relayNetwork;ssrPreloadedData;preloadedSubscriptions;warningsShown;enabled_features;maxAge;cache;stalePreloadedData;markPreloadedDataAsStale;constructor(e,t={},r,a,i,s,o,u){this.ssrPreloadedData=e,this.enabled_features=t,this.preloadedSubscriptions=r,this.warningsShown=new Set,this.maxAge=i,this.cache=s,this.stalePreloadedData=o??!1,this.markPreloadedDataAsStale=u,this.relayNetwork=n.Network.create((e,t,r)=>n.Observable.create(n=>{let s=function({params:e,variables:t,ssrPreloadedQueries:r,baseUrl:a,emitWarning:n,enabledFeatures:i,maxAge:s,observer:o,cache:l,metadata:u,stalePreloadedData:c,preloadSubscriptions:d}){if(!e.id)throw Error("params has no id property!");let h=(0,D.M3)(),p=e.metadata?.defaultValues;if(e.id&&r){let a=(0,q.NA)(t,p),n=r.get(e.id)?.get(a),i=Math.floor(Date.now()/1e3),u=n?.timestamp;if(n){o.next(n);let r={queryId:e.id,queryName:e.name,variables:t},a=!1;if(n.injectedByServiceWorker&&((0,P.CI)("service-worker"),(0,P.aY)(r,"hit-sw"),a=!0),!(s&&u&&i>u+s)&&!c){if(h&&l){let t=e.metadata?.ttl;void 0!==t&&t>0&&(l.tryCacheFetchResult(r,n,t,{query_name:e.name,update_type:"preloaded"},p),a||(0,P.aY)(r,"ssr"))}o.complete();return}}e.metadata?.isRelayRouteRequest&&(0,I.g5)()}let f={...u??{},...e.metadata};if(I.KJ&&h&&"mutation"!==e.operationKind){let{keysToExclude:r,preheatSource:a,skipCache:n,cacheEnabledForQuery:i,defaultValues:s}=$(f);if(i&&!a&&!n){let a=`${x.vp}-${(0,D.cj)()}`,n=(0,x.KE)(a,{queryId:e.id,queryName:e.name,variables:t},s,r);n&&n!==P.uY&&(d?.(n),o.next(n),(0,P.CI)("hot-cache"))}}if(I.KJ)return j({params:e,variables:t,baseUrl:a,enabledFeatures:i,observer:o,isClientSideCachingEnabled:h,cache:l,metadata:f,preloadSubscriptions:d})}({params:e,variables:t,ssrPreloadedQueries:this.ssrPreloadedData,baseUrl:a,emitWarning:e=>{this.warningsShown.has(e)||(this.warningsShown.add(e),console.warn(e))},enabledFeatures:this.enabled_features,maxAge:i,observer:n,cache:this.cache,metadata:r.metadata,stalePreloadedData:this.stalePreloadedData,preloadSubscriptions:this.preloadSubscriptions.bind(this)});s instanceof Promise&&s.then(e=>{Array.isArray(e)||this.preloadSubscriptions(e),e&&n.next(e),n.complete()}),"mutation"===e.operationKind&&(this.stalePreloadedData=!0,this.markPreloadedDataAsStale?.(!0))}),(e,t)=>(function(e,t,r=new Map){let a=e.id,i=e.name;return n.Observable.create(n=>{let s=()=>{},o=!1;return async function(){if(!a)throw Error("unexpected operation with no id!");let u=e.metadata?.scope,c=function(e,t,r,a){let n=a.get(e);if(n)e:for(let[e,a]of n){for(let[a,n]of Object.entries(JSON.parse(e)))if("$scope"===a&&r!==n||t[a]!==n)continue e;return a}}(a,t,u,r),d=null;if(c)d=c.subscriptionId,c.response&&n.next(c.response);else try{let e=await _(a,i,t,"GET",{isSubscription:!0,scope:u});d=e.subscriptionId,e.response&&n.next(e.response)}catch(e){if(e instanceof Error&&e.message.includes("Subscription halted"))return;throw e}try{let e=await (0,N.H)();if(o)return;let r=(0,R.$)(e,d,async({scope_object:e,subscription_topic:r,dispatch_time:s})=>{try{let{response:o}=await _(a,i,{...t},"GET",{isSubscription:!0,scopeObject:e,subscriptionTopic:r,dispatchTime:s,scope:u});o&&n.next(o)}catch(e){(0,l.N7)(e,{message:`Error in fetching update for ${a} with variables ${JSON.stringify(t)}`})}});r?.unsubscribe&&(s=r.unsubscribe)}catch(e){n.error(e)}}(),{get closed(){return o},unsubscribe(){o=!0,s()}}})})(e,t,this.preloadedSubscriptions))}preloadSubscriptions(e){if(e&&"extensions"in e&&e.extensions&&e.extensions.subscriptions){let t=e.extensions.subscriptions;for(let e in t)for(let r in this.preloadedSubscriptions.has(e)||this.preloadedSubscriptions.set(e,new Map),t[e])this.preloadedSubscriptions.get(e)?.set(r,t[e][r])}}execute(e,t,r){return this.relayNetwork.execute(e,t,r)}getPreloadedSubscriptions(){return this.preloadedSubscriptions}}let G=e=>{let t;I.KJ&&(t=(0,x.VC)({sendAnalyticsEvent:(e,t,r={})=>{try{let a={react:!0,version:x.L7};(0,k.BI)(e,{...a,...r,target:t})}catch{}},reportableEvents:x.Zf.ANY}));let r=new F(new Map,{},new Map,e,void 0,t),a=new n.Environment({scheduler:U,store:new n.Store(new n.RecordSource,{gcReleaseBufferSize:50,queryCacheExpirationTime:3e5,gcScheduler:C}),getDataID:(e,t)=>{if("Viewer"===t)return null==e.id?(0,n.generateClientID)("client:root","viewer"):e.id;if("ProjectV2SingleSelectFieldOption"===t){let t=[];return e.id&&t.push(e.id),e.name&&t.push(e.name),e.color&&t.push(e.color),e.description&&t.push(function(e){let t=0;if(0===e.length)return t;for(let r=0;rr.getPreloadedSubscriptions()},a};function H({environment:e,query:t,variables:r={},metadata:a}){let i=(0,n.getRequest)(t),s=(0,n.createOperationDescriptor)(i,r);return e.retain(s),(0,n.fetchQuery)(e,t,r,{fetchPolicy:"store-or-network",networkCacheConfig:{metadata:a}})}},70148(e,t,r){r.d(t,{a:()=>i});let a={status:"CLOSED",nextAttemptTime:null,failureCount:0},n="offline_cache.circuit_breaker";class i{#e;#t;#r=null;constructor(e,t){this.#e=e,this.#r=t,this.#t=a}reportFailure=(e,t,r)=>{switch(this.#t.lastErrorType&&this.#t.lastErrorType!==e&&this.#a(e),e){case"RateLimitError":return this.#n(t,r);case"ServiceUnavailableError":return this.#i();default:return}};reportSuccess=()=>{this.#t={status:"CLOSED",nextAttemptTime:null,failureCount:0},this.#r?.(n,"success_reported")};getStatus=()=>{if("CLOSED"===this.#t.status)return"CLOSED";console.log("nextAttemptTime:",this.#t.nextAttemptTime,"currentTime:",Date.now());let e=Date.now();return this.#t.nextAttemptTime&&e>=this.#t.nextAttemptTime?(this.#t={status:"CLOSED",nextAttemptTime:null,failureCount:0},"CLOSED"):"OPEN"};#n=(e,t)=>{let r=null;if(void 0!==e){let t=1e3*e,a=Math.random()*t*.05;r=Date.now()+t+a}else r=void 0!==t?1e3*t+5e3*Math.random():this.#s(this.#t.failureCount+1);let a=(this.#t.failureCount||0)+1,i=this.#o(this.#t,a),s={status:i,nextAttemptTime:r,failureCount:a,lastErrorType:"RateLimitError"};this.#t=s,this.#r?.(n,"error_reported",{error_type:"RateLimitError",new_status:i,failure_count:a,next_attempt_time:r})};#i=()=>{let e=this.#s(this.#t.failureCount+1),t=(this.#t.failureCount||0)+1,r="OPEN";this.#t={status:r,nextAttemptTime:e,failureCount:t,lastErrorType:"ServiceUnavailableError"},this.#r?.(n,"error_reported",{error_type:"ServiceUnavailableError",new_status:r,failure_count:t,next_attempt_time:e})};#a=e=>{this.#t={status:"CLOSED",nextAttemptTime:null,failureCount:0,lastErrorType:e}};#s=e=>{let t=Math.min(5e3*2**(e-1),3e5),r=Math.random()*t*.25;return Date.now()+(t+r)};#o=(e,t)=>"OPEN"===e.status||t>=1?"OPEN":"CLOSED";handlePreheatResponse=(e,t)=>{if(e){let e=this.#l(t);e.shouldBackoff&&this.reportFailure(e.errorType??"Unknown",e.retryAfter,e.resetTime)}else"OPEN"===this.#t.status&&this.reportSuccess()};#l=e=>{if(!e)return{shouldBackoff:!1};if("object"==typeof e&&"extensions"in e&&"object"==typeof e.extensions&&null!==e.extensions&&"backoff"in e.extensions){let t=e.extensions,r="string"==typeof t.errorType?t.errorType:void 0,a="number"==typeof t.retryAfter?t.retryAfter:void 0,n="number"==typeof t.resetTime?t.resetTime:void 0;return{shouldBackoff:!!t.backoff,errorType:r,retryAfter:a,resetTime:n}}return{shouldBackoff:!1}}}},81306(e,t,r){r.d(t,{CI:()=>l.CI,KE:()=>u,XA:()=>c,Zm:()=>n.Z,aY:()=>o.aY,uY:()=>n.u});var a=r(70148),n=r(85951),i=r(29965),s=r(60080),o=r(13251),l=r(59767);function u(e,t,r,a){let s=(0,l.hz)(e,t,r,a),u=i.G0.getItem(s);if(u)return u.queryHash!==t.queryId?n.u:((0,o.aY)(t,"hit-hot"),i.G0.sendAnalyticsEvent(i.Ad,s,{}),u.state.data)}function c({storage:e,prefix:t,maxAgeMs:r,sendAnalyticsEvent:u}){let d=`${t}-circuit-breaker`,h=new a.a(d,u);async function p(t,r,a){if(e)try{let i=await e.getItem(t,(0,l.pv)(a));if(i&&i.queryHash!==r.queryId)return n.u;return i?.state.data}catch(e){u(s.Zf.CACHE_READ_ERROR,t,{error:String(e)});return}}async function f(t){if(e)try{i.G0.removeItem(t),await e.removeItem(t)}catch(e){u(s.Zf.CACHE_EVICT_ERROR,t,{error:String(e)})}}async function m(r,a,o,c,d,h){if(!e)return;let p=c?.[n.Z.EXCLUDE_FROM_CACHE_KEY],f=(0,l.hz)(t,r,d,p),m=(0,l.Ku)(r,o,d,p,h,a);try{h&&i.G0.setItem(f,m),await e.setItem(f,m,void 0,void 0,(0,l.pv)({...c,query_name:r.queryName}))}catch(e){u(s.Zf.CACHE_WRITE_ERROR,f,{error:String(e)})}}return(0,o.mk)(u),i.G0.init(u),{persisterFn:async function(e,a,s,c,d){let y,g=c?.[n.Z.EXCLUDE_FROM_CACHE_KEY],E=(0,l.hz)(t,a,d,g),w=await p(E,a,c),b=void 0!==w&&w!==n.u,v=c?.preheat_source,_=!!v,S=!!c?.skip_cache,T=!!c?.[n.Z.SKIP_NETWORK];if(b?((0,l.R1)(a),_||S||((0,o.aY)(a,"hit"),e.preloadSubscriptions?.(w),e.observer.next(w),(0,l.CI)())):(0,o.aY)(a,"miss"),_&&b&&!S){let e=(0,l.Ku)(a,s??r,d,g,v,w);i.G0.setItem(E,e),u("offline_cache.preheat_noop",E,{preheatSource:v})}if((0,l.HR)(T,v,b,h))return;try{y=await e.queryFn(b)}catch(e){if(b)return(0,l.ud)([{message:e instanceof Error?e.message:"Unknown error"}]),w;throw e}let A=(0,l.Cs)(y);if(b&&A&&(0,l.ud)(y.errors),_&&h.handlePreheatResponse(A,y),(0,l.FH)(y,w)&&f(E),(0,l.Gx)(y)){let e=(0,l.mj)(w,y,_,S);m(a,y,s??r,{...c,update_type:e},d,v)}if(!_)return y},retrieveQuery:p,tryCacheFetchResult:m}}},59767(e,t,r){r.d(t,{CI:()=>g,Cs:()=>m,FH:()=>f,Gd:()=>s,Gx:()=>E,HR:()=>b,Ku:()=>p,NA:()=>o,R1:()=>w,hz:()=>d,mj:()=>u,pv:()=>h,ud:()=>y,wY:()=>l});var a=r(85951),n=r(51189),i=r(13759);let s=12096e5;function o(e,t){var r;let a=(r=e,{...t,...r});return JSON.stringify(a,Object.keys(a).sort())}function l(e){let t={};if("operation"in e)for(let r of e.operation.argumentDefinitions)void 0!==r.defaultValue&&null!==r.defaultValue&&(t[r.name]=r.defaultValue);return Object.keys(t).length>0?t:void 0}function u(e,t,r,a){if(a)return"force_refresh";if(!e)return r?"pre_heated":"new";let n=null,i=null;return"object"==typeof t&&null!==t&&"data"in t&&(i=JSON.stringify(t.data)),e&&"object"==typeof e&&null!==e&&"data"in e&&(n=JSON.stringify(e.data)),n!==i?"changed":"unchanged"}function c(e,t,r){let a={...t,...Object.fromEntries(Object.entries(e??{}).filter(([,e])=>void 0!==e))},n=Object.keys(a).sort(),i={};for(let e of n){if(Array.isArray(r)&&r.includes(e))continue;let t=a[e];null!=t&&(i[e]=t)}return i}function d(e,t,r,a){let n=c(t.variables,r,a);return`${e}-${t.queryName}#${JSON.stringify(n)}`}function h(e){if(!e)return;let t={};for(let[r,n]of Object.entries(e))Object.values(a.Z).includes(r)||(t[r]=n);return t}function p(e,t,r,a,n,i){return{queryHash:e.queryId,variables:c(e.variables,r,a),state:{data:i,dataUpdatedAt:Date.now(),ttl:t,preheatSource:n}}}function f(e,t){return!!t&&(t===a.u||!!e&&m(e))}function m(e){return"object"==typeof e&&null!==e&&"errors"in e&&Array.isArray(e.errors)&&e.errors.length>0}function y(e){"u">typeof window&&window.dispatchEvent(new CustomEvent("stale-cache-warning",{detail:{errors:e}}))}function g(e="indexed-db"){"u"0)}function w(e){(0,i.Av)({__trace:{query_name:e.queryName,query_id:e.queryId,query_variables:e.variables,duration_ms:1,cache_result:"hit"}})}function b(e,t,r,a){return!!e||!!t&&("OPEN"===a.getStatus()||!!r&&"force_refresh"!==t)||!1}},13251(e,t,r){r.d(t,{aY:()=>p,mk:()=>c});var a=r(73537),n=r(51189),i=r(37337);let s=/^https?:\/\/[^/]+\/([^/]+)\/([^/]+)\/issues\/(\d+)(?:\?[^#]*)?(?:#.*)?$/,o={lastResult:null,pendingEvent:null,pendingEventTime:null,pendingQueryVariables:null,listenerRegistered:!1,sendAnalyticsEvent:null,enabled:!1,resourceMetricsEnabled:!1},l=()=>{o.lastResult=null,o.pendingEvent=null,o.pendingEventTime=null,o.pendingQueryVariables=null},u=[{type:"css",initiatorType:"link",extension:".css"},{type:"js",initiatorType:"script",extension:".js"}],c=e=>{if(o.enabled)return;let t=(0,a.G7)("issues_react_custom_hpc_metric"),r=(0,a.G7)("issues_react_resource_metrics");t&&(o.sendAnalyticsEvent=e,f(),o.enabled=!0,o.resourceMetricsEnabled=r)},d=(e,t)=>{if(null!==t&&((0,n.au)({name:"ISSUES_SHOW_HPC",value:e.detail.hpc,tags:{cpu:e.detail.cpu||"unknown",cache_result:t,mechanism:e.detail.mechanism||"unknown",ssr:(0,i.g5)()?"true":"false"}},void 0,1),o.sendAnalyticsEvent)){let r,a,n=((r=performance.getEntriesByType("navigation")).length>0&&r[0]?.serverTiming||[]).map(e=>({name:e.name,duration:e.duration})),s=o.resourceMetricsEnabled?(a=performance.getEntriesByType("resource"),u.map(e=>{let t={type:e.type,count:0,maxDuration:0,totalDuration:0,biggestResourceName:null},r=0,n=0,i=null;for(let s of a)if(s.initiatorType===e.initiatorType&&s.name.endsWith(e.extension)){let e=s.responseEnd-s.requestStart;t.count++,t.maxDuration=Math.max(t.maxDuration,e),r=0===r?s.requestStart:Math.min(r,s.requestStart),n=Math.max(n,s.responseEnd),(!i||e>i.responseEnd-i.requestStart)&&(i=s)}return t.totalDuration=n-r,i&&(t.biggestResourceName=i.name),t})):[];o.sendAnalyticsEvent("issues.hpc","issue#show",{hpc:e.detail.hpc,cpu:e.detail.cpu||"unknown",cache_result:t,mechanism:e.detail.mechanism||"unknown",server_timing:JSON.stringify(n),resource_stats:JSON.stringify(s),ssr:(0,i.g5)()})}},h=e=>{if(s.test(e.detail.name)&&(!o.pendingQueryVariables||m(o.pendingQueryVariables,e.detail.name)))if(null!==o.lastResult){let t=o.lastResult;l(),d(e,t)}else o.pendingEvent=e,o.pendingEventTime=Date.now()},p=(e,t)=>{if(o.enabled&&"IssueViewerViewQuery"===e.queryName&&null!==t&&m(e.variables)&&null===o.lastResult&&(o.lastResult=t,o.pendingQueryVariables=e.variables,o.pendingEvent)){let e=o.lastResult,t=o.pendingEvent,r=Date.now()-(o.pendingEventTime||0);l(),r<=500&&d(t,e)}},f=()=>{o.listenerRegistered||(document.addEventListener("web-vitals:hpc",h),o.listenerRegistered=!0)};function m(e,t){if(!e)return!1;let r=s.exec(t||window.location.href);if(!r)return!1;let[,a,n,i]=r;return e.owner===a&&e.repo===n&&String(e.number)===i}},29965(e,t,r){let a;r.d(t,{Ad:()=>n,G0:()=>o});let n="hot_cache.hit",i=new class{#u;#c;constructor(e){this.#u=new Map,this.#c=e}get(e){let t=this.#u.get(e);return void 0!==t&&(this.#u.delete(e),this.#u.set(e,t)),t}set(e,t){if(this.#u.has(e)&&this.#u.delete(e),this.#u.set(e,t),this.#u.size>this.#c){let e=this.#u.keys().next().value;void 0!==e&&this.#u.delete(e)}}delete(e){this.#u.delete(e)}clear(){this.#u.clear()}get size(){return this.#u.size}}(250);function s(e,t,r){a&&a("hot_cache.error",t,{error_type:e,error_message:r instanceof Error?r.message:"Unknown error"})}let o={init(e){a=e},getItem(e){try{return i.get(e)}catch(t){s("get_item",e,t);return}},setItem(e,t){try{i.set(e,t)}catch(t){s("set_item",e,t)}},removeItem(e){try{i.delete(e)}catch(t){s("remove_item",e,t)}},sendAnalyticsEvent(...e){a?.(...e)},clear(){i.clear()},size:()=>i.size}},25989(e,t,r){r.d(t,{KE:()=>i.KE,L7:()=>u,VC:()=>c,Zf:()=>a.Zf,Zm:()=>i.Zm,vp:()=>o});var a=r(60080),n=r(7909),i=r(81306);r(59767);let s={Check:e=>"object"==typeof e&&null!==e&&(void 0===e.data||"object"==typeof e.data)&&(void 0===e.errors||!!Array.isArray(e.errors)),Code:()=>"manual-validator",Errors:()=>[]},o="relay-query",l=6048e5,u="1.0.12",c=({sendAnalyticsEvent:e,reportableEvents:t=a.Zf.ANY,maxAgeMs:r=l})=>{let u=(0,a.i5)({validator:s,sendAnalyticsEvent:(r,...n)=>{t!==a.Zf.NONE&&(t===a.Zf.ANY||Array.isArray(t)&&t.includes(r))&&e(r,...n)}});return(0,i.XA)({storage:u,prefix:`${o}-${(0,n.cj)()}`,maxAgeMs:r,sendAnalyticsEvent:e})}},85951(e,t,r){r.d(t,{Z:()=>n,u:()=>a});let a={},n={EXCLUDE_FROM_CACHE_KEY:"exclude_from_cache_key",SKIP_NETWORK:"skip_network"}},46943(e,t,r){r.d(t,{z:()=>d});var a=r(34619),n=r(73537),i=r(35205);let s="VERSION_MISMATCH_LAST_TRIGGERED",o=(0,i.A)("localStorage",{ttl:9e7,throwQuotaErrorsOnSet:!1}),l=null,u=new class{canTrigger(){let e=this.getLastTriggerTime();return null===e||Date.now()-e>=864e5}recordTrigger(){let e=Date.now();o.setItem(s,e.toString()),l=e}getLastTriggerTime(){let e=o.getItem(s);if(e){let t=parseInt(e,10);return isNaN(t)?null:t}return l}clearTriggerRecord(){o.removeItem(s),l=null}};class c{#d=new Map;registerApp(e,t){this.#d.set(e,t)}unregisterApp(e){this.#d.delete(e)}checkResponse(e,t){if("true"!==e.headers.get("X-GitHub-Version-Mismatch")||!(0,n.G7)("react_version_mismatch_detection")||!u.canTrigger())return!1;let r={clientVersion:(0,a.O)(),serverVersion:e.headers.get("X-GitHub-Server-Version")||void 0,requestUrl:e.url,responseHeaders:e.headers,appName:t};if(u.recordTrigger(),t){let e=this.#d.get(t);if(e)return e.onMismatchDetected(r),!0}else{let e=!1;for(let[t,a]of this.#d.entries()){let n={...r,appName:t};a.onMismatchDetected(n),e=!0}return e}return!1}}let d=new c}}]); //# sourceMappingURL=62712-a24ec231243f7876-27b24fd9b07ada02.js.map