티스토리 수익 글 보기
“use strict”;(globalThis.webpackChunk_github_ui_github_ui=globalThis.webpackChunk_github_ui_github_ui||[]).push([[30721],{11418:(e,t,r)=>{let a;r.d(t,{H:()=>O});var n=r(35750),i=r(18150),s=r(85242),o=r(88243),c=r(16213),l=r(10204),u=new WeakMap,d=new WeakSet;let AliveSession=class AliveSession extends l.ib{constructor(e,t,r,a,n){super(e,()=>(0,o._)(this,d,h).call(this),r,a,void 0,n),(0,c._)(this,d),(0,i._)(this,u,{writable:!0,value:void 0}),(0,s._)(this,u,t)}};function h(){return p((0,n._)(this,u))}async function p(e){let t=await f(e);return t&&t.url&&t.token?_(t.url,t.token):null}async function f(e){let t=await fetch(e,{headers:{Accept:”application/json”}});if(t.ok)return t.json();if(404===t.status)return null;throw Error(“fetch error”)}async function _(e,t){let r=await fetch(e,{method:”POST”,mode:”same-origin”,headers:{“Scoped-CSRF-Token”:t}});if(r.ok)return r.text();throw Error(“fetch error”)}var w=r(70170),m=r(34095),g=r(82075),E=r(23683);function b(e,{channel:t,type:r,data:a}){for(let n of e)n.dispatchEvent(new CustomEvent(`socket:${r}`,{bubbles:!1,cancelable:!1,detail:{name:t,data:a}}))}var y=new WeakMap,v=new WeakMap,S=new WeakMap,A=new WeakMap,C=new WeakMap,I=new WeakSet;let R=class AliveSessionProxy{subscribe(e){let t=(0,n._)(this,v).add(…e);t.length&&(0,n._)(this,y).port.postMessage({subscribe:t});let r=new Set(t.map(e=>e.name)),a=e.reduce((e,t)=>{let a=t.topic.name;return(0,l.JR)(a)&&!r.has(a)&&e.add(a),e},new Set);a.size&&(0,n._)(this,y).port.postMessage({requestPresence:Array.from(a)})}unsubscribeAll(…e){let t=(0,n._)(this,v).drain(…e);t.length&&(0,n._)(this,y).port.postMessage({unsubscribe:t});let r=(0,n._)(this,S).removeSubscribers(e);this.sendPresenceMetadataUpdate(r)}updatePresenceMetadata(e){let t=new Set;for(let r of e)(0,n._)(this,S).setMetadata(r),t.add(r.channelName);this.sendPresenceMetadataUpdate(t)}sendPresenceMetadataUpdate(e){if(!e.size)return;let t=[];for(let r of e)t.push({channelName:r,metadata:(0,n._)(this,S).getChannelMetadata(r)});(0,n._)(this,y).port.postMessage({updatePresenceMetadata:t})}online(){(0,n._)(this,y).port.postMessage({online:!0})}offline(){(0,n._)(this,y).port.postMessage({online:!1})}hangup(){(0,n._)(this,y).port.postMessage({hangup:!0})}constructor(e,t,r,a,u,d){(0,c._)(this,I),(0,i._)(this,y,{writable:!0,value:void 0}),(0,i._)(this,v,{writable:!0,value:new l.m0}),(0,i._)(this,S,{writable:!0,value:new l.VH}),(0,i._)(this,A,{writable:!0,value:void 0}),(0,i._)(this,C,{writable:!0,value:new Map}),(0,s._)(this,A,u),(0,s._)(this,y,new SharedWorker(`${e}?module=true`,{name:`github-socket-worker-v3-${a}`,type:”module”})),(0,n._)(this,y).port.onmessage=({data:e})=>(0,o._)(this,I,k).call(this,e),(0,n._)(this,y).port.postMessage({connect:{url:t,refreshUrl:r,options:d}})}};function k(e){let{channel:t}=e;if(“presence”===e.type){let r=(0,n._)(this,C).get(t);r||(r=(0,w.s)((e,r)=>{(0,n._)(this,A).call(this,e,r),(0,n._)(this,C).delete(t)},100),(0,n._)(this,C).set(t,r)),r((0,n._)(this,v).subscribers(t),e);return}(0,n._)(this,A).call(this,(0,n._)(this,v).subscribers(t),e)}async function N(){let e,t=(e=document.head.querySelector(“link[rel=shared-web-socket-src]”)?.getAttribute(“href”))&&e.startsWith(“/”)?e:null;if(!t)return;let r=document.head.querySelector(“link[rel=shared-web-socket]”)?.href??null;if(!r)return;let a=document.head.querySelector(“link[rel=shared-web-socket]”)?.getAttribute(“data-refresh-url”)??null;if(!a)return;let n=document.head.querySelector(“link[rel=shared-web-socket]”)?.getAttribute(“data-session-id”)??null;if(!n)return;let i=(()=>{let e={};if(!(0,E.nr)()&&”SharedWorker”in window&&”true”!==(0,g.A)(“localStorage”).getItem(“bypassSharedWorker”))try{return new R(t,r,a,n,b,e)}catch{}return new AliveSession(r,a,!1,b,e)})();return window.addEventListener(“online”,()=>i.online()),window.addEventListener(“offline”,()=>i.offline()),window.addEventListener(“pagehide”,()=>{“hangup”in i&&i.hangup()}),i}async function T(){return await m.G,N()}function O(){return a||(a=T())}},30721:(e,t,r)=>{r.d(t,{mf:()=>T.RelayEnvironmentProvider,VB:()=>SSRNetwork,SD:()=>M,E7:()=>D});var a=r(50467),n=r(40961),i=r(69487),s=r(37285),o=r(96379),c=r(71315),l=r(38102),u=r(69599);let d=[“NOT_FOUND”,”SAML”,”SERVICE_UNAVAILABLE”,”FORBIDDEN”,”AUTHENTICATION”];var h=r(51987),p=r(86185);let f=class ValidationError extends Error{constructor(e,t,r){super(e,t),(0,a._)(this,”catalogService”,void 0),this.catalogService=r,this.name=”ValidationError”}},_=class RateLimitError extends Error{constructor(…e){super(…e),this.name=”RateLimitError”}},w=class NotAcceptableError extends Error{constructor(…e){super(…e),this.name=”NotAcceptableError”}},m=class SecFetchDestError extends Error{constructor(…e){super(…e),this.name=”SecFetchDestError”}};async function g(e,t,r){if(e.status>401&&404!==e.status){let a=await e.text(),n={url:e.url,timestamp:new Date().toISOString(),persistedQueryId:t,persistedQueryName:r,failureRequestId:e.headers.get(“X-Github-Request-Id”)},i=`HTTP error (${e.status}): ${a||”No additional text”}.
Error Info: ${JSON.stringify(n)}`;if(429===e.status)throw new _(i,{cause:e.status});if((0,u.G7)(“react_fetch_graphql_ignore_expected_errors”)){if(406===e.status)throw new w(i,{cause:e.status});if(422===e.status&&a.includes(“sec-fetch-dest”))throw new m(i,{cause:e.status})}throw Error(i,{cause:e.status})}}async function E(e,t,r,a=”GET”,n,i,s,o,c){return(await b(e,t,r,a,{isSubscription:!1,scope:void 0,preheatSource:c},n,i,s,o)).response}async function b(e,t,r,a=”POST”,n={},o,u,h,p){let _=JSON.stringify((0,i.stableCopy)({persistedQueryName:t,query:e,variables:r,…n.scopeObject?{scopeObject:n.scopeObject}:{}})),{isSubscription:w,scope:m,subscriptionTopic:g,dispatchTime:E}=n,v=o;void 0===o||””!==o&&o.endsWith(“/_graphql”)||((0,l.N7)(Error(`fetchGraphQL received invalid baseUrl – must end with /_graphql persistedQueryId: ${e}, persistedQueryName: ${t}, invalidBaseUrl: ${o}`)),v=void 0);let S=function(e,t,r,a,n,i,s=”/_graphql”){let o=[];if(“GET”===e&&o.push(`body=${t}`),r&&o.push(“subscription=1”),n&&o.push(`scope=${encodeURIComponent(n)}`),a&&o.push(`subscriptionTopic=${encodeURIComponent(a)}`),i&&o.push(`dispatchTime=${encodeURIComponent(i)}`),c.cg){let e=new URL(c.cg.location.href,c.cg.location.origin).searchParams.get(“_features”);e&&o.push(`_features=${e}`)}return o.length>0?`${s}?${o.join(“&”)}`:s}(a,encodeURIComponent(_),w,g,m,E,v),A=null;try{let{subscriptionId:r,requestId:i,json:o}=await y(S,a,e,t,_,u,n.preheatSource);if(A=r,!function(e,t,r){let a=(“errors”in e?e.errors:[]).filter(e=>!d.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 f(`${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,i,e),o)if(p){let e={__trace:{…o?.__trace,cache_result:”refresh”}};(0,s.Av)(e)}else(0,s.Av)(o);return{subscriptionId:A,response:o}}catch(e){if(h){let t;return”RateLimitError”!==(t=e?.name)&&”SecFetchDestError”!==t&&”NotAcceptableError”!==t&&(0,l.N7)(e),h.error(e),{subscriptionId:A,response:{errors:[{message:”An error occurred while fetching data. Please try again later.”}],extensions:{}}}}throw e}}async function y(e,t,r,a,n,i,o){return v((0,s.RD)(e),t,r,a,n,i,o)}async function v(e,t,r,a,n,i,s){let d,f,_={…(0,h.kt)(),…s?{“X-GITHUB-PREHEAT”:s}:{}};i?.issues_react_perf_test&&(_[“X-LUC-Environment”]=”issues”);let w=(d=”GET”===t?await fetch(e,{method:t,cache:”no-cache”,credentials:”include”,headers:{Accept:”application/json”,…_}}):await (0,o.DI)(e,{method:t,headers:{Accept:”application/json”,…_},…n?{body:n}:void 0})).headers.get(“X-Subscription-ID”),m=d.headers.get(“X-Github-Request-Id”)||””,E=d.status;if(p.z.checkResponse(d),await g(d,r,a),404===E&&”POST”===t)throw c.cg?.location.reload(),Error(“Reloading page due to 404 on GraphQL mutation for unauthenticated user.”);try{f=await d.json()}catch(r){let t={error:(0,u.G7)(“fetch_graphql_improved_error_serialization”)?r instanceof Error?`${r.name}: ${r.message}`:String(r):r,status:E,url:e,requestId:m};throw(0,l.N7)(Error(`Failed to parse server JSON response ${JSON.stringify(t)}`)),Error(`Failed to parse server response. Please try again later. ${JSON.stringify(t)}`)}return{subscriptionId:w,requestId:m,json:f,status:E}}let S=[{kind:”linked”,handle(e,t,r){if(null!=t&&t.getType()===i.ROOT_TYPE&&”node”===e.name&&r.hasOwnProperty(“id”))return r.id}},{kind:”pluralLinked”,handle(e,t,r){if(null!=t&&t.getType()===i.ROOT_TYPE&&”nodes”===e.name&&r.hasOwnProperty(“ids”))return r.ids}}];var A=r(11418),C=r(73056),I=r(69982);function R(e){return(0,I.unstable_scheduleCallback)(I.unstable_LowPriority,e)}var k=r(87683),N=r(53419),T=r(18312);async function O({params:e,variables:t,baseUrl:r,enabledFeatures:a,observer:n,isClientSideCachingEnabled:i,cache:s,metadata:o}){if(!e.id)throw Error(“Params has no id property!”);let c=o?.ttl,l=o?.defaultValues,u=o?.preheatSource,d=o?.[k.Zm.EXCLUDE_FROM_CACHE_KEY],h=o?.skipCache,p=void 0!==c&&c>0,f=”mutation”===e.operationKind?”POST”:”GET”,_=i=>E(e.id,e.name,t,f,r,a,n,i,h?”force_refresh”:u);return s&&i&&p&&”mutation”!==e.operationKind?s.persisterFn(_,e.id,e.name,t,n,c,{query_name:e.name,preheat_source:u,[k.Zm.EXCLUDE_FROM_CACHE_KEY]:d,skip_cache:h},l):_()}let P={cancel:()=>!1,schedule:e=>((0,n.unstable_batchedUpdates)(e),””)};let SSRNetwork=class SSRNetwork{execute(e,t,r){return this.relayNetwork.execute(e,t,r)}getPreloadedSubscriptions(){return this.preloadedSubscriptions}constructor(e,t={},r,n,s,o,d,h){(0,a._)(this,”relayNetwork”,void 0),(0,a._)(this,”ssrPreloadedData”,void 0),(0,a._)(this,”preloadedSubscriptions”,void 0),(0,a._)(this,”warningsShown”,void 0),(0,a._)(this,”enabled_features”,void 0),(0,a._)(this,”maxAge”,void 0),(0,a._)(this,”cache”,void 0),(0,a._)(this,”stalePreloadedData”,void 0),(0,a._)(this,”markPreloadedDataAsStale”,void 0),this.ssrPreloadedData=e,this.enabled_features=t,this.preloadedSubscriptions=r,this.warningsShown=new Set,this.maxAge=s,this.cache=o,this.stalePreloadedData=d??!1,this.markPreloadedDataAsStale=h,this.relayNetwork=i.Network.create((e,t,r)=>i.Observable.create(a=>{let i=function({params:e,variables:t,ssrPreloadedQueries:r,baseUrl:a,emitWarning:n,enabledFeatures:i,maxAge:s,observer:o,cache:l,metadata:d,stalePreloadedData:h}){if(!e.id)throw Error(“params has no id property!”);let p=(0,u.G7)(“issues_react_client_side_caching”);if(e.id&&r){let a=JSON.stringify(t),n=r.get(e.id)?.get(a),i=Math.floor(Date.now()/1e3),u=n?.timestamp;if(n&&(o.next(n),!(s&&u&&i>u+s)&&!h)){if(p&&l){let r=e.metadata?.ttl,a=e.metadata?.defaultValues;void 0!==r&&r>0&&l.tryCacheFetchResult(e.id,e.name,t,n,r,{query_name:e.name,update_type:”preloaded”},a)}o.complete();return}e.metadata?.isRelayRouteRequest&&(0,c.g5)()}if(c.KJ)return O({params:e,variables:t,baseUrl:a,enabledFeatures:i,observer:o,isClientSideCachingEnabled:p,cache:l,metadata:{…d??{},…e.metadata}})}({params:e,variables:t,ssrPreloadedQueries:this.ssrPreloadedData,baseUrl:n,emitWarning:e=>{this.warningsShown.has(e)||(this.warningsShown.add(e),console.warn(e))},enabledFeatures:this.enabled_features,maxAge:s,observer:a,cache:this.cache,metadata:r.metadata,stalePreloadedData:this.stalePreloadedData});i instanceof Promise&&i.then(e=>{if(!Array.isArray(e)&&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])}e&&a.next(e),a.complete()}),”mutation”===e.operationKind&&(this.stalePreloadedData=!0,this.markPreloadedDataAsStale?.(!0))}),(e,t)=>(function(e,t,r=new Map){let a=e.id,n=e.name;return i.Observable.create(i=>{let s=()=>{},o=!1;return async function(){if(!a)throw Error(“unexpected operation with no id!”);let c=e.metadata?.scope,u=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,c,r),d=null;if(u)d=u.subscriptionId,u.response&&i.next(u.response);else try{let e=await b(a,n,t,”GET”,{isSubscription:!0,scope:c});d=e.subscriptionId,e.response&&i.next(e.response)}catch(e){if(e instanceof Error&&e.message.includes(“Subscription halted”))return;throw e}try{let e=await (0,A.H)();if(o)return;let r=(0,C.$)(e,d,async({scope_object:e,subscription_topic:r,dispatch_time:s})=>{try{let{response:o}=await b(a,n,{…t},”GET”,{isSubscription:!0,scopeObject:e,subscriptionTopic:r,dispatchTime:s,scope:c});o&&i.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){i.error(e)}}(),{get closed(){return o},unsubscribe(){o=!0,s()}}})})(e,t,this.preloadedSubscriptions))}};let D=e=>{let t;if(c.KJ){let e=(0,u.G7)(“issues_react_client_side_caching_analytics”);t=(0,k.VC)({sendAnalyticsEvent:(e,t,r={})=>{let a={react:!0,version:k.L7};(0,N.BI)(e,{…a,…r,target:t})},reportableEvents:e?k.Zf.ANY:k.Zf.NONE})}let r=new SSRNetwork(new Map,{},new Map,e,void 0,t),a=new i.Environment({scheduler:P,store:new i.Store(new i.RecordSource,{gcReleaseBufferSize:50,queryCacheExpirationTime:3e5,gcScheduler:R}),getDataID:(e,t)=>{if(“Viewer”===t)return null==e.id?(0,i.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 M({environment:e,query:t,variables:r={},metadata:a}){let n=(0,i.getRequest)(t),s=(0,i.createOperationDescriptor)(n,r);return e.retain(s),(0,i.fetchQuery)(e,t,r,{fetchPolicy:”store-or-network”,networkCacheConfig:{metadata:a}})}},33303:(e,t,r)=>{function a(){return Promise.resolve()}function n(){return new Promise(window.requestAnimationFrame)}async function i(e,t){let r,a=new Promise(t=>{r=self.setTimeout(t,e)});if(!t)return a;try{var n;await Promise.race([a,(n=t,new Promise((e,t)=>{let r=Error(“aborted”);r.name=”AbortError”,n.aborted?t(r):n.addEventListener(“abort”,()=>t(r))}))])}catch(e){throw self.clearTimeout(r),e}}function s(e){let t=[];return function(r){t.push(r),1===t.length&&queueMicrotask(()=>{let r=t.slice(0);t.length=0,e(r)})}}r.d(t,{G$:()=>n,k2:()=>a,rK:()=>s,uk:()=>i})},73056:(e,t,r)=>{r.d(t,{$:()=>s});var a=r(10204),n=r(33303);let i=new WeakMap;function s(e,t,r){let s;if(!e)throw Error(“Not connected to alive”);if(!t)throw Error(“No channel name”);let o=a.KK.parse(t);if(!o)throw Error(“Invalid channel name”);let c={subscriber:{dispatchEvent:e=>{e instanceof CustomEvent&&r(e.detail.data)}},topic:o},l=((s=i.get(e))||(s={subscribe:(0,n.rK)(t=>e.subscribe(t.flat())),unsubscribeAll:(0,n.rK)(t=>e.unsubscribeAll(…t))},i.set(e,s)),s);return l.subscribe([c]),{unsubscribe:()=>l.unsubscribeAll(c.subscriber)}}},75552:(e,t,r)=>{r.d(t,{X:()=>c,Z:()=>i});var a=r(69599),n=r(37285);let i={EXCLUDE_FROM_CACHE_KEY:”exclude_from_cache_key”},s={};function o(e,t,r,a,n){let i={…a,…Object.fromEntries(Object.entries(r).filter(([,e])=>void 0!==e))},s=Object.keys(i).sort(),o={};for(let e of s){if(n&&n.includes(e))continue;let t=i[e];null!=t&&(o[e]=t)}return`${e}-${t}#${JSON.stringify(o)}`}function c({storage:e,prefix:t,maxAgeMs:r,sendAnalyticsEvent:c}){let h=(0,a.G7)(“issues_react_extended_preheat_analytics”);async function p(r,a,n,c,u){if(!e)return;let d=o(t,a,n,u,c?.[i.EXCLUDE_FROM_CACHE_KEY]);try{let t=await e.getItem(d,l(c));if(t&&t.queryHash!==r)return s;return t?.state.data}catch{return}}async function f(t){if(e)try{await e.removeItem(t)}catch{console.warn(`Failed to evict query for key: ${t}`)}}async function _(r,a,n,s,c,u,d,h){if(!e)return;let p=o(t,a,n,d,u?.[i.EXCLUDE_FROM_CACHE_KEY]);try{await e.setItem(p,{queryHash:r,queryKey:Object.entries(n).flat(),state:{data:s,dataUpdatedAt:Date.now(),ttl:c,preheatSource:h}},void 0,void 0,l(u))}catch{console.warn(`Failed to persist query for key: ${p}`)}}return{persisterFn:async function(a,l,w,m,g,E,b,y){var v,S,A,C,I,R,k;let N,T=await p(l,w,m,b,y),O=o(t,w,m,y,b?.[i.EXCLUDE_FROM_CACHE_KEY]),P=void 0!==T&&T!==s,D=b?.preheat_source,M=!!D,L=!!b?.skip_cache,$=null,U=null;if(P&&(“object”==typeof T&&null!==T&&”data”in T&&($=JSON.stringify(T.data)),(0,n.Av)({__trace:{query_name:b?.query_name,query_id:l,query_variables:m,duration_ms:1,cache_result:”hit”}}),M||L||g.next(T)),M&&P){h&&D&&c(“offline_cache.preheat_noop”,O,{preheatSource:D});return}try{N=await a(P)}catch(e){if(P)return d([{message:e instanceof Error?e.message:”Unknown error”}]),T;throw e}P&&u(N)&&d(N.errors);let q=(v=N,!!(S=T)&&(S===s||!!v&&u(v))),x=!(!(A=N)||”object”==typeof A&&”errors”in A&&Array.isArray(A.errors)&&A.errors.length>0);if(e&&q)f(O);else if(x&&e){“object”==typeof N&&null!==N&&”data”in N&&(U=JSON.stringify(N.data));let e=(C=!!T,I=$,R=U,k=M,L?”force_refresh”:C?I!==R?”changed”:”unchanged”:k?”pre_heated”:”new”);_(l,w,m,N,E??r,{…b,update_type:e},y,D)}return N},retrieveQuery:p,tryCacheFetchResult:_}}function l(e){if(!e)return;let t={};for(let[r,a]of Object.entries(e))Object.values(i).includes(r)||(t[r]=a);return t}function u(e){return”object”==typeof e&&null!==e&&”errors”in e&&Array.isArray(e.errors)&&e.errors.length>0}function d(e){“undefined”!=typeof window&&window.dispatchEvent(new CustomEvent(“stale-cache-warning”,{detail:{errors:e}}))}},86185:(e,t,r)=>{r.d(t,{z:()=>p});var a=r(35750),n=r(18150),i=r(87057),s=r(69599),o=r(82075);let c=”VERSION_MISMATCH_LAST_TRIGGERED”,l=(0,o.A)(“localStorage”,{ttl:9e7,throwQuotaErrorsOnSet:!1}),u=null;let VersionMismatchRateLimiter=class VersionMismatchRateLimiter{canTrigger(){let e=this.getLastTriggerTime();return null===e||Date.now()-e>=864e5}recordTrigger(){let e=Date.now();l.setItem(c,e.toString()),u=e}getLastTriggerTime(){let e=l.getItem(c);if(e){let t=parseInt(e,10);return isNaN(t)?null:t}return u}clearTriggerRecord(){l.removeItem(c),u=null}};let d=new VersionMismatchRateLimiter;var h=new WeakMap;let p=new class VersionMismatchDetector{registerApp(e,t){(0,a._)(this,h).set(e,t)}unregisterApp(e){(0,a._)(this,h).delete(e)}checkResponse(e,t){if(“true”!==e.headers.get(“X-GitHub-Version-Mismatch”)||!(0,s.G7)(“react_version_mismatch_detection”)||!d.canTrigger())return!1;let r={clientVersion:(0,i.O)(),serverVersion:e.headers.get(“X-GitHub-Server-Version”)||void 0,requestUrl:e.url,responseHeaders:e.headers,appName:t};if(d.recordTrigger(),t){let e=(0,a._)(this,h).get(t);if(e)return e.onMismatchDetected(r),!0}else{let e=!1;for(let[t,n]of(0,a._)(this,h).entries()){let a={…r,appName:t};n.onMismatchDetected(a),e=!0}return e}return!1}constructor(){(0,n._)(this,h,{writable:!0,value:new Map})}}},87683:(e,t,r)=>{r.d(t,{L7:()=>c,VC:()=>l,Zf:()=>a.Zf,Zm:()=>i.Z});var a=r(96698),n=r(21067),i=r(75552);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=6048e5,c=”1.0.6″,l=({sendAnalyticsEvent:e,reportableEvents:t=a.Zf.ANY,maxAgeMs:r=o})=>{let c=(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.X)({storage:c,prefix:`relay-query-${(0,n.cj)()}`,maxAgeMs:r,sendAnalyticsEvent:e})}},96698:(e,t,r)=>{r.d(t,{Zf:()=>o,mW:()=>h,i5:()=>d});var a=r(77783),n=r(21067);let i=async(e,t)=>{if(t&&”undefined”!=typeof navigator&&navigator.storage?.estimate)try{let r=await navigator.storage.estimate(),a=r.quota??0,n=r.usage??0;t(“offline_cache.storage_space”,e,{quota_bytes:a,usage_bytes:n,available_bytes:a-n,usage_percent:a>0?n/a*100:0})}catch{}};var s=r(69599);let o={CACHE_HIT:”offline_cache.cache_hit”,CACHE_MISS:”offline_cache.cache_miss”,CACHE_EVICT:”offline_cache.cache_evict”,CACHE_INVALID:”offline_cache.stale_structure”,CACHE_EXPIRED:”offline_cache.expired_item”,CACHE_SET:”offline_cache.cache_set”,CLEANUP_STARTED:”offline_cache.cleanup_started”,CLEANUP_COMPLETED:”offline_cache.cleanup_completed”,CLEANUP_ERROR:”offline_cache.cleanup_error”,CLEANUP_ITEM_ERROR:”offline_cache.cleanup_item_error”,ENTRIES_READ:”offline_cache.entries_read”,ANY:”offline_cache.*”,NONE:”offline_cache.none”},c=”offline_cache::”,l=()=>c+(0,n.cj)(),u=new Map;function d({validator:e,sendAnalyticsEvent:t,storeName:r=”queries”}){let n=`${l()}:${r}`,c=u.get(n);if(c)return c;function d(e){return!!(e.state.dataUpdatedAt&&e.state.ttl&&Date.now()-e.state.dataUpdatedAt>e.state.ttl)||void 0!==e.state.cacheVersion&&1!==e.state.cacheVersion}let h=(0,a.y$)(l(),r);function p(){return(0,s.G7)(“disable-indexdb-operations”)}async function f(){if(_.isCleanupRunning)return;_.isCleanupRunning=!0;let e=Date.now();try{t(o.CLEANUP_STARTED,””,{});let r=await (0,a.jO)(h),n=r.length,i=0;for(let[e,n]of r)try{d(n)&&(t(o.CACHE_EVICT,e.toString(),{reason:”periodic_cleanup”}),(0,a.yH)(e,h).catch(r=>{t(o.CLEANUP_ITEM_ERROR,e.toString(),{error:String(r)})}),i++)}catch(r){t(o.CLEANUP_ITEM_ERROR,e.toString(),{error:String(r)})}t(o.CLEANUP_COMPLETED,””,{removed_count:i,total_entries:n,duration_ms:Date.now()-e})}catch(e){t(o.CLEANUP_ERROR,””,{error:String(e)})}finally{_.isCleanupRunning=!1}}let _={cleanupIntervalId:void 0,isCleanupRunning:!1,async getItem(r,n){if(!p())try{let i=await (0,a.Jt)(r,h);if(!i?.state?.data)return void t(o.CACHE_MISS,r.toString(),n);if(d(i)){this.removeItem(r),t?.(“offline_cache.expired_item”,r.toString(),n);return}if(!e.Check(i.state.data))return void t(o.CACHE_INVALID,r.toString(),n);let s=i.state.dataUpdatedAt?Date.now()-i.state.dataUpdatedAt:”N/A”,c=i.state.ttl??”N/A”;return t(o.CACHE_HIT,r.toString(),{…n,age:s,ttl:c,preheat_source:i.state.preheatSource}),i}catch(e){throw e}},setItem(e,r,n,s,c){if(p())return Promise.resolve();let l=s??r.state.ttl,u={…r,state:{…r.state,dataUpdatedAt:n??r.state.dataUpdatedAt,ttl:l,cacheVersion:1}};return i(e,t),t(o.CACHE_SET,e.toString(),{…c,ttl:l}),(0,a.hZ)(e,u,h)},removeItem:(e,r)=>(t(o.CACHE_EVICT,e.toString(),r),(0,a.yH)(e,h)),isBustedOrExpired:e=>d(e),async entries(){let e=Date.now(),r=await (0,a.jO)(h),n=Date.now()-e;return t(o.ENTRIES_READ,””,{duration_ms:n,entry_count:r.length}),r},cleanupExpiredEntries:f,stopPeriodicCleanup:function(){void 0!==_.cleanupIntervalId&&(clearInterval(_.cleanupIntervalId),_.cleanupIntervalId=void 0)}};return u.set(n,_),(0,s.G7)(“indexdb-offline-cache-periodic-cleanup”)&&function(e=36e5){let t;”undefined”!=typeof window&&(“function”==typeof(t=window).requestIdleCallback?t.requestIdleCallback(()=>void f(),{timeout:1e4}):setTimeout(()=>void f(),1e4),_.cleanupIntervalId=window.setInterval(()=>void f(),e))}(),_}async function h(){try{let e=await window?.indexedDB?.databases?.();if(!e)return;let t=e.filter(e=>e.name?.startsWith(c)).map(async e=>{if(e.name)try{let t=indexedDB.open(e.name),r=await new Promise((e,r)=>{t.onsuccess=()=>e(t.result),t.onerror=()=>r(t.error)}),n=Array.from(r.objectStoreNames);r.close();let i=n.map(async t=>{if(e.name)try{let r=(0,a.y$)(e.name,t);await (0,a.IU)(r)}catch{}});await Promise.all(i)}catch{}});await Promise.allSettled(t)}catch{}}}}]);
//# sourceMappingURL=30721-fbfb309f1072.js.map