티스토리 수익 글 보기
performance.mark(“js-parse-end:codespaces-537f0cab71a172c9.js”);
“use strict”;(globalThis.webpackChunk_github_ui_github_ui=globalThis.webpackChunk_github_ui_github_ui||[]).push([[“77738”],{13394(e,t,o){o(22686);var n=o(31635),r=o(94571),a=o(85498),i=o(85397),s=o(21744),l=o(69185),c=o(5045);function d(e){for(let t of e.querySelectorAll(“.js-toggle-hidden”))t.hidden=!t.hidden}async function u(){let e=document.querySelector(“.js-codespaces-details-container”);e&&(e.open=!1);let t=document.querySelector(“new-codespace”);if(t&&!t.getAttribute(“data-no-submit-on-create”))try{let e=await fetch(“/codespaces/new”);if(e&&e.ok){let o=(0,l.B)(document,await e.text());t.replaceWith(o)}}catch{}}async function p(e,t){let o=document.querySelector(`#${e}`),n=await (0,i.r)({content:o.content.cloneNode(!0),dialogClass:”project-dialog”});return t&&t.setAttribute(“aria-expanded”,”true”),n.addEventListener(“dialog:remove”,function(){t&&d(t)},{once:!0}),n}async function h(e){let t=await fetch(e.action,{method:e.method,body:new FormData(e),headers:{Accept:”application/json”,…(0,c.kt)()}});if(t.ok){let o=await t.json();o.codespace_url?(window.location.href=o.codespace_url,d(e),u(),m()):(e.closest(“get-repo”)||e.closest(“new-codespace”)?(e.setAttribute(“data-src”,o.loading_url),e.dispatchEvent(new CustomEvent(“pollvscode”))):e.closest(“create-button”)&&(e.setAttribute(“data-src”,o.loading_url),e.dispatchEvent(new CustomEvent(“prpollvscode”))),d(e))}else if(422===t.status){let o=await t.json();if(“concurrency_limit_error”===o.error_type)await p(“concurrency-error”,e);else{let t=document.querySelector(“template.js-flash-template”),n=o.error;t.after(new a.TemplateInstance(t,{className:”flash-error”,message:n})),d(e)}}}async function m(){let e=document.querySelector(“.js-codespaces-completable”),t=e&&e.getAttribute(“data-src”);if(!t)return;let o=await fetch(t,{method:”GET”,headers:{Accept:”text/fragment+html”,…(0,c.kt)()}});if(o.ok){let t=(0,l.B)(document,await o.text());e.replaceWith(t)}else throw Error(`Unexpected response: ${o.statusText}`)}(0,s.on)(“submit”,”.js-toggle-hidden-codespace-form”,function(e){d(e.currentTarget)}),(0,s.on)(“submit”,”.js-create-codespaces-form-command”,function(e){let t=e.currentTarget;t.classList.contains(“js-open-in-vscode-form”)||(u(),d(t))}),(0,s.on)(“submit”,”form.js-open-in-vscode-form”,async function(e){e.preventDefault();let t=e.currentTarget;await h(t)});class f extends HTMLElement{async connectedCallback(){p(“concurrency-error”)}}f=(0,n.Cg)([(0,r.p_)(“concurrency-limit”)],f);var g=o(46131),b=o(79275),v=o(56341);class y extends HTMLElement{secrets_hash=new Map;#e;async connectedCallback(){let e=new URLSearchParams(new URL(document.location.href,window.location.origin).search);e.has(“response_error”)&&(e.delete(“response_error”),(0,v.MM)(e));let{signal:t}=this.#e=new AbortController;this.addEventListener(“itemActivated”,this,{signal:t})}disconnectedCallback(){this.#e.abort()}handleEvent(e){if(“itemActivated”===e.type&&e.target===this.repositorySelectPanel&&this.advancedOptionsForm&&this.repoInput){let t=e.detail.item,o=t.querySelector(“[data-value]”)?.getAttribute(“data-value”);o&&(this.repoInput.value=o),(0,g.k_)(this.advancedOptionsForm)}}toggleLoadingVscode(){let e=this.loadingVscode.hidden,t=this.children;for(let o=0;osetTimeout(e,t)),this.poll(e,1.5*t)):o}}(0,n.Cg)([r.aC],C.prototype,”form”,void 0),(0,n.Cg)([r.aC],C.prototype,”loadingIndicator”,void 0),(0,n.Cg)([r.aC],C.prototype,”viewBranchLink”,void 0),C=(0,n.Cg)([(0,r.p_)(“export-branch”)],C),o(39784),o(3713);class w extends HTMLElement{connectedCallback(){this.toggleLocationConfigs(“production”)}updateVscsTargets(){for(let e of(this.vscsTargetUrl.disabled=”local”!==this.vscsTarget.value,this.toggleLocationConfigs(this.vscsTarget.value),this.vscsTargets))e.value=this.vscsTarget.value}updateVscsTargetUrls(){for(let e of this.vscsTargetUrls)e.value=this.vscsTargetUrl.value}updateLocations(e){let t=e.currentTarget;this.setLocationValues(t.value)}setLocationValues(e){for(let t of this.locations)t.value=e}toggleLocationConfigs(e){for(let t of this.locationConfigs)if(t.getAttribute(“data-vscs-target”)===e){t.hidden=!1;let e=t.querySelector(“option”);e&&(e.selected=!0,this.setLocationValues(e.value))}else t.hidden=!0}}(0,n.Cg)([r.aC],w.prototype,”regionConfig”,void 0),(0,n.Cg)([r.aC],w.prototype,”vscsTarget”,void 0),(0,n.Cg)([r.aC],w.prototype,”vscsTargetUrl”,void 0),(0,n.Cg)([r.zV],w.prototype,”locationConfigs”,void 0),(0,n.Cg)([r.zV],w.prototype,”vscsTargets”,void 0),(0,n.Cg)([r.zV],w.prototype,”vscsTargetUrls”,void 0),(0,n.Cg)([r.zV],w.prototype,”locations”,void 0),(0,n.Cg)([(0,r.p_)(“codespace-zero-config”)],w)},79275(e,t,o){o.d(t,{D4:()=>i,lF:()=>s,w:()=>a});var n=o(85498),r=o(21744);async function a(e,t){return(await o.e(“49408”).then(o.bind(o,32291))).encrypt(e,t)}function i(e){let t=atob(e).split(“”).map(e=>e.charCodeAt(0));return Uint8Array.from(t)}function s(e){let t=””;for(let o of e)t+=String.fromCharCode(o);return btoa(t)}function l(e){return async function(t){let o=t.currentTarget;if(t.defaultPrevented||!o.checkValidity())return;let r=i(o.getAttribute(“data-public-key”));for(let i of(t.preventDefault(),o.elements))if(i.id.endsWith(“secret”)){if(i.disabled=!0,i.required&&!i.value){let e=`${i.name} is invalid!`,t=document.querySelector(“template.js-flash-template”);t.after(new n.TemplateInstance(t,{className:”flash-error”,message:e}));return}let t=`${i.name}_encrypted_value`;if(!i.value){o.elements.namedItem(t).disabled=e;continue}o.elements.namedItem(t).value=s(await a(r,i.value))}o.submit()}}(0,r.on)(“submit”,”form.js-encrypt-submit”,async function(e){let t=e.currentTarget;if(e.defaultPrevented||!t.checkValidity())return;let o=t.elements.namedItem(“secret_value”);if(o.disabled=!0,!o.value)return;e.preventDefault();let n=i(t.getAttribute(“data-public-key”));t.elements.namedItem(“encrypted_value”).value=s(await a(n,o.value)),t.submit()}),(0,r.on)(“submit”,”form.js-encrypt-bulk-submit”,l(!0)),(0,r.on)(“submit”,”form.js-encrypt-bulk-submit-enable-empty”,l(!1))},22686(e,t,o){o.d(t,{f:()=>c});var n=o(21403),r=o(21744),a=o(40893),i=o(46131),s=o(56341),l=o(49481);function c(e,t){let o=t.querySelector(“*”),n=e.ownerDocument.activeElement,r=null;if(n instanceof HTMLElement&&o instanceof Element){let e=function(e){let t=e.tagName.toLowerCase();if(e.hasAttribute(“id”)){let o=e.id,n=o.match(/^(.+)-\d+$/),r=o.match(/^(.+)-[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}(-.*)?$/);if(n){let e=n[1];return`${t}[id^=”${e}”]`}if(r){let e=r[1],o=r[2]||””;return o?`${t}[id^=”${e}”][id$=”${o}”]`:`${t}[id^=”${e}”]`}return`${t}#${CSS.escape(o)}`}let o=e.hasAttribute(“class”)?`.${e.className.split(” “).map(CSS.escape).join(“.”)}`:””;return`${t}${o}`}(n),t=Array.from(o.querySelectorAll(e));if(1===t.length)r=t[0]??null;else if(t.length>1){let e=n.getAttribute(“aria-describedby”);if(e){let o=e.split(/\s+/).filter(Boolean);for(let e of t){let t=e.getAttribute(“aria-describedby”);if(!t)continue;let n=t.split(/\s+/).filter(Boolean);if(o.some(e=>n.includes(e))){r=e;break}}r||(r=t[0]??null)}else r=t[0]??null}}if(e.replaceWith(t),r instanceof HTMLElement&&(r.focus(),r.getAttribute(“aria-describedby”)?.includes(“codespaces-repository-select-label”))){let e=document.getElementById(“codespaces-create-notice-text”);e&&(0,l.C)(e)}}function d(){let e=new URLSearchParams(new URL(document.location.href,window.location.origin).search);e.set(“response_error”,”true”),window.location.replace(`${window.location.pathname}?${e.toString()}`)}(0,r.on)(“remote-input-error”,”#js-codespaces-repository-select”,()=>{document.querySelector(“#js-codespaces-unable-load-repositories-warning”).hidden=!1}),(0,a.JW)(“.js-new-codespace-form”,async function(e,t){let o=e.closest(“[data-replace-remote-form-target]”),n=o.querySelector(“.js-new-codespace-submit-button”);n instanceof HTMLInputElement&&(n.disabled=!0),e.classList.remove(“is-error”),e.classList.add(“is-loading”);try{n&&n.setAttribute(“disabled”,”true”);let e=await t.html();if(200!==e.status&&d(),c(o,e.html),”true”===o.getAttribute(“data-allow-update-url”)){var r=new FormData(document.querySelector(“form.js-new-codespace-form”));let e=new URLSearchParams(new URL(document.location.href,window.location.origin).search),t=[“vscs_target”];for(let[o,n]of r.entries()){if(t.includes(o)||!n){e.delete(o);continue}e.set(o,n)}(0,s.MM)(e)}}catch(e){throw console.error(“Error submitting new codespace form:”,e),d(),e}});let u=null;function p(e){u=e,null!==e&&document.querySelector(“.js-codespace-loading-steps”).setAttribute(“data-current-state”,u)}(0,n.lB)(“.js-codespace-loading-steps”,{constructor:HTMLElement,add:e=>{let t=e.getAttribute(“data-current-state”);t&&p(t)}}),(0,n.lB)(“.js-codespace-advance-state”,{constructor:HTMLElement,add:e=>{let t=e.getAttribute(“data-state”);t&&p(t)}}),(0,n.lB)(“.js-auto-submit-form”,{constructor:HTMLFormElement,initialize:i.k_}),(0,n.lB)(“.js-workbench-form-container”,{constructor:HTMLElement,add:()=>{let e=document.querySelector(“.js-workbench-form-container form”);(0,i.k_)(e)}})},39784(e,t,o){var n=o(31635),r=o(94571);class a extends HTMLElement{connectedCallback(){this.control&&(this.storedInput=Array(this.control.children.length).fill(“”)),this.addEventListener(“input”,this.relayInput.bind(this)),this.addEventListener(“keydown”,this.relayKeydown.bind(this));let e=this.closest(“details”);e&&e.addEventListener(“toggle”,()=>{e.open&&this.source.focus()})}relayKeydown(e){if((this.isControlTab(e.target)||e.target===this.source)&&(“ArrowDown”===e.key||”Tab”===e.key))e.preventDefault(),e.stopPropagation(),this.routeCustomEvent(new CustomEvent(“focus-list”));else if(“Escape”===e.key){let e=this.closest(“details”);e&&e.removeAttribute(“open”)}}isControlTab(e){return!!e&&!!this.control&&Array.from(this.control.children).includes(e)}relayInput(e){if(!e.target)return;let t=e.target.value;this.routeCustomEvent(new CustomEvent(“input-entered”,{detail:t}))}routeCustomEvent(e){this.sinks[this.selectedIndex].dispatchEvent(e)}get selectedIndex(){if(!this.control)return 0;let e=this.control.querySelector(‘[aria-selected=”true”]’);return e?Array.from(this.control.children).indexOf(e):0}storeInput(){this.storedInput[this.selectedIndex]=this.source.value}updateInput(e){this.source.value=this.storedInput[this.selectedIndex];let t=e.detail.relatedTarget.getAttribute(“data-filter-placeholder”);this.source.placeholder=t,this.source.setAttribute(“aria-label”,t),this.notifySelected()}notifySelected(){let e=this.sinks[this.selectedIndex],t=new CustomEvent(“tab-selected”);e.dispatchEvent(t)}}(0,n.Cg)([r.aC],a.prototype,”source”,void 0),(0,n.Cg)([r.zV],a.prototype,”sinks”,void 0),(0,n.Cg)([r.aC],a.prototype,”control”,void 0),(0,n.Cg)([(0,r.p_)(“input-demux”)],a)},49481(e,t,o){o.d(t,{C:()=>i,i:()=>s});var n=o(26316),r=o(73537),a=o(46493);function i(e,t){(0,r.G7)(“arianotify_comprehensive_migration”)?s(l(e),{…t,element:t?.element??e}):(0,r.G7)(“primer_live_region_element”)&&t?.element===void 0?(0,a.Cj)(e,{politeness:t?.assertive?”assertive”:”polite”}):s(l(e),t)}function s(e,t){let{assertive:o,element:i}=t??{};if((0,r.G7)(“arianotify_comprehensive_migration”))try{(i?.isConnected?i:n.XC).ariaNotify(e,{priority:o?”high”:”normal”})}catch(e){console.error(“Error calling ariaNotify:”,e)}else{var s,l;let t;(0,r.G7)(“primer_live_region_element”)&&void 0===i?(0,a.iP)(e,{politeness:o?”assertive”:”polite”}):(s=e,l=o,(t=i??n.XC?.querySelector(l?”#js-global-screen-reader-notice-assertive”:”#js-global-screen-reader-notice”))&&(t.textContent===s?t.textContent=`${s}\u00A0`:t.textContent=s))}}function l(e){return(e.getAttribute(“aria-label”)||e.innerText||””).trim()}o(89272)},34619(e,t,o){o.d(t,{O:()=>i,S:()=>a});var n=o(26316);let r=n.cg?.document?.head?.querySelector(‘meta[name=”release”]’)?.content||””,a=”X-GitHub-Client-Version”;function i(){return r}},85397(e,t,o){o.d(t,{r:()=>r});var n=o(21744);async function r(e){let t=document.querySelector(“#site-details-dialog”).content.cloneNode(!0),o=t.querySelector(“details”),r=o.querySelector(“details-dialog”),a=o.querySelector(“.js-details-dialog-spinner”);e.detailsClass&&o.classList.add(…e.detailsClass.split(” “)),e.dialogClass&&r.classList.add(…e.dialogClass.split(” “)),e.label?r.setAttribute(“aria-label”,e.label):e.labelledBy&&r.setAttribute(“aria-labelledby”,e.labelledBy),document.body.append(t);try{let t=await e.content;a.remove(),r.prepend(t)}catch{a.remove();let t=document.createElement(“span”);t.textContent=e.errorMessage||”Couldn’t load the content”,t.classList.add(“tmp-my-6”),t.classList.add(“tmp-mx-4”),r.prepend(t)}return o.addEventListener(“toggle”,()=>{o.hasAttribute(“open”)||((0,n.h)(r,”dialog:remove”),o.remove())}),r}},5045(e,t,o){o.d(t,{jC:()=>s,kt:()=>a,tV:()=>i});var n=o(34619),r=o(381);function a(e){let t={“X-Requested-With”:”XMLHttpRequest”,…(0,r.wE)(e)};return{…t,[n.S]:(0,n.O)()}}function i(e,t){for(let[o,n]of Object.entries(a(t)))e.set(o,n)}function s(e){return{“X-GitHub-App-Type”:e}}},381(e,t,o){o.d(t,{$r:()=>i,M1:()=>s,li:()=>r,pS:()=>c,wE:()=>l});var n=o(26316);let r=”X-Fetch-Nonce”,a=new Set;function i(e){a.add(e)}function s(){return a.values().next().value||””}function l(e){let t={};return void 0!==e&&(t[“X-Fetch-Nonce-To-Validate”]=e),void 0===e?t[r]=s():a.has(e)?t[r]=e:t[r]=Array.from(a).join(“,”),t}function c(){let e=n.XC?.head?.querySelector(‘meta[name=”fetch-nonce”]’)?.content||””;e&&i(e)}},46131(e,t,o){o.d(t,{Cy:()=>s,K3:()=>d,Z8:()=>l,k_:()=>a,lK:()=>u,m$:()=>i});var n=o(84592);function r(e,t,o){return e.dispatchEvent(new CustomEvent(t,{bubbles:!0,cancelable:o}))}function a(e,t){t&&(function(e,t){if(!(e instanceof HTMLFormElement))throw TypeError(“The specified element is not of type HTMLFormElement.”);if(!(t instanceof HTMLElement))throw TypeError(“The specified element is not of type HTMLElement.”);if(“submit”!==t.type)throw TypeError(“The specified element is not a submit button.”);if(!e||e!==t.form)throw Error(“The specified element is not owned by the form element.”)}(e,t),(0,n.A)(t)),r(e,”submit”,!0)&&e.submit()}function i(e,t){if(“boolean”==typeof t)if(e instanceof HTMLInputElement)e.checked=t;else throw TypeError(“only checkboxes can be set to boolean value”);else if(“checkbox”===e.type)throw TypeError(“checkbox can’t be set to string value”);else e.value=t;r(e,”change”,!1)}function s(e,t){for(let o in t){let n=t[o],r=e.elements.namedItem(o);r instanceof HTMLInputElement?r.value=n:r instanceof HTMLTextAreaElement&&(r.value=n)}}function l(e){if(!(e instanceof HTMLElement))return!1;let t=e.nodeName.toLowerCase(),o=(e.getAttribute(“type”)||””).toLowerCase();return”select”===t||”textarea”===t||”input”===t&&”submit”!==o&&”reset”!==o||e.isContentEditable}function c(e){return new URLSearchParams(e)}function d(e,t){let o=new URLSearchParams(e.search);for(let[e,n]of c(t))o.append(e,n);return o.toString()}function u(e){return c(new FormData(e)).toString()}},84592(e,t,o){function n(e){let t=e.closest(“form”);if(!(t instanceof HTMLFormElement))return;let o=r(t);if(e.name){let n=e.matches(“input[type=submit]”)?”Submit”:””,r=e.value||n;o||((o=document.createElement(“input”)).type=”hidden”,o.classList.add(“js-submit-button-value”),t.prepend(o)),o.name=e.name,o.value=r}else o&&o.remove()}function r(e){let t=e.querySelector(“input.js-submit-button-value”);return t instanceof HTMLInputElement?t:null}o.d(t,{A:()=>n,C:()=>r})},56341(e,t,o){o.d(t,{C3:()=>l,JV:()=>a,K3:()=>p,MM:()=>c,OE:()=>h,Qb:()=>m,Zu:()=>u,bj:()=>i,jc:()=>d,kd:()=>s});var n=o(26316);let r=null;function a(){return n.Kn?.state||{}}function i(e){f(a(),””,e)}function s(e){n.Kn?.pushState({appId:a().appId},””,e),g()}function l(e){let t={…a(),…e};r&&(r=t),f(t,””,location.href)}function c(e){i(`?${e.toString()}${n.fV.hash}`)}function d(){i(n.fV.pathname+n.fV.hash)}function u(e){i(e.startsWith(“#”)?e:`#${e}`),(r=a())&&requestIdleCallback(()=>{!history.state&&r&&(l(r),r=null)})}function p(){i(n.fV.pathname+n.fV.search)}function h(){n.Kn?.back()}function m(){n.Kn?.forward()}function f(e,t,o){n.Kn?.replaceState(e,t,o),g()}function g(){n.cg?.dispatchEvent(new CustomEvent(“statechange”,{bubbles:!1,cancelable:!1}))}},69185(e,t,o){o.d(t,{B:()=>n});function n(e,t){let o=e.createElement(“template”);return o.innerHTML=t,e.importNode(o.content,!0)}},40893(e,t,o){o.d(t,{Ax:()=>r.Ax,JW:()=>a,ZV:()=>r.ZV});var n=o(5045),r=o(13937);function a(e,t){(0,r.JW)(e,async(e,o,r)=>((0,n.tV)(r.headers),t(e,o,r)))}}},function(e){e.O(0,[“13726″,”19930″,”26093″,”2887″,”32225″,”34646″,”7053″,”96232”],function(){return e(e.s=13394)}),e.O()}]);
//# sourceMappingURL=codespaces-537f0cab71a172c9-782a99cfb790e0dc.js.map