UNPKG

@cloudsnorkel/cdk-github-runners

Version:

CDK construct to create GitHub Actions self-hosted runners. Creates ephemeral runners on demand. Easy to deploy and highly customizable.

25 lines 170 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>Setup GitHub Runners</title> <script type="module" crossorigin>(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const a of s.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&n(a)}).observe(document,{childList:!0,subtree:!0});function r(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function n(i){if(i.ep)return;i.ep=!0;const s=r(i);fetch(i.href,s)}})();const Tt=!1;var wn=Array.isArray,En=Array.prototype.indexOf,kn=Array.from,xn=Object.defineProperty,Ke=Object.getOwnPropertyDescriptor,mr=Object.getOwnPropertyDescriptors,Sn=Object.prototype,An=Array.prototype,Dt=Object.getPrototypeOf,rr=Object.isExtensible;function Tn(e){return e()}function Rt(e){for(var t=0;t<e.length;t++)e[t]()}function br(){var e,t,r=new Promise((n,i)=>{e=n,t=i});return{promise:r,resolve:e,reject:t}}const O=2,yr=4,dt=8,Rn=1<<24,de=16,he=32,Oe=64,ht=128,Z=512,C=1024,z=2048,se=4096,ie=8192,_e=16384,Lt=32768,Le=65536,nr=1<<17,wr=1<<18,ze=1<<19,Er=1<<20,Re=32768,Nt=1<<21,Mt=1<<22,ge=1<<23,Se=Symbol("$state"),Nn=Symbol(""),De=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"};function On(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Pn(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function In(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Cn(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Dn(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Ln(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Mn(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Fn(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Hn(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const zn=1,Gn=2,I=Symbol(),jn="http://www.w3.org/1999/xhtml";function qn(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function kr(e){return e===this.v}function Un(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function xr(e){return!Un(e,this.v)}let vt=!1,Bn=!1;function Wn(){vt=!0}let N=null;function Me(e){N=e}function Sr(e,t=!1,r){N={p:N,i:!1,c:null,e:null,s:e,x:null,l:vt&&!t?{s:null,u:null,$:[]}:null}}function Ar(e){var t=N,r=t.e;if(r!==null){t.e=null;for(var n of r)Gr(n)}return t.i=!0,N=t.p,{}}function et(){return!vt||N!==null&&N.l===null}let xe=[];function Tr(){var e=xe;xe=[],Rt(e)}function Fe(e){if(xe.length===0&&!Ve){var t=xe;queueMicrotask(()=>{t===xe&&Tr()})}xe.push(e)}function Kn(){for(;xe.length>0;)Tr()}function Rr(e){var t=w;if(t===null)return b.f|=ge,e;if((t.f&Lt)===0){if((t.f&ht)===0)throw e;t.b.error(e)}else He(e,t)}function He(e,t){for(;t!==null;){if((t.f&ht)!==0)try{t.b.error(e);return}catch(r){e=r}t=t.parent}throw e}const st=new Set;let k=null,ot=null,V=null,K=[],pt=null,Ot=!1,Ve=!1;class re{committed=!1;current=new Map;previous=new Map;#e=new Set;#t=new Set;#n=0;#r=0;#l=null;#s=new Set;#i=new Set;skipped_effects=new Set;is_fork=!1;is_deferred(){return this.is_fork||this.#r>0}process(t){K=[],ot=null,this.apply();var r={parent:null,effect:null,effects:[],render_effects:[]};for(const n of t)this.#o(n,r);this.is_fork||this.#u(),this.is_deferred()?(this.#a(r.effects),this.#a(r.render_effects)):(ot=this,k=null,ir(r.render_effects),ir(r.effects),ot=null,this.#l?.resolve()),V=null}#o(t,r){t.f^=C;for(var n=t.first;n!==null;){var i=n.f,s=(i&(he|Oe))!==0,a=s&&(i&C)!==0,l=a||(i&ie)!==0||this.skipped_effects.has(n);if((n.f&ht)!==0&&n.b?.is_pending()&&(r={parent:r,effect:n,effects:[],render_effects:[]}),!l&&n.fn!==null){s?n.f^=C:(i&yr)!==0?r.effects.push(n):rt(n)&&((n.f&de)!==0&&this.#s.add(n),Xe(n));var o=n.first;if(o!==null){n=o;continue}}var f=n.parent;for(n=n.next;n===null&&f!==null;)f===r.effect&&(this.#a(r.effects),this.#a(r.render_effects),r=r.parent),n=f.next,f=f.parent}}#a(t){for(const r of t)(r.f&z)!==0?this.#s.add(r):(r.f&se)!==0&&this.#i.add(r),this.#f(r.deps),D(r,C)}#f(t){if(t!==null)for(const r of t)(r.f&O)===0||(r.f&Re)===0||(r.f^=Re,this.#f(r.deps))}capture(t,r){this.previous.has(t)||this.previous.set(t,r),(t.f&ge)===0&&(this.current.set(t,t.v),V?.set(t,t.v))}activate(){k=this,this.apply()}deactivate(){k===this&&(k=null,V=null)}flush(){if(this.activate(),K.length>0){if(Nr(),k!==null&&k!==this)return}else this.#n===0&&this.process([]);this.deactivate()}discard(){for(const t of this.#t)t(this);this.#t.clear()}#u(){if(this.#r===0){for(const t of this.#e)t();this.#e.clear()}this.#n===0&&this.#c()}#c(){if(st.size>1){this.previous.clear();var t=V,r=!0,n={parent:null,effect:null,effects:[],render_effects:[]};for(const s of st){if(s===this){r=!1;continue}const a=[];for(const[o,f]of this.current){if(s.current.has(o))if(r&&f!==s.current.get(o))s.current.set(o,f);else continue;a.push(o)}if(a.length===0)continue;const l=[...s.current.keys()].filter(o=>!this.current.has(o));if(l.length>0){var i=K;K=[];const o=new Set,f=new Map;for(const h of a)Or(h,l,o,f);if(K.length>0){k=s,s.apply();for(const h of K)s.#o(h,n);s.deactivate()}K=i}}k=null,V=t}this.committed=!0,st.delete(this)}increment(t){this.#n+=1,t&&(this.#r+=1)}decrement(t){this.#n-=1,t&&(this.#r-=1),this.revive()}revive(){for(const t of this.#s)this.#i.delete(t),D(t,z),Ne(t);for(const t of this.#i)D(t,se),Ne(t);this.flush()}oncommit(t){this.#e.add(t)}ondiscard(t){this.#t.add(t)}settled(){return(this.#l??=br()).promise}static ensure(){if(k===null){const t=k=new re;st.add(k),Ve||re.enqueue(()=>{k===t&&t.flush()})}return k}static enqueue(t){Fe(t)}apply(){}}function Vn(e){var t=Ve;Ve=!0;try{for(var r;;){if(Kn(),K.length===0&&(k?.flush(),K.length===0))return pt=null,r;Nr()}}finally{Ve=t}}function Nr(){var e=Ae;Ot=!0;var t=null;try{var r=0;for(ut(!0);K.length>0;){var n=re.ensure();if(r++>1e3){var i,s;Yn()}n.process(K),me.clear()}}finally{Ot=!1,ut(e),pt=null}}function Yn(){try{Dn()}catch(e){He(e,pt)}}let fe=null;function ir(e){var t=e.length;if(t!==0){for(var r=0;r<t;){var n=e[r++];if((n.f&(_e|ie))===0&&rt(n)&&(fe=new Set,Xe(n),n.deps===null&&n.first===null&&n.nodes===null&&(n.teardown===null&&n.ac===null?Br(n):n.fn=null),fe?.size>0)){me.clear();for(const i of fe){if((i.f&(_e|ie))!==0)continue;const s=[i];let a=i.parent;for(;a!==null;)fe.has(a)&&(fe.delete(a),s.push(a)),a=a.parent;for(let l=s.length-1;l>=0;l--){const o=s[l];(o.f&(_e|ie))===0&&Xe(o)}}fe.clear()}}fe=null}}function Or(e,t,r,n){if(!r.has(e)&&(r.add(e),e.reactions!==null))for(const i of e.reactions){const s=i.f;(s&O)!==0?Or(i,t,r,n):(s&(Mt|de))!==0&&(s&z)===0&&Pr(i,t,n)&&(D(i,z),Ne(i))}}function Pr(e,t,r){const n=r.get(e);if(n!==void 0)return n;if(e.deps!==null)for(const i of e.deps){if(t.includes(i))return!0;if((i.f&O)!==0&&Pr(i,t,r))return r.set(i,!0),!0}return r.set(e,!1),!1}function Ne(e){for(var t=pt=e;t.parent!==null;){t=t.parent;var r=t.f;if(Ot&&t===w&&(r&de)!==0&&(r&wr)===0)return;if((r&(Oe|he))!==0){if((r&C)===0)return;t.f^=C}}K.push(t)}function $n(e){let t=0,r=tt(0),n;return()=>{Ze()&&(u(r),mt(()=>(t===0&&(n=nt(()=>e(()=>Ye(r)))),t+=1,()=>{Fe(()=>{t-=1,t===0&&(n?.(),n=void 0,Ye(r))})})))}}var Jn=Le|ze|ht;function Zn(e,t,r){new Qn(e,t,r)}class Qn{parent;#e=!1;#t;#n=null;#r;#l;#s;#i=null;#o=null;#a=null;#f=null;#u=null;#c=0;#d=0;#v=!1;#h=null;#b=$n(()=>(this.#h=tt(this.#c),()=>{this.#h=null}));constructor(t,r,n){this.#t=t,this.#r=r,this.#l=n,this.parent=w.b,this.#e=!!this.#r.pending,this.#s=jr(()=>{w.b=this;{var i=this.#g();try{this.#i=ue(()=>n(i))}catch(s){this.error(s)}this.#d>0?this.#_():this.#e=!1}return()=>{this.#u?.remove()}},Jn)}#y(){try{this.#i=ue(()=>this.#l(this.#t))}catch(t){this.error(t)}this.#e=!1}#w(){const t=this.#r.pending;t&&(this.#o=ue(()=>t(this.#t)),re.enqueue(()=>{var r=this.#g();this.#i=this.#p(()=>(re.ensure(),ue(()=>this.#l(r)))),this.#d>0?this.#_():($e(this.#o,()=>{this.#o=null}),this.#e=!1)}))}#g(){var t=this.#t;return this.#e&&(this.#u=Je(),this.#t.before(this.#u),t=this.#u),t}is_pending(){return this.#e||!!this.parent&&this.parent.is_pending()}has_pending_snippet(){return!!this.#r.pending}#p(t){var r=w,n=b,i=N;oe(this.#s),H(this.#s),Me(this.#s.ctx);try{return t()}catch(s){return Rr(s),null}finally{oe(r),H(n),Me(i)}}#_(){const t=this.#r.pending;this.#i!==null&&(this.#f=document.createDocumentFragment(),this.#f.append(this.#u),Vr(this.#i,this.#f)),this.#o===null&&(this.#o=ue(()=>t(this.#t)))}#m(t){if(!this.has_pending_snippet()){this.parent&&this.parent.#m(t);return}this.#d+=t,this.#d===0&&(this.#e=!1,this.#o&&$e(this.#o,()=>{this.#o=null}),this.#f&&(this.#t.before(this.#f),this.#f=null))}update_pending_count(t){this.#m(t),this.#c+=t,this.#h&&lt(this.#h,this.#c)}get_effect_pending(){return this.#b(),u(this.#h)}error(t){var r=this.#r.onerror;let n=this.#r.failed;if(this.#v||!r&&!n)throw t;this.#i&&(q(this.#i),this.#i=null),this.#o&&(q(this.#o),this.#o=null),this.#a&&(q(this.#a),this.#a=null);var i=!1,s=!1;const a=()=>{if(i){qn();return}i=!0,s&&Hn(),re.ensure(),this.#c=0,this.#a!==null&&$e(this.#a,()=>{this.#a=null}),this.#e=this.has_pending_snippet(),this.#i=this.#p(()=>(this.#v=!1,ue(()=>this.#l(this.#t)))),this.#d>0?this.#_():this.#e=!1};var l=b;try{H(null),s=!0,r?.(t,a),s=!1}catch(o){He(o,this.#s&&this.#s.parent)}finally{H(l)}n&&Fe(()=>{this.#a=this.#p(()=>{re.ensure(),this.#v=!0;try{return ue(()=>{n(this.#t,()=>t,()=>a)})}catch(o){return He(o,this.#s.parent),null}finally{this.#v=!1}})})}}function Xn(e,t,r,n){const i=et()?Ft:ri;if(r.length===0&&e.length===0){n(t.map(i));return}var s=k,a=w,l=ei();function o(){Promise.all(r.map(f=>ti(f))).then(f=>{l();try{n([...t.map(i),...f])}catch(h){(a.f&_e)===0&&He(h,a)}s?.deactivate(),at()}).catch(f=>{He(f,a)})}e.length>0?Promise.all(e).then(()=>{l();try{return o()}finally{s?.deactivate(),at()}}):o()}function ei(){var e=w,t=b,r=N,n=k;return function(s=!0){oe(e),H(t),Me(r),s&&n?.activate()}}function at(){oe(null),H(null),Me(null)}function Ft(e){var t=O|z,r=b!==null&&(b.f&O)!==0?b:null;return w!==null&&(w.f|=ze),{ctx:N,deps:null,effects:null,equals:kr,f:t,fn:e,reactions:null,rv:0,v:I,wv:0,parent:r??w,ac:null}}function ti(e,t){let r=w;r===null&&On();var n=r.b,i=void 0,s=tt(I),a=!b,l=new Map;return di(()=>{var o=br();i=o.promise;try{Promise.resolve(e()).then(o.resolve,o.reject).then(()=>{f===k&&f.committed&&f.deactivate(),at()})}catch(d){o.reject(d),at()}var f=k;if(a){var h=!n.is_pending();n.update_pending_count(1),f.increment(h),l.get(f)?.reject(De),l.delete(f),l.set(f,o)}const c=(d,v=void 0)=>{if(f.activate(),v)v!==De&&(s.f|=ge,lt(s,v));else{(s.f&ge)!==0&&(s.f^=ge),lt(s,d);for(const[x,M]of l){if(l.delete(x),x===f)break;M.reject(De)}}a&&(n.update_pending_count(-1),f.decrement(h))};o.promise.then(c,d=>c(null,d||"unknown"))}),Gt(()=>{for(const o of l.values())o.reject(De)}),new Promise(o=>{function f(h){function c(){h===i?o(s):f(i)}h.then(c,c)}f(i)})}function ri(e){const t=Ft(e);return t.equals=xr,t}function Ir(e){var t=e.effects;if(t!==null){e.effects=null;for(var r=0;r<t.length;r+=1)q(t[r])}}function ni(e){for(var t=e.parent;t!==null;){if((t.f&O)===0)return(t.f&_e)===0?t:null;t=t.parent}return null}function Ht(e){var t,r=w;oe(ni(e));try{e.f&=~Re,Ir(e),t=Zr(e)}finally{oe(r)}return t}function Cr(e){var t=Ht(e);if(e.equals(t)||(k?.is_fork||(e.v=t),e.wv=$r()),!Ge)if(V!==null)(Ze()||k?.is_fork)&&V.set(e,t);else{var r=(e.f&Z)===0?se:C;D(e,r)}}let Pt=new Set;const me=new Map;let Dr=!1;function tt(e,t){var r={f:0,v:e,reactions:null,equals:kr,rv:0,wv:0};return r}function pe(e,t){const r=tt(e);return _i(r),r}function B(e,t=!1,r=!0){const n=tt(e);return t||(n.equals=xr),vt&&r&&N!==null&&N.l!==null&&(N.l.s??=[]).push(n),n}function sr(e,t){return E(e,nt(()=>u(e))),t}function E(e,t,r=!1){b!==null&&(!ne||(b.f&nr)!==0)&&et()&&(b.f&(O|de|Mt|nr))!==0&&!ce?.includes(e)&&Fn();let n=r?Be(t):t;return lt(e,n)}function lt(e,t){if(!e.equals(t)){var r=e.v;Ge?me.set(e,t):me.set(e,r),e.v=t;var n=re.ensure();n.capture(e,r),(e.f&O)!==0&&((e.f&z)!==0&&Ht(e),D(e,(e.f&Z)!==0?C:se)),e.wv=$r(),Lr(e,z),et()&&w!==null&&(w.f&C)!==0&&(w.f&(he|Oe))===0&&(W===null?gi([e]):W.push(e)),!n.is_fork&&Pt.size>0&&!Dr&&ii()}return t}function ii(){Dr=!1;var e=Ae;ut(!0);const t=Array.from(Pt);try{for(const r of t)(r.f&C)!==0&&D(r,se),rt(r)&&Xe(r)}finally{ut(e)}Pt.clear()}function Ye(e){E(e,e.v+1)}function Lr(e,t){var r=e.reactions;if(r!==null)for(var n=et(),i=r.length,s=0;s<i;s++){var a=r[s],l=a.f;if(!(!n&&a===w)){var o=(l&z)===0;if(o&&D(a,t),(l&O)!==0){var f=a;V?.delete(f),(l&Re)===0&&(l&Z&&(a.f|=Re),Lr(f,se))}else o&&((l&de)!==0&&fe!==null&&fe.add(a),Ne(a))}}}function Be(e){if(typeof e!="object"||e===null||Se in e)return e;const t=Dt(e);if(t!==Sn&&t!==An)return e;var r=new Map,n=wn(e),i=pe(0),s=Te,a=l=>{if(Te===s)return l();var o=b,f=Te;H(null),cr(s);var h=l();return H(o),cr(f),h};return n&&r.set("length",pe(e.length)),new Proxy(e,{defineProperty(l,o,f){(!("value"in f)||f.configurable===!1||f.enumerable===!1||f.writable===!1)&&Ln();var h=r.get(o);return h===void 0?h=a(()=>{var c=pe(f.value);return r.set(o,c),c}):E(h,f.value,!0),!0},deleteProperty(l,o){var f=r.get(o);if(f===void 0){if(o in l){const h=a(()=>pe(I));r.set(o,h),Ye(i)}}else E(f,I),Ye(i);return!0},get(l,o,f){if(o===Se)return e;var h=r.get(o),c=o in l;if(h===void 0&&(!c||Ke(l,o)?.writable)&&(h=a(()=>{var v=Be(c?l[o]:I),x=pe(v);return x}),r.set(o,h)),h!==void 0){var d=u(h);return d===I?void 0:d}return Reflect.get(l,o,f)},getOwnPropertyDescriptor(l,o){var f=Reflect.getOwnPropertyDescriptor(l,o);if(f&&"value"in f){var h=r.get(o);h&&(f.value=u(h))}else if(f===void 0){var c=r.get(o),d=c?.v;if(c!==void 0&&d!==I)return{enumerable:!0,configurable:!0,value:d,writable:!0}}return f},has(l,o){if(o===Se)return!0;var f=r.get(o),h=f!==void 0&&f.v!==I||Reflect.has(l,o);if(f!==void 0||w!==null&&(!h||Ke(l,o)?.writable)){f===void 0&&(f=a(()=>{var d=h?Be(l[o]):I,v=pe(d);return v}),r.set(o,f));var c=u(f);if(c===I)return!1}return h},set(l,o,f,h){var c=r.get(o),d=o in l;if(n&&o==="length")for(var v=f;v<c.v;v+=1){var x=r.get(v+"");x!==void 0?E(x,I):v in l&&(x=a(()=>pe(I)),r.set(v+"",x))}if(c===void 0)(!d||Ke(l,o)?.writable)&&(c=a(()=>pe(void 0)),E(c,Be(f)),r.set(o,c));else{d=c.v!==I;var M=a(()=>Be(f));E(c,M)}var U=Reflect.getOwnPropertyDescriptor(l,o);if(U?.set&&U.set.call(h,f),!d){if(n&&typeof o=="string"){var be=r.get("length"),ye=Number(o);Number.isInteger(ye)&&ye>=be.v&&E(be,ye+1)}Ye(i)}return!0},ownKeys(l){u(i);var o=Reflect.ownKeys(l).filter(c=>{var d=r.get(c);return d===void 0||d.v!==I});for(var[f,h]of r)h.v!==I&&!(f in l)&&o.push(f);return o},setPrototypeOf(){Mn()}})}function or(e){try{if(e!==null&&typeof e=="object"&&Se in e)return e[Se]}catch{}return e}function si(e,t){return Object.is(or(e),or(t))}var ar,Mr,Fr,Hr;function oi(){if(ar===void 0){ar=window,Mr=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,r=Text.prototype;Fr=Ke(t,"firstChild").get,Hr=Ke(t,"nextSibling").get,rr(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),rr(r)&&(r.__t=void 0)}}function Je(e=""){return document.createTextNode(e)}function ft(e){return Fr.call(e)}function _t(e){return Hr.call(e)}function g(e,t){return ft(e)}function ee(e,t=!1){{var r=ft(e);return r instanceof Comment&&r.data===""?_t(r):r}}function _(e,t=1,r=!1){let n=e;for(;t--;)n=_t(n);return n}function ai(){return!1}let lr=!1;function li(){lr||(lr=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(const t of e.target.elements)t.__on_r?.()})},{capture:!0}))}function gt(e){var t=b,r=w;H(null),oe(null);try{return e()}finally{H(t),oe(r)}}function zt(e,t,r,n=r){e.addEventListener(t,()=>gt(r));const i=e.__on_r;i?e.__on_r=()=>{i(),n(!0)}:e.__on_r=()=>n(!0),li()}function zr(e){w===null&&(b===null&&Cn(),In()),Ge&&Pn()}function fi(e,t){var r=t.last;r===null?t.last=t.first=e:(r.next=e,e.prev=r,t.last=e)}function ve(e,t,r){var n=w;n!==null&&(n.f&ie)!==0&&(e|=ie);var i={ctx:N,deps:null,nodes:null,f:e|z|Z,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};if(r)try{Xe(i),i.f|=Lt}catch(l){throw q(i),l}else t!==null&&Ne(i);var s=i;if(r&&s.deps===null&&s.teardown===null&&s.nodes===null&&s.first===s.last&&(s.f&ze)===0&&(s=s.first,(e&de)!==0&&(e&Le)!==0&&s!==null&&(s.f|=Le)),s!==null&&(s.parent=n,n!==null&&fi(s,n),b!==null&&(b.f&O)!==0&&(e&Oe)===0)){var a=b;(a.effects??=[]).push(s)}return i}function Ze(){return b!==null&&!ne}function Gt(e){const t=ve(dt,null,!1);return D(t,C),t.teardown=e,t}function fr(e){zr();var t=w.f,r=!b&&(t&he)!==0&&(t&Lt)===0;if(r){var n=N;(n.e??=[]).push(e)}else return Gr(e)}function Gr(e){return ve(yr|Er,e,!1)}function ui(e){return zr(),ve(dt|Er,e,!0)}function ci(e){re.ensure();const t=ve(Oe|ze,e,!0);return(r={})=>new Promise(n=>{r.outro?$e(t,()=>{q(t),n(void 0)}):(q(t),n(void 0))})}function di(e){return ve(Mt|ze,e,!0)}function mt(e,t=0){return ve(dt|t,e,!0)}function Ie(e,t=[],r=[],n=[]){Xn(n,t,r,i=>{ve(dt,()=>e(...i.map(u)),!0)})}function jr(e,t=0){var r=ve(de|t,e,!0);return r}function ue(e){return ve(he|ze,e,!0)}function qr(e){var t=e.teardown;if(t!==null){const r=Ge,n=b;ur(!0),H(null);try{t.call(null)}finally{ur(r),H(n)}}}function Ur(e,t=!1){var r=e.first;for(e.first=e.last=null;r!==null;){const i=r.ac;i!==null&&gt(()=>{i.abort(De)});var n=r.next;(r.f&Oe)!==0?r.parent=null:q(r,t),r=n}}function hi(e){for(var t=e.first;t!==null;){var r=t.next;(t.f&he)===0&&q(t),t=r}}function q(e,t=!0){var r=!1;(t||(e.f&wr)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(vi(e.nodes.start,e.nodes.end),r=!0),Ur(e,t&&!r),ct(e,0),D(e,_e);var n=e.nodes&&e.nodes.t;if(n!==null)for(const s of n)s.stop();qr(e);var i=e.parent;i!==null&&i.first!==null&&Br(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=null}function vi(e,t){for(;e!==null;){var r=e===t?null:_t(e);e.remove(),e=r}}function Br(e){var t=e.parent,r=e.prev,n=e.next;r!==null&&(r.next=n),n!==null&&(n.prev=r),t!==null&&(t.first===e&&(t.first=n),t.last===e&&(t.last=r))}function $e(e,t,r=!0){var n=[];Wr(e,n,!0);var i=()=>{r&&q(e),t&&t()},s=n.length;if(s>0){var a=()=>--s||i();for(var l of n)l.out(a)}else i()}function Wr(e,t,r){if((e.f&ie)===0){e.f^=ie;var n=e.nodes&&e.nodes.t;if(n!==null)for(const l of n)(l.is_global||r)&&t.push(l);for(var i=e.first;i!==null;){var s=i.next,a=(i.f&Le)!==0||(i.f&he)!==0&&(e.f&de)!==0;Wr(i,t,a?r:!1),i=s}}}function pi(e){Kr(e,!0)}function Kr(e,t){if((e.f&ie)!==0){e.f^=ie,(e.f&C)===0&&(D(e,z),Ne(e));for(var r=e.first;r!==null;){var n=r.next,i=(r.f&Le)!==0||(r.f&he)!==0;Kr(r,i?t:!1),r=n}var s=e.nodes&&e.nodes.t;if(s!==null)for(const a of s)(a.is_global||t)&&a.in()}}function Vr(e,t){if(e.nodes)for(var r=e.nodes.start,n=e.nodes.end;r!==null;){var i=r===n?null:_t(r);t.append(r),r=i}}let Ae=!1;function ut(e){Ae=e}let Ge=!1;function ur(e){Ge=e}let b=null,ne=!1;function H(e){b=e}let w=null;function oe(e){w=e}let ce=null;function _i(e){b!==null&&(ce===null?ce=[e]:ce.push(e))}let L=null,j=0,W=null;function gi(e){W=e}let Yr=1,Qe=0,Te=Qe;function cr(e){Te=e}function $r(){return++Yr}function rt(e){var t=e.f;if((t&z)!==0)return!0;if(t&O&&(e.f&=~Re),(t&se)!==0){var r=e.deps;if(r!==null)for(var n=r.length,i=0;i<n;i++){var s=r[i];if(rt(s)&&Cr(s),s.wv>e.wv)return!0}(t&Z)!==0&&V===null&&D(e,C)}return!1}function Jr(e,t,r=!0){var n=e.reactions;if(n!==null&&!ce?.includes(e))for(var i=0;i<n.length;i++){var s=n[i];(s.f&O)!==0?Jr(s,t,!1):t===s&&(r?D(s,z):(s.f&C)!==0&&D(s,se),Ne(s))}}function Zr(e){var t=L,r=j,n=W,i=b,s=ce,a=N,l=ne,o=Te,f=e.f;L=null,j=0,W=null,b=(f&(he|Oe))===0?e:null,ce=null,Me(e.ctx),ne=!1,Te=++Qe,e.ac!==null&&(gt(()=>{e.ac.abort(De)}),e.ac=null);try{e.f|=Nt;var h=e.fn,c=h(),d=e.deps;if(L!==null){var v;if(ct(e,j),d!==null&&j>0)for(d.length=j+L.length,v=0;v<L.length;v++)d[j+v]=L[v];else e.deps=d=L;if(Ze()&&(e.f&Z)!==0)for(v=j;v<d.length;v++)(d[v].reactions??=[]).push(e)}else d!==null&&j<d.length&&(ct(e,j),d.length=j);if(et()&&W!==null&&!ne&&d!==null&&(e.f&(O|se|z))===0)for(v=0;v<W.length;v++)Jr(W[v],e);return i!==null&&i!==e&&(Qe++,W!==null&&(n===null?n=W:n.push(...W))),(e.f&ge)!==0&&(e.f^=ge),c}catch(x){return Rr(x)}finally{e.f^=Nt,L=t,j=r,W=n,b=i,ce=s,Me(a),ne=l,Te=o}}function mi(e,t){let r=t.reactions;if(r!==null){var n=En.call(r,e);if(n!==-1){var i=r.length-1;i===0?r=t.reactions=null:(r[n]=r[i],r.pop())}}r===null&&(t.f&O)!==0&&(L===null||!L.includes(t))&&(D(t,se),(t.f&Z)!==0&&(t.f^=Z,t.f&=~Re),Ir(t),ct(t,0))}function ct(e,t){var r=e.deps;if(r!==null)for(var n=t;n<r.length;n++)mi(e,r[n])}function Xe(e){var t=e.f;if((t&_e)===0){D(e,C);var r=w,n=Ae;w=e,Ae=!0;try{(t&(de|Rn))!==0?hi(e):Ur(e),qr(e);var i=Zr(e);e.teardown=typeof i=="function"?i:null,e.wv=Yr;var s;Tt&&Bn&&(e.f&z)!==0&&e.deps}finally{Ae=n,w=r}}}async function bi(){await Promise.resolve(),Vn()}function u(e){var t=e.f,r=(t&O)!==0;if(b!==null&&!ne){var n=w!==null&&(w.f&_e)!==0;if(!n&&!ce?.includes(e)){var i=b.deps;if((b.f&Nt)!==0)e.rv<Qe&&(e.rv=Qe,L===null&&i!==null&&i[j]===e?j++:L===null?L=[e]:L.includes(e)||L.push(e));else{(b.deps??=[]).push(e);var s=e.reactions;s===null?e.reactions=[b]:s.includes(b)||s.push(b)}}}if(Ge){if(me.has(e))return me.get(e);if(r){var a=e,l=a.v;return((a.f&C)===0&&a.reactions!==null||Xr(a))&&(l=Ht(a)),me.set(a,l),l}}else r&&(!V?.has(e)||k?.is_fork&&!Ze())&&(a=e,rt(a)&&Cr(a),Ae&&Ze()&&(a.f&Z)===0&&Qr(a));if(V?.has(e))return V.get(e);if((e.f&ge)!==0)throw e.v;return e.v}function Qr(e){if(e.deps!==null){e.f^=Z;for(const t of e.deps)(t.reactions??=[]).push(e),(t.f&O)!==0&&(t.f&Z)===0&&Qr(t)}}function Xr(e){if(e.v===I)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(me.has(t)||(t.f&O)!==0&&Xr(t))return!0;return!1}function nt(e){var t=ne;try{return ne=!0,e()}finally{ne=t}}const yi=-7169;function D(e,t){e.f=e.f&yi|t}function wi(e){if(!(typeof e!="object"||!e||e instanceof EventTarget)){if(Se in e)It(e);else if(!Array.isArray(e))for(let t in e){const r=e[t];typeof r=="object"&&r&&Se in r&&It(r)}}}function It(e,t=new Set){if(typeof e=="object"&&e!==null&&!(e instanceof EventTarget)&&!t.has(e)){t.add(e),e instanceof Date&&e.getTime();for(let n in e)try{It(e[n],t)}catch{}const r=Dt(e);if(r!==Object.prototype&&r!==Array.prototype&&r!==Map.prototype&&r!==Set.prototype&&r!==Date.prototype){const n=mr(r);for(let i in n){const s=n[i].get;if(s)try{s.call(e)}catch{}}}}}const Ei=["touchstart","touchmove"];function ki(e){return Ei.includes(e)}const xi=new Set,dr=new Set;function Si(e,t,r,n={}){function i(s){if(n.capture||We.call(t,s),!s.cancelBubble)return gt(()=>r?.call(this,s))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?Fe(()=>{t.addEventListener(e,i,n)}):t.addEventListener(e,i,n),i}function Ai(e,t,r,n,i){var s={capture:n,passive:i},a=Si(e,t,r,s);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&Gt(()=>{t.removeEventListener(e,a,s)})}let hr=null;function We(e){var t=this,r=t.ownerDocument,n=e.type,i=e.composedPath?.()||[],s=i[0]||e.target;hr=e;var a=0,l=hr===e&&e.__root;if(l){var o=i.indexOf(l);if(o!==-1&&(t===document||t===window)){e.__root=t;return}var f=i.indexOf(t);if(f===-1)return;o<=f&&(a=o)}if(s=i[a]||e.target,s!==t){xn(e,"currentTarget",{configurable:!0,get(){return s||r}});var h=b,c=w;H(null),oe(null);try{for(var d,v=[];s!==null;){var x=s.assignedSlot||s.parentNode||s.host||null;try{var M=s["__"+n];M!=null&&(!s.disabled||e.target===s)&&M.call(s,e)}catch(U){d?v.push(U):d=U}if(e.cancelBubble||x===t||x===null)break;s=x}if(d){for(let U of v)queueMicrotask(()=>{throw U});throw d}}finally{e.__root=t,delete e.currentTarget,H(h),oe(c)}}}function Ti(e){var t=document.createElement("template");return t.innerHTML=e.replaceAll("<!>","\x3C!---->"),t.content}function Ct(e,t){var r=w;r.nodes===null&&(r.nodes={start:e,end:t,a:null,t:null})}function Y(e,t){var r=(t&zn)!==0,n=(t&Gn)!==0,i,s=!e.startsWith("<!>");return()=>{i===void 0&&(i=Ti(s?e:"<!>"+e),r||(i=ft(i)));var a=n||Mr?document.importNode(i,!0):i.cloneNode(!0);if(r){var l=ft(a),o=a.lastChild;Ct(l,o)}else Ct(a,a);return a}}function vr(){var e=document.createDocumentFragment(),t=document.createComment(""),r=Je();return e.append(t,r),Ct(t,r),e}function F(e,t){e!==null&&e.before(t)}function qe(e,t){var r=t==null?"":typeof t=="object"?t+"":t;r!==(e.__t??=e.nodeValue)&&(e.__t=r,e.nodeValue=r+"")}function Ri(e,t){return Ni(e,t)}const Ce=new Map;function Ni(e,{target:t,anchor:r,props:n={},events:i,context:s,intro:a=!0}){oi();var l=new Set,o=c=>{for(var d=0;d<c.length;d++){var v=c[d];if(!l.has(v)){l.add(v);var x=ki(v);t.addEventListener(v,We,{passive:x});var M=Ce.get(v);M===void 0?(document.addEventListener(v,We,{passive:x}),Ce.set(v,1)):Ce.set(v,M+1)}}};o(kn(xi)),dr.add(o);var f=void 0,h=ci(()=>{var c=r??t.appendChild(Je());return Zn(c,{pending:()=>{}},d=>{if(s){Sr({});var v=N;v.c=s}i&&(n.$$events=i),f=e(d,n)||{},s&&Ar()}),()=>{for(var d of l){t.removeEventListener(d,We);var v=Ce.get(d);--v===0?(document.removeEventListener(d,We),Ce.delete(d)):Ce.set(d,v)}dr.delete(o),c!==r&&c.parentNode?.removeChild(c)}});return Oi.set(f,h),f}let Oi=new WeakMap;class Pi{anchor;#e=new Map;#t=new Map;#n=new Map;#r=new Set;#l=!0;constructor(t,r=!0){this.anchor=t,this.#l=r}#s=()=>{var t=k;if(this.#e.has(t)){var r=this.#e.get(t),n=this.#t.get(r);if(n)pi(n),this.#r.delete(r);else{var i=this.#n.get(r);i&&(this.#t.set(r,i.effect),this.#n.delete(r),i.fragment.lastChild.remove(),this.anchor.before(i.fragment),n=i.effect)}for(const[s,a]of this.#e){if(this.#e.delete(s),s===t)break;const l=this.#n.get(a);l&&(q(l.effect),this.#n.delete(a))}for(const[s,a]of this.#t){if(s===r||this.#r.has(s))continue;const l=()=>{if(Array.from(this.#e.values()).includes(s)){var f=document.createDocumentFragment();Vr(a,f),f.append(Je()),this.#n.set(s,{effect:a,fragment:f})}else q(a);this.#r.delete(s),this.#t.delete(s)};this.#l||!n?(this.#r.add(s),$e(a,l,!1)):l()}}};#i=t=>{this.#e.delete(t);const r=Array.from(this.#e.values());for(const[n,i]of this.#n)r.includes(n)||(q(i.effect),this.#n.delete(n))};ensure(t,r){var n=k,i=ai();if(r&&!this.#t.has(t)&&!this.#n.has(t))if(i){var s=document.createDocumentFragment(),a=Je();s.append(a),this.#n.set(t,{effect:ue(()=>r(a)),fragment:s})}else this.#t.set(t,ue(()=>r(this.anchor)));if(this.#e.set(n,t),i){for(const[l,o]of this.#t)l===t?n.skipped_effects.delete(o):n.skipped_effects.add(o);for(const[l,o]of this.#n)l===t?n.skipped_effects.delete(o.effect):n.skipped_effects.add(o.effect);n.oncommit(this.#s),n.ondiscard(this.#i)}else this.#s()}}function te(e,t,r=!1){var n=new Pi(e),i=r?Le:0;function s(a,l){n.ensure(a,l)}jr(()=>{var a=!1;t((l,o=!0)=>{a=!0,s(o,l)}),a||s(!1,null)},i)}function Ii(e,t,r){var n=e==null?"":""+e;return n===""?null:n}function Ci(e,t,r,n,i,s){var a=e.__className;if(a!==r||a===void 0){var l=Ii(r);l==null?e.removeAttribute("class"):e.className=l,e.__className=r}return s}const Di=Symbol("is custom element"),Li=Symbol("is html");function Mi(e,t){var r=en(e);r.value===(r.value=t??void 0)||e.value===t&&(t!==0||e.nodeName!=="PROGRESS")||(e.value=t??"")}function pr(e,t,r,n){var i=en(e);i[t]!==(i[t]=r)&&(t==="loading"&&(e[Nn]=r),r==null?e.removeAttribute(t):typeof r!="string"&&Fi(e).includes(t)?e[t]=r:e.setAttribute(t,r))}function en(e){return e.__attributes??={[Di]:e.nodeName.includes("-"),[Li]:e.namespaceURI===jn}}var _r=new Map;function Fi(e){var t=e.getAttribute("is")||e.nodeName,r=_r.get(t);if(r)return r;_r.set(t,r=[]);for(var n,i=e,s=Element.prototype;s!==i;){n=mr(i);for(var a in n)n[a].set&&r.push(a);i=Dt(i)}return r}function Ue(e,t,r=t){var n=new WeakSet;zt(e,"input",async i=>{var s=i?e.defaultValue:e.value;if(s=St(e)?At(s):s,r(s),k!==null&&n.add(k),await bi(),s!==(s=t())){var a=e.selectionStart,l=e.selectionEnd,o=e.value.length;if(e.value=s??"",l!==null){var f=e.value.length;a===l&&l===o&&f>o?(e.selectionStart=f,e.selectionEnd=f):(e.selectionStart=a,e.selectionEnd=Math.min(l,f))}}}),nt(t)==null&&e.value&&(r(St(e)?At(e.value):e.value),k!==null&&n.add(k)),mt(()=>{var i=t();if(e===document.activeElement){var s=ot??k;if(n.has(s))return}St(e)&&i===At(e.value)||e.type==="date"&&!i&&!e.value||i!==e.value&&(e.value=i??"")})}const xt=new Set;function J(e,t,r,n,i=n){var s=r.getAttribute("type")==="checkbox",a=e;if(t!==null)for(var l of t)a=a[l]??=[];a.push(r),zt(r,"change",()=>{var o=r.__value;s&&(o=zi(a,o,r.checked)),i(o)},()=>i(s?[]:null)),mt(()=>{var o=n();s?(o=o||[],r.checked=o.includes(r.__value)):r.checked=si(r.__value,o)}),Gt(()=>{var o=a.indexOf(r);o!==-1&&a.splice(o,1)}),xt.has(a)||(xt.add(a),Fe(()=>{a.sort((o,f)=>o.compareDocumentPosition(f)===4?-1:1),xt.delete(a)})),Fe(()=>{})}function Hi(e,t,r=t){zt(e,"change",n=>{var i=n?e.defaultChecked:e.checked;r(i)}),nt(t)==null&&r(e.checked),mt(()=>{var n=t();e.checked=!!n})}function zi(e,t,r){for(var n=new Set,i=0;i<e.length;i+=1)e[i].checked&&n.add(e[i].__value);return r||n.delete(t),Array.from(n)}function St(e){var t=e.type;return t==="number"||t==="range"}function At(e){return e===""?null:+e}function Gi(e=!1){const t=N,r=t.l.u;if(!r)return;let n=()=>wi(t.s);if(e){let i=0,s={};const a=Ft(()=>{let l=!1;const o=t.s;for(const f in o)o[f]!==s[f]&&(s[f]=o[f],l=!0);return l&&i++,i});n=()=>u(a)}r.b.length&&ui(()=>{gr(t,n),Rt(r.b)}),fr(()=>{const i=nt(()=>r.m.map(Tn));return()=>{for(const s of i)typeof s=="function"&&s()}}),r.a.length&&fr(()=>{gr(t,n),Rt(r.a)})}function gr(e,t){if(e.l.s)for(const r of e.l.s)u(r);t()}const ji="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(ji);Wn();var qi=Y('<h3>GitHub Enterprise Server Domain</h3> <div class="px-3 py-3"><p>Where is GitHub Enterprise Server hosted? Type in the domain without <code>https://</code> and without any path. It should look something like <code>github.mycompany.com</code>.</p> <input class="form-control"/></div>',1),Ui=Y(`<h3>Authentication Type</h3> <div class="px-3 py-3"><p>You can choose between creating a new app that will provide authentication for specific repositories, or a personal access token that will provide access to all repositories available to you. Apps are easier to set up and provide more fine-grained access control. If you have previously created an app, you can choose to use an existing app.</p> <div class="form-check"><input class="form-check-input" type="radio" id="newApp"/> <label class="form-check-label" for="newApp">New GitHub App <b>(recommended)</b></label></div> <div class="form-check"><input class="form-check-input" type="radio" id="existingApp"/> <label class="form-check-label" for="existingApp">Existing GitHub App</label></div> <div class="form-check"><input class="form-check-input" type="radio" id="pat"/> <label class="form-check-label" for="pat">Personal Access Token</label></div></div>`,1),Bi=Y(`<p class="pt-2">If multiple organizations under the same GitHub Enterprise Server need to use the runners, you can make the app public.</p> <div class="form-check"><input class="form-check-input" type="checkbox" id="public"/> <label class="form-check-label" for="public">Public app</label></div>`,1),Wi=Y('<h3>Organization name</h3> <div class="px-3 py-3"><p>What is the slug for your organization? If your repositories have a URL like <code> </code> then your organization slug is <code>MyOrg</code>.</p> <input class="form-control"/></div>',1),Ki=Y(`<h3>New App Settings</h3> <div class="px-3 py-3"><p>Choose whether to create a new personal app or organization app. A private personal app can only be used for repositories under your user. A private organization app can only be used for repositories under that organization.</p> <div class="form-check"><input class="form-check-input" type="radio" id="userScope"/> <label class="form-check-label" for="userScope">User app</label></div> <div class="form-check"><input class="form-check-input" type="radio" id="orgScope"/> <label class="form-check-label" for="orgScope">Organization app</label></div> <!></div> <!>`,1),Vi=Y(`<h3>Existing App Details</h3> <div class="px-3 py-3"><div class="form-group row px-3 py-2"><label for="appid" class="col-sm-2 col-form-label">App Id</label> <div class="col-sm-10"><input type="number" class="form-control" id="appid"/></div></div> <div class="form-group row px-3 py-2"><label for="pk" class="col-sm-2 col-form-label">Private Key</label> <div class="col-sm-10"><textarea class="form-control" id="pk" rows="10"></textarea></div></div> <div class="form-group row px-3 py-2"><div class="col-sm-2 col-form-label">Registration Level</div> <div class="col-sm-10"><div class="form-check"><input class="form-check-input" type="radio" id="repo"/> <label class="form-check-label" for="repo">Repository</label></div> <div class="form-check"><input class="form-check-input" type="radio" id="org"/> <label class="form-check-label" for="org">Organization</label></div></div></div> <h4>Required Permissions</h4> <p>The existing app must have the following permissions.</p> <pre> </pre> <h4>Webhook</h4> <p>Don't forget to set up the webhook and its secret as described in <a href="https://github.com/CloudSnorkel/cdk-github-runners/blob/main/SETUP_GITHUB.md">SETUP_GITHUB.md</a>.</p></div>`,1),Yi=Y(`<h2>Personal Access Token</h2> <div class="px-3 py-3"><p>The <a>personal access token</a> must have the <code>repo</code> scope enabled. Don't forget to also create a webhook as described in <a href="https://github.com/CloudSnorkel/cdk-github-runners/blob/main/SETUP_GITHUB.md">SETUP_GITHUB.md</a>.</p> <input class="form-control" placeholder="Token e.g. ghp_abcdefghijklmnopqrstuvwxyz1234567890"/></div>`,1),$i=Y(`<h3>Registration Level</h3> <div class="px-3 py-3"><p>Would you like runners to be registered on repository level, or on organization level?</p> <p><em>This determines where runners will be registered dynamically each time they are provisioned. This is independent of where the GitHub app is installed.</em></p> <ul><li>Registering runners on repository level requires the <code>administration</code> <a href="https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners/autoscaling-with-self-hosted-runners#authentication-requirements">permission</a>.</li> <li>Registering runners on organization level only requires the <code>organization_self_hosted_runners</code> <a href="https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners/autoscaling-with-self-hosted-runners#authentication-requirements">permission</a> which is more fine-grained.</li> <li><strong>Repository level is recommended</strong> because runners are registered to the specific repository where the job started, preventing jobs from being assigned to runners intended for other repositories.</li> <li>Registering runners on organization level means runners are registered to the entire organization, making them available to <strong>ALL repositories in the organization</strong>, regardless of whether the app is installed on those repositories. This can lead to jobs being routed to runners that weren't intended for them.</li> <li>Organization level registration does <strong>not</strong> automatically install the app on all repositories. You still need to install the app on each repository where you want to use runners. GitHub will ask you on which repositories to install this app after it's created.</li> <li>Do not use organization level registration if you don't fully trust all repositories in your organization.</li> <li>Use organization level only if you need to minimize permissions and you fully trust all repositories in your organization.</li> <li><strong>When in doubt, use the default repository level registration.</strong></li></ul> <div class="form-check"><input class="form-check-input" type="radio" id="repo"/> <label class="form-check-label" for="repo">Repository</label></div> <div class="form-check"><input class="form-check-input" type="radio" id="org"/> <label class="form-check-label" for="org">Organization</label></div></div>`,1),Ji=Y("<p>This button will be enabled once all the questions above are answered.</p>"),Zi=Y('<div role="alert"> </div>'),Qi=Y(`<p><b class="text-danger">WARNING:</b> using a public app means anyone with access to <code> </code> can use the runners you're setting up now. Anyone can create a workflow that will run on those runners, have access to their instance profile, and be part of their security group. Consider the security implications before continuing.</p>`),Xi=Y(`<main><div class="container py-3 px-2"><div class="row"><form class="col"><h1>Setup GitHub Runners</h1> <p>Answer all the questions on this page to automatically configure GitHub integration and get the runners working. This page will not be accessible once you complete this operation. If you ever want to access it again, edit <code></code> and run the status function again.</p> <h3>Choose GitHub Instance</h3> <div class="px-3 py-3"><p>Are your repositories hosted on GitHub.com or are you using an on-premise installation of GitHub Enterprise Server?</p> <div class="form-check"><input class="form-check-input" type="radio" id="github.com"/> <label class="form-check-label" for="github.com">GitHub.com</label></div> <div class="form-check"><input class="form-check-input" type="radio" id="ghes"/> <label class="form-check-label" for="ghes">GitHub Enterprise Server</label></div></div> <!> <!> <!> <!> <h2>Finish Setup</h2> <div class="px-3 py-3"><!> <!> <button type="submit" class="btn btn-success"> </button></div></form></div></div> <form method="post" id="appform"><input type="hidden" name="manifest"/></form></main>`);function es(e,t){Sr(t,!1);const r=[],n=[],i=[],s=[],a="INSERT_TOKEN_HERE";let l=B(),o=B("INSERT_DOMAIN_HERE"),f=B(),h=B("user"),c=B("repo"),d=B("ORGANIZATION"),v=B(""),x=B(""),M=B(""),U=B(),be=B();const ye={actions:"write",administration:"write",deployments:"read"},jt={actions:"write",organization_self_hosted_runners:"write",deployments:"read"},we=B({url:"https://github.com/CloudSnorkel/cdk-github-runners",hook_attributes:{url:"INSERT_WEBHOOK_URL_HERE"},redirect_url:"INSERT_BASE_URL_HERE/complete-new-app",public:!1,default_permissions:ye,default_events:["workflow_job"]});function tn(p,m,y,S,A,R,T){return T||p===void 0||m===void 0?!0:m==="newApp"?!1:m==="existingApp"?y===""||S===""||A===void 0:m==="pat"?R==="":(console.error("Something is broken",p,m,y),!0)}function rn(p){return p==="newApp"?"Create GitHub App":"Setup"}function bt(p,m){return new Promise((y,S)=>{fetch(`${p}?token=${a}`,{method:"POST",mode:"same-origin",headers:{"Content-Type":"application/json"},body:JSON.stringify(m),redirect:"error"}).then(A=>{A.ok?A.text().then(y).catch(S):A.text().then(R=>{S(new Error(`${R} [${A.status}]`))}).catch(S)}).catch(S)})}function nn(p){p.preventDefault();function m(){const y=u(l)==="ghes"?u(o):"github.com";switch(sr(we,u(we).default_permissions=u(c)==="repo"?ye:jt),u(f)){case"newApp":return bt("domain",{domain:y,runnerLevel:u(c)}).then(S=>(document.getElementById("appform").submit(),Promise.resolve("Redirecting to GitHub...")));case"existingApp":return bt("app",{appid:u(v),pk:u(x),domain:y,runnerLevel:u(c)});case"pat":return bt("pat",{pat:u(M),domain:y})}}m().then(y=>{E(be,y),E(U,!0)}).catch(y=>{E(be,`${y}`),E(U,!1)})}Gi();var qt=Xi(),Ut=g(qt),sn=g(Ut),Bt=g(sn),Wt=_(g(Bt),2),on=_(g(Wt));on.textContent="INSERT_SECRET_ARN_HERE";var Kt=_(Wt,4),Vt=_(g(Kt),2),yt=g(Vt);yt.value=yt.__value="github.com";var an=_(Vt,2),wt=g(an);wt.value=wt.__value="ghes";var Yt=_(Kt,2);{var ln=p=>{var m=qi(),y=_(ee(m),2),S=_(g(y),2);Ue(S,()=>u(o),A=>E(o,A)),F(p,m)};te(Yt,p=>{u(l)==="ghes"&&p(ln)})}var $t=_(Yt,2);{var fn=p=>{var m=Ui(),y=_(ee(m),2),S=_(g(y),2),A=g(S);A.value=A.__value="newApp";var R=_(S,2),T=g(R);T.value=T.__value="existingApp";var $=_(R,2),Q=g($);Q.value=Q.__value="pat",J(n,[],A,()=>u(f),G=>E(f,G)),J(n,[],T,()=>u(f),G=>E(f,G)),J(n,[],Q,()=>u(f),G=>E(f,G)),F(p,m)};te($t,p=>{u(l)&&p(fn)})}var Jt=_($t,2);{var un=p=>{var m=Ki(),y=_(ee(m),2),S=_(g(y),2),A=g(S);A.value=A.__value="user";var R=_(S,2),T=g(R);T.value=T.__value="org";var $=_(R,2);{var Q=P=>{var X=Bi(),Ee=_(ee(X),2),ae=g(Ee);Hi(ae,()=>u(we).public,ke=>sr(we,u(we).public=ke)),F(P,X)};te($,P=>{u(l)==="ghes"&&P(Q)})}var G=_(y,2);{var Pe=P=>{var X=Wi(),Ee=_(ee(X),2),ae=g(Ee),ke=_(g(ae)),it=g(ke),je=_(ae,2);Ie(()=>qe(it,`https://${u(o)??""}/MyOrg/my-repo`)),Ue(je,()=>u(d),Et=>E(d,Et)),F(P,X)};te(G,P=>{u(h)==="org"&&P(Pe)})}J(i,[],A,()=>u(h),P=>E(h,P)),J(i,[],T,()=>u(h),P=>E(h,P)),F(p,m)},cn=p=>{var m=vr(),y=ee(m);{var S=R=>{var T=Vi(),$=_(ee(T),2),Q=g($),G=_(g(Q),2),Pe=g(G),P=_(Q,2),X=_(g(P),2),Ee=g(X),ae=_(P,2),ke=_(g(ae),2),it=g(ke),je=g(it);je.value=je.__value="repo";var Et=_(it,2),kt=g(Et);kt.value=kt.__value="org";var bn=_(ae,6),yn=g(bn);Ie(le=>qe(yn,le),[()=>JSON.stringify(u(c)==="repo"?ye:jt,void 0,2)]),Ue(Pe,()=>u(v),le=>E(v,le)),Ue(Ee,()=>u(x),le=>E(x,le)),J(s,[],je,()=>u(c),le=>E(c,le)),J(s,[],kt,()=>u(c),le=>E(c,le)),F(R,T)},A=R=>{var T=vr(),$=ee(T);{var Q=G=>{var Pe=Yi(),P=_(ee(Pe),2),X=g(P),Ee=_(g(X)),ae=_(X,2);Ie(()=>pr(Ee,"href",`https://${u(o)??""}/settings/tokens`)),Ue(ae,()=>u(M),ke=>E(M,ke)),F(G,Pe)};te($,G=>{u(f)==="pat"&&G(Q)},!0)}F(R,T)};te(y,R=>{u(f)==="existingApp"?R(S):R(A,!1)},!0)}F(p,m)};te(Jt,p=>{u(f)==="newApp"?p(un):p(cn,!1)})}var Zt=_(Jt,2);{var dn=p=>{var m=$i(),y=_(ee(m),2),S=_(g(y),6),A=g(S);A.value=A.__value="repo";var R=_(S,2),T=g(R);T.value=T.__value="org",J(s,[],A,()=>u(c),$=>E(c,$)),J(s,[],T,()=>u(c),$=>E(c,$)),F(p,m)};te(Zt,p=>{u(h)==="org"&&u(f)==="newApp"&&p(dn)})}var hn=_(Zt,4),Qt=g(hn);{var vn=p=>{var m=Ji();F(p,m)},pn=p=>{var m=Zi(),y=g(m);Ie(()=>{Ci(m,1,`alert alert-${u(U)?"success":"danger"}`),qe(y,u(be))}),F(p,m)};te(Qt,p=>{u(be)===void 0?p(vn):p(pn,!1)})}var Xt=_(Qt,2);{var _n=p=>{var m=Qi(),y=_(g(m),2),S=g(y);Ie(()=>qe(S,u(o))),F(p,m)};te(Xt,p=>{u(we).public&&u(f)==="newApp"&&p(_n)})}var er=_(Xt,2),gn=g(er),tr=_(Ut,2),mn=g(tr);Ie((p,m,y)=>{er.disabled=p,qe(gn,m),pr(tr,"action",`https://${u(o)??""}/${u(h)==="org"?`organizations/${u(d)}/`:""}settings/apps/new?state=INSERT_TOKEN_HERE`),Mi(mn,y)},[()=>tn(u(l),u(f),u(v),u(x),u(c),u(M),u(U)),()=>rn(u(f)),()=>JSON.stringify(u(we))]),J(r,[],yt,()=>u(l),p=>E(l,p)),J(r,[],wt,()=>u(l),p=>E(l,p)),Ai("submit",Bt,nn),F(e,qt),Ar()}Ri(es,{target:document.getElementById("app")});</script> <style rel="stylesheet" crossorigin>.align-baseline{vertical-align:baseline!important}.align-top{vertical-align:top!important}.align-middle{vertical-align:middle!important}.align-bottom{vertical-align:bottom!important}.align-text-bottom{vertical-align:text-bottom!important}.align-text-top{vertical-align:text-top!important}.float-start{float:left!important}.float-end{float:right!important}.float-none{float:none!important}.object-fit-contain{object-fit:contain!important}.object-fit-cover{object-fit:cover!important}.object-fit-fill{object-fit:fill!important}.object-fit-scale{object-fit:scale-down!important}.object-fit-none{object-fit:none!important}.opacity-0{opacity:0!important}.opacity-25{opacity:.25!important}.opacity-50{opacity:.5!important}.opacity-75{opacity:.75!important}.opacity-100{opacity:1!important}.overflow-auto{overflow:auto!important}.overflow-hidden{overflow:hidden!important}.overflow-visible{overflow:visible!important}.overflow-scroll{overflow:scroll!important}.overflow-x-auto{overflow-x:auto!important}.overflow-x-hidden{overflow-x:hidden!important}.overflow-x-visible{overflow-x:visible!important}.overflow-x-scroll{overflow-x:scroll!important}.overflow-y-auto{overflow-y:auto!important}.overflow-y-hidden{overflow-y:hidden!important}.overflow-y-visible{overflow-y:visible!important}.overflow-y-scroll{overflow-y:scroll!important}.d-inline{display:inline!important}.d-inline-block{display:inline-block!important}.d-block{display:block!important}.d-grid{display:grid!important}.d-inline-grid{display:inline-grid!important}.d-table{display:table!important}.d-table-row{display:table-row!important}.d-table-cell{display:table-cell!important}.d-flex{display:flex!important}.d-inline-flex{display:inline-flex!important}.d-none{display:none!important}.shadow{box-shadow:var(--bs-box-shadow)!important}.shadow-sm{box-shadow:var(--bs-box-shadow-sm)!important}.shadow-lg{box-shadow:var(--bs-box-shadow-lg)!important}.shadow-none{box-shadow:none!important}.focus-ring-primary{--bs-focus-ring-color: rgba(var(--bs-primary-rgb), var(--bs-focus-ring-opacity))}.focus-ring-secondary{--bs-focus-ring-color: rgba(var(--bs-secondary-rgb), var(--bs-focus-ring-opacity))}.focus-ring-success{--bs-focus-ring-color: rgba(var(--bs-success-rgb), var(--bs-focus-ring-opacity))}.focus-ring-info{--bs-focus-ring-color: rgba(var(--bs-info-rgb), var(--bs-focus-ring-opacity))}.focus-ring-warning{--bs-focus-ring-color: rgba(var(--bs-warning-rgb), var(--bs-focus-ring-opacity))}.focus-ring-danger{--bs-focus-ring-color: rgba(var(--bs-danger-rgb), var(--bs-focus-ring-opacity))}.focus-ring-light{--bs-focus-ring-color: rgba(var(--bs-light-rgb), var(--bs-focus-ring-opacity))}.focus-ring-dark{--bs-focus-ring-color: rgba(var(--bs-dark-rgb), var(--bs-focus-ring-opacity))}.position-static{position:static!important}.position-relative{position:relative!important}.position-absolute{position:absolute!important}.position-fixed{position:fixed!important}.position-sticky{position:sticky!important}.top-0{top:0!important}.top-50{top:50%!important}.top-100{top:100%!important}.bottom-0{bottom:0!important}.bottom-50{bottom:50%!important}.bottom-100{bottom:100%!important}.start-0{left:0!important}.start-50{left:50%!important}.start-100{left:100%!important}.end-0{right:0!important}.end-50{right:50%!important}.end-100{right:100%!important}.translate-middle{transform:translate(-50%,-50%)!important}.translate-middle-x{transform:translate(-50%)!important}.translate-middle-y{transform:translateY(-50%)!important}.border{border:var(--bs-border-width) var(--bs-border-style) var(--bs-border-color)!important}.border-0{border:0!important}.border-top{border-top:var(--bs-border-width) var(--bs-border-style) var(--bs-border-color)!important}.border-top-0{border-top:0!important}.border-end{border-right:var(--bs-border-width) var(--bs-border-style) var(--bs-border-color)!important}.border-end-0{border-right:0!important}.border-bottom{border-bottom:var(--bs-border-width) var(--bs-border-style) var(--bs-border-color)!important}.border-bottom-0{border-bottom:0!important}.border-start{border-left:var(--bs-border-width) var(--bs-border-style) var(--bs-border-color)!important}.border-start-0{border-left:0!important}.border-primary{--bs-border-opacity: 1;border-color:rgba(var(--bs-primary-rgb),var(--bs-border-opacity))!important}.border-secondary{--bs-border-opacity: 1;border-color:rgba(var(--bs-secondary-rgb),var(--bs-border-opacity))!important}.border-success{--bs-border-opacity: 1;border-color:rgba(var(--bs-success-rgb),var(--bs-border-opacity))!important}.border-info{--bs-border-opacity: 1;border-color:rgba(var(--bs-info-rgb),var(--bs-border-opacity))!important}.border-warning{--bs-border-opacity: 1;border-color:rgba(var(--bs-warning-rgb),var(--bs-border-opacity))!important}.border-danger{--bs-border-opacity: 1;border-color:rgba(var(--bs-danger-rgb),var(--bs-border-opacity))!important}.border-light{--bs-border-opacity: 1;border-color:rgba(var(--bs-light-rgb),var(--bs-border-opacity))!important}.border-dark{--bs-border-opacity: 1;border-color:rgba(var(--bs-dark-rgb),var(--bs-border-opacity))!important}.border-black{--bs-border-opacity: 1;border-color:rgba(var(--bs-black-rgb),var(--bs-border-opacity))!important}.border-white{--bs-border-opacity: 1;border-color:rgba(var(--bs-white-rgb),var(--bs-border-opacity))!important}.border-primary-subtle{border-color:var(--bs-primary-border-subtle)!important}.border-secondary-subtle{border-color:var(--bs-secondary-border-subtle)!important}.border-success-subtle{border-color:var(--bs-success-border-subtle)!important}.border-info-subtle{border-color:var(--bs-info-border-subtle)!important}.border-warning-subtle{border-color:var(--bs-warning-border-subtle)!important}.border-danger-subtle{border-color:var(--bs-danger-border-subtle)!important}.border-light-subtle{border-color:var(--bs-light-border-subtle)!important}.border-dark-subtle{border-color:var(--bs-dark-border-subtle)!important}.border-1{border-width:1px!important}.border-2{border-width:2px!important}.border-3{border-width:3px!important}.border-4{border-width:4px!important}.border-5{border-width:5px!important}.border-opacity-10{--bs-border-opacity: .1}.border-opacity-25{--bs-border-opacity: .25}.border-opacity-50{--bs-border-opacity: .5}.border-opacity-75{--bs-border-opacity: .75}.border-opacity-100{--bs-border-opacity: 1}.w-25{width:25%!important}.w-50{width:50%!important}.w-75{width:75%!important}.w-100{width:100%!important}.w-auto{width:auto!important}.mw-100{max-width:100%!important}.vw-100{width:100vw!important}.min-vw-100{min-width:100vw!important}.h-25{height:25%!important}.h-50{height:50%!important}.h-75{height:75%!important}.h-100{height:100%!important}.h-auto{height:auto!important}.mh-100{max-height:100%!important}.vh-100{height:100vh!important}.min-vh-100{min-height:100vh!important}.flex-fill{flex:1 1 auto!important}.flex-row{flex-direction:row!important}.flex-column{flex-direction:column!important}.flex-row-reverse{flex-direction:row-reverse!important}.flex-column-reverse{flex-direction:column-reverse!important}.flex-grow-0{flex-grow:0!important}.flex-grow-1{flex-grow:1!important}.flex-shrink-0{flex-shrink:0!important}.flex-shrink-1{flex-shrink:1!important}.fl