guito 0.6.2 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,64 @@
1
+ var TC=Object.defineProperty,MC=Object.defineProperties;var IC=Object.getOwnPropertyDescriptors;var Mm=Object.getOwnPropertySymbols;var kC=Object.prototype.hasOwnProperty,PC=Object.prototype.propertyIsEnumerable;var Im=(n,e,t)=>e in n?TC(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,G=(n,e)=>{for(var t in e||={})kC.call(e,t)&&Im(n,t,e[t]);if(Mm)for(var t of Mm(e))PC.call(e,t)&&Im(n,t,e[t]);return n},le=(n,e)=>MC(n,IC(e));var Wn=(n,e,t)=>new Promise((i,r)=>{var o=l=>{try{a(t.next(l))}catch(c){r(c)}},s=l=>{try{a(t.throw(l))}catch(c){r(c)}},a=l=>l.done?i(l.value):Promise.resolve(l.value).then(o,s);a((t=t.apply(n,e)).next())});var Td;function ua(){return Td}function vn(n){let e=Td;return Td=n,e}var km=Symbol("NotFound");function vr(n){return n===km||n?.name==="\u0275NotFound"}var ut=null,fa=!1,Md=1,OC=null,it=Symbol("SIGNAL");function ne(n){let e=ut;return ut=n,e}function ga(){return ut}var Ci={version:0,lastCleanEpoch:0,dirty:!1,producers:void 0,producersTail:void 0,consumers:void 0,consumersTail:void 0,recomputing:!1,consumerAllowSignalWrites:!1,consumerIsAlwaysLive:!1,kind:"unknown",producerMustRecompute:()=>!1,producerRecomputeValue:()=>{},consumerMarkedDirty:()=>{},consumerOnSignalRead:()=>{}};function xi(n){if(fa)throw new Error("");if(ut===null)return;ut.consumerOnSignalRead(n);let e=ut.producersTail;if(e!==void 0&&e.producer===n)return;let t,i=ut.recomputing;if(i&&(t=e!==void 0?e.nextProducer:ut.producers,t!==void 0&&t.producer===n)){ut.producersTail=t,t.lastReadVersion=n.version;return}let r=n.consumersTail;if(r!==void 0&&r.consumer===ut&&(!i||NC(r,ut)))return;let o=yr(ut),s={producer:n,consumer:ut,nextProducer:t,prevConsumer:r,lastReadVersion:n.version,nextConsumer:void 0};ut.producersTail=s,e!==void 0?e.nextProducer=s:ut.producers=s,o&&Nm(n,s)}function Pm(){Md++}function _a(n){if(!(yr(n)&&!n.dirty)&&!(!n.dirty&&n.lastCleanEpoch===Md)){if(!n.producerMustRecompute(n)&&!Ei(n)){ma(n);return}n.producerRecomputeValue(n),ma(n)}}function Id(n){if(n.consumers===void 0)return;let e=fa;fa=!0;try{for(let t=n.consumers;t!==void 0;t=t.nextConsumer){let i=t.consumer;i.dirty||RC(i)}}finally{fa=e}}function kd(){return ut?.consumerAllowSignalWrites!==!1}function RC(n){n.dirty=!0,Id(n),n.consumerMarkedDirty?.(n)}function ma(n){n.dirty=!1,n.lastCleanEpoch=Md}function qn(n){return n&&Om(n),ne(n)}function Om(n){n.producersTail=void 0,n.recomputing=!0}function wi(n,e){ne(e),n&&Rm(n)}function Rm(n){n.recomputing=!1;let e=n.producersTail,t=e!==void 0?e.nextProducer:n.producers;if(t!==void 0){if(yr(n))do t=Pd(t);while(t!==void 0);e!==void 0?e.nextProducer=void 0:n.producers=void 0}}function Ei(n){for(let e=n.producers;e!==void 0;e=e.nextProducer){let t=e.producer,i=e.lastReadVersion;if(i!==t.version||(_a(t),i!==t.version))return!0}return!1}function Zn(n){if(yr(n)){let e=n.producers;for(;e!==void 0;)e=Pd(e)}n.producers=void 0,n.producersTail=void 0,n.consumers=void 0,n.consumersTail=void 0}function Nm(n,e){let t=n.consumersTail,i=yr(n);if(t!==void 0?(e.nextConsumer=t.nextConsumer,t.nextConsumer=e):(e.nextConsumer=void 0,n.consumers=e),e.prevConsumer=t,n.consumersTail=e,!i)for(let r=n.producers;r!==void 0;r=r.nextProducer)Nm(r.producer,r)}function Pd(n){let e=n.producer,t=n.nextProducer,i=n.nextConsumer,r=n.prevConsumer;if(n.nextConsumer=void 0,n.prevConsumer=void 0,i!==void 0?i.prevConsumer=r:e.consumersTail=r,r!==void 0)r.nextConsumer=i;else if(e.consumers=i,!yr(e)){let o=e.producers;for(;o!==void 0;)o=Pd(o)}return t}function yr(n){return n.consumerIsAlwaysLive||n.consumers!==void 0}function va(n){OC?.(n)}function NC(n,e){let t=e.producersTail;if(t!==void 0){let i=e.producers;do{if(i===n)return!0;if(i===t)break;i=i.nextProducer}while(i!==void 0)}return!1}function ya(n,e){return Object.is(n,e)}function bo(n,e){let t=Object.create(AC);t.computation=n,e!==void 0&&(t.equal=e);let i=()=>{if(_a(t),xi(t),t.value===yo)throw t.error;return t.value};return i[it]=t,va(t),i}var pa=Symbol("UNSET"),ha=Symbol("COMPUTING"),yo=Symbol("ERRORED"),AC=le(G({},Ci),{value:pa,dirty:!0,error:null,equal:ya,kind:"computed",producerMustRecompute(n){return n.value===pa||n.value===ha},producerRecomputeValue(n){if(n.value===ha)throw new Error("");let e=n.value;n.value=ha;let t=qn(n),i,r=!1;try{i=n.computation(),ne(null),r=e!==pa&&e!==yo&&i!==yo&&n.equal(e,i)}catch(o){i=yo,n.error=o}finally{wi(n,t)}if(r){n.value=e;return}n.value=i,n.version++}});function LC(){throw new Error}var Am=LC;function Lm(n){Am(n)}function Od(n){Am=n}var FC=null;function Rd(n,e){let t=Object.create(Co);t.value=n,e!==void 0&&(t.equal=e);let i=()=>Fm(t);return i[it]=t,va(t),[i,s=>br(t,s),s=>Nd(t,s)]}function Fm(n){return xi(n),n.value}function br(n,e){kd()||Lm(n),n.equal(n.value,e)||(n.value=e,VC(n))}function Nd(n,e){kd()||Lm(n),br(n,e(n.value))}var Co=le(G({},Ci),{equal:ya,value:void 0,kind:"signal"});function VC(n){n.version++,Pm(),Id(n),FC?.(n)}function ue(n){return typeof n=="function"}function Cr(n){let t=n(i=>{Error.call(i),i.stack=new Error().stack});return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}var ba=Cr(n=>function(t){n(this),this.message=t?`${t.length} errors occurred during unsubscription:
2
+ ${t.map((i,r)=>`${r+1}) ${i.toString()}`).join(`
3
+ `)}`:"",this.name="UnsubscriptionError",this.errors=t});function Di(n,e){if(n){let t=n.indexOf(e);0<=t&&n.splice(t,1)}}var Ve=class n{constructor(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let e;if(!this.closed){this.closed=!0;let{_parentage:t}=this;if(t)if(this._parentage=null,Array.isArray(t))for(let o of t)o.remove(this);else t.remove(this);let{initialTeardown:i}=this;if(ue(i))try{i()}catch(o){e=o instanceof ba?o.errors:[o]}let{_finalizers:r}=this;if(r){this._finalizers=null;for(let o of r)try{Vm(o)}catch(s){e=e??[],s instanceof ba?e=[...e,...s.errors]:e.push(s)}}if(e)throw new ba(e)}}add(e){var t;if(e&&e!==this)if(this.closed)Vm(e);else{if(e instanceof n){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(t=this._finalizers)!==null&&t!==void 0?t:[]).push(e)}}_hasParent(e){let{_parentage:t}=this;return t===e||Array.isArray(t)&&t.includes(e)}_addParent(e){let{_parentage:t}=this;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e}_removeParent(e){let{_parentage:t}=this;t===e?this._parentage=null:Array.isArray(t)&&Di(t,e)}remove(e){let{_finalizers:t}=this;t&&Di(t,e),e instanceof n&&e._removeParent(this)}};Ve.EMPTY=(()=>{let n=new Ve;return n.closed=!0,n})();var Ad=Ve.EMPTY;function Ca(n){return n instanceof Ve||n&&"closed"in n&&ue(n.remove)&&ue(n.add)&&ue(n.unsubscribe)}function Vm(n){ue(n)?n():n.unsubscribe()}var Xt={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1};var xr={setTimeout(n,e,...t){let{delegate:i}=xr;return i?.setTimeout?i.setTimeout(n,e,...t):setTimeout(n,e,...t)},clearTimeout(n){let{delegate:e}=xr;return(e?.clearTimeout||clearTimeout)(n)},delegate:void 0};function xa(n){xr.setTimeout(()=>{let{onUnhandledError:e}=Xt;if(e)e(n);else throw n})}function xo(){}var Bm=Ld("C",void 0,void 0);function jm(n){return Ld("E",void 0,n)}function $m(n){return Ld("N",n,void 0)}function Ld(n,e,t){return{kind:n,value:e,error:t}}var Si=null;function wr(n){if(Xt.useDeprecatedSynchronousErrorHandling){let e=!Si;if(e&&(Si={errorThrown:!1,error:null}),n(),e){let{errorThrown:t,error:i}=Si;if(Si=null,t)throw i}}else n()}function Hm(n){Xt.useDeprecatedSynchronousErrorHandling&&Si&&(Si.errorThrown=!0,Si.error=n)}var Ti=class extends Ve{constructor(e){super(),this.isStopped=!1,e?(this.destination=e,Ca(e)&&e.add(this)):this.destination=$C}static create(e,t,i){return new Jt(e,t,i)}next(e){this.isStopped?Vd($m(e),this):this._next(e)}error(e){this.isStopped?Vd(jm(e),this):(this.isStopped=!0,this._error(e))}complete(){this.isStopped?Vd(Bm,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(e){this.destination.next(e)}_error(e){try{this.destination.error(e)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}},BC=Function.prototype.bind;function Fd(n,e){return BC.call(n,e)}var Bd=class{constructor(e){this.partialObserver=e}next(e){let{partialObserver:t}=this;if(t.next)try{t.next(e)}catch(i){wa(i)}}error(e){let{partialObserver:t}=this;if(t.error)try{t.error(e)}catch(i){wa(i)}else wa(e)}complete(){let{partialObserver:e}=this;if(e.complete)try{e.complete()}catch(t){wa(t)}}},Jt=class extends Ti{constructor(e,t,i){super();let r;if(ue(e)||!e)r={next:e??void 0,error:t??void 0,complete:i??void 0};else{let o;this&&Xt.useDeprecatedNextContext?(o=Object.create(e),o.unsubscribe=()=>this.unsubscribe(),r={next:e.next&&Fd(e.next,o),error:e.error&&Fd(e.error,o),complete:e.complete&&Fd(e.complete,o)}):r=e}this.destination=new Bd(r)}};function wa(n){Xt.useDeprecatedSynchronousErrorHandling?Hm(n):xa(n)}function jC(n){throw n}function Vd(n,e){let{onStoppedNotification:t}=Xt;t&&xr.setTimeout(()=>t(n,e))}var $C={closed:!0,next:xo,error:jC,complete:xo};var Er=typeof Symbol=="function"&&Symbol.observable||"@@observable";function Dr(n){return n}function Um(n){return n.length===0?Dr:n.length===1?n[0]:function(t){return n.reduce((i,r)=>r(i),t)}}var ae=(()=>{class n{constructor(t){t&&(this._subscribe=t)}lift(t){let i=new n;return i.source=this,i.operator=t,i}subscribe(t,i,r){let o=UC(t)?t:new Jt(t,i,r);return wr(()=>{let{operator:s,source:a}=this;o.add(s?s.call(o,a):a?this._subscribe(o):this._trySubscribe(o))}),o}_trySubscribe(t){try{return this._subscribe(t)}catch(i){t.error(i)}}forEach(t,i){return i=zm(i),new i((r,o)=>{let s=new Jt({next:a=>{try{t(a)}catch(l){o(l),s.unsubscribe()}},error:o,complete:r});this.subscribe(s)})}_subscribe(t){var i;return(i=this.source)===null||i===void 0?void 0:i.subscribe(t)}[Er](){return this}pipe(...t){return Um(t)(this)}toPromise(t){return t=zm(t),new t((i,r)=>{let o;this.subscribe(s=>o=s,s=>r(s),()=>i(o))})}}return n.create=e=>new n(e),n})();function zm(n){var e;return(e=n??Xt.Promise)!==null&&e!==void 0?e:Promise}function HC(n){return n&&ue(n.next)&&ue(n.error)&&ue(n.complete)}function UC(n){return n&&n instanceof Ti||HC(n)&&Ca(n)}function jd(n){return ue(n?.lift)}function ye(n){return e=>{if(jd(e))return e.lift(function(t){try{return n(t,this)}catch(i){this.error(i)}});throw new TypeError("Unable to lift unknown Observable type")}}function Ce(n,e,t,i,r){return new $d(n,e,t,i,r)}var $d=class extends Ti{constructor(e,t,i,r,o,s){super(e),this.onFinalize=o,this.shouldUnsubscribe=s,this._next=t?function(a){try{t(a)}catch(l){e.error(l)}}:super._next,this._error=r?function(a){try{r(a)}catch(l){e.error(l)}finally{this.unsubscribe()}}:super._error,this._complete=i?function(){try{i()}catch(a){e.error(a)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var e;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){let{closed:t}=this;super.unsubscribe(),!t&&((e=this.onFinalize)===null||e===void 0||e.call(this))}}};function Gm(){return ye((n,e)=>{let t=null;n._refCount++;let i=Ce(e,void 0,void 0,void 0,()=>{if(!n||n._refCount<=0||0<--n._refCount){t=null;return}let r=n._connection,o=t;t=null,r&&(!o||r===o)&&r.unsubscribe(),e.unsubscribe()});n.subscribe(i),i.closed||(t=n.connect())})}var wo=class extends ae{constructor(e,t){super(),this.source=e,this.subjectFactory=t,this._subject=null,this._refCount=0,this._connection=null,jd(e)&&(this.lift=e.lift)}_subscribe(e){return this.getSubject().subscribe(e)}getSubject(){let e=this._subject;return(!e||e.isStopped)&&(this._subject=this.subjectFactory()),this._subject}_teardown(){this._refCount=0;let{_connection:e}=this;this._subject=this._connection=null,e?.unsubscribe()}connect(){let e=this._connection;if(!e){e=this._connection=new Ve;let t=this.getSubject();e.add(this.source.subscribe(Ce(t,void 0,()=>{this._teardown(),t.complete()},i=>{this._teardown(),t.error(i)},()=>this._teardown()))),e.closed&&(this._connection=null,e=Ve.EMPTY)}return e}refCount(){return Gm()(this)}};var Sr={schedule(n){let e=requestAnimationFrame,t=cancelAnimationFrame,{delegate:i}=Sr;i&&(e=i.requestAnimationFrame,t=i.cancelAnimationFrame);let r=e(o=>{t=void 0,n(o)});return new Ve(()=>t?.(r))},requestAnimationFrame(...n){let{delegate:e}=Sr;return(e?.requestAnimationFrame||requestAnimationFrame)(...n)},cancelAnimationFrame(...n){let{delegate:e}=Sr;return(e?.cancelAnimationFrame||cancelAnimationFrame)(...n)},delegate:void 0};var Wm=Cr(n=>function(){n(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});var $e=(()=>{class n extends ae{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(t){let i=new Ea(this,this);return i.operator=t,i}_throwIfClosed(){if(this.closed)throw new Wm}next(t){wr(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(let i of this.currentObservers)i.next(t)}})}error(t){wr(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=t;let{observers:i}=this;for(;i.length;)i.shift().error(t)}})}complete(){wr(()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;let{observers:t}=this;for(;t.length;)t.shift().complete()}})}unsubscribe(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null}get observed(){var t;return((t=this.observers)===null||t===void 0?void 0:t.length)>0}_trySubscribe(t){return this._throwIfClosed(),super._trySubscribe(t)}_subscribe(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)}_innerSubscribe(t){let{hasError:i,isStopped:r,observers:o}=this;return i||r?Ad:(this.currentObservers=null,o.push(t),new Ve(()=>{this.currentObservers=null,Di(o,t)}))}_checkFinalizedStatuses(t){let{hasError:i,thrownError:r,isStopped:o}=this;i?t.error(r):o&&t.complete()}asObservable(){let t=new ae;return t.source=this,t}}return n.create=(e,t)=>new Ea(e,t),n})(),Ea=class extends $e{constructor(e,t){super(),this.destination=e,this.source=t}next(e){var t,i;(i=(t=this.destination)===null||t===void 0?void 0:t.next)===null||i===void 0||i.call(t,e)}error(e){var t,i;(i=(t=this.destination)===null||t===void 0?void 0:t.error)===null||i===void 0||i.call(t,e)}complete(){var e,t;(t=(e=this.destination)===null||e===void 0?void 0:e.complete)===null||t===void 0||t.call(e)}_subscribe(e){var t,i;return(i=(t=this.source)===null||t===void 0?void 0:t.subscribe(e))!==null&&i!==void 0?i:Ad}};var Eo=class extends $e{constructor(e){super(),this._value=e}get value(){return this.getValue()}_subscribe(e){let t=super._subscribe(e);return!t.closed&&e.next(this._value),t}getValue(){let{hasError:e,thrownError:t,_value:i}=this;if(e)throw t;return this._throwIfClosed(),i}next(e){super.next(this._value=e)}};var Do={now(){return(Do.delegate||Date).now()},delegate:void 0};var Mi=class extends $e{constructor(e=1/0,t=1/0,i=Do){super(),this._bufferSize=e,this._windowTime=t,this._timestampProvider=i,this._buffer=[],this._infiniteTimeWindow=!0,this._infiniteTimeWindow=t===1/0,this._bufferSize=Math.max(1,e),this._windowTime=Math.max(1,t)}next(e){let{isStopped:t,_buffer:i,_infiniteTimeWindow:r,_timestampProvider:o,_windowTime:s}=this;t||(i.push(e),!r&&i.push(o.now()+s)),this._trimBuffer(),super.next(e)}_subscribe(e){this._throwIfClosed(),this._trimBuffer();let t=this._innerSubscribe(e),{_infiniteTimeWindow:i,_buffer:r}=this,o=r.slice();for(let s=0;s<o.length&&!e.closed;s+=i?1:2)e.next(o[s]);return this._checkFinalizedStatuses(e),t}_trimBuffer(){let{_bufferSize:e,_timestampProvider:t,_buffer:i,_infiniteTimeWindow:r}=this,o=(r?1:2)*e;if(e<1/0&&o<i.length&&i.splice(0,i.length-o),!r){let s=t.now(),a=0;for(let l=1;l<i.length&&i[l]<=s;l+=2)a=l;a&&i.splice(0,a+1)}}};var Da=class extends Ve{constructor(e,t){super()}schedule(e,t=0){return this}};var So={setInterval(n,e,...t){let{delegate:i}=So;return i?.setInterval?i.setInterval(n,e,...t):setInterval(n,e,...t)},clearInterval(n){let{delegate:e}=So;return(e?.clearInterval||clearInterval)(n)},delegate:void 0};var Yn=class extends Da{constructor(e,t){super(e,t),this.scheduler=e,this.work=t,this.pending=!1}schedule(e,t=0){var i;if(this.closed)return this;this.state=e;let r=this.id,o=this.scheduler;return r!=null&&(this.id=this.recycleAsyncId(o,r,t)),this.pending=!0,this.delay=t,this.id=(i=this.id)!==null&&i!==void 0?i:this.requestAsyncId(o,this.id,t),this}requestAsyncId(e,t,i=0){return So.setInterval(e.flush.bind(e,this),i)}recycleAsyncId(e,t,i=0){if(i!=null&&this.delay===i&&this.pending===!1)return t;t!=null&&So.clearInterval(t)}execute(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;let i=this._execute(e,t);if(i)return i;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(e,t){let i=!1,r;try{this.work(e)}catch(o){i=!0,r=o||new Error("Scheduled action threw falsy error")}if(i)return this.unsubscribe(),r}unsubscribe(){if(!this.closed){let{id:e,scheduler:t}=this,{actions:i}=t;this.work=this.state=this.scheduler=null,this.pending=!1,Di(i,this),e!=null&&(this.id=this.recycleAsyncId(t,e,null)),this.delay=null,super.unsubscribe()}}};var zC=1,Hd,Ud={};function qm(n){return n in Ud?(delete Ud[n],!0):!1}var Zm={setImmediate(n){let e=zC++;return Ud[e]=!0,Hd||(Hd=Promise.resolve()),Hd.then(()=>qm(e)&&n()),e},clearImmediate(n){qm(n)}};var{setImmediate:GC,clearImmediate:WC}=Zm,To={setImmediate(...n){let{delegate:e}=To;return(e?.setImmediate||GC)(...n)},clearImmediate(n){let{delegate:e}=To;return(e?.clearImmediate||WC)(n)},delegate:void 0};var Sa=class extends Yn{constructor(e,t){super(e,t),this.scheduler=e,this.work=t}requestAsyncId(e,t,i=0){return i!==null&&i>0?super.requestAsyncId(e,t,i):(e.actions.push(this),e._scheduled||(e._scheduled=To.setImmediate(e.flush.bind(e,void 0))))}recycleAsyncId(e,t,i=0){var r;if(i!=null?i>0:this.delay>0)return super.recycleAsyncId(e,t,i);let{actions:o}=e;t!=null&&((r=o[o.length-1])===null||r===void 0?void 0:r.id)!==t&&(To.clearImmediate(t),e._scheduled===t&&(e._scheduled=void 0))}};var Tr=class n{constructor(e,t=n.now){this.schedulerActionCtor=e,this.now=t}schedule(e,t=0,i){return new this.schedulerActionCtor(this,e).schedule(i,t)}};Tr.now=Do.now;var Qn=class extends Tr{constructor(e,t=Tr.now){super(e,t),this.actions=[],this._active=!1}flush(e){let{actions:t}=this;if(this._active){t.push(e);return}let i;this._active=!0;do if(i=e.execute(e.state,e.delay))break;while(e=t.shift());if(this._active=!1,i){for(;e=t.shift();)e.unsubscribe();throw i}}};var Ta=class extends Qn{flush(e){this._active=!0;let t=this._scheduled;this._scheduled=void 0;let{actions:i}=this,r;e=e||i.shift();do if(r=e.execute(e.state,e.delay))break;while((e=i[0])&&e.id===t&&i.shift());if(this._active=!1,r){for(;(e=i[0])&&e.id===t&&i.shift();)e.unsubscribe();throw r}}};var zd=new Ta(Sa);var Mo=new Qn(Yn),Ym=Mo;var Ma=class extends Yn{constructor(e,t){super(e,t),this.scheduler=e,this.work=t}requestAsyncId(e,t,i=0){return i!==null&&i>0?super.requestAsyncId(e,t,i):(e.actions.push(this),e._scheduled||(e._scheduled=Sr.requestAnimationFrame(()=>e.flush(void 0))))}recycleAsyncId(e,t,i=0){var r;if(i!=null?i>0:this.delay>0)return super.recycleAsyncId(e,t,i);let{actions:o}=e;t!=null&&t===e._scheduled&&((r=o[o.length-1])===null||r===void 0?void 0:r.id)!==t&&(Sr.cancelAnimationFrame(t),e._scheduled=void 0)}};var Ia=class extends Qn{flush(e){this._active=!0;let t;e?t=e.id:(t=this._scheduled,this._scheduled=void 0);let{actions:i}=this,r;e=e||i.shift();do if(r=e.execute(e.state,e.delay))break;while((e=i[0])&&e.id===t&&i.shift());if(this._active=!1,r){for(;(e=i[0])&&e.id===t&&i.shift();)e.unsubscribe();throw r}}};var Gd=new Ia(Ma);function ka(n){return n&&ue(n.schedule)}function Qm(n){return n[n.length-1]}function Km(n){return ue(Qm(n))?n.pop():void 0}function Mr(n){return ka(Qm(n))?n.pop():void 0}function Jm(n,e,t,i){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(h){try{c(i.next(h))}catch(_){s(_)}}function l(h){try{c(i.throw(h))}catch(_){s(_)}}function c(h){h.done?o(h.value):r(h.value).then(a,l)}c((i=i.apply(n,e||[])).next())})}function Xm(n){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&n[e],i=0;if(t)return t.call(n);if(n&&typeof n.length=="number")return{next:function(){return n&&i>=n.length&&(n=void 0),{value:n&&n[i++],done:!n}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Ii(n){return this instanceof Ii?(this.v=n,this):new Ii(n)}function eg(n,e,t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i=t.apply(n,e||[]),r,o=[];return r=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",s),r[Symbol.asyncIterator]=function(){return this},r;function s(E){return function(P){return Promise.resolve(P).then(E,_)}}function a(E,P){i[E]&&(r[E]=function(V){return new Promise(function(z,B){o.push([E,V,z,B])>1||l(E,V)})},P&&(r[E]=P(r[E])))}function l(E,P){try{c(i[E](P))}catch(V){w(o[0][3],V)}}function c(E){E.value instanceof Ii?Promise.resolve(E.value.v).then(h,_):w(o[0][2],E)}function h(E){l("next",E)}function _(E){l("throw",E)}function w(E,P){E(P),o.shift(),o.length&&l(o[0][0],o[0][1])}}function tg(n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=n[Symbol.asyncIterator],t;return e?e.call(n):(n=typeof Xm=="function"?Xm(n):n[Symbol.iterator](),t={},i("next"),i("throw"),i("return"),t[Symbol.asyncIterator]=function(){return this},t);function i(o){t[o]=n[o]&&function(s){return new Promise(function(a,l){s=n[o](s),r(a,l,s.done,s.value)})}}function r(o,s,a,l){Promise.resolve(l).then(function(c){o({value:c,done:a})},s)}}var Pa=n=>n&&typeof n.length=="number"&&typeof n!="function";function Oa(n){return ue(n?.then)}function Ra(n){return ue(n[Er])}function Na(n){return Symbol.asyncIterator&&ue(n?.[Symbol.asyncIterator])}function Aa(n){return new TypeError(`You provided ${n!==null&&typeof n=="object"?"an invalid object":`'${n}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}function qC(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var La=qC();function Fa(n){return ue(n?.[La])}function Va(n){return eg(this,arguments,function*(){let t=n.getReader();try{for(;;){let{value:i,done:r}=yield Ii(t.read());if(r)return yield Ii(void 0);yield yield Ii(i)}}finally{t.releaseLock()}})}function Ba(n){return ue(n?.getReader)}function Re(n){if(n instanceof ae)return n;if(n!=null){if(Ra(n))return ZC(n);if(Pa(n))return YC(n);if(Oa(n))return QC(n);if(Na(n))return ng(n);if(Fa(n))return KC(n);if(Ba(n))return XC(n)}throw Aa(n)}function ZC(n){return new ae(e=>{let t=n[Er]();if(ue(t.subscribe))return t.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function YC(n){return new ae(e=>{for(let t=0;t<n.length&&!e.closed;t++)e.next(n[t]);e.complete()})}function QC(n){return new ae(e=>{n.then(t=>{e.closed||(e.next(t),e.complete())},t=>e.error(t)).then(null,xa)})}function KC(n){return new ae(e=>{for(let t of n)if(e.next(t),e.closed)return;e.complete()})}function ng(n){return new ae(e=>{JC(n,e).catch(t=>e.error(t))})}function XC(n){return ng(Va(n))}function JC(n,e){var t,i,r,o;return Jm(this,void 0,void 0,function*(){try{for(t=tg(n);i=yield t.next(),!i.done;){let s=i.value;if(e.next(s),e.closed)return}}catch(s){r={error:s}}finally{try{i&&!i.done&&(o=t.return)&&(yield o.call(t))}finally{if(r)throw r.error}}e.complete()})}function Bt(n,e,t,i=0,r=!1){let o=e.schedule(function(){t(),r?n.add(this.schedule(null,i)):this.unsubscribe()},i);if(n.add(o),!r)return o}function ja(n,e=0){return ye((t,i)=>{t.subscribe(Ce(i,r=>Bt(i,n,()=>i.next(r),e),()=>Bt(i,n,()=>i.complete(),e),r=>Bt(i,n,()=>i.error(r),e)))})}function $a(n,e=0){return ye((t,i)=>{i.add(n.schedule(()=>t.subscribe(i),e))})}function ig(n,e){return Re(n).pipe($a(e),ja(e))}function rg(n,e){return Re(n).pipe($a(e),ja(e))}function og(n,e){return new ae(t=>{let i=0;return e.schedule(function(){i===n.length?t.complete():(t.next(n[i++]),t.closed||this.schedule())})})}function sg(n,e){return new ae(t=>{let i;return Bt(t,e,()=>{i=n[La](),Bt(t,e,()=>{let r,o;try{({value:r,done:o}=i.next())}catch(s){t.error(s);return}o?t.complete():t.next(r)},0,!0)}),()=>ue(i?.return)&&i.return()})}function Ha(n,e){if(!n)throw new Error("Iterable cannot be null");return new ae(t=>{Bt(t,e,()=>{let i=n[Symbol.asyncIterator]();Bt(t,e,()=>{i.next().then(r=>{r.done?t.complete():t.next(r.value)})},0,!0)})})}function ag(n,e){return Ha(Va(n),e)}function lg(n,e){if(n!=null){if(Ra(n))return ig(n,e);if(Pa(n))return og(n,e);if(Oa(n))return rg(n,e);if(Na(n))return Ha(n,e);if(Fa(n))return sg(n,e);if(Ba(n))return ag(n,e)}throw Aa(n)}function Ua(n,e){return e?lg(n,e):Re(n)}function De(...n){let e=Mr(n);return Ua(n,e)}function Wd(n,e){let t=ue(n)?n:()=>n,i=r=>r.error(t());return new ae(e?r=>e.schedule(i,0,r):i)}function Io(n){return!!n&&(n instanceof ae||ue(n.lift)&&ue(n.subscribe))}var cg=Cr(n=>function(){n(this),this.name="EmptyError",this.message="no elements in sequence"});function za(n,e){let t=typeof e=="object";return new Promise((i,r)=>{let o=new Jt({next:s=>{i(s),o.unsubscribe()},error:r,complete:()=>{t?i(e.defaultValue):r(new cg)}});n.subscribe(o)})}function dg(n){return n instanceof Date&&!isNaN(n)}function qe(n,e){return ye((t,i)=>{let r=0;t.subscribe(Ce(i,o=>{i.next(n.call(e,o,r++))}))})}var{isArray:ex}=Array;function tx(n,e){return ex(e)?n(...e):n(e)}function ug(n){return qe(e=>tx(n,e))}var{isArray:nx}=Array,{getPrototypeOf:ix,prototype:rx,keys:ox}=Object;function fg(n){if(n.length===1){let e=n[0];if(nx(e))return{args:e,keys:null};if(sx(e)){let t=ox(e);return{args:t.map(i=>e[i]),keys:t}}}return{args:n,keys:null}}function sx(n){return n&&typeof n=="object"&&ix(n)===rx}function pg(n,e){return n.reduce((t,i,r)=>(t[i]=e[r],t),{})}function hg(n,e,t,i,r,o,s,a){let l=[],c=0,h=0,_=!1,w=()=>{_&&!l.length&&!c&&e.complete()},E=V=>c<i?P(V):l.push(V),P=V=>{o&&e.next(V),c++;let z=!1;Re(t(V,h++)).subscribe(Ce(e,B=>{r?.(B),o?E(B):e.next(B)},()=>{z=!0},void 0,()=>{if(z)try{for(c--;l.length&&c<i;){let B=l.shift();s?Bt(e,s,()=>P(B)):P(B)}w()}catch(B){e.error(B)}}))};return n.subscribe(Ce(e,E,()=>{_=!0,w()})),()=>{a?.()}}function Ir(n,e,t=1/0){return ue(e)?Ir((i,r)=>qe((o,s)=>e(i,o,r,s))(Re(n(i,r))),t):(typeof e=="number"&&(t=e),ye((i,r)=>hg(i,r,n,t)))}function mg(n=1/0){return Ir(Dr,n)}function gg(){return mg(1)}function qd(...n){return gg()(Ua(n,Mr(n)))}function Zd(n){return new ae(e=>{Re(n()).subscribe(e)})}function Ga(...n){let e=Km(n),{args:t,keys:i}=fg(n),r=new ae(o=>{let{length:s}=t;if(!s){o.complete();return}let a=new Array(s),l=s,c=s;for(let h=0;h<s;h++){let _=!1;Re(t[h]).subscribe(Ce(o,w=>{_||(_=!0,c--),a[h]=w},()=>l--,void 0,()=>{(!l||!_)&&(c||o.next(i?pg(i,a):a),o.complete())}))}});return e?r.pipe(ug(e)):r}function _g(n=0,e,t=Ym){let i=-1;return e!=null&&(ka(e)?t=e:i=e),new ae(r=>{let o=dg(n)?+n-t.now():n;o<0&&(o=0);let s=0;return t.schedule(function(){r.closed||(r.next(s++),0<=i?this.schedule(void 0,i):r.complete())},o)})}function ko(n,e){return ye((t,i)=>{let r=0;t.subscribe(Ce(i,o=>n.call(e,o,r++)&&i.next(o)))})}function vg(n){return ye((e,t)=>{let i=!1,r=null,o=null,s=!1,a=()=>{if(o?.unsubscribe(),o=null,i){i=!1;let c=r;r=null,t.next(c)}s&&t.complete()},l=()=>{o=null,s&&t.complete()};e.subscribe(Ce(t,c=>{i=!0,r=c,o||Re(n(c)).subscribe(o=Ce(t,a,l))},()=>{s=!0,(!i||!o||o.closed)&&t.complete()}))})}function Po(n,e=Mo){return vg(()=>_g(n,e))}function rt(n){return ye((e,t)=>{let i=null,r=!1,o;i=e.subscribe(Ce(t,void 0,void 0,s=>{o=Re(n(s,rt(n)(e))),i?(i.unsubscribe(),i=null,o.subscribe(t)):r=!0})),r&&(i.unsubscribe(),i=null,o.subscribe(t))})}function Yd(n,e){return ue(e)?Ir(n,e,1):Ir(n,1)}function Qd(n,e=Mo){return ye((t,i)=>{let r=null,o=null,s=null,a=()=>{if(r){r.unsubscribe(),r=null;let c=o;o=null,i.next(c)}};function l(){let c=s+n,h=e.now();if(h<c){r=this.schedule(void 0,c-h),i.add(r);return}a()}t.subscribe(Ce(i,c=>{o=c,s=e.now(),r||(r=e.schedule(l,n),i.add(r))},()=>{a(),i.complete()},void 0,()=>{o=r=null}))})}function Oo(n,e=Dr){return n=n??ax,ye((t,i)=>{let r,o=!0;t.subscribe(Ce(i,s=>{let a=e(s);(o||!n(r,a))&&(o=!1,r=a,i.next(s))}))})}function ax(n,e){return n===e}function kr(n){return ye((e,t)=>{try{e.subscribe(t)}finally{t.add(n)}})}function Kd(){return ye((n,e)=>{let t,i=!1;n.subscribe(Ce(e,r=>{let o=t;t=r,i&&e.next([o,r]),i=!0}))})}function yg(n={}){let{connector:e=()=>new $e,resetOnError:t=!0,resetOnComplete:i=!0,resetOnRefCountZero:r=!0}=n;return o=>{let s,a,l,c=0,h=!1,_=!1,w=()=>{a?.unsubscribe(),a=void 0},E=()=>{w(),s=l=void 0,h=_=!1},P=()=>{let V=s;E(),V?.unsubscribe()};return ye((V,z)=>{c++,!_&&!h&&w();let B=l=l??e();z.add(()=>{c--,c===0&&!_&&!h&&(a=Xd(P,r))}),B.subscribe(z),!s&&c>0&&(s=new Jt({next:_e=>B.next(_e),error:_e=>{_=!0,w(),a=Xd(E,t,_e),B.error(_e)},complete:()=>{h=!0,w(),a=Xd(E,i),B.complete()}}),Re(V).subscribe(s))})(o)}}function Xd(n,e,...t){if(e===!0){n();return}if(e===!1)return;let i=new Jt({next:()=>{i.unsubscribe(),n()}});return Re(e(...t)).subscribe(i)}function Pr(n,e,t){let i,r=!1;return n&&typeof n=="object"?{bufferSize:i=1/0,windowTime:e=1/0,refCount:r=!1,scheduler:t}=n:i=n??1/0,yg({connector:()=>new Mi(i,e,t),resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:r})}function Wa(...n){let e=Mr(n);return ye((t,i)=>{(e?qd(n,t,e):qd(n,t)).subscribe(i)})}function Tt(n,e){return ye((t,i)=>{let r=null,o=0,s=!1,a=()=>s&&!r&&i.complete();t.subscribe(Ce(i,l=>{r?.unsubscribe();let c=0,h=o++;Re(n(l,h)).subscribe(r=Ce(i,_=>i.next(e?e(l,_,h,c++):_),()=>{r=null,a()}))},()=>{s=!0,a()}))})}function ki(n){return ye((e,t)=>{Re(n).subscribe(Ce(t,()=>t.complete(),xo)),!t.closed&&e.subscribe(t)})}function bg(n){let e=ne(null);try{return n()}finally{ne(e)}}var Cg=le(G({},Ci),{consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!0,dirty:!0,kind:"effect"});function xg(n){if(n.dirty=!1,n.version>0&&!Ei(n))return;n.version++;let e=qn(n);try{n.cleanup(),n.fn()}finally{wi(n,e)}}var Ka="https://angular.dev/best-practices/security#preventing-cross-site-scripting-xss",q=class extends Error{code;constructor(e,t){super(Li(e,t)),this.code=e}};function lx(n){return`NG0${Math.abs(n)}`}function Li(n,e){return`${lx(n)}${e?": "+e:""}`}var en=globalThis;function Te(n){for(let e in n)if(n[e]===Te)return e;throw Error("")}function Dg(n,e){for(let t in e)e.hasOwnProperty(t)&&!n.hasOwnProperty(t)&&(n[t]=e[t])}function Xn(n){if(typeof n=="string")return n;if(Array.isArray(n))return`[${n.map(Xn).join(", ")}]`;if(n==null)return""+n;let e=n.overriddenName||n.name;if(e)return`${e}`;let t=n.toString();if(t==null)return""+t;let i=t.indexOf(`
4
+ `);return i>=0?t.slice(0,i):t}function Xa(n,e){return n?e?`${n} ${e}`:n:e||""}var cx=Te({__forward_ref__:Te});function Rr(n){return n.__forward_ref__=Rr,n.toString=function(){return Xn(this())},n}function ft(n){return Sg(n)?n():n}function Sg(n){return typeof n=="function"&&n.hasOwnProperty(cx)&&n.__forward_ref__===Rr}function re(n){return{token:n.token,providedIn:n.providedIn||null,factory:n.factory,value:void 0}}function Ja(n){return dx(n,el)}function dx(n,e){return n.hasOwnProperty(e)&&n[e]||null}function ux(n){let e=n?.[el]??null;return e||null}function eu(n){return n&&n.hasOwnProperty(Ya)?n[Ya]:null}var el=Te({\u0275prov:Te}),Ya=Te({\u0275inj:Te}),ee=class{_desc;ngMetadataName="InjectionToken";\u0275prov;constructor(e,t){this._desc=e,this.\u0275prov=void 0,typeof t=="number"?this.__NG_ELEMENT_ID__=t:t!==void 0&&(this.\u0275prov=re({token:this,providedIn:t.providedIn||"root",factory:t.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}};function uu(n){return n&&!!n.\u0275providers}var fu=Te({\u0275cmp:Te}),pu=Te({\u0275dir:Te}),hu=Te({\u0275pipe:Te});var tu=Te({\u0275fac:Te}),Fi=Te({__NG_ELEMENT_ID__:Te}),wg=Te({__NG_ENV_ID__:Te});function tn(n){return typeof n=="string"?n:n==null?"":String(n)}function Tg(n){return typeof n=="function"?n.name||n.toString():typeof n=="object"&&n!=null&&typeof n.type=="function"?n.type.name||n.type.toString():tn(n)}var Mg=Te({ngErrorCode:Te}),fx=Te({ngErrorMessage:Te}),px=Te({ngTokenPath:Te});function mu(n,e){return Ig("",-200,e)}function tl(n,e){throw new q(-201,!1)}function Ig(n,e,t){let i=new q(e,n);return i[Mg]=e,i[fx]=n,t&&(i[px]=t),i}function hx(n){return n[Mg]}var nu;function kg(){return nu}function yt(n){let e=nu;return nu=n,e}function gu(n,e,t){let i=Ja(n);if(i&&i.providedIn=="root")return i.value===void 0?i.value=i.factory():i.value;if(t&8)return null;if(e!==void 0)return e;tl(n,"Injector")}var mx={},Pi=mx,iu="__NG_DI_FLAG__",ru=class{injector;constructor(e){this.injector=e}retrieve(e,t){let i=Oi(t)||0;try{return this.injector.get(e,i&8?null:Pi,i)}catch(r){if(vr(r))return r;throw r}}};function gx(n,e=0){let t=ua();if(t===void 0)throw new q(-203,!1);if(t===null)return gu(n,void 0,e);{let i=_x(e),r=t.retrieve(n,i);if(vr(r)){if(i.optional)return null;throw r}return r}}function me(n,e=0){return(kg()||gx)(ft(n),e)}function k(n,e){return me(n,Oi(e))}function Oi(n){return typeof n>"u"||typeof n=="number"?n:0|(n.optional&&8)|(n.host&&1)|(n.self&&2)|(n.skipSelf&&4)}function _x(n){return{optional:!!(n&8),host:!!(n&1),self:!!(n&2),skipSelf:!!(n&4)}}function ou(n){let e=[];for(let t=0;t<n.length;t++){let i=ft(n[t]);if(Array.isArray(i)){if(i.length===0)throw new q(900,!1);let r,o=0;for(let s=0;s<i.length;s++){let a=i[s],l=vx(a);typeof l=="number"?l===-1?r=a.token:o|=l:r=a}e.push(me(r,o))}else e.push(me(i))}return e}function _u(n,e){return n[iu]=e,n.prototype[iu]=e,n}function vx(n){return n[iu]}function Ri(n,e){let t=n.hasOwnProperty(tu);return t?n[tu]:null}function Pg(n,e,t){if(n.length!==e.length)return!1;for(let i=0;i<n.length;i++){let r=n[i],o=e[i];if(t&&(r=t(r),o=t(o)),o!==r)return!1}return!0}function Og(n){return n.flat(Number.POSITIVE_INFINITY)}function nl(n,e){n.forEach(t=>Array.isArray(t)?nl(t,e):e(t))}function vu(n,e,t){e>=n.length?n.push(t):n.splice(e,0,t)}function Fo(n,e){return e>=n.length-1?n.pop():n.splice(e,1)[0]}function Rg(n,e){let t=[];for(let i=0;i<n;i++)t.push(e);return t}function Ng(n,e,t,i){let r=n.length;if(r==e)n.push(t,i);else if(r===1)n.push(i,n[0]),n[0]=t;else{for(r--,n.push(n[r-1],n[r]);r>e;){let o=r-2;n[r]=n[o],r--}n[e]=t,n[e+1]=i}}function il(n,e,t){let i=Nr(n,e);return i>=0?n[i|1]=t:(i=~i,Ng(n,i,e,t)),i}function rl(n,e){let t=Nr(n,e);if(t>=0)return n[t|1]}function Nr(n,e){return yx(n,e,1)}function yx(n,e,t){let i=0,r=n.length>>t;for(;r!==i;){let o=i+(r-i>>1),s=n[o<<t];if(e===s)return o<<t;s>e?r=o:i=o+1}return~(r<<t)}var ei={},jt=[],Vi=new ee(""),yu=new ee("",-1),bu=new ee(""),No=class{get(e,t=Pi){if(t===Pi){let r=Ig("",-201);throw r.name="\u0275NotFound",r}return t}};function Bi(n){return n[fu]||null}function Cu(n){return n[pu]||null}function Ag(n){return n[hu]||null}function Vo(n){return{\u0275providers:n}}function Lg(...n){return{\u0275providers:xu(!0,n),\u0275fromNgModule:!0}}function xu(n,...e){let t=[],i=new Set,r,o=s=>{t.push(s)};return nl(e,s=>{let a=s;Qa(a,o,[],i)&&(r||=[],r.push(a))}),r!==void 0&&Fg(r,o),t}function Fg(n,e){for(let t=0;t<n.length;t++){let{ngModule:i,providers:r}=n[t];wu(r,o=>{e(o,i)})}}function Qa(n,e,t,i){if(n=ft(n),!n)return!1;let r=null,o=eu(n),s=!o&&Bi(n);if(!o&&!s){let l=n.ngModule;if(o=eu(l),o)r=l;else return!1}else{if(s&&!s.standalone)return!1;r=n}let a=i.has(r);if(s){if(a)return!1;if(i.add(r),s.dependencies){let l=typeof s.dependencies=="function"?s.dependencies():s.dependencies;for(let c of l)Qa(c,e,t,i)}}else if(o){if(o.imports!=null&&!a){i.add(r);let c;nl(o.imports,h=>{Qa(h,e,t,i)&&(c||=[],c.push(h))}),c!==void 0&&Fg(c,e)}if(!a){let c=Ri(r)||(()=>new r);e({provide:r,useFactory:c,deps:jt},r),e({provide:bu,useValue:r,multi:!0},r),e({provide:Vi,useValue:()=>me(r),multi:!0},r)}let l=o.providers;if(l!=null&&!a){let c=n;wu(l,h=>{e(h,c)})}}else return!1;return r!==n&&n.providers!==void 0}function wu(n,e){for(let t of n)uu(t)&&(t=t.\u0275providers),Array.isArray(t)?wu(t,e):e(t)}var bx=Te({provide:String,useValue:Te});function Vg(n){return n!==null&&typeof n=="object"&&bx in n}function Cx(n){return!!(n&&n.useExisting)}function xx(n){return!!(n&&n.useFactory)}function Ni(n){return typeof n=="function"}function Bg(n){return!!n.useClass}var Bo=new ee(""),qa={},Eg={},Jd;function jo(){return Jd===void 0&&(Jd=new No),Jd}var Mt=class{},Ai=class extends Mt{parent;source;scopes;records=new Map;_ngOnDestroyHooks=new Set;_onDestroyHooks=[];get destroyed(){return this._destroyed}_destroyed=!1;injectorDefTypes;constructor(e,t,i,r){super(),this.parent=t,this.source=i,this.scopes=r,au(e,s=>this.processProvider(s)),this.records.set(yu,Or(void 0,this)),r.has("environment")&&this.records.set(Mt,Or(void 0,this));let o=this.records.get(Bo);o!=null&&typeof o.value=="string"&&this.scopes.add(o.value),this.injectorDefTypes=new Set(this.get(bu,jt,{self:!0}))}retrieve(e,t){let i=Oi(t)||0;try{return this.get(e,Pi,i)}catch(r){if(vr(r))return r;throw r}}destroy(){Ro(this),this._destroyed=!0;let e=ne(null);try{for(let i of this._ngOnDestroyHooks)i.ngOnDestroy();let t=this._onDestroyHooks;this._onDestroyHooks=[];for(let i of t)i()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),ne(e)}}onDestroy(e){return Ro(this),this._onDestroyHooks.push(e),()=>this.removeOnDestroy(e)}runInContext(e){Ro(this);let t=vn(this),i=yt(void 0),r;try{return e()}finally{vn(t),yt(i)}}get(e,t=Pi,i){if(Ro(this),e.hasOwnProperty(wg))return e[wg](this);let r=Oi(i),o,s=vn(this),a=yt(void 0);try{if(!(r&4)){let c=this.records.get(e);if(c===void 0){let h=Tx(e)&&Ja(e);h&&this.injectableDefInScope(h)?c=Or(su(e),qa):c=null,this.records.set(e,c)}if(c!=null)return this.hydrate(e,c,r)}let l=r&2?jo():this.parent;return t=r&8&&t===Pi?null:t,l.get(e,t)}catch(l){let c=hx(l);throw c===-200||c===-201?new q(c,null):l}finally{yt(a),vn(s)}}resolveInjectorInitializers(){let e=ne(null),t=vn(this),i=yt(void 0),r;try{let o=this.get(Vi,jt,{self:!0});for(let s of o)s()}finally{vn(t),yt(i),ne(e)}}toString(){let e=[],t=this.records;for(let i of t.keys())e.push(Xn(i));return`R3Injector[${e.join(", ")}]`}processProvider(e){e=ft(e);let t=Ni(e)?e:ft(e&&e.provide),i=Ex(e);if(!Ni(e)&&e.multi===!0){let r=this.records.get(t);r||(r=Or(void 0,qa,!0),r.factory=()=>ou(r.multi),this.records.set(t,r)),t=e,r.multi.push(e)}this.records.set(t,i)}hydrate(e,t,i){let r=ne(null);try{if(t.value===Eg)throw mu(Xn(e));return t.value===qa&&(t.value=Eg,t.value=t.factory(void 0,i)),typeof t.value=="object"&&t.value&&Sx(t.value)&&this._ngOnDestroyHooks.add(t.value),t.value}finally{ne(r)}}injectableDefInScope(e){if(!e.providedIn)return!1;let t=ft(e.providedIn);return typeof t=="string"?t==="any"||this.scopes.has(t):this.injectorDefTypes.has(t)}removeOnDestroy(e){let t=this._onDestroyHooks.indexOf(e);t!==-1&&this._onDestroyHooks.splice(t,1)}};function su(n){let e=Ja(n),t=e!==null?e.factory:Ri(n);if(t!==null)return t;if(n instanceof ee)throw new q(204,!1);if(n instanceof Function)return wx(n);throw new q(204,!1)}function wx(n){if(n.length>0)throw new q(204,!1);let t=ux(n);return t!==null?()=>t.factory(n):()=>new n}function Ex(n){if(Vg(n))return Or(void 0,n.useValue);{let e=Eu(n);return Or(e,qa)}}function Eu(n,e,t){let i;if(Ni(n)){let r=ft(n);return Ri(r)||su(r)}else if(Vg(n))i=()=>ft(n.useValue);else if(xx(n))i=()=>n.useFactory(...ou(n.deps||[]));else if(Cx(n))i=(r,o)=>me(ft(n.useExisting),o!==void 0&&o&8?8:void 0);else{let r=ft(n&&(n.useClass||n.provide));if(Dx(n))i=()=>new r(...ou(n.deps));else return Ri(r)||su(r)}return i}function Ro(n){if(n.destroyed)throw new q(205,!1)}function Or(n,e,t=!1){return{factory:n,value:e,multi:t?[]:void 0}}function Dx(n){return!!n.deps}function Sx(n){return n!==null&&typeof n=="object"&&typeof n.ngOnDestroy=="function"}function Tx(n){return typeof n=="function"||typeof n=="object"&&n.ngMetadataName==="InjectionToken"}function au(n,e){for(let t of n)Array.isArray(t)?au(t,e):t&&uu(t)?au(t.\u0275providers,e):e(t)}function Ar(n,e){let t;n instanceof Ai?(Ro(n),t=n):t=new ru(n);let i,r=vn(t),o=yt(void 0);try{return e()}finally{vn(r),yt(o)}}function jg(){return kg()!==void 0||ua()!=null}var nn=0,K=1,ie=2,Xe=3,Ht=4,Ct=5,ji=6,Lr=7,Ge=8,Rn=9,yn=10,Pe=11,Fr=12,Du=13,$i=14,xt=15,ti=16,Hi=17,bn=18,$o=19,Su=20,On=21,ol=22,Nn=23,Rt=24,Ui=25,zi=26,Ne=27,$g=1,Tu=6,ni=7,Ho=8,Gi=9,He=10;function Cn(n){return Array.isArray(n)&&typeof n[$g]=="object"}function rn(n){return Array.isArray(n)&&n[$g]===!0}function Mu(n){return(n.flags&4)!==0}function ii(n){return n.componentOffset>-1}function Vr(n){return(n.flags&1)===1}function xn(n){return!!n.template}function Br(n){return(n[ie]&512)!==0}function Wi(n){return(n[ie]&256)===256}var vt=(function(n){return n[n.NONE=0]="NONE",n[n.HTML=1]="HTML",n[n.STYLE=2]="STYLE",n[n.SCRIPT=3]="SCRIPT",n[n.URL=4]="URL",n[n.RESOURCE_URL=5]="RESOURCE_URL",n[n.ATTRIBUTE_NO_BINDING=6]="ATTRIBUTE_NO_BINDING",n})(vt||{}),Za,Ao="svg",Iu="math";function Hg(){return Za||(Za={},Kn(vt.HTML,void 0,[["iframe",["srcdoc"]],["*",["innerHTML","outerHTML"]]]),Kn(vt.STYLE,void 0,[["*",["style"]]]),Kn(vt.URL,void 0,[["*",["formAction"]],["area",["href"]],["a",["href","xlink:href"]],["form",["action"]],["img",["src"]],["video",["src"]]]),Kn(vt.URL,Iu,[["*",["href","xlink:href"]],["annotation",["href","xlink:href"]],["annotation-xml",["href","xlink:href"]],["maction",["href","xlink:href"]],["malignmark",["href","xlink:href"]],["math",["href","xlink:href"]],["mroot",["href","xlink:href"]],["msqrt",["href","xlink:href"]],["merror",["href","xlink:href"]],["mfrac",["href","xlink:href"]],["mglyph",["href","xlink:href"]],["msub",["href","xlink:href"]],["msup",["href","xlink:href"]],["msubsup",["href","xlink:href"]],["mmultiscripts",["href","xlink:href"]],["mprescripts",["href","xlink:href"]],["mi",["href","xlink:href"]],["mn",["href","xlink:href"]],["mo",["href","xlink:href"]],["mpadded",["href","xlink:href"]],["mphantom",["href","xlink:href"]],["mrow",["href","xlink:href"]],["ms",["href","xlink:href"]],["mspace",["href","xlink:href"]],["mstyle",["href","xlink:href"]],["mtable",["href","xlink:href"]],["mtd",["href","xlink:href"]],["mtr",["href","xlink:href"]],["mtext",["href","xlink:href"]],["mover",["href","xlink:href"]],["munder",["href","xlink:href"]],["munderover",["href","xlink:href"]],["semantics",["href","xlink:href"]],["none",["href","xlink:href"]]]),Kn(vt.RESOURCE_URL,void 0,[["base",["href"]],["embed",["src"]],["frame",["src"]],["iframe",["src"]],["link",["href"]],["object",["codebase","data"]]]),Kn(vt.URL,Ao,[["a",["href","xlink:href"]]]),Kn(vt.ATTRIBUTE_NO_BINDING,Ao,[["animate",["attributeName","values","to","from"]],["set",["to","attributeName"]],["animateMotion",["attributeName"]],["animateTransform",["attributeName"]]]),Kn(vt.ATTRIBUTE_NO_BINDING,void 0,[["unknown",["attributeName","values","to","from","sandbox","allow","allowFullscreen","referrerPolicy","csp","fetchPriority"]],["iframe",["sandbox","allow","allowFullscreen","referrerPolicy","csp","fetchPriority"]]])),Za}function Kn(n,e,t){for(let[i,r]of t){let o=e&&i!=="unknown"?`:${e}:${i}`:i;o=o.toLowerCase();for(let s of r)Za[`${o}|${s.toLowerCase()}`]=n}}function Ug(n,e,t){let i=Hg(),r=n.toLowerCase(),o=e.toLowerCase(),s=t&&r!=="*"&&r!=="unknown"?i[`:${t}:${r}|${o}`]:void 0,a=t?i[`:${t}:*|${o}`]:void 0;return s??a??i[`${r}|${o}`]??i[`*|${o}`]??vt.NONE}function Ut(n){for(;Array.isArray(n);)n=n[nn];return n}function ku(n,e){return Ut(e[n])}function zt(n,e){return Ut(e[n.index])}function Uo(n,e){return n.data[e]}function sl(n,e){return n[e]}function Pu(n,e,t,i){t>=n.data.length&&(n.data[t]=null,n.blueprint[t]=null),e[t]=i}function Gt(n,e){let t=e[n];return Cn(t)?t:t[nn]}function zg(n){return(n[ie]&4)===4}function al(n){return(n[ie]&128)===128}function Gg(n){return rn(n[Xe])}function Wt(n,e){return e==null?null:n[e]}function Ou(n){n[Hi]=0}function Ru(n){n[ie]&1024||(n[ie]|=1024,al(n)&&ri(n))}function Wg(n,e){for(;n>0;)e=e[$i],n--;return e}function zo(n){return!!(n[ie]&9216||n[Rt]?.dirty)}function ll(n){n[yn].changeDetectionScheduler?.notify(8),n[ie]&64&&(n[ie]|=1024),zo(n)&&ri(n)}function ri(n){n[yn].changeDetectionScheduler?.notify(0);let e=Jn(n);for(;e!==null&&!(e[ie]&8192||(e[ie]|=8192,!al(e)));)e=Jn(e)}function Nu(n,e){if(Wi(n))throw new q(911,!1);n[On]===null&&(n[On]=[]),n[On].push(e)}function qg(n,e){if(n[On]===null)return;let t=n[On].indexOf(e);t!==-1&&n[On].splice(t,1)}function Jn(n){let e=n[Xe];return rn(e)?e[Xe]:e}function Au(n){return n[Lr]??=[]}function Lu(n){return n.cleanup??=[]}function Zg(n,e,t,i){let r=Au(e);r.push(t),n.firstCreatePass&&Lu(n).push(i,r.length-1)}var de={lFrame:o0(null),bindingsEnabled:!0,skipHydrationRootTNode:null};var lu=!1;function Yg(){return de.lFrame.elementDepthCount}function Qg(){de.lFrame.elementDepthCount++}function Fu(){de.lFrame.elementDepthCount--}function cl(){return de.bindingsEnabled}function Vu(){return de.skipHydrationRootTNode!==null}function Bu(n){return de.skipHydrationRootTNode===n}function ju(){de.skipHydrationRootTNode=null}function te(){return de.lFrame.lView}function Ue(){return de.lFrame.tView}function y(n){return de.lFrame.contextLView=n,n[Ge]}function b(n){return de.lFrame.contextLView=null,n}function at(){let n=$u();for(;n!==null&&n.type===64;)n=n.parent;return n}function $u(){return de.lFrame.currentTNode}function Kg(){let n=de.lFrame,e=n.currentTNode;return n.isParent?e:e.parent}function jr(n,e){let t=de.lFrame;t.currentTNode=n,t.isParent=e}function Hu(){return de.lFrame.isParent}function Uu(){de.lFrame.isParent=!1}function Xg(){return de.lFrame.contextLView}function zu(){return lu}function $r(n){let e=lu;return lu=n,e}function Go(){let n=de.lFrame,e=n.bindingRootIndex;return e===-1&&(e=n.bindingRootIndex=n.tView.bindingStartIndex),e}function Gu(){return de.lFrame.bindingIndex}function Jg(n){return de.lFrame.bindingIndex=n}function qi(){return de.lFrame.bindingIndex++}function Wo(n){let e=de.lFrame,t=e.bindingIndex;return e.bindingIndex=e.bindingIndex+n,t}function e0(){return de.lFrame.inI18n}function t0(n,e){let t=de.lFrame;t.bindingIndex=t.bindingRootIndex=n,dl(e)}function n0(){return de.lFrame.currentDirectiveIndex}function dl(n){de.lFrame.currentDirectiveIndex=n}function i0(n){let e=de.lFrame.currentDirectiveIndex;return e===-1?null:n[e]}function ul(){return de.lFrame.currentQueryIndex}function qo(n){de.lFrame.currentQueryIndex=n}function Mx(n){let e=n[K];return e.type===2?e.declTNode:e.type===1?n[Ct]:null}function Wu(n,e,t){if(t&4){let r=e,o=n;for(;r=r.parent,r===null&&!(t&1);)if(r=Mx(o),r===null||(o=o[$i],r.type&10))break;if(r===null)return!1;e=r,n=o}let i=de.lFrame=r0();return i.currentTNode=e,i.lView=n,!0}function fl(n){let e=r0(),t=n[K];de.lFrame=e,e.currentTNode=t.firstChild,e.lView=n,e.tView=t,e.contextLView=n,e.bindingIndex=t.bindingStartIndex,e.inI18n=!1}function r0(){let n=de.lFrame,e=n===null?null:n.child;return e===null?o0(n):e}function o0(n){let e={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:n,child:null,inI18n:!1};return n!==null&&(n.child=e),e}function s0(){let n=de.lFrame;return de.lFrame=n.parent,n.currentTNode=null,n.lView=null,n}var qu=s0;function pl(){let n=s0();n.isParent=!0,n.tView=null,n.selectedIndex=-1,n.contextLView=null,n.elementDepthCount=0,n.currentDirectiveIndex=-1,n.currentNamespace=null,n.bindingRootIndex=-1,n.bindingIndex=-1,n.currentQueryIndex=0}function a0(n){return(de.lFrame.contextLView=Wg(n,de.lFrame.contextLView))[Ge]}function qt(){return de.lFrame.selectedIndex}function oi(n){de.lFrame.selectedIndex=n}function Zo(){let n=de.lFrame;return Uo(n.tView,n.selectedIndex)}function F(){de.lFrame.currentNamespace=Ao}function he(){Ix()}function Ix(){de.lFrame.currentNamespace=null}function Zu(){return de.lFrame.currentNamespace}var l0=!0;function hl(){return l0}function Yo(n){l0=n}function cu(n,e=null,t=null,i){let r=c0(n,e,t,i);return r.resolveInjectorInitializers(),r}function c0(n,e=null,t=null,i,r=new Set){let o=[t||jt,Lg(n)];return i=i||(typeof n=="object"?void 0:Xn(n)),new Ai(o,e||jo(),i||null,r)}var bt=class n{static THROW_IF_NOT_FOUND=Pi;static NULL=new No;static create(e,t){if(Array.isArray(e))return cu({name:""},t,e,"");{let i=e.name??"";return cu({name:i},e.parent,e.providers,i)}}static \u0275prov=re({token:n,providedIn:"any",factory:()=>me(yu)});static __NG_ELEMENT_ID__=-1},lt=new ee(""),Je=(()=>{class n{static __NG_ELEMENT_ID__=kx;static __NG_ENV_ID__=t=>t}return n})(),Lo=class extends Je{_lView;constructor(e){super(),this._lView=e}get destroyed(){return Wi(this._lView)}onDestroy(e){let t=this._lView;return Nu(t,e),()=>qg(t,e)}};function kx(){return new Lo(te())}var Ot=class{_console=console;handleError(e){this._console.error("ERROR",e)}},on=new ee("",{providedIn:"root",factory:()=>{let n=k(Mt),e;return t=>{n.destroyed&&!e?setTimeout(()=>{throw t}):(e??=n.get(Ot),e.handleError(t))}}}),d0={provide:Vi,useValue:()=>{k(Ot)},multi:!0};function x(n,e){let[t,i,r]=Rd(n,e?.equal),o=t,s=o[it];return o.set=i,o.update=r,o.asReadonly=Yu.bind(o),o}function Yu(){let n=this[it];if(n.readonlyFn===void 0){let e=()=>this();e[it]=n,n.readonlyFn=e}return n.readonlyFn}var Zi=(()=>{class n{view;node;constructor(t,i){this.view=t,this.node=i}static __NG_ELEMENT_ID__=Px}return n})();function Px(){return new Zi(te(),at())}var $t=class{},Qo=new ee("",{providedIn:"root",factory:()=>!1});var Qu=new ee(""),Ku=new ee(""),si=(()=>{class n{taskId=0;pendingTasks=new Set;destroyed=!1;pendingTask=new Eo(!1);get hasPendingTasks(){return this.destroyed?!1:this.pendingTask.value}get hasPendingTasksObservable(){return this.destroyed?new ae(t=>{t.next(!1),t.complete()}):this.pendingTask}add(){!this.hasPendingTasks&&!this.destroyed&&this.pendingTask.next(!0);let t=this.taskId++;return this.pendingTasks.add(t),t}has(t){return this.pendingTasks.has(t)}remove(t){this.pendingTasks.delete(t),this.pendingTasks.size===0&&this.hasPendingTasks&&this.pendingTask.next(!1)}ngOnDestroy(){this.pendingTasks.clear(),this.hasPendingTasks&&this.pendingTask.next(!1),this.destroyed=!0,this.pendingTask.unsubscribe()}static \u0275prov=re({token:n,providedIn:"root",factory:()=>new n})}return n})(),Hr=(()=>{class n{internalPendingTasks=k(si);scheduler=k($t);errorHandler=k(on);add(){let t=this.internalPendingTasks.add();return()=>{this.internalPendingTasks.has(t)&&(this.scheduler.notify(11),this.internalPendingTasks.remove(t))}}run(t){let i=this.add();t().catch(this.errorHandler).finally(i)}static \u0275prov=re({token:n,providedIn:"root",factory:()=>new n})}return n})();function Yi(...n){}var Ko=(()=>{class n{static \u0275prov=re({token:n,providedIn:"root",factory:()=>new du})}return n})(),du=class{dirtyEffectCount=0;queues=new Map;add(e){this.enqueue(e),this.schedule(e)}schedule(e){e.dirty&&this.dirtyEffectCount++}remove(e){let t=e.zone,i=this.queues.get(t);i.has(e)&&(i.delete(e),e.dirty&&this.dirtyEffectCount--)}enqueue(e){let t=e.zone;this.queues.has(t)||this.queues.set(t,new Set);let i=this.queues.get(t);i.has(e)||i.add(e)}flush(){for(;this.dirtyEffectCount>0;){let e=!1;for(let[t,i]of this.queues)t===null?e||=this.flushQueue(i):e||=t.run(()=>this.flushQueue(i));e||(this.dirtyEffectCount=0)}}flushQueue(e){let t=!1;for(let i of e)i.dirty&&(this.dirtyEffectCount--,t=!0,i.run());return t}};function Hl(n){return{toString:n}.toString()}var ml="__parameters__";function jx(n){return function(...t){if(n){let i=n(...t);for(let r in i)this[r]=i[r]}}}function z0(n,e,t){return Hl(()=>{let i=jx(e);function r(...o){if(this instanceof r)return i.apply(this,o),this;let s=new r(...o);return a.annotation=s,a;function a(l,c,h){let _=l.hasOwnProperty(ml)?l[ml]:Object.defineProperty(l,ml,{value:[]})[ml];for(;_.length<=h;)_.push(null);return(_[h]=_[h]||[]).push(s),l}}return r.prototype.ngMetadataName=n,r.annotationCls=r,r})}var zf=_u(z0("Inject",n=>({token:n})),-1),Gf=_u(z0("Optional"),8);function $x(n){return typeof n=="function"}var Sl=class{previousValue;currentValue;firstChange;constructor(e,t,i){this.previousValue=e,this.currentValue=t,this.firstChange=i}isFirstChange(){return this.firstChange}};function G0(n,e,t,i){e!==null?e.applyValueToInputSignal(e,i):n[t]=i}var ds=(()=>{let n=()=>W0;return n.ngInherit=!0,n})();function W0(n){return n.type.prototype.ngOnChanges&&(n.setInput=Ux),Hx}function Hx(){let n=Z0(this),e=n?.current;if(e){let t=n.previous;if(t===ei)n.previous=e;else for(let i in e)t[i]=e[i];n.current=null,this.ngOnChanges(e)}}function Ux(n,e,t,i,r){let o=this.declaredInputs[i],s=Z0(n)||zx(n,{previous:ei,current:null}),a=s.current||(s.current={}),l=s.previous,c=l[o];a[o]=new Sl(c&&c.currentValue,t,l===ei),G0(n,e,r,t)}var q0="__ngSimpleChanges__";function Z0(n){return n[q0]||null}function zx(n,e){return n[q0]=e}var u0=[];var Se=function(n,e=null,t){for(let i=0;i<u0.length;i++){let r=u0[i];r(n,e,t)}};function Gx(n,e,t){let{ngOnChanges:i,ngOnInit:r,ngDoCheck:o}=e.type.prototype;if(i){let s=W0(e);(t.preOrderHooks??=[]).push(n,s),(t.preOrderCheckHooks??=[]).push(n,s)}r&&(t.preOrderHooks??=[]).push(0-n,r),o&&((t.preOrderHooks??=[]).push(n,o),(t.preOrderCheckHooks??=[]).push(n,o))}function Y0(n,e){for(let t=e.directiveStart,i=e.directiveEnd;t<i;t++){let o=n.data[t].type.prototype,{ngAfterContentInit:s,ngAfterContentChecked:a,ngAfterViewInit:l,ngAfterViewChecked:c,ngOnDestroy:h}=o;s&&(n.contentHooks??=[]).push(-t,s),a&&((n.contentHooks??=[]).push(t,a),(n.contentCheckHooks??=[]).push(t,a)),l&&(n.viewHooks??=[]).push(-t,l),c&&((n.viewHooks??=[]).push(t,c),(n.viewCheckHooks??=[]).push(t,c)),h!=null&&(n.destroyHooks??=[]).push(t,h)}}function Cl(n,e,t){Q0(n,e,3,t)}function xl(n,e,t,i){(n[ie]&3)===t&&Q0(n,e,t,i)}function Xu(n,e){let t=n[ie];(t&3)===e&&(t&=16383,t+=1,n[ie]=t)}function Q0(n,e,t,i){let r=i!==void 0?n[Hi]&65535:0,o=i??-1,s=e.length-1,a=0;for(let l=r;l<s;l++)if(typeof e[l+1]=="number"){if(a=e[l],i!=null&&a>=i)break}else e[l]<0&&(n[Hi]+=65536),(a<o||o==-1)&&(Wx(n,t,e,l),n[Hi]=(n[Hi]&4294901760)+l+2),l++}function f0(n,e){Se(4,n,e);let t=ne(null);try{e.call(n)}finally{ne(t),Se(5,n,e)}}function Wx(n,e,t,i){let r=t[i]<0,o=t[i+1],s=r?-t[i]:t[i],a=n[s];r?n[ie]>>14<n[Hi]>>16&&(n[ie]&3)===e&&(n[ie]+=16384,f0(a,o)):f0(a,o)}var zr=-1,Ki=class{factory;name;injectImpl;resolving=!1;canSeeViewProviders;multi;componentProviders;index;providerFactory;constructor(e,t,i,r){this.factory=e,this.name=r,this.canSeeViewProviders=t,this.injectImpl=i}};function qx(n){return(n.flags&8)!==0}function Zx(n){return(n.flags&16)!==0}function Yx(n,e,t){let i=0;for(;i<t.length;){let r=t[i];if(typeof r=="number"){if(r!==0)break;i++;let o=t[i++],s=t[i++],a=t[i++];n.setAttribute(e,s,a,o)}else{let o=r,s=t[++i];Kx(o)?n.setProperty(e,o,s):n.setAttribute(e,o,s),i++}}return i}function Qx(n){return n===3||n===4||n===6}function Kx(n){return n.charCodeAt(0)===64}function Gr(n,e){if(!(e===null||e.length===0))if(n===null||n.length===0)n=e.slice();else{let t=-1;for(let i=0;i<e.length;i++){let r=e[i];typeof r=="number"?t=r:t===0||(t===-1||t===2?p0(n,t,r,null,e[++i]):p0(n,t,r,null,null))}}return n}function p0(n,e,t,i,r){let o=0,s=n.length;if(e===-1)s=-1;else for(;o<n.length;){let a=n[o++];if(typeof a=="number"){if(a===e){s=-1;break}else if(a>e){s=o-1;break}}}for(;o<n.length;){let a=n[o];if(typeof a=="number")break;if(a===t){r!==null&&(n[o+1]=r);return}o++,r!==null&&o++}s!==-1&&(n.splice(s,0,e),o=s+1),n.splice(o++,0,t),r!==null&&n.splice(o++,0,r)}function K0(n){return n!==zr}function Tl(n){return n&32767}function Xx(n){return n>>16}function Ml(n,e){let t=Xx(n),i=e;for(;t>0;)i=i[$i],t--;return i}var df=!0;function Il(n){let e=df;return df=n,e}var Jx=256,X0=Jx-1,J0=5,ew=0,wn={};function tw(n,e,t){let i;typeof t=="string"?i=t.charCodeAt(0)||0:t.hasOwnProperty(Fi)&&(i=t[Fi]),i==null&&(i=t[Fi]=ew++);let r=i&X0,o=1<<r;e.data[n+(r>>J0)]|=o}function kl(n,e){let t=e_(n,e);if(t!==-1)return t;let i=e[K];i.firstCreatePass&&(n.injectorIndex=e.length,Ju(i.data,n),Ju(e,null),Ju(i.blueprint,null));let r=Wf(n,e),o=n.injectorIndex;if(K0(r)){let s=Tl(r),a=Ml(r,e),l=a[K].data;for(let c=0;c<8;c++)e[o+c]=a[s+c]|l[s+c]}return e[o+8]=r,o}function Ju(n,e){n.push(0,0,0,0,0,0,0,0,e)}function e_(n,e){return n.injectorIndex===-1||n.parent&&n.parent.injectorIndex===n.injectorIndex||e[n.injectorIndex+8]===null?-1:n.injectorIndex}function Wf(n,e){if(n.parent&&n.parent.injectorIndex!==-1)return n.parent.injectorIndex;let t=0,i=null,r=e;for(;r!==null;){if(i=o_(r),i===null)return zr;if(t++,r=r[$i],i.injectorIndex!==-1)return i.injectorIndex|t<<16}return zr}function uf(n,e,t){tw(n,e,t)}function t_(n,e,t){if(t&8||n!==void 0)return n;tl(e,"NodeInjector")}function n_(n,e,t,i){if(t&8&&i===void 0&&(i=null),(t&3)===0){let r=n[Rn],o=yt(void 0);try{return r?r.get(e,i,t&8):gu(e,i,t&8)}finally{yt(o)}}return t_(i,e,t)}function i_(n,e,t,i=0,r){if(n!==null){if(e[ie]&2048&&!(i&2)){let s=ow(n,e,t,i,wn);if(s!==wn)return s}let o=r_(n,e,t,i,wn);if(o!==wn)return o}return n_(e,t,i,r)}function r_(n,e,t,i,r){let o=iw(t);if(typeof o=="function"){if(!Wu(e,n,i))return i&1?t_(r,t,i):n_(e,t,i,r);try{let s;if(s=o(i),s==null&&!(i&8))tl(t);else return s}finally{qu()}}else if(typeof o=="number"){let s=null,a=e_(n,e),l=zr,c=i&1?e[xt][Ct]:null;for((a===-1||i&4)&&(l=a===-1?Wf(n,e):e[a+8],l===zr||!m0(i,!1)?a=-1:(s=e[K],a=Tl(l),e=Ml(l,e)));a!==-1;){let h=e[K];if(h0(o,a,h.data)){let _=nw(a,e,t,s,i,c);if(_!==wn)return _}l=e[a+8],l!==zr&&m0(i,e[K].data[a+8]===c)&&h0(o,a,e)?(s=h,a=Tl(l),e=Ml(l,e)):a=-1}}return r}function nw(n,e,t,i,r,o){let s=e[K],a=s.data[n+8],l=i==null?ii(a)&&df:i!=s&&(a.type&3)!==0,c=r&1&&o===a,h=wl(a,s,t,l,c);return h!==null?es(e,s,h,a,r):wn}function wl(n,e,t,i,r){let o=n.providerIndexes,s=e.data,a=o&1048575,l=n.directiveStart,c=n.directiveEnd,h=o>>20,_=i?a:a+h,w=r?a+h:c;for(let E=_;E<w;E++){let P=s[E];if(E<l&&t===P||E>=l&&P.type===t)return E}if(r){let E=s[l];if(E&&xn(E)&&E.type===t)return l}return null}function es(n,e,t,i,r){let o=n[t],s=e.data;if(o instanceof Ki){let a=o;if(a.resolving){let E=Tg(s[t]);throw mu(E)}let l=Il(a.canSeeViewProviders);a.resolving=!0;let c=s[t].type||s[t],h,_=a.injectImpl?yt(a.injectImpl):null,w=Wu(n,i,0);try{o=n[t]=a.factory(void 0,r,s,n,i),e.firstCreatePass&&t>=i.directiveStart&&Gx(t,s[t],e)}finally{_!==null&&yt(_),Il(l),a.resolving=!1,qu()}}return o}function iw(n){if(typeof n=="string")return n.charCodeAt(0)||0;let e=n.hasOwnProperty(Fi)?n[Fi]:void 0;return typeof e=="number"?e>=0?e&X0:rw:e}function h0(n,e,t){let i=1<<n;return!!(t[e+(n>>J0)]&i)}function m0(n,e){return!(n&2)&&!(n&1&&e)}var Qi=class{_tNode;_lView;constructor(e,t){this._tNode=e,this._lView=t}get(e,t,i){return i_(this._tNode,this._lView,e,Oi(i),t)}};function rw(){return new Qi(at(),te())}function ow(n,e,t,i,r){let o=n,s=e;for(;o!==null&&s!==null&&s[ie]&2048&&!Br(s);){let a=r_(o,s,t,i|2,wn);if(a!==wn)return a;let l=o.parent;if(!l){let c=s[Su];if(c){let h=c.get(t,wn,i);if(h!==wn)return h}l=o_(s),s=s[$i]}o=l}return r}function o_(n){let e=n[K],t=e.type;return t===2?e.declTNode:t===1?n[Ct]:null}function sw(){return Yr(at(),te())}function Yr(n,e){return new cn(zt(n,e))}var cn=(()=>{class n{nativeElement;constructor(t){this.nativeElement=t}static __NG_ELEMENT_ID__=sw}return n})();function s_(n){return n instanceof cn?n.nativeElement:n}function aw(){return this._results[Symbol.iterator]()}var Pl=class{_emitDistinctChangesOnly;dirty=!0;_onDirty=void 0;_results=[];_changesDetected=!1;_changes=void 0;length=0;first=void 0;last=void 0;get changes(){return this._changes??=new $e}constructor(e=!1){this._emitDistinctChangesOnly=e}get(e){return this._results[e]}map(e){return this._results.map(e)}filter(e){return this._results.filter(e)}find(e){return this._results.find(e)}reduce(e,t){return this._results.reduce(e,t)}forEach(e){this._results.forEach(e)}some(e){return this._results.some(e)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(e,t){this.dirty=!1;let i=Og(e);(this._changesDetected=!Pg(this._results,i,t))&&(this._results=i,this.length=i.length,this.last=i[this.length-1],this.first=i[0])}notifyOnChanges(){this._changes!==void 0&&(this._changesDetected||!this._emitDistinctChangesOnly)&&this._changes.next(this)}onDirty(e){this._onDirty=e}setDirty(){this.dirty=!0,this._onDirty?.()}destroy(){this._changes!==void 0&&(this._changes.complete(),this._changes.unsubscribe())}[Symbol.iterator]=aw};function a_(n){return(n.flags&128)===128}var qf=(function(n){return n[n.OnPush=0]="OnPush",n[n.Default=1]="Default",n})(qf||{}),l_=new Map,lw=0;function cw(){return lw++}function dw(n){l_.set(n[$o],n)}function ff(n){l_.delete(n[$o])}var g0="__ngContext__";function Wr(n,e){Cn(e)?(n[g0]=e[$o],dw(e)):n[g0]=e}function c_(n){return u_(n[Fr])}function d_(n){return u_(n[Ht])}function u_(n){for(;n!==null&&!rn(n);)n=n[Ht];return n}var pf;function Zf(n){pf=n}function Yf(){if(pf!==void 0)return pf;if(typeof document<"u")return document;throw new q(210,!1)}var Ul=new ee("",{providedIn:"root",factory:()=>uw}),uw="ng",zl=new ee(""),er=new ee("",{providedIn:"platform",factory:()=>"unknown"});var Gl=new ee("",{providedIn:"root",factory:()=>Yf().body?.querySelector("[ngCspNonce]")?.getAttribute("ngCspNonce")||null});var fw="h",pw="b";var f_="r";var p_="di";var h_=!1,m_=new ee("",{providedIn:"root",factory:()=>h_});var hw=(n,e,t,i)=>{};function mw(n,e,t,i){hw(n,e,t,i)}function Wl(n){return(n.flags&32)===32}var gw=()=>null;function g_(n,e,t=!1){return gw(n,e,t)}function __(n,e){let t=n.contentQueries;if(t!==null){let i=ne(null);try{for(let r=0;r<t.length;r+=2){let o=t[r],s=t[r+1];if(s!==-1){let a=n.data[s];qo(o),a.contentQueries(2,e[s],s)}}}finally{ne(i)}}}function hf(n,e,t){qo(0);let i=ne(null);try{e(n,t)}finally{ne(i)}}function Qf(n,e,t){if(Mu(e)){let i=ne(null);try{let r=e.directiveStart,o=e.directiveEnd;for(let s=r;s<o;s++){let a=n.data[s];if(a.contentQueries){let l=t[s];a.contentQueries(1,l,s)}}}finally{ne(i)}}}var An=(function(n){return n[n.Emulated=0]="Emulated",n[n.None=2]="None",n[n.ShadowDom=3]="ShadowDom",n})(An||{});var _w="svg",vw="math",yw={"http://www.w3.org/2000/svg":_w,"http://www.w3.org/1998/Math/MathML":vw},gl;function bw(){if(gl===void 0&&(gl=null,en.trustedTypes))try{gl=en.trustedTypes.createPolicy("angular",{createHTML:n=>n,createScript:n=>n,createScriptURL:n=>n})}catch{}return gl}function ql(n){return bw()?.createHTML(n)||n}var _l;function Cw(){if(_l===void 0&&(_l=null,en.trustedTypes))try{_l=en.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:n=>n,createScript:n=>n,createScriptURL:n=>n})}catch{}return _l}function _0(n){return Cw()?.createHTML(n)||n}var Ol=class{changingThisBreaksApplicationSecurity;constructor(e){this.changingThisBreaksApplicationSecurity=e}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${Ka})`}};function us(n){return n instanceof Ol?n.changingThisBreaksApplicationSecurity:n}function Kf(n,e){let t=v_(n);if(t!=null&&t!==e){if(t==="ResourceURL"&&e==="URL")return!0;throw new Error(`Required a safe ${e}, got a ${t} (see ${Ka})`)}return t===e}function v_(n){return n instanceof Ol&&n.getTypeName()||null}function xw(n){let e=new gf(n);return ww()?new mf(e):e}var mf=class{inertDocumentHelper;constructor(e){this.inertDocumentHelper=e}getInertBodyElement(e){e="<body><remove></remove>"+e;try{let t=new window.DOMParser().parseFromString(ql(e),"text/html").body;return t===null?this.inertDocumentHelper.getInertBodyElement(e):(t.firstChild?.remove(),t)}catch{return null}}},gf=class{defaultDoc;inertDocument;constructor(e){this.defaultDoc=e,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(e){let t=this.inertDocument.createElement("template");return t.innerHTML=ql(e),t}};function ww(){try{return!!new window.DOMParser().parseFromString(ql(""),"text/html")}catch{return!1}}var Ew=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function Xf(n){return n=String(n),n.match(Ew)?n:"unsafe:"+n}function Ln(n){let e={};for(let t of n.split(","))e[t]=!0;return e}function fs(...n){let e={};for(let t of n)for(let i in t)t.hasOwnProperty(i)&&(e[i]=!0);return e}var y_=Ln("area,br,col,hr,img,wbr"),b_=Ln("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),C_=Ln("rp,rt"),Dw=fs(C_,b_),Sw=fs(b_,Ln("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),Tw=fs(C_,Ln("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video")),v0=fs(y_,Sw,Tw,Dw),x_=Ln("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),Mw=Ln("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,srcset,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),Iw=Ln("aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext"),kw=fs(x_,Mw,Iw),Pw=Ln("script,style,template"),_f=class{sanitizedSomething=!1;buf=[];sanitizeChildren(e){let t=e.firstChild,i=!0,r=[];for(;t;){if(t.nodeType===Node.ELEMENT_NODE?i=this.startElement(t):t.nodeType===Node.TEXT_NODE?this.chars(t.nodeValue):this.sanitizedSomething=!0,i&&t.firstChild){r.push(t),t=Nw(t);continue}for(;t;){t.nodeType===Node.ELEMENT_NODE&&this.endElement(t);let o=Rw(t);if(o){t=o;break}t=r.pop()}}return this.buf.join("")}startElement(e){let t=y0(e).toLowerCase();if(!v0.hasOwnProperty(t))return this.sanitizedSomething=!0,!Pw.hasOwnProperty(t);this.buf.push("<"),this.buf.push(t);let i=e.attributes;for(let r=0;r<i.length;r++){let o=i.item(r),s=o.name,a=s.toLowerCase();if(!kw.hasOwnProperty(a)){this.sanitizedSomething=!0;continue}let l=o.value;x_[a]&&(l=Xf(l)),this.buf.push(" ",s,'="',b0(l),'"')}return this.buf.push(">"),!0}endElement(e){let t=y0(e).toLowerCase();v0.hasOwnProperty(t)&&!y_.hasOwnProperty(t)&&(this.buf.push("</"),this.buf.push(t),this.buf.push(">"))}chars(e){this.buf.push(b0(e))}};function Ow(n,e){return(n.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY)!==Node.DOCUMENT_POSITION_CONTAINED_BY}function Rw(n){let e=n.nextSibling;if(e&&n!==e.previousSibling)throw w_(e);return e}function Nw(n){let e=n.firstChild;if(e&&Ow(n,e))throw w_(e);return e}function y0(n){let e=n.nodeName;return typeof e=="string"?e:"FORM"}function w_(n){return new Error(`Failed to sanitize html because the element is clobbered: ${n.outerHTML}`)}var Aw=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Lw=/([^\#-~ |!])/g;function b0(n){return n.replace(/&/g,"&amp;").replace(Aw,function(e){let t=e.charCodeAt(0),i=e.charCodeAt(1);return"&#"+((t-55296)*1024+(i-56320)+65536)+";"}).replace(Lw,function(e){return"&#"+e.charCodeAt(0)+";"}).replace(/</g,"&lt;").replace(/>/g,"&gt;")}var vl;function E_(n,e){let t=null;try{vl=vl||xw(n);let i=e?String(e):"";t=vl.getInertBodyElement(i);let r=5,o=i;do{if(r===0)throw new Error("Failed to sanitize html because the input is unstable");r--,i=o,o=t.innerHTML,t=vl.getInertBodyElement(i)}while(i!==o);let a=new _f().sanitizeChildren(C0(t)||t);return ql(a)}finally{if(t){let i=C0(t)||t;for(;i.firstChild;)i.firstChild.remove()}}}function C0(n){return"content"in n&&Fw(n)?n.content:null}function Fw(n){return n.nodeType===Node.ELEMENT_NODE&&n.nodeName==="TEMPLATE"}var Vw=/^>|^->|<!--|-->|--!>|<!-$/g,Bw=/(<|>)/g,jw="\u200B$1\u200B";function $w(n){return n.replace(Vw,e=>e.replace(Bw,jw))}function Hw(n,e){return n.createText(e)}function Uw(n,e,t){n.setValue(e,t)}function zw(n,e){return n.createComment($w(e))}function D_(n,e,t){return n.createElement(e,t)}function Rl(n,e,t,i,r){n.insertBefore(e,t,i,r)}function S_(n,e,t){n.appendChild(e,t)}function x0(n,e,t,i,r){i!==null?Rl(n,e,t,i,r):S_(n,e,t)}function T_(n,e,t,i){n.removeChild(null,e,t,i)}function Gw(n,e,t){n.setAttribute(e,"style",t)}function Ww(n,e,t){t===""?n.removeAttribute(e,"class"):n.setAttribute(e,"class",t)}function M_(n,e,t){let{mergedAttrs:i,classes:r,styles:o}=t;i!==null&&Yx(n,e,i),r!==null&&Ww(n,e,r),o!==null&&Gw(n,e,o)}function qw(n,e=!0){if(n[0]!=":")return[null,n];let t=n.indexOf(":",1);if(t===-1){if(e)throw new Error(`Unsupported format "${n}" expecting ":namespace:name"`);return[null,n]}return[n.slice(1,t),n.slice(t+1)]}function Jf(n,e,t){if(e!==void 0&&t!==void 0&&Zw(e,t)!==vt.HTML)return n;let i=I_();return i?_0(i.sanitize(vt.HTML,n)||""):Kf(n,"HTML")?_0(us(n)):E_(Yf(),tn(n))}function tr(n){let e=I_();return e?e.sanitize(vt.URL,n)||"":Kf(n,"URL")?us(n):Xf(tn(n))}function I_(){let n=te();return n&&n[yn].sanitizer}function Zw(n,e){let[t,i]=Yw(n);return Ug(i,e,t)}function Yw(n){n=n.toLowerCase();let e=qw(n,!1);if(e[0])return e;let i=qt()===-1?null:Zo(),r=i?.namespace;if(n==="#host"&&i?.type===2){let o=zt(i,te());if(o.tagName&&(n=o.tagName.toLowerCase()),r==null){let s=o.namespaceURI;r=s&&yw[s]}}return[r,n]}function ep(n){return n.ownerDocument.defaultView}function Ze(n){return n.ownerDocument}function Qw(n,e,t){let i=n.length;for(;;){let r=n.indexOf(e,t);if(r===-1)return r;if(r===0||n.charCodeAt(r-1)<=32){let o=e.length;if(r+o===i||n.charCodeAt(r+o)<=32)return r}t=r+1}}var k_="ng-template";function Kw(n,e,t,i){let r=0;if(i){for(;r<e.length&&typeof e[r]=="string";r+=2)if(e[r]==="class"&&Qw(e[r+1].toLowerCase(),t,0)!==-1)return!0}else if(tp(n))return!1;if(r=e.indexOf(1,r),r>-1){let o;for(;++r<e.length&&typeof(o=e[r])=="string";)if(o.toLowerCase()===t)return!0}return!1}function tp(n){return n.type===4&&n.value!==k_}function Xw(n,e,t){let i=n.type===4&&!t?k_:n.value;return e===i}function Jw(n,e,t){let i=4,r=n.attrs,o=r!==null?nE(r):0,s=!1;for(let a=0;a<e.length;a++){let l=e[a];if(typeof l=="number"){if(!s&&!sn(i)&&!sn(l))return!1;if(s&&sn(l))continue;s=!1,i=l|i&1;continue}if(!s)if(i&4){if(i=2|i&1,l!==""&&!Xw(n,l,t)||l===""&&e.length===1){if(sn(i))return!1;s=!0}}else if(i&8){if(r===null||!Kw(n,r,l,t)){if(sn(i))return!1;s=!0}}else{let c=e[++a],h=eE(l,r,tp(n),t);if(h===-1){if(sn(i))return!1;s=!0;continue}if(c!==""){let _;if(h>o?_="":_=r[h+1].toLowerCase(),i&2&&c!==_){if(sn(i))return!1;s=!0}}}}return sn(i)||s}function sn(n){return(n&1)===0}function eE(n,e,t,i){if(e===null)return-1;let r=0;if(i||!t){let o=!1;for(;r<e.length;){let s=e[r];if(s===n)return r;if(s===3||s===6)o=!0;else if(s===1||s===2){let a=e[++r];for(;typeof a=="string";)a=e[++r];continue}else{if(s===4)break;if(s===0){r+=4;continue}}r+=o?1:2}return-1}else return iE(e,n)}function P_(n,e,t=!1){for(let i=0;i<e.length;i++)if(Jw(n,e[i],t))return!0;return!1}function tE(n){let e=n.attrs;if(e!=null){let t=e.indexOf(5);if((t&1)===0)return e[t+1]}return null}function nE(n){for(let e=0;e<n.length;e++){let t=n[e];if(Qx(t))return e}return n.length}function iE(n,e){let t=n.indexOf(4);if(t>-1)for(t++;t<n.length;){let i=n[t];if(typeof i=="number")return-1;if(i===e)return t;t++}return-1}function rE(n,e){e:for(let t=0;t<e.length;t++){let i=e[t];if(n.length===i.length){for(let r=0;r<n.length;r++)if(n[r]!==i[r])continue e;return!0}}return!1}function w0(n,e){return n?":not("+e.trim()+")":e}function oE(n){let e=n[0],t=1,i=2,r="",o=!1;for(;t<n.length;){let s=n[t];if(typeof s=="string")if(i&2){let a=n[++t];r+="["+s+(a.length>0?'="'+a+'"':"")+"]"}else i&8?r+="."+s:i&4&&(r+=" "+s);else r!==""&&!sn(s)&&(e+=w0(o,r),r=""),i=s,o=o||!sn(i);t++}return r!==""&&(e+=w0(o,r)),e}function sE(n){return n.map(oE).join(",")}function aE(n){let e=[],t=[],i=1,r=2;for(;i<n.length;){let o=n[i];if(typeof o=="string")r===2?o!==""&&e.push(o,n[++i]):r===8&&t.push(o);else{if(!sn(r))break;r=o}i++}return t.length&&e.push(1,...t),e}var ct={};function np(n,e,t,i,r,o,s,a,l,c,h){let _=Ne+i,w=_+r,E=lE(_,w),P=typeof c=="function"?c():c;return E[K]={type:n,blueprint:E,template:t,queries:null,viewQuery:a,declTNode:e,data:E.slice().fill(null,_),bindingStartIndex:_,expandoStartIndex:w,hostBindingOpCodes:null,firstCreatePass:!0,firstUpdatePass:!0,staticViewQueries:!1,staticContentQueries:!1,preOrderHooks:null,preOrderCheckHooks:null,contentHooks:null,contentCheckHooks:null,viewHooks:null,viewCheckHooks:null,destroyHooks:null,cleanup:null,contentQueries:null,components:null,directiveRegistry:typeof o=="function"?o():o,pipeRegistry:typeof s=="function"?s():s,firstChild:null,schemas:l,consts:P,incompleteFirstPass:!1,ssrId:h}}function lE(n,e){let t=[];for(let i=0;i<e;i++)t.push(i<n?null:ct);return t}function cE(n){let e=n.tView;return e===null||e.incompleteFirstPass?n.tView=np(1,null,n.template,n.decls,n.vars,n.directiveDefs,n.pipeDefs,n.viewQuery,n.schemas,n.consts,n.id):e}function ip(n,e,t,i,r,o,s,a,l,c,h){let _=e.blueprint.slice();return _[nn]=r,_[ie]=i|4|128|8|64|1024,(c!==null||n&&n[ie]&2048)&&(_[ie]|=2048),Ou(_),_[Xe]=_[$i]=n,_[Ge]=t,_[yn]=s||n&&n[yn],_[Pe]=a||n&&n[Pe],_[Rn]=l||n&&n[Rn]||null,_[Ct]=o,_[$o]=cw(),_[ji]=h,_[Su]=c,_[xt]=e.type==2?n[xt]:_,_}function dE(n,e,t){let i=zt(e,n),r=cE(t),o=n[yn].rendererFactory,s=rp(n,ip(n,r,null,O_(t),i,e,null,o.createRenderer(i,t),null,null,null));return n[e.index]=s}function O_(n){let e=16;return n.signals?e=4096:n.onPush&&(e=64),e}function R_(n,e,t,i){if(t===0)return-1;let r=e.length;for(let o=0;o<t;o++)e.push(i),n.blueprint.push(i),n.data.push(null);return r}function rp(n,e){return n[Fr]?n[Du][Ht]=e:n[Fr]=e,n[Du]=e,e}function d(n=1){N_(Ue(),te(),qt()+n,!1)}function N_(n,e,t,i){if(!i)if((e[ie]&3)===3){let o=n.preOrderCheckHooks;o!==null&&Cl(e,o,t)}else{let o=n.preOrderHooks;o!==null&&xl(e,o,0,t)}oi(t)}var Zl=(function(n){return n[n.None=0]="None",n[n.SignalBased=1]="SignalBased",n[n.HasDecoratorInputTransform=2]="HasDecoratorInputTransform",n})(Zl||{});function vf(n,e,t,i){let r=ne(null);try{let[o,s,a]=n.inputs[t],l=null;(s&Zl.SignalBased)!==0&&(l=e[o][it]),l!==null&&l.transformFn!==void 0?i=l.transformFn(i):a!==null&&(i=a.call(e,i)),n.setInput!==null?n.setInput(e,l,i,t,o):G0(e,l,o,i)}finally{ne(r)}}var En=(function(n){return n[n.Important=1]="Important",n[n.DashCase=2]="DashCase",n})(En||{}),uE;function op(n,e){return uE(n,e)}var Xi=new Set,Yl=(function(n){return n[n.CHANGE_DETECTION=0]="CHANGE_DETECTION",n[n.AFTER_NEXT_RENDER=1]="AFTER_NEXT_RENDER",n})(Yl||{}),ci=new ee(""),E0=new Set;function di(n){E0.has(n)||(E0.add(n),performance?.mark?.("mark_feature_usage",{detail:{feature:n}}))}var A_=!1,yf=class extends $e{__isAsync;destroyRef=void 0;pendingTasks=void 0;constructor(e=!1){super(),this.__isAsync=e,jg()&&(this.destroyRef=k(Je,{optional:!0})??void 0,this.pendingTasks=k(si,{optional:!0})??void 0)}emit(e){let t=ne(null);try{super.next(e)}finally{ne(t)}}subscribe(e,t,i){let r=e,o=t||(()=>null),s=i;if(e&&typeof e=="object"){let l=e;r=l.next?.bind(l),o=l.error?.bind(l),s=l.complete?.bind(l)}this.__isAsync&&(o=this.wrapInTimeout(o),r&&(r=this.wrapInTimeout(r)),s&&(s=this.wrapInTimeout(s)));let a=super.subscribe({next:r,error:o,complete:s});return e instanceof Ve&&e.add(a),a}wrapInTimeout(e){return t=>{let i=this.pendingTasks?.add();setTimeout(()=>{try{e(t)}finally{i!==void 0&&this.pendingTasks?.remove(i)}})}}},ln=yf;function L_(n){let e,t;function i(){n=Yi;try{t!==void 0&&typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(t),e!==void 0&&clearTimeout(e)}catch{}}return e=setTimeout(()=>{n(),i()}),typeof requestAnimationFrame=="function"&&(t=requestAnimationFrame(()=>{n(),i()})),()=>i()}function D0(n){return queueMicrotask(()=>n()),()=>{n=Yi}}var sp="isAngularZone",Nl=sp+"_ID",fE=0,Ie=class n{hasPendingMacrotasks=!1;hasPendingMicrotasks=!1;isStable=!0;onUnstable=new ln(!1);onMicrotaskEmpty=new ln(!1);onStable=new ln(!1);onError=new ln(!1);constructor(e){let{enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:i=!1,shouldCoalesceRunChangeDetection:r=!1,scheduleInRootZone:o=A_}=e;if(typeof Zone>"u")throw new q(908,!1);Zone.assertZonePatched();let s=this;s._nesting=0,s._outer=s._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(s._inner=s._inner.fork(new Zone.TaskTrackingZoneSpec)),t&&Zone.longStackTraceZoneSpec&&(s._inner=s._inner.fork(Zone.longStackTraceZoneSpec)),s.shouldCoalesceEventChangeDetection=!r&&i,s.shouldCoalesceRunChangeDetection=r,s.callbackScheduled=!1,s.scheduleInRootZone=o,mE(s)}static isInAngularZone(){return typeof Zone<"u"&&Zone.current.get(sp)===!0}static assertInAngularZone(){if(!n.isInAngularZone())throw new q(909,!1)}static assertNotInAngularZone(){if(n.isInAngularZone())throw new q(909,!1)}run(e,t,i){return this._inner.run(e,t,i)}runTask(e,t,i,r){let o=this._inner,s=o.scheduleEventTask("NgZoneEvent: "+r,e,pE,Yi,Yi);try{return o.runTask(s,t,i)}finally{o.cancelTask(s)}}runGuarded(e,t,i){return this._inner.runGuarded(e,t,i)}runOutsideAngular(e){return this._outer.run(e)}},pE={};function ap(n){if(n._nesting==0&&!n.hasPendingMicrotasks&&!n.isStable)try{n._nesting++,n.onMicrotaskEmpty.emit(null)}finally{if(n._nesting--,!n.hasPendingMicrotasks)try{n.runOutsideAngular(()=>n.onStable.emit(null))}finally{n.isStable=!0}}}function hE(n){if(n.isCheckStableRunning||n.callbackScheduled)return;n.callbackScheduled=!0;function e(){L_(()=>{n.callbackScheduled=!1,bf(n),n.isCheckStableRunning=!0,ap(n),n.isCheckStableRunning=!1})}n.scheduleInRootZone?Zone.root.run(()=>{e()}):n._outer.run(()=>{e()}),bf(n)}function mE(n){let e=()=>{hE(n)},t=fE++;n._inner=n._inner.fork({name:"angular",properties:{[sp]:!0,[Nl]:t,[Nl+t]:!0},onInvokeTask:(i,r,o,s,a,l)=>{if(gE(l))return i.invokeTask(o,s,a,l);try{return S0(n),i.invokeTask(o,s,a,l)}finally{(n.shouldCoalesceEventChangeDetection&&s.type==="eventTask"||n.shouldCoalesceRunChangeDetection)&&e(),T0(n)}},onInvoke:(i,r,o,s,a,l,c)=>{try{return S0(n),i.invoke(o,s,a,l,c)}finally{n.shouldCoalesceRunChangeDetection&&!n.callbackScheduled&&!_E(l)&&e(),T0(n)}},onHasTask:(i,r,o,s)=>{i.hasTask(o,s),r===o&&(s.change=="microTask"?(n._hasPendingMicrotasks=s.microTask,bf(n),ap(n)):s.change=="macroTask"&&(n.hasPendingMacrotasks=s.macroTask))},onHandleError:(i,r,o,s)=>(i.handleError(o,s),n.runOutsideAngular(()=>n.onError.emit(s)),!1)})}function bf(n){n._hasPendingMicrotasks||(n.shouldCoalesceEventChangeDetection||n.shouldCoalesceRunChangeDetection)&&n.callbackScheduled===!0?n.hasPendingMicrotasks=!0:n.hasPendingMicrotasks=!1}function S0(n){n._nesting++,n.isStable&&(n.isStable=!1,n.onUnstable.emit(null))}function T0(n){n._nesting--,ap(n)}var Al=class{hasPendingMicrotasks=!1;hasPendingMacrotasks=!1;isStable=!0;onUnstable=new ln;onMicrotaskEmpty=new ln;onStable=new ln;onError=new ln;run(e,t,i){return e.apply(t,i)}runGuarded(e,t,i){return e.apply(t,i)}runOutsideAngular(e){return e()}runTask(e,t,i,r){return e.apply(t,i)}};function gE(n){return F_(n,"__ignore_ng_zone__")}function _E(n){return F_(n,"__scheduler_tick__")}function F_(n,e){return!Array.isArray(n)||n.length!==1?!1:n[0]?.data?.[e]===!0}var Ql=(()=>{class n{impl=null;execute(){this.impl?.execute()}static \u0275prov=re({token:n,providedIn:"root",factory:()=>new n})}return n})(),lp=[0,1,2,3],cp=(()=>{class n{ngZone=k(Ie);scheduler=k($t);errorHandler=k(Ot,{optional:!0});sequences=new Set;deferredRegistrations=new Set;executing=!1;constructor(){k(ci,{optional:!0})}execute(){let t=this.sequences.size>0;t&&Se(16),this.executing=!0;for(let i of lp)for(let r of this.sequences)if(!(r.erroredOrDestroyed||!r.hooks[i]))try{r.pipelinedValue=this.ngZone.runOutsideAngular(()=>this.maybeTrace(()=>{let o=r.hooks[i];return o(r.pipelinedValue)},r.snapshot))}catch(o){r.erroredOrDestroyed=!0,this.errorHandler?.handleError(o)}this.executing=!1;for(let i of this.sequences)i.afterRun(),i.once&&(this.sequences.delete(i),i.destroy());for(let i of this.deferredRegistrations)this.sequences.add(i);this.deferredRegistrations.size>0&&this.scheduler.notify(7),this.deferredRegistrations.clear(),t&&Se(17)}register(t){let{view:i}=t;i!==void 0?((i[Ui]??=[]).push(t),ri(i),i[ie]|=8192):this.executing?this.deferredRegistrations.add(t):this.addSequence(t)}addSequence(t){this.sequences.add(t),this.scheduler.notify(7)}unregister(t){this.executing&&this.sequences.has(t)?(t.erroredOrDestroyed=!0,t.pipelinedValue=void 0,t.once=!0):(this.sequences.delete(t),this.deferredRegistrations.delete(t))}maybeTrace(t,i){return i?i.run(Yl.AFTER_NEXT_RENDER,t):t()}static \u0275prov=re({token:n,providedIn:"root",factory:()=>new n})}return n})(),ts=class{impl;hooks;view;once;snapshot;erroredOrDestroyed=!1;pipelinedValue=void 0;unregisterOnDestroy;constructor(e,t,i,r,o,s=null){this.impl=e,this.hooks=t,this.view=i,this.once=r,this.snapshot=s,this.unregisterOnDestroy=o?.onDestroy(()=>this.destroy())}afterRun(){this.erroredOrDestroyed=!1,this.pipelinedValue=void 0,this.snapshot?.dispose(),this.snapshot=null}destroy(){this.impl.unregister(this),this.unregisterOnDestroy?.();let e=this.view?.[Ui];e&&(this.view[Ui]=e.filter(t=>t!==this))}};function dp(n,e){let t=e?.injector??k(bt);return di("NgAfterNextRender"),yE(n,t,e,!0)}function vE(n){return n instanceof Function?[void 0,void 0,n,void 0]:[n.earlyRead,n.write,n.mixedReadWrite,n.read]}function yE(n,e,t,i){let r=e.get(Ql);r.impl??=e.get(cp);let o=e.get(ci,null,{optional:!0}),s=t?.manualCleanup!==!0?e.get(Je):null,a=e.get(Zi,null,{optional:!0}),l=new ts(r.impl,vE(n),a?.view,i,s,o?.snapshot(null));return r.impl.register(l),l}var V_=new ee("",{providedIn:"root",factory:()=>({queue:new Set,isScheduled:!1,scheduler:null})});function B_(n,e,t){let i=n.get(V_);if(Array.isArray(e))for(let r of e)i.queue.add(r),t?.detachedLeaveAnimationFns?.push(r);else i.queue.add(e),t?.detachedLeaveAnimationFns?.push(e);i.scheduler&&i.scheduler(n)}function bE(n,e){let t=n.get(V_);if(e.detachedLeaveAnimationFns){for(let i of e.detachedLeaveAnimationFns)t.queue.delete(i);e.detachedLeaveAnimationFns=void 0}}function CE(n,e){for(let[t,i]of e)B_(n,i.animateFns)}function M0(n,e,t,i){let r=n?.[zi]?.enter;e!==null&&r&&r.has(t.index)&&CE(i,r)}function Ur(n,e,t,i,r,o,s,a){if(r!=null){let l,c=!1;rn(r)?l=r:Cn(r)&&(c=!0,r=r[nn]);let h=Ut(r);n===0&&i!==null?(M0(a,i,o,t),s==null?S_(e,i,h):Rl(e,i,h,s||null,!0)):n===1&&i!==null?(M0(a,i,o,t),Rl(e,i,h,s||null,!0)):n===2?I0(a,o,t,_=>{T_(e,h,c,_)}):n===3&&I0(a,o,t,()=>{e.destroyNode(h)}),l!=null&&OE(e,n,t,l,o,i,s)}}function xE(n,e){j_(n,e),e[nn]=null,e[Ct]=null}function wE(n,e,t,i,r,o){i[nn]=r,i[Ct]=e,Xl(n,i,t,1,r,o)}function j_(n,e){e[yn].changeDetectionScheduler?.notify(9),Xl(n,e,e[Pe],2,null,null)}function EE(n){let e=n[Fr];if(!e)return ef(n[K],n);for(;e;){let t=null;if(Cn(e))t=e[Fr];else{let i=e[He];i&&(t=i)}if(!t){for(;e&&!e[Ht]&&e!==n;)Cn(e)&&ef(e[K],e),e=e[Xe];e===null&&(e=n),Cn(e)&&ef(e[K],e),t=e&&e[Ht]}e=t}}function up(n,e){let t=n[Gi],i=t.indexOf(e);t.splice(i,1)}function Kl(n,e){if(Wi(e))return;let t=e[Pe];t.destroyNode&&Xl(n,e,t,3,null,null),EE(e)}function ef(n,e){if(Wi(e))return;let t=ne(null);try{e[ie]&=-129,e[ie]|=256,e[Rt]&&Zn(e[Rt]),TE(n,e),SE(n,e),e[K].type===1&&e[Pe].destroy();let i=e[ti];if(i!==null&&rn(e[Xe])){i!==e[Xe]&&up(i,e);let r=e[bn];r!==null&&r.detachView(n)}ff(e)}finally{ne(t)}}function I0(n,e,t,i){let r=n?.[zi];if(r==null||r.leave==null||!r.leave.has(e.index))return i(!1);n&&Xi.add(n),B_(t,()=>{if(r.leave&&r.leave.has(e.index)){let s=r.leave.get(e.index),a=[];if(s){for(let l=0;l<s.animateFns.length;l++){let c=s.animateFns[l],{promise:h}=c();a.push(h)}r.detachedLeaveAnimationFns=void 0}r.running=Promise.allSettled(a),DE(n,i)}else n&&Xi.delete(n),i(!1)},r)}function DE(n,e){let t=n[zi]?.running;if(t){t.then(()=>{n[zi].running=void 0,Xi.delete(n),e(!0)});return}e(!1)}function SE(n,e){let t=n.cleanup,i=e[Lr];if(t!==null)for(let s=0;s<t.length-1;s+=2)if(typeof t[s]=="string"){let a=t[s+3];a>=0?i[a]():i[-a].unsubscribe(),s+=2}else{let a=i[t[s+1]];t[s].call(a)}i!==null&&(e[Lr]=null);let r=e[On];if(r!==null){e[On]=null;for(let s=0;s<r.length;s++){let a=r[s];a()}}let o=e[Nn];if(o!==null){e[Nn]=null;for(let s of o)s.destroy()}}function TE(n,e){let t;if(n!=null&&(t=n.destroyHooks)!=null)for(let i=0;i<t.length;i+=2){let r=e[t[i]];if(!(r instanceof Ki)){let o=t[i+1];if(Array.isArray(o))for(let s=0;s<o.length;s+=2){let a=r[o[s]],l=o[s+1];Se(4,a,l);try{l.call(a)}finally{Se(5,a,l)}}else{Se(4,r,o);try{o.call(r)}finally{Se(5,r,o)}}}}}function $_(n,e,t){return ME(n,e.parent,t)}function ME(n,e,t){let i=e;for(;i!==null&&i.type&168;)e=i,i=e.parent;if(i===null)return t[nn];if(ii(i)){let{encapsulation:r}=n.data[i.directiveStart+i.componentOffset];if(r===An.None||r===An.Emulated)return null}return zt(i,t)}function H_(n,e,t){return kE(n,e,t)}function IE(n,e,t){return n.type&40?zt(n,t):null}var kE=IE,k0;function fp(n,e,t,i){let r=$_(n,i,e),o=e[Pe],s=i.parent||e[Ct],a=H_(s,i,e);if(r!=null)if(Array.isArray(t))for(let l=0;l<t.length;l++)x0(o,r,t[l],a,!1);else x0(o,r,t,a,!1);k0!==void 0&&k0(o,i,e,t,r)}function Xo(n,e){if(e!==null){let t=e.type;if(t&3)return zt(e,n);if(t&4)return Cf(-1,n[e.index]);if(t&8){let i=e.child;if(i!==null)return Xo(n,i);{let r=n[e.index];return rn(r)?Cf(-1,r):Ut(r)}}else{if(t&128)return Xo(n,e.next);if(t&32)return op(e,n)()||Ut(n[e.index]);{let i=U_(n,e);if(i!==null){if(Array.isArray(i))return i[0];let r=Jn(n[xt]);return Xo(r,i)}else return Xo(n,e.next)}}}return null}function U_(n,e){if(e!==null){let i=n[xt][Ct],r=e.projection;return i.projection[r]}return null}function Cf(n,e){let t=He+n+1;if(t<e.length){let i=e[t],r=i[K].firstChild;if(r!==null)return Xo(i,r)}return e[ni]}function pp(n,e,t,i,r,o,s){for(;t!=null;){let a=i[Rn];if(t.type===128){t=t.next;continue}let l=i[t.index],c=t.type;if(s&&e===0&&(l&&Wr(Ut(l),i),t.flags|=2),!Wl(t))if(c&8)pp(n,e,t.child,i,r,o,!1),Ur(e,n,a,r,l,t,o,i);else if(c&32){let h=op(t,i),_;for(;_=h();)Ur(e,n,a,r,_,t,o,i);Ur(e,n,a,r,l,t,o,i)}else c&16?z_(n,e,i,t,r,o):Ur(e,n,a,r,l,t,o,i);t=s?t.projectionNext:t.next}}function Xl(n,e,t,i,r,o){pp(t,i,n.firstChild,e,r,o,!1)}function PE(n,e,t){let i=e[Pe],r=$_(n,t,e),o=t.parent||e[Ct],s=H_(o,t,e);z_(i,0,e,t,r,s)}function z_(n,e,t,i,r,o){let s=t[xt],l=s[Ct].projection[i.projection];if(Array.isArray(l))for(let c=0;c<l.length;c++){let h=l[c];Ur(e,n,t[Rn],r,h,i,o,t)}else{let c=l,h=s[Xe];a_(i)&&(c.flags|=128),pp(n,e,c,h,r,o,!0)}}function OE(n,e,t,i,r,o,s){let a=i[ni],l=Ut(i);a!==l&&Ur(e,n,t,o,a,r,s);for(let c=He;c<i.length;c++){let h=i[c];Xl(h[K],h,n,e,o,a)}}function RE(n,e,t,i,r){if(e)r?n.addClass(t,i):n.removeClass(t,i);else{let o=i.indexOf("-")===-1?void 0:En.DashCase;r==null?n.removeStyle(t,i,o):(typeof r=="string"&&r.endsWith("!important")&&(r=r.slice(0,-10),o|=En.Important),n.setStyle(t,i,r,o))}}function G_(n,e,t,i,r){let o=qt(),s=i&2;try{oi(-1),s&&e.length>Ne&&N_(n,e,Ne,!1),Se(s?2:0,r,t),t(i,r)}finally{oi(o),Se(s?3:1,r,t)}}function Jl(n,e,t){jE(n,e,t),(t.flags&64)===64&&$E(n,e,t)}function ps(n,e,t=zt){let i=e.localNames;if(i!==null){let r=e.index+1;for(let o=0;o<i.length;o+=2){let s=i[o+1],a=s===-1?t(e,n):n[s];n[r++]=a}}}function NE(n,e,t,i){let o=i.get(m_,h_)||t===An.ShadowDom,s=n.selectRootElement(e,o);return AE(s),s}function AE(n){LE(n)}var LE=()=>null;function FE(n){return n==="class"?"className":n==="for"?"htmlFor":n==="formaction"?"formAction":n==="innerHtml"?"innerHTML":n==="readonly"?"readOnly":n==="tabindex"?"tabIndex":n}function VE(n,e,t,i,r,o){let s=e[K];if(_p(n,s,e,t,i)){ii(n)&&BE(e,n.index);return}n.type&3&&(t=FE(t)),W_(n,e,t,i,r,o)}function W_(n,e,t,i,r,o){if(n.type&3){let s=zt(n,e);i=o!=null?o(i,n.value||"",t):i,r.setProperty(s,t,i)}else n.type&12}function BE(n,e){let t=Gt(e,n);t[ie]&16||(t[ie]|=64)}function jE(n,e,t){let i=t.directiveStart,r=t.directiveEnd;ii(t)&&dE(e,t,n.data[i+t.componentOffset]),n.firstCreatePass||kl(t,e);let o=t.initialInputs;for(let s=i;s<r;s++){let a=n.data[s],l=es(e,n,s,t);if(Wr(l,e),o!==null&&GE(e,s-i,l,a,t,o),xn(a)){let c=Gt(t.index,e);c[Ge]=es(e,n,s,t)}}}function $E(n,e,t){let i=t.directiveStart,r=t.directiveEnd,o=t.index,s=n0();try{oi(o);for(let a=i;a<r;a++){let l=n.data[a],c=e[a];dl(a),(l.hostBindings!==null||l.hostVars!==0||l.hostAttrs!==null)&&HE(l,c)}}finally{oi(-1),dl(s)}}function HE(n,e){n.hostBindings!==null&&n.hostBindings(1,e)}function hp(n,e){let t=n.directiveRegistry,i=null;if(t)for(let r=0;r<t.length;r++){let o=t[r];P_(e,o.selectors,!1)&&(i??=[],xn(o)?i.unshift(o):i.push(o))}return i}function UE(n,e,t,i,r,o){let s=zt(n,e);zE(e[Pe],s,o,n.value,t,i,r)}function zE(n,e,t,i,r,o,s){if(o==null)n.removeAttribute(e,r,t);else{let a=s==null?tn(o):s(o,i||"",r);n.setAttribute(e,r,a,t)}}function GE(n,e,t,i,r,o){let s=o[e];if(s!==null)for(let a=0;a<s.length;a+=2){let l=s[a],c=s[a+1];vf(i,t,l,c)}}function mp(n,e,t,i,r){let o=Ne+t,s=e[K],a=r(s,e,n,i,t);e[o]=a,jr(n,!0);let l=n.type===2;return l?(M_(e[Pe],a,n),(Yg()===0||Vr(n))&&Wr(a,e),Qg()):Wr(a,e),hl()&&(!l||!Wl(n))&&fp(s,e,a,n),n}function gp(n){let e=n;return Hu()?Uu():(e=e.parent,jr(e,!1)),e}function WE(n,e){let t=n[Rn];if(!t)return;let i;try{i=t.get(on,null)}catch{i=null}i?.(e)}function _p(n,e,t,i,r){let o=n.inputs?.[i],s=n.hostDirectiveInputs?.[i],a=!1;if(s)for(let l=0;l<s.length;l+=2){let c=s[l],h=s[l+1],_=e.data[c];vf(_,t[c],h,r),a=!0}if(o)for(let l of o){let c=t[l],h=e.data[l];vf(h,c,i,r),a=!0}return a}function qE(n,e){let t=Gt(e,n),i=t[K];ZE(i,t);let r=t[nn];r!==null&&t[ji]===null&&(t[ji]=g_(r,t[Rn])),Se(18),vp(i,t,t[Ge]),Se(19,t[Ge])}function ZE(n,e){for(let t=e.length;t<n.blueprint.length;t++)e.push(n.blueprint[t])}function vp(n,e,t){fl(e);try{let i=n.viewQuery;i!==null&&hf(1,i,t);let r=n.template;r!==null&&G_(n,e,r,1,t),n.firstCreatePass&&(n.firstCreatePass=!1),e[bn]?.finishViewCreation(n),n.staticContentQueries&&__(n,e),n.staticViewQueries&&hf(2,n.viewQuery,t);let o=n.components;o!==null&&YE(e,o)}catch(i){throw n.firstCreatePass&&(n.incompleteFirstPass=!0,n.firstCreatePass=!1),i}finally{e[ie]&=-5,pl()}}function YE(n,e){for(let t=0;t<e.length;t++)qE(n,e[t])}function hs(n,e,t,i){let r=ne(null);try{let o=e.tView,a=n[ie]&4096?4096:16,l=ip(n,o,t,a,null,e,null,null,i?.injector??null,i?.embeddedViewInjector??null,i?.dehydratedView??null),c=n[e.index];l[ti]=c;let h=n[bn];return h!==null&&(l[bn]=h.createEmbeddedView(o)),vp(o,l,t),l}finally{ne(r)}}function qr(n,e){return!e||e.firstChild===null||a_(n)}function ns(n,e,t,i,r=!1){for(;t!==null;){if(t.type===128){t=r?t.projectionNext:t.next;continue}let o=e[t.index];o!==null&&i.push(Ut(o)),rn(o)&&q_(o,i);let s=t.type;if(s&8)ns(n,e,t.child,i);else if(s&32){let a=op(t,e),l;for(;l=a();)i.push(l)}else if(s&16){let a=U_(e,t);if(Array.isArray(a))i.push(...a);else{let l=Jn(e[xt]);ns(l[K],l,a,i,!0)}}t=r?t.projectionNext:t.next}return i}function q_(n,e){for(let t=He;t<n.length;t++){let i=n[t],r=i[K].firstChild;r!==null&&ns(i[K],i,r,e)}n[ni]!==n[nn]&&e.push(n[ni])}function Z_(n){if(n[Ui]!==null){for(let e of n[Ui])e.impl.addSequence(e);n[Ui].length=0}}var Y_=[];function QE(n){return n[Rt]??KE(n)}function KE(n){let e=Y_.pop()??Object.create(JE);return e.lView=n,e}function XE(n){n.lView[Rt]!==n&&(n.lView=null,Y_.push(n))}var JE=le(G({},Ci),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:n=>{ri(n.lView)},consumerOnSignalRead(){this.lView[Rt]=this}});function e1(n){let e=n[Rt]??Object.create(t1);return e.lView=n,e}var t1=le(G({},Ci),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:n=>{let e=Jn(n.lView);for(;e&&!Q_(e[K]);)e=Jn(e);e&&Ru(e)},consumerOnSignalRead(){this.lView[Rt]=this}});function Q_(n){return n.type!==2}function K_(n){if(n[Nn]===null)return;let e=!0;for(;e;){let t=!1;for(let i of n[Nn])i.dirty&&(t=!0,i.zone===null||Zone.current===i.zone?i.run():i.zone.run(()=>i.run()));e=t&&!!(n[ie]&8192)}}var n1=100;function X_(n,e=0){let i=n[yn].rendererFactory,r=!1;r||i.begin?.();try{i1(n,e)}finally{r||i.end?.()}}function i1(n,e){let t=zu();try{$r(!0),xf(n,e);let i=0;for(;zo(n);){if(i===n1)throw new q(103,!1);i++,xf(n,1)}}finally{$r(t)}}function r1(n,e,t,i){if(Wi(e))return;let r=e[ie],o=!1,s=!1;fl(e);let a=!0,l=null,c=null;o||(Q_(n)?(c=QE(e),l=qn(c)):ga()===null?(a=!1,c=e1(e),l=qn(c)):e[Rt]&&(Zn(e[Rt]),e[Rt]=null));try{Ou(e),Jg(n.bindingStartIndex),t!==null&&G_(n,e,t,2,i);let h=(r&3)===3;if(!o)if(h){let E=n.preOrderCheckHooks;E!==null&&Cl(e,E,null)}else{let E=n.preOrderHooks;E!==null&&xl(e,E,0,null),Xu(e,0)}if(s||o1(e),K_(e),J_(e,0),n.contentQueries!==null&&__(n,e),!o)if(h){let E=n.contentCheckHooks;E!==null&&Cl(e,E)}else{let E=n.contentHooks;E!==null&&xl(e,E,1),Xu(e,1)}a1(n,e);let _=n.components;_!==null&&tv(e,_,0);let w=n.viewQuery;if(w!==null&&hf(2,w,i),!o)if(h){let E=n.viewCheckHooks;E!==null&&Cl(e,E)}else{let E=n.viewHooks;E!==null&&xl(e,E,2),Xu(e,2)}if(n.firstUpdatePass===!0&&(n.firstUpdatePass=!1),e[ol]){for(let E of e[ol])E();e[ol]=null}o||(Z_(e),e[ie]&=-73)}catch(h){throw o||ri(e),h}finally{c!==null&&(wi(c,l),a&&XE(c)),pl()}}function J_(n,e){for(let t=c_(n);t!==null;t=d_(t))for(let i=He;i<t.length;i++){let r=t[i];ev(r,e)}}function o1(n){for(let e=c_(n);e!==null;e=d_(e)){if(!(e[ie]&2))continue;let t=e[Gi];for(let i=0;i<t.length;i++){let r=t[i];Ru(r)}}}function s1(n,e,t){Se(18);let i=Gt(e,n);ev(i,t),Se(19,i[Ge])}function ev(n,e){al(n)&&xf(n,e)}function xf(n,e){let i=n[K],r=n[ie],o=n[Rt],s=!!(e===0&&r&16);if(s||=!!(r&64&&e===0),s||=!!(r&1024),s||=!!(o?.dirty&&Ei(o)),s||=!1,o&&(o.dirty=!1),n[ie]&=-9217,s)r1(i,n,i.template,n[Ge]);else if(r&8192){let a=ne(null);try{K_(n),J_(n,1);let l=i.components;l!==null&&tv(n,l,1),Z_(n)}finally{ne(a)}}}function tv(n,e,t){for(let i=0;i<e.length;i++)s1(n,e[i],t)}function a1(n,e){let t=n.hostBindingOpCodes;if(t!==null)try{for(let i=0;i<t.length;i++){let r=t[i];if(r<0)oi(~r);else{let o=r,s=t[++i],a=t[++i];t0(s,o);let l=e[o];Se(24,l),a(2,l),Se(25,l)}}}finally{oi(-1)}}function yp(n,e){let t=zu()?64:1088;for(n[yn].changeDetectionScheduler?.notify(e);n;){n[ie]|=t;let i=Jn(n);if(Br(n)&&!i)return n;n=i}return null}function nv(n,e,t,i){return[n,!0,0,e,null,i,null,t,null,null]}function iv(n,e){let t=He+e;if(t<n.length)return n[t]}function ms(n,e,t,i=!0){let r=e[K];if(l1(r,e,n,t),i){let s=Cf(t,n),a=e[Pe],l=a.parentNode(n[ni]);l!==null&&wE(r,n[Ct],a,e,l,s)}let o=e[ji];o!==null&&o.firstChild!==null&&(o.firstChild=null)}function rv(n,e){let t=is(n,e);return t!==void 0&&Kl(t[K],t),t}function is(n,e){if(n.length<=He)return;let t=He+e,i=n[t];if(i){let r=i[ti];r!==null&&r!==n&&up(r,i),e>0&&(n[t-1][Ht]=i[Ht]);let o=Fo(n,He+e);xE(i[K],i);let s=o[bn];s!==null&&s.detachView(o[K]),i[Xe]=null,i[Ht]=null,i[ie]&=-129}return i}function l1(n,e,t,i){let r=He+i,o=t.length;i>0&&(t[r-1][Ht]=e),i<o-He?(e[Ht]=t[r],vu(t,He+i,e)):(t.push(e),e[Ht]=null),e[Xe]=t;let s=e[ti];s!==null&&t!==s&&ov(s,e);let a=e[bn];a!==null&&a.insertView(n),ll(e),e[ie]|=128}function ov(n,e){let t=n[Gi],i=e[Xe];if(Cn(i))n[ie]|=2;else{let r=i[Xe][xt];e[xt]!==r&&(n[ie]|=2)}t===null?n[Gi]=[e]:t.push(e)}var ai=class{_lView;_cdRefInjectingView;_appRef=null;_attachedToViewContainer=!1;exhaustive;get rootNodes(){let e=this._lView,t=e[K];return ns(t,e,t.firstChild,[])}constructor(e,t){this._lView=e,this._cdRefInjectingView=t}get context(){return this._lView[Ge]}set context(e){this._lView[Ge]=e}get destroyed(){return Wi(this._lView)}destroy(){if(this._appRef)this._appRef.detachView(this);else if(this._attachedToViewContainer){let e=this._lView[Xe];if(rn(e)){let t=e[Ho],i=t?t.indexOf(this):-1;i>-1&&(is(e,i),Fo(t,i))}this._attachedToViewContainer=!1}Kl(this._lView[K],this._lView)}onDestroy(e){Nu(this._lView,e)}markForCheck(){yp(this._cdRefInjectingView||this._lView,4)}detach(){this._lView[ie]&=-129}reattach(){ll(this._lView),this._lView[ie]|=128}detectChanges(){this._lView[ie]|=1024,X_(this._lView)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new q(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let e=Br(this._lView),t=this._lView[ti];t!==null&&!e&&up(t,this._lView),j_(this._lView[K],this._lView)}attachToAppRef(e){if(this._attachedToViewContainer)throw new q(902,!1);this._appRef=e;let t=Br(this._lView),i=this._lView[ti];i!==null&&!t&&ov(i,this._lView),ll(this._lView)}};var li=(()=>{class n{_declarationLView;_declarationTContainer;elementRef;static __NG_ELEMENT_ID__=c1;constructor(t,i,r){this._declarationLView=t,this._declarationTContainer=i,this.elementRef=r}get ssrId(){return this._declarationTContainer.tView?.ssrId||null}createEmbeddedView(t,i){return this.createEmbeddedViewImpl(t,i)}createEmbeddedViewImpl(t,i,r){let o=hs(this._declarationLView,this._declarationTContainer,t,{embeddedViewInjector:i,dehydratedView:r});return new ai(o)}}return n})();function c1(){return ec(at(),te())}function ec(n,e){return n.type&4?new li(e,n,Yr(n,e)):null}function Qr(n,e,t,i,r){let o=n.data[e];if(o===null)o=d1(n,e,t,i,r),e0()&&(o.flags|=32);else if(o.type&64){o.type=t,o.value=i,o.attrs=r;let s=Kg();o.injectorIndex=s===null?-1:s.injectorIndex}return jr(o,!0),o}function d1(n,e,t,i,r){let o=$u(),s=Hu(),a=s?o:o&&o.parent,l=n.data[e]=f1(n,a,t,e,i,r);return u1(n,l,o,s),l}function u1(n,e,t,i){n.firstChild===null&&(n.firstChild=e),t!==null&&(i?t.child==null&&e.parent!==null&&(t.child=e):t.next===null&&(t.next=e,e.prev=t))}function f1(n,e,t,i,r,o){let s=e?e.injectorIndex:-1,a=0;return Vu()&&(a|=128),{type:t,index:i,insertBeforeIndex:null,injectorIndex:s,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,componentOffset:-1,propertyBindings:null,flags:a,providerIndexes:0,value:r,namespace:Zu(),attrs:o,mergedAttrs:null,localNames:null,initialInputs:null,inputs:null,hostDirectiveInputs:null,outputs:null,hostDirectiveOutputs:null,directiveToIndex:null,tView:null,next:null,prev:null,projectionNext:null,child:null,parent:e,projection:null,styles:null,stylesWithoutHost:null,residualStyles:void 0,classes:null,classesWithoutHost:null,residualClasses:void 0,classBindings:0,styleBindings:0}}var qB=new RegExp(`^(\\d+)*(${pw}|${fw})*(.*)`);function p1(n){let e=n[Tu]??[],i=n[Xe][Pe],r=[];for(let o of e)o.data[p_]!==void 0?r.push(o):h1(o,i);n[Tu]=r}function h1(n,e){let t=0,i=n.firstChild;if(i){let r=n.data[f_];for(;t<r;){let o=i.nextSibling;T_(e,i,!1),i=o,t++}}}var m1=()=>null,g1=()=>null;function Ll(n,e){return m1(n,e)}function sv(n,e,t){return g1(n,e,t)}var av=class{},tc=class{},wf=class{resolveComponentFactory(e){throw new q(917,!1)}},nc=class{static NULL=new wf},Dn=class{},ic=(()=>{class n{destroyNode=null;static __NG_ELEMENT_ID__=()=>_1()}return n})();function _1(){let n=te(),e=at(),t=Gt(e.index,n);return(Cn(t)?t:n)[Pe]}var lv=(()=>{class n{static \u0275prov=re({token:n,providedIn:"root",factory:()=>null})}return n})();var El={},Ef=class{injector;parentInjector;constructor(e,t){this.injector=e,this.parentInjector=t}get(e,t,i){let r=this.injector.get(e,El,i);return r!==El||t===El?r:this.parentInjector.get(e,t,i)}};function Fl(n,e,t){let i=t?n.styles:null,r=t?n.classes:null,o=0;if(e!==null)for(let s=0;s<e.length;s++){let a=e[s];if(typeof a=="number")o=a;else if(o==1)r=Xa(r,a);else if(o==2){let l=a,c=e[++s];i=Xa(i,l+": "+c+";")}}t?n.styles=i:n.stylesWithoutHost=i,t?n.classes=r:n.classesWithoutHost=r}function dn(n,e=0){let t=te();if(t===null)return me(n,e);let i=at();return i_(i,t,ft(n),e)}function cv(n,e,t,i,r){let o=i===null?null:{"":-1},s=r(n,t);if(s!==null){let a=s,l=null,c=null;for(let h of s)if(h.resolveHostDirectives!==null){[a,l,c]=h.resolveHostDirectives(s);break}b1(n,e,t,a,o,l,c)}o!==null&&i!==null&&v1(t,i,o)}function v1(n,e,t){let i=n.localNames=[];for(let r=0;r<e.length;r+=2){let o=t[e[r+1]];if(o==null)throw new q(-301,!1);i.push(e[r],o)}}function y1(n,e,t){e.componentOffset=t,(n.components??=[]).push(e.index)}function b1(n,e,t,i,r,o,s){let a=i.length,l=!1;for(let w=0;w<a;w++){let E=i[w];!l&&xn(E)&&(l=!0,y1(n,t,w)),uf(kl(t,e),n,E.type)}S1(t,n.data.length,a);for(let w=0;w<a;w++){let E=i[w];E.providersResolver&&E.providersResolver(E)}let c=!1,h=!1,_=R_(n,e,a,null);a>0&&(t.directiveToIndex=new Map);for(let w=0;w<a;w++){let E=i[w];if(t.mergedAttrs=Gr(t.mergedAttrs,E.hostAttrs),x1(n,t,e,_,E),D1(_,E,r),s!==null&&s.has(E)){let[V,z]=s.get(E);t.directiveToIndex.set(E.type,[_,V+t.directiveStart,z+t.directiveStart])}else(o===null||!o.has(E))&&t.directiveToIndex.set(E.type,_);E.contentQueries!==null&&(t.flags|=4),(E.hostBindings!==null||E.hostAttrs!==null||E.hostVars!==0)&&(t.flags|=64);let P=E.type.prototype;!c&&(P.ngOnChanges||P.ngOnInit||P.ngDoCheck)&&((n.preOrderHooks??=[]).push(t.index),c=!0),!h&&(P.ngOnChanges||P.ngDoCheck)&&((n.preOrderCheckHooks??=[]).push(t.index),h=!0),_++}C1(n,t,o)}function C1(n,e,t){for(let i=e.directiveStart;i<e.directiveEnd;i++){let r=n.data[i];if(t===null||!t.has(r))P0(0,e,r,i),P0(1,e,r,i),R0(e,i,!1);else{let o=t.get(r);O0(0,e,o,i),O0(1,e,o,i),R0(e,i,!0)}}}function P0(n,e,t,i){let r=n===0?t.inputs:t.outputs;for(let o in r)if(r.hasOwnProperty(o)){let s;n===0?s=e.inputs??={}:s=e.outputs??={},s[o]??=[],s[o].push(i),dv(e,o)}}function O0(n,e,t,i){let r=n===0?t.inputs:t.outputs;for(let o in r)if(r.hasOwnProperty(o)){let s=r[o],a;n===0?a=e.hostDirectiveInputs??={}:a=e.hostDirectiveOutputs??={},a[s]??=[],a[s].push(i,o),dv(e,s)}}function dv(n,e){e==="class"?n.flags|=8:e==="style"&&(n.flags|=16)}function R0(n,e,t){let{attrs:i,inputs:r,hostDirectiveInputs:o}=n;if(i===null||!t&&r===null||t&&o===null||tp(n)){n.initialInputs??=[],n.initialInputs.push(null);return}let s=null,a=0;for(;a<i.length;){let l=i[a];if(l===0){a+=4;continue}else if(l===5){a+=2;continue}else if(typeof l=="number")break;if(!t&&r.hasOwnProperty(l)){let c=r[l];for(let h of c)if(h===e){s??=[],s.push(l,i[a+1]);break}}else if(t&&o.hasOwnProperty(l)){let c=o[l];for(let h=0;h<c.length;h+=2)if(c[h]===e){s??=[],s.push(c[h+1],i[a+1]);break}}a+=2}n.initialInputs??=[],n.initialInputs.push(s)}function x1(n,e,t,i,r){n.data[i]=r;let o=r.factory||(r.factory=Ri(r.type,!0)),s=new Ki(o,xn(r),dn,null);n.blueprint[i]=s,t[i]=s,w1(n,e,i,R_(n,t,r.hostVars,ct),r)}function w1(n,e,t,i,r){let o=r.hostBindings;if(o){let s=n.hostBindingOpCodes;s===null&&(s=n.hostBindingOpCodes=[]);let a=~e.index;E1(s)!=a&&s.push(a),s.push(t,i,o)}}function E1(n){let e=n.length;for(;e>0;){let t=n[--e];if(typeof t=="number"&&t<0)return t}return 0}function D1(n,e,t){if(t){if(e.exportAs)for(let i=0;i<e.exportAs.length;i++)t[e.exportAs[i]]=n;xn(e)&&(t[""]=n)}}function S1(n,e,t){n.flags|=1,n.directiveStart=e,n.directiveEnd=e+t,n.providerIndexes=e}function bp(n,e,t,i,r,o,s,a){let l=e[K],c=l.consts,h=Wt(c,s),_=Qr(l,n,t,i,h);return o&&cv(l,e,_,Wt(c,a),r),_.mergedAttrs=Gr(_.mergedAttrs,_.attrs),_.attrs!==null&&Fl(_,_.attrs,!1),_.mergedAttrs!==null&&Fl(_,_.mergedAttrs,!0),l.queries!==null&&l.queries.elementStart(l,_),_}function Cp(n,e){Y0(n,e),Mu(e)&&n.queries.elementEnd(e)}function T1(n,e,t,i,r,o){let s=e.consts,a=Wt(s,r),l=Qr(e,n,t,i,a);if(l.mergedAttrs=Gr(l.mergedAttrs,l.attrs),o!=null){let c=Wt(s,o);l.localNames=[];for(let h=0;h<c.length;h+=2)l.localNames.push(c[h],-1)}return l.attrs!==null&&Fl(l,l.attrs,!1),l.mergedAttrs!==null&&Fl(l,l.mergedAttrs,!0),e.queries!==null&&e.queries.elementStart(e,l),l}function xp(n){return fv(n)?Array.isArray(n)||!(n instanceof Map)&&Symbol.iterator in n:!1}function uv(n,e){if(Array.isArray(n))for(let t=0;t<n.length;t++)e(n[t]);else{let t=n[Symbol.iterator](),i;for(;!(i=t.next()).done;)e(i.value)}}function fv(n){return n!==null&&(typeof n=="function"||typeof n=="object")}function wp(n,e,t){return n[e]=t}function M1(n,e){return n[e]}function Zt(n,e,t){if(t===ct)return!1;let i=n[e];return Object.is(i,t)?!1:(n[e]=t,!0)}function Ep(n,e,t,i){let r=Zt(n,e,t);return Zt(n,e+1,i)||r}function I1(n,e,t,i,r){let o=Ep(n,e,t,i);return Zt(n,e+2,r)||o}function Dl(n,e,t){return function i(r){let o=ii(n)?Gt(n.index,e):e;yp(o,5);let s=e[Ge],a=N0(e,s,t,r),l=i.__ngNextListenerFn__;for(;l;)a=N0(e,s,l,r)&&a,l=l.__ngNextListenerFn__;return a}}function N0(n,e,t,i){let r=ne(null);try{return Se(6,e,t),t(i)!==!1}catch(o){return WE(n,o),!1}finally{Se(7,e,t),ne(r)}}function pv(n,e,t,i,r,o,s,a){let l=Vr(n),c=!1,h=null;if(!i&&l&&(h=P1(e,t,o,n.index)),h!==null){let _=h.__ngLastListenerFn__||h;_.__ngNextListenerFn__=s,h.__ngLastListenerFn__=s,c=!0}else{let _=zt(n,t),w=i?i(_):_;mw(t,w,o,a);let E=r.listen(w,o,a);if(!k1(o)){let P=i?V=>i(Ut(V[n.index])):n.index;hv(P,e,t,o,a,E,!1)}}return c}function k1(n){return n.startsWith("animation")||n.startsWith("transition")}function P1(n,e,t,i){let r=n.cleanup;if(r!=null)for(let o=0;o<r.length-1;o+=2){let s=r[o];if(s===t&&r[o+1]===i){let a=e[Lr],l=r[o+2];return a&&a.length>l?a[l]:null}typeof s=="string"&&(o+=2)}return null}function hv(n,e,t,i,r,o,s){let a=e.firstCreatePass?Lu(e):null,l=Au(t),c=l.length;l.push(r,o),a&&a.push(i,n,c,(c+1)*(s?-1:1))}function A0(n,e,t,i,r,o){let s=e[t],a=e[K],c=a.data[t].outputs[i],_=s[c].subscribe(o);hv(n.index,a,e,r,o,_,!0)}var Df=Symbol("BINDING");var Sf=class extends nc{ngModule;constructor(e){super(),this.ngModule=e}resolveComponentFactory(e){let t=Bi(e);return new rs(t,this.ngModule)}};function O1(n){return Object.keys(n).map(e=>{let[t,i,r]=n[e],o={propName:t,templateName:e,isSignal:(i&Zl.SignalBased)!==0};return r&&(o.transform=r),o})}function R1(n){return Object.keys(n).map(e=>({propName:n[e],templateName:e}))}function N1(n,e,t){let i=e instanceof Mt?e:e?.injector;return i&&n.getStandaloneInjector!==null&&(i=n.getStandaloneInjector(i)||i),i?new Ef(t,i):t}function A1(n){let e=n.get(Dn,null);if(e===null)throw new q(407,!1);let t=n.get(lv,null),i=n.get($t,null);return{rendererFactory:e,sanitizer:t,changeDetectionScheduler:i,ngReflect:!1}}function L1(n,e){let t=mv(n);return D_(e,t,t==="svg"?Ao:t==="math"?Iu:null)}function F1(n){if(n?.toLowerCase()==="script")throw new q(905,!1)}function mv(n){return(n.selectors[0][0]||"div").toLowerCase()}var rs=class extends tc{componentDef;ngModule;selector;componentType;ngContentSelectors;isBoundToModule;cachedInputs=null;cachedOutputs=null;get inputs(){return this.cachedInputs??=O1(this.componentDef.inputs),this.cachedInputs}get outputs(){return this.cachedOutputs??=R1(this.componentDef.outputs),this.cachedOutputs}constructor(e,t){super(),this.componentDef=e,this.ngModule=t,this.componentType=e.type,this.selector=sE(e.selectors),this.ngContentSelectors=e.ngContentSelectors??[],this.isBoundToModule=!!t}create(e,t,i,r,o,s){Se(22);let a=ne(null);try{let l=this.componentDef,c=V1(i,l,s,o),h=N1(l,r||this.ngModule,e),_=A1(h),w=_.rendererFactory.createRenderer(null,l),E=i?NE(w,i,l.encapsulation,h):L1(l,w);F1(E?.tagName);let P=s?.some(L0)||o?.some(B=>typeof B!="function"&&B.bindings.some(L0)),V=ip(null,c,null,512|O_(l),null,null,_,w,h,null,g_(E,h,!0));V[Ne]=E,fl(V);let z=null;try{let B=bp(Ne,V,2,"#host",()=>c.directiveRegistry,!0,0);M_(w,E,B),Wr(E,V),Jl(c,V,B),Qf(c,B,V),Cp(c,B),t!==void 0&&j1(B,this.ngContentSelectors,t),z=Gt(B.index,V),V[Ge]=z[Ge],vp(c,V,null)}catch(B){throw z!==null&&ff(z),ff(V),B}finally{Se(23),pl()}return new Vl(this.componentType,V,!!P)}finally{ne(a)}}};function V1(n,e,t,i){let r=n?["ng-version","20.3.29"]:aE(e.selectors[0]),o=null,s=null,a=0;if(t)for(let h of t)a+=h[Df].requiredVars,h.create&&(h.targetIdx=0,(o??=[]).push(h)),h.update&&(h.targetIdx=0,(s??=[]).push(h));if(i)for(let h=0;h<i.length;h++){let _=i[h];if(typeof _!="function")for(let w of _.bindings){a+=w[Df].requiredVars;let E=h+1;w.create&&(w.targetIdx=E,(o??=[]).push(w)),w.update&&(w.targetIdx=E,(s??=[]).push(w))}}let l=[e];if(i)for(let h of i){let _=typeof h=="function"?h:h.type,w=Cu(_);l.push(w)}return np(0,null,B1(o,s),1,a,l,null,null,null,[r],null)}function B1(n,e){return!n&&!e?null:t=>{if(t&1&&n)for(let i of n)i.create();if(t&2&&e)for(let i of e)i.update()}}function L0(n){let e=n[Df].kind;return e==="input"||e==="twoWay"}var Vl=class extends av{_rootLView;_hasInputBindings;instance;hostView;changeDetectorRef;componentType;location;previousInputValues=null;_tNode;constructor(e,t,i){super(),this._rootLView=t,this._hasInputBindings=i,this._tNode=Uo(t[K],Ne),this.location=Yr(this._tNode,t),this.instance=Gt(this._tNode.index,t)[Ge],this.hostView=this.changeDetectorRef=new ai(t,void 0),this.componentType=e}setInput(e,t){this._hasInputBindings;let i=this._tNode;if(this.previousInputValues??=new Map,this.previousInputValues.has(e)&&Object.is(this.previousInputValues.get(e),t))return;let r=this._rootLView,o=_p(i,r[K],r,e,t);this.previousInputValues.set(e,t);let s=Gt(i.index,r);yp(s,1)}get injector(){return new Qi(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(e){this.hostView.onDestroy(e)}};function j1(n,e,t){let i=n.projection=[];for(let r=0;r<e.length;r++){let o=t[r];i.push(o!=null&&o.length?Array.from(o):null)}}var ui=(()=>{class n{static __NG_ELEMENT_ID__=$1}return n})();function $1(){let n=at();return _v(n,te())}var H1=ui,gv=class extends H1{_lContainer;_hostTNode;_hostLView;constructor(e,t,i){super(),this._lContainer=e,this._hostTNode=t,this._hostLView=i}get element(){return Yr(this._hostTNode,this._hostLView)}get injector(){return new Qi(this._hostTNode,this._hostLView)}get parentInjector(){let e=Wf(this._hostTNode,this._hostLView);if(K0(e)){let t=Ml(e,this._hostLView),i=Tl(e),r=t[K].data[i+8];return new Qi(r,t)}else return new Qi(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(e){let t=F0(this._lContainer);return t!==null&&t[e]||null}get length(){return this._lContainer.length-He}createEmbeddedView(e,t,i){let r,o;typeof i=="number"?r=i:i!=null&&(r=i.index,o=i.injector);let s=Ll(this._lContainer,e.ssrId),a=e.createEmbeddedViewImpl(t||{},o,s);return this.insertImpl(a,r,qr(this._hostTNode,s)),a}createComponent(e,t,i,r,o,s,a){let l=e&&!$x(e),c;if(l)c=t;else{let z=t||{};c=z.index,i=z.injector,r=z.projectableNodes,o=z.environmentInjector||z.ngModuleRef,s=z.directives,a=z.bindings}let h=l?e:new rs(Bi(e)),_=i||this.parentInjector;if(!o&&h.ngModule==null){let B=(l?_:this.parentInjector).get(Mt,null);B&&(o=B)}let w=Bi(h.componentType??{}),E=Ll(this._lContainer,w?.id??null),P=E?.firstChild??null,V=h.create(_,r,P,o,s,a);return this.insertImpl(V.hostView,c,qr(this._hostTNode,E)),V}insert(e,t){return this.insertImpl(e,t,!0)}insertImpl(e,t,i){let r=e._lView;if(Gg(r)){let a=this.indexOf(e);if(a!==-1)this.detach(a);else{let l=r[Xe],c=new gv(l,l[Ct],l[Xe]);c.detach(c.indexOf(e))}}let o=this._adjustIndex(t),s=this._lContainer;return ms(s,r,o,i),e.attachToViewContainerRef(),vu(tf(s),o,e),e}move(e,t){return this.insert(e,t)}indexOf(e){let t=F0(this._lContainer);return t!==null?t.indexOf(e):-1}remove(e){let t=this._adjustIndex(e,-1),i=is(this._lContainer,t);i&&(Fo(tf(this._lContainer),t),Kl(i[K],i))}detach(e){let t=this._adjustIndex(e,-1),i=is(this._lContainer,t);return i&&Fo(tf(this._lContainer),t)!=null?new ai(i):null}_adjustIndex(e,t=0){return e??this.length+t}};function F0(n){return n[Ho]}function tf(n){return n[Ho]||(n[Ho]=[])}function _v(n,e){let t,i=e[n.index];return rn(i)?t=i:(t=nv(i,e,null,n),e[n.index]=t,rp(e,t)),z1(t,e,n,i),new gv(t,n,e)}function U1(n,e){let t=n[Pe],i=t.createComment(""),r=zt(e,n),o=t.parentNode(r);return Rl(t,o,i,t.nextSibling(r),!1),i}var z1=q1,G1=()=>!1;function W1(n,e,t){return G1(n,e,t)}function q1(n,e,t,i){if(n[ni])return;let r;t.type&8?r=Ut(i):r=U1(e,t),n[ni]=r}var Tf=class n{queryList;matches=null;constructor(e){this.queryList=e}clone(){return new n(this.queryList)}setDirty(){this.queryList.setDirty()}},Mf=class n{queries;constructor(e=[]){this.queries=e}createEmbeddedView(e){let t=e.queries;if(t!==null){let i=e.contentQueries!==null?e.contentQueries[0]:t.length,r=[];for(let o=0;o<i;o++){let s=t.getByIndex(o),a=this.queries[s.indexInDeclarationView];r.push(a.clone())}return new n(r)}return null}insertView(e){this.dirtyQueriesWithMatches(e)}detachView(e){this.dirtyQueriesWithMatches(e)}finishViewCreation(e){this.dirtyQueriesWithMatches(e)}dirtyQueriesWithMatches(e){for(let t=0;t<this.queries.length;t++)Sp(e,t).matches!==null&&this.queries[t].setDirty()}},If=class{flags;read;predicate;constructor(e,t,i=null){this.flags=t,this.read=i,typeof e=="string"?this.predicate=J1(e):this.predicate=e}},kf=class n{queries;constructor(e=[]){this.queries=e}elementStart(e,t){for(let i=0;i<this.queries.length;i++)this.queries[i].elementStart(e,t)}elementEnd(e){for(let t=0;t<this.queries.length;t++)this.queries[t].elementEnd(e)}embeddedTView(e){let t=null;for(let i=0;i<this.length;i++){let r=t!==null?t.length:0,o=this.getByIndex(i).embeddedTView(e,r);o&&(o.indexInDeclarationView=i,t!==null?t.push(o):t=[o])}return t!==null?new n(t):null}template(e,t){for(let i=0;i<this.queries.length;i++)this.queries[i].template(e,t)}getByIndex(e){return this.queries[e]}get length(){return this.queries.length}track(e){this.queries.push(e)}},Pf=class n{metadata;matches=null;indexInDeclarationView=-1;crossesNgTemplate=!1;_declarationNodeIndex;_appliesToNextNode=!0;constructor(e,t=-1){this.metadata=e,this._declarationNodeIndex=t}elementStart(e,t){this.isApplyingToNode(t)&&this.matchTNode(e,t)}elementEnd(e){this._declarationNodeIndex===e.index&&(this._appliesToNextNode=!1)}template(e,t){this.elementStart(e,t)}embeddedTView(e,t){return this.isApplyingToNode(e)?(this.crossesNgTemplate=!0,this.addMatch(-e.index,t),new n(this.metadata)):null}isApplyingToNode(e){if(this._appliesToNextNode&&(this.metadata.flags&1)!==1){let t=this._declarationNodeIndex,i=e.parent;for(;i!==null&&i.type&8&&i.index!==t;)i=i.parent;return t===(i!==null?i.index:-1)}return this._appliesToNextNode}matchTNode(e,t){let i=this.metadata.predicate;if(Array.isArray(i))for(let r=0;r<i.length;r++){let o=i[r];this.matchTNodeWithReadOption(e,t,Z1(t,o)),this.matchTNodeWithReadOption(e,t,wl(t,e,o,!1,!1))}else i===li?t.type&4&&this.matchTNodeWithReadOption(e,t,-1):this.matchTNodeWithReadOption(e,t,wl(t,e,i,!1,!1))}matchTNodeWithReadOption(e,t,i){if(i!==null){let r=this.metadata.read;if(r!==null)if(r===cn||r===ui||r===li&&t.type&4)this.addMatch(t.index,-2);else{let o=wl(t,e,r,!1,!1);o!==null&&this.addMatch(t.index,o)}else this.addMatch(t.index,i)}}addMatch(e,t){this.matches===null?this.matches=[e,t]:this.matches.push(e,t)}};function Z1(n,e){let t=n.localNames;if(t!==null){for(let i=0;i<t.length;i+=2)if(t[i]===e)return t[i+1]}return null}function Y1(n,e){return n.type&11?Yr(n,e):n.type&4?ec(n,e):null}function Q1(n,e,t,i){return t===-1?Y1(e,n):t===-2?K1(n,e,i):es(n,n[K],t,e)}function K1(n,e,t){if(t===cn)return Yr(e,n);if(t===li)return ec(e,n);if(t===ui)return _v(e,n)}function vv(n,e,t,i){let r=e[bn].queries[i];if(r.matches===null){let o=n.data,s=t.matches,a=[];for(let l=0;s!==null&&l<s.length;l+=2){let c=s[l];if(c<0)a.push(null);else{let h=o[c];a.push(Q1(e,h,s[l+1],t.metadata.read))}}r.matches=a}return r.matches}function Of(n,e,t,i){let r=n.queries.getByIndex(t),o=r.matches;if(o!==null){let s=vv(n,e,r,t);for(let a=0;a<o.length;a+=2){let l=o[a];if(l>0)i.push(s[a/2]);else{let c=o[a+1],h=e[-l];for(let _=He;_<h.length;_++){let w=h[_];w[ti]===w[Xe]&&Of(w[K],w,c,i)}if(h[Gi]!==null){let _=h[Gi];for(let w=0;w<_.length;w++){let E=_[w];Of(E[K],E,c,i)}}}}}return i}function Dp(n,e){return n[bn].queries[e].queryList}function X1(n,e,t){let i=new Pl((t&4)===4);return Zg(n,e,i,i.destroy),(e[bn]??=new Mf).queries.push(new Tf(i))-1}function yv(n,e,t){let i=Ue();return i.firstCreatePass&&(eD(i,new If(n,e,t),-1),(e&2)===2&&(i.staticViewQueries=!0)),X1(i,te(),e)}function J1(n){return n.split(",").map(e=>e.trim())}function eD(n,e,t){n.queries===null&&(n.queries=new kf),n.queries.track(new Pf(e,t))}function Sp(n,e){return n.queries.getByIndex(e)}function bv(n,e){let t=n[K],i=Sp(t,e);return i.crossesNgTemplate?Of(t,n,e,[]):vv(t,n,i,e)}function Cv(n,e,t){let i,r=bo(()=>{i._dirtyCounter();let o=nD(i,n);if(e&&o===void 0)throw new q(-951,!1);return o});return i=r[it],i._dirtyCounter=x(0),i._flatValue=void 0,r}function xv(n){return Cv(!0,!1,n)}function wv(n){return Cv(!0,!0,n)}function tD(n,e){let t=n[it];t._lView=te(),t._queryIndex=e,t._queryList=Dp(t._lView,e),t._queryList.onDirty(()=>t._dirtyCounter.update(i=>i+1))}function nD(n,e){let t=n._lView,i=n._queryIndex;if(t===void 0||i===void 0||t[ie]&4)return e?void 0:jt;let r=Dp(t,i),o=bv(t,i);return r.reset(o,s_),e?r.first:r._changesDetected||n._flatValue===void 0?n._flatValue=r.toArray():n._flatValue}var os=class{};var ss=class extends os{injector;componentFactoryResolver=new Sf(this);instance=null;constructor(e){super();let t=new Ai([...e.providers,{provide:os,useValue:this},{provide:nc,useValue:this.componentFactoryResolver}],e.parent||jo(),e.debugName,new Set(["environment"]));this.injector=t,e.runEnvironmentInitializers&&t.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(e){this.injector.onDestroy(e)}};function Ev(n,e,t=null){return new ss({providers:n,parent:e,debugName:t,runEnvironmentInitializers:!0}).injector}var iD=(()=>{class n{_injector;cachedInjectors=new Map;constructor(t){this._injector=t}getOrCreateStandaloneInjector(t){if(!t.standalone)return null;if(!this.cachedInjectors.has(t)){let i=xu(!1,t.type),r=i.length>0?Ev([i],this._injector,`Standalone[${t.type.name}]`):null;this.cachedInjectors.set(t,r)}return this.cachedInjectors.get(t)}ngOnDestroy(){try{for(let t of this.cachedInjectors.values())t!==null&&t.destroy()}finally{this.cachedInjectors.clear()}}static \u0275prov=re({token:n,providedIn:"environment",factory:()=>new n(me(Mt))})}return n})();function ce(n){return Hl(()=>{let e=Dv(n),t=le(G({},e),{decls:n.decls,vars:n.vars,template:n.template,consts:n.consts||null,ngContentSelectors:n.ngContentSelectors,onPush:n.changeDetection===qf.OnPush,directiveDefs:null,pipeDefs:null,dependencies:e.standalone&&n.dependencies||null,getStandaloneInjector:e.standalone?r=>r.get(iD).getOrCreateStandaloneInjector(t):null,getExternalStyles:null,signals:n.signals??!1,data:n.data||{},encapsulation:n.encapsulation||An.Emulated,styles:n.styles||jt,_:null,schemas:n.schemas||null,tView:null,id:""});e.standalone&&di("NgStandalone"),Sv(t);let i=n.dependencies;return t.directiveDefs=V0(i,rD),t.pipeDefs=V0(i,Ag),t.id=aD(t),t})}function rD(n){return Bi(n)||Cu(n)}function oD(n,e){if(n==null)return ei;let t={};for(let i in n)if(n.hasOwnProperty(i)){let r=n[i],o,s,a,l;Array.isArray(r)?(a=r[0],o=r[1],s=r[2]??o,l=r[3]||null):(o=r,s=r,a=Zl.None,l=null),t[o]=[i,a,l],e[o]=s}return t}function sD(n){if(n==null)return ei;let e={};for(let t in n)n.hasOwnProperty(t)&&(e[n[t]]=t);return e}function fi(n){return Hl(()=>{let e=Dv(n);return Sv(e),e})}function rc(n){return{type:n.type,name:n.name,factory:null,pure:n.pure!==!1,standalone:n.standalone??!0,onDestroy:n.type.prototype.ngOnDestroy||null}}function Dv(n){let e={};return{type:n.type,providersResolver:null,factory:null,hostBindings:n.hostBindings||null,hostVars:n.hostVars||0,hostAttrs:n.hostAttrs||null,contentQueries:n.contentQueries||null,declaredInputs:e,inputConfig:n.inputs||ei,exportAs:n.exportAs||null,standalone:n.standalone??!0,signals:n.signals===!0,selectors:n.selectors||jt,viewQuery:n.viewQuery||null,features:n.features||null,setInput:null,resolveHostDirectives:null,hostDirectives:null,inputs:oD(n.inputs,e),outputs:sD(n.outputs),debugInfo:null}}function Sv(n){n.features?.forEach(e=>e(n))}function V0(n,e){return n?()=>{let t=typeof n=="function"?n():n,i=[];for(let r of t){let o=e(r);o!==null&&i.push(o)}return i}:null}function aD(n){let e=0,t=typeof n.consts=="function"?"":n.consts,i=[n.selectors,n.ngContentSelectors,n.hostVars,n.hostAttrs,t,n.vars,n.decls,n.encapsulation,n.standalone,n.signals,n.exportAs,JSON.stringify(n.inputs),JSON.stringify(n.outputs),Object.getOwnPropertyNames(n.type.prototype),!!n.contentQueries,!!n.viewQuery];for(let o of i.join("|"))e=Math.imul(31,e)+o.charCodeAt(0)<<0;return e+=2147483648,"c"+e}function lD(n){return Object.getPrototypeOf(n.prototype).constructor}function gs(n){let e=lD(n.type),t=!0,i=[n];for(;e;){let r;if(xn(n))r=e.\u0275cmp||e.\u0275dir;else{if(e.\u0275cmp)throw new q(903,!1);r=e.\u0275dir}if(r){if(t){i.push(r);let s=n;s.inputs=nf(n.inputs),s.declaredInputs=nf(n.declaredInputs),s.outputs=nf(n.outputs);let a=r.hostBindings;a&&pD(n,a);let l=r.viewQuery,c=r.contentQueries;if(l&&uD(n,l),c&&fD(n,c),cD(n,r),Dg(n.outputs,r.outputs),xn(r)&&r.data.animation){let h=n.data;h.animation=(h.animation||[]).concat(r.data.animation)}}let o=r.features;if(o)for(let s=0;s<o.length;s++){let a=o[s];a&&a.ngInherit&&a(n),a===gs&&(t=!1)}}e=Object.getPrototypeOf(e)}dD(i)}function cD(n,e){for(let t in e.inputs){if(!e.inputs.hasOwnProperty(t)||n.inputs.hasOwnProperty(t))continue;let i=e.inputs[t];i!==void 0&&(n.inputs[t]=i,n.declaredInputs[t]=e.declaredInputs[t])}}function dD(n){let e=0,t=null;for(let i=n.length-1;i>=0;i--){let r=n[i];r.hostVars=e+=r.hostVars,r.hostAttrs=Gr(r.hostAttrs,t=Gr(t,r.hostAttrs))}}function nf(n){return n===ei?{}:n===jt?[]:n}function uD(n,e){let t=n.viewQuery;t?n.viewQuery=(i,r)=>{e(i,r),t(i,r)}:n.viewQuery=e}function fD(n,e){let t=n.contentQueries;t?n.contentQueries=(i,r,o)=>{e(i,r,o),t(i,r,o)}:n.contentQueries=e}function pD(n,e){let t=n.hostBindings;t?n.hostBindings=(i,r)=>{e(i,r),t(i,r)}:n.hostBindings=e}function Tv(n,e,t,i,r,o,s,a){if(t.firstCreatePass){n.mergedAttrs=Gr(n.mergedAttrs,n.attrs);let h=n.tView=np(2,n,r,o,s,t.directiveRegistry,t.pipeRegistry,null,t.schemas,t.consts,null);t.queries!==null&&(t.queries.template(t,n),h.queries=t.queries.embeddedTView(n))}a&&(n.flags|=a),jr(n,!1);let l=mD(t,e,n,i);hl()&&fp(t,e,l,n),Wr(l,e);let c=nv(l,e,l,n);e[i+Ne]=c,rp(e,c),W1(c,n,e)}function hD(n,e,t,i,r,o,s,a,l,c,h){let _=t+Ne,w;return e.firstCreatePass?(w=Qr(e,_,4,s||null,a||null),cl()&&cv(e,n,w,Wt(e.consts,c),hp),Y0(e,w)):w=e.data[_],Tv(w,n,e,t,i,r,o,l),Vr(w)&&Jl(e,n,w),c!=null&&ps(n,w,h),w}function as(n,e,t,i,r,o,s,a,l,c,h){let _=t+Ne,w;if(e.firstCreatePass){if(w=Qr(e,_,4,s||null,a||null),c!=null){let E=Wt(e.consts,c);w.localNames=[];for(let P=0;P<E.length;P+=2)w.localNames.push(E[P],-1)}}else w=e.data[_];return Tv(w,n,e,t,i,r,o,l),c!=null&&ps(n,w,h),w}function Kr(n,e,t,i,r,o,s,a){let l=te(),c=Ue(),h=Wt(c.consts,o);return hD(l,c,n,e,t,i,r,h,void 0,s,a),Kr}var mD=gD;function gD(n,e,t,i){return Yo(!0),e[Pe].createComment("")}var Tp=new ee("");function _s(n){return!!n&&typeof n.then=="function"}function oc(n){return!!n&&typeof n.subscribe=="function"}var Mv=new ee("");var Mp=(()=>{class n{resolve;reject;initialized=!1;done=!1;donePromise=new Promise((t,i)=>{this.resolve=t,this.reject=i});appInits=k(Mv,{optional:!0})??[];injector=k(bt);constructor(){}runInitializers(){if(this.initialized)return;let t=[];for(let r of this.appInits){let o=Ar(this.injector,r);if(_s(o))t.push(o);else if(oc(o)){let s=new Promise((a,l)=>{o.subscribe({complete:a,error:l})});t.push(s)}}let i=()=>{this.done=!0,this.resolve()};Promise.all(t).then(()=>{i()}).catch(r=>{this.reject(r)}),t.length===0&&i(),this.initialized=!0}static \u0275fac=function(i){return new(i||n)};static \u0275prov=re({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),Iv=new ee("");function kv(){Od(()=>{let n="";throw new q(600,n)})}function Pv(n){return n.isBoundToModule}var _D=10;var nr=(()=>{class n{_runningTick=!1;_destroyed=!1;_destroyListeners=[];_views=[];internalErrorHandler=k(on);afterRenderManager=k(Ql);zonelessEnabled=k(Qo);rootEffectScheduler=k(Ko);dirtyFlags=0;tracingSnapshot=null;allTestViews=new Set;autoDetectTestViews=new Set;includeAllTestViews=!1;afterTick=new $e;get allViews(){return[...(this.includeAllTestViews?this.allTestViews:this.autoDetectTestViews).keys(),...this._views]}get destroyed(){return this._destroyed}componentTypes=[];components=[];internalPendingTask=k(si);get isStable(){return this.internalPendingTask.hasPendingTasksObservable.pipe(qe(t=>!t))}constructor(){k(ci,{optional:!0})}whenStable(){let t;return new Promise(i=>{t=this.isStable.subscribe({next:r=>{r&&i()}})}).finally(()=>{t.unsubscribe()})}_injector=k(Mt);_rendererFactory=null;get injector(){return this._injector}bootstrap(t,i){return this.bootstrapImpl(t,i)}bootstrapImpl(t,i,r=bt.NULL){return this._injector.get(Ie).run(()=>{Se(10);let s=t instanceof tc;if(!this._injector.get(Mp).done){let P="";throw new q(405,P)}let l;s?l=t:l=this._injector.get(nc).resolveComponentFactory(t),this.componentTypes.push(l.componentType);let c=Pv(l)?void 0:this._injector.get(os),h=i||l.selector,_=l.create(r,[],h,c),w=_.location.nativeElement,E=_.injector.get(Tp,null);return E?.registerApplication(w),_.onDestroy(()=>{this.detachView(_.hostView),Jo(this.components,_),E?.unregisterApplication(w)}),this._loadComponent(_),Se(11,_),_})}tick(){this.zonelessEnabled||(this.dirtyFlags|=1),this._tick()}_tick(){Se(12),this.tracingSnapshot!==null?this.tracingSnapshot.run(Yl.CHANGE_DETECTION,this.tickImpl):this.tickImpl()}tickImpl=()=>{if(this._runningTick)throw new q(101,!1);let t=ne(null);try{this._runningTick=!0,this.synchronize()}finally{this._runningTick=!1,this.tracingSnapshot?.dispose(),this.tracingSnapshot=null,ne(t),this.afterTick.next(),Se(13)}};synchronize(){this._rendererFactory===null&&!this._injector.destroyed&&(this._rendererFactory=this._injector.get(Dn,null,{optional:!0}));let t=0;for(;this.dirtyFlags!==0&&t++<_D;)Se(14),this.synchronizeOnce(),Se(15)}synchronizeOnce(){this.dirtyFlags&16&&(this.dirtyFlags&=-17,this.rootEffectScheduler.flush());let t=!1;if(this.dirtyFlags&7){let i=!!(this.dirtyFlags&1);this.dirtyFlags&=-8,this.dirtyFlags|=8;for(let{_lView:r}of this.allViews){if(!i&&!zo(r))continue;let o=i&&!this.zonelessEnabled?0:1;X_(r,o),t=!0}if(this.dirtyFlags&=-5,this.syncDirtyFlagsWithViews(),this.dirtyFlags&23)return}t||(this._rendererFactory?.begin?.(),this._rendererFactory?.end?.()),this.dirtyFlags&8&&(this.dirtyFlags&=-9,this.afterRenderManager.execute()),this.syncDirtyFlagsWithViews()}syncDirtyFlagsWithViews(){if(this.allViews.some(({_lView:t})=>zo(t))){this.dirtyFlags|=2;return}else this.dirtyFlags&=-8}attachView(t){let i=t;this._views.push(i),i.attachToAppRef(this)}detachView(t){let i=t;Jo(this._views,i),i.detachFromAppRef()}_loadComponent(t){this.attachView(t.hostView);try{this.tick()}catch(r){this.internalErrorHandler(r)}this.components.push(t),this._injector.get(Iv,[]).forEach(r=>r(t))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(t=>t()),this._views.slice().forEach(t=>t.destroy())}finally{this._destroyed=!0,this._views=[],this._destroyListeners=[]}}onDestroy(t){return this._destroyListeners.push(t),()=>Jo(this._destroyListeners,t)}destroy(){if(this._destroyed)throw new q(406,!1);let t=this._injector;t.destroy&&!t.destroyed&&t.destroy()}get viewCount(){return this._views.length}static \u0275fac=function(i){return new(i||n)};static \u0275prov=re({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function Jo(n,e){let t=n.indexOf(e);t>-1&&n.splice(t,1)}function fe(n,e,t,i){let r=te(),o=qi();if(Zt(r,o,e)){let s=Ue(),a=Zo();UE(a,r,n,e,t,i)}return fe}var JB=typeof document<"u"&&typeof document?.documentElement?.getAnimations=="function";var Rf=class{destroy(e){}updateValue(e,t){}swap(e,t){let i=Math.min(e,t),r=Math.max(e,t),o=this.detach(r);if(r-i>1){let s=this.detach(i);this.attach(i,o),this.attach(r,s)}else this.attach(i,o)}move(e,t){this.attach(t,this.detach(e))}};function rf(n,e,t,i,r){return n===t&&Object.is(e,i)?1:Object.is(r(n,e),r(t,i))?-1:0}function vD(n,e,t){let i,r,o=0,s=n.length-1,a=void 0;if(Array.isArray(e)){let l=e.length-1;for(;o<=s&&o<=l;){let c=n.at(o),h=e[o],_=rf(o,c,o,h,t);if(_!==0){_<0&&n.updateValue(o,h),o++;continue}let w=n.at(s),E=e[l],P=rf(s,w,l,E,t);if(P!==0){P<0&&n.updateValue(s,E),s--,l--;continue}let V=t(o,c),z=t(s,w),B=t(o,h);if(Object.is(B,z)){let _e=t(l,E);Object.is(_e,V)?(n.swap(o,s),n.updateValue(s,E),l--,s--):n.move(s,o),n.updateValue(o,h),o++;continue}if(i??=new Bl,r??=j0(n,o,s,t),Nf(n,i,o,B))n.updateValue(o,h),o++,s++;else if(r.has(B))i.set(V,n.detach(o)),s--;else{let _e=n.create(o,e[o]);n.attach(o,_e),o++,s++}}for(;o<=l;)B0(n,i,t,o,e[o]),o++}else if(e!=null){let l=e[Symbol.iterator](),c=l.next();for(;!c.done&&o<=s;){let h=n.at(o),_=c.value,w=rf(o,h,o,_,t);if(w!==0)w<0&&n.updateValue(o,_),o++,c=l.next();else{i??=new Bl,r??=j0(n,o,s,t);let E=t(o,_);if(Nf(n,i,o,E))n.updateValue(o,_),o++,s++,c=l.next();else if(!r.has(E))n.attach(o,n.create(o,_)),o++,s++,c=l.next();else{let P=t(o,h);i.set(P,n.detach(o)),s--}}}for(;!c.done;)B0(n,i,t,n.length,c.value),c=l.next()}for(;o<=s;)n.destroy(n.detach(s--));i?.forEach(l=>{n.destroy(l)})}function Nf(n,e,t,i){return e!==void 0&&e.has(i)?(n.attach(t,e.get(i)),e.delete(i),!0):!1}function B0(n,e,t,i,r){if(Nf(n,e,i,t(i,r)))n.updateValue(i,r);else{let o=n.create(i,r);n.attach(i,o)}}function j0(n,e,t,i){let r=new Set;for(let o=e;o<=t;o++)r.add(i(o,n.at(o)));return r}var Bl=class{kvMap=new Map;_vMap=void 0;has(e){return this.kvMap.has(e)}delete(e){if(!this.has(e))return!1;let t=this.kvMap.get(e);return this._vMap!==void 0&&this._vMap.has(t)?(this.kvMap.set(e,this._vMap.get(t)),this._vMap.delete(t)):this.kvMap.delete(e),!0}get(e){return this.kvMap.get(e)}set(e,t){if(this.kvMap.has(e)){let i=this.kvMap.get(e);this._vMap===void 0&&(this._vMap=new Map);let r=this._vMap;for(;r.has(i);)i=r.get(i);r.set(i,t)}else this.kvMap.set(e,t)}forEach(e){for(let[t,i]of this.kvMap)if(e(i,t),this._vMap!==void 0){let r=this._vMap;for(;r.has(i);)i=r.get(i),e(i,t)}}};function T(n,e,t,i,r,o,s,a){di("NgControlFlow");let l=te(),c=Ue(),h=Wt(c.consts,o);return as(l,c,n,e,t,i,r,h,256,s,a),vs}function vs(n,e,t,i,r,o,s,a){di("NgControlFlow");let l=te(),c=Ue(),h=Wt(c.consts,o);return as(l,c,n,e,t,i,r,h,512,s,a),vs}function M(n,e){di("NgControlFlow");let t=te(),i=qi(),r=t[i]!==ct?t[i]:-1,o=r!==-1?jl(t,Ne+r):void 0,s=0;if(Zt(t,i,n)){let a=ne(null);try{if(o!==void 0&&rv(o,s),n!==-1){let l=Ne+n,c=jl(t,l),h=Vf(t[K],l),_=sv(c,h,t),w=hs(t,h,e,{dehydratedView:_});ms(c,w,s,qr(h,_))}}finally{ne(a)}}else if(o!==void 0){let a=iv(o,s);a!==void 0&&(a[Ge]=e)}}var Af=class{lContainer;$implicit;$index;constructor(e,t,i){this.lContainer=e,this.$implicit=t,this.$index=i}get $count(){return this.lContainer.length-He}};function un(n){return n}function Sn(n,e){return e}var Lf=class{hasEmptyBlock;trackByFn;liveCollection;constructor(e,t,i){this.hasEmptyBlock=e,this.trackByFn=t,this.liveCollection=i}};function X(n,e,t,i,r,o,s,a,l,c,h,_,w){di("NgControlFlow");let E=te(),P=Ue(),V=l!==void 0,z=te(),B=a?s.bind(z[xt][Ge]):s,_e=new Lf(V,B);z[Ne+n]=_e,as(E,P,n+1,e,t,i,r,Wt(P.consts,o),256),V&&as(E,P,n+2,l,c,h,_,Wt(P.consts,w),512)}var Ff=class extends Rf{lContainer;hostLView;templateTNode;operationsCounter=void 0;needsIndexUpdate=!1;constructor(e,t,i){super(),this.lContainer=e,this.hostLView=t,this.templateTNode=i}get length(){return this.lContainer.length-He}at(e){return this.getLView(e)[Ge].$implicit}attach(e,t){let i=t[ji];this.needsIndexUpdate||=e!==this.length,ms(this.lContainer,t,e,qr(this.templateTNode,i)),yD(this.lContainer,e)}detach(e){return this.needsIndexUpdate||=e!==this.length-1,bD(this.lContainer,e),CD(this.lContainer,e)}create(e,t){let i=Ll(this.lContainer,this.templateTNode.tView.ssrId),r=hs(this.hostLView,this.templateTNode,new Af(this.lContainer,t,e),{dehydratedView:i});return this.operationsCounter?.recordCreate(),r}destroy(e){Kl(e[K],e),this.operationsCounter?.recordDestroy()}updateValue(e,t){this.getLView(e)[Ge].$implicit=t}reset(){this.needsIndexUpdate=!1,this.operationsCounter?.reset()}updateIndexes(){if(this.needsIndexUpdate)for(let e=0;e<this.length;e++)this.getLView(e)[Ge].$index=e}getLView(e){return xD(this.lContainer,e)}};function J(n){let e=ne(null),t=qt();try{let i=te(),r=i[K],o=i[t],s=t+1,a=jl(i,s);if(o.liveCollection===void 0){let c=Vf(r,s);o.liveCollection=new Ff(a,i,c)}else o.liveCollection.reset();let l=o.liveCollection;if(vD(l,n,o.trackByFn),l.updateIndexes(),o.hasEmptyBlock){let c=qi(),h=l.length===0;if(Zt(i,c,h)){let _=t+2,w=jl(i,_);if(h){let E=Vf(r,_),P=sv(w,E,i),V=hs(i,E,void 0,{dehydratedView:P});ms(w,V,0,qr(E,P))}else r.firstUpdatePass&&p1(w),rv(w,0)}}}finally{ne(e)}}function jl(n,e){return n[e]}function yD(n,e){if(n.length<=He)return;let t=He+e,i=n[t],r=i?i[zi]:void 0;if(i&&r&&r.detachedLeaveAnimationFns&&r.detachedLeaveAnimationFns.length>0){let o=i[Rn];bE(o,r),Xi.delete(i),r.detachedLeaveAnimationFns=void 0}}function bD(n,e){if(n.length<=He)return;let t=He+e,i=n[t],r=i?i[zi]:void 0;r&&r.leave&&r.leave.size>0&&(r.detachedLeaveAnimationFns=[])}function CD(n,e){return is(n,e)}function xD(n,e){return iv(n,e)}function Vf(n,e){return Uo(n,e)}function I(n,e,t){let i=te(),r=qi();if(Zt(i,r,e)){let o=Ue(),s=Zo();VE(s,i,n,e,i[Pe],t)}return I}function Bf(n,e,t,i,r){_p(e,n,t,r?"class":"style",i)}function p(n,e,t,i){let r=te(),o=r[K],s=n+Ne,a=o.firstCreatePass?bp(s,r,2,e,hp,cl(),t,i):o.data[s];if(mp(a,r,n,e,Ov),Vr(a)){let l=r[K];Jl(l,r,a),Qf(l,a,r)}return i!=null&&ps(r,a),p}function m(){let n=Ue(),e=at(),t=gp(e);return n.firstCreatePass&&Cp(n,t),Bu(t)&&ju(),Fu(),t.classesWithoutHost!=null&&qx(t)&&Bf(n,t,te(),t.classesWithoutHost,!0),t.stylesWithoutHost!=null&&Zx(t)&&Bf(n,t,te(),t.stylesWithoutHost,!1),m}function U(n,e,t,i){return p(n,e,t,i),m(),U}function v(n,e,t,i){let r=te(),o=r[K],s=n+Ne,a=o.firstCreatePass?T1(s,o,2,e,t,i):o.data[s];return mp(a,r,n,e,Ov),i!=null&&ps(r,a),v}function C(){let n=at(),e=gp(n);return Bu(e)&&ju(),Fu(),C}function se(n,e,t,i){return v(n,e,t,i),C(),se}var Ov=(n,e,t,i,r)=>(Yo(!0),D_(e[Pe],i,Zu()));function Ip(n,e,t){let i=te(),r=i[K],o=n+Ne,s=r.firstCreatePass?bp(o,i,8,"ng-container",hp,cl(),e,t):r.data[o];if(mp(s,i,n,"ng-container",wD),Vr(s)){let a=i[K];Jl(a,i,s),Qf(a,s,i)}return t!=null&&ps(i,s),Ip}function kp(){let n=Ue(),e=at(),t=gp(e);return n.firstCreatePass&&Cp(n,t),kp}function ys(n,e,t){return Ip(n,e,t),kp(),ys}var wD=(n,e,t,i,r)=>(Yo(!0),zw(e[Pe],""));function A(){return te()}function Z(n,e,t){let i=te(),r=qi();if(Zt(i,r,e)){let o=Ue(),s=Zo();W_(s,i,n,e,i[Pe],t)}return Z}var yl=void 0;function ED(n){let e=Math.floor(Math.abs(n)),t=n.toString().replace(/^[^.]*\.?/,"").length;return e===1&&t===0?1:5}var DD=["en",[["a","p"],["AM","PM"]],[["AM","PM"]],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],yl,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],yl,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],0,[6,0],["M/d/yy","MMM d, y","MMMM d, y","EEEE, MMMM d, y"],["h:mm a","h:mm:ss a","h:mm:ss a z","h:mm:ss a zzzz"],["{1}, {0}",yl,"{1} 'at' {0}",yl],[".",",",";","%","+","-","E","\xD7","\u2030","\u221E","NaN",":"],["#,##0.###","#,##0%","\xA4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",ED],of={};function Nt(n){let e=SD(n),t=$0(e);if(t)return t;let i=e.split("-")[0];if(t=$0(i),t)return t;if(i==="en")return DD;throw new q(701,!1)}function $0(n){if(!(n in of)){let e=en.ng&&en.ng.common&&en.ng.common.locales&&en.ng.common.locales[n];return e!==void 0&&(of[n]=e),e}return of[n]}var We=(function(n){return n[n.LocaleId=0]="LocaleId",n[n.DayPeriodsFormat=1]="DayPeriodsFormat",n[n.DayPeriodsStandalone=2]="DayPeriodsStandalone",n[n.DaysFormat=3]="DaysFormat",n[n.DaysStandalone=4]="DaysStandalone",n[n.MonthsFormat=5]="MonthsFormat",n[n.MonthsStandalone=6]="MonthsStandalone",n[n.Eras=7]="Eras",n[n.FirstDayOfWeek=8]="FirstDayOfWeek",n[n.WeekendRange=9]="WeekendRange",n[n.DateFormat=10]="DateFormat",n[n.TimeFormat=11]="TimeFormat",n[n.DateTimeFormat=12]="DateTimeFormat",n[n.NumberSymbols=13]="NumberSymbols",n[n.NumberFormats=14]="NumberFormats",n[n.CurrencyCode=15]="CurrencyCode",n[n.CurrencySymbol=16]="CurrencySymbol",n[n.CurrencyName=17]="CurrencyName",n[n.Currencies=18]="Currencies",n[n.Directionality=19]="Directionality",n[n.PluralCase=20]="PluralCase",n[n.ExtraData=21]="ExtraData",n})(We||{});function SD(n){return n.toLowerCase().replace(/_/g,"-")}var bs="en-US";var TD=bs;function Rv(n){typeof n=="string"&&(TD=n.toLowerCase().replace(/_/g,"-"))}function S(n,e,t){let i=te(),r=Ue(),o=at();return MD(r,i,i[Pe],o,n,e,t),S}function j(n,e,t){let i=te(),r=Ue(),o=at();return(o.type&3||t)&&pv(o,r,i,t,i[Pe],n,e,Dl(o,i,e)),j}function MD(n,e,t,i,r,o,s){let a=!0,l=null;if((i.type&3||s)&&(l??=Dl(i,e,o),pv(i,n,e,s,t,r,o,l)&&(a=!1)),a){let c=i.outputs?.[r],h=i.hostDirectiveOutputs?.[r];if(h&&h.length)for(let _=0;_<h.length;_+=2){let w=h[_],E=h[_+1];l??=Dl(i,e,o),A0(i,e,w,E,r,l)}if(c&&c.length)for(let _ of c)l??=Dl(i,e,o),A0(i,e,_,r,r,l)}}function u(n=1){return a0(n)}function ID(n,e){let t=null,i=tE(n);for(let r=0;r<e.length;r++){let o=e[r];if(o==="*"){t=r;continue}if(i===null?P_(n,o,!0):rE(i,o))return r}return t}function Pp(n){let e=te()[xt][Ct];if(!e.projection){let t=n?n.length:1,i=e.projection=Rg(t,null),r=i.slice(),o=e.child;for(;o!==null;){if(o.type!==128){let s=n?ID(o,n):0;s!==null&&(r[s]?r[s].projectionNext=o:i[s]=o,r[s]=o)}o=o.next}}}function Op(n,e=0,t,i,r,o){let s=te(),a=Ue(),l=i?n+1:null;l!==null&&as(s,a,l,i,r,o,null,t);let c=Qr(a,Ne+n,16,null,t||null);c.projection===null&&(c.projection=e),Uu();let _=!s[ji]||Vu();s[xt][Ct].projection[c.projection]===null&&l!==null?kD(s,a,l):_&&!Wl(c)&&PE(a,s,c)}function kD(n,e,t){let i=Ne+t,r=e.data[i],o=n[i],s=Ll(o,r.tView.ssrId),a=hs(n,r,void 0,{dehydratedView:s});ms(o,a,0,qr(r,s))}function Rp(n,e,t){yv(n,e,t)}function Np(n){let e=te(),t=Ue(),i=ul();qo(i+1);let r=Sp(t,i);if(n.dirty&&zg(e)===((r.metadata.flags&2)===2)){if(r.matches===null)n.reset([]);else{let o=bv(e,i);n.reset(o,s_),n.notifyOnChanges()}return!0}return!1}function Ap(){return Dp(te(),ul())}function Tn(n,e,t,i){tD(n,yv(e,t,i))}function Fn(n=1){qo(ul()+n)}function Xr(n){let e=Xg();return sl(e,Ne+n)}function bl(n,e){return n<<17|e<<2}function Ji(n){return n>>17&32767}function PD(n){return(n&2)==2}function OD(n,e){return n&131071|e<<17}function jf(n){return n|2}function Zr(n){return(n&131068)>>2}function sf(n,e){return n&-131069|e<<2}function RD(n){return(n&1)===1}function $f(n){return n|1}function ND(n,e,t,i,r,o){let s=o?e.classBindings:e.styleBindings,a=Ji(s),l=Zr(s);n[i]=t;let c=!1,h;if(Array.isArray(t)){let _=t;h=_[1],(h===null||Nr(_,h)>0)&&(c=!0)}else h=t;if(r)if(l!==0){let w=Ji(n[a+1]);n[i+1]=bl(w,a),w!==0&&(n[w+1]=sf(n[w+1],i)),n[a+1]=OD(n[a+1],i)}else n[i+1]=bl(a,0),a!==0&&(n[a+1]=sf(n[a+1],i)),a=i;else n[i+1]=bl(l,0),a===0?a=i:n[l+1]=sf(n[l+1],i),l=i;c&&(n[i+1]=jf(n[i+1])),H0(n,h,i,!0),H0(n,h,i,!1),AD(e,h,n,i,o),s=bl(a,l),o?e.classBindings=s:e.styleBindings=s}function AD(n,e,t,i,r){let o=r?n.residualClasses:n.residualStyles;o!=null&&typeof e=="string"&&Nr(o,e)>=0&&(t[i+1]=$f(t[i+1]))}function H0(n,e,t,i){let r=n[t+1],o=e===null,s=i?Ji(r):Zr(r),a=!1;for(;s!==0&&(a===!1||o);){let l=n[s],c=n[s+1];LD(l,e)&&(a=!0,n[s+1]=i?$f(c):jf(c)),s=i?Ji(c):Zr(c)}a&&(n[t+1]=i?jf(r):$f(r))}function LD(n,e){return n===null||e==null||(Array.isArray(n)?n[1]:n)===e?!0:Array.isArray(n)&&typeof e=="string"?Nr(n,e)>=0:!1}var an={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function FD(n){return n.substring(an.key,an.keyEnd)}function VD(n){return BD(n),Nv(n,Av(n,0,an.textEnd))}function Nv(n,e){let t=an.textEnd;return t===e?-1:(e=an.keyEnd=jD(n,an.key=e,t),Av(n,e,t))}function BD(n){an.key=0,an.keyEnd=0,an.value=0,an.valueEnd=0,an.textEnd=n.length}function Av(n,e,t){for(;e<t&&n.charCodeAt(e)<=32;)e++;return e}function jD(n,e,t){for(;e<t&&n.charCodeAt(e)>32;)e++;return e}function pe(n,e,t){return Lv(n,e,t,!1),pe}function ge(n,e){return Lv(n,e,null,!0),ge}function pt(n){HD(ZD,$D,n,!0)}function $D(n,e){for(let t=VD(e);t>=0;t=Nv(e,t))il(n,FD(e),!0)}function Lv(n,e,t,i){let r=te(),o=Ue(),s=Wo(2);if(o.firstUpdatePass&&Vv(o,n,s,i),e!==ct&&Zt(r,s,e)){let a=o.data[qt()];Bv(o,a,r,r[Pe],n,r[s+1]=QD(e,t),i,s)}}function HD(n,e,t,i){let r=Ue(),o=Wo(2);r.firstUpdatePass&&Vv(r,null,o,i);let s=te();if(t!==ct&&Zt(s,o,t)){let a=r.data[qt()];if(jv(a,i)&&!Fv(r,o)){let l=i?a.classesWithoutHost:a.stylesWithoutHost;l!==null&&(t=Xa(l,t||"")),Bf(r,a,s,t,i)}else YD(r,a,s,s[Pe],s[o+1],s[o+1]=qD(n,e,t),i,o)}}function Fv(n,e){return e>=n.expandoStartIndex}function Vv(n,e,t,i){let r=n.data;if(r[t+1]===null){let o=r[qt()],s=Fv(n,t);jv(o,i)&&e===null&&!s&&(e=!1),e=UD(r,o,e,i),ND(r,o,e,t,s,i)}}function UD(n,e,t,i){let r=i0(n),o=i?e.residualClasses:e.residualStyles;if(r===null)(i?e.classBindings:e.styleBindings)===0&&(t=af(null,n,e,t,i),t=ls(t,e.attrs,i),o=null);else{let s=e.directiveStylingLast;if(s===-1||n[s]!==r)if(t=af(r,n,e,t,i),o===null){let l=zD(n,e,i);l!==void 0&&Array.isArray(l)&&(l=af(null,n,e,l[1],i),l=ls(l,e.attrs,i),GD(n,e,i,l))}else o=WD(n,e,i)}return o!==void 0&&(i?e.residualClasses=o:e.residualStyles=o),t}function zD(n,e,t){let i=t?e.classBindings:e.styleBindings;if(Zr(i)!==0)return n[Ji(i)]}function GD(n,e,t,i){let r=t?e.classBindings:e.styleBindings;n[Ji(r)]=i}function WD(n,e,t){let i,r=e.directiveEnd;for(let o=1+e.directiveStylingLast;o<r;o++){let s=n[o].hostAttrs;i=ls(i,s,t)}return ls(i,e.attrs,t)}function af(n,e,t,i,r){let o=null,s=t.directiveEnd,a=t.directiveStylingLast;for(a===-1?a=t.directiveStart:a++;a<s&&(o=e[a],i=ls(i,o.hostAttrs,r),o!==n);)a++;return n!==null&&(t.directiveStylingLast=a),i}function ls(n,e,t){let i=t?1:2,r=-1;if(e!==null)for(let o=0;o<e.length;o++){let s=e[o];typeof s=="number"?r=s:r===i&&(Array.isArray(n)||(n=n===void 0?[]:["",n]),il(n,s,t?!0:e[++o]))}return n===void 0?null:n}function qD(n,e,t){if(t==null||t==="")return jt;let i=[],r=us(t);if(Array.isArray(r))for(let o=0;o<r.length;o++)n(i,r[o],!0);else if(typeof r=="object")for(let o in r)r.hasOwnProperty(o)&&n(i,o,r[o]);else typeof r=="string"&&e(i,r);return i}function ZD(n,e,t){let i=String(e);i!==""&&!i.includes(" ")&&il(n,i,t)}function YD(n,e,t,i,r,o,s,a){r===ct&&(r=jt);let l=0,c=0,h=0<r.length?r[0]:null,_=0<o.length?o[0]:null;for(;h!==null||_!==null;){let w=l<r.length?r[l+1]:void 0,E=c<o.length?o[c+1]:void 0,P=null,V;h===_?(l+=2,c+=2,w!==E&&(P=_,V=E)):_===null||h!==null&&h<_?(l+=2,P=h):(c+=2,P=_,V=E),P!==null&&Bv(n,e,t,i,P,V,s,a),h=l<r.length?r[l]:null,_=c<o.length?o[c]:null}}function Bv(n,e,t,i,r,o,s,a){if(!(e.type&3))return;let l=n.data,c=l[a+1],h=RD(c)?U0(l,e,t,r,Zr(c),s):void 0;if(!$l(h)){$l(o)||PD(c)&&(o=U0(l,null,t,r,a,s));let _=ku(qt(),t);RE(i,s,_,r,o)}}function U0(n,e,t,i,r,o){let s=e===null,a;for(;r>0;){let l=n[r],c=Array.isArray(l),h=c?l[1]:l,_=h===null,w=t[r+1];w===ct&&(w=_?jt:void 0);let E=_?rl(w,i):h===i?w:void 0;if(c&&!$l(E)&&(E=rl(l,i)),$l(E)&&(a=E,s))return a;let P=n[r+1];r=s?Ji(P):Zr(P)}if(e!==null){let l=o?e.residualClasses:e.residualStyles;l!=null&&(a=rl(l,i))}return a}function $l(n){return n!==void 0}function QD(n,e){return n==null||n===""||(typeof e=="string"?n=n+e:typeof n=="object"&&(n=Xn(us(n)))),n}function jv(n,e){return(n.flags&(e?8:16))!==0}function f(n,e=""){let t=te(),i=Ue(),r=n+Ne,o=i.firstCreatePass?Qr(i,r,1,e,null):i.data[r],s=KD(i,t,o,e,n);t[r]=s,hl()&&fp(i,t,s,o),jr(o,!1)}var KD=(n,e,t,i,r)=>(Yo(!0),Hw(e[Pe],i));function XD(n,e,t,i=""){return Zt(n,qi(),t)?e+tn(t)+i:ct}function JD(n,e,t,i,r,o=""){let s=Gu(),a=Ep(n,s,t,r);return Wo(2),a?e+tn(t)+i+tn(r)+o:ct}function eS(n,e,t,i,r,o,s,a=""){let l=Gu(),c=I1(n,l,t,r,s);return Wo(3),c?e+tn(t)+i+tn(r)+o+tn(s)+a:ct}function O(n){return Q("",n),O}function Q(n,e,t){let i=te(),r=XD(i,n,e,t);return r!==ct&&Lp(i,qt(),r),Q}function pi(n,e,t,i,r){let o=te(),s=JD(o,n,e,t,i,r);return s!==ct&&Lp(o,qt(),s),pi}function sc(n,e,t,i,r,o,s){let a=te(),l=eS(a,n,e,t,i,r,o,s);return l!==ct&&Lp(a,qt(),l),sc}function Lp(n,e,t){let i=ku(e,n);Uw(n[Pe],i,t)}function tS(n,e,t){let i=Ue();if(i.firstCreatePass){let r=xn(n);Hf(t,i.data,i.blueprint,r,!0),Hf(e,i.data,i.blueprint,r,!1)}}function Hf(n,e,t,i,r){if(n=ft(n),Array.isArray(n))for(let o=0;o<n.length;o++)Hf(n[o],e,t,i,r);else{let o=Ue(),s=te(),a=at(),l=Ni(n)?n:ft(n.provide),c=Eu(n),h=a.providerIndexes&1048575,_=a.directiveStart,w=a.providerIndexes>>20;if(Ni(n)||!n.multi){let E=new Ki(c,r,dn,null),P=cf(l,e,r?h:h+w,_);P===-1?(uf(kl(a,s),o,l),lf(o,n,e.length),e.push(l),a.directiveStart++,a.directiveEnd++,r&&(a.providerIndexes+=1048576),t.push(E),s.push(E)):(t[P]=E,s[P]=E)}else{let E=cf(l,e,h+w,_),P=cf(l,e,h,h+w),V=E>=0&&t[E],z=P>=0&&t[P];if(r&&!z||!r&&!V){uf(kl(a,s),o,l);let B=rS(r?iS:nS,t.length,r,i,c,n);!r&&z&&(t[P].providerFactory=B),lf(o,n,e.length,0),e.push(l),a.directiveStart++,a.directiveEnd++,r&&(a.providerIndexes+=1048576),t.push(B),s.push(B)}else{let B=$v(t[r?P:E],c,!r&&i);lf(o,n,E>-1?E:P,B)}!r&&i&&z&&t[P].componentProviders++}}}function lf(n,e,t,i){let r=Ni(e),o=Bg(e);if(r||o){let l=(o?ft(e.useClass):e).prototype.ngOnDestroy;if(l){let c=n.destroyHooks||(n.destroyHooks=[]);if(!r&&e.multi){let h=c.indexOf(t);h===-1?c.push(t,[i,l]):c[h+1].push(i,l)}else c.push(t,l)}}}function $v(n,e,t){return t&&n.componentProviders++,n.multi.push(e)-1}function cf(n,e,t,i){for(let r=t;r<i;r++)if(e[r]===n)return r;return-1}function nS(n,e,t,i,r){return Uf(this.multi,[])}function iS(n,e,t,i,r){let o=this.multi,s;if(this.providerFactory){let a=this.providerFactory.componentProviders,l=es(i,i[K],this.providerFactory.index,r);s=l.slice(0,a),Uf(o,s);for(let c=a;c<l.length;c++)s.push(l[c])}else s=[],Uf(o,s);return s}function Uf(n,e){for(let t=0;t<n.length;t++){let i=n[t];e.push(i())}return e}function rS(n,e,t,i,r,o){let s=new Ki(n,t,dn,null);return s.multi=[],s.index=e,s.componentProviders=0,$v(s,r,i&&!t),s}function Cs(n,e=[]){return t=>{t.providersResolver=(i,r)=>tS(i,r?r(n):n,e)}}function xs(n,e,t){let i=Go()+n,r=te();return r[i]===ct?wp(r,i,t?e.call(t):e()):M1(r,i)}function ac(n,e,t,i){return Uv(te(),Go(),n,e,t,i)}function Hv(n,e){let t=n[e];return t===ct?void 0:t}function Uv(n,e,t,i,r,o){let s=e+t;return Zt(n,s,r)?wp(n,s+1,o?i.call(o,r):i(r)):Hv(n,s+1)}function oS(n,e,t,i,r,o,s){let a=e+t;return Ep(n,a,r,o)?wp(n,a+2,s?i.call(s,r,o):i(r,o)):Hv(n,a+2)}function hi(n,e){let t=Ue(),i,r=n+Ne;t.firstCreatePass?(i=sS(e,t.pipeRegistry),t.data[r]=i,i.onDestroy&&(t.destroyHooks??=[]).push(r,i.onDestroy)):i=t.data[r];let o=i.factory||(i.factory=Ri(i.type,!0)),s,a=yt(dn);try{let l=Il(!1),c=o();return Il(l),Pu(t,te(),r,c),c}finally{yt(a)}}function sS(n,e){if(e)for(let t=e.length-1;t>=0;t--){let i=e[t];if(n===i.name)return i}}function Fp(n,e,t){let i=n+Ne,r=te(),o=sl(r,i);return zv(r,i)?Uv(r,Go(),e,o.transform,t,o):o.transform(t)}function Jr(n,e,t,i){let r=n+Ne,o=te(),s=sl(o,r);return zv(o,r)?oS(o,Go(),e,s.transform,t,i,s):s.transform(t,i)}function zv(n,e){return n[K].data[e].pure}function Vp(n,e){return ec(n,e)}var aS=(()=>{class n{zone=k(Ie);changeDetectionScheduler=k($t);applicationRef=k(nr);applicationErrorHandler=k(on);_onMicrotaskEmptySubscription;initialize(){this._onMicrotaskEmptySubscription||(this._onMicrotaskEmptySubscription=this.zone.onMicrotaskEmpty.subscribe({next:()=>{this.changeDetectionScheduler.runningTick||this.zone.run(()=>{try{this.applicationRef.dirtyFlags|=1,this.applicationRef._tick()}catch(t){this.applicationErrorHandler(t)}})}}))}ngOnDestroy(){this._onMicrotaskEmptySubscription?.unsubscribe()}static \u0275fac=function(i){return new(i||n)};static \u0275prov=re({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),Gv=new ee("",{factory:()=>!1});function Bp({ngZoneFactory:n,ignoreChangesOutsideZone:e,scheduleInRootZone:t}){return n??=()=>new Ie(le(G({},$p()),{scheduleInRootZone:t})),[{provide:Ie,useFactory:n},{provide:Vi,multi:!0,useFactory:()=>{let i=k(aS,{optional:!0});return()=>i.initialize()}},{provide:Vi,multi:!0,useFactory:()=>{let i=k(lS);return()=>{i.initialize()}}},e===!0?{provide:Qu,useValue:!0}:[],{provide:Ku,useValue:t??A_},{provide:on,useFactory:()=>{let i=k(Ie),r=k(Mt),o;return s=>{i.runOutsideAngular(()=>{r.destroyed&&!o?setTimeout(()=>{throw s}):(o??=r.get(Ot),o.handleError(s))})}}}]}function jp(n){let e=n?.ignoreChangesOutsideZone,t=n?.scheduleInRootZone,i=Bp({ngZoneFactory:()=>{let r=$p(n);return r.scheduleInRootZone=t,r.shouldCoalesceEventChangeDetection&&di("NgZone_CoalesceEvent"),new Ie(r)},ignoreChangesOutsideZone:e,scheduleInRootZone:t});return Vo([{provide:Gv,useValue:!0},{provide:Qo,useValue:!1},i])}function $p(n){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:n?.eventCoalescing??!1,shouldCoalesceRunChangeDetection:n?.runCoalescing??!1}}var lS=(()=>{class n{subscription=new Ve;initialized=!1;zone=k(Ie);pendingTasks=k(si);initialize(){if(this.initialized)return;this.initialized=!0;let t=null;!this.zone.isStable&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(t=this.pendingTasks.add()),this.zone.runOutsideAngular(()=>{this.subscription.add(this.zone.onStable.subscribe(()=>{Ie.assertNotInAngularZone(),queueMicrotask(()=>{t!==null&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(this.pendingTasks.remove(t),t=null)})}))}),this.subscription.add(this.zone.onUnstable.subscribe(()=>{Ie.assertInAngularZone(),t??=this.pendingTasks.add()}))}ngOnDestroy(){this.subscription.unsubscribe()}static \u0275fac=function(i){return new(i||n)};static \u0275prov=re({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var Wv=(()=>{class n{applicationErrorHandler=k(on);appRef=k(nr);taskService=k(si);ngZone=k(Ie);zonelessEnabled=k(Qo);tracing=k(ci,{optional:!0});disableScheduling=k(Qu,{optional:!0})??!1;zoneIsDefined=typeof Zone<"u"&&!!Zone.root.run;schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}];subscriptions=new Ve;angularZoneId=this.zoneIsDefined?this.ngZone._inner?.get(Nl):null;scheduleInRootZone=!this.zonelessEnabled&&this.zoneIsDefined&&(k(Ku,{optional:!0})??!1);cancelScheduledCallback=null;useMicrotaskScheduler=!1;runningTick=!1;pendingRenderTaskId=null;constructor(){this.subscriptions.add(this.appRef.afterTick.subscribe(()=>{this.runningTick||this.cleanup()})),this.subscriptions.add(this.ngZone.onUnstable.subscribe(()=>{this.runningTick||this.cleanup()})),this.disableScheduling||=!this.zonelessEnabled&&(this.ngZone instanceof Al||!this.zoneIsDefined)}notify(t){if(!this.zonelessEnabled&&t===5)return;let i=!1;switch(t){case 0:{this.appRef.dirtyFlags|=2;break}case 3:case 2:case 4:case 5:case 1:{this.appRef.dirtyFlags|=4;break}case 6:{this.appRef.dirtyFlags|=2,i=!0;break}case 12:{this.appRef.dirtyFlags|=16,i=!0;break}case 13:{this.appRef.dirtyFlags|=2,i=!0;break}case 11:{i=!0;break}default:this.appRef.dirtyFlags|=8}if(this.appRef.tracingSnapshot=this.tracing?.snapshot(this.appRef.tracingSnapshot)??null,!this.shouldScheduleTick(i))return;let r=this.useMicrotaskScheduler?D0:L_;this.pendingRenderTaskId=this.taskService.add(),this.scheduleInRootZone?this.cancelScheduledCallback=Zone.root.run(()=>r(()=>this.tick())):this.cancelScheduledCallback=this.ngZone.runOutsideAngular(()=>r(()=>this.tick()))}shouldScheduleTick(t){return!(this.disableScheduling&&!t||this.appRef.destroyed||this.pendingRenderTaskId!==null||this.runningTick||this.appRef._runningTick||!this.zonelessEnabled&&this.zoneIsDefined&&Zone.current.get(Nl+this.angularZoneId))}tick(){if(this.runningTick||this.appRef.destroyed)return;if(this.appRef.dirtyFlags===0){this.cleanup();return}!this.zonelessEnabled&&this.appRef.dirtyFlags&7&&(this.appRef.dirtyFlags|=1);let t=this.taskService.add();try{this.ngZone.run(()=>{this.runningTick=!0,this.appRef._tick()},void 0,this.schedulerTickApplyArgs)}catch(i){this.taskService.remove(t),this.applicationErrorHandler(i)}finally{this.cleanup()}this.useMicrotaskScheduler=!0,D0(()=>{this.useMicrotaskScheduler=!1,this.taskService.remove(t)})}ngOnDestroy(){this.subscriptions.unsubscribe(),this.cleanup()}cleanup(){if(this.runningTick=!1,this.cancelScheduledCallback?.(),this.cancelScheduledCallback=null,this.pendingRenderTaskId!==null){let t=this.pendingRenderTaskId;this.pendingRenderTaskId=null,this.taskService.remove(t)}}static \u0275fac=function(i){return new(i||n)};static \u0275prov=re({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function cS(){return typeof $localize<"u"&&$localize.locale||bs}var ws=new ee("",{providedIn:"root",factory:()=>k(ws,{optional:!0,skipSelf:!0})||cS()});var lc=class{destroyed=!1;listeners=null;errorHandler=k(Ot,{optional:!0});destroyRef=k(Je);constructor(){this.destroyRef.onDestroy(()=>{this.destroyed=!0,this.listeners=null})}subscribe(e){if(this.destroyed)throw new q(953,!1);return(this.listeners??=[]).push(e),{unsubscribe:()=>{let t=this.listeners?.indexOf(e);t!==void 0&&t!==-1&&this.listeners?.splice(t,1)}}}emit(e){if(this.destroyed){console.warn(Li(953,!1));return}if(this.listeners===null)return;let t=ne(null);try{for(let i of this.listeners)try{i(e)}catch(r){this.errorHandler?.handleError(r)}}finally{ne(t)}}};function et(n){return bg(n)}function H(n,e){return bo(n,e?.equal)}var Hp=class{[it];constructor(e){this[it]=e}destroy(){this[it].destroy()}};function xe(n,e){let t=e?.injector??k(bt),i=e?.manualCleanup!==!0?t.get(Je):null,r,o=t.get(Zi,null,{optional:!0}),s=t.get($t);return o!==null?(r=fS(o.view,s,n),i instanceof Lo&&i._lView===o.view&&(i=null)):r=pS(n,t.get(Ko),s),r.injector=t,i!==null&&(r.onDestroyFn=i.onDestroy(()=>r.destroy())),new Hp(r)}var qv=le(G({},Cg),{cleanupFns:void 0,zone:null,onDestroyFn:Yi,run(){let n=$r(!1);try{xg(this)}finally{$r(n)}},cleanup(){if(!this.cleanupFns?.length)return;let n=ne(null);try{for(;this.cleanupFns.length;)this.cleanupFns.pop()()}finally{this.cleanupFns=[],ne(n)}}}),dS=le(G({},qv),{consumerMarkedDirty(){this.scheduler.schedule(this),this.notifier.notify(12)},destroy(){Zn(this),this.onDestroyFn(),this.cleanup(),this.scheduler.remove(this)}}),uS=le(G({},qv),{consumerMarkedDirty(){this.view[ie]|=8192,ri(this.view),this.notifier.notify(13)},destroy(){Zn(this),this.onDestroyFn(),this.cleanup(),this.view[Nn]?.delete(this)}});function fS(n,e,t){let i=Object.create(uS);return i.view=n,i.zone=typeof Zone<"u"?Zone.current:null,i.notifier=e,i.fn=Zv(i,t),n[Nn]??=new Set,n[Nn].add(i),i.consumerMarkedDirty(i),i}function pS(n,e,t){let i=Object.create(dS);return i.fn=Zv(i,n),i.scheduler=e,i.notifier=t,i.zone=typeof Zone<"u"?Zone.current:null,i.scheduler.add(i),i.notifier.notify(12),i}function Zv(n,e){return()=>{e(t=>(n.cleanupFns??=[]).push(t))}}var Jv=Symbol("InputSignalNode#UNSET"),TS=le(G({},Co),{transformFn:void 0,applyValueToInputSignal(n,e){br(n,e)}});function ey(n,e){let t=Object.create(TS);t.value=n,t.transformFn=e?.transform;function i(){if(xi(t),t.value===Jv){let r=null;throw new q(-950,r)}return t.value}return i[it]=t,i}var MS=new ee("");MS.__NG_ELEMENT_ID__=n=>{let e=at();if(e===null)throw new q(204,!1);if(e.type&2)return e.value;if(n&8)return null;throw new q(204,!1)};function W(n){return new lc}function Yv(n,e){return ey(n,e)}function IS(n){return ey(Jv,n)}var N=(Yv.required=IS,Yv);function Qv(n,e){return xv(e)}function kS(n,e){return wv(e)}var Vn=(Qv.required=kS,Qv);var zp=new ee(""),PS=new ee("");function Es(n){return!n.moduleRef}function OS(n){let e=Es(n)?n.r3Injector:n.moduleRef.injector,t=e.get(Ie);return t.run(()=>{Es(n)?n.r3Injector.resolveInjectorInitializers():n.moduleRef.resolveInjectorInitializers();let i=e.get(on),r;if(t.runOutsideAngular(()=>{r=t.onError.subscribe({next:i})}),Es(n)){let o=()=>e.destroy(),s=n.platformInjector.get(zp);s.add(o),e.onDestroy(()=>{r.unsubscribe(),s.delete(o)})}else{let o=()=>n.moduleRef.destroy(),s=n.platformInjector.get(zp);s.add(o),n.moduleRef.onDestroy(()=>{Jo(n.allPlatformModules,n.moduleRef),r.unsubscribe(),s.delete(o)})}return NS(i,t,()=>{let o=e.get(si),s=o.add(),a=e.get(Mp);return a.runInitializers(),a.donePromise.then(()=>{let l=e.get(ws,bs);if(Rv(l||bs),!e.get(PS,!0))return Es(n)?e.get(nr):(n.allPlatformModules.push(n.moduleRef),n.moduleRef);if(Es(n)){let h=e.get(nr);return n.rootComponent!==void 0&&h.bootstrap(n.rootComponent),h}else return RS?.(n.moduleRef,n.allPlatformModules),n.moduleRef}).finally(()=>{o.remove(s)})})})}var RS;function NS(n,e,t){try{let i=t();return _s(i)?i.catch(r=>{throw e.runOutsideAngular(()=>n(r)),r}):i}catch(i){throw e.runOutsideAngular(()=>n(i)),i}}var cc=null;function AS(n=[],e){return bt.create({name:e,providers:[{provide:Bo,useValue:"platform"},{provide:zp,useValue:new Set([()=>cc=null])},...n]})}function LS(n=[]){if(cc)return cc;let e=AS(n);return cc=e,kv(),FS(e),e}function FS(n){let e=n.get(zl,null);Ar(n,()=>{e?.forEach(t=>t())})}var fc=(()=>{class n{static __NG_ELEMENT_ID__=VS}return n})();function VS(n){return BS(at(),te(),(n&16)===16)}function BS(n,e,t){if(ii(n)&&!t){let i=Gt(n.index,e);return new ai(i,i)}else if(n.type&175){let i=e[xt];return new ai(i,e)}return null}var Gp=class{constructor(){}supports(e){return xp(e)}create(e){return new Wp(e)}},jS=(n,e)=>e,Wp=class{length=0;collection;_linkedRecords=null;_unlinkedRecords=null;_previousItHead=null;_itHead=null;_itTail=null;_additionsHead=null;_additionsTail=null;_movesHead=null;_movesTail=null;_removalsHead=null;_removalsTail=null;_identityChangesHead=null;_identityChangesTail=null;_trackByFn;constructor(e){this._trackByFn=e||jS}forEachItem(e){let t;for(t=this._itHead;t!==null;t=t._next)e(t)}forEachOperation(e){let t=this._itHead,i=this._removalsHead,r=0,o=null;for(;t||i;){let s=!i||t&&t.currentIndex<Kv(i,r,o)?t:i,a=Kv(s,r,o),l=s.currentIndex;if(s===i)r--,i=i._nextRemoved;else if(t=t._next,s.previousIndex==null)r++;else{o||(o=[]);let c=a-r,h=l-r;if(c!=h){for(let w=0;w<c;w++){let E=w<o.length?o[w]:o[w]=0,P=E+w;h<=P&&P<c&&(o[w]=E+1)}let _=s.previousIndex;o[_]=h-c}}a!==l&&e(s,a,l)}}forEachPreviousItem(e){let t;for(t=this._previousItHead;t!==null;t=t._nextPrevious)e(t)}forEachAddedItem(e){let t;for(t=this._additionsHead;t!==null;t=t._nextAdded)e(t)}forEachMovedItem(e){let t;for(t=this._movesHead;t!==null;t=t._nextMoved)e(t)}forEachRemovedItem(e){let t;for(t=this._removalsHead;t!==null;t=t._nextRemoved)e(t)}forEachIdentityChange(e){let t;for(t=this._identityChangesHead;t!==null;t=t._nextIdentityChange)e(t)}diff(e){if(e==null&&(e=[]),!xp(e))throw new q(900,!1);return this.check(e)?this:null}onDestroy(){}check(e){this._reset();let t=this._itHead,i=!1,r,o,s;if(Array.isArray(e)){this.length=e.length;for(let a=0;a<this.length;a++)o=e[a],s=this._trackByFn(a,o),t===null||!Object.is(t.trackById,s)?(t=this._mismatch(t,o,s,a),i=!0):(i&&(t=this._verifyReinsertion(t,o,s,a)),Object.is(t.item,o)||this._addIdentityChange(t,o)),t=t._next}else r=0,uv(e,a=>{s=this._trackByFn(r,a),t===null||!Object.is(t.trackById,s)?(t=this._mismatch(t,a,s,r),i=!0):(i&&(t=this._verifyReinsertion(t,a,s,r)),Object.is(t.item,a)||this._addIdentityChange(t,a)),t=t._next,r++}),this.length=r;return this._truncate(t),this.collection=e,this.isDirty}get isDirty(){return this._additionsHead!==null||this._movesHead!==null||this._removalsHead!==null||this._identityChangesHead!==null}_reset(){if(this.isDirty){let e;for(e=this._previousItHead=this._itHead;e!==null;e=e._next)e._nextPrevious=e._next;for(e=this._additionsHead;e!==null;e=e._nextAdded)e.previousIndex=e.currentIndex;for(this._additionsHead=this._additionsTail=null,e=this._movesHead;e!==null;e=e._nextMoved)e.previousIndex=e.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(e,t,i,r){let o;return e===null?o=this._itTail:(o=e._prev,this._remove(e)),e=this._unlinkedRecords===null?null:this._unlinkedRecords.get(i,null),e!==null?(Object.is(e.item,t)||this._addIdentityChange(e,t),this._reinsertAfter(e,o,r)):(e=this._linkedRecords===null?null:this._linkedRecords.get(i,r),e!==null?(Object.is(e.item,t)||this._addIdentityChange(e,t),this._moveAfter(e,o,r)):e=this._addAfter(new qp(t,i),o,r)),e}_verifyReinsertion(e,t,i,r){let o=this._unlinkedRecords===null?null:this._unlinkedRecords.get(i,null);return o!==null?e=this._reinsertAfter(o,e._prev,r):e.currentIndex!=r&&(e.currentIndex=r,this._addToMoves(e,r)),e}_truncate(e){for(;e!==null;){let t=e._next;this._addToRemovals(this._unlink(e)),e=t}this._unlinkedRecords!==null&&this._unlinkedRecords.clear(),this._additionsTail!==null&&(this._additionsTail._nextAdded=null),this._movesTail!==null&&(this._movesTail._nextMoved=null),this._itTail!==null&&(this._itTail._next=null),this._removalsTail!==null&&(this._removalsTail._nextRemoved=null),this._identityChangesTail!==null&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(e,t,i){this._unlinkedRecords!==null&&this._unlinkedRecords.remove(e);let r=e._prevRemoved,o=e._nextRemoved;return r===null?this._removalsHead=o:r._nextRemoved=o,o===null?this._removalsTail=r:o._prevRemoved=r,this._insertAfter(e,t,i),this._addToMoves(e,i),e}_moveAfter(e,t,i){return this._unlink(e),this._insertAfter(e,t,i),this._addToMoves(e,i),e}_addAfter(e,t,i){return this._insertAfter(e,t,i),this._additionsTail===null?this._additionsTail=this._additionsHead=e:this._additionsTail=this._additionsTail._nextAdded=e,e}_insertAfter(e,t,i){let r=t===null?this._itHead:t._next;return e._next=r,e._prev=t,r===null?this._itTail=e:r._prev=e,t===null?this._itHead=e:t._next=e,this._linkedRecords===null&&(this._linkedRecords=new dc),this._linkedRecords.put(e),e.currentIndex=i,e}_remove(e){return this._addToRemovals(this._unlink(e))}_unlink(e){this._linkedRecords!==null&&this._linkedRecords.remove(e);let t=e._prev,i=e._next;return t===null?this._itHead=i:t._next=i,i===null?this._itTail=t:i._prev=t,e}_addToMoves(e,t){return e.previousIndex===t||(this._movesTail===null?this._movesTail=this._movesHead=e:this._movesTail=this._movesTail._nextMoved=e),e}_addToRemovals(e){return this._unlinkedRecords===null&&(this._unlinkedRecords=new dc),this._unlinkedRecords.put(e),e.currentIndex=null,e._nextRemoved=null,this._removalsTail===null?(this._removalsTail=this._removalsHead=e,e._prevRemoved=null):(e._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=e),e}_addIdentityChange(e,t){return e.item=t,this._identityChangesTail===null?this._identityChangesTail=this._identityChangesHead=e:this._identityChangesTail=this._identityChangesTail._nextIdentityChange=e,e}},qp=class{item;trackById;currentIndex=null;previousIndex=null;_nextPrevious=null;_prev=null;_next=null;_prevDup=null;_nextDup=null;_prevRemoved=null;_nextRemoved=null;_nextAdded=null;_nextMoved=null;_nextIdentityChange=null;constructor(e,t){this.item=e,this.trackById=t}},Zp=class{_head=null;_tail=null;add(e){this._head===null?(this._head=this._tail=e,e._nextDup=null,e._prevDup=null):(this._tail._nextDup=e,e._prevDup=this._tail,e._nextDup=null,this._tail=e)}get(e,t){let i;for(i=this._head;i!==null;i=i._nextDup)if((t===null||t<=i.currentIndex)&&Object.is(i.trackById,e))return i;return null}remove(e){let t=e._prevDup,i=e._nextDup;return t===null?this._head=i:t._nextDup=i,i===null?this._tail=t:i._prevDup=t,this._head===null}},dc=class{map=new Map;put(e){let t=e.trackById,i=this.map.get(t);i||(i=new Zp,this.map.set(t,i)),i.add(e)}get(e,t){let i=e,r=this.map.get(i);return r?r.get(e,t):null}remove(e){let t=e.trackById;return this.map.get(t).remove(e)&&this.map.delete(t),e}get isEmpty(){return this.map.size===0}clear(){this.map.clear()}};function Kv(n,e,t){let i=n.previousIndex;if(i===null)return i;let r=0;return t&&i<t.length&&(r=t[i]),i+e+r}function Xv(){return new pc([new Gp])}var pc=(()=>{class n{factories;static \u0275prov=re({token:n,providedIn:"root",factory:Xv});constructor(t){this.factories=t}static create(t,i){if(i!=null){let r=i.factories.slice();t=t.concat(r)}return new n(t)}static extend(t){return{provide:n,useFactory:()=>{let i=k(n,{optional:!0,skipSelf:!0});return n.create(t,i||Xv())}}}find(t){let i=this.factories.find(r=>r.supports(t));if(i!=null)return i;throw new q(901,!1)}}return n})();function ty(n){let{rootComponent:e,appProviders:t,platformProviders:i,platformRef:r}=n;Se(8);try{let o=r?.injector??LS(i),s=[Bp({}),{provide:$t,useExisting:Wv},d0,...t||[]],a=new ss({providers:s,parent:o,debugName:"",runEnvironmentInitializers:!1});return OS({r3Injector:a.injector,platformInjector:o,rootComponent:e})}catch(o){return Promise.reject(o)}finally{Se(9)}}function ny(n){return typeof n=="boolean"?n:n!=null&&n!=="false"}var Up=Symbol("NOT_SET"),iy=new Set,$S=le(G({},Co),{consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!0,value:Up,cleanup:null,consumerMarkedDirty(){if(this.sequence.impl.executing){if(this.sequence.lastPhase===null||this.sequence.lastPhase<this.phase)return;this.sequence.erroredOrDestroyed=!0}this.sequence.scheduler.notify(7)},phaseFn(n){if(this.sequence.lastPhase=this.phase,!this.dirty)return this.signal;if(this.dirty=!1,this.value!==Up&&!Ei(this))return this.signal;try{for(let r of this.cleanup??iy)r()}finally{this.cleanup?.clear()}let e=[];n!==void 0&&e.push(n),e.push(this.registerCleanupFn);let t=qn(this),i;try{i=this.userFn.apply(null,e)}finally{wi(this,t)}return(this.value===Up||!this.equal(this.value,i))&&(this.value=i,this.version++),this.signal}}),Yp=class extends ts{scheduler;lastPhase=null;nodes=[void 0,void 0,void 0,void 0];constructor(e,t,i,r,o,s=null){super(e,[void 0,void 0,void 0,void 0],i,!1,o.get(Je),s),this.scheduler=r;for(let a of lp){let l=t[a];if(l===void 0)continue;let c=Object.create($S);c.sequence=this,c.phase=a,c.userFn=l,c.dirty=!0,c.signal=()=>(xi(c),c.value),c.signal[it]=c,c.registerCleanupFn=h=>(c.cleanup??=new Set).add(h),this.nodes[a]=c,this.hooks[a]=h=>c.phaseFn(h)}}afterRun(){super.afterRun(),this.lastPhase=null}destroy(){super.destroy();for(let e of this.nodes)if(e)try{for(let t of e.cleanup??iy)t()}finally{Zn(e)}}};function Qp(n,e){let t=e?.injector??k(bt),i=t.get($t),r=t.get(Ql),o=t.get(ci,null,{optional:!0});r.impl??=t.get(cp);let s=n;typeof s=="function"&&(s={mixedReadWrite:n});let a=t.get(Zi,null,{optional:!0}),l=new Yp(r.impl,[s.earlyRead,s.write,s.mixedReadWrite,s.read],a?.view,i,t,o?.snapshot(null));return r.impl.register(l),l}var ry=null;function Ss(){return ry}function Kp(n){ry??=n}var Ds=class{};var ht=(function(n){return n[n.Format=0]="Format",n[n.Standalone=1]="Standalone",n})(ht||{}),Me=(function(n){return n[n.Narrow=0]="Narrow",n[n.Abbreviated=1]="Abbreviated",n[n.Wide=2]="Wide",n[n.Short=3]="Short",n})(Me||{}),It=(function(n){return n[n.Short=0]="Short",n[n.Medium=1]="Medium",n[n.Long=2]="Long",n[n.Full=3]="Full",n})(It||{}),jn={Decimal:0,Group:1,List:2,PercentSign:3,PlusSign:4,MinusSign:5,Exponential:6,SuperscriptingExponent:7,PerMille:8,Infinity:9,NaN:10,TimeSeparator:11,CurrencyDecimal:12,CurrencyGroup:13};function sy(n){return Nt(n)[We.LocaleId]}function ay(n,e,t){let i=Nt(n),r=[i[We.DayPeriodsFormat],i[We.DayPeriodsStandalone]],o=Yt(r,e);return Yt(o,t)}function ly(n,e,t){let i=Nt(n),r=[i[We.DaysFormat],i[We.DaysStandalone]],o=Yt(r,e);return Yt(o,t)}function cy(n,e,t){let i=Nt(n),r=[i[We.MonthsFormat],i[We.MonthsStandalone]],o=Yt(r,e);return Yt(o,t)}function dy(n,e){let i=Nt(n)[We.Eras];return Yt(i,e)}function Ts(n,e){let t=Nt(n);return Yt(t[We.DateFormat],e)}function Ms(n,e){let t=Nt(n);return Yt(t[We.TimeFormat],e)}function Is(n,e){let i=Nt(n)[We.DateTimeFormat];return Yt(i,e)}function ks(n,e){let t=Nt(n),i=t[We.NumberSymbols][e];if(typeof i>"u"){if(e===jn.CurrencyDecimal)return t[We.NumberSymbols][jn.Decimal];if(e===jn.CurrencyGroup)return t[We.NumberSymbols][jn.Group]}return i}function uy(n){if(!n[We.ExtraData])throw new q(2303,!1)}function fy(n){let e=Nt(n);return uy(e),(e[We.ExtraData][2]||[]).map(i=>typeof i=="string"?Xp(i):[Xp(i[0]),Xp(i[1])])}function py(n,e,t){let i=Nt(n);uy(i);let r=[i[We.ExtraData][0],i[We.ExtraData][1]],o=Yt(r,e)||[];return Yt(o,t)||[]}function Yt(n,e){for(let t=e;t>-1;t--)if(typeof n[t]<"u")return n[t];throw new q(2304,!1)}function Xp(n){let[e,t]=n.split(":");return{hours:+e,minutes:+t}}var HS=/^(\d{4,})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,hc={},US=/((?:[^BEGHLMOSWYZabcdhmswyz']+)|(?:'(?:[^']|'')*')|(?:G{1,5}|y{1,4}|Y{1,4}|M{1,5}|L{1,5}|w{1,2}|W{1}|d{1,2}|E{1,6}|c{1,6}|a{1,5}|b{1,5}|B{1,5}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|S{1,3}|z{1,4}|Z{1,5}|O{1,4}))([\s\S]*)/,zS=256;function hy(n,e,t,i){let r=eT(n);GS(e),e=Bn(t,e)||e;let s=[],a;for(;e;)if(a=US.exec(e),a){s=s.concat(a.slice(1));let h=s.pop();if(!h)break;e=h}else{s.push(e);break}let l=r.getTimezoneOffset();i&&(l=gy(i,l),r=JS(r,i));let c="";return s.forEach(h=>{let _=KS(h);c+=_?_(r,t,l):h==="''"?"'":h.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),c}function GS(n){if(n.length>zS)throw new q(2300,!1)}function yc(n,e,t){let i=new Date(0);return i.setFullYear(n,e,t),i.setHours(0,0,0),i}function Bn(n,e){let t=sy(n);if(hc[t]??={},hc[t][e])return hc[t][e];let i="";switch(e){case"shortDate":i=Ts(n,It.Short);break;case"mediumDate":i=Ts(n,It.Medium);break;case"longDate":i=Ts(n,It.Long);break;case"fullDate":i=Ts(n,It.Full);break;case"shortTime":i=Ms(n,It.Short);break;case"mediumTime":i=Ms(n,It.Medium);break;case"longTime":i=Ms(n,It.Long);break;case"fullTime":i=Ms(n,It.Full);break;case"short":let r=Bn(n,"shortTime"),o=Bn(n,"shortDate");i=mc(Is(n,It.Short),[r,o]);break;case"medium":let s=Bn(n,"mediumTime"),a=Bn(n,"mediumDate");i=mc(Is(n,It.Medium),[s,a]);break;case"long":let l=Bn(n,"longTime"),c=Bn(n,"longDate");i=mc(Is(n,It.Long),[l,c]);break;case"full":let h=Bn(n,"fullTime"),_=Bn(n,"fullDate");i=mc(Is(n,It.Full),[h,_]);break}return i&&(hc[t][e]=i),i}function mc(n,e){return e&&(n=n.replace(/\{([^}]+)}/g,function(t,i){return e!=null&&i in e?e[i]:t})),n}function fn(n,e,t="-",i,r){let o="";(n<0||r&&n<=0)&&(r?n=-n+1:(n=-n,o=t));let s=String(n);for(;s.length<e;)s="0"+s;return i&&(s=s.slice(s.length-e)),o+s}function WS(n,e){return fn(n,3).substring(0,e)}function Qe(n,e,t=0,i=!1,r=!1){return function(o,s){let a=qS(n,o);if((t>0||a>-t)&&(a+=t),n===3)a===0&&t===-12&&(a=12);else if(n===6)return WS(a,e);let l=ks(s,jn.MinusSign);return fn(a,e,l,i,r)}}function qS(n,e){switch(n){case 0:return e.getFullYear();case 1:return e.getMonth();case 2:return e.getDate();case 3:return e.getHours();case 4:return e.getMinutes();case 5:return e.getSeconds();case 6:return e.getMilliseconds();case 7:return e.getDay();default:throw new q(2301,!1)}}function Oe(n,e,t=ht.Format,i=!1){return function(r,o){return ZS(r,o,n,e,t,i)}}function ZS(n,e,t,i,r,o){switch(t){case 2:return cy(e,r,i)[n.getMonth()];case 1:return ly(e,r,i)[n.getDay()];case 0:let s=n.getHours(),a=n.getMinutes();if(o){let c=fy(e),h=py(e,r,i),_=c.findIndex(w=>{if(Array.isArray(w)){let[E,P]=w,V=s>=E.hours&&a>=E.minutes,z=s<P.hours||s===P.hours&&a<P.minutes;if(E.hours<P.hours){if(V&&z)return!0}else if(V||z)return!0}else if(w.hours===s&&w.minutes===a)return!0;return!1});if(_!==-1)return h[_]}return ay(e,r,i)[s<12?0:1];case 3:return dy(e,i)[n.getFullYear()<=0?0:1];default:let l=t;throw new q(2302,!1)}}function gc(n){return function(e,t,i){let r=-1*i,o=ks(t,jn.MinusSign),s=r>0?Math.floor(r/60):Math.ceil(r/60);switch(n){case 0:return(r>=0?"+":"")+fn(s,2,o)+fn(Math.abs(r%60),2,o);case 1:return"GMT"+(r>=0?"+":"")+fn(s,1,o);case 2:return"GMT"+(r>=0?"+":"")+fn(s,2,o)+":"+fn(Math.abs(r%60),2,o);case 3:return i===0?"Z":(r>=0?"+":"")+fn(s,2,o)+":"+fn(Math.abs(r%60),2,o);default:throw new q(2310,!1)}}}var YS=0,vc=4;function QS(n){let e=yc(n,YS,1).getDay();return yc(n,0,1+(e<=vc?vc:vc+7)-e)}function my(n){let e=n.getDay(),t=e===0?-3:vc-e;return yc(n.getFullYear(),n.getMonth(),n.getDate()+t)}function Jp(n,e=!1){return function(t,i){let r;if(e){let o=new Date(t.getFullYear(),t.getMonth(),1).getDay()-1,s=t.getDate();r=1+Math.floor((s+o)/7)}else{let o=my(t),s=QS(o.getFullYear()),a=o.getTime()-s.getTime();r=1+Math.round(a/6048e5)}return fn(r,n,ks(i,jn.MinusSign))}}function _c(n,e=!1){return function(t,i){let o=my(t).getFullYear();return fn(o,n,ks(i,jn.MinusSign),e)}}var eh={};function KS(n){if(eh[n])return eh[n];let e;switch(n){case"G":case"GG":case"GGG":e=Oe(3,Me.Abbreviated);break;case"GGGG":e=Oe(3,Me.Wide);break;case"GGGGG":e=Oe(3,Me.Narrow);break;case"y":e=Qe(0,1,0,!1,!0);break;case"yy":e=Qe(0,2,0,!0,!0);break;case"yyy":e=Qe(0,3,0,!1,!0);break;case"yyyy":e=Qe(0,4,0,!1,!0);break;case"Y":e=_c(1);break;case"YY":e=_c(2,!0);break;case"YYY":e=_c(3);break;case"YYYY":e=_c(4);break;case"M":case"L":e=Qe(1,1,1);break;case"MM":case"LL":e=Qe(1,2,1);break;case"MMM":e=Oe(2,Me.Abbreviated);break;case"MMMM":e=Oe(2,Me.Wide);break;case"MMMMM":e=Oe(2,Me.Narrow);break;case"LLL":e=Oe(2,Me.Abbreviated,ht.Standalone);break;case"LLLL":e=Oe(2,Me.Wide,ht.Standalone);break;case"LLLLL":e=Oe(2,Me.Narrow,ht.Standalone);break;case"w":e=Jp(1);break;case"ww":e=Jp(2);break;case"W":e=Jp(1,!0);break;case"d":e=Qe(2,1);break;case"dd":e=Qe(2,2);break;case"c":case"cc":e=Qe(7,1);break;case"ccc":e=Oe(1,Me.Abbreviated,ht.Standalone);break;case"cccc":e=Oe(1,Me.Wide,ht.Standalone);break;case"ccccc":e=Oe(1,Me.Narrow,ht.Standalone);break;case"cccccc":e=Oe(1,Me.Short,ht.Standalone);break;case"E":case"EE":case"EEE":e=Oe(1,Me.Abbreviated);break;case"EEEE":e=Oe(1,Me.Wide);break;case"EEEEE":e=Oe(1,Me.Narrow);break;case"EEEEEE":e=Oe(1,Me.Short);break;case"a":case"aa":case"aaa":e=Oe(0,Me.Abbreviated);break;case"aaaa":e=Oe(0,Me.Wide);break;case"aaaaa":e=Oe(0,Me.Narrow);break;case"b":case"bb":case"bbb":e=Oe(0,Me.Abbreviated,ht.Standalone,!0);break;case"bbbb":e=Oe(0,Me.Wide,ht.Standalone,!0);break;case"bbbbb":e=Oe(0,Me.Narrow,ht.Standalone,!0);break;case"B":case"BB":case"BBB":e=Oe(0,Me.Abbreviated,ht.Format,!0);break;case"BBBB":e=Oe(0,Me.Wide,ht.Format,!0);break;case"BBBBB":e=Oe(0,Me.Narrow,ht.Format,!0);break;case"h":e=Qe(3,1,-12);break;case"hh":e=Qe(3,2,-12);break;case"H":e=Qe(3,1);break;case"HH":e=Qe(3,2);break;case"m":e=Qe(4,1);break;case"mm":e=Qe(4,2);break;case"s":e=Qe(5,1);break;case"ss":e=Qe(5,2);break;case"S":e=Qe(6,1);break;case"SS":e=Qe(6,2);break;case"SSS":e=Qe(6,3);break;case"Z":case"ZZ":case"ZZZ":e=gc(0);break;case"ZZZZZ":e=gc(3);break;case"O":case"OO":case"OOO":case"z":case"zz":case"zzz":e=gc(1);break;case"OOOO":case"ZZZZ":case"zzzz":e=gc(2);break;default:return null}return eh[n]=e,e}function gy(n,e){n=n.replace(/:/g,"");let t=Date.parse("Jan 01, 1970 00:00:00 "+n)/6e4;return isNaN(t)?e:t}function XS(n,e){return n=new Date(n.getTime()),n.setMinutes(n.getMinutes()+e),n}function JS(n,e,t){let r=n.getTimezoneOffset(),o=gy(e,r);return XS(n,-1*(o-r))}function eT(n){if(oy(n))return n;if(typeof n=="number"&&!isNaN(n))return new Date(n);if(typeof n=="string"){if(n=n.trim(),/^(\d{4}(-\d{1,2}(-\d{1,2})?)?)$/.test(n)){let[r,o=1,s=1]=n.split("-").map(a=>+a);return yc(r,o-1,s)}let t=parseFloat(n);if(!isNaN(n-t))return new Date(t);let i;if(i=n.match(HS))return tT(i)}let e=new Date(n);if(!oy(e))throw new q(2311,!1);return e}function tT(n){let e=new Date(0),t=0,i=0,r=n[8]?e.setUTCFullYear:e.setFullYear,o=n[8]?e.setUTCHours:e.setHours;n[9]&&(t=Number(n[9]+n[10]),i=Number(n[9]+n[11])),r.call(e,Number(n[1]),Number(n[2])-1,Number(n[3]));let s=Number(n[4]||0)-t,a=Number(n[5]||0)-i,l=Number(n[6]||0),c=Math.floor(parseFloat("0."+(n[7]||0))*1e3);return o.call(e,s,a,l,c),e}function oy(n){return n instanceof Date&&!isNaN(n.valueOf())}var ih=(()=>{class n{_viewContainerRef;_viewRef=null;ngTemplateOutletContext=null;ngTemplateOutlet=null;ngTemplateOutletInjector=null;constructor(t){this._viewContainerRef=t}ngOnChanges(t){if(this._shouldRecreateView(t)){let i=this._viewContainerRef;if(this._viewRef&&i.remove(i.indexOf(this._viewRef)),!this.ngTemplateOutlet){this._viewRef=null;return}let r=this._createContextForwardProxy();this._viewRef=i.createEmbeddedView(this.ngTemplateOutlet,r,{injector:this.ngTemplateOutletInjector??void 0})}}_shouldRecreateView(t){return!!t.ngTemplateOutlet||!!t.ngTemplateOutletInjector}_createContextForwardProxy(){return new Proxy({},{set:(t,i,r)=>this.ngTemplateOutletContext?Reflect.set(this.ngTemplateOutletContext,i,r):!1,get:(t,i,r)=>{if(this.ngTemplateOutletContext)return Reflect.get(this.ngTemplateOutletContext,i,r)}})}static \u0275fac=function(i){return new(i||n)(dn(ui))};static \u0275dir=fi({type:n,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},features:[ds]})}return n})();function _y(n,e){return new q(2100,!1)}var th=class{createSubscription(e,t,i){return et(()=>e.subscribe({next:t,error:i}))}dispose(e){et(()=>e.unsubscribe())}},nh=class{createSubscription(e,t,i){return e.then(r=>t?.(r),r=>i?.(r)),{unsubscribe:()=>{t=null,i=null}}}dispose(e){e.unsubscribe()}},nT=new nh,iT=new th,rh=(()=>{class n{_ref;_latestValue=null;markForCheckOnValueUpdate=!0;_subscription=null;_obj=null;_strategy=null;applicationErrorHandler=k(on);constructor(t){this._ref=t}ngOnDestroy(){this._subscription&&this._dispose(),this._ref=null}transform(t){if(!this._obj){if(t)try{this.markForCheckOnValueUpdate=!1,this._subscribe(t)}finally{this.markForCheckOnValueUpdate=!0}return this._latestValue}return t!==this._obj?(this._dispose(),this.transform(t)):this._latestValue}_subscribe(t){this._obj=t,this._strategy=this._selectStrategy(t),this._subscription=this._strategy.createSubscription(t,i=>this._updateLatestValue(t,i),i=>this.applicationErrorHandler(i))}_selectStrategy(t){if(_s(t))return nT;if(oc(t))return iT;throw _y(n,t)}_dispose(){this._strategy.dispose(this._subscription),this._latestValue=null,this._subscription=null,this._obj=null}_updateLatestValue(t,i){t===this._obj&&(this._latestValue=i,this.markForCheckOnValueUpdate&&this._ref?.markForCheck())}static \u0275fac=function(i){return new(i||n)(dn(fc,16))};static \u0275pipe=rc({name:"async",type:n,pure:!1})}return n})();var rT="mediumDate",vy=new ee(""),yy=new ee(""),Ps=(()=>{class n{locale;defaultTimezone;defaultOptions;constructor(t,i,r){this.locale=t,this.defaultTimezone=i,this.defaultOptions=r}transform(t,i,r,o){if(t==null||t===""||t!==t)return null;try{let s=i??this.defaultOptions?.dateFormat??rT,a=r??this.defaultOptions?.timezone??this.defaultTimezone??void 0;return hy(t,s,o||this.locale,a)}catch(s){throw _y(n,s.message)}}static \u0275fac=function(i){return new(i||n)(dn(ws,16),dn(vy,24),dn(yy,24))};static \u0275pipe=rc({name:"date",type:n,pure:!0})}return n})();function Os(n,e){e=encodeURIComponent(e);for(let t of n.split(";")){let i=t.indexOf("="),[r,o]=i==-1?[t,""]:[t.slice(0,i),t.slice(i+1)];if(r.trim()===e)return decodeURIComponent(o)}return null}var ir=class{};var oh="browser";function by(n){return n===oh}var Rs=class{_doc;constructor(e){this._doc=e}manager},bc=(()=>{class n extends Rs{constructor(t){super(t)}supports(t){return!0}addEventListener(t,i,r,o){return t.addEventListener(i,r,o),()=>this.removeEventListener(t,i,r,o)}removeEventListener(t,i,r,o){return t.removeEventListener(i,r,o)}static \u0275fac=function(i){return new(i||n)(me(lt))};static \u0275prov=re({token:n,factory:n.\u0275fac})}return n})(),xc=new ee(""),dh=(()=>{class n{_zone;_plugins;_eventNameToPlugin=new Map;constructor(t,i){this._zone=i,t.forEach(s=>{s.manager=this});let r=t.filter(s=>!(s instanceof bc));this._plugins=r.slice().reverse();let o=t.find(s=>s instanceof bc);o&&this._plugins.push(o)}addEventListener(t,i,r,o){return this._findPluginFor(i).addEventListener(t,i,r,o)}getZone(){return this._zone}_findPluginFor(t){let i=this._eventNameToPlugin.get(t);if(i)return i;if(i=this._plugins.find(o=>o.supports(t)),!i)throw new q(5101,!1);return this._eventNameToPlugin.set(t,i),i}static \u0275fac=function(i){return new(i||n)(me(xc),me(Ie))};static \u0275prov=re({token:n,factory:n.\u0275fac})}return n})(),sh="ng-app-id";function Cy(n){for(let e of n)e.remove()}function xy(n,e){let t=e.createElement("style");return t.textContent=n,t}function aT(n,e,t,i){let r=n.head?.querySelectorAll(`style[${sh}="${e}"],link[${sh}="${e}"]`);if(r)for(let o of r)o.removeAttribute(sh),o instanceof HTMLLinkElement?i.set(o.href.slice(o.href.lastIndexOf("/")+1),{usage:0,elements:[o]}):o.textContent&&t.set(o.textContent,{usage:0,elements:[o]})}function lh(n,e){let t=e.createElement("link");return t.setAttribute("rel","stylesheet"),t.setAttribute("href",n),t}var uh=(()=>{class n{doc;appId;nonce;inline=new Map;external=new Map;hosts=new Set;constructor(t,i,r,o={}){this.doc=t,this.appId=i,this.nonce=r,aT(t,i,this.inline,this.external),this.hosts.add(t.head)}addStyles(t,i){for(let r of t)this.addUsage(r,this.inline,xy);i?.forEach(r=>this.addUsage(r,this.external,lh))}removeStyles(t,i){for(let r of t)this.removeUsage(r,this.inline);i?.forEach(r=>this.removeUsage(r,this.external))}addUsage(t,i,r){let o=i.get(t);o?o.usage++:i.set(t,{usage:1,elements:[...this.hosts].map(s=>this.addElement(s,r(t,this.doc)))})}removeUsage(t,i){let r=i.get(t);r&&(r.usage--,r.usage<=0&&(Cy(r.elements),i.delete(t)))}ngOnDestroy(){for(let[,{elements:t}]of[...this.inline,...this.external])Cy(t);this.hosts.clear()}addHost(t){this.hosts.add(t);for(let[i,{elements:r}]of this.inline)r.push(this.addElement(t,xy(i,this.doc)));for(let[i,{elements:r}]of this.external)r.push(this.addElement(t,lh(i,this.doc)))}removeHost(t){this.hosts.delete(t)}addElement(t,i){return this.nonce&&i.setAttribute("nonce",this.nonce),t.appendChild(i)}static \u0275fac=function(i){return new(i||n)(me(lt),me(Ul),me(Gl,8),me(er))};static \u0275prov=re({token:n,factory:n.\u0275fac})}return n})(),ah={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/Math/MathML"},fh=/%COMP%/g;var Ey="%COMP%",lT=`_nghost-${Ey}`,cT=`_ngcontent-${Ey}`,dT=!0,uT=new ee("",{providedIn:"root",factory:()=>dT});function fT(n){return cT.replace(fh,n)}function pT(n){return lT.replace(fh,n)}function Dy(n,e){return e.map(t=>t.replace(fh,n))}var ph=(()=>{class n{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;ngZone;nonce;tracingService;rendererByCompId=new Map;defaultRenderer;platformIsServer;constructor(t,i,r,o,s,a,l=null,c=null){this.eventManager=t,this.sharedStylesHost=i,this.appId=r,this.removeStylesOnCompDestroy=o,this.doc=s,this.ngZone=a,this.nonce=l,this.tracingService=c,this.platformIsServer=!1,this.defaultRenderer=new Ns(t,s,a,this.platformIsServer,this.tracingService)}createRenderer(t,i){if(!t||!i)return this.defaultRenderer;let r=this.getOrCreateRenderer(t,i);return r instanceof Cc?r.applyToHost(t):r instanceof As&&r.applyStyles(),r}getOrCreateRenderer(t,i){let r=this.rendererByCompId,o=r.get(i.id);if(!o){let s=this.doc,a=this.ngZone,l=this.eventManager,c=this.sharedStylesHost,h=this.removeStylesOnCompDestroy,_=this.platformIsServer,w=this.tracingService;switch(i.encapsulation){case An.Emulated:o=new Cc(l,c,i,this.appId,h,s,a,_,w);break;case An.ShadowDom:return new ch(l,c,t,i,s,a,this.nonce,_,w);default:o=new As(l,c,i,h,s,a,_,w);break}r.set(i.id,o)}return o}ngOnDestroy(){this.rendererByCompId.clear()}componentReplaced(t){this.rendererByCompId.delete(t)}static \u0275fac=function(i){return new(i||n)(me(dh),me(uh),me(Ul),me(uT),me(lt),me(Ie),me(Gl),me(ci,8))};static \u0275prov=re({token:n,factory:n.\u0275fac})}return n})(),Ns=class{eventManager;doc;ngZone;platformIsServer;tracingService;data=Object.create(null);throwOnSyntheticProps=!0;constructor(e,t,i,r,o){this.eventManager=e,this.doc=t,this.ngZone=i,this.platformIsServer=r,this.tracingService=o}destroy(){}destroyNode=null;createElement(e,t){return t?this.doc.createElementNS(ah[t]||t,e):this.doc.createElement(e)}createComment(e){return this.doc.createComment(e)}createText(e){return this.doc.createTextNode(e)}appendChild(e,t){(wy(e)?e.content:e).appendChild(t)}insertBefore(e,t,i){e&&(wy(e)?e.content:e).insertBefore(t,i)}removeChild(e,t){t.remove()}selectRootElement(e,t){let i=typeof e=="string"?this.doc.querySelector(e):e;if(!i)throw new q(-5104,!1);return t||(i.textContent=""),i}parentNode(e){return e.parentNode}nextSibling(e){return e.nextSibling}setAttribute(e,t,i,r){if(r){t=r+":"+t;let o=ah[r];o?e.setAttributeNS(o,t,i):e.setAttribute(t,i)}else e.setAttribute(t,i)}removeAttribute(e,t,i){if(i){let r=ah[i];r?e.removeAttributeNS(r,t):e.removeAttribute(`${i}:${t}`)}else e.removeAttribute(t)}addClass(e,t){e.classList.add(t)}removeClass(e,t){e.classList.remove(t)}setStyle(e,t,i,r){r&(En.DashCase|En.Important)?e.style.setProperty(t,i,r&En.Important?"important":""):e.style[t]=i}removeStyle(e,t,i){i&En.DashCase?e.style.removeProperty(t):e.style[t]=""}setProperty(e,t,i){e!=null&&(e[t]=i)}setValue(e,t){e.nodeValue=t}listen(e,t,i,r){if(typeof e=="string"&&(e=Ss().getGlobalEventTarget(this.doc,e),!e))throw new q(5102,!1);let o=this.decoratePreventDefault(i);return this.tracingService?.wrapEventListener&&(o=this.tracingService.wrapEventListener(e,t,o)),this.eventManager.addEventListener(e,t,o,r)}decoratePreventDefault(e){return t=>{if(t==="__ngUnwrap__")return e;e(t)===!1&&t.preventDefault()}}};function wy(n){return n.tagName==="TEMPLATE"&&n.content!==void 0}var ch=class extends Ns{sharedStylesHost;hostEl;shadowRoot;constructor(e,t,i,r,o,s,a,l,c){super(e,o,s,l,c),this.sharedStylesHost=t,this.hostEl=i,this.shadowRoot=i.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);let h=r.styles;h=Dy(r.id,h);for(let w of h){let E=document.createElement("style");a&&E.setAttribute("nonce",a),E.textContent=w,this.shadowRoot.appendChild(E)}let _=r.getExternalStyles?.();if(_)for(let w of _){let E=lh(w,o);a&&E.setAttribute("nonce",a),this.shadowRoot.appendChild(E)}}nodeOrShadowRoot(e){return e===this.hostEl?this.shadowRoot:e}appendChild(e,t){return super.appendChild(this.nodeOrShadowRoot(e),t)}insertBefore(e,t,i){return super.insertBefore(this.nodeOrShadowRoot(e),t,i)}removeChild(e,t){return super.removeChild(null,t)}parentNode(e){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(e)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}},As=class extends Ns{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(e,t,i,r,o,s,a,l,c){super(e,o,s,a,l),this.sharedStylesHost=t,this.removeStylesOnCompDestroy=r;let h=i.styles;this.styles=c?Dy(c,h):h,this.styleUrls=i.getExternalStyles?.(c)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&Xi.size===0&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},Cc=class extends As{contentAttr;hostAttr;constructor(e,t,i,r,o,s,a,l,c){let h=r+"-"+i.id;super(e,t,i,o,s,a,l,c,h),this.contentAttr=fT(h),this.hostAttr=pT(h)}applyToHost(e){this.applyStyles(),this.setAttribute(e,this.hostAttr,"")}createElement(e,t){let i=super.createElement(e,t);return super.setAttribute(i,this.contentAttr,""),i}};var wc=class n extends Ds{supportsDOMEvents=!0;static makeCurrent(){Kp(new n)}onAndCancel(e,t,i,r){return e.addEventListener(t,i,r),()=>{e.removeEventListener(t,i,r)}}dispatchEvent(e,t){e.dispatchEvent(t)}remove(e){e.remove()}createElement(e,t){return t=t||this.getDefaultDocument(),t.createElement(e)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(e){return e.nodeType===Node.ELEMENT_NODE}isShadowRoot(e){return e instanceof DocumentFragment}getGlobalEventTarget(e,t){return t==="window"?window:t==="document"?e:t==="body"?e.body:null}getBaseHref(e){let t=hT();return t==null?null:mT(t)}resetBaseElement(){Ls=null}getUserAgent(){return window.navigator.userAgent}getCookie(e){return Os(document.cookie,e)}},Ls=null;function hT(){return Ls=Ls||document.head.querySelector("base"),Ls?Ls.getAttribute("href"):null}function mT(n){return new URL(n,document.baseURI).pathname}var gT=(()=>{class n{build(){return new XMLHttpRequest}static \u0275fac=function(i){return new(i||n)};static \u0275prov=re({token:n,factory:n.\u0275fac})}return n})(),Sy=["alt","control","meta","shift"],_T={"\b":"Backspace"," ":"Tab","\x7F":"Delete","\x1B":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},vT={alt:n=>n.altKey,control:n=>n.ctrlKey,meta:n=>n.metaKey,shift:n=>n.shiftKey},Ty=(()=>{class n extends Rs{constructor(t){super(t)}supports(t){return n.parseEventName(t)!=null}addEventListener(t,i,r,o){let s=n.parseEventName(i),a=n.eventCallback(s.fullKey,r,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>Ss().onAndCancel(t,s.domEventName,a,o))}static parseEventName(t){let i=t.toLowerCase().split("."),r=i.shift();if(i.length===0||!(r==="keydown"||r==="keyup"))return null;let o=n._normalizeKey(i.pop()),s="",a=i.indexOf("code");if(a>-1&&(i.splice(a,1),s="code."),Sy.forEach(c=>{let h=i.indexOf(c);h>-1&&(i.splice(h,1),s+=c+".")}),s+=o,i.length!=0||o.length===0)return null;let l={};return l.domEventName=r,l.fullKey=s,l}static matchEventFullKeyCode(t,i){let r=_T[t.key]||t.key,o="";return i.indexOf("code.")>-1&&(r=t.code,o="code."),r==null||!r?!1:(r=r.toLowerCase(),r===" "?r="space":r==="."&&(r="dot"),Sy.forEach(s=>{if(s!==r){let a=vT[s];a(t)&&(o+=s+".")}}),o+=r,o===i)}static eventCallback(t,i,r){return o=>{n.matchEventFullKeyCode(o,t)&&r.runGuarded(()=>i(o))}}static _normalizeKey(t){return t==="esc"?"escape":t}static \u0275fac=function(i){return new(i||n)(me(lt))};static \u0275prov=re({token:n,factory:n.\u0275fac})}return n})();function hh(n,e,t){let i=G({rootComponent:n,platformRef:t?.platformRef},yT(e));return ty(i)}function yT(n){return{appProviders:[...ET,...n?.providers??[]],platformProviders:wT}}function bT(){wc.makeCurrent()}function CT(){return new Ot}function xT(){return Zf(document),document}var wT=[{provide:er,useValue:oh},{provide:zl,useValue:bT,multi:!0},{provide:lt,useFactory:xT}];var ET=[{provide:Bo,useValue:"root"},{provide:Ot,useFactory:CT},{provide:xc,useClass:bc,multi:!0,deps:[lt]},{provide:xc,useClass:Ty,multi:!0,deps:[lt]},ph,uh,dh,{provide:Dn,useExisting:ph},{provide:ir,useClass:gT},[]];var or=class{},Fs=class{},mi=class n{headers;normalizedNames=new Map;lazyInit;lazyUpdate=null;constructor(e){e?typeof e=="string"?this.lazyInit=()=>{this.headers=new Map,e.split(`
5
+ `).forEach(t=>{let i=t.indexOf(":");if(i>0){let r=t.slice(0,i),o=t.slice(i+1).trim();this.addHeaderEntry(r,o)}})}:typeof Headers<"u"&&e instanceof Headers?(this.headers=new Map,e.forEach((t,i)=>{this.addHeaderEntry(i,t)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(e).forEach(([t,i])=>{this.setHeaderEntries(t,i)})}:this.headers=new Map}has(e){return this.init(),this.headers.has(e.toLowerCase())}get(e){this.init();let t=this.headers.get(e.toLowerCase());return t&&t.length>0?t[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(e){return this.init(),this.headers.get(e.toLowerCase())||null}append(e,t){return this.clone({name:e,value:t,op:"a"})}set(e,t){return this.clone({name:e,value:t,op:"s"})}delete(e,t){return this.clone({name:e,value:t,op:"d"})}maybeSetNormalizedName(e,t){this.normalizedNames.has(t)||this.normalizedNames.set(t,e)}init(){this.lazyInit&&(this.lazyInit instanceof n?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(e=>this.applyUpdate(e)),this.lazyUpdate=null))}copyFrom(e){e.init();for(let[t,i]of e.headers.entries())this.headers.set(t,i),this.normalizedNames.set(t,e.normalizedNames.get(t))}clone(e){let t=new n;return t.lazyInit=this.lazyInit&&this.lazyInit instanceof n?this.lazyInit:this,t.lazyUpdate=(this.lazyUpdate||[]).concat([e]),t}applyUpdate(e){let t=e.name.toLowerCase();switch(e.op){case"a":case"s":let i=e.value;if(typeof i=="string"&&(i=[i]),i.length===0)return;this.maybeSetNormalizedName(e.name,t);let r=e.op==="a"?(this.headers.get(t)||[]).slice():[];r.push(...i),this.headers.set(t,r);break;case"d":let o=e.value;if(o===void 0)this.headers.delete(t),this.normalizedNames.delete(t);else{let s=Array.isArray(o)?o:[o],a=this.headers.get(t);if(!a)return;a=a.filter(l=>s.indexOf(l)===-1),a.length===0?(this.headers.delete(t),this.normalizedNames.delete(t)):this.headers.set(t,a)}break}}addHeaderEntry(e,t){let i=e.toLowerCase();this.maybeSetNormalizedName(e,i),this.headers.has(i)?this.headers.get(i).push(t):this.headers.set(i,[t])}setHeaderEntries(e,t){let i=(Array.isArray(t)?t:[t]).map(o=>o.toString()),r=e.toLowerCase();this.headers.set(r,i),this.maybeSetNormalizedName(e,r)}forEach(e){this.init(),Array.from(this.normalizedNames.keys()).forEach(t=>e(this.normalizedNames.get(t),this.headers.get(t)))}};var Dc=class{encodeKey(e){return My(e)}encodeValue(e){return My(e)}decodeKey(e){return decodeURIComponent(e)}decodeValue(e){return decodeURIComponent(e)}};function DT(n,e){let t=new Map;return n.length>0&&n.replace(/^\?/,"").split("&").forEach(r=>{let o=r.indexOf("="),[s,a]=o==-1?[e.decodeKey(r),""]:[e.decodeKey(r.slice(0,o)),e.decodeValue(r.slice(o+1))],l=t.get(s)||[];l.push(a),t.set(s,l)}),t}var ST=/%(\d[a-f0-9])/gi,TT={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function My(n){return encodeURIComponent(n).replace(ST,(e,t)=>TT[t]??e)}function Ec(n){return`${n}`}var dt=class n{map;encoder;updates=null;cloneFrom=null;constructor(e={}){if(this.encoder=e.encoder||new Dc,e.fromString){if(e.fromObject)throw new q(2805,!1);this.map=DT(e.fromString,this.encoder)}else e.fromObject?(this.map=new Map,Object.keys(e.fromObject).forEach(t=>{let i=e.fromObject[t],r=Array.isArray(i)?i.map(Ec):[Ec(i)];this.map.set(t,r)})):this.map=null}has(e){return this.init(),this.map.has(e)}get(e){this.init();let t=this.map.get(e);return t?t[0]:null}getAll(e){return this.init(),this.map.get(e)||null}keys(){return this.init(),Array.from(this.map.keys())}append(e,t){return this.clone({param:e,value:t,op:"a"})}appendAll(e){let t=[];return Object.keys(e).forEach(i=>{let r=e[i];Array.isArray(r)?r.forEach(o=>{t.push({param:i,value:o,op:"a"})}):t.push({param:i,value:r,op:"a"})}),this.clone(t)}set(e,t){return this.clone({param:e,value:t,op:"s"})}delete(e,t){return this.clone({param:e,value:t,op:"d"})}toString(){return this.init(),this.keys().map(e=>{let t=this.encoder.encodeKey(e);return this.map.get(e).map(i=>t+"="+this.encoder.encodeValue(i)).join("&")}).filter(e=>e!=="").join("&")}clone(e){let t=new n({encoder:this.encoder});return t.cloneFrom=this.cloneFrom||this,t.updates=(this.updates||[]).concat(e),t}init(){if(this.map===null&&(this.map=new Map),this.cloneFrom!==null){this.cloneFrom.init();for(let[e,t]of this.cloneFrom.map.entries())this.map.set(e,t);this.updates.forEach(e=>{switch(e.op){case"a":case"s":let t=e.op==="a"?(this.map.get(e.param)||[]).slice():[];t.push(Ec(e.value)),this.map.set(e.param,t);break;case"d":if(e.value!==void 0){let i=(this.map.get(e.param)||[]).slice(),r=i.indexOf(Ec(e.value));r!==-1&&i.splice(r,1),i.length>0?this.map.set(e.param,i):this.map.delete(e.param)}else{this.map.delete(e.param);break}}}),this.cloneFrom=this.updates=null}}};var Sc=class{map=new Map;set(e,t){return this.map.set(e,t),this}get(e){return this.map.has(e)||this.map.set(e,e.defaultValue()),this.map.get(e)}delete(e){return this.map.delete(e),this}has(e){return this.map.has(e)}keys(){return this.map.keys()}};function MT(n){switch(n){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function Iy(n){return typeof ArrayBuffer<"u"&&n instanceof ArrayBuffer}function ky(n){return typeof Blob<"u"&&n instanceof Blob}function Py(n){return typeof FormData<"u"&&n instanceof FormData}function IT(n){return typeof URLSearchParams<"u"&&n instanceof URLSearchParams}var Oy="Content-Type",Ry="Accept",Ny="X-Request-URL",Ay="text/plain",Ly="application/json",kT=`${Ly}, ${Ay}, */*`,eo=class n{url;body=null;headers;context;reportProgress=!1;withCredentials=!1;credentials;keepalive=!1;cache;priority;mode;redirect;referrer;integrity;responseType="json";method;params;urlWithParams;transferCache;timeout;constructor(e,t,i,r){this.url=t,this.method=e.toUpperCase();let o;if(MT(this.method)||r?(this.body=i!==void 0?i:null,o=r):o=i,o){if(this.reportProgress=!!o.reportProgress,this.withCredentials=!!o.withCredentials,this.keepalive=!!o.keepalive,o.responseType&&(this.responseType=o.responseType),o.headers&&(this.headers=o.headers),o.context&&(this.context=o.context),o.params&&(this.params=o.params),o.priority&&(this.priority=o.priority),o.cache&&(this.cache=o.cache),o.credentials&&(this.credentials=o.credentials),typeof o.timeout=="number"){if(o.timeout<1||!Number.isInteger(o.timeout))throw new q(2822,"");this.timeout=o.timeout}o.mode&&(this.mode=o.mode),o.redirect&&(this.redirect=o.redirect),o.integrity&&(this.integrity=o.integrity),o.referrer!==void 0&&(this.referrer=o.referrer),this.transferCache=o.transferCache}if(this.headers??=new mi,this.context??=new Sc,!this.params)this.params=new dt,this.urlWithParams=t;else{let s=this.params.toString();if(s.length===0)this.urlWithParams=t;else{let a=t.indexOf("?"),l=a===-1?"?":a<t.length-1?"&":"";this.urlWithParams=t+l+s}}}serializeBody(){return this.body===null?null:typeof this.body=="string"||Iy(this.body)||ky(this.body)||Py(this.body)||IT(this.body)?this.body:this.body instanceof dt?this.body.toString():typeof this.body=="object"||typeof this.body=="boolean"||Array.isArray(this.body)?JSON.stringify(this.body):this.body.toString()}detectContentTypeHeader(){return this.body===null||Py(this.body)?null:ky(this.body)?this.body.type||null:Iy(this.body)?null:typeof this.body=="string"?Ay:this.body instanceof dt?"application/x-www-form-urlencoded;charset=UTF-8":typeof this.body=="object"||typeof this.body=="number"||typeof this.body=="boolean"?Ly:null}clone(e={}){let t=e.method||this.method,i=e.url||this.url,r=e.responseType||this.responseType,o=e.keepalive??this.keepalive,s=e.priority||this.priority,a=e.cache||this.cache,l=e.mode||this.mode,c=e.redirect||this.redirect,h=e.credentials||this.credentials,_=e.referrer??this.referrer,w=e.integrity||this.integrity,E=e.transferCache??this.transferCache,P=e.timeout??this.timeout,V=e.body!==void 0?e.body:this.body,z=e.withCredentials??this.withCredentials,B=e.reportProgress??this.reportProgress,_e=e.headers||this.headers,Ft=e.params||this.params,Be=e.context??this.context;return e.setHeaders!==void 0&&(_e=Object.keys(e.setHeaders).reduce((st,nt)=>st.set(nt,e.setHeaders[nt]),_e)),e.setParams&&(Ft=Object.keys(e.setParams).reduce((st,nt)=>st.set(nt,e.setParams[nt]),Ft)),new n(t,i,V,{params:Ft,headers:_e,context:Be,reportProgress:B,responseType:r,withCredentials:z,transferCache:E,keepalive:o,cache:a,priority:s,timeout:P,mode:l,redirect:c,credentials:h,referrer:_,integrity:w})}},rr=(function(n){return n[n.Sent=0]="Sent",n[n.UploadProgress=1]="UploadProgress",n[n.ResponseHeader=2]="ResponseHeader",n[n.DownloadProgress=3]="DownloadProgress",n[n.Response=4]="Response",n[n.User=5]="User",n})(rr||{}),no=class{headers;status;statusText;url;ok;type;redirected;constructor(e,t=200,i="OK"){this.headers=e.headers||new mi,this.status=e.status!==void 0?e.status:t,this.statusText=e.statusText||i,this.url=e.url||null,this.redirected=e.redirected,this.ok=this.status>=200&&this.status<300}},Tc=class n extends no{constructor(e={}){super(e)}type=rr.ResponseHeader;clone(e={}){return new n({headers:e.headers||this.headers,status:e.status!==void 0?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0})}},Vs=class n extends no{body;constructor(e={}){super(e),this.body=e.body!==void 0?e.body:null}type=rr.Response;clone(e={}){return new n({body:e.body!==void 0?e.body:this.body,headers:e.headers||this.headers,status:e.status!==void 0?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0,redirected:e.redirected??this.redirected})}},to=class extends no{name="HttpErrorResponse";message;error;ok=!1;constructor(e){super(e,0,"Unknown Error"),this.status>=200&&this.status<300?this.message=`Http failure during parsing for ${e.url||"(unknown url)"}`:this.message=`Http failure response for ${e.url||"(unknown url)"}: ${e.status} ${e.statusText}`,this.error=e.error||null}},PT=200,OT=204;function mh(n,e){return{body:e,headers:n.headers,context:n.context,observe:n.observe,params:n.params,reportProgress:n.reportProgress,responseType:n.responseType,withCredentials:n.withCredentials,credentials:n.credentials,transferCache:n.transferCache,timeout:n.timeout,keepalive:n.keepalive,priority:n.priority,cache:n.cache,mode:n.mode,redirect:n.redirect,integrity:n.integrity,referrer:n.referrer}}var io=(()=>{class n{handler;constructor(t){this.handler=t}request(t,i,r={}){let o;if(t instanceof eo)o=t;else{let l;r.headers instanceof mi?l=r.headers:l=new mi(r.headers);let c;r.params&&(r.params instanceof dt?c=r.params:c=new dt({fromObject:r.params})),o=new eo(t,i,r.body!==void 0?r.body:null,{headers:l,context:r.context,params:c,reportProgress:r.reportProgress,responseType:r.responseType||"json",withCredentials:r.withCredentials,transferCache:r.transferCache,keepalive:r.keepalive,priority:r.priority,cache:r.cache,mode:r.mode,redirect:r.redirect,credentials:r.credentials,referrer:r.referrer,integrity:r.integrity,timeout:r.timeout})}let s=De(o).pipe(Yd(l=>this.handler.handle(l)));if(t instanceof eo||r.observe==="events")return s;let a=s.pipe(ko(l=>l instanceof Vs));switch(r.observe||"body"){case"body":switch(o.responseType){case"arraybuffer":return a.pipe(qe(l=>{if(l.body!==null&&!(l.body instanceof ArrayBuffer))throw new q(2806,!1);return l.body}));case"blob":return a.pipe(qe(l=>{if(l.body!==null&&!(l.body instanceof Blob))throw new q(2807,!1);return l.body}));case"text":return a.pipe(qe(l=>{if(l.body!==null&&typeof l.body!="string")throw new q(2808,!1);return l.body}));default:return a.pipe(qe(l=>l.body))}case"response":return a;default:throw new q(2809,!1)}}delete(t,i={}){return this.request("DELETE",t,i)}get(t,i={}){return this.request("GET",t,i)}head(t,i={}){return this.request("HEAD",t,i)}jsonp(t,i){return this.request("JSONP",t,{params:new dt().append(i,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(t,i={}){return this.request("OPTIONS",t,i)}patch(t,i,r={}){return this.request("PATCH",t,mh(r,i))}post(t,i,r={}){return this.request("POST",t,mh(r,i))}put(t,i,r={}){return this.request("PUT",t,mh(r,i))}static \u0275fac=function(i){return new(i||n)(me(or))};static \u0275prov=re({token:n,factory:n.\u0275fac})}return n})();var RT=new ee("");function NT(n,e){return e(n)}function AT(n,e,t){return(i,r)=>Ar(t,()=>e(i,o=>n(o,r)))}var _h=new ee(""),Fy=new ee(""),Vy=new ee("",{providedIn:"root",factory:()=>!0});var Mc=(()=>{class n extends or{backend;injector;chain=null;pendingTasks=k(Hr);contributeToStability=k(Vy);constructor(t,i){super(),this.backend=t,this.injector=i}handle(t){if(this.chain===null){let i=this.injector.get(or,null,{skipSelf:!0}),r=i!==null&&this.backend===i,o=this.injector.get(Fy,[],r?{self:!0}:void 0),s=Array.from(new Set([...this.injector.get(_h),...o]));this.chain=s.reduceRight((a,l)=>AT(a,l,this.injector),NT)}if(this.contributeToStability){let i=this.pendingTasks.add();return this.chain(t,r=>this.backend.handle(r)).pipe(kr(i))}else return this.chain(t,i=>this.backend.handle(i))}static \u0275fac=function(i){return new(i||n)(me(Fs),me(Mt))};static \u0275prov=re({token:n,factory:n.\u0275fac})}return n})();var LT=/^\)\]\}',?\n/,FT=RegExp(`^${Ny}:`,"m");function VT(n){return"responseURL"in n&&n.responseURL?n.responseURL:FT.test(n.getAllResponseHeaders())?n.getResponseHeader(Ny):null}var gh=(()=>{class n{xhrFactory;constructor(t){this.xhrFactory=t}handle(t){if(t.method==="JSONP")throw new q(-2800,!1);let i=this.xhrFactory;return De(null).pipe(Tt(()=>new ae(o=>{let s=i.build();if(s.open(t.method,t.urlWithParams),t.withCredentials&&(s.withCredentials=!0),t.headers.forEach((z,B)=>s.setRequestHeader(z,B.join(","))),t.headers.has(Ry)||s.setRequestHeader(Ry,kT),!t.headers.has(Oy)){let z=t.detectContentTypeHeader();z!==null&&s.setRequestHeader(Oy,z)}if(t.timeout&&(s.timeout=t.timeout),t.responseType){let z=t.responseType.toLowerCase();s.responseType=z!=="json"?z:"text"}let a=t.serializeBody(),l=null,c=()=>{if(l!==null)return l;let z=s.statusText||"OK",B=new mi(s.getAllResponseHeaders()),_e=VT(s)||t.url;return l=new Tc({headers:B,status:s.status,statusText:z,url:_e}),l},h=()=>{let{headers:z,status:B,statusText:_e,url:Ft}=c(),Be=null;B!==OT&&(Be=typeof s.response>"u"?s.responseText:s.response),B===0&&(B=Be?PT:0);let st=B>=200&&B<300;if(t.responseType==="json"&&typeof Be=="string"){let nt=Be;Be=Be.replace(LT,"");try{Be=Be!==""?JSON.parse(Be):null}catch(Vt){Be=nt,st&&(st=!1,Be={error:Vt,text:Be})}}st?(o.next(new Vs({body:Be,headers:z,status:B,statusText:_e,url:Ft||void 0})),o.complete()):o.error(new to({error:Be,headers:z,status:B,statusText:_e,url:Ft||void 0}))},_=z=>{let{url:B}=c(),_e=new to({error:z,status:s.status||0,statusText:s.statusText||"Unknown Error",url:B||void 0});o.error(_e)},w=_;t.timeout&&(w=z=>{let{url:B}=c(),_e=new to({error:new DOMException("Request timed out","TimeoutError"),status:s.status||0,statusText:s.statusText||"Request timeout",url:B||void 0});o.error(_e)});let E=!1,P=z=>{E||(o.next(c()),E=!0);let B={type:rr.DownloadProgress,loaded:z.loaded};z.lengthComputable&&(B.total=z.total),t.responseType==="text"&&s.responseText&&(B.partialText=s.responseText),o.next(B)},V=z=>{let B={type:rr.UploadProgress,loaded:z.loaded};z.lengthComputable&&(B.total=z.total),o.next(B)};return s.addEventListener("load",h),s.addEventListener("error",_),s.addEventListener("timeout",w),s.addEventListener("abort",_),t.reportProgress&&(s.addEventListener("progress",P),a!==null&&s.upload&&s.upload.addEventListener("progress",V)),s.send(a),o.next({type:rr.Sent}),()=>{s.removeEventListener("error",_),s.removeEventListener("abort",_),s.removeEventListener("load",h),s.removeEventListener("timeout",w),t.reportProgress&&(s.removeEventListener("progress",P),a!==null&&s.upload&&s.upload.removeEventListener("progress",V)),s.readyState!==s.DONE&&s.abort()}})))}static \u0275fac=function(i){return new(i||n)(me(ir))};static \u0275prov=re({token:n,factory:n.\u0275fac})}return n})(),By=new ee(""),BT="XSRF-TOKEN",jT=new ee("",{providedIn:"root",factory:()=>BT}),$T="X-XSRF-TOKEN",HT=new ee("",{providedIn:"root",factory:()=>$T}),Bs=class{},UT=(()=>{class n{doc;cookieName;lastCookieString="";lastToken=null;parseCount=0;constructor(t,i){this.doc=t,this.cookieName=i}getToken(){let t=this.doc.cookie||"";return t!==this.lastCookieString&&(this.parseCount++,this.lastToken=Os(t,this.cookieName),this.lastCookieString=t),this.lastToken}static \u0275fac=function(i){return new(i||n)(me(lt),me(jT))};static \u0275prov=re({token:n,factory:n.\u0275fac})}return n})(),zT=/^(?:https?:)?\/\//i;function GT(n,e){if(!k(By)||n.method==="GET"||n.method==="HEAD"||zT.test(n.url))return e(n);let t=k(Bs).getToken(),i=k(HT);return t!=null&&!n.headers.has(i)&&(n=n.clone({headers:n.headers.set(i,t)})),e(n)}var vh=(function(n){return n[n.Interceptors=0]="Interceptors",n[n.LegacyInterceptors=1]="LegacyInterceptors",n[n.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",n[n.NoXsrfProtection=3]="NoXsrfProtection",n[n.JsonpSupport=4]="JsonpSupport",n[n.RequestsMadeViaParent=5]="RequestsMadeViaParent",n[n.Fetch=6]="Fetch",n})(vh||{});function WT(n,e){return{\u0275kind:n,\u0275providers:e}}function yh(...n){let e=[io,gh,Mc,{provide:or,useExisting:Mc},{provide:Fs,useFactory:()=>k(RT,{optional:!0})??k(gh)},{provide:_h,useValue:GT,multi:!0},{provide:By,useValue:!0},{provide:Bs,useClass:UT}];for(let t of n)e.push(...t.\u0275providers);return Vo(e)}function bh(n){return WT(vh.Interceptors,n.map(e=>({provide:_h,useValue:e,multi:!0})))}var jy="guitoToken";function $y(){return new URLSearchParams(window.location.search).get(jy)??""}var Hy=(n,e)=>{let t=$y();return!t||!n.url.startsWith("/api")?e(n):e(n.clone({setHeaders:{"X-Guito-Token":t}}))};function Uy(n){let e=new URL(n,window.location.origin),t=$y();return t&&e.searchParams.set(jy,t),e.toString()}var zy={providers:[jp({eventCoalescing:!0}),yh(bh([Hy]))]};function qT(n,e){if(n&1){let t=A();v(0,"button",10),j("click",function(){y(t);let r=u(2);return b(r.retry.emit())}),f(1),C()}if(n&2){let t=u(2);Z("disabled",t.busy()),d(),O(t.retryLabel())}}function ZT(n,e){if(n&1){let t=A();v(0,"div",0),F(),v(1,"svg",1),se(2,"circle",2)(3,"path",3)(4,"circle",4),C(),he(),v(5,"div",5)(6,"p"),f(7),C(),T(8,qT,2,2,"button",6),C(),v(9,"button",7),j("click",function(){y(t);let r=u();return b(r.dismissed.set(!0))}),F(),v(10,"svg",8),se(11,"path",9),C()()()}if(n&2){let t=u();d(7),O(t.message()),d(),M(t.retryLabel()?8:-1)}}var kt=class n{message=N.required();retryLabel=N("");busy=N(!1);retry=W();dismissed=x(!1);constructor(){xe(()=>{this.message(),this.busy(),this.dismissed.set(!1)})}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=ce({type:n,selectors:[["app-error-banner"]],inputs:{message:[1,"message"],retryLabel:[1,"retryLabel"],busy:[1,"busy"]},outputs:{retry:"retry"},decls:1,vars:1,consts:[["role","alert",1,"error-banner"],["viewBox","0 0 20 20","fill","none","aria-hidden","true",1,"error-icon"],["cx","10","cy","10","r","7.5"],["d","M10 6v4.5","stroke-linecap","round"],["cx","10","cy","13.5","r",".8","fill","currentColor","stroke","none"],[1,"error-content"],["type","button",1,"retry",3,"disabled"],["type","button","aria-label","Dismiss error","title","Dismiss error",1,"close",3,"click"],["viewBox","0 0 16 16","fill","none","aria-hidden","true"],["d","m4 4 8 8M12 4l-8 8"],["type","button",1,"retry",3,"click","disabled"]],template:function(t,i){t&1&&T(0,ZT,12,2,"div",0),t&2&&M(i.message()&&!i.dismissed()?0:-1)},styles:["[_nghost-%COMP%]{display:block;flex:none;min-width:0}.error-banner[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:10px;margin:8px 12px;padding:10px 12px;border:1px solid #683d38;border-left:3px solid #f48771;border-radius:6px;background:color-mix(in srgb,var(--bg-alt) 88%,#f48771);color:var(--text-bright);font-size:12px;line-height:1.5}.error-icon[_ngcontent-%COMP%]{width:20px;height:20px;flex:none;color:#f48771;stroke:currentColor;stroke-width:1.5}.error-content[_ngcontent-%COMP%]{flex:1;min-width:0;display:flex;flex-wrap:wrap;align-items:center;gap:8px 16px}p[_ngcontent-%COMP%]{flex:1 1 220px;min-width:0;margin:0;white-space:pre-wrap;overflow-wrap:anywhere;max-height:180px;overflow-y:auto}button[_ngcontent-%COMP%]{font:inherit;cursor:pointer;border-radius:4px;transition:background .12s}.retry[_ngcontent-%COMP%]{flex:none;padding:3px 10px;border:1px solid #89554c;background:transparent;color:#ffc0b2}.retry[_ngcontent-%COMP%]:hover:not(:disabled){background:#f4877120}.retry[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:default}.close[_ngcontent-%COMP%]{display:grid;place-items:center;flex:none;width:26px;height:26px;margin:-3px -5px -3px 0;border:0;background:transparent;color:#e0b1a7}.close[_ngcontent-%COMP%]:hover{background:#f4877126;color:#fff}.close[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:14px;height:14px;stroke:currentColor;stroke-width:1.5;stroke-linecap:round}button[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--accent);outline-offset:2px}@media(prefers-reduced-motion:reduce){button[_ngcontent-%COMP%]{transition:none}}"],changeDetection:0})};var Ic=class n{http=k(io);cache=new Map;empty=De(null);get(e){let t=e.trim().toLowerCase();if(!t)return this.empty;let i=this.cache.get(t);if(i&&i.expires>Date.now())return i.image;this.cache.size>=500&&this.cache.delete(this.cache.keys().next().value);let r=this.http.get("/api/avatar",{params:{email:t},responseType:"blob"}).pipe(Tt(o=>o.size?new ae(s=>{let a=new FileReader;return a.onload=()=>{s.next(String(a.result)),s.complete()},a.onerror=()=>s.error(a.error),a.readAsDataURL(o),()=>{a.readyState===FileReader.LOADING&&a.abort()}}):this.empty),rt(()=>this.empty),Pr({bufferSize:1,refCount:!1}));return this.cache.set(t,{expires:Date.now()+36e5,image:r}),r}static \u0275fac=function(t){return new(t||n)};static \u0275prov=re({token:n,factory:n.\u0275fac,providedIn:"root"})};function YT(n,e){n&1&&se(0,"img",0),n&2&&Z("src",e,tr)}function QT(n,e){if(n&1&&(v(0,"span",1),f(1),C()),n&2){let t=u();d(),O(t.initials())}}var Mn=class n{name=N("");email=N("");avatars=k(Ic);initials(){return this.name().trim().split(/\s+/).slice(0,2).map(e=>e[0]??"").join("").toUpperCase()}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=ce({type:n,selectors:[["app-author-avatar"]],inputs:{name:[1,"name"],email:[1,"email"]},decls:3,vars:3,consts:[["alt","","width","24","height","24",3,"src"],["aria-hidden","true"]],template:function(t,i){if(t&1&&(T(0,YT,1,1,"img",0),hi(1,"async"),vs(2,QT,2,1,"span",1)),t&2){let r;M((r=Fp(1,1,i.avatars.get(i.email())))?0:2,r)}},dependencies:[rh],styles:["[_nghost-%COMP%]{display:inline-flex;width:24px;height:24px;flex:0 0 24px;vertical-align:middle;border-radius:50%;overflow:hidden;background:#36516b}img[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:cover}span[_ngcontent-%COMP%]{margin:auto;color:#fff;font-size:10px;line-height:24px}"],changeDetection:0})};function KT(n,e){if(n&1&&(v(0,"mark",1),f(1),C()),n&2){let t=u(2).$implicit;d(),O(t.text)}}function XT(n,e){if(n&1&&f(0),n&2){let t=u(2).$implicit;Q(" ",t.text," ")}}function JT(n,e){if(n&1){let t=A();v(0,"a",2),j("click",function(r){return y(t),b(r.stopPropagation())}),T(1,KT,2,1,"mark",1)(2,XT,1,1),C()}if(n&2){let t=u().$implicit;Z("href",t.href,tr),d(),M(t.match?1:2)}}function eM(n,e){if(n&1&&(v(0,"mark",1),f(1),C()),n&2){let t=u().$implicit;d(),O(t.text)}}function tM(n,e){if(n&1&&f(0),n&2){let t=u().$implicit;Q(" ",t.text," ")}}function nM(n,e){if(n&1&&T(0,JT,3,2,"a",0)(1,eM,2,1,"mark",1)(2,tM,1,1),n&2){let t=e.$implicit;M(t.href?0:t.match?1:2)}}var ro=class n{text=N("");search=N("");linking=N(null);segments=H(()=>{let e=this.text(),t=this.linking(),i=[];if(!t)i.push({text:e});else try{let o=new RegExp(t.regex,"g"),s=0;for(let a of e.matchAll(o)){let l=a.index??0;l>s&&i.push({text:e.slice(s,l)});let c=t.url.replace(/\$(\d+)/g,(h,_)=>a[Number(_)]??"");if(i.push(G({text:a[0]},/^https?:\/\//i.test(c)?{href:c}:{})),s=l+a[0].length,a[0].length===0)break}s<e.length&&i.push({text:e.slice(s)})}catch{i.push({text:e})}let r=this.search().trim().toLowerCase();return r?i.flatMap(o=>{let s=[],a=o.text.toLowerCase(),l=0;for(;l<o.text.length;){let c=a.indexOf(r,l);if(c===-1){s.push(le(G({},o),{text:o.text.slice(l),match:!1}));break}c>l&&s.push(le(G({},o),{text:o.text.slice(l,c),match:!1})),s.push(le(G({},o),{text:o.text.slice(c,c+r.length),match:!0})),l=c+r.length}return s}):i.map(o=>le(G({},o),{match:!1}))});static \u0275fac=function(t){return new(t||n)};static \u0275cmp=ce({type:n,selectors:[["app-issue-text"]],inputs:{text:[1,"text"],search:[1,"search"],linking:[1,"linking"]},decls:2,vars:0,consts:[["target","_blank","rel","noopener noreferrer",3,"href"],[1,"hl"],["target","_blank","rel","noopener noreferrer",3,"click","href"]],template:function(t,i){t&1&&X(0,nM,3,1,null,null,un),t&2&&J(i.segments())},styles:["[_nghost-%COMP%]{display:contents}a[_ngcontent-%COMP%]{color:var(--accent);text-decoration:none}a[_ngcontent-%COMP%]:hover{text-decoration:underline}.hl[_ngcontent-%COMP%]{padding:0;color:inherit;background:#eac22c59}"],changeDetection:0})};var pn="__working__";var mt=class n{http=k(io);base="/api";mutating=x(!1);mutate(e){return Zd(()=>this.mutating()?Wd(()=>({status:400,error:{error:"Another Git operation is in progress."}})):(this.mutating.set(!0),e().pipe(kr(()=>this.mutating.set(!1)))))}getRepositoryState(){return this.http.get(`${this.base}/repository-state`)}getRepoInfo(){return this.http.get(`${this.base}/repo`)}getCommits(e,t=0){let i=new dt;return e!==void 0&&(i=i.set("limit",String(e))),t>0&&(i=i.set("skip",String(t))),this.http.get(`${this.base}/commits`,{params:i})}searchCommits(e,t=!1){let i=new dt().set("query",e);return t&&(i=i.set("caseSensitive","1")),this.http.get(`${this.base}/commits/search`,{params:i})}getCommitDetail(e){return this.http.post(`${this.base}/commit/detail`,{hash:e})}getAllBranches(){return this.http.get(`${this.base}/branches/all`)}getCommitDiff(e){return this.http.post(`${this.base}/commit/diff`,{hash:e})}getWorkingChanges(){return this.http.get(`${this.base}/working-changes`)}getFileContent(e,t){return this.http.post(`${this.base}/file-content`,{path:e,ref:t})}fetch(e=!1){let t=e?new dt().set("prune","1"):void 0;return this.mutate(()=>this.http.get(`${this.base}/fetch`,{params:t}))}pull(e=!1){return this.mutate(()=>this.http.post(`${this.base}/pull`,{rebase:e}))}push(e=!1){return this.mutate(()=>this.http.post(`${this.base}/push`,{force:e}))}sync(){return this.mutate(()=>this.http.post(`${this.base}/sync`,{}))}checkout(e){return this.mutate(()=>this.http.post(`${this.base}/checkout`,{ref:e}))}revert(e){return this.mutate(()=>this.http.post(`${this.base}/revert`,{commit:e}))}cherryPick(e){return this.mutate(()=>this.http.post(`${this.base}/cherry-pick`,{commit:e}))}dropCommit(e){return this.mutate(()=>this.http.post(`${this.base}/commit/drop`,{commit:e}))}resetToCommit(e,t="hard"){return this.mutate(()=>this.http.post(`${this.base}/reset-commit`,{commit:e,mode:t}))}commit(e,t){return this.mutate(()=>this.http.post(`${this.base}/commit`,{message:e,description:t}))}stage(e){return this.mutate(()=>this.http.post(`${this.base}/stage`,{files:e}))}unstage(e){return this.mutate(()=>this.http.post(`${this.base}/unstage`,{files:e}))}discard(e,t){return this.mutate(()=>this.http.post(`${this.base}/discard`,{files:e,mode:t}))}resetWorking(){return this.mutate(()=>this.http.post(`${this.base}/reset`,{}))}cleanUntracked(){return this.mutate(()=>this.http.post(`${this.base}/clean`,{}))}stashSave(e,t="all"){return this.mutate(()=>this.http.post(`${this.base}/stash/save`,{message:e,scope:t}))}getStashes(){return this.http.get(`${this.base}/stash/list`).pipe(qe(e=>(e.all??[]).map((t,i)=>({index:i,hash:t.hash,message:t.message,date:t.date,author_name:t.author_name,author_email:t.author_email}))))}stashApply(e){return this.mutate(()=>this.http.post(`${this.base}/stash/apply`,{index:e}))}stashPop(e){return this.mutate(()=>this.http.post(`${this.base}/stash/pop`,{index:e}))}stashDrop(e){return this.mutate(()=>this.http.post(`${this.base}/stash/drop`,{index:e}))}getWorktrees(){return this.http.get(`${this.base}/worktrees`)}createWorktree(e,t){return this.mutate(()=>this.http.post(`${this.base}/worktrees`,{path:e,branch:t}))}removeWorktree(e){return this.mutate(()=>this.http.post(`${this.base}/worktrees/remove`,{path:e}))}getTags(){return this.http.get(`${this.base}/tags`)}createBranch(e,t){return this.mutate(()=>this.http.post(`${this.base}/branch/create`,{name:e,startPoint:t}))}deleteBranch(e,t=!1){return this.mutate(()=>this.http.post(`${this.base}/branch/delete`,{name:e,force:t}))}deleteRemoteBranch(e,t){return this.mutate(()=>this.http.post(`${this.base}/branch/delete-remote`,{remote:e,branch:t}))}renameBranch(e,t){return this.mutate(()=>this.http.post(`${this.base}/branch/rename`,{oldName:e,newName:t}))}merge(e){return this.mutate(()=>this.http.post(`${this.base}/merge`,{branch:e}))}rebase(e){return this.mutate(()=>this.http.post(`${this.base}/rebase`,{branch:e}))}createTag(e,t){return this.mutate(()=>this.http.post(`${this.base}/tag/create`,{name:e,commit:t}))}deleteTag(e){return this.mutate(()=>this.http.post(`${this.base}/tag/delete`,{name:e}))}pushTag(e,t="origin"){return this.mutate(()=>this.http.post(`${this.base}/tag/push`,{name:e,remote:t}))}getSettings(){return this.http.get(`${this.base}/settings`)}saveSettings(e){return this.http.post(`${this.base}/settings`,e)}getRemotes(){return this.http.get(`${this.base}/remotes`)}saveIdentity(e){return this.http.post(`${this.base}/identity`,e)}removeIdentity(){return this.http.delete(`${this.base}/identity`)}saveRemote(e){return this.http.post(`${this.base}/remotes`,e)}removeRemote(e){return this.http.delete(`${this.base}/remotes/${encodeURIComponent(e)}`)}createPr(e){return this.mutate(()=>this.http.post(`${this.base}/azure-devops/pullrequest`,e))}searchReviewers(e){return this.http.get(`${this.base}/azure-devops/reviewers`,{params:new dt().set("query",e)}).pipe(qe(t=>t.reviewers))}searchWorkItems(e){return this.http.get(`${this.base}/azure-devops/workitems`,{params:new dt().set("query",e)}).pipe(qe(t=>t.workItems))}getPrTags(){return this.http.get(`${this.base}/azure-devops/tags`).pipe(qe(e=>e.tags.map(t=>({name:t}))))}getAzureMe(){return this.http.get(`${this.base}/azure-devops/me`)}getMyPullRequests(e="active"){let t=new dt().set("status",e);return this.http.get(`${this.base}/azure-devops/pullrequests`,{params:t}).pipe(qe(i=>i.pullRequests))}getPrDetail(e){return this.http.get(`${this.base}/azure-devops/pullrequests/${e}`)}updatePr(e,t){return this.mutate(()=>this.http.patch(`${this.base}/azure-devops/pullrequests/${e}`,t))}votePr(e,t){return this.mutate(()=>this.http.post(`${this.base}/azure-devops/pullrequests/${e}/vote`,{vote:t}))}updatePrReviewer(e,t){return this.mutate(()=>this.http.post(`${this.base}/azure-devops/pullrequests/${e}/reviewers`,t))}setPrAutoComplete(e,t,i){return this.mutate(()=>this.http.post(`${this.base}/azure-devops/pullrequests/${e}/autocomplete`,G({enabled:t},i)))}completePr(e,t){return this.mutate(()=>this.http.post(`${this.base}/azure-devops/pullrequests/${e}/complete`,t??{}))}getPrThreads(e){return this.http.get(`${this.base}/azure-devops/pullrequests/${e}/threads`).pipe(qe(t=>t.threads))}addPrComment(e,t){return this.mutate(()=>this.http.post(`${this.base}/azure-devops/pullrequests/${e}/threads`,t))}setPrThreadStatus(e,t,i){return this.mutate(()=>this.http.post(`${this.base}/azure-devops/pullrequests/${e}/threads/${t}/status`,{status:i}))}getPrChanges(e){return this.http.get(`${this.base}/azure-devops/pullrequests/${e}/changes`).pipe(qe(t=>t.files))}getPrFileDiff(e,t){let i=new dt().set("path",t.path).set("oldPath",t.oldPath||"").set("changeType",t.changeType);return this.http.get(`${this.base}/azure-devops/pullrequests/${e}/file-diff`,{params:i})}static \u0275fac=function(t){return new(t||n)};static \u0275prov=re({token:n,factory:n.\u0275fac,providedIn:"root"})};var In=class n{git=k(mt);inVsCode=typeof window<"u"&&window.parent!==window;diffViewer=x("guito");settingsVersion=x(0);folderRequest=0;folderResolvers=new Map;canPickFolder=this.inVsCode;constructor(){this.inVsCode&&(window.addEventListener("message",e=>{let t=e.data;if(t?.type==="guito/config"&&(t.diffViewer==="guito"||t.diffViewer==="vscode")&&(this.diffViewer.set(t.diffViewer),this.settingsVersion.update(i=>i+1)),t?.type==="guito/folderSelected"&&typeof t.requestId=="number"){let i=this.folderResolvers.get(t.requestId);i&&(this.folderResolvers.delete(t.requestId),i(typeof t.path=="string"&&t.path?t.path:null))}}),this.git.getSettings().subscribe({next:e=>{e.diffViewer&&this.diffViewer.set(e.diffViewer)},error:()=>{}}))}pickFolder(){if(!this.inVsCode)return Promise.resolve(null);let e=++this.folderRequest;return window.parent.postMessage({type:"guito/pickFolder",requestId:e},"*"),new Promise(t=>this.folderResolvers.set(e,t))}openSettings(){return this.inVsCode?(window.parent.postMessage({type:"guito/openSettings"},"*"),!0):!1}canOpenFile(){return this.inVsCode}openFile(e){return this.inVsCode?(window.parent.postMessage({type:"guito/openFile",path:e},"*"),!0):!1}openDiff(e,t,i){if(!this.inVsCode||this.diffViewer()!=="vscode"||e.status==="binary")return!1;let r=e.status==="added"&&!e.oldPath?"EMPTY":t;return window.parent.postMessage({type:"guito/openDiff",path:e.path,oldPath:e.oldPath,status:e.status,originalRef:r,modifiedRef:i},"*"),!0}static \u0275fac=function(t){return new(t||n)};static \u0275prov=re({token:n,factory:n.\u0275fac,providedIn:"root"})};var iM=(n,e)=>n.name.toLowerCase().localeCompare(e.name.toLowerCase()),Gy=n=>n.split("/").pop()??n,rM=(n,e)=>Gy(n.path).toLowerCase().localeCompare(Gy(e.path).toLowerCase());function kc(n,e){let t={name:"",dirs:new Map,files:[],additions:0,deletions:0};for(let o of n){let s=o.path.split("/"),a=t;for(let l of s.slice(0,-1)){let c=a.dirs.get(l);c||(c={name:l,dirs:new Map,files:[],additions:0,deletions:0},a.dirs.set(l,c)),c.additions+=o.additions,c.deletions+=o.deletions,a=c}a.files.push(o)}let i=[],r=(o,s,a)=>{for(let l of[...o.dirs.values()].sort(iM)){let c=s?`${s}/${l.name}`:l.name,h=e.has(c);i.push({kind:"dir",path:c,name:l.name,depth:a,collapsed:h,additions:l.additions,deletions:l.deletions}),h||r(l,c,a+1)}for(let l of[...o.files].sort(rM))i.push({kind:"file",path:l.path,name:l.path.split("/").pop()??l.path,depth:a,file:l})};return r(t,"",0),i}var Pc=class n{loading=null;load(){return this.loading||(this.loading=new Promise((e,t)=>{let i=window;if(i.monaco){e(i.monaco);return}let r=document.createElement("script");r.src="vs/loader.js",r.async=!0,r.onload=()=>{let o=i.require;if(!o){t(new Error("Monaco AMD loader not found."));return}o.config({paths:{vs:"vs"}}),o(["vs/editor/editor.main"],()=>{this.applyTheme(i.monaco),e(i.monaco)})},r.onerror=()=>{this.loading=null,t(new Error("Failed to load the Monaco editor."))},document.head.appendChild(r)})),this.loading}applyTheme(e){e.editor.defineTheme("guito",{base:"vs-dark",inherit:!0,rules:[],colors:{"editor.background":"#1e1e1e","editor.foreground":"#cccccc","editorGutter.background":"#1e1e1e","editorLineNumber.foreground":"#5a5a5a","editorLineNumber.activeForeground":"#cccccc","diffEditor.insertedTextBackground":"#89d18526","diffEditor.removedTextBackground":"#f4877126","diffEditor.insertedLineBackground":"#89d1851a","diffEditor.removedLineBackground":"#f487711a","scrollbarSlider.background":"#4a4a4a80","scrollbarSlider.hoverBackground":"#5a5a5a99","editorWidget.background":"#232323","editorWidget.border":"#3c3c3c","editorSuggestWidget.background":"#232323"}})}static \u0275fac=function(t){return new(t||n)};static \u0275prov=re({token:n,factory:n.\u0275fac,providedIn:"root"})};var oM=["host"];function sM(n,e){if(n&1&&(p(0,"span",6),f(1),m()),n&2){let t=u();d(),Q("+",t.file().additions)}}function aM(n,e){if(n&1&&(p(0,"span",7),f(1),m()),n&2){let t=u();d(),Q("\u2212",t.file().deletions)}}function lM(n,e){n&1&&(F(),U(0,"line",11))}function cM(n,e){n&1&&(F(),U(0,"line",12))}function dM(n,e){n&1&&(p(0,"div",18),f(1,"Loading diff\u2026"),m())}function uM(n,e){if(n&1&&U(0,"app-error-banner",19),n&2){let t=u();I("message",t.error())}}function fM(n,e){n&1&&(p(0,"div",18),f(1,"Binary file not shown."),m())}var pM=0,oo=class n{git=k(mt);monacoService=k(Pc);file=N.required();originalRef=N.required();modifiedRef=N.required();closed=W();host=Vn.required("host");loading=x(!0);error=x("");binary=x(!1);sideBySide=x(!0);destroyed=!1;editor=null;models=[];onEscape(){this.closed.emit()}ngAfterViewInit(){return Wn(this,null,function*(){this.loading.set(!0),this.error.set(""),this.binary.set(!1);try{let e=yield this.monacoService.load();if(this.destroyed)return;let t=this.file(),i=t.status==="added"&&!t.oldPath?"EMPTY":this.originalRef(),[r,o]=yield Promise.all([za(this.git.getFileContent(t.oldPath||t.path,i)),za(this.git.getFileContent(t.path,this.modifiedRef()))]);if(this.destroyed)return;if(r.binary||o.binary){this.binary.set(!0),this.loading.set(!1);return}let s=++pM,a=e.editor.createModel(r.content,void 0,e.Uri.parse(`inmemory://diff/${s}/original/${t.oldPath||t.path}`)),l=e.editor.createModel(o.content,void 0,e.Uri.parse(`inmemory://diff/${s}/modified/${t.path}`));this.models=[a,l],this.editor=e.editor.createDiffEditor(this.host().nativeElement,{theme:"guito",readOnly:!0,originalEditable:!1,renderSideBySide:this.sideBySide(),ignoreTrimWhitespace:!1,automaticLayout:!0,fontSize:12,fontFamily:"ui-monospace, 'Cascadia Code', 'SF Mono', Menlo, Consolas, monospace",minimap:{enabled:!1},scrollBeyondLastLine:!1,renderOverviewRuler:!1,hideUnchangedRegions:{enabled:!0,contextLineCount:3},scrollbar:{verticalScrollbarSize:10,horizontalScrollbarSize:10},padding:{top:8}}),this.editor.setModel({original:a,modified:l}),this.loading.set(!1)}catch{this.error.set("Failed to load the diff."),this.loading.set(!1)}})}ngOnDestroy(){this.destroyed=!0,this.editor?.dispose(),this.editor=null;for(let e of this.models)e.dispose();this.models=[]}toggleLayout(){this.sideBySide.update(e=>!e),this.editor?.updateOptions({renderSideBySide:this.sideBySide()})}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=ce({type:n,selectors:[["app-diff-dialog"]],viewQuery:function(t,i){t&1&&Tn(i.host,oM,5),t&2&&Fn()},hostBindings:function(t,i){t&1&&S("keydown.escape",function(){return i.onEscape()},Ze)},inputs:{file:[1,"file"],originalRef:[1,"originalRef"],modifiedRef:[1,"modifiedRef"]},outputs:{closed:"closed"},decls:25,vars:10,consts:[["host",""],[1,"backdrop",3,"click"],["role","dialog","aria-modal","true",1,"dialog"],[1,"dialog-head"],[1,"path",3,"title"],[1,"counts"],[1,"additions"],[1,"deletions"],["type","button","title","Toggle diff layout",1,"icon-btn",3,"click"],["viewBox","0 0 24 24","aria-hidden","true"],["x","3","y","4","width","18","height","16","rx","2"],["x1","12","y1","4","x2","12","y2","20"],["x1","3","y1","12","x2","21","y2","12"],["type","button","title","Close","aria-label","Close diff",1,"icon-btn",3,"click"],["x1","18","y1","6","x2","6","y2","18"],["x1","6","y1","6","x2","18","y2","18"],[1,"dialog-body"],[1,"editor-host"],[1,"state"],[3,"message"]],template:function(t,i){if(t&1){let r=A();p(0,"div",1),S("click",function(){return y(r),b(i.closed.emit())}),m(),p(1,"div",2)(2,"header",3)(3,"span"),f(4),m(),p(5,"span",4),f(6),m(),p(7,"span",5),T(8,sM,2,1,"span",6),T(9,aM,2,1,"span",7),m(),p(10,"button",8),S("click",function(){return y(r),b(i.toggleLayout())}),F(),p(11,"svg",9),U(12,"rect",10),T(13,lM,1,0,":svg:line",11)(14,cM,1,0,":svg:line",12),m()(),he(),p(15,"button",13),S("click",function(){return y(r),b(i.closed.emit())}),F(),p(16,"svg",9),U(17,"line",14)(18,"line",15),m()()(),he(),p(19,"div",16),U(20,"div",17,0),T(22,dM,2,0,"div",18)(23,uM,1,1,"app-error-banner",19)(24,fM,2,0,"div",18),m()()}t&2&&(d(3),pt("status status-"+i.file().status),d(),O(i.file().status),d(),I("title",i.file().path),d(),O(i.file().path),d(2),M(i.file().additions>0?8:-1),d(),M(i.file().deletions>0?9:-1),d(),fe("aria-label",i.sideBySide()?"Switch to inline view":"Switch to side-by-side view"),d(3),M(i.sideBySide()?13:14),d(9),M(i.loading()?22:i.error()?23:i.binary()?24:-1))},dependencies:[kt],styles:[".backdrop[_ngcontent-%COMP%]{position:fixed;inset:0;background:#0000008c;z-index:200}.dialog[_ngcontent-%COMP%]{position:fixed;top:4vh;left:4vw;right:4vw;bottom:4vh;display:flex;flex-direction:column;background:var(--bg);border:1px solid var(--border);border-radius:8px;box-shadow:0 12px 48px #0009;overflow:hidden;z-index:201}.dialog-head[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;flex:none;height:42px;padding:0 10px;background:var(--bg-alt);border-bottom:1px solid var(--border)}.status[_ngcontent-%COMP%]{flex:none;padding:1px 7px;border-radius:3px;font-size:10px;text-transform:uppercase;letter-spacing:.4px}.status-added[_ngcontent-%COMP%]{background:#89d18526;color:#89d185}.status-deleted[_ngcontent-%COMP%]{background:#f4877126;color:#f48771}.status-modified[_ngcontent-%COMP%]{background:#3794ff26;color:#4fc1ff}.status-renamed[_ngcontent-%COMP%]{background:#c586c026;color:#c586c0}.status-binary[_ngcontent-%COMP%]{background:#ffffff14;color:#9d9d9d}.path[_ngcontent-%COMP%]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--mono);font-size:12px;color:var(--text)}.counts[_ngcontent-%COMP%]{flex:none;display:flex;gap:6px;font-family:var(--mono);font-size:11px}.additions[_ngcontent-%COMP%]{color:#89d185}.deletions[_ngcontent-%COMP%]{color:#f48771}.icon-btn[_ngcontent-%COMP%]{flex:none;width:28px;height:28px;display:inline-flex;align-items:center;justify-content:center;border:none;border-radius:4px;background:transparent;color:var(--text);cursor:pointer}.icon-btn[_ngcontent-%COMP%]:hover{background:var(--bg-hover);color:var(--text-bright)}.icon-btn[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.dialog-body[_ngcontent-%COMP%]{position:relative;flex:1;min-height:0}.editor-host[_ngcontent-%COMP%]{position:absolute;inset:0}.state[_ngcontent-%COMP%]{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:var(--bg);color:var(--text-dim);font-size:13px}"],changeDetection:0})};var hM=(n,e)=>e.path;function mM(n,e){if(n&1&&(p(0,"span",16),f(1,"\u2022"),m(),p(2,"span"),f(3),hi(4,"date"),m(),p(5,"span",16),f(6,"\u2022"),m(),p(7,"code",17),f(8),m()),n&2){let t=u();d(3),O(Jr(4,2,t.commit().date,"d MMM y HH:mm")),d(5),O(t.commit().hash.slice(0,8))}}function gM(n,e){if(n&1&&(p(0,"pre",11),U(1,"app-issue-text",7),m()),n&2){let t=u();d(),I("text",t.body())("linking",t.issueLinking())}}function _M(n,e){n&1&&(p(0,"div",13),f(1,"Loading changes\u2026"),m())}function vM(n,e){if(n&1&&U(0,"app-error-banner",14),n&2){let t=u();I("message",t.error())}}function yM(n,e){n&1&&(p(0,"div",13),f(1,"No changes."),m())}function bM(n,e){n&1&&(F(),U(0,"polyline",23))}function CM(n,e){n&1&&(F(),U(0,"polyline",24))}function xM(n,e){if(n&1&&(p(0,"span",27),f(1),m()),n&2){let t=u(2).$implicit;d(),Q("+",t.additions)}}function wM(n,e){if(n&1&&(p(0,"span",28),f(1),m()),n&2){let t=u(2).$implicit;d(),Q("\u2212",t.deletions)}}function EM(n,e){if(n&1){let t=A();p(0,"button",21),S("click",function(){y(t);let r=u().$implicit,o=u(3);return b(o.toggleDir(r.path))}),F(),p(1,"svg",22),T(2,bM,1,0,":svg:polyline",23)(3,CM,1,0,":svg:polyline",24),m(),he(),p(4,"span",25),f(5),m(),p(6,"span",26),T(7,xM,2,1,"span",27),T(8,wM,2,1,"span",28),m()()}if(n&2){let t=u().$implicit;pe("padding-left",t.depth*14+8,"px"),I("title",t.path),fe("aria-expanded",!t.collapsed),d(2),M(t.collapsed?2:3),d(2),I("title",t.path),d(),O(t.name),d(2),M(t.additions>0?7:-1),d(),M(t.deletions>0?8:-1)}}function DM(n,e){if(n&1&&(p(0,"span",27),f(1),m()),n&2){let t=u(2).$implicit;d(),Q("+",t.file.additions)}}function SM(n,e){if(n&1&&(p(0,"span",28),f(1),m()),n&2){let t=u(2).$implicit;d(),Q("\u2212",t.file.deletions)}}function TM(n,e){if(n&1){let t=A();p(0,"button",29),S("click",function(){y(t);let r=u().$implicit,o=u(3);return b(o.openFile(r.file))}),p(1,"span"),f(2),m(),p(3,"span",30),f(4),m(),p(5,"span",26),T(6,DM,2,1,"span",27),T(7,SM,2,1,"span",28),m(),F(),p(8,"svg",31),U(9,"polyline",32),m()()}if(n&2){let t=u().$implicit;pe("padding-left",t.depth*14+8,"px"),d(),pt("file-status status-"+t.file.status),d(),O(t.file.status),d(),I("title",t.file.path),d(),O(t.name),d(2),M(t.file.additions>0?6:-1),d(),M(t.file.deletions>0?7:-1)}}function MM(n,e){if(n&1&&T(0,EM,9,9,"button",19)(1,TM,10,9,"button",20),n&2){let t=e.$implicit;M(t.kind==="dir"?0:1)}}function IM(n,e){if(n&1&&(p(0,"div",18),X(1,MM,2,1,null,null,hM),m()),n&2){let t=u(2);d(),J(t.rows())}}function kM(n,e){n&1&&T(0,yM,2,0,"div",13)(1,IM,3,0,"div",18),n&2&&M(e.files.length===0?0:1)}function PM(n,e){if(n&1){let t=A();p(0,"app-diff-dialog",33),S("closed",function(){y(t);let r=u();return b(r.dialogFile.set(null))}),m()}if(n&2){let t=u();I("file",e)("originalRef",t.originalRef())("modifiedRef",t.modifiedRef())}}var Oc=class n{git=k(mt);vscode=k(In);commit=N.required();issueLinking=N(null);fileListView=N("flat");closed=W();diff=x(null);loading=x(!1);error=x("");dialogFile=x(null);collapsed=x(new Set);rows=H(()=>{let e=this.diff()?.files??[];return this.fileListView()!=="tree"?e.map(t=>({kind:"file",path:t.path,name:t.path,depth:0,file:t})):kc(e,this.collapsed())});body=x("");bodySub=null;workingHash=pn;isWorking=H(()=>this.commit().hash===this.workingHash);originalRef=H(()=>this.isWorking()?"HEAD":`${this.commit().hash}^`);modifiedRef=H(()=>this.isWorking()?"WORKING":this.commit().hash);constructor(){xe(()=>{this.loadDiff(this.commit().hash),this.loadBody(this.commit())})}ngOnDestroy(){this.bodySub?.unsubscribe()}openFile(e){this.vscode.openDiff(e,this.originalRef(),this.modifiedRef())||this.dialogFile.set(e)}toggleDir(e){this.collapsed.update(t=>{let i=new Set(t);return i.has(e)?i.delete(e):i.add(e),i})}loadBody(e){if(this.bodySub?.unsubscribe(),this.body.set(""),e.body!==void 0){this.body.set(e.body);return}this.bodySub=this.git.getCommitDetail(e.hash).subscribe({next:t=>this.body.set(t.body??""),error:()=>this.body.set("")})}loadDiff(e){if(this.loading.set(!0),this.error.set(""),this.diff.set(null),this.dialogFile.set(null),e===pn){this.git.getWorkingChanges().subscribe({next:t=>{this.loading.set(!1),this.diff.set({hash:pn,files:t.files})},error:()=>{this.loading.set(!1),this.error.set("Failed to load the working changes.")}});return}this.git.getCommitDiff(e).subscribe({next:t=>{this.loading.set(!1),this.diff.set(t)},error:()=>{this.loading.set(!1),this.error.set("Failed to load the commit diff.")}})}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=ce({type:n,selectors:[["app-commit-detail"]],inputs:{commit:[1,"commit"],issueLinking:[1,"issueLinking"],fileListView:[1,"fileListView"]},outputs:{closed:"closed"},decls:19,vars:9,consts:[[1,"detail"],[1,"detail-head"],["title","Close",1,"close-btn",3,"click"],["viewBox","0 0 24 24","aria-hidden","true"],["x1","18","y1","6","x2","6","y2","18"],["x1","6","y1","6","x2","18","y2","18"],[1,"subject"],[3,"text","linking"],[1,"meta"],[3,"name","email"],[1,"author"],[1,"body"],[1,"detail-body"],[1,"state"],[3,"message"],[3,"file","originalRef","modifiedRef"],[1,"separator"],[1,"hash"],[1,"file-list"],["type","button",1,"file-row","dir-row",3,"title","paddingLeft"],["type","button",1,"file-row",3,"paddingLeft"],["type","button",1,"file-row","dir-row",3,"click","title"],["viewBox","0 0 24 24","aria-hidden","true",1,"chevron","dir-chevron"],["points","9 6 15 12 9 18"],["points","6 9 12 15 18 9"],[1,"file-path","dir-name",3,"title"],[1,"file-counts"],[1,"additions"],[1,"deletions"],["type","button",1,"file-row",3,"click"],[1,"file-path",3,"title"],["viewBox","0 0 24 24","aria-hidden","true",1,"chevron"],["points","9 18 15 12 9 6"],[3,"closed","file","originalRef","modifiedRef"]],template:function(t,i){if(t&1&&(p(0,"aside",0)(1,"header",1)(2,"button",2),S("click",function(){return i.closed.emit()}),F(),p(3,"svg",3),U(4,"line",4)(5,"line",5),m()(),he(),p(6,"h2",6),U(7,"app-issue-text",7),m(),p(8,"div",8),U(9,"app-author-avatar",9),p(10,"span",10),f(11),m(),T(12,mM,9,5),m(),T(13,gM,2,2,"pre",11),m(),p(14,"div",12),T(15,_M,2,0,"div",13)(16,vM,1,1,"app-error-banner",14)(17,kM,2,1),m()(),T(18,PM,1,3,"app-diff-dialog",15)),t&2){let r,o;d(7),I("text",i.commit().message)("linking",i.issueLinking()),d(2),I("name",i.commit().author_name)("email",i.commit().author_email),d(2),O(i.commit().author_name),d(),M(i.isWorking()?-1:12),d(),M(i.body().trim()?13:-1),d(2),M(i.loading()?15:i.error()?16:(r=i.diff())?17:-1,r),d(3),M((o=i.dialogFile())?18:-1,o)}},dependencies:[kt,Mn,oo,ro,Ps],styles:["[_nghost-%COMP%]{display:flex;flex:none;flex-direction:column;width:480px;min-height:0}.detail[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;height:100%;flex:1;min-height:0;background:var(--bg-alt);border-left:1px solid var(--border)}.file-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex:1;min-height:0;padding:6px;gap:2px;overflow-y:auto}.file-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;width:100%;padding:6px 8px;border:none;border-radius:4px;background:transparent;color:var(--text);font-size:12px;font-family:inherit;text-align:left;cursor:pointer}.file-row[_ngcontent-%COMP%]:hover{background:var(--bg-hover)}.chevron[_ngcontent-%COMP%]{flex:none;width:13px;height:13px;fill:none;stroke:var(--text-dim);stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.dir-row[_ngcontent-%COMP%] .chevron[_ngcontent-%COMP%]{width:11px;height:11px}.dir-name[_ngcontent-%COMP%]{font-weight:600}.file-row[_ngcontent-%COMP%]:hover .chevron[_ngcontent-%COMP%]{stroke:var(--accent)}.detail-head[_ngcontent-%COMP%]{flex:none;padding:14px 16px 12px;border-bottom:1px solid var(--border);position:relative}.close-btn[_ngcontent-%COMP%]{position:absolute;top:10px;right:10px;width:26px;height:26px;display:inline-flex;align-items:center;justify-content:center;border:none;border-radius:4px;background:transparent;color:var(--text);cursor:pointer}.close-btn[_ngcontent-%COMP%]:hover{background:var(--bg-hover);color:var(--text-bright)}.close-btn[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}.subject[_ngcontent-%COMP%]{margin:0 30px 10px 0;font-size:14px;font-weight:600;color:var(--text-bright);word-break:break-word}.meta[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;flex-wrap:wrap;color:var(--text-dim);font-size:12px}.avatar[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:50%;color:#1e1e1e;font-size:10px;font-weight:700}.author[_ngcontent-%COMP%]{color:var(--text)}.hash[_ngcontent-%COMP%]{font-family:var(--mono);color:var(--accent);background:#3794ff1a;padding:1px 6px;border-radius:3px}.body[_ngcontent-%COMP%]{margin:10px 0 0;padding:8px 10px;background:#ffffff0a;border-radius:4px;font-size:12px;font-family:inherit;color:var(--text);white-space:pre-wrap;word-break:break-word;max-height:160px;overflow-y:auto}.detail-body[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden}.state[_ngcontent-%COMP%]{padding:24px;text-align:center;color:var(--text-dim)}.file-status[_ngcontent-%COMP%]{flex:none;padding:0 6px;border-radius:3px;font-size:10px;text-transform:uppercase;letter-spacing:.4px}.status-added[_ngcontent-%COMP%]{background:#89d18526;color:#89d185}.status-deleted[_ngcontent-%COMP%]{background:#f4877126;color:#f48771}.status-modified[_ngcontent-%COMP%]{background:#3794ff26;color:#4fc1ff}.status-renamed[_ngcontent-%COMP%]{background:#c586c026;color:#c586c0}.status-binary[_ngcontent-%COMP%]{background:#ffffff14;color:#9d9d9d}.file-path[_ngcontent-%COMP%]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--mono);font-size:12px;color:var(--text)}.file-counts[_ngcontent-%COMP%]{flex:none;font-family:var(--mono);font-size:11px}.additions[_ngcontent-%COMP%]{color:#89d185}.deletions[_ngcontent-%COMP%]{color:#f48771}.binary[_ngcontent-%COMP%]{padding:12px;color:var(--text-dim);font-size:12px}"],changeDetection:0})};function js(n,e=0){return OM(n)?Number(n):arguments.length===2?e:0}function OM(n){return!isNaN(parseFloat(n))&&!isNaN(Number(n))}function Wy(n){return n instanceof cn?n.nativeElement:n}var Ch;try{Ch=typeof Intl<"u"&&Intl.v8BreakIterator}catch{Ch=!1}var Rc=(()=>{class n{_platformId=k(er);isBrowser=this._platformId?by(this._platformId):typeof document=="object"&&!!document;EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent);TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent);BLINK=this.isBrowser&&!!(window.chrome||Ch)&&typeof CSS<"u"&&!this.EDGE&&!this.TRIDENT;WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT;IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window);FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent);ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT;SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT;constructor(){}static \u0275fac=function(i){return new(i||n)};static \u0275prov=re({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var RM=new ee("cdk-dir-doc",{providedIn:"root",factory:NM});function NM(){return k(lt)}var AM=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;function LM(n){let e=n?.toLowerCase()||"";return e==="auto"&&typeof navigator<"u"&&navigator?.language?AM.test(navigator.language)?"rtl":"ltr":e==="rtl"?"rtl":"ltr"}var qy=(()=>{class n{get value(){return this.valueSignal()}valueSignal=x("ltr");change=new ln;constructor(){let t=k(RM,{optional:!0});if(t){let i=t.body?t.body.dir:null,r=t.documentElement?t.documentElement.dir:null;this.valueSignal.set(LM(i||r||"ltr"))}}ngOnDestroy(){this.change.complete()}static \u0275fac=function(i){return new(i||n)};static \u0275prov=re({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var hn=(function(n){return n[n.NORMAL=0]="NORMAL",n[n.NEGATED=1]="NEGATED",n[n.INVERTED=2]="INVERTED",n})(hn||{}),Nc,sr;function Zy(){if(sr==null){if(typeof document!="object"||!document||typeof Element!="function"||!Element)return sr=!1,sr;if(document.documentElement?.style&&"scrollBehavior"in document.documentElement.style)sr=!0;else{let n=Element.prototype.scrollTo;n?sr=!/\{\s*\[native code\]\s*\}/.test(n.toString()):sr=!1}}return sr}function so(){if(typeof document!="object"||!document)return hn.NORMAL;if(Nc==null){let n=document.createElement("div"),e=n.style;n.dir="rtl",e.width="1px",e.overflow="auto",e.visibility="hidden",e.pointerEvents="none",e.position="absolute";let t=document.createElement("div"),i=t.style;i.width="2px",i.height="1px",n.appendChild(t),document.body.appendChild(n),Nc=hn.NORMAL,n.scrollLeft===0&&(n.scrollLeft=1,Nc=n.scrollLeft===0?hn.NEGATED:hn.INVERTED),n.remove()}return Nc}var Ac=class{};function Yy(n){return n&&typeof n.connect=="function"&&!(n instanceof wo)}var Lc=class extends Ac{_data;constructor(e){super(),this._data=e}connect(){return Io(this._data)?this._data:De(this._data)}disconnect(){}},$s=(function(n){return n[n.REPLACED=0]="REPLACED",n[n.INSERTED=1]="INSERTED",n[n.MOVED=2]="MOVED",n[n.REMOVED=3]="REMOVED",n})($s||{}),xh=new ee("_ViewRepeater"),Fc=class{viewCacheSize=20;_viewCache=[];applyChanges(e,t,i,r,o){e.forEachOperation((s,a,l)=>{let c,h;if(s.previousIndex==null){let _=()=>i(s,a,l);c=this._insertView(_,l,t,r(s)),h=c?$s.INSERTED:$s.REPLACED}else l==null?(this._detachAndCacheView(a,t),h=$s.REMOVED):(c=this._moveView(a,l,t,r(s)),h=$s.MOVED);o&&o({context:c?.context,operation:h,record:s})})}detach(){for(let e of this._viewCache)e.destroy();this._viewCache=[]}_insertView(e,t,i,r){let o=this._insertViewFromCache(t,i);if(o){o.context.$implicit=r;return}let s=e();return i.createEmbeddedView(s.templateRef,s.context,s.index)}_detachAndCacheView(e,t){let i=t.detach(e);this._maybeCacheView(i,t)}_moveView(e,t,i,r){let o=i.get(e);return i.move(o,t),o.context.$implicit=r,o}_maybeCacheView(e,t){if(this._viewCache.length<this.viewCacheSize)this._viewCache.push(e);else{let i=t.indexOf(e);i===-1?e.destroy():t.remove(i)}}_insertViewFromCache(e,t){let i=this._viewCache.pop();return i&&t.insert(i,e),i||null}};var FM=["contentWrapper"],VM=["*"],Xy=new ee("VIRTUAL_SCROLL_STRATEGY"),wh=class{_scrolledIndexChange=new $e;scrolledIndexChange=this._scrolledIndexChange.pipe(Oo());_viewport=null;_itemSize;_minBufferPx;_maxBufferPx;constructor(e,t,i){this._itemSize=e,this._minBufferPx=t,this._maxBufferPx=i}attach(e){this._viewport=e,this._updateTotalContentSize(),this._updateRenderedRange()}detach(){this._scrolledIndexChange.complete(),this._viewport=null}updateItemAndBufferSize(e,t,i){i<t,this._itemSize=e,this._minBufferPx=t,this._maxBufferPx=i,this._updateTotalContentSize(),this._updateRenderedRange()}onContentScrolled(){this._updateRenderedRange()}onDataLengthChanged(){this._updateTotalContentSize(),this._updateRenderedRange()}onContentRendered(){}onRenderedOffsetChanged(){}scrollToIndex(e,t){this._viewport&&this._viewport.scrollToOffset(e*this._itemSize,t)}_updateTotalContentSize(){this._viewport&&this._viewport.setTotalContentSize(this._viewport.getDataLength()*this._itemSize)}_updateRenderedRange(){if(!this._viewport)return;let e=this._viewport.getRenderedRange(),t={start:e.start,end:e.end},i=this._viewport.getViewportSize(),r=this._viewport.getDataLength(),o=this._viewport.measureScrollOffset(),s=this._itemSize>0?o/this._itemSize:0;if(t.end>r){let l=Math.ceil(i/this._itemSize),c=Math.max(0,Math.min(s,r-l));s!=c&&(s=c,o=c*this._itemSize,t.start=Math.floor(s)),t.end=Math.max(0,Math.min(r,t.start+l))}let a=o-t.start*this._itemSize;if(a<this._minBufferPx&&t.start!=0){let l=Math.ceil((this._maxBufferPx-a)/this._itemSize);t.start=Math.max(0,t.start-l),t.end=Math.min(r,Math.ceil(s+(i+this._minBufferPx)/this._itemSize))}else{let l=t.end*this._itemSize-(o+i);if(l<this._minBufferPx&&t.end!=r){let c=Math.ceil((this._maxBufferPx-l)/this._itemSize);c>0&&(t.end=Math.min(r,t.end+c),t.start=Math.max(0,Math.floor(s-this._minBufferPx/this._itemSize)))}}this._viewport.setRenderedRange(t),this._viewport.setRenderedContentOffset(Math.round(this._itemSize*t.start)),this._scrolledIndexChange.next(Math.floor(s))}};function BM(n){return n._scrollStrategy}var Jy=(()=>{class n{get itemSize(){return this._itemSize}set itemSize(t){this._itemSize=js(t)}_itemSize=20;get minBufferPx(){return this._minBufferPx}set minBufferPx(t){this._minBufferPx=js(t)}_minBufferPx=100;get maxBufferPx(){return this._maxBufferPx}set maxBufferPx(t){this._maxBufferPx=js(t)}_maxBufferPx=200;_scrollStrategy=new wh(this.itemSize,this.minBufferPx,this.maxBufferPx);ngOnChanges(){this._scrollStrategy.updateItemAndBufferSize(this.itemSize,this.minBufferPx,this.maxBufferPx)}static \u0275fac=function(i){return new(i||n)};static \u0275dir=fi({type:n,selectors:[["cdk-virtual-scroll-viewport","itemSize",""]],inputs:{itemSize:"itemSize",minBufferPx:"minBufferPx",maxBufferPx:"maxBufferPx"},features:[Cs([{provide:Xy,useFactory:BM,deps:[Rr(()=>n)]}]),ds]})}return n})(),jM=20,$M=(()=>{class n{_ngZone=k(Ie);_platform=k(Rc);_renderer=k(Dn).createRenderer(null,null);_cleanupGlobalListener;constructor(){}_scrolled=new $e;_scrolledCount=0;scrollContainers=new Map;register(t){this.scrollContainers.has(t)||this.scrollContainers.set(t,t.elementScrolled().subscribe(()=>this._scrolled.next(t)))}deregister(t){let i=this.scrollContainers.get(t);i&&(i.unsubscribe(),this.scrollContainers.delete(t))}scrolled(t=jM){return this._platform.isBrowser?new ae(i=>{this._cleanupGlobalListener||(this._cleanupGlobalListener=this._ngZone.runOutsideAngular(()=>this._renderer.listen("document","scroll",()=>this._scrolled.next())));let r=t>0?this._scrolled.pipe(Po(t)).subscribe(i):this._scrolled.subscribe(i);return this._scrolledCount++,()=>{r.unsubscribe(),this._scrolledCount--,this._scrolledCount||(this._cleanupGlobalListener?.(),this._cleanupGlobalListener=void 0)}}):De()}ngOnDestroy(){this._cleanupGlobalListener?.(),this._cleanupGlobalListener=void 0,this.scrollContainers.forEach((t,i)=>this.deregister(i)),this._scrolled.complete()}ancestorScrolled(t,i){let r=this.getAncestorScrollContainers(t);return this.scrolled(i).pipe(ko(o=>!o||r.indexOf(o)>-1))}getAncestorScrollContainers(t){let i=[];return this.scrollContainers.forEach((r,o)=>{this._scrollableContainsElement(o,t)&&i.push(o)}),i}_scrollableContainsElement(t,i){let r=Wy(i),o=t.getElementRef().nativeElement;do if(r==o)return!0;while(r=r.parentElement);return!1}static \u0275fac=function(i){return new(i||n)};static \u0275prov=re({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),eb=(()=>{class n{elementRef=k(cn);scrollDispatcher=k($M);ngZone=k(Ie);dir=k(qy,{optional:!0});_scrollElement=this.elementRef.nativeElement;_destroyed=new $e;_renderer=k(ic);_cleanupScroll;_elementScrolled=new $e;constructor(){}ngOnInit(){this._cleanupScroll=this.ngZone.runOutsideAngular(()=>this._renderer.listen(this._scrollElement,"scroll",t=>this._elementScrolled.next(t))),this.scrollDispatcher.register(this)}ngOnDestroy(){this._cleanupScroll?.(),this._elementScrolled.complete(),this.scrollDispatcher.deregister(this),this._destroyed.next(),this._destroyed.complete()}elementScrolled(){return this._elementScrolled}getElementRef(){return this.elementRef}scrollTo(t){let i=this.elementRef.nativeElement,r=this.dir&&this.dir.value=="rtl";t.left==null&&(t.left=r?t.end:t.start),t.right==null&&(t.right=r?t.start:t.end),t.bottom!=null&&(t.top=i.scrollHeight-i.clientHeight-t.bottom),r&&so()!=hn.NORMAL?(t.left!=null&&(t.right=i.scrollWidth-i.clientWidth-t.left),so()==hn.INVERTED?t.left=t.right:so()==hn.NEGATED&&(t.left=t.right?-t.right:t.right)):t.right!=null&&(t.left=i.scrollWidth-i.clientWidth-t.right),this._applyScrollToOptions(t)}_applyScrollToOptions(t){let i=this.elementRef.nativeElement;Zy()?i.scrollTo(t):(t.top!=null&&(i.scrollTop=t.top),t.left!=null&&(i.scrollLeft=t.left))}measureScrollOffset(t){let i="left",r="right",o=this.elementRef.nativeElement;if(t=="top")return o.scrollTop;if(t=="bottom")return o.scrollHeight-o.clientHeight-o.scrollTop;let s=this.dir&&this.dir.value=="rtl";return t=="start"?t=s?r:i:t=="end"&&(t=s?i:r),s&&so()==hn.INVERTED?t==i?o.scrollWidth-o.clientWidth-o.scrollLeft:o.scrollLeft:s&&so()==hn.NEGATED?t==i?o.scrollLeft+o.scrollWidth-o.clientWidth:-o.scrollLeft:t==i?o.scrollLeft:o.scrollWidth-o.clientWidth-o.scrollLeft}static \u0275fac=function(i){return new(i||n)};static \u0275dir=fi({type:n,selectors:[["","cdk-scrollable",""],["","cdkScrollable",""]]})}return n})(),HM=20,UM=(()=>{class n{_platform=k(Rc);_listeners;_viewportSize;_change=new $e;_document=k(lt);constructor(){let t=k(Ie),i=k(Dn).createRenderer(null,null);t.runOutsideAngular(()=>{if(this._platform.isBrowser){let r=o=>this._change.next(o);this._listeners=[i.listen("window","resize",r),i.listen("window","orientationchange",r)]}this.change().subscribe(()=>this._viewportSize=null)})}ngOnDestroy(){this._listeners?.forEach(t=>t()),this._change.complete()}getViewportSize(){this._viewportSize||this._updateViewportSize();let t={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),t}getViewportRect(){let t=this.getViewportScrollPosition(),{width:i,height:r}=this.getViewportSize();return{top:t.top,left:t.left,bottom:t.top+r,right:t.left+i,height:r,width:i}}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};let t=this._document,i=this._getWindow(),r=t.documentElement,o=r.getBoundingClientRect(),s=-o.top||t.body.scrollTop||i.scrollY||r.scrollTop||0,a=-o.left||t.body.scrollLeft||i.scrollX||r.scrollLeft||0;return{top:s,left:a}}change(t=HM){return t>0?this._change.pipe(Po(t)):this._change}_getWindow(){return this._document.defaultView||window}_updateViewportSize(){let t=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:t.innerWidth,height:t.innerHeight}:{width:0,height:0}}static \u0275fac=function(i){return new(i||n)};static \u0275prov=re({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),Qy=new ee("VIRTUAL_SCROLLABLE"),zM=(()=>{class n extends eb{constructor(){super()}measureViewportSize(t){let i=this.elementRef.nativeElement;return t==="horizontal"?i.clientWidth:i.clientHeight}static \u0275fac=function(i){return new(i||n)};static \u0275dir=fi({type:n,features:[gs]})}return n})();function GM(n,e){return n.start==e.start&&n.end==e.end}var WM=typeof requestAnimationFrame<"u"?Gd:zd,Hs=(()=>{class n extends zM{elementRef=k(cn);_changeDetectorRef=k(fc);_scrollStrategy=k(Xy,{optional:!0});scrollable=k(Qy,{optional:!0});_platform=k(Rc);_detachedSubject=new $e;_renderedRangeSubject=new $e;get orientation(){return this._orientation}set orientation(t){this._orientation!==t&&(this._orientation=t,this._calculateSpacerSize())}_orientation="vertical";appendOnly=!1;scrolledIndexChange=new ae(t=>this._scrollStrategy.scrolledIndexChange.subscribe(i=>Promise.resolve().then(()=>this.ngZone.run(()=>t.next(i)))));_contentWrapper;renderedRangeStream=this._renderedRangeSubject;_totalContentSize=0;_totalContentWidth=x("");_totalContentHeight=x("");_renderedContentTransform;_renderedRange={start:0,end:0};_dataLength=0;_viewportSize=0;_forOf;_renderedContentOffset=0;_renderedContentOffsetNeedsRewrite=!1;_changeDetectionNeeded=x(!1);_runAfterChangeDetection=[];_viewportChanges=Ve.EMPTY;_injector=k(bt);_isDestroyed=!1;constructor(){super();let t=k(UM);this._scrollStrategy,this._viewportChanges=t.change().subscribe(()=>{this.checkViewportSize()}),this.scrollable||(this.elementRef.nativeElement.classList.add("cdk-virtual-scrollable"),this.scrollable=this);let i=xe(()=>{this._changeDetectionNeeded()&&this._doChangeDetection()},{injector:k(nr).injector});k(Je).onDestroy(()=>{i.destroy()})}ngOnInit(){this._platform.isBrowser&&(this.scrollable===this&&super.ngOnInit(),this.ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>{this._measureViewportSize(),this._scrollStrategy.attach(this),this.scrollable.elementScrolled().pipe(Wa(null),Po(0,WM),ki(this._destroyed)).subscribe(()=>this._scrollStrategy.onContentScrolled()),this._markChangeDetectionNeeded()})))}ngOnDestroy(){this.detach(),this._scrollStrategy.detach(),this._renderedRangeSubject.complete(),this._detachedSubject.complete(),this._viewportChanges.unsubscribe(),this._isDestroyed=!0,super.ngOnDestroy()}attach(t){this._forOf,this.ngZone.runOutsideAngular(()=>{this._forOf=t,this._forOf.dataStream.pipe(ki(this._detachedSubject)).subscribe(i=>{let r=i.length;r!==this._dataLength&&(this._dataLength=r,this._scrollStrategy.onDataLengthChanged()),this._doChangeDetection()})})}detach(){this._forOf=null,this._detachedSubject.next()}getDataLength(){return this._dataLength}getViewportSize(){return this._viewportSize}getRenderedRange(){return this._renderedRange}measureBoundingClientRectWithScrollOffset(t){return this.getElementRef().nativeElement.getBoundingClientRect()[t]}setTotalContentSize(t){this._totalContentSize!==t&&(this._totalContentSize=t,this._calculateSpacerSize(),this._markChangeDetectionNeeded())}setRenderedRange(t){GM(this._renderedRange,t)||(this.appendOnly&&(t={start:0,end:Math.max(this._renderedRange.end,t.end)}),this._renderedRangeSubject.next(this._renderedRange=t),this._markChangeDetectionNeeded(()=>this._scrollStrategy.onContentRendered()))}getOffsetToRenderedContentStart(){return this._renderedContentOffsetNeedsRewrite?null:this._renderedContentOffset}setRenderedContentOffset(t,i="to-start"){t=this.appendOnly&&i==="to-start"?0:t;let r=this.dir&&this.dir.value=="rtl",o=this.orientation=="horizontal",s=o?"X":"Y",l=`translate${s}(${Number((o&&r?-1:1)*t)}px)`;this._renderedContentOffset=t,i==="to-end"&&(l+=` translate${s}(-100%)`,this._renderedContentOffsetNeedsRewrite=!0),this._renderedContentTransform!=l&&(this._renderedContentTransform=l,this._markChangeDetectionNeeded(()=>{this._renderedContentOffsetNeedsRewrite?(this._renderedContentOffset-=this.measureRenderedContentSize(),this._renderedContentOffsetNeedsRewrite=!1,this.setRenderedContentOffset(this._renderedContentOffset)):this._scrollStrategy.onRenderedOffsetChanged()}))}scrollToOffset(t,i="auto"){let r={behavior:i};this.orientation==="horizontal"?r.start=t:r.top=t,this.scrollable.scrollTo(r)}scrollToIndex(t,i="auto"){this._scrollStrategy.scrollToIndex(t,i)}measureScrollOffset(t){let i;return this.scrollable==this?i=r=>super.measureScrollOffset(r):i=r=>this.scrollable.measureScrollOffset(r),Math.max(0,i(t??(this.orientation==="horizontal"?"start":"top"))-this.measureViewportOffset())}measureViewportOffset(t){let i,r="left",o="right",s=this.dir?.value=="rtl";t=="start"?i=s?o:r:t=="end"?i=s?r:o:t?i=t:i=this.orientation==="horizontal"?"left":"top";let a=this.scrollable.measureBoundingClientRectWithScrollOffset(i);return this.elementRef.nativeElement.getBoundingClientRect()[i]-a}measureRenderedContentSize(){let t=this._contentWrapper.nativeElement;return this.orientation==="horizontal"?t.offsetWidth:t.offsetHeight}measureRangeSize(t){return this._forOf?this._forOf.measureRangeSize(t,this.orientation):0}checkViewportSize(){this._measureViewportSize(),this._scrollStrategy.onDataLengthChanged()}_measureViewportSize(){this._viewportSize=this.scrollable.measureViewportSize(this.orientation)}_markChangeDetectionNeeded(t){t&&this._runAfterChangeDetection.push(t),!et(this._changeDetectionNeeded)&&this.ngZone.runOutsideAngular(()=>{Promise.resolve().then(()=>{this.ngZone.run(()=>{this._changeDetectionNeeded.set(!0)})})})}_doChangeDetection(){this._isDestroyed||this.ngZone.run(()=>{this._changeDetectorRef.markForCheck(),this._contentWrapper.nativeElement.style.transform=this._renderedContentTransform,dp(()=>{this._changeDetectionNeeded.set(!1);let t=this._runAfterChangeDetection;this._runAfterChangeDetection=[];for(let i of t)i()},{injector:this._injector})})}_calculateSpacerSize(){this._totalContentHeight.set(this.orientation==="horizontal"?"":`${this._totalContentSize}px`),this._totalContentWidth.set(this.orientation==="horizontal"?`${this._totalContentSize}px`:"")}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=ce({type:n,selectors:[["cdk-virtual-scroll-viewport"]],viewQuery:function(i,r){if(i&1&&Rp(FM,7),i&2){let o;Np(o=Ap())&&(r._contentWrapper=o.first)}},hostAttrs:[1,"cdk-virtual-scroll-viewport"],hostVars:4,hostBindings:function(i,r){i&2&&ge("cdk-virtual-scroll-orientation-horizontal",r.orientation==="horizontal")("cdk-virtual-scroll-orientation-vertical",r.orientation!=="horizontal")},inputs:{orientation:"orientation",appendOnly:[2,"appendOnly","appendOnly",ny]},outputs:{scrolledIndexChange:"scrolledIndexChange"},features:[Cs([{provide:eb,useFactory:(t,i)=>t||i,deps:[[new Gf,new zf(Qy)],n]}]),gs],ngContentSelectors:VM,decls:4,vars:4,consts:[["contentWrapper",""],[1,"cdk-virtual-scroll-content-wrapper"],[1,"cdk-virtual-scroll-spacer"]],template:function(i,r){i&1&&(Pp(),v(0,"div",1,0),Op(2),C(),se(3,"div",2)),i&2&&(d(3),pe("width",r._totalContentWidth())("height",r._totalContentHeight()))},styles:[`cdk-virtual-scroll-viewport{display:block;position:relative;transform:translateZ(0)}.cdk-virtual-scrollable{overflow:auto;will-change:scroll-position;contain:strict}.cdk-virtual-scroll-content-wrapper{position:absolute;top:0;left:0;contain:content}[dir=rtl] .cdk-virtual-scroll-content-wrapper{right:0;left:auto}.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper{min-height:100%}.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>dl:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>ol:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>table:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>ul:not([cdkVirtualFor]){padding-left:0;padding-right:0;margin-left:0;margin-right:0;border-left-width:0;border-right-width:0;outline:none}.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper{min-width:100%}.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>dl:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>ol:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>table:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>ul:not([cdkVirtualFor]){padding-top:0;padding-bottom:0;margin-top:0;margin-bottom:0;border-top-width:0;border-bottom-width:0;outline:none}.cdk-virtual-scroll-spacer{height:1px;transform-origin:0 0;flex:0 0 auto}[dir=rtl] .cdk-virtual-scroll-spacer{transform-origin:100% 0}
6
+ `],encapsulation:2,changeDetection:0})}return n})();function Ky(n,e,t){let i=t;if(!i.getBoundingClientRect)return 0;let r=i.getBoundingClientRect();return n==="horizontal"?e==="start"?r.left:r.right:e==="start"?r.top:r.bottom}var tb=(()=>{class n{_viewContainerRef=k(ui);_template=k(li);_differs=k(pc);_viewRepeater=k(xh);_viewport=k(Hs,{skipSelf:!0});viewChange=new $e;_dataSourceChanges=new $e;get cdkVirtualForOf(){return this._cdkVirtualForOf}set cdkVirtualForOf(t){this._cdkVirtualForOf=t,Yy(t)?this._dataSourceChanges.next(t):this._dataSourceChanges.next(new Lc(Io(t)?t:Array.from(t||[])))}_cdkVirtualForOf;get cdkVirtualForTrackBy(){return this._cdkVirtualForTrackBy}set cdkVirtualForTrackBy(t){this._needsUpdate=!0,this._cdkVirtualForTrackBy=t?(i,r)=>t(i+(this._renderedRange?this._renderedRange.start:0),r):void 0}_cdkVirtualForTrackBy;set cdkVirtualForTemplate(t){t&&(this._needsUpdate=!0,this._template=t)}get cdkVirtualForTemplateCacheSize(){return this._viewRepeater.viewCacheSize}set cdkVirtualForTemplateCacheSize(t){this._viewRepeater.viewCacheSize=js(t)}dataStream=this._dataSourceChanges.pipe(Wa(null),Kd(),Tt(([t,i])=>this._changeDataSource(t,i)),Pr(1));_differ=null;_data;_renderedItems;_renderedRange;_needsUpdate=!1;_destroyed=new $e;constructor(){let t=k(Ie);this.dataStream.subscribe(i=>{this._data=i,this._onRenderedDataChange()}),this._viewport.renderedRangeStream.pipe(ki(this._destroyed)).subscribe(i=>{this._renderedRange=i,this.viewChange.observers.length&&t.run(()=>this.viewChange.next(this._renderedRange)),this._onRenderedDataChange()}),this._viewport.attach(this)}measureRangeSize(t,i){if(t.start>=t.end)return 0;t.start<this._renderedRange.start||t.end>this._renderedRange.end;let r=t.start-this._renderedRange.start,o=t.end-t.start,s,a;for(let l=0;l<o;l++){let c=this._viewContainerRef.get(l+r);if(c&&c.rootNodes.length){s=a=c.rootNodes[0];break}}for(let l=o-1;l>-1;l--){let c=this._viewContainerRef.get(l+r);if(c&&c.rootNodes.length){a=c.rootNodes[c.rootNodes.length-1];break}}return s&&a?Ky(i,"end",a)-Ky(i,"start",s):0}ngDoCheck(){if(this._differ&&this._needsUpdate){let t=this._differ.diff(this._renderedItems);t?this._applyChanges(t):this._updateContext(),this._needsUpdate=!1}}ngOnDestroy(){this._viewport.detach(),this._dataSourceChanges.next(void 0),this._dataSourceChanges.complete(),this.viewChange.complete(),this._destroyed.next(),this._destroyed.complete(),this._viewRepeater.detach()}_onRenderedDataChange(){this._renderedRange&&(this._renderedItems=this._data.slice(this._renderedRange.start,this._renderedRange.end),this._differ||(this._differ=this._differs.find(this._renderedItems).create((t,i)=>this.cdkVirtualForTrackBy?this.cdkVirtualForTrackBy(t,i):i)),this._needsUpdate=!0)}_changeDataSource(t,i){return t&&t.disconnect(this),this._needsUpdate=!0,i?i.connect(this):De()}_updateContext(){let t=this._data.length,i=this._viewContainerRef.length;for(;i--;){let r=this._viewContainerRef.get(i);r.context.index=this._renderedRange.start+i,r.context.count=t,this._updateComputedContextProperties(r.context),r.detectChanges()}}_applyChanges(t){this._viewRepeater.applyChanges(t,this._viewContainerRef,(o,s,a)=>this._getEmbeddedViewArgs(o,a),o=>o.item),t.forEachIdentityChange(o=>{let s=this._viewContainerRef.get(o.currentIndex);s.context.$implicit=o.item});let i=this._data.length,r=this._viewContainerRef.length;for(;r--;){let o=this._viewContainerRef.get(r);o.context.index=this._renderedRange.start+r,o.context.count=i,this._updateComputedContextProperties(o.context)}}_updateComputedContextProperties(t){t.first=t.index===0,t.last=t.index===t.count-1,t.even=t.index%2===0,t.odd=!t.even}_getEmbeddedViewArgs(t,i){return{templateRef:this._template,context:{$implicit:t.item,cdkVirtualForOf:this._cdkVirtualForOf,index:-1,count:-1,first:!1,last:!1,odd:!1,even:!1},index:i}}static ngTemplateContextGuard(t,i){return!0}static \u0275fac=function(i){return new(i||n)};static \u0275dir=fi({type:n,selectors:[["","cdkVirtualFor","","cdkVirtualForOf",""]],inputs:{cdkVirtualForOf:"cdkVirtualForOf",cdkVirtualForTrackBy:"cdkVirtualForTrackBy",cdkVirtualForTemplate:"cdkVirtualForTemplate",cdkVirtualForTemplateCacheSize:"cdkVirtualForTemplateCacheSize"},features:[Cs([{provide:xh,useClass:Fc}])]})}return n})();function Vc(n){let e=[],t=new Int32Array(n.length),i=r=>{let o=e.indexOf(r);return o===-1&&(o=e.indexOf(null),o===-1&&(e.push(null),o=e.length-1),e[o]=r),o};for(let r=0;r<n.length;r++){let{hash:o,parents:s}=n[r],a=e.map((c,h)=>c===o?h:-1).filter(c=>c!==-1),l;if(a.length>0){l=a[0];for(let c=1;c<a.length;c++)e[a[c]]=null}else l=i(o);e[l]=s[0]??null;for(let c=1;c<s.length;c++)i(s[c]);t[r]=l}return t}var nb=["#3794ff","#4ec9b0","#d7ba7d","#c586c0","#89d185","#ce9178","#d16969","#569cd6","#b5cea8","#dcdcaa"];function Eh(n){return nb[Math.abs(n)%nb.length]}var qM=2e3,Bc=class n{worker=null;workerBroken=!1;nextId=0;pending=new Map;compute(e){return e.length<=qM?De(Vc(e)):new ae(t=>{let i=this.ensureWorker();if(!i){t.next(Vc(e)),t.complete();return}let r=++this.nextId;this.pending.set(r,{rows:e,subscriber:t});let o=setTimeout(()=>this.fallback(),15e3);try{i.postMessage({id:r,hashes:e.map(s=>s.hash),parents:e.map(s=>[...s.parents])})}catch{this.fallback()}return()=>{clearTimeout(o),this.pending.delete(r)}})}fallback(){this.workerBroken=!0,this.worker?.terminate(),this.worker=null;for(let[e,t]of this.pending)this.pending.delete(e),t.subscriber.next(Vc(t.rows)),t.subscriber.complete()}ensureWorker(){if(this.worker)return this.worker;if(this.workerBroken||typeof Worker>"u")return null;try{return this.worker=new Worker(new URL("worker-O4G7QTZ6.js",import.meta.url),{type:"module"}),this.worker.onmessage=e=>{let t=this.pending.get(e.data.id);if(t){if(!(e.data.lanes instanceof Int32Array)||e.data.lanes.length!==t.rows.length){this.fallback();return}t.subscriber.next(e.data.lanes),t.subscriber.complete()}},this.worker.onerror=()=>this.fallback(),this.worker.onmessageerror=()=>this.fallback(),this.worker}catch{return this.fallback(),null}}ngOnDestroy(){this.worker?.terminate();for(let e of this.pending.values())e.subscriber.complete();this.pending.clear()}static \u0275fac=function(t){return new(t||n)};static \u0275prov=re({token:n,factory:n.\u0275fac,providedIn:"root"})};function ib(n){return n?n.split(",").map(e=>e.trim()).filter(Boolean).map(e=>e.startsWith("HEAD -> ")?{type:"head",name:e.slice(8)}:e==="HEAD"?{type:"head",name:"HEAD"}:e.startsWith("tag: ")?{type:"tag",name:e.slice(5)}:e.includes("/")?{type:"remote",name:e}:{type:"local",name:e}):[]}function Dh(n){let e=n.refs;return e?e==="HEAD"||e.startsWith("HEAD,")||e.startsWith("HEAD ->"):!1}function jc(n,e){if(typeof localStorage>"u")return e;try{let t=localStorage.getItem(n);return t===null?e:JSON.parse(t)}catch{return e}}function $c(n,e){if(!(typeof localStorage>"u"))try{localStorage.setItem(n,JSON.stringify(e))}catch{}}var ZM=(n,e)=>e.index,YM=(n,e)=>e.hash,QM=(n,e)=>e.name;function KM(n,e){if(n&1){let t=A();p(0,"div",20)(1,"span",5),f(2,"Graph"),m(),p(3,"div",6),S("mousedown",function(r){y(t);let o=u();return b(o.startResize("graph",r))}),m()()}if(n&2){let t=u();pe("width",t.graphColumnWidth(),"px")}}function XM(n,e){if(n&1&&(p(0,"div",35),F(),p(1,"svg",36),U(2,"path",37)(3,"path",38),m()()),n&2){let t=u(2);pe("width",t.graphColumnWidth(),"px")}}function JM(n,e){if(n&1&&(p(0,"span",39),f(1),m()),n&2){let t=u();d(),Q("",t.staged.length," staged")}}function eI(n,e){if(n&1&&(p(0,"span",40),f(1),m()),n&2){let t=u();d(),Q("",t.unstaged.length," unstaged")}}function tI(n,e){if(n&1&&(p(0,"span",41),f(1),m()),n&2){let t=u();d(),Q("",t.untracked.length," untracked")}}function nI(n,e){if(n&1&&(T(0,JM,2,1,"span",39),T(1,eI,2,1,"span",40),T(2,tI,2,1,"span",41)),n&2){let t=e;M(t.staged.length>0?0:-1),d(),M(t.unstaged.length>0?1:-1),d(),M(t.untracked.length>0?2:-1)}}function iI(n,e){if(n&1){let t=A();p(0,"div",21),S("click",function(){y(t);let r=u();return b(r.commitClick.emit(r.workingCommit()))})("contextmenu",function(r){y(t);let o=u();return b(o.onWorkingContextMenu(r))}),T(1,XM,4,2,"div",22),p(2,"div",23)(3,"span",24),F(),p(4,"svg",25),U(5,"circle",26)(6,"path",27)(7,"path",28)(8,"path",29)(9,"path",30),m(),he(),p(10,"span",31),f(11,"Uncommitted changes"),m()(),T(12,nI,3,3),m(),p(13,"div",32),f(14,"\u2014"),m(),p(15,"div",33),f(16),m(),p(17,"div",34),f(18,"\u2014"),m()()}if(n&2){let t,i=u();pe("width",i.tableWidth(),"px")("transform",i.horizontalTransform()),ge("selected",i.selectedHash()===i.workingHash),d(),M(i.showGraph()?1:-1),d(),pe("width",i.descriptionWidth(),"px"),d(10),M((t=i.workingChanges())?12:-1,t),d(),pe("width",i.columnWidths().date,"px"),d(2),pe("width",i.columnWidths().author,"px"),d(),O(i.identity().name||"You"),d(),pe("width",i.columnWidths().commit,"px")}}function rI(n,e){if(n&1&&(p(0,"div",35),F(),p(1,"svg",49),U(2,"path",44)(3,"line",45),m()()),n&2){let t=u(2);pe("width",t.graphColumnWidth(),"px")}}function oI(n,e){if(n&1&&(p(0,"mark",50),f(1),m()),n&2){let t=u().$implicit;d(),O(t.text)}}function sI(n,e){if(n&1&&f(0),n&2){let t=u().$implicit;Q(" ",t.text," ")}}function aI(n,e){if(n&1&&T(0,oI,2,1,"mark",50)(1,sI,1,1),n&2){let t=e.$implicit;M(t.match?0:1)}}function lI(n,e){if(n&1&&(U(0,"app-author-avatar",51),f(1)),n&2){let t=u().$implicit;I("name",t.author_name)("email",t.author_email??""),d(),Q(" ",t.author_name," ")}}function cI(n,e){if(n&1){let t=A();p(0,"div",42),S("click",function(){let r=y(t).$implicit,o=u();return b(o.commitClick.emit(o.stashCommit(r)))})("contextmenu",function(r){let o=y(t).$implicit,s=u();return b(s.onStashContextMenu(r,o))}),T(1,rI,4,2,"div",22),p(2,"div",23)(3,"span",43),F(),p(4,"svg",25),U(5,"path",44)(6,"line",45),m(),he(),p(7,"span",31),f(8),m()(),p(9,"span",46),X(10,aI,2,1,null,null,un),m()(),p(12,"div",32),f(13),hi(14,"date"),m(),p(15,"div",47),T(16,lI,2,3),m(),p(17,"div",48),f(18),m()()}if(n&2){let t=e.$implicit,i=u();pe("width",i.tableWidth(),"px")("transform",i.horizontalTransform()),ge("selected",i.selectedHash()===t.hash),d(),M(i.showGraph()?1:-1),d(),pe("width",i.descriptionWidth(),"px"),d(),I("title",i.stashLabel(t)),d(5),O(i.stashLabel(t)),d(),I("title",t.message),d(),J(i.highlight(t.message)),d(2),pe("width",i.columnWidths().date,"px"),d(),Q(" ",t.date?Jr(14,23,t.date,"d MMM y HH:mm"):"\u2014"," "),d(2),pe("width",i.columnWidths().author,"px"),I("title",t.author_name),d(),M(t.author_name?16:-1),d(),pe("width",i.columnWidths().commit,"px"),I("title",t.hash),d(),Q(" ",t.hash.slice(0,8)," ")}}function dI(n,e){if(n&1&&(p(0,"div",13),U(1,"span",52),f(2),m()),n&2){let t=u();d(2),O(t.pendingLabel())}}function uI(n,e){if(n&1&&(F(),U(0,"path",55)),n&2){let t=e.$implicit;fe("d",t.d)("stroke",t.color)}}function fI(n,e){if(n&1&&(F(),U(0,"circle",56)),n&2){let t=u().$implicit;fe("cx",t.x)("cy",t.y)("stroke",t.color)}}function pI(n,e){if(n&1&&(F(),U(0,"circle",57)),n&2){let t=u().$implicit;fe("cx",t.x)("cy",t.y)("fill",t.color)}}function hI(n,e){if(n&1&&T(0,fI,1,3,":svg:circle",56)(1,pI,1,3,":svg:circle",57),n&2){let t=e.$implicit;M(t.isHead?0:1)}}function mI(n,e){if(n&1&&(p(0,"div",53),F(),p(1,"svg",54)(2,"g"),X(3,uI,1,2,":svg:path",55,un),X(5,hI,2,1,null,null,YM),m()()()),n&2){let t=u();pe("width",t.viewportWidth(),"px"),d(),pe("transform",t.horizontalTransform()),fe("width",t.graphWidth()),d(),fe("transform","translate(0 "+-t.scrollTop()+")"),d(),J(t.edges()),d(2),J(t.nodes())}}function gI(n,e){if(n&1&&U(0,"div",35),n&2){let t=u(2);pe("width",t.graphColumnWidth(),"px")}}function _I(n,e){n&1&&(F(),p(0,"svg",25),U(1,"line",63)(2,"circle",64)(3,"circle",65)(4,"path",66),m())}function vI(n,e){n&1&&(F(),p(0,"svg",25),U(1,"path",67)(2,"line",68),m())}function yI(n,e){if(n&1){let t=A();p(0,"span",62),S("contextmenu",function(r){let o=y(t).$implicit,s=u().$implicit,a=u();return b(a.onBadgeContextMenu(r,s.commit,o))}),T(1,_I,5,0,":svg:svg",25)(2,vI,3,0,":svg:svg",25),p(3,"span",31),f(4),m()()}if(n&2){let t=e.$implicit;pt("badge badge-"+t.type),d(),M(t.type==="head"||t.type==="local"?1:t.type==="tag"?2:-1),d(3),O(t.name)}}function bI(n,e){if(n&1&&(p(0,"mark",50),f(1),m()),n&2){let t=u().$implicit;d(),O(t.text)}}function CI(n,e){if(n&1&&f(0),n&2){let t=u().$implicit;Q(" ",t.text," ")}}function xI(n,e){if(n&1&&T(0,bI,2,1,"mark",50)(1,CI,1,1),n&2){let t=e.$implicit;M(t.match?0:1)}}function wI(n,e){if(n&1){let t=A();p(0,"div",58),S("click",function(){let r=y(t).$implicit,o=u();return b(o.commitClick.emit(r.commit))})("contextmenu",function(r){let o=y(t).$implicit,s=u();return b(s.onRowContextMenu(r,o.commit))}),T(1,gI,1,2,"div",22),p(2,"div",23),X(3,yI,5,4,"span",59,QM),p(5,"span",60),U(6,"app-issue-text",61),m()(),p(7,"div",32),f(8),hi(9,"date"),m(),p(10,"div",47),U(11,"app-author-avatar",51),X(12,xI,2,1,null,null,un),m(),p(14,"div",48),f(15),m()()}if(n&2){let t=e.$implicit,i=u();pe("width",i.tableWidth(),"px"),ge("selected",t.commit.hash===i.selectedHash()),d(),M(i.showGraph()?1:-1),d(),pe("width",i.descriptionWidth(),"px"),d(),J(i.badges(t.commit)),d(2),ge("head",i.isHead(t.commit)),d(),I("text",t.commit.message)("search",i.search())("linking",i.issueLinking()),d(),pe("width",i.columnWidths().date,"px"),d(),Q(" ",Jr(9,24,t.commit.date,"d MMM y HH:mm")," "),d(2),pe("width",i.columnWidths().author,"px"),I("title",t.commit.author_name),d(),I("name",t.commit.author_name)("email",t.commit.author_email),d(),J(i.highlight(t.commit.author_name)),d(2),pe("width",i.columnWidths().commit,"px"),I("title",t.commit.hash),d(),Q(" ",t.commit.hash.slice(0,8)," ")}}function EI(n,e){if(n&1&&(p(0,"div",18),f(1),m()),n&2){let t=u();d(),O(t.search().trim()?"No matching commits":"No commits to show")}}function DI(n,e){if(n&1){let t=A();p(0,"div",19)(1,"button",69),S("click",function(){y(t);let r=u();return b(r.onLoadMoreCommits())}),f(2,"Load more commits"),m(),p(3,"button",69),S("click",function(){y(t);let r=u();return b(r.onLoadAllCommits())}),f(4),m()()}if(n&2){let t=u();d(4),Q("Load all (",t.unloaded(),")")}}var Qt=34,Sh=14,rb=10,SI=72,ob=10,ab="guito.columnWidths",sb={graph:0,description:480,date:132,author:150,commit:84},TI={graph:0,description:48,date:48,author:48,commit:48};function MI(){let n=jc(ab,{}),e=G({},sb);for(let t of Object.keys(sb)){let i=n[t];typeof i=="number"&&Number.isFinite(i)&&i>=TI[t]&&(e[t]=i)}return e}var Hc=class n{commits=N.required();selectedHash=N.required();identity=N({name:"",email:""});search=N("");showGraph=N(!0);selectedBranch=N("");showRemote=N(!0);workingChanges=N(null);stashes=N([]);showStashes=N(!0);showTags=N(!0);issueLinking=N(null);unloaded=N(0);historyLoading=N(!1);loadingLabel=N("");scrollToHash=N(null);graphLoading=x(!1);pendingLabel=H(()=>this.loadingLabel()||(this.graphLoading()?"Drawing commit graph...":""));commitClick=W();contextMenu=W();loadMoreRequested=W();loadAllRequested=W();rowHeight=Qt;graph=k(Bc);viewport=Vn(Hs);zone=k(Ie);scrollTop=x(0);scrollLeft=x(0);viewportWidth=x(0);viewportHeight=x(0);constructor(){xe(()=>{let e=this.commits();this.updateGraph(e)}),Qp(()=>{this.graphCommits(),this.columnWidths();let e=this.viewport();e&&et(()=>{e.checkViewportSize(),this.measureViewport()})}),Qp(()=>{this.selectedBranch(),this.showRemote(),this.showGraph(),this.showGraph()||this.search();let e=this.viewport();e&&et(()=>{e.scrollToOffset(0),this.measureViewport()})}),xe(()=>{let e=this.scrollToHash();if(!e)return;let t=this.graphCommits().findIndex(r=>r.commit.hash===e.hash);if(t===-1)return;let i=this.viewport();i&&et(()=>this.scrollToIndex(i,t))}),xe(e=>{let t=this.viewport();if(!t)return;let i=new ResizeObserver(()=>{this.zone.run(()=>{t.checkViewportSize(),this.measureViewport()})});i.observe(t.elementRef.nativeElement);let r=t.elementScrolled().subscribe(()=>{this.zone.run(()=>this.measureViewport())});e(()=>{i.disconnect(),r.unsubscribe()})}),xe(()=>{this.viewportWidth(),this.graphCommits(),et(()=>{let e=this.viewportWidth()-this.graphColumnWidth()-this.columnWidths().date-this.columnWidths().author-this.columnWidths().commit-this.columnWidths().description;this.fillerWidth.set(Math.max(0,e))})})}measureViewport(){let e=this.viewport()?.elementRef.nativeElement;e&&(this.scrollTop.set(e.scrollTop),this.scrollLeft.set(e.scrollLeft),this.viewportWidth.set(e.clientWidth),this.viewportHeight.set(e.clientHeight))}scrollToIndex(e,t){let i=e.elementRef.nativeElement,r=i.clientHeight||this.viewportHeight(),o=Math.max(0,t*Qt-(r-Qt)/2),s=0,a=()=>{e.scrollToOffset(o),this.measureViewport(),Math.abs(i.scrollTop-o)>1&&++s<10&&requestAnimationFrame(a)};a()}columnWidths=x(MI());graphCommits=x([]);graphSubscription=null;updateGraph(e){if(this.graphSubscription?.unsubscribe(),!this.showGraph()){this.graphLoading.set(!1),this.graphCommits.set(e.map(t=>({commit:t,lane:0,parents:[]})));return}this.graphLoading.set(!0),this.graphSubscription=this.graph.compute(e).subscribe(t=>{t.length===e.length&&(this.graphLoading.set(!1),this.graphCommits.set(e.map((i,r)=>({commit:i,lane:t[r],parents:i.parents??[]}))))})}graphWidth=H(()=>{let e=this.graphCommits().reduce((t,i)=>Math.max(t,i.lane),0)+1;return Math.max(SI,rb*2+e*Sh)});graphColumnWidth=H(()=>this.showGraph()?Math.max(this.graphWidth(),this.columnWidths().graph):0);fillerWidth=x(0);descriptionWidth=H(()=>this.columnWidths().description+this.fillerWidth());tableWidth=H(()=>this.graphColumnWidth()+this.columnWidths().date+this.columnWidths().author+this.columnWidths().commit+this.descriptionWidth());horizontalTransform=H(()=>"translateX("+-this.scrollLeft()+"px)");graphHeight=H(()=>this.graphCommits().length*Qt);allEdges=H(()=>{let e=this.graphCommits(),t=new Map,i=new Map;e.forEach((o,s)=>{t.set(o.commit.hash,s),i.set(o.commit.hash,o.lane)});let r=[];for(let o=0;o<e.length;o++){let s=e[o];for(let a of s.parents){let l=t.get(a);r.push({childRow:o,childLane:s.lane,parentRow:l??-1,parentLane:l===void 0?s.lane:i.get(a)??s.lane})}}return r});visibleRange=H(()=>{let e=this.graphCommits().length;if(e===0||this.viewportHeight()===0)return{start:0,end:0};let t=Math.max(0,Math.floor(this.scrollTop()/Qt)-ob),i=Math.min(e,Math.ceil((this.scrollTop()+this.viewportHeight())/Qt)+ob);return{start:t,end:i}});nodes=H(()=>{let{start:e,end:t}=this.visibleRange(),i=[];for(let r=e;r<t;r++){let o=this.graphCommits()[r];i.push({hash:o.commit.hash,x:this.laneX(o.lane),y:r*Qt+Qt/2,color:Eh(o.lane),isHead:Dh(o.commit)})}return i});edges=H(()=>{let e=this.allEdges(),{start:t,end:i}=this.visibleRange(),r=this.graphHeight(),o=[];for(let s of e){let a=s.parentRow,l=Math.min(s.childRow,a<0?s.childRow:a);if((a<0?Number.MAX_SAFE_INTEGER:Math.max(s.childRow,a))<t||l>=i)continue;let h=Eh(s.childLane),_=this.laneX(s.childLane),w=s.childRow*Qt+Qt/2;if(a<0){o.push({d:`M ${_} ${w} L ${_} ${r}`,color:h});continue}let E=this.laneX(s.parentLane),P=a*Qt+Qt/2;if(_===E)o.push({d:`M ${_} ${w} L ${E} ${P}`,color:h});else{let V=(w+P)/2;o.push({d:`M ${_} ${w} C ${_} ${V} ${E} ${V} ${E} ${P}`,color:h})}}return o});hasWorkingChanges=H(()=>{let e=this.workingChanges();return!!e&&e.staged.length+e.unstaged.length+e.untracked.length+e.conflicted.length>0});workingHash=pn;workingCommit=H(()=>({hash:pn,date:new Date().toISOString(),message:"Uncommitted changes",refs:"",body:"",author_name:this.identity().name||"You",author_email:this.identity().email,parents:[]}));visibleStashes=H(()=>this.showStashes()?this.stashes():[]);stashCommit(e){return{hash:e.hash,date:e.date??"",message:e.message,refs:"",author_name:e.author_name??"",author_email:e.author_email??"",parents:[]}}stashLabel(e){return`stash@{${e.index}}`}resizeState=null;startResize(e,t){if(t.preventDefault(),t.stopPropagation(),e==="graph")this.resizeState={column:e,startX:t.clientX,startWidth:this.graphColumnWidth()};else if(e==="description"){let i=this.descriptionWidth();this.columnWidths.update(r=>le(G({},r),{description:i})),this.fillerWidth.set(0),this.resizeState={column:e,startX:t.clientX,startWidth:i}}else this.resizeState={column:e,startX:t.clientX,startWidth:this.columnWidths()[e]};document.addEventListener("mousemove",this.onResizeMove),document.addEventListener("mouseup",this.onResizeEnd)}onResizeMove=e=>{let t=this.resizeState;if(!t)return;let i=e.clientX-t.startX,r=t.column==="graph"?this.graphWidth():48,o=Math.max(r,t.startWidth+i);this.columnWidths.update(s=>le(G({},s),{[t.column]:o}))};onResizeEnd=()=>{this.resizeState&&$c(ab,this.columnWidths()),this.resizeState=null,document.removeEventListener("mousemove",this.onResizeMove),document.removeEventListener("mouseup",this.onResizeEnd)};ngOnDestroy(){this.onResizeEnd(),this.graphSubscription?.unsubscribe()}onRowContextMenu(e,t){e.preventDefault(),e.stopPropagation(),this.contextMenu.emit({x:e.clientX,y:e.clientY,target:{kind:"commit",commit:t}})}onBadgeContextMenu(e,t,i){e.preventDefault(),e.stopPropagation(),this.contextMenu.emit({x:e.clientX,y:e.clientY,target:{kind:i.type==="tag"?"tag":"branch",commit:t,branch:i}})}onWorkingContextMenu(e){e.preventDefault(),e.stopPropagation(),this.contextMenu.emit({x:e.clientX,y:e.clientY,target:{kind:"working"}})}onStashContextMenu(e,t){e.preventDefault(),e.stopPropagation(),this.contextMenu.emit({x:e.clientX,y:e.clientY,target:{kind:"stash",stash:t}})}highlight(e){let t=this.search().trim().toLowerCase();if(!t||!e)return[{text:e,match:!1}];let i=[],r=e.toLowerCase(),o=0,s=r.indexOf(t);for(;s!==-1;)s>o&&i.push({text:e.slice(o,s),match:!1}),i.push({text:e.slice(s,s+t.length),match:!0}),o=s+t.length,s=r.indexOf(t,o);return o<e.length&&i.push({text:e.slice(o),match:!1}),i.length>0?i:[{text:e,match:!1}]}onLoadMoreCommits(){this.loadMoreRequested.emit()}onLoadAllCommits(){this.loadAllRequested.emit()}trackByHash(e,t){return t.commit.hash}badges(e){let t=this.selectedBranch(),i=this.showRemote();return ib(e.refs).filter(r=>r.type==="tag"&&!this.showTags()||r.type==="remote"&&!i?!1:!t||r.type==="tag"?!0:r.name===t)}isHead(e){return Dh(e)}laneX(e){return rb+Sh/2+e*Sh}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=ce({type:n,selectors:[["app-commit-table"]],viewQuery:function(t,i){t&1&&Tn(i.viewport,Hs,5),t&2&&Fn()},inputs:{commits:[1,"commits"],selectedHash:[1,"selectedHash"],identity:[1,"identity"],search:[1,"search"],showGraph:[1,"showGraph"],selectedBranch:[1,"selectedBranch"],showRemote:[1,"showRemote"],workingChanges:[1,"workingChanges"],stashes:[1,"stashes"],showStashes:[1,"showStashes"],showTags:[1,"showTags"],issueLinking:[1,"issueLinking"],unloaded:[1,"unloaded"],historyLoading:[1,"historyLoading"],loadingLabel:[1,"loadingLabel"],scrollToHash:[1,"scrollToHash"]},outputs:{commitClick:"commitClick",contextMenu:"contextMenu",loadMoreRequested:"loadMoreRequested",loadAllRequested:"loadAllRequested"},decls:31,vars:24,consts:[[1,"table"],[1,"pinned-clip"],[1,"table-head"],[1,"head-cell","cell-graph",3,"width"],[1,"head-cell","cell-desc"],[1,"head-label"],[1,"resizer",3,"mousedown"],[1,"head-cell","cell-date"],[1,"head-cell","cell-author"],[1,"head-cell","cell-commit"],[1,"row","working-row",3,"width","transform","selected"],[1,"row","stash-row",3,"width","transform","selected"],[1,"table-body"],["role","status",1,"table-loading"],[1,"list-container"],[1,"graph-clip",3,"width"],[1,"list-viewport",3,"itemSize"],["class","row",3,"width","selected","click","contextmenu",4,"cdkVirtualFor","cdkVirtualForOf","cdkVirtualForTrackBy"],[1,"empty"],[1,"load-actions"],[1,"head-cell","cell-graph"],[1,"row","working-row",3,"click","contextmenu"],[1,"cell","cell-graph",3,"width"],[1,"cell","cell-desc"],[1,"badge","badge-working"],["viewBox","0 0 24 24","aria-hidden","true",1,"badge-icon"],["cx","12","cy","12","r","3"],["d","M12 2v3"],["d","M12 19v3"],["d","M2 12h3"],["d","M19 12h3"],[1,"badge-name"],[1,"cell","cell-date"],[1,"cell","cell-author"],[1,"cell","cell-commit"],[1,"cell","cell-graph"],["viewBox","0 0 24 24","aria-hidden","true",1,"working-icon"],["d","M12 20h9"],["d","M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z"],[1,"count-badge","count-staged"],[1,"count-badge","count-unstaged"],[1,"count-badge","count-untracked"],[1,"row","stash-row",3,"click","contextmenu"],[1,"badge","badge-stash",3,"title"],["d","M21 8v13H3V8M1 3h22v5H1z"],["x1","10","y1","12","x2","14","y2","12"],[1,"message",3,"title"],[1,"cell","cell-author",3,"title"],[1,"cell","cell-commit",3,"title"],["viewBox","0 0 24 24","aria-hidden","true",1,"stash-icon"],[1,"hl"],[3,"name","email"],[1,"spinner"],[1,"graph-clip"],["aria-hidden","true",1,"graph-overlay"],["fill","none","stroke-width","2"],["r","5.5","fill","#1e1e1e","stroke-width","2"],["r","4"],[1,"row",3,"click","contextmenu"],[3,"class"],[1,"message"],[3,"text","search","linking"],[3,"contextmenu"],["x1","6","y1","3","x2","6","y2","15"],["cx","18","cy","6","r","3"],["cx","6","cy","18","r","3"],["d","M18 9a9 9 0 0 1-9 9"],["d","M20.59 13.41l-7.17 7.17a2 2 0 0 1-2.83 0L2 12V2h10l8.59 8.59a2 2 0 0 1 0 2.83z"],["x1","7","y1","7","x2","7.01","y2","7"],[1,"load-more",3,"click"]],template:function(t,i){t&1&&(p(0,"div",0)(1,"div",1)(2,"div",2),T(3,KM,4,2,"div",3),p(4,"div",4)(5,"span",5),f(6,"Description"),m(),p(7,"div",6),S("mousedown",function(o){return i.startResize("description",o)}),m()(),p(8,"div",7)(9,"span",5),f(10,"Date"),m(),p(11,"div",6),S("mousedown",function(o){return i.startResize("date",o)}),m()(),p(12,"div",8)(13,"span",5),f(14,"Author"),m(),p(15,"div",6),S("mousedown",function(o){return i.startResize("author",o)}),m()(),p(16,"div",9)(17,"span",5),f(18,"Commit"),m(),p(19,"div",6),S("mousedown",function(o){return i.startResize("commit",o)}),m()()(),T(20,iI,19,17,"div",10),X(21,cI,19,26,"div",11,ZM),m(),p(23,"div",12),T(24,dI,3,1,"div",13),p(25,"div",14),T(26,mI,7,6,"div",15),p(27,"cdk-virtual-scroll-viewport",16),Kr(28,wI,16,27,"div",17),m(),T(29,EI,2,1,"div",18),m(),T(30,DI,5,1,"div",19),m()()),t&2&&(fe("aria-busy",!!i.pendingLabel()),d(),pe("width",i.viewportWidth(),"px"),d(),pe("width",i.tableWidth(),"px")("transform",i.horizontalTransform()),d(),M(i.showGraph()?3:-1),d(),pe("width",i.descriptionWidth(),"px"),d(4),pe("width",i.columnWidths().date,"px"),d(4),pe("width",i.columnWidths().author,"px"),d(4),pe("width",i.columnWidths().commit,"px"),d(4),M(i.hasWorkingChanges()?20:-1),d(),J(i.visibleStashes()),d(3),M(i.pendingLabel()?24:-1),d(2),M(i.showGraph()?26:-1),d(),I("itemSize",i.rowHeight),d(),I("cdkVirtualForOf",i.graphCommits())("cdkVirtualForTrackBy",i.trackByHash),d(),M(!i.pendingLabel()&&i.graphCommits().length===0?29:-1),d(),M(i.unloaded()>0&&!i.historyLoading()?30:-1))},dependencies:[Mn,Jy,tb,Hs,ro,Ps],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;flex:1;min-width:0;min-height:0}.table[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex:1;width:100%;min-width:0;min-height:0}.table-head[_ngcontent-%COMP%]{display:flex;align-items:center;height:30px;flex:none;border-bottom:1px solid var(--border);background:var(--bg-alt);font-size:12px;font-weight:600;color:var(--text-bright);-webkit-user-select:none;user-select:none}.head-cell[_ngcontent-%COMP%]{position:relative;padding:0 10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:none}.head-cell.cell-desc[_ngcontent-%COMP%]{flex:none;min-width:0}.resizer[_ngcontent-%COMP%]{position:absolute;top:0;right:0;width:6px;height:100%;cursor:col-resize;z-index:1}.resizer[_ngcontent-%COMP%]:hover, .resizer.active[_ngcontent-%COMP%]{background:var(--accent)}.table-body[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex:1;min-height:0}.list-container[_ngcontent-%COMP%]{position:relative;flex:1;min-height:0}.list-viewport[_ngcontent-%COMP%]{position:absolute;inset:0;width:100%;height:100%}.graph-overlay[_ngcontent-%COMP%]{position:absolute;top:0;left:0;height:100%;pointer-events:none}.row[_ngcontent-%COMP%]{display:flex;align-items:center;height:34px;flex:none;cursor:pointer;-webkit-user-select:none;user-select:none}.row[_ngcontent-%COMP%]:hover{background:var(--bg-hover)}.row.selected[_ngcontent-%COMP%]{background:#04395e}.cell[_ngcontent-%COMP%]{padding:0 10px;overflow:hidden;white-space:nowrap;color:var(--text);min-width:0}.cell-graph[_ngcontent-%COMP%]{flex:none}.cell-desc[_ngcontent-%COMP%]{flex:none;display:flex;align-items:center;gap:6px}.cell-date[_ngcontent-%COMP%]{flex:none;text-align:right;color:var(--text-dim)}.cell-author[_ngcontent-%COMP%]{flex:none;text-align:right;text-overflow:ellipsis}.cell-commit[_ngcontent-%COMP%]{flex:none;text-align:right;font-family:var(--mono);color:var(--text-dim)}.working-row[_ngcontent-%COMP%]{flex:none;border-bottom:1px solid var(--border);background:#d7ba7d0a}.working-row[_ngcontent-%COMP%]:hover{background:#d7ba7d14}.working-row.selected[_ngcontent-%COMP%]{background:#4d3a12}.working-icon[_ngcontent-%COMP%]{width:14px;height:14px;margin-left:4px;fill:none;stroke:#d7ba7d;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.badge-working[_ngcontent-%COMP%]{background:#d7ba7d24;color:#d7ba7d;border-color:#d7ba7d66}.stash-row[_ngcontent-%COMP%]{flex:none;background:#c586c00a}.stash-row[_ngcontent-%COMP%]:hover{background:#c586c014}.stash-row.selected[_ngcontent-%COMP%]{background:#4d2a49}.stash-row[_ngcontent-%COMP%]:last-child{border-bottom:1px solid var(--border)}.stash-icon[_ngcontent-%COMP%]{width:14px;height:14px;margin-left:4px;fill:none;stroke:#c586c0;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.badge-stash[_ngcontent-%COMP%]{background:#c586c024;color:#c586c0;border-color:#c586c066}.count-badge[_ngcontent-%COMP%]{flex:none;padding:1px 7px;border-radius:10px;font-size:11px;line-height:16px;white-space:nowrap}.count-staged[_ngcontent-%COMP%]{background:#89d18524;color:#89d185}.count-unstaged[_ngcontent-%COMP%]{background:#f4877124;color:#f48771}.count-untracked[_ngcontent-%COMP%]{background:#3794ff24;color:#4fc1ff}.hl[_ngcontent-%COMP%]{background:#613214;color:#f5c04a;border-radius:2px;padding:0 1px}.message[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;font-weight:400}.message.head[_ngcontent-%COMP%]{font-weight:600;color:var(--text-bright)}.badge[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:4px;flex:none;padding:1px 7px;border-radius:10px;border:1px solid transparent;font-size:11px;line-height:16px;white-space:nowrap}.badge-head[_ngcontent-%COMP%]{background:#0078d4;color:#fff}.badge-local[_ngcontent-%COMP%]{background:#3794ff24;color:#4fc1ff;border-color:#3794ff66}.badge-remote[_ngcontent-%COMP%]{background:#ffffff0f;color:#b8b8b8;border-color:#4a4a4a}.badge-tag[_ngcontent-%COMP%]{background:#d7ba7d1f;color:#d7ba7d;border-color:#d7ba7d66}.badge-icon[_ngcontent-%COMP%]{width:10px;height:10px;fill:none;stroke:currentColor;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}.badge-name[_ngcontent-%COMP%]{max-width:160px;overflow:hidden;text-overflow:ellipsis}.empty[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;height:240px;color:var(--text-dim)}.load-more[_ngcontent-%COMP%]{display:block;width:100%;padding:10px;background:transparent;border:none;border-top:1px solid var(--border);color:var(--accent);cursor:pointer;font-size:12px;font-family:inherit}.load-more[_ngcontent-%COMP%]:hover{background:var(--bg-hover)}.load-actions[_ngcontent-%COMP%]{display:flex;border-top:1px solid var(--border)}.load-actions[_ngcontent-%COMP%] .load-more[_ngcontent-%COMP%]{border-top:none}.load-actions[_ngcontent-%COMP%] .load-more[_ngcontent-%COMP%] + .load-more[_ngcontent-%COMP%]{border-left:1px solid var(--border)}.history-loading[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;padding:10px;border-top:1px solid var(--border);color:var(--text-dim);font-size:12px}.pinned-clip[_ngcontent-%COMP%]{overflow:hidden;flex:none;max-width:100%}.table-body[_ngcontent-%COMP%]{position:relative}.graph-clip[_ngcontent-%COMP%]{position:absolute;inset:0 auto 0 0;overflow:hidden;pointer-events:none;z-index:1}.table-head[_ngcontent-%COMP%], .row[_ngcontent-%COMP%]{box-sizing:border-box}.head-cell.cell-desc[_ngcontent-%COMP%], .cell-desc[_ngcontent-%COMP%]{min-width:280px}.empty[_ngcontent-%COMP%]{position:absolute;inset:0;display:grid;place-items:center;pointer-events:none}.table-loading[_ngcontent-%COMP%]{position:absolute;top:8px;left:50%;transform:translate(-50%);z-index:3;display:flex;align-items:center;gap:8px;padding:8px 12px;border:1px solid var(--border);border-radius:4px;background:var(--bg-alt);color:var(--text);font-size:12px;white-space:nowrap}.spinner[_ngcontent-%COMP%]{width:14px;height:14px;border:2px solid var(--border);border-top-color:var(--accent);border-radius:50%;animation:_ngcontent-%COMP%_spin .8s linear infinite}@keyframes _ngcontent-%COMP%_spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.spinner[_ngcontent-%COMP%]{animation:none}}.cell-author[_ngcontent-%COMP%] app-author-avatar[_ngcontent-%COMP%]{margin-right:6px}"],changeDetection:0})};function II(n,e){n&1&&se(0,"div",2)}function kI(n,e){if(n&1){let t=A();v(0,"button",4),j("click",function(){y(t);let r=u().$implicit,o=u(2);return b(o.onSelect(r))}),f(1),C()}if(n&2){let t=u().$implicit;ge("danger",t.danger),Z("disabled",t.disabled),d(),Q(" ",t.label," ")}}function PI(n,e){if(n&1&&T(0,II,1,0,"div",2)(1,kI,2,4,"button",3),n&2){let t=e.$implicit;M(t.separator?0:1)}}function OI(n,e){if(n&1){let t=A();v(0,"div",0),j("click",function(){y(t);let r=u();return b(r.closed.emit())})("contextmenu",function(r){y(t);let o=u();return r.preventDefault(),b(o.closed.emit())}),C(),v(1,"div",1),X(2,PI,2,1,null,null,un),C()}if(n&2){let t=u();d(),pe("left",t.left(),"px")("top",t.top(),"px"),d(),J(e.items)}}var ao=class n{menu=N.required();select=W();closed=W();left=H(()=>{let e=this.menu();return e?Math.max(4,Math.min(e.x,window.innerWidth-250)):0});top=H(()=>{let e=this.menu();if(!e)return 0;let t=e.items.length*30+12;return Math.max(4,Math.min(e.y,window.innerHeight-t-8))});onEscape(){this.menu()&&this.closed.emit()}onSelect(e){e.disabled||!e.action||(this.select.emit(e.action),this.closed.emit())}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=ce({type:n,selectors:[["app-context-menu"]],hostBindings:function(t,i){t&1&&S("keydown.escape",function(){return i.onEscape()},Ze)},inputs:{menu:[1,"menu"]},outputs:{select:"select",closed:"closed"},decls:1,vars:1,consts:[[1,"backdrop",3,"click","contextmenu"],["role","menu",1,"menu"],[1,"separator"],["role","menuitem",1,"item",3,"danger","disabled"],["role","menuitem",1,"item",3,"click","disabled"]],template:function(t,i){if(t&1&&T(0,OI,4,4),t&2){let r;M((r=i.menu())?0:-1,r)}},styles:[".backdrop[_ngcontent-%COMP%]{position:fixed;inset:0;z-index:300}.menu[_ngcontent-%COMP%]{position:fixed;min-width:210px;max-width:300px;padding:4px;display:flex;flex-direction:column;background:var(--bg-alt);border:1px solid var(--border);border-radius:6px;box-shadow:0 6px 24px #0000008c;z-index:301}.item[_ngcontent-%COMP%]{display:block;width:100%;padding:6px 10px;border:none;border-radius:4px;background:transparent;color:var(--text);font-size:12px;font-family:inherit;text-align:left;cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.item[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--bg-hover);color:var(--text-bright)}.item[_ngcontent-%COMP%]:disabled{color:var(--text-dim);opacity:.55;cursor:default}.item.danger[_ngcontent-%COMP%]{color:var(--red)}.item.danger[_ngcontent-%COMP%]:hover:not(:disabled){background:#f487711f;color:#f48771}.separator[_ngcontent-%COMP%]{height:1px;margin:4px 6px;background:var(--border);flex:none}"],changeDetection:0})};function kn(n){n||(n=k(Je));let e=new ae(t=>{if(n.destroyed){t.next();return}return n.onDestroy(t.next.bind(t))});return t=>t.pipe(ki(e))}function lo(n,e){let t=e?.injector??k(bt),i=new Mi(1),r=xe(()=>{let o;try{o=n()}catch(s){et(()=>i.error(s));return}et(()=>i.next(o))},{injector:t,manualCleanup:!0});return t.get(Je).onDestroy(()=>{r.destroy(),i.complete()}),i.asObservable()}var lb=(n,e)=>e.id;function RI(n,e){if(n&1){let t=A();p(0,"span",2)(1,"span",6),f(2),m(),p(3,"button",7),S("click",function(){let r=y(t).$implicit,o=u();return b(o.remove.emit(r))}),f(4," \xD7 "),m()()}if(n&2){let t=e.$implicit,i=u();d(),I("title",t.description??t.label),d(),O(t.label),d(),I("disabled",i.disabled()),fe("aria-label","Remove "+t.label)}}function NI(n,e){if(n&1&&U(0,"app-error-banner",4),n&2){let t=u();I("message",t.error())}}function AI(n,e){n&1&&(p(0,"li",8),f(1,"Searching..."),m())}function LI(n,e){n&1&&(p(0,"li",8),f(1,"No matches"),m())}function FI(n,e){if(n&1&&(p(0,"span",12),f(1),m()),n&2){let t=u().$implicit;d(),O(t.description)}}function VI(n,e){if(n&1){let t=A();p(0,"li",10),S("mousedown",function(r){let o=y(t).$implicit,s=u(2);return b(s.onSuggestionMouseDown(r,o))}),p(1,"span",11),f(2),m(),T(3,FI,2,1,"span",12),m()}if(n&2){let t=e.$implicit,i=e.$index,r=u(2);ge("active",i===r.highlight()),fe("aria-selected",i===r.highlight()),d(2),O(t.label),d(),M(t.description?3:-1)}}function BI(n,e){if(n&1&&(p(0,"ul",5),T(1,AI,2,0,"li",8),T(2,LI,2,0,"li",8),X(3,VI,4,5,"li",9,lb),m()),n&2){let t=u();d(),M(t.loading()?1:-1),d(),M(!t.loading()&&!t.error()&&!t.suggestions().length?2:-1),d(),J(t.suggestions())}}var co=class n{placeholder=N("");chips=N([]);suggestions=N([]);loading=N(!1);query=N("");disabled=N(!1);allowFreeText=N(!1);error=N("");queryChange=W();select=W();remove=W();open=x(!1);highlight=x(0);onInput(e){this.queryChange.emit(e.target.value),this.open.set(!0),this.highlight.set(0)}onKeydown(e){let t=this.suggestions();if(e.key==="ArrowDown"&&t.length)e.preventDefault(),this.highlight.update(i=>Math.min(i+1,t.length-1));else if(e.key==="ArrowUp"&&t.length)e.preventDefault(),this.highlight.update(i=>Math.max(i-1,0));else if(e.key==="Enter"){e.preventDefault();let i=t[this.highlight()];if(i){this.pick(i);return}let r=this.query().trim();this.allowFreeText()&&r&&(this.open.set(!1),this.select.emit({id:r.toLowerCase(),label:r}))}else e.key==="Escape"&&this.open()&&(e.stopPropagation(),this.open.set(!1))}pick(e){this.open.set(!1),this.select.emit(e)}onSuggestionMouseDown(e,t){e.preventDefault(),this.pick(t)}onBlur(){setTimeout(()=>this.open.set(!1),120)}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=ce({type:n,selectors:[["app-chip-input"]],inputs:{placeholder:[1,"placeholder"],chips:[1,"chips"],suggestions:[1,"suggestions"],loading:[1,"loading"],query:[1,"query"],disabled:[1,"disabled"],allowFreeText:[1,"allowFreeText"],error:[1,"error"]},outputs:{queryChange:"queryChange",select:"select",remove:"remove"},decls:7,vars:5,consts:[[1,"chip-input"],[1,"chip-row"],[1,"chip"],["type","text",1,"chip-query",3,"input","keydown","focus","blur","value","disabled"],[3,"message"],["role","listbox",1,"suggestions"],[1,"chip-label",3,"title"],["type","button",1,"chip-remove",3,"click","disabled"],[1,"suggestion-hint"],["role","option",3,"active"],["role","option",3,"mousedown"],[1,"suggestion-label"],[1,"suggestion-desc"]],template:function(t,i){t&1&&(p(0,"div",0)(1,"div",1),X(2,RI,5,4,"span",2,lb),p(4,"input",3),S("input",function(o){return i.onInput(o)})("keydown",function(o){return i.onKeydown(o)})("focus",function(){return i.open.set(!0)})("blur",function(){return i.onBlur()}),m()(),T(5,NI,1,1,"app-error-banner",4),T(6,BI,5,2,"ul",5),m()),t&2&&(d(2),J(i.chips()),d(2),I("value",i.query())("disabled",i.disabled()),fe("placeholder",i.chips().length?"":i.placeholder()),d(),M(i.error()?5:-1),d(),M(i.open()&&(i.loading()||i.suggestions().length>0||i.query().trim())?6:-1))},dependencies:[kt],styles:[".chip-input[_ngcontent-%COMP%]{position:relative}.chip-row[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:4px;align-items:center;padding:4px 6px;border:1px solid var(--border);border-radius:4px;background:var(--bg)}.chip-row[_ngcontent-%COMP%]:focus-within{border-color:var(--accent)}.chip[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:2px;padding:2px 4px 2px 8px;border-radius:3px;background:var(--bg-hover);font-size:12px;color:var(--text);max-width:100%}.chip-label[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chip-remove[_ngcontent-%COMP%]{border:none;background:transparent;color:var(--text-dim);font-size:13px;line-height:1;cursor:pointer;padding:2px 4px}.chip-remove[_ngcontent-%COMP%]:hover:not(:disabled){color:#f48771}.chip-query[_ngcontent-%COMP%]{flex:1;min-width:90px;border:none;background:transparent;color:var(--text);font-size:12px;font-family:inherit;outline:none;padding:2px}.suggestions[_ngcontent-%COMP%]{position:absolute;top:100%;left:0;right:0;z-index:20;margin:4px 0 0;padding:4px 0;list-style:none;background:var(--bg-alt);border:1px solid var(--border);border-radius:4px;box-shadow:0 6px 18px #00000080;max-height:200px;overflow-y:auto}.suggestions[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2px;padding:6px 10px;font-size:12px;cursor:pointer}.suggestions[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:hover, .suggestions[_ngcontent-%COMP%] li.active[_ngcontent-%COMP%]{background:var(--bg-hover)}.suggestion-hint[_ngcontent-%COMP%]{color:var(--text-dim);cursor:default}.suggestion-label[_ngcontent-%COMP%]{color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.suggestion-desc[_ngcontent-%COMP%]{color:var(--text-dim);font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}"],changeDetection:0})};var Th=(n,e)=>e.name;function jI(n,e){if(n&1&&(p(0,"a",10),f(1," Open in Azure DevOps "),m()),n&2){let t=u();I("href",t.url,tr)}}function $I(n,e){if(n&1&&(p(0,"p",14),f(1),m()),n&2){let t=e.$implicit;d(),O(t)}}function HI(n,e){if(n&1&&X(0,$I,2,1,"p",14,Sn),n&2){let t=u();J(t.warnings)}}function UI(n,e){if(n&1){let t=A();p(0,"div",8)(1,"p",9),f(2),m(),T(3,jI,2,1,"a",10),p(4,"p",11),f(5),m(),T(6,HI,2,0),m(),p(7,"div",12)(8,"button",13),S("click",function(){y(t);let r=u();return b(r.closed.emit())}),f(9,"Close"),m()()}if(n&2){let t=e;d(2),Q("\u2714 Pull Request #",t.id," created"),d(),M(t.url?3:-1),d(2),Q("Source branch: ",t.branch),d(),M(t.warnings!=null&&t.warnings.length?6:-1)}}function zI(n,e){if(n&1&&(p(0,"option",22),f(1),m()),n&2){let t=e.$implicit,i=u(2);I("value",t.name)("selected",i.source()===t.name),d(),Q(" ",t.name," ")}}function GI(n,e){if(n&1&&(p(0,"option",22),f(1),m()),n&2){let t=e.$implicit,i=u(2);I("value",t.name)("selected",i.source()===t.name),d(),Q(" ",t.name," ")}}function WI(n,e){n&1&&(p(0,"p",11),f(1," A new branch (pr/xxxxxx) will be created from the current HEAD and pushed before the pull request is created. "),m())}function qI(n,e){if(n&1&&(p(0,"option",22),f(1),m()),n&2){let t=e.$implicit,i=u(2);I("value",t.name)("selected",i.target()===t.name),d(),Q(" ",t.name," ")}}function ZI(n,e){if(n&1&&(p(0,"p",11),f(1),m()),n&2){let t=u(2);d(),Q('Press Enter to add "',t.tagQuery().trim(),'" as a new tag.')}}function YI(n,e){if(n&1&&U(0,"app-error-banner",30),n&2){let t=u(2);I("message",t.error())}}function QI(n,e){if(n&1){let t=A();p(0,"div",15)(1,"label",16)(2,"span",17),f(3,"Title"),m(),p(4,"input",18),S("input",function(r){y(t);let o=u();return b(o.onTitleInput(r))}),m()(),p(5,"label",16)(6,"span",17),f(7,"Description"),m(),p(8,"textarea",19),S("input",function(r){y(t);let o=u();return b(o.onDescriptionInput(r))}),m()(),p(9,"label",16)(10,"span",17),f(11,"Source branch"),m(),p(12,"select",20),S("change",function(r){y(t);let o=u();return b(o.onSourceChange(r))}),p(13,"optgroup",21)(14,"option",22),f(15," \u2795 Create new branch (random name) "),m()(),p(16,"optgroup",23),X(17,zI,2,3,"option",22,Th),m(),p(19,"optgroup",24),X(20,GI,2,3,"option",22,Th),m()()(),T(22,WI,2,0,"p",11),p(23,"label",16)(24,"span",17),f(25,"Target branch"),m(),p(26,"select",20),S("change",function(r){y(t);let o=u();return b(o.onTargetChange(r))}),X(27,qI,2,3,"option",22,Th),m()(),p(29,"label",25)(30,"input",26),S("change",function(r){y(t);let o=u();return b(o.isDraft.set(r.target.checked))}),m(),f(31," Create as draft "),m(),p(32,"label",16)(33,"span",17),f(34,"Required reviewers"),m(),p(35,"app-chip-input",27),S("queryChange",function(r){y(t);let o=u();return b(o.requiredReviewerQuery.set(r))})("select",function(r){y(t);let o=u();return b(o.addRequiredReviewer(r))})("remove",function(r){y(t);let o=u();return b(o.removeRequiredReviewer(r))}),m()(),p(36,"label",16)(37,"span",17),f(38,"Optional reviewers"),m(),p(39,"app-chip-input",27),S("queryChange",function(r){y(t);let o=u();return b(o.optionalReviewerQuery.set(r))})("select",function(r){y(t);let o=u();return b(o.addOptionalReviewer(r))})("remove",function(r){y(t);let o=u();return b(o.removeOptionalReviewer(r))}),m()(),p(40,"label",16)(41,"span",17),f(42,"Work items"),m(),p(43,"app-chip-input",28),S("queryChange",function(r){y(t);let o=u();return b(o.workItemQuery.set(r))})("select",function(r){y(t);let o=u();return b(o.addWorkItem(r))})("remove",function(r){y(t);let o=u();return b(o.removeWorkItem(r))}),m()(),p(44,"label",16)(45,"span",17),f(46,"Tags"),m(),p(47,"app-chip-input",29),S("queryChange",function(r){y(t);let o=u();return b(o.tagQuery.set(r))})("select",function(r){y(t);let o=u();return b(o.addTag(r))})("remove",function(r){y(t);let o=u();return b(o.removeTag(r))}),m()(),T(48,ZI,2,1,"p",11),T(49,YI,1,1,"app-error-banner",30),m(),p(50,"div",12)(51,"button",31),S("click",function(){y(t);let r=u();return b(r.closed.emit())}),f(52," Cancel "),m(),p(53,"button",32),S("click",function(){y(t);let r=u();return b(r.create())}),f(54),m()()}if(n&2){let t=u();d(4),I("value",t.title()),d(4),I("value",t.description()),d(6),I("value",t.newBranchValue)("selected",t.source()===t.newBranchValue),d(3),J(t.localBranches()),d(3),J(t.remoteBranches()),d(2),M(t.source()===t.newBranchValue?22:-1),d(5),J(t.remoteBranches()),d(3),I("checked",t.isDraft())("disabled",t.creating()),d(5),I("chips",t.requiredReviewers())("suggestions",t.requiredReviewerSuggestions())("loading",t.requiredReviewersLoading())("error",t.requiredReviewersError())("query",t.requiredReviewerQuery()),d(4),I("chips",t.optionalReviewers())("suggestions",t.optionalReviewerSuggestions())("loading",t.optionalReviewersLoading())("error",t.optionalReviewersError())("query",t.optionalReviewerQuery()),d(4),I("chips",t.workItemChips())("suggestions",t.workItemSuggestions())("loading",t.workItemsLoading())("error",t.workItemsError())("query",t.workItemQuery()),d(4),I("chips",t.tagChips())("suggestions",t.filteredTagSuggestions())("loading",t.tagsLoading())("error",t.tagsError())("query",t.tagQuery())("allowFreeText",!0),d(),M(t.tagQuery().trim()&&!t.tagSuggestions().length&&!t.tagsLoading()?48:-1),d(),M(t.error()?49:-1),d(2),I("disabled",t.creating()),d(2),I("disabled",!t.canCreate()),d(),Q(" ",t.creating()?"Creating...":"Create Pull Request"," ")}}var cb="__new__",Uc=class n{git=k(mt);destroyRef=k(Je);branches=N.required();closed=W();created=W();newBranchValue=cb;isDraft=x(!1);title=x("");description=x("");source=x("");target=x("");creating=x(!1);error=x("");result=x(null);requiredReviewers=x([]);optionalReviewers=x([]);workItemChips=x([]);tagChips=x([]);requiredReviewerQuery=x("");optionalReviewerQuery=x("");workItemQuery=x("");tagQuery=x("");requiredReviewerSuggestions=x([]);optionalReviewerSuggestions=x([]);workItemSuggestions=x([]);tagSuggestions=x([]);requiredReviewersLoading=x(!1);optionalReviewersLoading=x(!1);requiredReviewersError=x("");optionalReviewersError=x("");workItemsError=x("");tagsError=x("");workItemsLoading=x(!1);tagsLoading=x(!1);localBranches=H(()=>this.branches().filter(e=>!e.remote));remoteBranches=H(()=>this.branches().filter(e=>e.remote));canCreate=H(()=>!this.creating()&&!!this.target()&&!!this.source());filteredTagSuggestions=H(()=>{let e=this.tagQuery().trim().toLowerCase();return e?this.tagSuggestions().filter(t=>t.label.toLowerCase().includes(e)):this.tagSuggestions()});constructor(){this.bindLookup(this.requiredReviewerQuery,this.requiredReviewerSuggestions,this.requiredReviewersLoading,this.requiredReviewersError,e=>this.git.searchReviewers(e),e=>({id:e.id,label:e.label,description:e.description}),2),this.bindLookup(this.optionalReviewerQuery,this.optionalReviewerSuggestions,this.optionalReviewersLoading,this.optionalReviewersError,e=>this.git.searchReviewers(e),e=>({id:e.id,label:e.label,description:e.description}),2),this.bindLookup(this.workItemQuery,this.workItemSuggestions,this.workItemsLoading,this.workItemsError,e=>this.git.searchWorkItems(e),e=>({id:String(e.id),label:`#${e.id} ${e.title}`,description:e.state}),1)}bindLookup(e,t,i,r,o,s,a){lo(e).pipe(Tt(l=>(t.set([]),r.set(""),i.set(l.trim().length>=a),l.trim().length<a?De([]):new ae(c=>{let h=setTimeout(()=>{c.next(l.trim()),c.complete()},300);return()=>clearTimeout(h)}).pipe(Tt(o),rt(c=>(r.set(c?.error?.error||"Unable to load suggestions. Try searching again."),De([])))))),kn(this.destroyRef)).subscribe(l=>{t.set(l.map(s)),i.set(!1)})}ngOnInit(){let e=this.branches(),t=e.find(s=>s.current&&!s.remote),i=e.find(s=>!s.remote);this.source.set(t?.name??i?.name??""),this.title()||this.title.set(t?.name??"");let r=e.filter(s=>s.remote),o=r.find(s=>s.name==="origin/main")??r.find(s=>s.name==="origin/master");this.target.set(o?.name??r[0]?.name??""),this.tagsLoading.set(!0),this.git.getPrTags().pipe(kn(this.destroyRef)).subscribe({next:s=>{this.tagSuggestions.set(s.map(a=>({id:a.name.toLowerCase(),label:a.name}))),this.tagsLoading.set(!1)},error:s=>{this.tagsError.set(s?.error?.error||"Unable to load tags. You can still add a tag with Enter."),this.tagSuggestions.set([]),this.tagsLoading.set(!1)}})}onEscape(){this.creating()||this.closed.emit()}onBackdropClick(){this.creating()||this.closed.emit()}onTitleInput(e){this.title.set(e.target.value)}onDescriptionInput(e){this.description.set(e.target.value)}onSourceChange(e){this.source.set(e.target.value)}onTargetChange(e){this.target.set(e.target.value)}isReviewerSelected(e){return[...this.requiredReviewers(),...this.optionalReviewers()].some(t=>t.id===e)}addRequiredReviewer(e){this.requiredReviewerQuery.set(""),this.requiredReviewerSuggestions.set([]),this.isReviewerSelected(e.id)||this.requiredReviewers.update(t=>[...t,e])}addOptionalReviewer(e){this.optionalReviewerQuery.set(""),this.optionalReviewerSuggestions.set([]),this.isReviewerSelected(e.id)||this.optionalReviewers.update(t=>[...t,e])}removeRequiredReviewer(e){this.requiredReviewers.update(t=>t.filter(i=>i.id!==e.id))}removeOptionalReviewer(e){this.optionalReviewers.update(t=>t.filter(i=>i.id!==e.id))}addWorkItem(e){this.workItemQuery.set(""),this.workItemSuggestions.set([]),this.workItemChips().some(t=>t.id===e.id)||this.workItemChips.update(t=>[...t,e])}removeWorkItem(e){this.workItemChips.update(t=>t.filter(i=>i.id!==e.id))}addTag(e){this.tagQuery.set(""),this.tagChips().some(t=>t.id===e.id)||this.tagChips.update(t=>[...t,e])}removeTag(e){this.tagChips.update(t=>t.filter(i=>i.id!==e.id))}create(){if(!this.canCreate())return;let e=this.source()===cb;this.creating.set(!0),this.error.set("");let t=[...this.requiredReviewers().map(o=>({id:o.id,required:!0})),...this.optionalReviewers().map(o=>({id:o.id,required:!1}))],i=this.workItemChips().map(o=>Number(o.id)).filter(o=>Number.isInteger(o)&&o>0),r=this.tagChips().map(o=>o.label);this.git.createPr({sourceBranch:e?"":this.source(),targetBranch:this.target(),title:this.title().trim()||void 0,description:this.description().trim()||void 0,newBranch:e,isDraft:this.isDraft(),reviewers:t.length?t:void 0,workItems:i.length?i:void 0,labels:r.length?r:void 0}).subscribe({next:o=>{this.creating.set(!1),this.result.set(o),this.created.emit(o)},error:o=>{this.creating.set(!1),this.error.set(this.errorMessage(o))}})}errorMessage(e){let t=e;return t?.status===400&&t.error?.error?t.error.error:"Failed to communicate with the Guito server."}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=ce({type:n,selectors:[["app-create-pr-dialog"]],hostBindings:function(t,i){t&1&&S("keydown.escape",function(){return i.onEscape()},Ze)},inputs:{branches:[1,"branches"]},outputs:{closed:"closed",created:"created"},decls:11,vars:2,consts:[[1,"backdrop",3,"click"],["role","dialog","aria-modal","true","aria-labelledby","create-pr-title",1,"dialog"],[1,"dialog-head"],["id","create-pr-title",1,"title"],["type","button","title","Close","aria-label","Close dialog",1,"icon-btn",3,"click","disabled"],["viewBox","0 0 24 24","aria-hidden","true"],["x1","18","y1","6","x2","6","y2","18"],["x1","6","y1","6","x2","18","y2","18"],[1,"success"],[1,"success-line"],["target","_blank","rel","noopener",1,"pr-link",3,"href"],[1,"hint"],[1,"actions"],["type","button",1,"btn","btn-primary",3,"click"],[1,"warning"],[1,"form"],[1,"field"],[1,"field-label"],["type","text","placeholder","Pull request title",1,"input",3,"input","value"],["rows","3","placeholder","Optional description",1,"input","description",3,"input","value"],[1,"input",3,"change"],["label","New branch"],[3,"value","selected"],["label","Local branches"],["label","Remote branches"],[1,"draft-option"],["type","checkbox",3,"change","checked","disabled"],["placeholder","Search users by name or email",3,"queryChange","select","remove","chips","suggestions","loading","error","query"],["placeholder","Search by id or title",3,"queryChange","select","remove","chips","suggestions","loading","error","query"],["placeholder","Add tags (Enter to add)",3,"queryChange","select","remove","chips","suggestions","loading","error","query","allowFreeText"],[3,"message"],["type","button",1,"btn",3,"click","disabled"],["type","button",1,"btn","btn-primary",3,"click","disabled"]],template:function(t,i){if(t&1&&(p(0,"div",0),S("click",function(){return i.onBackdropClick()}),m(),p(1,"div",1)(2,"header",2)(3,"h3",3),f(4,"Create Pull Request"),m(),p(5,"button",4),S("click",function(){return i.closed.emit()}),F(),p(6,"svg",5),U(7,"line",6)(8,"line",7),m()()(),T(9,UI,10,4)(10,QI,55,33),m()),t&2){let r;d(5),I("disabled",i.creating()),d(4),M((r=i.result())?9:10,r)}},dependencies:[kt,co],styles:[".backdrop[_ngcontent-%COMP%]{position:fixed;inset:0;background:#00000080;z-index:400}.dialog[_ngcontent-%COMP%]{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);width:min(480px,calc(100vw - 48px));max-height:calc(100vh - 64px);overflow-y:auto;padding:18px;display:flex;flex-direction:column;gap:12px;background:var(--bg-alt);border:1px solid var(--border);border-radius:8px;box-shadow:0 10px 36px #0009;z-index:401}.dialog-head[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:8px}.title[_ngcontent-%COMP%]{margin:0;font-size:14px;font-weight:600;color:var(--text-bright)}.icon-btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;padding:0;border:none;border-radius:4px;background:transparent;color:var(--text-dim);cursor:pointer}.icon-btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--bg-hover);color:var(--text-bright)}.icon-btn[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px}.field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:4px}.field-label[_ngcontent-%COMP%]{font-size:12px;color:var(--text-dim)}.input[_ngcontent-%COMP%]{padding:7px 10px;border:1px solid var(--border);border-radius:4px;background:var(--bg);color:var(--text);font-size:13px;font-family:inherit;outline:none}.input[_ngcontent-%COMP%]:focus{border-color:var(--accent)}textarea.description[_ngcontent-%COMP%]{resize:vertical;min-height:60px}.hint[_ngcontent-%COMP%]{margin:-6px 0 0;font-size:11px;color:var(--text-dim)}.warning[_ngcontent-%COMP%]{margin:0;padding:8px 10px;border:1px solid #8a6c10;border-radius:4px;background:#8a6c1026;color:#dcb67a;font-size:12px;word-break:break-word}.actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:8px}.btn[_ngcontent-%COMP%]{padding:6px 14px;border:1px solid var(--border);border-radius:4px;background:transparent;color:var(--text);font-size:12px;font-family:inherit;cursor:pointer}.btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--bg-hover);color:var(--text-bright)}.btn[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:default}.btn-primary[_ngcontent-%COMP%]{background:var(--accent);border-color:var(--accent);color:#fff}.btn-primary[_ngcontent-%COMP%]:hover:not(:disabled){background:#2b7cd3}.success[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px}.success-line[_ngcontent-%COMP%]{margin:0;font-size:13px;color:#4ec9b0}.pr-link[_ngcontent-%COMP%]{font-size:13px;color:var(--accent);text-decoration:none}.pr-link[_ngcontent-%COMP%]:hover{text-decoration:underline}"],changeDetection:0})};var KI=(n,e)=>e.name;function XI(n,e){n&1&&(v(0,"p"),f(1,"Repository preferences and Git configuration."),C())}function JI(n,e){if(n&1&&(v(0,"div",5),f(1),C()),n&2){let t=u();d(),O(t.error())}}function ek(n,e){if(n&1){let t=A();v(0,"div",29)(1,"strong",30),f(2),C(),v(3,"span",31),f(4),C(),v(5,"span"),f(6,"Fetch"),C(),v(7,"span",32)(8,"button",33),j("click",function(){let r=y(t).$implicit,o=u(2);return b(o.editRemote(r))}),f(9,"Edit"),C(),v(10,"button",34),j("click",function(){let r=y(t).$implicit,o=u(2);return b(o.removeRemote(r.name))}),f(11,"Remove"),C()()(),v(12,"div",35),se(13,"span"),v(14,"span",31),f(15),C(),v(16,"span"),f(17,"Push"),C(),se(18,"span"),C()}if(n&2){let t=e.$implicit;d(2),O(t.name),d(2),O(t.fetchUrl),d(11),O(t.pushUrl)}}function tk(n,e){n&1&&(v(0,"p",19),f(1,"No remotes configured."),C())}function nk(n,e){if(n&1){let t=A();v(0,"div",13)(1,"span"),f(2,"Issue regex"),C(),v(3,"code"),f(4),C(),v(5,"span"),f(6,"Issue URL"),C(),v(7,"code"),f(8),C(),v(9,"span"),f(10,"Scope"),C(),v(11,"strong"),f(12),C()(),v(13,"div",14)(14,"button",15),j("click",function(){y(t);let r=u(2);return b(r.editIssueLinking())}),f(15,"Edit"),C(),v(16,"button",36),j("click",function(){y(t);let r=u(2);return b(r.removeIssueLinking())}),f(17,"Remove"),C()()}if(n&2){let t=e;d(4),O(t.regex),d(4),O(t.url),d(4),O(t.useGlobally?"Global":"This repository")}}function ik(n,e){if(n&1){let t=A();v(0,"div",14)(1,"button",15),j("click",function(){y(t);let r=u(2);return b(r.editIssueLinking())}),f(2,"+ Add Issue Linking"),C()()}}function rk(n,e){if(n&1){let t=A();v(0,"div",6)(1,"fieldset")(2,"legend"),f(3,"Repository"),C(),v(4,"label",7)(5,"span")(6,"strong"),f(7,"Automatically refresh"),C(),v(8,"small"),f(9,"Reload changes made outside Guito."),C()(),v(10,"input",8),j("change",function(r){y(t);let o=u();return b(o.setChecked(r.target,"autoReload"))}),C()(),v(11,"label",7)(12,"span")(13,"strong"),f(14,"Show Git graph"),C(),v(15,"small"),f(16,"Display branch lines beside commit history."),C()(),v(17,"input",8),j("change",function(r){y(t);let o=u();return b(o.setChecked(r.target,"showGraph"))}),C()(),v(18,"label",7)(19,"span")(20,"strong"),f(21,"Show stashes"),C(),v(22,"small"),f(23,"Pin stash entries above commit history."),C()(),v(24,"input",8),j("change",function(r){y(t);let o=u();return b(o.setChecked(r.target,"showStashes"))}),C()(),v(25,"label",7)(26,"span")(27,"strong"),f(28,"Show tags"),C(),v(29,"small"),f(30,"Show tag badges attached to commits."),C()(),v(31,"input",8),j("change",function(r){y(t);let o=u();return b(o.setChecked(r.target,"showTags"))}),C()(),v(32,"label",7)(33,"span")(34,"strong"),f(35,"Show remote branches"),C(),v(36,"small"),f(37,"Include remote branches in the repository panel and branch pills."),C()(),v(38,"input",8),j("change",function(r){y(t);let o=u();return b(o.setChecked(r.target,"showRemoteBranches"))}),C()(),v(39,"label",9)(40,"span")(41,"strong"),f(42,"Search mode"),C(),v(43,"small"),f(44,"Navigate jumps between matches with arrows; filter shows only matching commits."),C()(),v(45,"select",10),j("change",function(r){y(t);let o=u();return b(o.changeSearchMode(r.target))}),v(46,"option",11),f(47,"Navigate matches"),C(),v(48,"option",12),f(49,"Filter matches"),C()()(),v(50,"label",7)(51,"span")(52,"strong"),f(53,"Case-sensitive search"),C(),v(54,"small"),f(55,"Only match commits with the same uppercase and lowercase letters."),C()(),v(56,"input",8),j("change",function(r){y(t);let o=u();return b(o.setChecked(r.target,"searchCaseSensitive"))}),C()()(),v(57,"fieldset")(58,"legend"),f(59,"User details"),C(),v(60,"div",13)(61,"span"),f(62,"User name"),C(),v(63,"strong"),f(64),C(),v(65,"span"),f(66,"User email"),C(),v(67,"strong"),f(68),C()(),v(69,"div",14)(70,"button",15),j("click",function(){y(t);let r=u();return b(r.editIdentity())}),f(71,"Edit"),C(),v(72,"button",16),j("click",function(){y(t);let r=u();return b(r.removeIdentity())}),f(73,"Remove"),C()()(),v(74,"fieldset")(75,"legend"),f(76,"Remote configuration"),C(),v(77,"div",17)(78,"div",18)(79,"strong"),f(80,"Remote"),C(),v(81,"strong"),f(82,"URL"),C(),v(83,"strong"),f(84,"Type"),C(),v(85,"strong"),f(86,"Action"),C()(),X(87,ek,19,3,null,null,KI,!1,tk,2,0,"p",19),C(),v(90,"div",14)(91,"button",15),j("click",function(){y(t);let r=u();return b(r.editRemote())}),f(92,"+ Add Remote"),C()()(),v(93,"fieldset")(94,"legend"),f(95,"Issue linking"),C(),v(96,"p",20),f(97,"Convert issue numbers in commit messages into links to your issue tracking system."),C(),T(98,nk,18,3)(99,ik,3,0,"div",14),C(),v(100,"fieldset")(101,"legend"),f(102,"Changed files"),C(),v(103,"label",21)(104,"input",22),j("change",function(){y(t);let r=u();return b(r.fileListView.set("flat"))}),C(),v(105,"span")(106,"strong"),f(107,"Flat list"),C(),v(108,"small"),f(109,"Show each file with its full path."),C()()(),v(110,"label",21)(111,"input",22),j("change",function(){y(t);let r=u();return b(r.fileListView.set("tree"))}),C(),v(112,"span")(113,"strong"),f(114,"Directory tree"),C(),v(115,"small"),f(116,"Group files into collapsible folders."),C()()()(),v(117,"fieldset")(118,"legend"),f(119,"Azure DevOps"),C(),v(120,"label",23)(121,"span")(122,"strong"),f(123,"Server URL"),C(),v(124,"small"),f(125,"Enables pull request creation for an on-prem Azure DevOps Server."),C()(),v(126,"input",24),j("input",function(r){y(t);let o=u();return b(o.azureDevOpsUrl.set(r.target.value))}),C()(),v(127,"label",25)(128,"span")(129,"strong"),f(130,"Automatic PR branch name"),C(),v(131,"small"),f(132,"Used when creating a new branch for a pull request. Variables: username, randomstring, branch, targetbranch, title, repository, date, time, and timestamp (wrapped as dollar-brace placeholders)."),C()(),v(133,"input",26),j("input",function(r){y(t);let o=u();return b(o.prBranchNameTemplate.set(r.target.value))}),C()()()(),v(134,"footer")(135,"button",27),j("click",function(){y(t);let r=u();return b(r.closed.emit())}),f(136,"Cancel"),C(),v(137,"button",28),j("click",function(){y(t);let r=u();return b(r.save())}),f(138),C()()}if(n&2){let t,i=u();d(10),Z("checked",i.autoReload()),d(7),Z("checked",i.showGraph()),d(7),Z("checked",i.showStashes()),d(7),Z("checked",i.showTags()),d(7),Z("checked",i.showRemoteBranches()),d(7),Z("value",i.searchMode()),d(11),Z("checked",i.searchCaseSensitive()),d(8),O(i.identity().name||"Not configured"),d(4),O(i.identity().email||"Not configured"),d(4),Z("disabled",i.busy()),d(15),J(i.remotes()),d(11),M((t=i.settings().issueLinking)?98:99,t),d(6),Z("checked",i.fileListView()==="flat"),d(7),Z("checked",i.fileListView()==="tree"),d(15),Z("value",i.azureDevOpsUrl()),d(7),Z("value",i.prBranchNameTemplate()),d(2),Z("disabled",i.saving()),d(2),Z("disabled",i.saving()||i.busy()),d(),O(i.saving()?"Saving...":"Save settings")}}function ok(n,e){if(n&1){let t=A();v(0,"label",38)(1,"span")(2,"strong"),f(3,"User name"),C()(),v(4,"input",39),j("input",function(r){y(t);let o=u(2);return b(o.userName.set(r.target.value))}),C()(),v(5,"label",38)(6,"span")(7,"strong"),f(8,"User email"),C()(),v(9,"input",40),j("input",function(r){y(t);let o=u(2);return b(o.userEmail.set(r.target.value))}),C()()}if(n&2){let t=u(2);d(4),Z("value",t.userName()),d(5),Z("value",t.userEmail())}}function sk(n,e){if(n&1){let t=A();v(0,"label",38)(1,"span")(2,"strong"),f(3,"Remote name"),C()(),v(4,"input",41),j("input",function(r){y(t);let o=u(2);return b(o.remoteName.set(r.target.value))}),C()(),v(5,"label",38)(6,"span")(7,"strong"),f(8,"Fetch URL"),C()(),v(9,"input",42),j("input",function(r){y(t);let o=u(2);return b(o.fetchUrl.set(r.target.value))}),C()(),v(10,"label",38)(11,"span")(12,"strong"),f(13,"Push URL"),C(),v(14,"small"),f(15,"Leave blank to use the fetch URL."),C()(),v(16,"input",43),j("input",function(r){y(t);let o=u(2);return b(o.pushUrl.set(r.target.value))}),C()()}if(n&2){let t=u(2);d(4),Z("value",t.remoteName()),d(5),Z("value",t.fetchUrl()),d(7),Z("value",t.pushUrl())}}function ak(n,e){if(n&1){let t=A();v(0,"p",20),f(1,"For example, regex "),v(2,"code"),f(3,"#(\\d+)"),C(),f(4," and URL "),v(5,"code"),f(6,"https://github.com/owner/repo/issues/$1"),C(),f(7," turn #123 into a link."),C(),v(8,"label",38)(9,"span")(10,"strong"),f(11,"Issue regex"),C()(),v(12,"input",44),j("input",function(r){y(t);let o=u(2);return b(o.issueRegex.set(r.target.value))}),C()(),v(13,"label",38)(14,"span")(15,"strong"),f(16,"Issue URL"),C()(),v(17,"input",45),j("input",function(r){y(t);let o=u(2);return b(o.issueUrl.set(r.target.value))}),C()(),v(18,"label",21)(19,"input",8),j("change",function(r){y(t);let o=u(2);return b(o.issueGlobal.set(r.target.checked))}),C(),v(20,"span")(21,"strong"),f(22,"Use globally"),C(),v(23,"small"),f(24,"Apply this rule to repositories without their own rule."),C()()()}if(n&2){let t=u(2);d(12),Z("value",t.issueRegex()),d(5),Z("value",t.issueUrl()),d(2),Z("checked",t.issueGlobal())}}function lk(n,e){if(n&1){let t=A();v(0,"div",37),T(1,ok,10,2)(2,sk,17,3)(3,ak,25,3),C(),v(4,"footer")(5,"button",27),j("click",function(){y(t);let r=u();return b(r.mode.set("main"))}),f(6,"Cancel"),C(),v(7,"button",28),j("click",function(){y(t);let r=u();return b(r.mode()==="identity"?r.saveIdentity():r.mode()==="remote"?r.saveRemote():r.saveIssueLinking())}),f(8),C()()}if(n&2){let t=u();d(),M(t.mode()==="identity"?1:t.mode()==="remote"?2:3),d(4),Z("disabled",t.busy()),d(2),Z("disabled",t.busy()),d(),O(t.busy()?"Saving...":"Save")}}var zc=class n{git=k(mt);settings=N.required();identity=N.required();saving=N(!1);saved=W();settingsUpdated=W();identityChanged=W();repositoryChanged=W();closed=W();azureDevOpsUrl=x("");prBranchNameTemplate=x("pr/${randomstring}");autoReload=x(!0);showGraph=x(!0);showStashes=x(!0);showTags=x(!0);showRemoteBranches=x(!0);fileListView=x("flat");searchMode=x("navigate");searchCaseSensitive=x(!1);remotes=x([]);busy=x(!1);error=x("");mode=x("main");userName=x("");userEmail=x("");originalRemoteName=x("");remoteName=x("");fetchUrl=x("");pushUrl=x("");issueRegex=x("");issueUrl=x("");issueGlobal=x(!1);remotesLoaded=!1;constructor(){xe(()=>{let e=this.settings();this.azureDevOpsUrl.set(e.azureDevOpsUrl??""),this.prBranchNameTemplate.set(e.prBranchNameTemplate??"pr/${randomstring}"),this.autoReload.set(e.autoReload!==!1),this.showGraph.set(e.showGraph!==!1),this.showStashes.set(e.showStashes!==!1),this.showTags.set(e.showTags!==!1),this.showRemoteBranches.set(e.showRemoteBranches!==!1),this.fileListView.set(e.fileListView==="tree"?"tree":"flat"),this.searchMode.set(e.searchMode==="filter"?"filter":"navigate"),this.searchCaseSensitive.set(e.searchCaseSensitive===!0),this.remotesLoaded||(this.remotesLoaded=!0,this.loadRemotes())})}onEscape(){this.saving()||this.busy()||(this.mode()==="main"?this.closed.emit():this.mode.set("main"))}setChecked(e,t){this[t].set(e.checked)}save(){this.saved.emit({azureDevOpsUrl:this.azureDevOpsUrl().trim(),prBranchNameTemplate:this.prBranchNameTemplate().trim(),autoReload:this.autoReload(),showGraph:this.showGraph(),showStashes:this.showStashes(),showTags:this.showTags(),showRemoteBranches:this.showRemoteBranches(),fileListView:this.fileListView(),searchMode:this.searchMode(),searchCaseSensitive:this.searchCaseSensitive()})}changeSearchMode(e){let t=e.value;this.searchMode.set(t==="filter"?"filter":"navigate")}editIdentity(){this.userName.set(this.identity().name),this.userEmail.set(this.identity().email),this.error.set(""),this.mode.set("identity")}saveIdentity(){this.run(this.git.saveIdentity({name:this.userName().trim(),email:this.userEmail().trim()}),e=>{this.identityChanged.emit(e),this.repositoryChanged.emit(),this.mode.set("main")})}removeIdentity(){window.confirm("Remove the repository-specific Git user name and email?")&&this.run(this.git.removeIdentity(),e=>{this.identityChanged.emit(e),this.repositoryChanged.emit()})}editRemote(e){this.originalRemoteName.set(e?.name??""),this.remoteName.set(e?.name??""),this.fetchUrl.set(e?.fetchUrl??""),this.pushUrl.set(e?.pushUrl??""),this.error.set(""),this.mode.set("remote")}saveRemote(){this.run(this.git.saveRemote({originalName:this.originalRemoteName()||void 0,name:this.remoteName().trim(),fetchUrl:this.fetchUrl().trim(),pushUrl:this.pushUrl().trim()}),e=>{this.remotes.set(e),this.repositoryChanged.emit(),this.mode.set("main")})}removeRemote(e){window.confirm(`Remove the remote "${e}" from this repository?`)&&this.run(this.git.removeRemote(e),t=>{this.remotes.set(t),this.repositoryChanged.emit()})}editIssueLinking(){let e=this.settings().issueLinking;this.issueRegex.set(e?.regex??"#(\\d+)"),this.issueUrl.set(e?.url??""),this.issueGlobal.set(e?.useGlobally??!1),this.error.set(""),this.mode.set("issue")}saveIssueLinking(){let e={regex:this.issueRegex().trim(),url:this.issueUrl().trim(),useGlobally:this.issueGlobal()};this.run(this.git.saveSettings({issueLinking:e}),t=>{this.settingsUpdated.emit(t),this.mode.set("main")})}removeIssueLinking(){window.confirm("Remove this issue-linking rule?")&&this.run(this.git.saveSettings({issueLinking:null,issueLinkingGlobal:this.settings().issueLinking?.useGlobally??!1}),e=>this.settingsUpdated.emit(e))}loadRemotes(){this.git.getRemotes().subscribe({next:e=>this.remotes.set(e),error:e=>this.error.set(this.errorMessage(e))})}run(e,t){this.busy()||(this.busy.set(!0),this.error.set(""),e.subscribe({next:i=>{this.busy.set(!1),t(i)},error:i=>{this.busy.set(!1),this.error.set(this.errorMessage(i))}}))}errorMessage(e){return e?.error?.error??e?.message??"The setting could not be saved."}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=ce({type:n,selectors:[["app-settings-dialog"]],hostBindings:function(t,i){t&1&&S("keydown.escape",function(){return i.onEscape()},Ze)},inputs:{settings:[1,"settings"],identity:[1,"identity"],saving:[1,"saving"]},outputs:{saved:"saved",settingsUpdated:"settingsUpdated",identityChanged:"identityChanged",repositoryChanged:"repositoryChanged",closed:"closed"},decls:12,vars:5,consts:[[1,"backdrop",3,"click"],["role","dialog","aria-modal","true","aria-labelledby","settings-title",1,"dialog"],[1,"dialog-header"],["id","settings-title"],["type","button","aria-label","Close settings",1,"close-btn",3,"click","disabled"],["role","alert",1,"dialog-error"],[1,"settings-body"],[1,"setting-row"],["type","checkbox",3,"change","checked"],["for","search-mode",1,"setting-row"],["id","search-mode",3,"change","value"],["value","navigate"],["value","filter"],[1,"detail-grid"],[1,"inline-actions"],["type","button",3,"click"],["type","button",1,"danger-link",3,"click","disabled"],["role","table","aria-label","Git remotes",1,"remote-table"],["role","row",1,"remote-head"],[1,"empty"],[1,"section-help"],[1,"choice"],["type","radio","name","file-view",3,"change","checked"],["for","azure-devops-url",1,"text-setting"],["id","azure-devops-url","type","url","placeholder","https://server/DefaultCollection",3,"input","value"],["for","pr-branch-name-template",1,"text-setting"],["id","pr-branch-name-template","type","text","maxlength","200",3,"input","value"],["type","button",1,"btn",3,"click","disabled"],["type","button",1,"btn","primary",3,"click","disabled"],["role","row",1,"remote-row"],[1,"remote-name"],[1,"remote-url"],[1,"row-actions"],["type","button","title","Edit remote",3,"click"],["type","button","title","Remove remote",1,"danger-link",3,"click"],["role","row",1,"remote-row","push-row"],["type","button",1,"danger-link",3,"click"],[1,"editor-body"],[1,"text-setting"],["aria-label","User name",3,"input","value"],["aria-label","User email","type","email",3,"input","value"],["aria-label","Remote name","placeholder","origin",3,"input","value"],["aria-label","Fetch URL",3,"input","value"],["aria-label","Push URL",3,"input","value"],["aria-label","Issue regex",3,"input","value"],["aria-label","Issue URL","type","url",3,"input","value"]],template:function(t,i){t&1&&(v(0,"div",0),j("click",function(){return!i.saving()&&!i.busy()&&i.closed.emit()}),C(),v(1,"section",1)(2,"header",2)(3,"div")(4,"h2",3),f(5),C(),T(6,XI,2,0,"p"),C(),v(7,"button",4),j("click",function(){return i.closed.emit()}),f(8,"\xD7"),C()(),T(9,JI,2,1,"div",5),T(10,rk,139,19)(11,lk,9,4),C()),t&2&&(d(5),O(i.mode()==="main"?"Settings":i.mode()==="identity"?"Edit User Details":i.mode()==="remote"?i.originalRemoteName()?"Edit Remote":"Add Remote":"Issue Linking"),d(),M(i.mode()==="main"?6:-1),d(),Z("disabled",i.saving()||i.busy()),d(2),M(i.error()?9:-1),d(),M(i.mode()==="main"?10:11))},styles:[".backdrop[_ngcontent-%COMP%]{position:fixed;inset:0;z-index:400;background:#00000094}.dialog[_ngcontent-%COMP%]{position:fixed;z-index:401;top:50%;left:50%;transform:translate(-50%,-50%);width:min(760px,calc(100vw - 32px));max-height:min(820px,calc(100vh - 32px));display:flex;flex-direction:column;overflow:hidden;color:var(--text);background:var(--bg-alt);border:1px solid var(--border);border-radius:8px;box-shadow:0 14px 42px #000000a6}.dialog-header[_ngcontent-%COMP%]{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:20px 22px 16px;border-bottom:1px solid var(--border)}h2[_ngcontent-%COMP%]{margin:0;color:var(--text-bright);font-size:18px}p[_ngcontent-%COMP%]{margin:5px 0 0;color:var(--text-dim);font-size:12px}.close-btn[_ngcontent-%COMP%]{width:28px;height:28px;border:0;border-radius:4px;color:var(--text);background:transparent;font:22px/1 inherit;cursor:pointer}.close-btn[_ngcontent-%COMP%]:hover{color:var(--text-bright);background:var(--bg-hover)}.settings-body[_ngcontent-%COMP%], .editor-body[_ngcontent-%COMP%]{min-height:0;padding:18px 22px;overflow-y:auto}.editor-body[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:10px}.dialog-error[_ngcontent-%COMP%]{margin:12px 22px 0;padding:8px 10px;color:#f48771;background:#f487711a;border:1px solid rgba(244,135,113,.35);border-radius:4px;font-size:12px}fieldset[_ngcontent-%COMP%]{margin:0 0 20px;padding:0;border:0}fieldset[_ngcontent-%COMP%]:last-child{margin-bottom:0}legend[_ngcontent-%COMP%]{width:100%;margin-bottom:6px;padding-bottom:7px;color:var(--text-bright);border-bottom:1px solid var(--border);font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.06em}.setting-row[_ngcontent-%COMP%], .choice[_ngcontent-%COMP%], .text-setting[_ngcontent-%COMP%]{display:flex;align-items:center;gap:14px;padding:10px 4px}.setting-row[_ngcontent-%COMP%]{justify-content:space-between;cursor:pointer}.setting-row[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .choice[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .text-setting[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{display:flex;min-width:0;flex-direction:column;gap:3px}strong[_ngcontent-%COMP%]{color:var(--text-bright);font-size:13px;font-weight:600}small[_ngcontent-%COMP%]{color:var(--text-dim);font-size:11px;line-height:1.4}input[type=checkbox][_ngcontent-%COMP%], input[type=radio][_ngcontent-%COMP%]{accent-color:var(--accent);flex:none}select[_ngcontent-%COMP%]{min-width:150px;padding:6px 28px 6px 9px;color:var(--text);background:var(--bg);border:1px solid var(--border);border-radius:4px;font:inherit;outline:none}select[_ngcontent-%COMP%]:focus{border-color:var(--accent)}.choice[_ngcontent-%COMP%]{align-items:flex-start;cursor:pointer}.choice[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{margin-top:3px}.detail-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:110px minmax(0,1fr);gap:7px 12px;padding:10px 4px;font-size:12px}.detail-grid[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{color:var(--text-dim)}.detail-grid[_ngcontent-%COMP%] strong[_ngcontent-%COMP%], .detail-grid[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{overflow:hidden;color:var(--text);text-overflow:ellipsis;white-space:nowrap}.inline-actions[_ngcontent-%COMP%]{display:flex;justify-content:center;gap:14px;padding:5px 0}.inline-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%], .row-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{padding:4px 7px;color:var(--text);background:transparent;border:0;border-radius:3px;font:inherit;cursor:pointer}.inline-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover, .row-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover{color:var(--text-bright);background:var(--bg-hover)}.danger-link[_ngcontent-%COMP%]{color:#f48771!important}.remote-table[_ngcontent-%COMP%]{min-width:0;padding:8px 4px 2px;font-size:12px}.remote-head[_ngcontent-%COMP%], .remote-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:90px minmax(150px,1fr) 55px 120px;align-items:center;gap:8px;min-height:30px;border-bottom:1px solid var(--border)}.remote-head[_ngcontent-%COMP%], .remote-name[_ngcontent-%COMP%]{color:var(--text-bright)}.remote-url[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.push-row[_ngcontent-%COMP%]{color:var(--text-dim)}.row-actions[_ngcontent-%COMP%]{display:flex}.section-help[_ngcontent-%COMP%]{margin:8px 4px;line-height:1.5}.empty[_ngcontent-%COMP%]{margin:10px 0;color:var(--text-dim);text-align:center}.text-setting[_ngcontent-%COMP%]{align-items:stretch;flex-direction:column;gap:8px}.text-setting[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{box-sizing:border-box;width:100%;padding:8px 10px;color:var(--text);background:var(--bg);border:1px solid var(--border);border-radius:4px;font:inherit;outline:none}.text-setting[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:focus{border-color:var(--accent)}footer[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:8px;padding:14px 22px;border-top:1px solid var(--border)}.btn[_ngcontent-%COMP%]{padding:7px 14px;color:var(--text);background:transparent;border:1px solid var(--border);border-radius:4px;font:inherit;cursor:pointer}.btn[_ngcontent-%COMP%]:hover:not(:disabled){color:var(--text-bright);background:var(--bg-hover)}.btn.primary[_ngcontent-%COMP%]{color:#fff;background:var(--accent);border-color:var(--accent)}.btn[_ngcontent-%COMP%]:disabled{opacity:.55;cursor:default}@media(max-width:520px){.dialog[_ngcontent-%COMP%]{width:calc(100vw - 16px);max-height:calc(100vh - 16px)}.dialog-header[_ngcontent-%COMP%], .settings-body[_ngcontent-%COMP%], footer[_ngcontent-%COMP%]{padding-left:14px;padding-right:14px}}"],changeDetection:0})};var ck=["inputEl"],dk=["searchEl"],uk=(n,e)=>e.value;function fk(n,e){if(n&1&&(v(0,"p",5),f(1),C()),n&2){let t=u();d(),O(t.label)}}function pk(n,e){if(n&1){let t=A();v(0,"input",13,0),j("input",function(r){y(t);let o=u(3);return b(o.onSearch(r))})("keydown.enter",function(r){y(t);let o=u(3);return b(o.onSearchEnter(r))}),C()}if(n&2){let t=u(3);Z("value",t.search())}}function hk(n,e){if(n&1&&(v(0,"span",18),f(1),C()),n&2){let t=u().$implicit;d(),O(t.description)}}function mk(n,e){if(n&1){let t=A();v(0,"button",14),j("click",function(){let r=y(t).$implicit,o=u(3);return b(o.choose(r))})("dblclick",function(){y(t);let r=u(3);return b(r.confirm())}),se(1,"span",15),v(2,"span",16)(3,"span",17),f(4),C(),T(5,hk,2,1,"span",18),C()()}if(n&2){let t=e.$implicit,i=u(3);ge("selected",i.choice()===t.value)("danger",t.danger),fe("aria-checked",i.choice()===t.value),d(4),O(t.label),d(),M(t.description?5:-1)}}function gk(n,e){n&1&&(v(0,"p",12),f(1,"No matching branches"),C())}function _k(n,e){if(n&1&&(T(0,pk,2,1,"input",9),v(1,"div",10),X(2,mk,6,7,"button",11,uk,!1,gk,2,0,"p",12),C()),n&2){let t=u(),i=u();M(t.searchable?0:-1),d(2),J(i.filteredOptions())}}function vk(n,e){if(n&1){let t=A();v(0,"label",19),f(1),C(),v(2,"input",20,1),j("input",function(r){y(t);let o=u(2);return b(o.onInput(r))})("keydown.enter",function(){y(t);let r=u(2);return b(r.confirm())}),C()}if(n&2){let t=u(),i=u();d(),O(t.label||t.title),d(),Z("value",i.value()),fe("placeholder",t.placeholder||" ")("aria-label",t.label||t.title)}}function yk(n,e){if(n&1){let t=A();v(0,"div",2),j("click",function(){y(t);let r=u();return b(r.cancelled.emit())}),C(),v(1,"div",3)(2,"h3",4),f(3),C(),T(4,fk,2,1,"p",5),T(5,_k,5,2)(6,vk,4,4),v(7,"div",6)(8,"button",7),j("click",function(){y(t);let r=u();return b(r.cancelled.emit())}),f(9,"Cancel"),C(),v(10,"button",8),j("click",function(){y(t);let r=u();return b(r.confirm())}),f(11),C()()()}if(n&2){let t=e,i=u();d(3),O(t.title),d(),M(t.label?4:-1),d(),M(i.options().length>0?5:t.confirmOnly?-1:6),d(5),ge("btn-danger",t.danger),Z("disabled",i.options().length===0&&!t.confirmOnly&&!t.allowEmpty&&!i.value().trim()||t.searchable&&i.filteredOptions().length===0),d(),Q(" ",t.okLabel||"OK"," ")}}var Gc=class n{state=N.required();confirmed=W();cancelled=W();value=x("");choice=x("");options=H(()=>this.state()?.options??[]);search=x("");filteredOptions=H(()=>{let e=this.search().trim().toLowerCase(),t=this.options();return e?t.filter(i=>i.label.toLowerCase().includes(e)||i.value.toLowerCase().includes(e)):t});inputEl=Vn("inputEl");searchEl=Vn("searchEl");constructor(){xe(()=>{let e=this.state();e&&(this.value.set(e.value??""),this.choice.set(e.options?.[0]?.value??""),this.search.set(""));let t=this.inputEl()??this.searchEl();e&&t&&(t.nativeElement.focus(),t.nativeElement.select())})}onEscape(){this.state()&&this.cancelled.emit()}onInput(e){this.value.set(e.target.value)}choose(e){this.choice.set(e.value)}onSearch(e){this.search.set(e.target.value);let t=this.filteredOptions();t.length&&!t.some(i=>i.value===this.choice())&&this.choice.set(t[0].value)}onSearchEnter(e){e.preventDefault(),this.filteredOptions().length>0&&this.confirm()}confirm(){let e=this.state();if(e){if(e.options?.length){this.confirmed.emit(this.choice());return}!e.confirmOnly&&!e.allowEmpty&&!this.value().trim()||this.confirmed.emit(e.confirmOnly?"":this.value().trim())}}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=ce({type:n,selectors:[["app-prompt-dialog"]],viewQuery:function(t,i){t&1&&(Tn(i.inputEl,ck,5),Tn(i.searchEl,dk,5)),t&2&&Fn(2)},hostBindings:function(t,i){t&1&&S("keydown.escape",function(){return i.onEscape()},Ze)},inputs:{state:[1,"state"]},outputs:{confirmed:"confirmed",cancelled:"cancelled"},decls:1,vars:1,consts:[["searchEl",""],["inputEl",""],[1,"backdrop",3,"click"],["role","dialog","aria-modal","true",1,"dialog"],[1,"title"],[1,"label"],[1,"actions"],["type","button",1,"btn",3,"click"],["type","button",1,"btn","btn-primary",3,"click","disabled"],["type","text","placeholder","Search\u2026","aria-label","Search options",1,"input",3,"value"],["role","radiogroup",1,"options"],["type","button","role","radio",1,"option",3,"selected","danger"],[1,"no-results"],["type","text","placeholder","Search\u2026","aria-label","Search options",1,"input",3,"input","keydown.enter","value"],["type","button","role","radio",1,"option",3,"click","dblclick"],["aria-hidden","true",1,"option-radio"],[1,"option-text"],[1,"option-label"],[1,"option-description"],["for","prompt-input",1,"sr-only"],["id","prompt-input","type","text","placeholder"," ","title","Enter a value",1,"input",3,"input","keydown.enter","value"]],template:function(t,i){if(t&1&&T(0,yk,12,7),t&2){let r;M((r=i.state())?0:-1,r)}},styles:[".backdrop[_ngcontent-%COMP%]{position:fixed;inset:0;background:#00000080;z-index:400}.dialog[_ngcontent-%COMP%]{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);width:min(420px,calc(100vw - 48px));padding:18px;display:flex;flex-direction:column;gap:12px;background:var(--bg-alt);border:1px solid var(--border);border-radius:8px;box-shadow:0 10px 36px #0009;z-index:401}.title[_ngcontent-%COMP%]{margin:0;font-size:14px;font-weight:600;color:var(--text-bright)}.label[_ngcontent-%COMP%]{margin:0;font-size:12px;color:var(--text-dim)}.input[_ngcontent-%COMP%]{padding:7px 10px;border:1px solid var(--border);border-radius:4px;background:var(--bg);color:var(--text);font-size:13px;font-family:inherit;outline:none}.input[_ngcontent-%COMP%]:focus{border-color:var(--accent)}.actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:8px}.btn[_ngcontent-%COMP%]{padding:6px 14px;border:1px solid var(--border);border-radius:4px;background:transparent;color:var(--text);font-size:12px;font-family:inherit;cursor:pointer}.btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--bg-hover);color:var(--text-bright)}.btn-primary[_ngcontent-%COMP%]{background:var(--accent);border-color:var(--accent);color:#fff}.btn-primary[_ngcontent-%COMP%]:hover:not(:disabled){background:#2b7cd3}.btn-danger[_ngcontent-%COMP%]{background:#a1260d;border-color:#a1260d;color:#fff}.options[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:4px;max-height:40vh;overflow-y:auto}.no-results[_ngcontent-%COMP%]{margin:0;padding:8px 10px;font-size:12px;color:var(--text-dim)}.option[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:10px;padding:8px 10px;border:1px solid var(--border);border-radius:4px;background:transparent;color:var(--text);font-family:inherit;text-align:left;cursor:pointer}.option[_ngcontent-%COMP%]:hover{background:var(--bg-hover)}.option.selected[_ngcontent-%COMP%]{border-color:var(--accent);background:#3794ff1f}.option-radio[_ngcontent-%COMP%]{width:13px;height:13px;margin-top:2px;border:1px solid var(--border);border-radius:50%;flex:none}.option.selected[_ngcontent-%COMP%] .option-radio[_ngcontent-%COMP%]{border-color:var(--accent);background:radial-gradient(circle,var(--accent) 0 40%,transparent 45%)}.option-text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2px;min-width:0}.option-label[_ngcontent-%COMP%]{font-size:12px;font-weight:600;color:var(--text-bright)}.option.danger[_ngcontent-%COMP%] .option-label[_ngcontent-%COMP%]{color:#f48771}.option-description[_ngcontent-%COMP%]{font-size:11px;color:var(--text-dim)}.btn-danger[_ngcontent-%COMP%]:hover:not(:disabled){background:#c42b1c}.btn[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:default}"],changeDetection:0})};function Ph(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var lr=Ph();function mb(n){lr=n}var Gs={exec:()=>null};function Ee(n,e=""){let t=typeof n=="string"?n:n.source,i={replace:(r,o)=>{let s=typeof o=="string"?o:o.source;return s=s.replace(wt.caret,"$1"),t=t.replace(r,s),i},getRegex:()=>new RegExp(t,e)};return i}var wt={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:n=>new RegExp(`^( {0,3}${n})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}#`),htmlBeginRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}<(?:[a-z].*>|!--)`,"i")},bk=/^(?:[ \t]*(?:\n|$))+/,Ck=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,xk=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Ws=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,wk=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Oh=/(?:[*+-]|\d{1,9}[.)])/,gb=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_b=Ee(gb).replace(/bull/g,Oh).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Ek=Ee(gb).replace(/bull/g,Oh).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Rh=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Dk=/^[^\n]+/,Nh=/(?!\s*\])(?:\\.|[^\[\]\\])+/,Sk=Ee(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Nh).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Tk=Ee(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Oh).getRegex(),Kc="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Ah=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Mk=Ee("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Ah).replace("tag",Kc).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),vb=Ee(Rh).replace("hr",Ws).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Kc).getRegex(),Ik=Ee(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",vb).getRegex(),Lh={blockquote:Ik,code:Ck,def:Sk,fences:xk,heading:wk,hr:Ws,html:Mk,lheading:_b,list:Tk,newline:bk,paragraph:vb,table:Gs,text:Dk},db=Ee("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Ws).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Kc).getRegex(),kk=le(G({},Lh),{lheading:Ek,table:db,paragraph:Ee(Rh).replace("hr",Ws).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",db).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Kc).getRegex()}),Pk=le(G({},Lh),{html:Ee(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Ah).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Gs,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Ee(Rh).replace("hr",Ws).replace("heading",` *#{1,6} *[^
7
+ ]`).replace("lheading",_b).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()}),Ok=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Rk=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,yb=/^( {2,}|\\)\n(?!\s*$)/,Nk=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Xc=/[\p{P}\p{S}]/u,Fh=/[\s\p{P}\p{S}]/u,bb=/[^\s\p{P}\p{S}]/u,Ak=Ee(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Fh).getRegex(),Cb=/(?!~)[\p{P}\p{S}]/u,Lk=/(?!~)[\s\p{P}\p{S}]/u,Fk=/(?:[^\s\p{P}\p{S}]|~)/u,Vk=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,xb=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Bk=Ee(xb,"u").replace(/punct/g,Xc).getRegex(),jk=Ee(xb,"u").replace(/punct/g,Cb).getRegex(),wb="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",$k=Ee(wb,"gu").replace(/notPunctSpace/g,bb).replace(/punctSpace/g,Fh).replace(/punct/g,Xc).getRegex(),Hk=Ee(wb,"gu").replace(/notPunctSpace/g,Fk).replace(/punctSpace/g,Lk).replace(/punct/g,Cb).getRegex(),Uk=Ee("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,bb).replace(/punctSpace/g,Fh).replace(/punct/g,Xc).getRegex(),zk=Ee(/\\(punct)/,"gu").replace(/punct/g,Xc).getRegex(),Gk=Ee(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Wk=Ee(Ah).replace("(?:-->|$)","-->").getRegex(),qk=Ee("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Wk).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Zc=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Zk=Ee(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Zc).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Eb=Ee(/^!?\[(label)\]\[(ref)\]/).replace("label",Zc).replace("ref",Nh).getRegex(),Db=Ee(/^!?\[(ref)\](?:\[\])?/).replace("ref",Nh).getRegex(),Yk=Ee("reflink|nolink(?!\\()","g").replace("reflink",Eb).replace("nolink",Db).getRegex(),Vh={_backpedal:Gs,anyPunctuation:zk,autolink:Gk,blockSkip:Vk,br:yb,code:Rk,del:Gs,emStrongLDelim:Bk,emStrongRDelimAst:$k,emStrongRDelimUnd:Uk,escape:Ok,link:Zk,nolink:Db,punctuation:Ak,reflink:Eb,reflinkSearch:Yk,tag:qk,text:Nk,url:Gs},Qk=le(G({},Vh),{link:Ee(/^!?\[(label)\]\((.*?)\)/).replace("label",Zc).getRegex(),reflink:Ee(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Zc).getRegex()}),Mh=le(G({},Vh),{emStrongRDelimAst:Hk,emStrongLDelim:jk,url:Ee(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/}),Kk=le(G({},Mh),{br:Ee(yb).replace("{2,}","*").getRegex(),text:Ee(Mh.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()}),Wc={normal:Lh,gfm:kk,pedantic:Pk},Us={normal:Vh,gfm:Mh,breaks:Kk,pedantic:Qk},Xk={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},ub=n=>Xk[n];function Pn(n,e){if(e){if(wt.escapeTest.test(n))return n.replace(wt.escapeReplace,ub)}else if(wt.escapeTestNoEncode.test(n))return n.replace(wt.escapeReplaceNoEncode,ub);return n}function fb(n){try{n=encodeURI(n).replace(wt.percentDecode,"%")}catch{return null}return n}function pb(n,e){let t=n.replace(wt.findPipe,(o,s,a)=>{let l=!1,c=s;for(;--c>=0&&a[c]==="\\";)l=!l;return l?"|":" |"}),i=t.split(wt.splitPipe),r=0;if(i[0].trim()||i.shift(),i.length>0&&!i.at(-1)?.trim()&&i.pop(),e)if(i.length>e)i.splice(e);else for(;i.length<e;)i.push("");for(;r<i.length;r++)i[r]=i[r].trim().replace(wt.slashPipe,"|");return i}function zs(n,e,t){let i=n.length;if(i===0)return"";let r=0;for(;r<i;){let o=n.charAt(i-r-1);if(o===e&&!t)r++;else if(o!==e&&t)r++;else break}return n.slice(0,i-r)}function Jk(n,e){if(n.indexOf(e[1])===-1)return-1;let t=0;for(let i=0;i<n.length;i++)if(n[i]==="\\")i++;else if(n[i]===e[0])t++;else if(n[i]===e[1]&&(t--,t<0))return i;return t>0?-2:-1}function hb(n,e,t,i,r){let o=e.href,s=e.title||null,a=n[1].replace(r.other.outputLinkReplace,"$1");i.state.inLink=!0;let l={type:n[0].charAt(0)==="!"?"image":"link",raw:t,href:o,title:s,text:a,tokens:i.inlineTokens(a)};return i.state.inLink=!1,l}function eP(n,e,t){let i=n.match(t.other.indentCodeCompensation);if(i===null)return e;let r=i[1];return e.split(`
8
+ `).map(o=>{let s=o.match(t.other.beginningSpace);if(s===null)return o;let[a]=s;return a.length>=r.length?o.slice(r.length):o}).join(`
9
+ `)}var Yc=class{options;rules;lexer;constructor(n){this.options=n||lr}space(n){let e=this.rules.block.newline.exec(n);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(n){let e=this.rules.block.code.exec(n);if(e){let t=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?t:zs(t,`
10
+ `)}}}fences(n){let e=this.rules.block.fences.exec(n);if(e){let t=e[0],i=eP(t,e[3]||"",this.rules);return{type:"code",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:i}}}heading(n){let e=this.rules.block.heading.exec(n);if(e){let t=e[2].trim();if(this.rules.other.endingHash.test(t)){let i=zs(t,"#");(this.options.pedantic||!i||this.rules.other.endingSpaceChar.test(i))&&(t=i.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(n){let e=this.rules.block.hr.exec(n);if(e)return{type:"hr",raw:zs(e[0],`
11
+ `)}}blockquote(n){let e=this.rules.block.blockquote.exec(n);if(e){let t=zs(e[0],`
12
+ `).split(`
13
+ `),i="",r="",o=[];for(;t.length>0;){let s=!1,a=[],l;for(l=0;l<t.length;l++)if(this.rules.other.blockquoteStart.test(t[l]))a.push(t[l]),s=!0;else if(!s)a.push(t[l]);else break;t=t.slice(l);let c=a.join(`
14
+ `),h=c.replace(this.rules.other.blockquoteSetextReplace,`
15
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,"");i=i?`${i}
16
+ ${c}`:c,r=r?`${r}
17
+ ${h}`:h;let _=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(h,o,!0),this.lexer.state.top=_,t.length===0)break;let w=o.at(-1);if(w?.type==="code")break;if(w?.type==="blockquote"){let E=w,P=E.raw+`
18
+ `+t.join(`
19
+ `),V=this.blockquote(P);o[o.length-1]=V,i=i.substring(0,i.length-E.raw.length)+V.raw,r=r.substring(0,r.length-E.text.length)+V.text;break}else if(w?.type==="list"){let E=w,P=E.raw+`
20
+ `+t.join(`
21
+ `),V=this.list(P);o[o.length-1]=V,i=i.substring(0,i.length-w.raw.length)+V.raw,r=r.substring(0,r.length-E.raw.length)+V.raw,t=P.substring(o.at(-1).raw.length).split(`
22
+ `);continue}}return{type:"blockquote",raw:i,tokens:o,text:r}}}list(n){let e=this.rules.block.list.exec(n);if(e){let t=e[1].trim(),i=t.length>1,r={type:"list",raw:"",ordered:i,start:i?+t.slice(0,-1):"",loose:!1,items:[]};t=i?`\\d{1,9}\\${t.slice(-1)}`:`\\${t}`,this.options.pedantic&&(t=i?t:"[*+-]");let o=this.rules.other.listItemRegex(t),s=!1;for(;n;){let l=!1,c="",h="";if(!(e=o.exec(n))||this.rules.block.hr.test(n))break;c=e[0],n=n.substring(c.length);let _=e[2].split(`
23
+ `,1)[0].replace(this.rules.other.listReplaceTabs,B=>" ".repeat(3*B.length)),w=n.split(`
24
+ `,1)[0],E=!_.trim(),P=0;if(this.options.pedantic?(P=2,h=_.trimStart()):E?P=e[1].length+1:(P=e[2].search(this.rules.other.nonSpaceChar),P=P>4?1:P,h=_.slice(P),P+=e[1].length),E&&this.rules.other.blankLine.test(w)&&(c+=w+`
25
+ `,n=n.substring(w.length+1),l=!0),!l){let B=this.rules.other.nextBulletRegex(P),_e=this.rules.other.hrRegex(P),Ft=this.rules.other.fencesBeginRegex(P),Be=this.rules.other.headingBeginRegex(P),st=this.rules.other.htmlBeginRegex(P);for(;n;){let nt=n.split(`
26
+ `,1)[0],Vt;if(w=nt,this.options.pedantic?(w=w.replace(this.rules.other.listReplaceNesting," "),Vt=w):Vt=w.replace(this.rules.other.tabCharGlobal," "),Ft.test(w)||Be.test(w)||st.test(w)||B.test(w)||_e.test(w))break;if(Vt.search(this.rules.other.nonSpaceChar)>=P||!w.trim())h+=`
27
+ `+Vt.slice(P);else{if(E||_.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||Ft.test(_)||Be.test(_)||_e.test(_))break;h+=`
28
+ `+w}!E&&!w.trim()&&(E=!0),c+=nt+`
29
+ `,n=n.substring(nt.length+1),_=Vt.slice(P)}}r.loose||(s?r.loose=!0:this.rules.other.doubleBlankLine.test(c)&&(s=!0));let V=null,z;this.options.gfm&&(V=this.rules.other.listIsTask.exec(h),V&&(z=V[0]!=="[ ] ",h=h.replace(this.rules.other.listReplaceTask,""))),r.items.push({type:"list_item",raw:c,task:!!V,checked:z,loose:!1,text:h,tokens:[]}),r.raw+=c}let a=r.items.at(-1);if(a)a.raw=a.raw.trimEnd(),a.text=a.text.trimEnd();else return;r.raw=r.raw.trimEnd();for(let l=0;l<r.items.length;l++)if(this.lexer.state.top=!1,r.items[l].tokens=this.lexer.blockTokens(r.items[l].text,[]),!r.loose){let c=r.items[l].tokens.filter(_=>_.type==="space"),h=c.length>0&&c.some(_=>this.rules.other.anyLine.test(_.raw));r.loose=h}if(r.loose)for(let l=0;l<r.items.length;l++)r.items[l].loose=!0;return r}}html(n){let e=this.rules.block.html.exec(n);if(e)return{type:"html",block:!0,raw:e[0],pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:e[0]}}def(n){let e=this.rules.block.def.exec(n);if(e){let t=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),i=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:t,raw:e[0],href:i,title:r}}}table(n){let e=this.rules.block.table.exec(n);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let t=pb(e[1]),i=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),r=e[3]?.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
30
+ `):[],o={type:"table",raw:e[0],header:[],align:[],rows:[]};if(t.length===i.length){for(let s of i)this.rules.other.tableAlignRight.test(s)?o.align.push("right"):this.rules.other.tableAlignCenter.test(s)?o.align.push("center"):this.rules.other.tableAlignLeft.test(s)?o.align.push("left"):o.align.push(null);for(let s=0;s<t.length;s++)o.header.push({text:t[s],tokens:this.lexer.inline(t[s]),header:!0,align:o.align[s]});for(let s of r)o.rows.push(pb(s,o.header.length).map((a,l)=>({text:a,tokens:this.lexer.inline(a),header:!1,align:o.align[l]})));return o}}lheading(n){let e=this.rules.block.lheading.exec(n);if(e)return{type:"heading",raw:e[0],depth:e[2].charAt(0)==="="?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(n){let e=this.rules.block.paragraph.exec(n);if(e){let t=e[1].charAt(e[1].length-1)===`
31
+ `?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}}text(n){let e=this.rules.block.text.exec(n);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(n){let e=this.rules.inline.escape.exec(n);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(n){let e=this.rules.inline.tag.exec(n);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(n){let e=this.rules.inline.link.exec(n);if(e){let t=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(t)){if(!this.rules.other.endAngleBracket.test(t))return;let o=zs(t.slice(0,-1),"\\");if((t.length-o.length)%2===0)return}else{let o=Jk(e[2],"()");if(o===-2)return;if(o>-1){let a=(e[0].indexOf("!")===0?5:4)+e[1].length+o;e[2]=e[2].substring(0,o),e[0]=e[0].substring(0,a).trim(),e[3]=""}}let i=e[2],r="";if(this.options.pedantic){let o=this.rules.other.pedanticHrefTitle.exec(i);o&&(i=o[1],r=o[3])}else r=e[3]?e[3].slice(1,-1):"";return i=i.trim(),this.rules.other.startAngleBracket.test(i)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(t)?i=i.slice(1):i=i.slice(1,-1)),hb(e,{href:i&&i.replace(this.rules.inline.anyPunctuation,"$1"),title:r&&r.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(n,e){let t;if((t=this.rules.inline.reflink.exec(n))||(t=this.rules.inline.nolink.exec(n))){let i=(t[2]||t[1]).replace(this.rules.other.multipleSpaceGlobal," "),r=e[i.toLowerCase()];if(!r){let o=t[0].charAt(0);return{type:"text",raw:o,text:o}}return hb(t,r,t[0],this.lexer,this.rules)}}emStrong(n,e,t=""){let i=this.rules.inline.emStrongLDelim.exec(n);if(!i||i[3]&&t.match(this.rules.other.unicodeAlphaNumeric))return;if(!(i[1]||i[2]||"")||!t||this.rules.inline.punctuation.exec(t)){let o=[...i[0]].length-1,s,a,l=o,c=0,h=i[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,e=e.slice(-1*n.length+o);(i=h.exec(e))!=null;){if(s=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!s)continue;if(a=[...s].length,i[3]||i[4]){l+=a;continue}else if((i[5]||i[6])&&o%3&&!((o+a)%3)){c+=a;continue}if(l-=a,l>0)continue;a=Math.min(a,a+l+c);let _=[...i[0]][0].length,w=n.slice(0,o+i.index+_+a);if(Math.min(o,a)%2){let P=w.slice(1,-1);return{type:"em",raw:w,text:P,tokens:this.lexer.inlineTokens(P)}}let E=w.slice(2,-2);return{type:"strong",raw:w,text:E,tokens:this.lexer.inlineTokens(E)}}}}codespan(n){let e=this.rules.inline.code.exec(n);if(e){let t=e[2].replace(this.rules.other.newLineCharGlobal," "),i=this.rules.other.nonSpaceChar.test(t),r=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return i&&r&&(t=t.substring(1,t.length-1)),{type:"codespan",raw:e[0],text:t}}}br(n){let e=this.rules.inline.br.exec(n);if(e)return{type:"br",raw:e[0]}}del(n){let e=this.rules.inline.del.exec(n);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(n){let e=this.rules.inline.autolink.exec(n);if(e){let t,i;return e[2]==="@"?(t=e[1],i="mailto:"+t):(t=e[1],i=t),{type:"link",raw:e[0],text:t,href:i,tokens:[{type:"text",raw:t,text:t}]}}}url(n){let e;if(e=this.rules.inline.url.exec(n)){let t,i;if(e[2]==="@")t=e[0],i="mailto:"+t;else{let r;do r=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??"";while(r!==e[0]);t=e[0],e[1]==="www."?i="http://"+e[0]:i=e[0]}return{type:"link",raw:e[0],text:t,href:i,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(n){let e=this.rules.inline.text.exec(n);if(e){let t=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:t}}}},$n=class Ih{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||lr,this.options.tokenizer=this.options.tokenizer||new Yc,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let t={other:wt,block:Wc.normal,inline:Us.normal};this.options.pedantic?(t.block=Wc.pedantic,t.inline=Us.pedantic):this.options.gfm&&(t.block=Wc.gfm,this.options.breaks?t.inline=Us.breaks:t.inline=Us.gfm),this.tokenizer.rules=t}static get rules(){return{block:Wc,inline:Us}}static lex(e,t){return new Ih(t).lex(e)}static lexInline(e,t){return new Ih(t).inlineTokens(e)}lex(e){e=e.replace(wt.carriageReturn,`
32
+ `),this.blockTokens(e,this.tokens);for(let t=0;t<this.inlineQueue.length;t++){let i=this.inlineQueue[t];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],i=!1){for(this.options.pedantic&&(e=e.replace(wt.tabCharGlobal," ").replace(wt.spaceLine,""));e;){let r;if(this.options.extensions?.block?.some(s=>(r=s.call({lexer:this},e,t))?(e=e.substring(r.raw.length),t.push(r),!0):!1))continue;if(r=this.tokenizer.space(e)){e=e.substring(r.raw.length);let s=t.at(-1);r.raw.length===1&&s!==void 0?s.raw+=`
33
+ `:t.push(r);continue}if(r=this.tokenizer.code(e)){e=e.substring(r.raw.length);let s=t.at(-1);s?.type==="paragraph"||s?.type==="text"?(s.raw+=`
34
+ `+r.raw,s.text+=`
35
+ `+r.text,this.inlineQueue.at(-1).src=s.text):t.push(r);continue}if(r=this.tokenizer.fences(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.heading(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.hr(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.blockquote(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.list(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.html(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.def(e)){e=e.substring(r.raw.length);let s=t.at(-1);s?.type==="paragraph"||s?.type==="text"?(s.raw+=`
36
+ `+r.raw,s.text+=`
37
+ `+r.raw,this.inlineQueue.at(-1).src=s.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title});continue}if(r=this.tokenizer.table(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.lheading(e)){e=e.substring(r.raw.length),t.push(r);continue}let o=e;if(this.options.extensions?.startBlock){let s=1/0,a=e.slice(1),l;this.options.extensions.startBlock.forEach(c=>{l=c.call({lexer:this},a),typeof l=="number"&&l>=0&&(s=Math.min(s,l))}),s<1/0&&s>=0&&(o=e.substring(0,s+1))}if(this.state.top&&(r=this.tokenizer.paragraph(o))){let s=t.at(-1);i&&s?.type==="paragraph"?(s.raw+=`
38
+ `+r.raw,s.text+=`
39
+ `+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):t.push(r),i=o.length!==e.length,e=e.substring(r.raw.length);continue}if(r=this.tokenizer.text(e)){e=e.substring(r.raw.length);let s=t.at(-1);s?.type==="text"?(s.raw+=`
40
+ `+r.raw,s.text+=`
41
+ `+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):t.push(r);continue}if(e){let s="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(s);break}else throw new Error(s)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let i=e,r=null;if(this.tokens.links){let a=Object.keys(this.tokens.links);if(a.length>0)for(;(r=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)a.includes(r[0].slice(r[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(r=this.tokenizer.rules.inline.anyPunctuation.exec(i))!=null;)i=i.slice(0,r.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(r=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)i=i.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let o=!1,s="";for(;e;){o||(s=""),o=!1;let a;if(this.options.extensions?.inline?.some(c=>(a=c.call({lexer:this},e,t))?(e=e.substring(a.raw.length),t.push(a),!0):!1))continue;if(a=this.tokenizer.escape(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.tag(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.link(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(a.raw.length);let c=t.at(-1);a.type==="text"&&c?.type==="text"?(c.raw+=a.raw,c.text+=a.text):t.push(a);continue}if(a=this.tokenizer.emStrong(e,i,s)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.codespan(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.br(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.del(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.autolink(e)){e=e.substring(a.raw.length),t.push(a);continue}if(!this.state.inLink&&(a=this.tokenizer.url(e))){e=e.substring(a.raw.length),t.push(a);continue}let l=e;if(this.options.extensions?.startInline){let c=1/0,h=e.slice(1),_;this.options.extensions.startInline.forEach(w=>{_=w.call({lexer:this},h),typeof _=="number"&&_>=0&&(c=Math.min(c,_))}),c<1/0&&c>=0&&(l=e.substring(0,c+1))}if(a=this.tokenizer.inlineText(l)){e=e.substring(a.raw.length),a.raw.slice(-1)!=="_"&&(s=a.raw.slice(-1)),o=!0;let c=t.at(-1);c?.type==="text"?(c.raw+=a.raw,c.text+=a.text):t.push(a);continue}if(e){let c="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return t}},Qc=class{options;parser;constructor(n){this.options=n||lr}space(n){return""}code({text:n,lang:e,escaped:t}){let i=(e||"").match(wt.notSpaceStart)?.[0],r=n.replace(wt.endingNewline,"")+`
42
+ `;return i?'<pre><code class="language-'+Pn(i)+'">'+(t?r:Pn(r,!0))+`</code></pre>
43
+ `:"<pre><code>"+(t?r:Pn(r,!0))+`</code></pre>
44
+ `}blockquote({tokens:n}){return`<blockquote>
45
+ ${this.parser.parse(n)}</blockquote>
46
+ `}html({text:n}){return n}heading({tokens:n,depth:e}){return`<h${e}>${this.parser.parseInline(n)}</h${e}>
47
+ `}hr(n){return`<hr>
48
+ `}list(n){let e=n.ordered,t=n.start,i="";for(let s=0;s<n.items.length;s++){let a=n.items[s];i+=this.listitem(a)}let r=e?"ol":"ul",o=e&&t!==1?' start="'+t+'"':"";return"<"+r+o+`>
49
+ `+i+"</"+r+`>
50
+ `}listitem(n){let e="";if(n.task){let t=this.checkbox({checked:!!n.checked});n.loose?n.tokens[0]?.type==="paragraph"?(n.tokens[0].text=t+" "+n.tokens[0].text,n.tokens[0].tokens&&n.tokens[0].tokens.length>0&&n.tokens[0].tokens[0].type==="text"&&(n.tokens[0].tokens[0].text=t+" "+Pn(n.tokens[0].tokens[0].text),n.tokens[0].tokens[0].escaped=!0)):n.tokens.unshift({type:"text",raw:t+" ",text:t+" ",escaped:!0}):e+=t+" "}return e+=this.parser.parse(n.tokens,!!n.loose),`<li>${e}</li>
51
+ `}checkbox({checked:n}){return"<input "+(n?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:n}){return`<p>${this.parser.parseInline(n)}</p>
52
+ `}table(n){let e="",t="";for(let r=0;r<n.header.length;r++)t+=this.tablecell(n.header[r]);e+=this.tablerow({text:t});let i="";for(let r=0;r<n.rows.length;r++){let o=n.rows[r];t="";for(let s=0;s<o.length;s++)t+=this.tablecell(o[s]);i+=this.tablerow({text:t})}return i&&(i=`<tbody>${i}</tbody>`),`<table>
53
+ <thead>
54
+ `+e+`</thead>
55
+ `+i+`</table>
56
+ `}tablerow({text:n}){return`<tr>
57
+ ${n}</tr>
58
+ `}tablecell(n){let e=this.parser.parseInline(n.tokens),t=n.header?"th":"td";return(n.align?`<${t} align="${n.align}">`:`<${t}>`)+e+`</${t}>
59
+ `}strong({tokens:n}){return`<strong>${this.parser.parseInline(n)}</strong>`}em({tokens:n}){return`<em>${this.parser.parseInline(n)}</em>`}codespan({text:n}){return`<code>${Pn(n,!0)}</code>`}br(n){return"<br>"}del({tokens:n}){return`<del>${this.parser.parseInline(n)}</del>`}link({href:n,title:e,tokens:t}){let i=this.parser.parseInline(t),r=fb(n);if(r===null)return i;n=r;let o='<a href="'+n+'"';return e&&(o+=' title="'+Pn(e)+'"'),o+=">"+i+"</a>",o}image({href:n,title:e,text:t,tokens:i}){i&&(t=this.parser.parseInline(i,this.parser.textRenderer));let r=fb(n);if(r===null)return Pn(t);n=r;let o=`<img src="${n}" alt="${t}"`;return e&&(o+=` title="${Pn(e)}"`),o+=">",o}text(n){return"tokens"in n&&n.tokens?this.parser.parseInline(n.tokens):"escaped"in n&&n.escaped?n.text:Pn(n.text)}},Bh=class{strong({text:n}){return n}em({text:n}){return n}codespan({text:n}){return n}del({text:n}){return n}html({text:n}){return n}text({text:n}){return n}link({text:n}){return""+n}image({text:n}){return""+n}br(){return""}},Hn=class kh{options;renderer;textRenderer;constructor(e){this.options=e||lr,this.options.renderer=this.options.renderer||new Qc,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Bh}static parse(e,t){return new kh(t).parse(e)}static parseInline(e,t){return new kh(t).parseInline(e)}parse(e,t=!0){let i="";for(let r=0;r<e.length;r++){let o=e[r];if(this.options.extensions?.renderers?.[o.type]){let a=o,l=this.options.extensions.renderers[a.type].call({parser:this},a);if(l!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(a.type)){i+=l||"";continue}}let s=o;switch(s.type){case"space":{i+=this.renderer.space(s);continue}case"hr":{i+=this.renderer.hr(s);continue}case"heading":{i+=this.renderer.heading(s);continue}case"code":{i+=this.renderer.code(s);continue}case"table":{i+=this.renderer.table(s);continue}case"blockquote":{i+=this.renderer.blockquote(s);continue}case"list":{i+=this.renderer.list(s);continue}case"html":{i+=this.renderer.html(s);continue}case"paragraph":{i+=this.renderer.paragraph(s);continue}case"text":{let a=s,l=this.renderer.text(a);for(;r+1<e.length&&e[r+1].type==="text";)a=e[++r],l+=`
60
+ `+this.renderer.text(a);t?i+=this.renderer.paragraph({type:"paragraph",raw:l,text:l,tokens:[{type:"text",raw:l,text:l,escaped:!0}]}):i+=l;continue}default:{let a='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return i}parseInline(e,t=this.renderer){let i="";for(let r=0;r<e.length;r++){let o=e[r];if(this.options.extensions?.renderers?.[o.type]){let a=this.options.extensions.renderers[o.type].call({parser:this},o);if(a!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)){i+=a||"";continue}}let s=o;switch(s.type){case"escape":{i+=t.text(s);break}case"html":{i+=t.html(s);break}case"link":{i+=t.link(s);break}case"image":{i+=t.image(s);break}case"strong":{i+=t.strong(s);break}case"em":{i+=t.em(s);break}case"codespan":{i+=t.codespan(s);break}case"br":{i+=t.br(s);break}case"del":{i+=t.del(s);break}case"text":{i+=t.text(s);break}default:{let a='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return i}},qc=class{options;block;constructor(e){this.options=e||lr}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}provideLexer(){return this.block?$n.lex:$n.lexInline}provideParser(){return this.block?Hn.parse:Hn.parseInline}},tP=class{defaults=Ph();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Hn;Renderer=Qc;TextRenderer=Bh;Lexer=$n;Tokenizer=Yc;Hooks=qc;constructor(...n){this.use(...n)}walkTokens(n,e){let t=[];for(let i of n)switch(t=t.concat(e.call(this,i)),i.type){case"table":{let r=i;for(let o of r.header)t=t.concat(this.walkTokens(o.tokens,e));for(let o of r.rows)for(let s of o)t=t.concat(this.walkTokens(s.tokens,e));break}case"list":{let r=i;t=t.concat(this.walkTokens(r.items,e));break}default:{let r=i;this.defaults.extensions?.childTokens?.[r.type]?this.defaults.extensions.childTokens[r.type].forEach(o=>{let s=r[o].flat(1/0);t=t.concat(this.walkTokens(s,e))}):r.tokens&&(t=t.concat(this.walkTokens(r.tokens,e)))}}return t}use(...n){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return n.forEach(t=>{let i=G({},t);if(i.async=this.defaults.async||i.async||!1,t.extensions&&(t.extensions.forEach(r=>{if(!r.name)throw new Error("extension name required");if("renderer"in r){let o=e.renderers[r.name];o?e.renderers[r.name]=function(...s){let a=r.renderer.apply(this,s);return a===!1&&(a=o.apply(this,s)),a}:e.renderers[r.name]=r.renderer}if("tokenizer"in r){if(!r.level||r.level!=="block"&&r.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let o=e[r.level];o?o.unshift(r.tokenizer):e[r.level]=[r.tokenizer],r.start&&(r.level==="block"?e.startBlock?e.startBlock.push(r.start):e.startBlock=[r.start]:r.level==="inline"&&(e.startInline?e.startInline.push(r.start):e.startInline=[r.start]))}"childTokens"in r&&r.childTokens&&(e.childTokens[r.name]=r.childTokens)}),i.extensions=e),t.renderer){let r=this.defaults.renderer||new Qc(this.defaults);for(let o in t.renderer){if(!(o in r))throw new Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;let s=o,a=t.renderer[s],l=r[s];r[s]=(...c)=>{let h=a.apply(r,c);return h===!1&&(h=l.apply(r,c)),h||""}}i.renderer=r}if(t.tokenizer){let r=this.defaults.tokenizer||new Yc(this.defaults);for(let o in t.tokenizer){if(!(o in r))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;let s=o,a=t.tokenizer[s],l=r[s];r[s]=(...c)=>{let h=a.apply(r,c);return h===!1&&(h=l.apply(r,c)),h}}i.tokenizer=r}if(t.hooks){let r=this.defaults.hooks||new qc;for(let o in t.hooks){if(!(o in r))throw new Error(`hook '${o}' does not exist`);if(["options","block"].includes(o))continue;let s=o,a=t.hooks[s],l=r[s];qc.passThroughHooks.has(o)?r[s]=c=>{if(this.defaults.async)return Promise.resolve(a.call(r,c)).then(_=>l.call(r,_));let h=a.call(r,c);return l.call(r,h)}:r[s]=(...c)=>{let h=a.apply(r,c);return h===!1&&(h=l.apply(r,c)),h}}i.hooks=r}if(t.walkTokens){let r=this.defaults.walkTokens,o=t.walkTokens;i.walkTokens=function(s){let a=[];return a.push(o.call(this,s)),r&&(a=a.concat(r.call(this,s))),a}}this.defaults=G(G({},this.defaults),i)}),this}setOptions(n){return this.defaults=G(G({},this.defaults),n),this}lexer(n,e){return $n.lex(n,e??this.defaults)}parser(n,e){return Hn.parse(n,e??this.defaults)}parseMarkdown(n){return(t,i)=>{let r=G({},i),o=G(G({},this.defaults),r),s=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&r.async===!1)return s(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof t>"u"||t===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof t!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));o.hooks&&(o.hooks.options=o,o.hooks.block=n);let a=o.hooks?o.hooks.provideLexer():n?$n.lex:$n.lexInline,l=o.hooks?o.hooks.provideParser():n?Hn.parse:Hn.parseInline;if(o.async)return Promise.resolve(o.hooks?o.hooks.preprocess(t):t).then(c=>a(c,o)).then(c=>o.hooks?o.hooks.processAllTokens(c):c).then(c=>o.walkTokens?Promise.all(this.walkTokens(c,o.walkTokens)).then(()=>c):c).then(c=>l(c,o)).then(c=>o.hooks?o.hooks.postprocess(c):c).catch(s);try{o.hooks&&(t=o.hooks.preprocess(t));let c=a(t,o);o.hooks&&(c=o.hooks.processAllTokens(c)),o.walkTokens&&this.walkTokens(c,o.walkTokens);let h=l(c,o);return o.hooks&&(h=o.hooks.postprocess(h)),h}catch(c){return s(c)}}}onError(n,e){return t=>{if(t.message+=`
61
+ Please report this to https://github.com/markedjs/marked.`,n){let i="<p>An error occurred:</p><pre>"+Pn(t.message+"",!0)+"</pre>";return e?Promise.resolve(i):i}if(e)return Promise.reject(t);throw t}}},ar=new tP;function we(n,e){return ar.parse(n,e)}we.options=we.setOptions=function(n){return ar.setOptions(n),we.defaults=ar.defaults,mb(we.defaults),we};we.getDefaults=Ph;we.defaults=lr;we.use=function(...n){return ar.use(...n),we.defaults=ar.defaults,mb(we.defaults),we};we.walkTokens=function(n,e){return ar.walkTokens(n,e)};we.parseInline=ar.parseInline;we.Parser=Hn;we.parser=Hn.parse;we.Renderer=Qc;we.TextRenderer=Bh;we.Lexer=$n;we.lexer=$n.lex;we.Tokenizer=Yc;we.Hooks=qc;we.parse=we;var nW=we.options,iW=we.setOptions,rW=we.use,oW=we.walkTokens,sW=we.parseInline;var aW=Hn.parse,lW=$n.lex;function Sb(n,e){(e==null||e>n.length)&&(e=n.length);for(var t=0,i=Array(e);t<e;t++)i[t]=n[t];return i}function nP(n){if(Array.isArray(n))return n}function iP(n,e){var t=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(t!=null){var i,r,o,s,a=[],l=!0,c=!1;try{if(o=(t=t.call(n)).next,e!==0)for(;!(l=(i=o.call(t)).done)&&(a.push(i.value),a.length!==e);l=!0);}catch(h){c=!0,r=h}finally{try{if(!l&&t.return!=null&&(s=t.return(),Object(s)!==s))return}finally{if(c)throw r}}return a}}function rP(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
62
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function oP(n,e){return nP(n)||iP(n,e)||sP(n,e)||rP()}function sP(n,e){if(n){if(typeof n=="string")return Sb(n,e);var t={}.toString.call(n).slice(8,-1);return t==="Object"&&n.constructor&&(t=n.constructor.name),t==="Map"||t==="Set"?Array.from(n):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Sb(n,e):void 0}}var $b=Object.entries,Tb=Object.setPrototypeOf,aP=Object.isFrozen,lP=Object.getPrototypeOf,cP=Object.getOwnPropertyDescriptor,tt=Object.freeze,ot=Object.seal,uo=Object.create,Hb=typeof Reflect<"u"&&Reflect,Wh=Hb.apply,qh=Hb.construct;tt||(tt=function(e){return e});ot||(ot=function(e){return e});Wh||(Wh=function(e,t){for(var i=arguments.length,r=new Array(i>2?i-2:0),o=2;o<i;o++)r[o-2]=arguments[o];return e.apply(t,r)});qh||(qh=function(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),r=1;r<t;r++)i[r-1]=arguments[r];return new e(...i)});var dr=Ke(Array.prototype.forEach),dP=Ke(Array.prototype.lastIndexOf),Mb=Ke(Array.prototype.pop),qs=Ke(Array.prototype.push),uP=Ke(Array.prototype.splice),fo=Array.isArray,Qs=Ke(String.prototype.toLowerCase),jh=Ke(String.prototype.toString),Ib=Ke(String.prototype.match),Zs=Ke(String.prototype.replace),kb=Ke(String.prototype.indexOf),fP=Ke(String.prototype.trim),pP=Ke(Number.prototype.toString),hP=Ke(Boolean.prototype.toString),Pb=typeof BigInt>"u"?null:Ke(BigInt.prototype.toString),Ob=typeof Symbol>"u"?null:Ke(Symbol.prototype.toString),Pt=Ke(Object.prototype.hasOwnProperty),Ys=Ke(Object.prototype.toString),gt=Ke(RegExp.prototype.test),cr=mP(TypeError);function Ke(n){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var t=arguments.length,i=new Array(t>1?t-1:0),r=1;r<t;r++)i[r-1]=arguments[r];return Wh(n,e,i)}}function mP(n){return function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return qh(n,t)}}function ve(n,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Qs;if(Tb&&Tb(n,null),!fo(e))return n;let i=e.length;for(;i--;){let r=e[i];if(typeof r=="string"){let o=t(r);o!==r&&(aP(e)||(e[i]=o),r=o)}n[r]=!0}return n}function gP(n){for(let e=0;e<n.length;e++)Pt(n,e)||(n[e]=null);return n}function Lt(n){let e=uo(null);for(let i of $b(n)){var t=oP(i,2);let r=t[0],o=t[1];Pt(n,r)&&(fo(o)?e[r]=gP(o):o&&typeof o=="object"&&o.constructor===Object?e[r]=Lt(o):e[r]=o)}return e}function _P(n){switch(typeof n){case"string":return n;case"number":return pP(n);case"boolean":return hP(n);case"bigint":return Pb?Pb(n):"0";case"symbol":return Ob?Ob(n):"Symbol()";case"undefined":return Ys(n);case"function":case"object":{if(n===null)return Ys(n);let e=n,t=Kt(e,"toString");if(typeof t=="function"){let i=t(e);return typeof i=="string"?i:Ys(i)}return Ys(n)}default:return Ys(n)}}function Kt(n,e){for(;n!==null;){let i=cP(n,e);if(i){if(i.get)return Ke(i.get);if(typeof i.value=="function")return Ke(i.value)}n=lP(n)}function t(){return null}return t}function vP(n){try{return gt(n,""),!0}catch{return!1}}var Rb=tt(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),$h=tt(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Hh=tt(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),yP=tt(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Uh=tt(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),bP=tt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Nb=tt(["#text"]),Ab=tt(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),zh=tt(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","pointer-events","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Lb=tt(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Jc=tt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),CP=ot(/{{[\w\W]*|^[\w\W]*}}/g),xP=ot(/<%[\w\W]*|^[\w\W]*%>/g),wP=ot(/\${[\w\W]*/g),EP=ot(/^data-[\-\w.\u00B7-\uFFFF]+$/),DP=ot(/^aria-[\-\w]+$/),Fb=ot(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),SP=ot(/^(?:\w+script|data):/i),TP=ot(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),MP=ot(/^html$/i),IP=ot(/^[a-z][.\w]*(-[.\w]+)+$/i),Vb=ot(/<[/\w!]/g),Bb=ot(/<[/\w]/g),kP=ot(/<\/no(script|embed|frames)/i),PP=ot(/\/>/i),At={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Ub=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],OP=tt(ve({},Ub)),RP=(function(){let n={};return dr(Ub,e=>{n[e]=ot(new RegExp("</"+e+"(?=[\\t\\n\\f\\r />])","i"))}),tt(n)})(),NP=function(){return typeof window>"u"?null:window},AP=function(e,t){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let i=null,r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(i=t.getAttribute(r));let o="dompurify"+(i?"#"+i:"");try{return e.createPolicy(o,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}},jb=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},gi=function(e,t,i,r){return Pt(e,t)&&fo(e[t])?ve(r.base?Lt(r.base):{},e[t],r.transform):i},Gh=function(e,t,i){let r=Pt(e,t)?e[t]:void 0;return r&&typeof r=="object"?Lt(r):i()};function zb(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:NP(),e=L=>zb(L);if(e.version="3.4.15",e.removed=[],!n||!n.document||n.document.nodeType!==At.document||!n.Element)return e.isSupported=!1,e;let t=n.document,i=t,r=i.currentScript;n.DocumentFragment;let o=n.HTMLTemplateElement,s=n.Node,a=n.Element,l=n.NodeFilter,c=n.NamedNodeMap;c===void 0&&(n.NamedNodeMap||n.MozNamedAttrMap),n.HTMLFormElement;let h=n.DOMParser,_=n.trustedTypes,w=a.prototype,E=Kt(w,"cloneNode"),P=Kt(w,"remove"),V=Kt(w,"removeAttributeNode"),z=Kt(w,"nextSibling"),B=Kt(w,"childNodes"),_e=Kt(w,"parentNode"),Ft=Kt(w,"shadowRoot"),Be=Kt(w,"attributes"),st=s&&s.prototype?Kt(s.prototype,"nodeType"):null,nt=s&&s.prototype?Kt(s.prototype,"nodeName"):null,Vt=s&&s.prototype?Kt(s.prototype,"ownerDocument"):null,ho=function(g){return st?st(g):g.nodeType},cd=function(g){return nt?nt(g):g.nodeName};if(typeof o=="function"){let L=t.createElement("template");L.content&&L.content.ownerDocument&&(t=L.content.ownerDocument)}let Et,_i="",dd,Yh=!1,mo=0,Qh=function(){if(mo>0)throw cr('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},ur=function(g){Qh(),mo++;try{return Et.createHTML(g)}finally{mo--}},Jb=function(g){Qh(),mo++;try{return Et.createScriptURL(g)}finally{mo--}},eC=function(){return Yh||(dd=AP(_,r),Yh=!0),dd},Xs=t,ud=Xs.implementation,Kh=Xs.createNodeIterator,tC=Xs.createDocumentFragment,nC=Xs.getElementsByTagName,iC=i.importNode,Ae=jb();e.isSupported=typeof $b=="function"&&typeof _e=="function"&&ud&&ud.createHTMLDocument!==void 0;let rC=CP,oC=xP,sC=wP,aC=EP,lC=DP,cC=SP,Xh=TP,dC=IP,Jh=Fb,Le=null,fd=ve({},[...Rb,...$h,...Hh,...Uh,...Nb]),Fe=null,pd=ve({},[...Ab,...zh,...Lb,...Jc]),mn=Object.seal(uo(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),go=null,em=null,Un=Object.seal(uo(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),tm=!0,hd=!0,nm=!1,im=!0,zn=!1,vi=!0,yi=!1,md=!1,Js=null,ea=null,gd=!1,fr=!1,ta=!1,na=!1,rm=!0,om=!1,sm="user-content-",_d=!0,vd=!1,pr={},hr=null,am=ve({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]),lm=null,cm=ve({},["audio","video","img","source","image","track"]),dm=null,um=ve({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ia="http://www.w3.org/1998/Math/MathML",ra="http://www.w3.org/2000/svg",gn="http://www.w3.org/1999/xhtml",mr=gn,yd=!1,bd=null,uC=ve({},[ia,ra,gn],jh),fm=tt(["mi","mo","mn","ms","mtext"]),Cd=ve({},fm),pm=tt(["annotation-xml"]),xd=ve({},pm),fC=ve({},["title","style","font","a","script"]),_o=null,pC=["application/xhtml+xml","text/html"],hC="text/html",ze=null,gr=null,mC=t.createElement("form"),hm=function(g){return g instanceof RegExp||g instanceof Function},wd=function(){let g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(gr&&gr===g)return;(!g||typeof g!="object")&&(g={}),g=Lt(g),_o=pC.indexOf(g.PARSER_MEDIA_TYPE)===-1?hC:g.PARSER_MEDIA_TYPE,ze=_o==="application/xhtml+xml"?jh:Qs,Le=gi(g,"ALLOWED_TAGS",fd,{transform:ze}),Fe=gi(g,"ALLOWED_ATTR",pd,{transform:ze}),bd=gi(g,"ALLOWED_NAMESPACES",uC,{transform:jh}),dm=gi(g,"ADD_URI_SAFE_ATTR",um,{transform:ze,base:um}),lm=gi(g,"ADD_DATA_URI_TAGS",cm,{transform:ze,base:cm}),hr=gi(g,"FORBID_CONTENTS",am,{transform:ze}),go=gi(g,"FORBID_TAGS",Lt({}),{transform:ze}),em=gi(g,"FORBID_ATTR",Lt({}),{transform:ze}),pr=Pt(g,"USE_PROFILES")?g.USE_PROFILES&&typeof g.USE_PROFILES=="object"?Lt(g.USE_PROFILES):g.USE_PROFILES:!1,tm=g.ALLOW_ARIA_ATTR!==!1,hd=g.ALLOW_DATA_ATTR!==!1,nm=g.ALLOW_UNKNOWN_PROTOCOLS||!1,im=g.ALLOW_SELF_CLOSE_IN_ATTR!==!1,zn=g.SAFE_FOR_TEMPLATES||!1,vi=g.SAFE_FOR_XML!==!1,yi=g.WHOLE_DOCUMENT||!1,fr=g.RETURN_DOM||!1,ta=g.RETURN_DOM_FRAGMENT||!1,na=g.RETURN_TRUSTED_TYPE||!1,gd=g.FORCE_BODY||!1,rm=g.SANITIZE_DOM!==!1,om=g.SANITIZE_NAMED_PROPS||!1,_d=g.KEEP_CONTENT!==!1,vd=g.IN_PLACE||!1,Jh=vP(g.ALLOWED_URI_REGEXP)?g.ALLOWED_URI_REGEXP:Fb,mr=typeof g.NAMESPACE=="string"?g.NAMESPACE:gn,Cd=Gh(g,"MATHML_TEXT_INTEGRATION_POINTS",()=>ve({},fm)),xd=Gh(g,"HTML_INTEGRATION_POINTS",()=>ve({},pm));let D=Gh(g,"CUSTOM_ELEMENT_HANDLING",()=>uo(null));if(mn=uo(null),Pt(D,"tagNameCheck")&&hm(D.tagNameCheck)&&(mn.tagNameCheck=D.tagNameCheck),Pt(D,"attributeNameCheck")&&hm(D.attributeNameCheck)&&(mn.attributeNameCheck=D.attributeNameCheck),Pt(D,"allowCustomizedBuiltInElements")&&typeof D.allowCustomizedBuiltInElements=="boolean"&&(mn.allowCustomizedBuiltInElements=D.allowCustomizedBuiltInElements),ot(mn),zn&&(hd=!1),ta&&(fr=!0),pr&&(Le=ve({},Nb),Fe=uo(null),pr.html===!0&&(ve(Le,Rb),ve(Fe,Ab)),pr.svg===!0&&(ve(Le,$h),ve(Fe,zh),ve(Fe,Jc)),pr.svgFilters===!0&&(ve(Le,Hh),ve(Fe,zh),ve(Fe,Jc)),pr.mathMl===!0&&(ve(Le,Uh),ve(Fe,Lb),ve(Fe,Jc))),Un.tagCheck=null,Un.attributeCheck=null,Pt(g,"ADD_TAGS")&&(typeof g.ADD_TAGS=="function"?Un.tagCheck=g.ADD_TAGS:fo(g.ADD_TAGS)&&(Le===fd&&(Le=Lt(Le)),ve(Le,g.ADD_TAGS,ze))),Pt(g,"ADD_ATTR")&&(typeof g.ADD_ATTR=="function"?Un.attributeCheck=g.ADD_ATTR:fo(g.ADD_ATTR)&&(Fe===pd&&(Fe=Lt(Fe)),ve(Fe,g.ADD_ATTR,ze))),Pt(g,"ADD_FORBID_CONTENTS")&&fo(g.ADD_FORBID_CONTENTS)&&(hr===am&&(hr=Lt(hr)),ve(hr,g.ADD_FORBID_CONTENTS,ze)),_d&&(Le["#text"]=!0),yi&&ve(Le,["html","head","body"]),Le.table&&(ve(Le,["tbody"]),delete go.tbody),g.TRUSTED_TYPES_POLICY){if(typeof g.TRUSTED_TYPES_POLICY.createHTML!="function")throw cr('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof g.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw cr('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');let R=Et;Et=g.TRUSTED_TYPES_POLICY;try{_i=ur("")}catch($){throw Et=R,$}}else g.TRUSTED_TYPES_POLICY===null?(Et=void 0,_i=""):(Et===void 0&&(Et=eC()),Et&&typeof _i=="string"&&(_i=ur("")));tt&&tt(g),gr=g},mm=ve({},[...$h,...Hh,...yP]),gm=ve({},[...Uh,...bP]),gC=function(g,D,R){return D.namespaceURI===gn?g==="svg":D.namespaceURI===ia?g==="svg"&&(R==="annotation-xml"||Cd[R]):!!mm[g]},_C=function(g,D,R){return D.namespaceURI===gn?g==="math":D.namespaceURI===ra?g==="math"&&xd[R]:!!gm[g]},vC=function(g,D,R){return D.namespaceURI===ra&&!xd[R]||D.namespaceURI===ia&&!Cd[R]?!1:!gm[g]&&(fC[g]||!mm[g])},yC=function(g){let D=_e(g);(!D||!D.tagName)&&(D={namespaceURI:mr,tagName:"template"});let R=Qs(g.tagName),$=Qs(D.tagName);return bd[g.namespaceURI]?g.namespaceURI===ra?gC(R,D,$):g.namespaceURI===ia?_C(R,D,$):g.namespaceURI===gn?vC(R,D,$):!!(_o==="application/xhtml+xml"&&bd[g.namespaceURI]):!1},Gn=function(g){qs(e.removed,{element:g});try{_e(g).removeChild(g)}catch{if(P(g),!_e(g))throw cr("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},_m=function(g,D,R){try{V(g,D)}catch{try{g.removeAttribute(R)}catch{}}},oa=function(g){sa(g);let D=B(g);if(D){let $=[];dr(D,Y=>{qs($,Y)}),dr($,Y=>{try{P(Y)}catch{}})}let R=Be(g);if(R)for(let $=R.length-1;$>=0;--$){let Y=R[$],oe=Y&&Y.name;typeof oe=="string"&&_m(g,Y,oe)}},bi=function(g,D,R){if(!R)try{R=D.getAttributeNode(g)}catch{R=null}qs(e.removed,{attribute:R||null,from:D});try{R?V(D,R):D.removeAttribute(g)}catch{try{D.removeAttribute(g)}catch{}}if(g==="is")if(fr||ta)try{Gn(D)}catch{}else try{D.setAttribute(g,"")}catch{}},bC=function(g){let D=Be(g);if(D)for(let R=D.length-1;R>=0;--R){let $=D[R],Y=$&&$.name;typeof Y!="string"||Fe[ze(Y)]||_m(g,$,Y)}},sa=function(g){let D=[g];for(;D.length>0;){let R=D.pop();ho(R)===At.element&&bC(R);let Y=B(R);if(Y)for(let oe=Y.length-1;oe>=0;--oe)D.push(Y[oe])}},vm=function(g,D){return vi?g==="patchsrc"?!0:g==="for"&&D!=="label"&&D!=="output":!1},CC=function(g){if(!vi)return;let D=[g];for(;D.length>0;){let R=D.pop(),$=ho(R);if($===At.processingInstruction||$===At.comment&&gt(Bb,R.data)){try{P(R)}catch{}continue}if($===At.element){let oe=R,ke=ze(cd(R));try{oe.hasAttribute&&oe.hasAttribute("patchsrc")&&oe.removeAttribute("patchsrc"),oe.hasAttribute&&oe.hasAttribute("for")&&vm("for",ke)&&oe.removeAttribute("for")}catch{}}let Y=B(R);if(Y)for(let oe=Y.length-1;oe>=0;--oe)D.push(Y[oe])}},ym=function(g){let D=null,R=null;if(gd)g="<remove></remove>"+g;else{let oe=Ib(g,/^[\r\n\t ]+/);R=oe&&oe[0]}_o==="application/xhtml+xml"&&mr===gn&&(g='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+g+"</body></html>");let $=Et?ur(g):g;if(mr===gn)try{D=new h().parseFromString($,_o)}catch{}if(!D||!D.documentElement){D=ud.createDocument(mr,"template",null);try{D.documentElement.innerHTML=yd?_i:$}catch{}}let Y=D.body||D.documentElement;return g&&R&&Y.insertBefore(t.createTextNode(R),Y.childNodes[0]||null),mr===gn?nC.call(D,yi?"html":"body")[0]:yi?D.documentElement:Y},bm=function(g){let D=Vt?Vt(g):g.ownerDocument;return Kh.call(D||g,g,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},aa=function(g){return g=Zs(g,rC," "),g=Zs(g,oC," "),g=Zs(g,sC," "),g},Ed=function(g){var D;g.normalize();let R=Vt?Vt(g):g.ownerDocument,$=Kh.call(R||g,g,l.SHOW_TEXT|l.SHOW_COMMENT|l.SHOW_CDATA_SECTION|l.SHOW_PROCESSING_INSTRUCTION,null),Y=$.nextNode();for(;Y;)Y.data=aa(Y.data),Y=$.nextNode();let oe=(D=g.querySelectorAll)===null||D===void 0?void 0:D.call(g,"template");oe&&dr(oe,ke=>{_r(ke.content)&&Ed(ke.content)})},la=function(g){let D=nt?nt(g):null;return typeof D!="string"||ze(D)!=="form"?!1:typeof g.nodeName!="string"||typeof g.textContent!="string"||typeof g.removeChild!="function"||g.attributes!==Be(g)||typeof g.removeAttribute!="function"||typeof g.removeAttributeNode!="function"||typeof g.getAttributeNode!="function"||typeof g.setAttribute!="function"||typeof g.namespaceURI!="string"||typeof g.insertBefore!="function"||typeof g.hasChildNodes!="function"||g.nodeType!==st(g)||g.childNodes!==B(g)},_r=function(g){if(!st||typeof g!="object"||g===null)return!1;try{return st(g)===At.documentFragment}catch{return!1}},vo=function(g){if(!st||typeof g!="object"||g===null)return!1;try{return typeof st(g)=="number"}catch{return!1}};function _n(L,g,D){L.length!==0&&dr(L,R=>{R.call(e,g,D,gr)})}let xC=function(g,D){return!!(vi&&g.hasChildNodes()&&!vo(g.firstElementChild)&&gt(Vb,g.textContent)&&gt(Vb,g.innerHTML)||vi&&g.namespaceURI===gn&&OP[D]&&(vo(g.firstElementChild)||typeof g.textContent=="string"&&gt(RP[D],g.textContent))||g.nodeType===At.processingInstruction||vi&&g.nodeType===At.comment&&gt(Bb,g.data))},ca=function(g,D){if(g instanceof RegExp)return gt(g,D);if(g instanceof Function){for(var R=arguments.length,$=new Array(R>2?R-2:0),Y=2;Y<R;Y++)$[Y-2]=arguments[Y];return!!g(D,...$)}return!1},wC=function(g,D,R){if(!go[D]&&Dm(D)&&ca(mn.tagNameCheck,D))return!1;if(_d&&!hr[D]){let $=_e(g),Y=B(g);if(Y&&$){let oe=Y.length;for(let ke=oe-1;ke>=0;--ke){let je=g===R?E(Y[ke],!0):Y[ke];$.insertBefore(je,z(g))}}}return Gn(g),!0},Cm=function(g,D,R,$){return g.length===0?D:D===R||D===$?Lt(D):D},xm=function(g,D){return g===D||_e(g)!==null?!1:(vd&&sa(g),!0)},wm=function(g,D){if(_n(Ae.beforeSanitizeElements,g,null),xm(g,D))return!0;if(la(g))return Gn(g),!0;let R=ze(cd(g));if(Le=Cm(Ae.uponSanitizeElement,Le,fd,Js),_n(Ae.uponSanitizeElement,g,{tagName:R,allowedTags:Le}),xm(g,D))return!0;if(xC(g,R))return Gn(g),!0;if(go[R]||!(Un.tagCheck instanceof Function&&Un.tagCheck(R))&&!Le[R]){let Y=wC(g,R,D);return Y===!1&&_n(Ae.afterSanitizeElements,g,null),Y}if(ho(g)===At.element&&!yC(g)||(R==="noscript"||R==="noembed"||R==="noframes")&&gt(kP,g.innerHTML))return Gn(g),!0;if(zn&&g.nodeType===At.text){let Y=aa(g.textContent);g.textContent!==Y&&(qs(e.removed,{element:g.cloneNode()}),g.textContent=Y)}return _n(Ae.afterSanitizeElements,g,null),!1},Em=function(g,D,R){if(em[D]||vm(D,g)||rm&&(D==="id"||D==="name")&&(R in t||R in mC))return!1;let $=Fe[D]||Un.attributeCheck instanceof Function&&Un.attributeCheck(D,g);return hd&&gt(aC,D)||tm&&gt(lC,D)?!0:$?dm[D]||gt(Jh,Zs(R,Xh,""))||(D==="src"||D==="xlink:href"||D==="href")&&g!=="script"&&kb(R,"data:")===0&&lm[g]||nm&&!gt(cC,Zs(R,Xh,""))?!0:!R:Dm(g)&&ca(mn.tagNameCheck,g)&&ca(mn.attributeNameCheck,D,g)||D==="is"&&mn.allowCustomizedBuiltInElements&&ca(mn.tagNameCheck,R)},EC=ve({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Dm=function(g){return!EC[Qs(g)]&&gt(dC,g)},DC=function(g,D,R,$){if(Et&&typeof _=="object"&&typeof _.getAttributeType=="function"&&!R)switch(_.getAttributeType(g,D)){case"TrustedHTML":return ur($);case"TrustedScriptURL":return Jb($)}return $},SC=function(g,D,R,$){try{return R?g.setAttributeNS(R,D,$):g.setAttribute(D,$),la(g)?(Gn(g),!1):!0}catch{return bi(D,g),!1}},Sm=function(g){_n(Ae.beforeSanitizeAttributes,g,null);let D=g.attributes;if(!D||la(g))return;Fe=Cm(Ae.uponSanitizeAttribute,Fe,pd,ea);let R={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Fe,forceKeepAttr:void 0},$=D.length,Y=ze(g.nodeName);for(;$--;){let oe=D[$],ke=oe.name,je=oe.namespaceURI,Dt=oe.value,St=ze(ke),Sd=Dt,_t=ke==="value"?Sd:fP(Sd),Tm=!1;if(R.attrName=St,R.attrValue=_t,R.keepAttr=!0,R.forceKeepAttr=void 0,_n(Ae.uponSanitizeAttribute,g,R),_t=R.attrValue,om&&(St==="id"||St==="name")&&kb(_t,sm)!==0&&(bi(ke,g,oe),_t=sm+_t,Tm=!0),vi&&gt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,_t)){bi(ke,g,oe);continue}if(St==="attributename"&&Ib(_t,"href")){bi(ke,g,oe);continue}if(!R.forceKeepAttr){if(!R.keepAttr){bi(ke,g,oe);continue}if(!im&&gt(PP,_t)){bi(ke,g,oe);continue}if(zn&&(_t=aa(_t)),!Em(Y,St,_t)){bi(ke,g,oe);continue}_t=DC(Y,St,je,_t),_t!==Sd&&SC(g,ke,je,_t)&&Tm&&Mb(e.removed)}}_n(Ae.afterSanitizeAttributes,g,null)},da=function(g){let D=null,R=bm(g);for(_n(Ae.beforeSanitizeShadowDOM,g,null);D=R.nextNode();)if(_n(Ae.uponSanitizeShadowNode,D,null),wm(D,g),Sm(D),_r(D.content)&&da(D.content),ho(D)===At.element){let $=Ft(D);_r($)&&(Dd($),da($))}_n(Ae.afterSanitizeShadowDOM,g,null)},Dd=function(g){let D=[{node:g,shadow:null}];for(;D.length>0;){let R=D.pop();if(R.shadow){da(R.shadow);continue}let $=R.node,oe=ho($)===At.element,ke=B($);if(ke)for(let je=ke.length-1;je>=0;--je)D.push({node:ke[je],shadow:null});if(oe){let je=nt?nt($):null;if(typeof je=="string"&&ze(je)==="template"){let Dt=$.content;_r(Dt)&&D.push({node:Dt,shadow:null})}}if(oe){let je=Ft($);_r(je)&&D.push({node:null,shadow:je},{node:je,shadow:null})}}};return e.sanitize=function(L){let g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},D=null,R=null,$=null,Y=null;if(yd=!L,yd&&(L="<!-->"),typeof L!="string"&&!vo(L)&&(L=_P(L),typeof L!="string"))throw cr("dirty is not a string, aborting");if(!e.isSupported)return L;md?(Le=Js,Fe=ea):wd(g),(Ae.uponSanitizeElement.length>0||Ae.uponSanitizeAttribute.length>0)&&(Le=Lt(Le)),Ae.uponSanitizeAttribute.length>0&&(Fe=Lt(Fe)),e.removed=[];let oe=vd&&typeof L!="string"&&vo(L);if(oe){CC(L);let Dt=cd(L);if(typeof Dt=="string"){let St=ze(Dt);if(!Le[St]||go[St])throw oa(L),cr("root node is forbidden and cannot be sanitized in-place")}if(la(L))throw oa(L),cr("root node is clobbered and cannot be sanitized in-place");try{Dd(L)}catch(St){throw oa(L),St}}else if(vo(L))D=ym("<!---->"),R=D.ownerDocument.importNode(L,!0),R.nodeType===At.element&&R.nodeName==="BODY"||R.nodeName==="HTML"?D=R:D.appendChild(R),Dd(D);else{if(!fr&&!zn&&!yi&&L.indexOf("<")===-1)return Et&&na?ur(L):L;if(D=ym(L),!D)return fr?null:na?_i:""}D&&gd&&Gn(D.firstChild);let ke=oe?L:D;try{let Dt=bm(ke);for(;$=Dt.nextNode();)wm($,ke),Sm($),_r($.content)&&da($.content)}catch(Dt){throw oe&&(oa(L),dr(e.removed,St=>{St.element&&sa(St.element)})),Dt}if(oe)return dr(e.removed,Dt=>{Dt.element&&sa(Dt.element)}),zn&&Ed(L),L;if(fr){if(zn&&Ed(D),ta)for(Y=tC.call(D.ownerDocument);D.firstChild;)Y.appendChild(D.firstChild);else Y=D;return(Fe.shadowroot||Fe.shadowrootmode)&&(Y=iC.call(i,Y,!0)),Y}let je=yi?D.outerHTML:D.innerHTML;return yi&&Le["!doctype"]&&D.ownerDocument&&D.ownerDocument.doctype&&D.ownerDocument.doctype.name&&gt(MP,D.ownerDocument.doctype.name)&&(je="<!DOCTYPE "+D.ownerDocument.doctype.name+`>
63
+ `+je),zn&&(je=aa(je)),Et&&na?ur(je):je},e.setConfig=function(){let L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};wd(L),md=!0,Js=Le,ea=Fe},e.clearConfig=function(){gr=null,md=!1,Js=null,ea=null,Et=dd,_i=""},e.isValidAttribute=function(L,g,D){gr||wd({});let R=ze(L),$=ze(g);return Em(R,$,D)},e.addHook=function(L,g){typeof g=="function"&&Pt(Ae,L)&&qs(Ae[L],g)},e.removeHook=function(L,g){if(Pt(Ae,L)){if(g!==void 0){let D=dP(Ae[L],g);return D===-1?void 0:uP(Ae[L],D,1)[0]}return Mb(Ae[L])}},e.removeHooks=function(L){Pt(Ae,L)&&(Ae[L]=[])},e.removeAllHooks=function(){Ae=jb()},e}var Gb=zb();var po=class n{markdown=N.required();html=H(()=>{let e=(this.markdown()??"").trim();return e?Gb.sanitize(we.parse(e,{async:!1})):""});static \u0275fac=function(t){return new(t||n)};static \u0275cmp=ce({type:n,selectors:[["app-markdown-text"]],inputs:{markdown:[1,"markdown"]},decls:1,vars:1,consts:[[1,"markdown",3,"innerHTML"]],template:function(t,i){t&1&&se(0,"div",0),t&2&&Z("innerHTML",i.html(),Jf)},styles:[".markdown[_ngcontent-%COMP%]{color:var(--text);font-size:13px;line-height:1.55;word-wrap:break-word}.markdown[_ngcontent-%COMP%] [_ngcontent-%COMP%]:first-child{margin-top:0}.markdown[_ngcontent-%COMP%] [_ngcontent-%COMP%]:last-child{margin-bottom:0}.markdown[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0 0 8px}.markdown[_ngcontent-%COMP%] h1[_ngcontent-%COMP%], .markdown[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], .markdown[_ngcontent-%COMP%] h3[_ngcontent-%COMP%], .markdown[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{color:var(--text-bright);font-size:14px;font-weight:600;margin:14px 0 6px}.markdown[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font-size:16px}.markdown[_ngcontent-%COMP%] ul[_ngcontent-%COMP%], .markdown[_ngcontent-%COMP%] ol[_ngcontent-%COMP%]{margin:0 0 8px;padding-left:22px}.markdown[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{margin:2px 0}.markdown[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{font-family:var(--mono);font-size:12px;background:var(--bg);border:1px solid var(--border);border-radius:3px;padding:1px 4px}.markdown[_ngcontent-%COMP%] pre[_ngcontent-%COMP%]{background:var(--bg);border:1px solid var(--border);border-radius:4px;padding:8px 10px;overflow-x:auto;margin:0 0 8px}.markdown[_ngcontent-%COMP%] pre[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{background:none;border:none;padding:0}.markdown[_ngcontent-%COMP%] blockquote[_ngcontent-%COMP%]{border-left:3px solid var(--border);color:var(--text-dim);margin:0 0 8px;padding:2px 10px}.markdown[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:var(--accent);text-decoration:none}.markdown[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:underline}.markdown[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{border-collapse:collapse;margin:0 0 8px}.markdown[_ngcontent-%COMP%] th[_ngcontent-%COMP%], .markdown[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{border:1px solid var(--border);padding:4px 8px;text-align:left}.markdown[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:100%}.markdown[_ngcontent-%COMP%] hr[_ngcontent-%COMP%]{border:none;border-top:1px solid var(--border);margin:10px 0}"],changeDetection:0})};var qb=(n,e)=>e.id;function LP(n,e){n&1&&(p(0,"div",1),f(1,"Loading diff..."),m())}function FP(n,e){if(n&1&&(p(0,"div",2),f(1),m()),n&2){let t=u();d(),O(t.error())}}function VP(n,e){n&1&&(p(0,"div",3),f(1,"Binary file not shown."),m())}function BP(n,e){if(n&1&&(p(0,"div",5),f(1),m()),n&2){let t=u().$implicit;d(),O(t.text)}}function jP(n,e){n&1&&(F(),U(0,"polyline",22))}function $P(n,e){n&1&&(F(),U(0,"polyline",23))}function HP(n,e){if(n&1&&(p(0,"div",25),U(1,"app-author-avatar",33),p(2,"div",34)(3,"div",35)(4,"span",36),f(5),m(),f(6),m(),U(7,"app-markdown-text",37),m()()),n&2){let t=e.$implicit,i=u(7);d(),I("name",t.author.name)("email",t.author.email||""),d(4),O(t.author.name),d(),Q(" ",i.formatDate(t.createdAt)," "),d(),I("markdown",t.content)}}function UP(n,e){if(n&1&&(p(0,"option",32),f(1),m()),n&2){let t=e.$implicit,i=u(2).$implicit,r=u(5);I("value",t)("selected",t===i.status),d(),Q(" ",r.statusLabel(t)," ")}}function zP(n,e){if(n&1){let t=A();p(0,"div",24),X(1,HP,8,5,"div",25,qb),p(3,"div",26)(4,"input",27),S("input",function(r){y(t);let o=u().$implicit,s=u(5);return b(s.setReplyDraft(o.id,r))})("keydown.enter",function(){y(t);let r=u().$implicit,o=u(5);return b(o.sendReply(r.id))}),m(),p(5,"button",28),S("click",function(){y(t);let r=u().$implicit,o=u(5);return b(o.sendReply(r.id))}),f(6," Reply "),m()(),p(7,"div",29)(8,"label",30),f(9," Status "),p(10,"select",31),S("change",function(r){y(t);let o=u().$implicit,s=u(5);return b(s.onStatusChange(o,r))}),X(11,UP,2,3,"option",32,Sn),m()()()()}if(n&2){let t=u().$implicit,i=u(5);d(),J(t.comments),d(3),I("value",i.replyDraft(t.id))("disabled",i.posting()),d(),I("disabled",i.posting()||!i.replyDraft(t.id).trim()),d(5),I("value",t.status)("disabled",i.posting()),d(),J(i.threadStatuses)}}function GP(n,e){if(n&1){let t=A();p(0,"div",16)(1,"button",17),S("click",function(){let r=y(t).$implicit,o=u(5);return b(o.toggleThread(r.id))}),p(2,"span",18),f(3),m(),p(4,"span",19),f(5),m(),p(6,"span",20),f(7),m(),F(),p(8,"svg",21),T(9,jP,1,0,":svg:polyline",22)(10,$P,1,0,":svg:polyline",23),m()(),T(11,zP,13,5,"div",24),m()}if(n&2){let t=e.$implicit,i=u(5);ge("expanded",i.isExpanded(t.id)),I("id","pr-thread-"+t.id),d(2),pt("status-"+t.status),d(),Q(" ",i.statusLabel(t.status)," "),d(2),pi(" ",t.comments[0]==null||t.comments[0].author==null?null:t.comments[0].author.name,": ",t.comments[0]==null?null:t.comments[0].content," "),d(2),O(t.comments.length),d(2),M(i.isExpanded(t.id)?9:10),d(2),M(i.isExpanded(t.id)?11:-1)}}function WP(n,e){if(n&1){let t=A();p(0,"div",15)(1,"div",38),f(2),p(3,"button",39),S("click",function(){y(t);let r=u(5);return b(r.closeComposer())}),f(4,"Cancel"),m()(),p(5,"textarea",40),S("input",function(r){y(t);let o=u(5);return b(o.composerText.set(r.target.value))}),m(),p(6,"div",41)(7,"button",42),S("click",function(){y(t);let r=u(5);return b(r.submitComposer())}),f(8," Comment "),m()()()}if(n&2){let t,i=u(5);d(2),Q(" Comment on line ",(t=i.composer())==null?null:t.line," "),d(3),I("value",i.composerText()),d(2),I("disabled",i.posting()||!i.composerText().trim())}}function qP(n,e){if(n&1){let t=A();p(0,"div",6)(1,"span",7),f(2),m(),p(3,"span",8),f(4),m(),p(5,"span",9),f(6),m(),p(7,"span",10),f(8),m(),p(9,"button",11),S("click",function(){y(t);let r=u().$implicit,o=u(3);return b(o.openComposer(r))}),F(),p(10,"svg",12),U(11,"path",13),m()()(),X(12,GP,12,11,"div",14,qb),T(14,WP,9,3,"div",15)}if(n&2){let t=u().$implicit,i=u(3);ge("add",t.type==="add")("del",t.type==="del"),d(2),O(t.oldLine??""),d(2),O(t.newLine??""),d(2),Q(" ",t.type==="add"?"+":t.type==="del"?"\u2212":""," "),d(2),O(t.text),d(4),J(i.threadsAt(t)),d(2),M(i.composerAt(t)?14:-1)}}function ZP(n,e){if(n&1&&T(0,BP,2,1,"div",5)(1,qP,15,9),n&2){let t=e.$implicit;M(t.type==="hunk"?0:1)}}function YP(n,e){if(n&1&&(p(0,"div",4),X(1,ZP,2,1,null,null,un),m()),n&2){let t=u();d(),J(t.lines)}}function QP(n,e){n&1&&T(0,VP,2,0,"div",3)(1,YP,3,0,"div",4),n&2&&M(e.status==="binary"?0:1)}function KP(n,e){n&1&&(p(0,"div",3),f(1,"Select a file to view its changes."),m())}var Wb={active:"Active",fixed:"Resolved",wontFix:"Won't fix",closed:"Closed",byDesign:"By design",pending:"Pending"},ed=class n{diff=N(null);threads=N([]);loading=N(!1);error=N("");posting=N(!1);focus=N(null);commentSubmit=W();replySubmit=W();statusSubmit=W();threadStatuses=Object.keys(Wb);composer=x(null);composerText=x("");expanded=x({});replyDrafts=x({});threadsByAnchor=H(()=>{let e=new Map;for(let t of this.threads()){if(!t.filePath||t.line===null||!t.side)continue;let i=`${t.side}:${t.line}`;e.set(i,[...e.get(i)??[],t])}return e});constructor(){xe(()=>{let e=this.focus();if(!e)return;let t=this.threadsByAnchor().get(`${e.side}:${e.line}`)??[],i={};for(let r of t)i[r.id]=!0;if(Object.keys(i).length){this.expanded.update(o=>G(G({},o),i));let r=t[0];setTimeout(()=>document.getElementById(`pr-thread-${r.id}`)?.scrollIntoView({block:"center"}))}})}threadsAt(e){let t=[];e.oldLine!==void 0&&t.push(`left:${e.oldLine}`),e.newLine!==void 0&&t.push(`right:${e.newLine}`);let i=[];for(let r of t)i.push(...this.threadsByAnchor().get(r)??[]);return i}openComposer(e){if(e.type!=="add"&&e.type!=="del"&&e.type!=="context")return;let t=e.type==="del"?"left":"right",i=t==="left"?e.oldLine:e.newLine;i!==void 0&&(this.composer.set({line:i,side:t}),this.composerText.set(""))}composerAt(e){let t=this.composer();return t?t.side==="left"?e.oldLine===t.line:e.newLine===t.line:!1}submitComposer(){let e=this.composer(),t=this.composerText().trim();!e||!t||this.commentSubmit.emit(le(G({filePath:this.diff()?.path??""},e),{content:t}))}closeComposer(){this.composer.set(null),this.composerText.set("")}isExpanded(e){return this.expanded()[e]===!0}toggleThread(e){this.expanded.update(t=>le(G({},t),{[e]:!t[e]}))}replyDraft(e){return this.replyDrafts()[e]??""}setReplyDraft(e,t){let i=t.target.value;this.replyDrafts.update(r=>le(G({},r),{[e]:i}))}sendReply(e){let t=this.replyDraft(e).trim();t&&this.replySubmit.emit({threadId:e,content:t})}onStatusChange(e,t){let i=t.target.value;i&&i!==e.status&&this.statusSubmit.emit({threadId:e.id,status:i})}statusLabel(e){return Wb[e]??e}formatDate(e){if(!e)return"";let t=new Date(e);return Number.isNaN(t.getTime())?"":t.toLocaleString()}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=ce({type:n,selectors:[["app-pr-file-diff"]],inputs:{diff:[1,"diff"],threads:[1,"threads"],loading:[1,"loading"],error:[1,"error"],posting:[1,"posting"],focus:[1,"focus"]},outputs:{commentSubmit:"commentSubmit",replySubmit:"replySubmit",statusSubmit:"statusSubmit"},decls:5,vars:1,consts:[[1,"file-diff"],["role","status",1,"diff-status"],["role","alert",1,"diff-status","error"],[1,"diff-status"],[1,"diff-table"],[1,"hunk-row"],[1,"diff-line"],[1,"num","old"],[1,"num","new"],["aria-hidden","true",1,"marker"],[1,"text"],["type","button","title","Comment on this line","aria-label","Comment on this line",1,"line-comment-btn",3,"click"],["viewBox","0 0 24 24","aria-hidden","true"],["d","M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"],[1,"thread",3,"id","expanded"],[1,"composer"],[1,"thread",3,"id"],["type","button",1,"thread-head",3,"click"],[1,"thread-status"],[1,"thread-preview"],[1,"thread-count"],["viewBox","0 0 24 24","aria-hidden","true",1,"chevron"],["points","6 9 12 15 18 9"],["points","9 6 15 12 9 18"],[1,"thread-body"],[1,"comment"],[1,"reply-row"],["type","text","placeholder","Reply...",1,"reply-input",3,"input","keydown.enter","value","disabled"],["type","button",1,"btn","small",3,"click","disabled"],[1,"thread-actions"],[1,"status-label"],[3,"change","value","disabled"],[3,"value","selected"],[3,"name","email"],[1,"comment-main"],[1,"comment-meta"],[1,"comment-author"],[3,"markdown"],[1,"composer-title"],["type","button",1,"btn","small",3,"click"],["rows","3","placeholder","Leave a comment (markdown supported)",1,"composer-text",3,"input","value"],[1,"composer-actions"],["type","button",1,"btn","primary",3,"click","disabled"]],template:function(t,i){if(t&1&&(p(0,"div",0),T(1,LP,2,0,"div",1)(2,FP,2,1,"div",2)(3,QP,2,1)(4,KP,2,0,"div",3),m()),t&2){let r;d(),M(i.loading()?1:i.error()?2:(r=i.diff())?3:4,r)}},dependencies:[Mn,po],styles:[".file-diff[_ngcontent-%COMP%]{min-height:0;overflow:auto;background:var(--bg-alt)}.diff-status[_ngcontent-%COMP%]{padding:16px;color:var(--text-dim);font-size:13px}.diff-status.error[_ngcontent-%COMP%]{color:var(--red)}.diff-table[_ngcontent-%COMP%]{font-family:var(--mono);font-size:12px;line-height:18px;padding-bottom:24px}.hunk-row[_ngcontent-%COMP%]{background:#3794ff14;color:var(--text-dim);padding:2px 8px;-webkit-user-select:none;user-select:none}.diff-line[_ngcontent-%COMP%]{display:flex;align-items:flex-start;white-space:pre}.diff-line.add[_ngcontent-%COMP%]{background:#89d1851f}.diff-line.del[_ngcontent-%COMP%]{background:#f487711f}.diff-line[_ngcontent-%COMP%] .num[_ngcontent-%COMP%]{flex:none;width:46px;text-align:right;padding-right:8px;color:var(--text-dim);-webkit-user-select:none;user-select:none}.diff-line[_ngcontent-%COMP%] .marker[_ngcontent-%COMP%]{flex:none;width:16px;text-align:center;color:var(--text-dim);-webkit-user-select:none;user-select:none}.diff-line.add[_ngcontent-%COMP%] .marker[_ngcontent-%COMP%]{color:#89d185}.diff-line.del[_ngcontent-%COMP%] .marker[_ngcontent-%COMP%]{color:#f48771}.diff-line[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{flex:1;min-width:0;color:var(--text);overflow-wrap:normal}.diff-line[_ngcontent-%COMP%] .line-comment-btn[_ngcontent-%COMP%]{flex:none;display:flex;align-items:center;justify-content:center;width:20px;height:18px;margin-right:8px;border:none;border-radius:3px;background:transparent;color:var(--text-dim);cursor:pointer;visibility:hidden}.diff-line[_ngcontent-%COMP%]:hover .line-comment-btn[_ngcontent-%COMP%]{visibility:visible}.line-comment-btn[_ngcontent-%COMP%]:hover{background:var(--bg-hover);color:var(--accent)}.line-comment-btn[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.thread[_ngcontent-%COMP%], .composer[_ngcontent-%COMP%]{font-family:initial;margin:2px 12px 2px 54px;border:1px solid var(--border);border-radius:4px;background:var(--bg);overflow:hidden}.thread-head[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;width:100%;padding:5px 8px;border:none;background:transparent;color:var(--text);font-size:12px;text-align:left;cursor:pointer;min-width:0}.thread-head[_ngcontent-%COMP%]:hover{background:var(--bg-hover)}.thread-status[_ngcontent-%COMP%]{flex:none;border-radius:3px;font-size:10px;font-weight:600;padding:1px 5px;text-transform:uppercase}.thread-status.status-active[_ngcontent-%COMP%]{background:#3794ff2e;color:var(--accent)}.thread-status.status-fixed[_ngcontent-%COMP%]{background:#89d1852e;color:#89d185}.thread-status.status-wontFix[_ngcontent-%COMP%], .thread-status.status-closed[_ngcontent-%COMP%], .thread-status.status-byDesign[_ngcontent-%COMP%], .thread-status.status-pending[_ngcontent-%COMP%]{background:#dcb67a2e;color:#dcb67a}.thread-preview[_ngcontent-%COMP%]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--text-dim)}.thread-count[_ngcontent-%COMP%]{flex:none;color:var(--text-dim);font-size:11px}.chevron[_ngcontent-%COMP%]{width:12px;height:12px;flex:none;fill:none;stroke:var(--text-dim);stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.thread-body[_ngcontent-%COMP%]{border-top:1px solid var(--border);padding:8px;display:flex;flex-direction:column;gap:8px}.comment[_ngcontent-%COMP%]{display:flex;gap:8px}.comment-main[_ngcontent-%COMP%]{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}.comment-meta[_ngcontent-%COMP%]{color:var(--text-dim);font-size:11px}.comment-author[_ngcontent-%COMP%]{color:var(--text-bright);font-weight:600}.reply-row[_ngcontent-%COMP%]{display:flex;gap:6px}.reply-input[_ngcontent-%COMP%]{flex:1;min-width:0;height:26px;padding:0 8px;border:1px solid var(--border);border-radius:3px;background:var(--bg-alt);color:var(--text);font-size:12px}.reply-input[_ngcontent-%COMP%]:focus{outline:none;border-color:var(--accent)}.thread-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}.status-label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px;color:var(--text-dim);font-size:11px}.status-label[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{height:24px;padding:0 4px;border:1px solid var(--border);border-radius:3px;background:var(--bg-alt);color:var(--text);font-size:12px}.btn.small[_ngcontent-%COMP%]{height:24px;padding:0 10px;font-size:12px}.composer[_ngcontent-%COMP%]{border-color:var(--accent)}.composer-title[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:5px 8px;color:var(--text-dim);font-size:11px;font-weight:600}.composer-text[_ngcontent-%COMP%]{display:block;width:calc(100% - 16px);margin:0 8px;padding:6px 8px;border:1px solid var(--border);border-radius:3px;background:var(--bg-alt);color:var(--text);font-size:12px;font-family:var(--mono);resize:vertical;box-sizing:border-box}.composer-text[_ngcontent-%COMP%]:focus{outline:none;border-color:var(--accent)}.composer-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;padding:6px 8px}"],changeDetection:0})};var XP=()=>[],Qb=n=>({$implicit:n}),Kb=(n,e)=>e.value,nd=(n,e)=>e.id,JP=(n,e)=>e.path;function eO(n,e){n&1&&(p(0,"div",4),f(1,"Loading pull request..."),m())}function tO(n,e){n&1&&(p(0,"span",11),f(1,"Draft"),m())}function nO(n,e){if(n&1){let t=A();p(0,"button",31),S("click",function(){let r=y(t).$implicit,o=u(3);return b(o.vote(r.value))}),U(1,"span"),f(2),m()}if(n&2){let t=e.$implicit,i=u(2),r=u();ge("current",r.voteMeta(i.myVote).cls==="vote-"+t.icon),d(),pt("vote-dot vote-"+t.icon),d(),Q("",t.label," ")}}function iO(n,e){if(n&1&&(p(0,"div",19),X(1,nO,3,5,"button",30,Kb),m()),n&2){let t=u(2);d(),J(t.voteOptions)}}function rO(n,e){if(n&1){let t=A();p(0,"button",18),S("click",function(){y(t);let r=u(2);return b(r.cancelAutoComplete())}),f(1,"Cancel auto-complete"),m()}if(n&2){let t=u(2);I("disabled",t.busy())}}function oO(n,e){if(n&1){let t=A();p(0,"button",18),S("click",function(){y(t);let r=u(2);return b(r.openAutoComplete())}),f(1,"Set auto-complete"),m()}if(n&2){let t=u(2);I("disabled",t.busy())}}function sO(n,e){if(n&1&&(p(0,"div",25),f(1),m()),n&2){let t=u(2);d(),O(t.error())}}function aO(n,e){if(n&1){let t=A();p(0,"button",40),S("click",function(){y(t);let r=u(3);return b(r.startEditing())}),f(1,"Edit"),m()}}function lO(n,e){if(n&1){let t=A();p(0,"label"),f(1,"Title"),p(2,"input",41),S("input",function(r){y(t);let o=u(3);return b(o.editTitle.set(r.target.value))}),m()(),p(3,"label"),f(4,"Description"),p(5,"textarea",42),S("input",function(r){y(t);let o=u(3);return b(o.editDescription.set(r.target.value))}),m()(),p(6,"div",43)(7,"button",18),S("click",function(){y(t);let r=u(3);return b(r.editing.set(!1))}),f(8,"Cancel"),m(),p(9,"button",21),S("click",function(){y(t);let r=u(3);return b(r.saveEdit())}),f(10,"Save"),m()()}if(n&2){let t=u(3);d(2),I("value",t.editTitle()),d(3),I("value",t.editDescription()),d(2),I("disabled",t.busy()),d(2),I("disabled",t.busy()||!t.editTitle().trim())}}function cO(n,e){if(n&1&&U(0,"app-markdown-text",45),n&2){let t=u(3);I("markdown",t.description)}}function dO(n,e){n&1&&(p(0,"p",38),f(1,"No description provided."),m())}function uO(n,e){if(n&1&&(p(0,"span",47),f(1),m()),n&2){let t=e.$implicit;d(),O(t)}}function fO(n,e){if(n&1&&(p(0,"h2",44),f(1),m(),T(2,cO,1,1,"app-markdown-text",45)(3,dO,2,0,"p",38),p(4,"div",46),X(5,uO,2,1,"span",47,Sn),m()),n&2){let t=u(2);d(),O(t.title),d(),M(t.description?2:3),d(3),J(t.labels)}}function pO(n,e){if(n&1&&ys(0,48),n&2){let t=e.$implicit;u(3);let i=Xr(50);I("ngTemplateOutlet",i)("ngTemplateOutletContext",ac(2,Qb,t))}}function hO(n,e){if(n&1&&(p(0,"h3"),f(1,"Required"),m(),X(2,pO,1,4,"ng-container",48,nd)),n&2){let t=u(3);d(2),J(t.requiredReviewers())}}function mO(n,e){if(n&1&&ys(0,48),n&2){let t=e.$implicit;u(3);let i=Xr(50);I("ngTemplateOutlet",i)("ngTemplateOutletContext",ac(2,Qb,t))}}function gO(n,e){if(n&1&&(p(0,"h3"),f(1,"Other"),m(),X(2,mO,1,4,"ng-container",48,nd)),n&2){let t=u(3);d(2),J(t.otherReviewers())}}function _O(n,e){n&1&&(p(0,"p",38),f(1,"No reviewers."),m())}function vO(n,e){if(n&1){let t=A();p(0,"div",27)(1,"main",32)(2,"section",33)(3,"div",34)(4,"h2"),f(5,"Details"),m(),T(6,aO,2,0,"button",35),m(),T(7,lO,11,4)(8,fO,7,2),m()(),p(9,"aside",36)(10,"div",34)(11,"h2"),f(12,"Reviewers"),m()(),p(13,"app-chip-input",37),S("queryChange",function(r){y(t);let o=u(2);return b(o.reviewerQuery.set(r))})("select",function(r){y(t);let o=u(2);return b(o.addReviewer(r))}),m(),T(14,hO,4,0),T(15,gO,4,0),T(16,_O,2,0,"p",38),p(17,"button",39),S("click",function(){y(t);let r=u(2);return b(r.toggleDraft())}),f(18),m()()()}if(n&2){let t=u(),i=u();d(6),M(i.editing()?-1:6),d(),M(i.editing()?7:8),d(6),I("chips",xs(13,XP))("suggestions",i.reviewerSuggestions())("loading",i.reviewersLoading())("query",i.reviewerQuery())("error",i.reviewersError())("disabled",i.busy()),d(),M(i.requiredReviewers().length?14:-1),d(),M(i.otherReviewers().length?15:-1),d(),M(t.reviewers.length?-1:16),d(),I("disabled",i.busy()),d(),Q(" ",t.isDraft?"Publish pull request":"Convert to draft"," ")}}function yO(n,e){if(n&1){let t=A();p(0,"button",60),S("click",function(){y(t);let r=u().$implicit,o=u(3);return b(o.jumpToThread(r))}),f(1),m()}if(n&2){let t=u().$implicit;d(),pi("",t.filePath,":",t.line)}}function bO(n,e){if(n&1&&(p(0,"option",55),f(1),m()),n&2){let t=e.$implicit,i=u(4);I("value",t),d(),O(i.statusLabel(t))}}function CO(n,e){if(n&1&&(p(0,"div",56),U(1,"app-author-avatar",13),p(2,"div")(3,"div",61)(4,"strong"),f(5),m(),f(6),m(),U(7,"app-markdown-text",45),m()()),n&2){let t=e.$implicit,i=u(4);d(),I("name",t.author.name)("email",t.author.email||""),d(4),O(t.author.name),d(),Q(" \xB7 ",i.formatDate(t.createdAt)),d(),I("markdown",t.content)}}function xO(n,e){if(n&1){let t=A();p(0,"article",51)(1,"header")(2,"span"),f(3),m(),T(4,yO,2,2,"button",53),p(5,"select",54),S("change",function(r){let o=y(t).$implicit,s=u(3);return b(s.setThreadStatus(o.id,r.target.value))}),X(6,bO,2,2,"option",55,Sn),m()(),X(8,CO,8,5,"div",56,nd),p(10,"div",57)(11,"input",58,1),S("keydown.enter",function(){let r=y(t).$implicit,o=Xr(12);return u(3).replyToThread(r.id,o.value),b(o.value="")}),m(),p(13,"button",59),S("click",function(){let r=y(t).$implicit,o=Xr(12);return u(3).replyToThread(r.id,o.value),b(o.value="")}),f(14,"Reply"),m()()()}if(n&2){let t=e.$implicit,i=u(3);d(2),pt("thread-status status-"+t.status),d(),O(i.statusLabel(t.status)),d(),M(t.filePath?4:-1),d(),I("value",t.status)("disabled",i.busy()),d(),J(i.threadStatuses),d(2),J(t.comments),d(5),I("disabled",i.busy())}}function wO(n,e){n&1&&(p(0,"div",52),f(1,"No comments yet."),m())}function EO(n,e){if(n&1){let t=A();p(0,"div",28)(1,"section",49)(2,"h2"),f(3,"Add comment"),m(),p(4,"textarea",50),S("input",function(r){y(t);let o=u(2);return b(o.newComment.set(r.target.value))}),m(),p(5,"div",43)(6,"button",21),S("click",function(){y(t);let r=u(2);return b(r.addGeneralComment())}),f(7,"Comment"),m()()(),X(8,xO,15,7,"article",51,nd,!1,wO,2,0,"div",52),m()}if(n&2){let t=u(2);d(4),I("value",t.newComment()),d(2),I("disabled",t.busy()||!t.newComment().trim()),d(2),J(t.threads())}}function DO(n,e){if(n&1){let t=A();p(0,"button",65),S("click",function(){let r=y(t).$implicit,o=u(3);return b(o.selectFile(r))}),p(1,"span"),f(2),m(),p(3,"span"),f(4),m()()}if(n&2){let t,i=e.$implicit,r=u(3);ge("active",((t=r.selectedFile())==null?null:t.path)===i.path),I("title",i.path),d(),pt("file-status status-"+i.changeType),d(),O(i.changeType[0].toUpperCase()),d(2),O(i.path)}}function SO(n,e){n&1&&(p(0,"div",52),f(1,"No changed files."),m())}function TO(n,e){if(n&1){let t=A();p(0,"div",29)(1,"aside",62),X(2,DO,5,7,"button",63,JP,!1,SO,2,0,"div",52),m(),p(5,"app-pr-file-diff",64),S("commentSubmit",function(r){y(t);let o=u(2);return b(o.addInlineComment(r))})("replySubmit",function(r){y(t);let o=u(2);return b(o.replyFromDiff(r))})("statusSubmit",function(r){y(t);let o=u(2);return b(o.setStatusFromDiff(r))}),m()()}if(n&2){let t=u(2);d(2),J(t.files()),d(3),I("diff",t.selectedFile()?t.fileDiffs()[t.selectedFile().path]??null:null)("threads",t.selectedFileThreads())("loading",t.fileDiffLoading())("error",t.fileDiffError())("posting",t.busy())("focus",t.fileFocus())}}function MO(n,e){if(n&1){let t=A();p(0,"div",66),U(1,"app-author-avatar",13),p(2,"div",67)(3,"span"),f(4),m(),p(5,"small"),f(6),m()(),p(7,"button",68),S("click",function(){let r=y(t).$implicit,o=u(2);return b(o.toggleReviewerRequired(r))}),f(8,"Required"),m(),p(9,"button",69),S("click",function(){let r=y(t).$implicit,o=u(2);return b(o.removeReviewer(r))}),f(10,"\xD7"),m()()}if(n&2){let t=e.$implicit,i=u(2);d(),I("name",t.name)("email",t.email||""),d(3),O(t.name),d(),pt(i.voteMeta(t.vote).cls),d(),O(i.voteMeta(t.vote).label),d(),ge("on",t.isRequired),I("title",t.isRequired?"Make optional":"Make required"),d(2),fe("aria-label","Remove "+t.name)}}function IO(n,e){if(n&1&&(p(0,"option",55),f(1),m()),n&2){let t=e.$implicit;I("value",t.value),d(),O(t.label)}}function kO(n,e){if(n&1){let t=A();p(0,"div",70),S("click",function(){y(t);let r=u(2);return r.completeOpen.set(!1),b(r.autoCompleteOpen.set(!1))}),m(),p(1,"section",71)(2,"h2"),f(3),m(),p(4,"label"),f(5,"Merge strategy"),p(6,"select",72),S("change",function(r){y(t);let o=u(2);return b(o.mergeStrategy.set(r.target.value))}),X(7,IO,2,2,"option",55,Kb),m()(),p(9,"label",73)(10,"input",74),S("change",function(r){y(t);let o=u(2);return b(o.deleteSourceBranch.set(r.target.checked))}),m(),f(11,"Delete source branch"),m(),p(12,"label",73)(13,"input",74),S("change",function(r){y(t);let o=u(2);return b(o.completeWorkItems.set(r.target.checked))}),m(),f(14,"Complete associated work items"),m(),p(15,"label",75)(16,"input",76),S("change",function(r){y(t);let o=u(2);return b(o.transitionWorkItems.set(r.target.checked))}),m(),f(17,"Transition linked work items"),m(),p(18,"div",43)(19,"button",16),S("click",function(){y(t);let r=u(2);return r.completeOpen.set(!1),b(r.autoCompleteOpen.set(!1))}),f(20,"Cancel"),m(),p(21,"button",21),S("click",function(){y(t);let r=u(2);return b(r.completeOpen()?r.applyComplete():r.applyAutoComplete())}),f(22),m()()()}if(n&2){let t=u(2);d(),fe("aria-label",t.completeOpen()?"Complete pull request":"Set auto-complete"),d(2),O(t.completeOpen()?"Complete pull request":"Set auto-complete"),d(3),I("value",t.mergeStrategy()),d(),J(t.mergeStrategies),d(3),I("checked",t.deleteSourceBranch()),d(3),I("checked",t.completeWorkItems()),d(3),I("checked",t.transitionWorkItems())("disabled",!t.completeWorkItems()),d(5),I("disabled",t.busy()),d(),O(t.completeOpen()?"Complete":"Enable")}}function PO(n,e){if(n&1){let t=A();p(0,"header",6)(1,"div",7)(2,"div",8)(3,"span",9),f(4),m(),p(5,"h1"),f(6),m(),p(7,"span",10),f(8),m(),T(9,tO,2,0,"span",11),m(),p(10,"div",12),U(11,"app-author-avatar",13),p(12,"span"),f(13),m(),p(14,"code"),f(15),m(),p(16,"span",14),f(17,"\u2192"),m(),p(18,"code"),f(19),m()()(),p(20,"div",15)(21,"button",16),S("click",function(){y(t);let r=u();return b(r.openInBrowser())}),f(22,"Open in Azure DevOps"),m(),p(23,"div",17)(24,"button",18),S("click",function(){y(t);let r=u();return b(r.reviewMenuOpen.set(!r.reviewMenuOpen()))}),f(25," Review \u25BE "),m(),T(26,iO,3,0,"div",19),m(),T(27,rO,2,1,"button",20)(28,oO,2,1,"button",20),p(29,"button",21),S("click",function(){y(t);let r=u();return b(r.openComplete())}),f(30,"Complete"),m(),p(31,"button",22),S("click",function(){y(t);let r=u();return b(r.closed.emit())}),f(32,"\xD7"),m()()(),p(33,"nav",23)(34,"button",24),S("click",function(){y(t);let r=u();return b(r.tab.set("overview"))}),f(35,"Overview"),m(),p(36,"button",24),S("click",function(){y(t);let r=u();return b(r.tab.set("files"))}),f(37,"Files "),p(38,"span"),f(39),m()(),p(40,"button",24),S("click",function(){y(t);let r=u();return b(r.tab.set("comments"))}),f(41,"Comments "),p(42,"span"),f(43),m()()(),T(44,sO,2,1,"div",25),p(45,"div",26),T(46,vO,19,14,"div",27)(47,EO,11,3,"div",28)(48,TO,6,7,"div",29),m(),Kr(49,MO,11,10,"ng-template",null,0,Vp),T(51,kO,23,9)}if(n&2){let t=e,i=u();d(4),Q("!",t.id),d(2),O(t.title),d(2),O(t.status),d(),M(t.isDraft?9:-1),d(2),I("name",t.author.name)("email",t.author.email||""),d(2),O(t.author.name),d(2),O(t.sourceBranch),d(4),O(t.targetBranch),d(5),I("disabled",i.busy()),d(2),M(i.reviewMenuOpen()?26:-1),d(),M(t.autoCompleteSetBy?27:28),d(2),I("disabled",i.busy()),d(2),I("disabled",i.busy()),d(3),ge("active",i.tab()==="overview"),d(2),ge("active",i.tab()==="files"),d(3),O(i.files().length),d(),ge("active",i.tab()==="comments"),d(3),O(i.threads().length),d(),M(i.error()?44:-1),d(2),M(i.tab()==="overview"?46:i.tab()==="comments"?47:48),d(5),M(i.completeOpen()||i.autoCompleteOpen()?51:-1)}}function OO(n,e){if(n&1){let t=A();p(0,"div",5)(1,"div"),f(2),m(),p(3,"button",16),S("click",function(){y(t);let r=u();return b(r.load())}),f(4,"Retry"),m()()}if(n&2){let t=u();d(2),O(t.error()||"Pull request could not be loaded.")}}var Zb={active:"Active",fixed:"Resolved",wontFix:"Won't fix",closed:"Closed",byDesign:"By design",pending:"Pending"},td=class n{git=k(mt);destroyRef=k(Je);prId=N.required();closed=W();changed=W();pr=x(null);threads=x([]);files=x([]);loading=x(!0);error=x("");busy=x(!1);tab=x("overview");editing=x(!1);editTitle=x("");editDescription=x("");reviewerQuery=x("");reviewerSuggestions=x([]);reviewersLoading=x(!1);reviewersError=x("");reviewMenuOpen=x(!1);completeOpen=x(!1);autoCompleteOpen=x(!1);mergeStrategy=x("noFastForward");deleteSourceBranch=x(!1);completeWorkItems=x(!1);transitionWorkItems=x(!1);newComment=x("");selectedFile=x(null);fileDiffs=x({});fileDiffLoading=x(!1);fileDiffError=x("");fileFocus=x(null);mergeStrategies=[{value:"noFastForward",label:"No fast-forward (merge commit)"},{value:"squash",label:"Squash changes"},{value:"rebase",label:"Rebase and fast-forward"},{value:"rebaseMerge",label:"Semi-linear merge"}];voteOptions=[{value:"approve",label:"Approve",icon:"approve"},{value:"approveWithSuggestions",label:"Approve with suggestions",icon:"suggestions"},{value:"waitForAuthor",label:"Waiting for author",icon:"waiting"},{value:"reject",label:"Reject",icon:"reject"},{value:"reset",label:"Remove my vote",icon:"none"}];threadStatuses=Object.keys(Zb);requiredReviewers=H(()=>(this.pr()?.reviewers??[]).filter(e=>e.isRequired));otherReviewers=H(()=>(this.pr()?.reviewers??[]).filter(e=>!e.isRequired));generalThreads=H(()=>this.threads().filter(e=>!e.filePath));inlineThreads=H(()=>this.threads().filter(e=>e.filePath));selectedFileThreads=H(()=>{let e=this.selectedFile();return e?this.inlineThreads().filter(t=>t.filePath===e.path||t.filePath===e.oldPath):[]});constructor(){lo(this.reviewerQuery).pipe(Tt(e=>(this.reviewerSuggestions.set([]),this.reviewersError.set(""),this.reviewersLoading.set(e.trim().length>=2),e.trim().length<2?De([]):this.git.searchReviewers(e.trim()).pipe(rt(()=>(this.reviewersError.set("Unable to load suggestions."),De([])))))),kn(this.destroyRef)).subscribe(e=>{this.reviewerSuggestions.set(e),this.reviewersLoading.set(!1)})}ngOnInit(){this.load()}load(){this.loading.set(!0),this.error.set(""),this.git.getPrDetail(this.prId()).pipe(Tt(e=>Yb({detail:De(e),threads:this.git.getPrThreads(this.prId()).pipe(rt(()=>De([]))),files:this.git.getPrChanges(this.prId()).pipe(rt(()=>De([])))})),kn(this.destroyRef)).subscribe({next:({detail:e,threads:t,files:i})=>{this.pr.set(e),this.threads.set(t),this.files.set(i),this.selectedFile()&&!i.some(r=>r.path===this.selectedFile().path)&&this.selectedFile.set(null),this.loading.set(!1)},error:e=>{this.loading.set(!1),this.error.set(this.errorMessage(e))}})}reload(){Yb({detail:this.git.getPrDetail(this.prId()),threads:this.git.getPrThreads(this.prId()).pipe(rt(()=>De([])))}).subscribe({next:({detail:e,threads:t})=>{this.pr.set(e),this.threads.set(t)},error:e=>this.error.set(this.errorMessage(e))})}run(e,t){this.busy()||(this.busy.set(!0),this.error.set(""),e().pipe(kn(this.destroyRef)).subscribe({next:()=>{this.busy.set(!1),this.changed.emit(),t?.()},error:i=>{this.busy.set(!1),this.error.set(this.errorMessage(i))}}))}vote(e){this.reviewMenuOpen.set(!1),this.run(()=>this.git.votePr(this.prId(),e),()=>this.reload())}startEditing(){this.editing.set(!0),this.editTitle.set(this.pr()?.title??""),this.editDescription.set(this.pr()?.description??"")}saveEdit(){let e=this.editTitle().trim();e&&this.run(()=>this.git.updatePr(this.prId(),{title:e,description:this.editDescription()}),()=>{this.editing.set(!1),this.reload()})}toggleDraft(){let e=this.pr();e&&this.run(()=>this.git.updatePr(this.prId(),{isDraft:!e.isDraft}),()=>this.reload())}addReviewer(e){this.reviewerQuery.set(""),this.reviewerSuggestions.set([]),this.run(()=>this.git.updatePrReviewer(this.prId(),{id:e.id,required:!1}),()=>this.reload())}toggleReviewerRequired(e){this.run(()=>this.git.updatePrReviewer(this.prId(),{id:e.id,required:!e.isRequired,vote:e.vote}),()=>this.reload())}removeReviewer(e){this.run(()=>this.git.updatePrReviewer(this.prId(),{id:e.id,remove:!0}),()=>this.reload())}openComplete(){this.mergeStrategy.set("noFastForward"),this.deleteSourceBranch.set(!1),this.completeWorkItems.set(!1),this.transitionWorkItems.set(!1),this.completeOpen.set(!0)}openAutoComplete(){this.mergeStrategy.set("noFastForward"),this.deleteSourceBranch.set(!1),this.completeWorkItems.set(!1),this.transitionWorkItems.set(!1),this.completeOpen.set(!1),this.autoCompleteOpen.set(!0)}completionOptions(){return{mergeStrategy:this.mergeStrategy(),deleteSourceBranch:this.deleteSourceBranch(),completeWorkItems:this.completeWorkItems(),transitionWorkItems:this.completeWorkItems()&&this.transitionWorkItems()}}applyComplete(){this.run(()=>this.git.completePr(this.prId(),this.completionOptions()),()=>{this.completeOpen.set(!1),this.reload()})}applyAutoComplete(){this.run(()=>this.git.setPrAutoComplete(this.prId(),!0,this.completionOptions()),()=>{this.autoCompleteOpen.set(!1),this.reload()})}cancelAutoComplete(){this.run(()=>this.git.setPrAutoComplete(this.prId(),!1),()=>this.reload())}addGeneralComment(){let e=this.newComment().trim();e&&this.run(()=>this.git.addPrComment(this.prId(),{content:e}),()=>{this.newComment.set(""),this.reload()})}replyToThread(e,t){t.trim()&&this.run(()=>this.git.addPrComment(this.prId(),{threadId:e,content:t}),()=>this.reload())}setThreadStatus(e,t){this.run(()=>this.git.setPrThreadStatus(this.prId(),e,t),()=>this.reload())}addInlineComment(e){this.run(()=>this.git.addPrComment(this.prId(),e),()=>this.reload())}replyFromDiff(e){this.replyToThread(e.threadId,e.content)}setStatusFromDiff(e){this.setThreadStatus(e.threadId,e.status)}jumpToThread(e){let t=this.files().find(i=>i.path===e.filePath)??this.files().find(i=>i.oldPath===e.filePath);!t||e.line===null||(this.tab.set("files"),this.selectFile(t),this.fileFocus.set({line:e.line,side:e.side??"right"}))}selectFile(e){this.selectedFile.set(e),this.fileDiffError.set(""),!(this.fileDiffs()[e.path]||e.changeType==="binary")&&(this.fileDiffLoading.set(!0),this.git.getPrFileDiff(this.prId(),e).pipe(kn(this.destroyRef)).subscribe({next:t=>{this.fileDiffs.update(i=>le(G({},i),{[e.path]:t})),this.fileDiffLoading.set(!1)},error:t=>{this.fileDiffLoading.set(!1),this.fileDiffError.set(this.errorMessage(t))}}))}voteMeta(e){switch(e){case 10:return{label:"Approved",cls:"vote-approve"};case 5:return{label:"Approved with suggestions",cls:"vote-suggestions"};case-5:return{label:"Waiting for author",cls:"vote-waiting"};case-10:return{label:"Rejected",cls:"vote-reject"};default:return{label:"No vote",cls:"vote-none"}}}statusLabel(e){return Zb[e]??e}formatDate(e){if(!e)return"";let t=new Date(e);return Number.isNaN(t.getTime())?"":t.toLocaleString()}openInBrowser(){let e=this.pr()?.webUrl;e&&window.open(e,"_blank","noopener")}onEscape(){if(this.editing()){this.editing.set(!1);return}if(this.reviewMenuOpen()||this.completeOpen()||this.autoCompleteOpen()){this.reviewMenuOpen.set(!1),this.completeOpen.set(!1),this.autoCompleteOpen.set(!1);return}this.busy()||this.closed.emit()}onBackdropClick(){!this.busy()&&!this.editing()&&!this.completeOpen()&&!this.autoCompleteOpen()&&this.closed.emit()}errorMessage(e){let t=e;return t?.status===400&&t.error?.error?t.error.error:"Failed to communicate with the Guito server."}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=ce({type:n,selectors:[["app-pr-dialog"]],hostBindings:function(t,i){t&1&&S("keydown.escape",function(){return i.onEscape()},Ze)},inputs:{prId:[1,"prId"]},outputs:{closed:"closed",changed:"changed"},decls:5,vars:1,consts:[["reviewerRow",""],["reply",""],[1,"backdrop",3,"click"],["role","dialog","aria-modal","true","aria-label","Pull request details",1,"pr-dialog"],["role","status",1,"state"],[1,"state"],[1,"dialog-header"],[1,"heading"],[1,"title-line"],[1,"pr-number"],[1,"badge","status"],[1,"badge","draft"],[1,"subtitle"],[3,"name","email"],["aria-hidden","true"],[1,"header-actions"],["type","button",1,"btn",3,"click"],[1,"menu-wrap"],["type","button",1,"btn",3,"click","disabled"],["role","menu",1,"menu"],["type","button",1,"btn",3,"disabled"],["type","button",1,"btn","primary",3,"click","disabled"],["type","button","aria-label","Close pull request","title","Close",1,"icon-btn","close",3,"click","disabled"],["aria-label","Pull request sections",1,"tabs"],["type","button",3,"click"],["role","alert",1,"error-banner"],[1,"dialog-body"],[1,"overview","content-pane"],[1,"comments","content-pane"],[1,"files-pane"],["type","button","role","menuitem",3,"current"],["type","button","role","menuitem",3,"click"],[1,"overview-main"],[1,"card","description-card"],[1,"card-head"],["type","button",1,"btn","small"],[1,"reviewers","card"],["placeholder","Add reviewer",3,"queryChange","select","chips","suggestions","loading","query","error","disabled"],[1,"empty"],["type","button",1,"btn","full",3,"click","disabled"],["type","button",1,"btn","small",3,"click"],["type","text",3,"input","value"],["rows","12",3,"input","value"],[1,"form-actions"],[1,"detail-title"],[3,"markdown"],[1,"labels"],[1,"label-chip"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"new-comment","card"],["rows","4","placeholder","Leave a comment (markdown supported)",3,"input","value"],[1,"thread-card","card"],[1,"state","inline"],["type","button",1,"path-chip"],["aria-label","Thread status",3,"change","value","disabled"],[3,"value"],[1,"comment"],[1,"reply"],["type","text","placeholder","Reply...",3,"keydown.enter"],["type","button",1,"btn","small",3,"click","disabled"],["type","button",1,"path-chip",3,"click"],[1,"comment-meta"],[1,"file-list"],["type","button",3,"active","title"],[3,"commentSubmit","replySubmit","statusSubmit","diff","threads","loading","error","posting","focus"],["type","button",3,"click","title"],[1,"reviewer-row"],[1,"reviewer-name"],["type","button",1,"required-toggle",3,"click","title"],["type","button",1,"icon-btn",3,"click"],[1,"sub-backdrop",3,"click"],["role","dialog","aria-modal","true",1,"sub-dialog"],[3,"change","value"],[1,"check"],["type","checkbox",3,"change","checked"],[1,"check","nested"],["type","checkbox",3,"change","checked","disabled"]],template:function(t,i){if(t&1&&(p(0,"div",2),S("click",function(){return i.onBackdropClick()}),m(),p(1,"section",3),T(2,eO,2,0,"div",4)(3,PO,52,25)(4,OO,5,1,"div",5),m()),t&2){let r;d(2),M(i.loading()?2:(r=i.pr())?3:4,r)}},dependencies:[Mn,co,po,ih,ed],styles:[".backdrop[_ngcontent-%COMP%]{position:fixed;inset:0;z-index:300;background:#0000009e}.pr-dialog[_ngcontent-%COMP%]{position:fixed;inset:3vh 3vw;z-index:301;display:flex;flex-direction:column;min-width:720px;overflow:hidden;border:1px solid var(--border);border-radius:8px;background:var(--bg);box-shadow:0 18px 60px #000000a6}.dialog-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:24px;min-height:76px;padding:10px 14px;border-bottom:1px solid var(--border);background:var(--bg-alt)}.heading[_ngcontent-%COMP%]{flex:1;min-width:0}.title-line[_ngcontent-%COMP%], .subtitle[_ngcontent-%COMP%], .header-actions[_ngcontent-%COMP%], .card-head[_ngcontent-%COMP%], .form-actions[_ngcontent-%COMP%], .reviewer-row[_ngcontent-%COMP%], .thread-card[_ngcontent-%COMP%] header[_ngcontent-%COMP%], .reply[_ngcontent-%COMP%]{display:flex;align-items:center}.title-line[_ngcontent-%COMP%]{gap:8px}h1[_ngcontent-%COMP%]{min-width:0;margin:0;overflow:hidden;color:var(--text-bright);font-size:18px;font-weight:600;text-overflow:ellipsis;white-space:nowrap}.pr-number[_ngcontent-%COMP%]{color:var(--text-dim);font-family:var(--mono)}.subtitle[_ngcontent-%COMP%]{gap:7px;margin-top:7px;color:var(--text-dim);font-size:12px}.subtitle[_ngcontent-%COMP%] app-author-avatar[_ngcontent-%COMP%]{transform:scale(.8);margin:-2px}code[_ngcontent-%COMP%]{max-width:220px;overflow:hidden;color:var(--text);font-family:var(--mono);text-overflow:ellipsis;white-space:nowrap}.header-actions[_ngcontent-%COMP%]{flex:none;gap:6px}.btn[_ngcontent-%COMP%], .icon-btn[_ngcontent-%COMP%], .tabs[_ngcontent-%COMP%] button[_ngcontent-%COMP%], .menu[_ngcontent-%COMP%] button[_ngcontent-%COMP%], .file-list[_ngcontent-%COMP%] button[_ngcontent-%COMP%], .required-toggle[_ngcontent-%COMP%], .path-chip[_ngcontent-%COMP%]{border:1px solid var(--border);border-radius:4px;background:var(--bg-alt);color:var(--text);cursor:pointer;font:inherit}.btn[_ngcontent-%COMP%]{height:30px;padding:0 11px}.btn[_ngcontent-%COMP%]:hover:not(:disabled), .icon-btn[_ngcontent-%COMP%]:hover:not(:disabled), .tabs[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover, .file-list[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover{background:var(--bg-hover);color:var(--text-bright)}.btn.primary[_ngcontent-%COMP%]{border-color:#2580d8;background:#0e639c;color:#fff}.btn.primary[_ngcontent-%COMP%]:hover:not(:disabled){background:#17b}.btn.small[_ngcontent-%COMP%]{height:26px;padding:0 9px;font-size:12px}.btn.full[_ngcontent-%COMP%]{width:100%;margin-top:14px}button[_ngcontent-%COMP%]:disabled{cursor:default;opacity:.55}.icon-btn[_ngcontent-%COMP%]{width:28px;height:28px;padding:0;font-size:18px;line-height:1}.close[_ngcontent-%COMP%]{border-color:transparent;background:transparent;font-size:23px}.badge[_ngcontent-%COMP%], .label-chip[_ngcontent-%COMP%], .thread-status[_ngcontent-%COMP%], .path-chip[_ngcontent-%COMP%], .file-status[_ngcontent-%COMP%]{border-radius:3px;padding:2px 6px;font-size:10px;font-weight:600}.badge[_ngcontent-%COMP%]{text-transform:uppercase}.badge.status[_ngcontent-%COMP%]{background:#3794ff29;color:var(--accent)}.badge.draft[_ngcontent-%COMP%]{border:1px solid var(--border);color:var(--text-dim)}.menu-wrap[_ngcontent-%COMP%]{position:relative}.menu[_ngcontent-%COMP%]{position:absolute;top:35px;right:0;z-index:4;width:210px;padding:4px;border:1px solid var(--border);border-radius:5px;background:var(--bg-alt);box-shadow:0 8px 24px #00000073}.menu[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;width:100%;padding:7px 8px;border:none;text-align:left}.menu[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover, .menu[_ngcontent-%COMP%] button.current[_ngcontent-%COMP%]{background:var(--bg-hover)}.vote-dot[_ngcontent-%COMP%]{width:9px;height:9px;border-radius:50%;background:var(--text-dim)}.vote-approve[_ngcontent-%COMP%], .vote-suggestions[_ngcontent-%COMP%]{color:#89d185!important}.vote-waiting[_ngcontent-%COMP%]{color:#dcb67a!important}.vote-reject[_ngcontent-%COMP%]{color:#f48771!important}.vote-dot.vote-approve[_ngcontent-%COMP%], .vote-dot.vote-suggestions[_ngcontent-%COMP%]{background:#89d185}.vote-dot.vote-waiting[_ngcontent-%COMP%]{background:#dcb67a}.vote-dot.vote-reject[_ngcontent-%COMP%]{background:#f48771}.tabs[_ngcontent-%COMP%]{display:flex;flex:none;height:38px;padding-left:14px;border-bottom:1px solid var(--border);background:var(--bg-alt)}.tabs[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{padding:0 15px;border-width:0 0 2px;border-radius:0;background:transparent;color:var(--text-dim)}.tabs[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{border-bottom-color:var(--accent);color:var(--text-bright)}.tabs[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{margin-left:4px;color:var(--text-dim)}.error-banner[_ngcontent-%COMP%]{flex:none;padding:7px 14px;background:#f14c4c1f;color:#f48771}.dialog-body[_ngcontent-%COMP%]{flex:1;min-height:0;overflow:hidden}.content-pane[_ngcontent-%COMP%]{height:100%;overflow:auto;padding:18px}.overview[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:16px}.card[_ngcontent-%COMP%]{border:1px solid var(--border);border-radius:5px;background:var(--bg-alt)}.description-card[_ngcontent-%COMP%], .reviewers[_ngcontent-%COMP%], .new-comment[_ngcontent-%COMP%], .thread-card[_ngcontent-%COMP%]{padding:14px}.card-head[_ngcontent-%COMP%]{justify-content:space-between;margin-bottom:12px}.card[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:0;color:var(--text-bright);font-size:14px}.detail-title[_ngcontent-%COMP%]{margin:0 0 12px!important;font-size:16px!important}label[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:5px;margin-bottom:12px;color:var(--text-dim);font-size:12px}input[_ngcontent-%COMP%], textarea[_ngcontent-%COMP%], select[_ngcontent-%COMP%]{border:1px solid var(--border);border-radius:3px;background:var(--bg);color:var(--text);font:inherit}input[_ngcontent-%COMP%], select[_ngcontent-%COMP%]{height:30px;padding:0 8px}textarea[_ngcontent-%COMP%]{width:100%;padding:8px;resize:vertical;font-family:var(--mono)}input[_ngcontent-%COMP%]:focus, textarea[_ngcontent-%COMP%]:focus, select[_ngcontent-%COMP%]:focus{outline:none;border-color:var(--accent)}.form-actions[_ngcontent-%COMP%]{justify-content:flex-end;gap:7px}.empty[_ngcontent-%COMP%]{color:var(--text-dim);font-style:italic}.labels[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:5px;margin-top:16px}.label-chip[_ngcontent-%COMP%]{background:#3794ff24;color:var(--accent)}.reviewers[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:16px 0 5px;color:var(--text-dim);font-size:10px;letter-spacing:.5px;text-transform:uppercase}.reviewer-row[_ngcontent-%COMP%]{gap:8px;min-height:42px;border-bottom:1px solid rgba(255,255,255,.05)}.reviewer-name[_ngcontent-%COMP%]{display:flex;flex:1;min-width:0;flex-direction:column}.reviewer-name[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.reviewer-name[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{font-size:10px}.required-toggle[_ngcontent-%COMP%]{padding:2px 5px;color:var(--text-dim);font-size:10px}.required-toggle.on[_ngcontent-%COMP%]{border-color:#dcb67a80;color:#dcb67a}.comments[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px;max-width:900px;margin:0 auto}.new-comment[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin-bottom:10px}.thread-card[_ngcontent-%COMP%] header[_ngcontent-%COMP%]{gap:8px;margin-bottom:12px}.thread-card[_ngcontent-%COMP%] header[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{margin-left:auto}.thread-status[_ngcontent-%COMP%]{background:#3794ff2e;color:var(--accent);text-transform:uppercase}.status-fixed[_ngcontent-%COMP%]{background:#89d1852e;color:#89d185}.status-wontFix[_ngcontent-%COMP%], .status-closed[_ngcontent-%COMP%], .status-byDesign[_ngcontent-%COMP%], .status-pending[_ngcontent-%COMP%]{background:#dcb67a2e;color:#dcb67a}.path-chip[_ngcontent-%COMP%]{max-width:480px;overflow:hidden;border:none;color:var(--accent);text-overflow:ellipsis;white-space:nowrap}.comment[_ngcontent-%COMP%]{display:flex;gap:9px;padding:8px 0;border-top:1px solid rgba(255,255,255,.05)}.comment[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{flex:1;min-width:0}.comment-meta[_ngcontent-%COMP%]{color:var(--text-dim);font-size:11px}.reply[_ngcontent-%COMP%]{gap:7px;margin-top:8px}.reply[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{flex:1}.files-pane[_ngcontent-%COMP%]{display:grid;grid-template-columns:280px minmax(0,1fr);height:100%}.file-list[_ngcontent-%COMP%]{overflow:auto;border-right:1px solid var(--border);background:var(--bg-alt)}.file-list[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{display:flex;align-items:center;gap:7px;width:100%;padding:7px 9px;overflow:hidden;border-width:0 0 1px;border-radius:0;text-align:left}.file-list[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{background:#3794ff24;color:var(--text-bright)}.file-list[_ngcontent-%COMP%] button[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.file-status[_ngcontent-%COMP%]{flex:none;width:19px;padding:1px 0;text-align:center}.file-status.status-added[_ngcontent-%COMP%]{color:#89d185}.file-status.status-deleted[_ngcontent-%COMP%]{color:#f48771}.file-status.status-renamed[_ngcontent-%COMP%]{color:#c586c0}.file-status.status-modified[_ngcontent-%COMP%]{color:var(--accent)}app-pr-file-diff[_ngcontent-%COMP%]{min-width:0;overflow:auto}.state[_ngcontent-%COMP%]{display:flex;height:100%;flex-direction:column;align-items:center;justify-content:center;gap:12px;color:var(--text-dim)}.state.inline[_ngcontent-%COMP%]{min-height:80px;padding:16px}.sub-backdrop[_ngcontent-%COMP%]{position:absolute;inset:0;z-index:8;background:#0000007a}.sub-dialog[_ngcontent-%COMP%]{position:absolute;z-index:9;top:50%;left:50%;width:min(440px,calc(100% - 40px));padding:18px;transform:translate(-50%,-50%);border:1px solid var(--border);border-radius:6px;background:var(--bg-alt);box-shadow:0 14px 42px #0009}.sub-dialog[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:0 0 18px;color:var(--text-bright);font-size:17px}.sub-dialog[_ngcontent-%COMP%] .check[_ngcontent-%COMP%]{flex-direction:row;align-items:center}.check[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:15px;height:15px}.check.nested[_ngcontent-%COMP%]{margin-left:23px}@media(max-width:900px){.pr-dialog[_ngcontent-%COMP%]{inset:1vh 1vw;min-width:620px}.dialog-header[_ngcontent-%COMP%]{align-items:flex-start}.header-actions[_ngcontent-%COMP%]{flex-wrap:wrap;justify-content:flex-end}.overview[_ngcontent-%COMP%]{grid-template-columns:1fr}.reviewers[_ngcontent-%COMP%]{order:-1}.files-pane[_ngcontent-%COMP%]{grid-template-columns:220px minmax(0,1fr)}}"],changeDetection:0})};function Yb(n){return new ae(e=>{let t=Object.keys(n),i={},r=t.length,o=!1;if(!r){e.next({}),e.complete();return}for(let s of t)n[s].subscribe({next:a=>{i[s]=a},error:a=>{o||(o=!0,e.error(a))},complete:()=>{--r===0&&!o&&(e.next(i),e.complete())}})})}var RO=()=>[],Zh=(n,e)=>e.name,NO=(n,e)=>e.index,AO=(n,e)=>e.path,LO=(n,e)=>e.id;function FO(n,e){n&1&&(F(),se(0,"polyline",4))}function VO(n,e){n&1&&(F(),se(0,"polyline",5))}function BO(n,e){n&1&&(v(0,"span",31),f(1,"current"),C())}function jO(n,e){if(n&1){let t=A();v(0,"button",26),j("click",function(){let r=y(t).$implicit,o=u(2);return b(o.selectBranch(r.name))})("contextmenu",function(r){let o=y(t).$implicit,s=u(2);return b(s.onContextMenu(r,{kind:"branch",branch:s.badgeOf(o)}))}),F(),v(1,"svg",16),se(2,"line",27)(3,"circle",28)(4,"circle",29)(5,"path",30),C(),he(),v(6,"span",23),f(7),C(),T(8,BO,2,0,"span",31),C()}if(n&2){let t=e.$implicit,i=u(2);ge("selected",i.selectedBranch()===t.name),Z("title",t.name),d(7),O(t.name),d(),M(t.current?8:-1)}}function $O(n,e){if(n&1){let t=A();v(0,"button",26),j("click",function(){let r=y(t).$implicit,o=u(3);return b(o.selectBranch(r.name))})("contextmenu",function(r){let o=y(t).$implicit,s=u(3);return b(s.onContextMenu(r,{kind:"branch",branch:s.badgeOf(o)}))}),F(),v(1,"svg",16),se(2,"line",27)(3,"circle",28)(4,"circle",29)(5,"path",30),C(),he(),v(6,"span",23),f(7),C()()}if(n&2){let t=e.$implicit,i=u(3);ge("selected",i.selectedBranch()===t.name),Z("title",t.name),d(7),O(t.name)}}function HO(n,e){if(n&1&&(v(0,"div",24),f(1,"Remote"),C(),X(2,$O,8,4,"button",25,Zh)),n&2){let t=u(2);d(2),J(t.remoteBranches())}}function UO(n,e){if(n&1){let t=A();v(0,"div",8)(1,"button",15),j("click",function(){y(t);let r=u();return b(r.selectBranch(""))}),F(),v(2,"svg",16),se(3,"line",17)(4,"line",18)(5,"line",19)(6,"circle",20)(7,"circle",21)(8,"circle",22),C(),he(),v(9,"span",23),f(10,"All Branches"),C()(),v(11,"div",24),f(12,"Local"),C(),X(13,jO,9,5,"button",25,Zh),T(15,HO,4,0),C()}if(n&2){let t=u();d(),ge("selected",t.selectedBranch()===""),d(12),J(t.localBranches()),d(2),M(t.showRemote()?15:-1)}}function zO(n,e){n&1&&(F(),se(0,"polyline",4))}function GO(n,e){n&1&&(F(),se(0,"polyline",5))}function WO(n,e){if(n&1){let t=A();v(0,"button",26),j("click",function(){let r=y(t).$implicit,o=u(2);return b(o.selectTag(r))})("contextmenu",function(r){let o=y(t).$implicit,s=u(2);return b(s.onContextMenu(r,{kind:"tag",branch:{type:"tag",name:o.name}}))}),F(),v(1,"svg",16),se(2,"path",33)(3,"line",34),C(),he(),v(4,"span",23),f(5),C()()}if(n&2){let t=e.$implicit,i=u(2);ge("selected",i.selectedCommitHash()===t.hash),Z("title",t.name),d(5),O(t.name)}}function qO(n,e){n&1&&(v(0,"div",32),f(1,"No tags"),C())}function ZO(n,e){if(n&1&&(v(0,"div",8),X(1,WO,6,4,"button",25,Zh,!1,qO,2,0,"div",32),C()),n&2){let t=u();d(),J(t.tags())}}function YO(n,e){n&1&&(F(),se(0,"polyline",4))}function QO(n,e){n&1&&(F(),se(0,"polyline",5))}function KO(n,e){if(n&1){let t=A();v(0,"button",36),j("contextmenu",function(r){let o=y(t).$implicit,s=u(2);return b(s.onContextMenu(r,{kind:"stash",stash:o}))}),F(),v(1,"svg",16),se(2,"path",37)(3,"line",38),C(),he(),v(4,"span",23),f(5),C(),v(6,"span",39),f(7),C()()}if(n&2){let t=e.$implicit,i=u(2);Z("title",t.message),d(5),O(i.stashLabel(t)),d(2),O(t.message)}}function XO(n,e){n&1&&(v(0,"div",32),f(1,"No stashes"),C())}function JO(n,e){if(n&1&&(v(0,"div",8),X(1,KO,8,3,"button",35,NO,!1,XO,2,0,"div",32),C()),n&2){let t=u();d(),J(t.stashes())}}function eR(n,e){n&1&&(F(),se(0,"polyline",4))}function tR(n,e){n&1&&(F(),se(0,"polyline",5))}function nR(n,e){if(n&1&&(v(0,"span",41),f(1),C()),n&2){let t=u().$implicit;d(),O(t.branch)}}function iR(n,e){if(n&1){let t=A();v(0,"button",36),j("contextmenu",function(r){let o=y(t).$implicit,s=u(2);return b(s.onContextMenu(r,{kind:"worktree",worktree:o}))}),F(),v(1,"svg",16),se(2,"path",40),C(),he(),v(3,"span",23),f(4),C(),T(5,nR,2,1,"span",41),C()}if(n&2){let t=e.$implicit,i=u(2);ge("selected",t.current),Z("title",t.path),d(4),O(i.worktreeLabel(t)),d(),M(t.branch?5:-1)}}function rR(n,e){n&1&&(v(0,"div",32),f(1,"No worktrees"),C())}function oR(n,e){if(n&1&&(v(0,"div",8),X(1,iR,6,5,"button",25,AO,!1,rR,2,0,"div",32),C()),n&2){let t=u();d(),J(t.worktrees())}}function sR(n,e){n&1&&(F(),se(0,"polyline",4))}function aR(n,e){n&1&&(F(),se(0,"polyline",5))}function lR(n,e){if(n&1&&(v(0,"div",45),f(1),C()),n&2){let t=u(3);d(),O(t.prError())}}function cR(n,e){n&1&&(v(0,"div",32),f(1,"Loading pull requests..."),C())}function dR(n,e){n&1&&(F(),se(0,"polyline",49))}function uR(n,e){n&1&&(F(),se(0,"polyline",49)(1,"line",57))}function fR(n,e){n&1&&(F(),se(0,"circle",58)(1,"polyline",59))}function pR(n,e){n&1&&(F(),se(0,"line",60)(1,"line",61))}function hR(n,e){n&1&&(F(),se(0,"circle",50))}function mR(n,e){n&1&&(v(0,"span",54),f(1,"Draft"),C())}function gR(n,e){n&1&&(v(0,"span",55),f(1,"Required"),C())}function _R(n,e){if(n&1){let t=A();v(0,"button",47),j("click",function(){let r=y(t).$implicit,o=u(4);return b(o.prSelect.emit(r.id))}),F(),v(1,"svg",48),T(2,dR,1,0,":svg:polyline",49)(3,uR,2,0)(4,fR,2,0)(5,pR,2,0)(6,hR,1,0,":svg:circle",50),C(),he(),v(7,"span",51)(8,"span",52)(9,"span",53),f(10),C(),T(11,mR,2,0,"span",54),T(12,gR,2,0,"span",55),C(),v(13,"span",56),f(14),C()()()}if(n&2){let t,i=e.$implicit,r=u(4);Z("title",r.prTooltip(i)),d(),pt(r.voteClass(i)),d(),M((t=i.myVote)===10?2:t===5?3:t===-5?4:t===-10?5:6),d(8),O(i.title),d(),M(i.isDraft?11:-1),d(),M(i.requiresMe?12:-1),d(2),sc(" ",i.author.name," \xB7 ",i.sourceBranch," \u2192 ",i.targetBranch," ")}}function vR(n,e){n&1&&(v(0,"div",32),f(1,"No active pull requests"),C())}function yR(n,e){if(n&1&&X(0,_R,15,10,"button",46,LO,!1,vR,2,0,"div",32),n&2){let t=u(3);J(t.pullRequests())}}function bR(n,e){if(n&1&&(v(0,"div",8),T(1,lR,2,1,"div",45)(2,cR,2,0,"div",32)(3,yR,3,1),C()),n&2){let t=u(2);d(),M(t.prError()?1:t.pullRequests()===null?2:3)}}function CR(n,e){if(n&1){let t=A();v(0,"section",1)(1,"div",9)(2,"button",2),j("click",function(){y(t);let r=u();return b(r.prsOpen.set(!r.prsOpen()))}),F(),v(3,"svg",3),T(4,sR,1,0,":svg:polyline",4)(5,aR,1,0,":svg:polyline",5),C(),he(),v(6,"span",6),f(7,"Pull Requests"),C(),v(8,"span",7),f(9),C()(),v(10,"button",42),j("click",function(){y(t);let r=u();return b(r.prRefresh.emit())}),F(),v(11,"svg",11),se(12,"polyline",43)(13,"path",44),C()()(),T(14,bR,4,1,"div",8),C()}if(n&2){let t=u();d(2),fe("aria-expanded",t.prsOpen()),d(2),M(t.prsOpen()?4:5),d(5),O((t.pullRequests()??xs(4,RO)).length),d(5),M(t.prsOpen()?14:-1)}}function xR(n,e){n&1&&(v(0,"div",14),f(1,"Loading..."),C())}var id=class n{branches=N.required();selectedBranch=N.required();showRemote=N.required();stashes=N.required();worktrees=N.required();tags=N.required();selectedCommitHash=N("");loading=N(!1);azureEnabled=N(!1);pullRequests=N(null);prError=N("");branchChange=W();tagSelect=W();contextMenu=W();worktreeCreate=W();prSelect=W();prRefresh=W();prsOpen=x(!0);branchesOpen=x(!0);tagsOpen=x(!0);stashesOpen=x(!0);worktreesOpen=x(!0);localBranches=H(()=>this.branches().filter(e=>!e.remote));remoteBranches=H(()=>this.branches().filter(e=>e.remote));selectBranch(e){this.branchChange.emit(this.selectedBranch()===e?"":e)}selectTag(e){this.tagSelect.emit(e)}voteClass(e){switch(e.myVote){case 10:return"vote-approve";case 5:return"vote-suggestions";case-5:return"vote-waiting";case-10:return"vote-reject";default:return"vote-none"}}prTooltip(e){let t=e.reviewers.map(i=>`${i.name}${i.isRequired?" (required)":""}`).join(", ");return[`!${e.id} ${e.title}`,`By ${e.author.name}${e.isDraft?" \xB7 draft":""}`,`${e.sourceBranch} \u2192 ${e.targetBranch}`,t?`Reviewers: ${t}`:""].filter(Boolean).join(`
64
+ `)}badgeOf(e){return{type:e.current?"head":e.remote?"remote":"local",name:e.name}}onContextMenu(e,t){e.preventDefault(),this.contextMenu.emit({x:e.clientX,y:e.clientY,target:t})}worktreeLabel(e){let t=e.path.split(/[\\/]/).filter(Boolean).pop()??e.path;return e.bare?`${t} (bare)`:e.detached?`${t} (detached)`:t}stashLabel(e){return`stash@{${e.index}}`}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=ce({type:n,selectors:[["app-side-panel"]],inputs:{branches:[1,"branches"],selectedBranch:[1,"selectedBranch"],showRemote:[1,"showRemote"],stashes:[1,"stashes"],worktrees:[1,"worktrees"],tags:[1,"tags"],selectedCommitHash:[1,"selectedCommitHash"],loading:[1,"loading"],azureEnabled:[1,"azureEnabled"],pullRequests:[1,"pullRequests"],prError:[1,"prError"]},outputs:{branchChange:"branchChange",tagSelect:"tagSelect",contextMenu:"contextMenu",worktreeCreate:"worktreeCreate",prSelect:"prSelect",prRefresh:"prRefresh"},decls:48,vars:18,consts:[["aria-label","Repository panel",1,"side-panel"],[1,"tree"],["type","button",1,"tree-head",3,"click"],["viewBox","0 0 24 24","aria-hidden","true",1,"chevron"],["points","6 9 12 15 18 9"],["points","9 6 15 12 9 18"],[1,"tree-title"],[1,"tree-count"],[1,"tree-body"],[1,"tree-head-row"],["type","button","title","Create worktree","aria-label","Create worktree",1,"head-action",3,"click"],["viewBox","0 0 24 24","aria-hidden","true"],["x1","12","y1","5","x2","12","y2","19"],["x1","5","y1","12","x2","19","y2","12"],["role","status",1,"panel-loading"],["type","button","title","Show commits from all branches",1,"row",3,"click"],["viewBox","0 0 24 24","aria-hidden","true",1,"row-icon"],["x1","8","y1","6","x2","21","y2","6"],["x1","8","y1","12","x2","21","y2","12"],["x1","8","y1","18","x2","21","y2","18"],["cx","3.5","cy","6","r","1.5"],["cx","3.5","cy","12","r","1.5"],["cx","3.5","cy","18","r","1.5"],[1,"row-label"],[1,"group-label"],["type","button",1,"row",3,"selected","title"],["type","button",1,"row",3,"click","contextmenu","title"],["x1","6","y1","3","x2","6","y2","15"],["cx","18","cy","6","r","3"],["cx","6","cy","18","r","3"],["d","M18 9a9 9 0 0 1-9 9"],["title","Current branch",1,"row-tag"],[1,"empty"],["d","M20.59 13.41l-7.17 7.17a2 2 0 0 1-2.83 0L2 12V2h10l8.59 8.59a2 2 0 0 1 0 2.83z"],["x1","7","y1","7","x2","7.01","y2","7"],["type","button",1,"row",3,"title"],["type","button",1,"row",3,"contextmenu","title"],["d","M21 8v13H3V8M1 3h22v5H1z"],["x1","10","y1","12","x2","14","y2","12"],[1,"row-tag","stash-message"],["d","M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"],[1,"row-tag"],["type","button","title","Refresh pull requests","aria-label","Refresh pull requests",1,"head-action",3,"click"],["points","23 4 23 10 17 10"],["d","M20.49 15a9 9 0 1 1-2.12-9.36L23 10"],["role","alert",1,"pr-error"],["type","button",1,"row","pr-row",3,"title"],["type","button",1,"row","pr-row",3,"click","title"],["viewBox","0 0 24 24","aria-hidden","true",1,"row-icon","vote-icon"],["points","20 6 9 17 4 12"],["cx","12","cy","12","r","8"],[1,"pr-main"],[1,"pr-line"],[1,"pr-title"],[1,"pr-badge","draft"],[1,"pr-badge","required"],[1,"pr-line","pr-meta"],["x1","20","y1","18","x2","20","y2","12"],["cx","12","cy","12","r","9"],["points","12 7 12 12 15 14"],["x1","5","y1","5","x2","19","y2","19"],["x1","19","y1","5","x2","5","y2","19"]],template:function(t,i){t&1&&(v(0,"aside",0)(1,"section",1)(2,"button",2),j("click",function(){return i.branchesOpen.set(!i.branchesOpen())}),F(),v(3,"svg",3),T(4,FO,1,0,":svg:polyline",4)(5,VO,1,0,":svg:polyline",5),C(),he(),v(6,"span",6),f(7,"Branches"),C(),v(8,"span",7),f(9),C()(),T(10,UO,16,3,"div",8),C(),v(11,"section",1)(12,"button",2),j("click",function(){return i.tagsOpen.set(!i.tagsOpen())}),F(),v(13,"svg",3),T(14,zO,1,0,":svg:polyline",4)(15,GO,1,0,":svg:polyline",5),C(),he(),v(16,"span",6),f(17,"Tags"),C(),v(18,"span",7),f(19),C()(),T(20,ZO,4,1,"div",8),C(),v(21,"section",1)(22,"button",2),j("click",function(){return i.stashesOpen.set(!i.stashesOpen())}),F(),v(23,"svg",3),T(24,YO,1,0,":svg:polyline",4)(25,QO,1,0,":svg:polyline",5),C(),he(),v(26,"span",6),f(27,"Stashes"),C(),v(28,"span",7),f(29),C()(),T(30,JO,4,1,"div",8),C(),v(31,"section",1)(32,"div",9)(33,"button",2),j("click",function(){return i.worktreesOpen.set(!i.worktreesOpen())}),F(),v(34,"svg",3),T(35,eR,1,0,":svg:polyline",4)(36,tR,1,0,":svg:polyline",5),C(),he(),v(37,"span",6),f(38,"Worktrees"),C(),v(39,"span",7),f(40),C()(),v(41,"button",10),j("click",function(){return i.worktreeCreate.emit()}),F(),v(42,"svg",11),se(43,"line",12)(44,"line",13),C()()(),T(45,oR,4,1,"div",8),C(),T(46,CR,15,5,"section",1),T(47,xR,2,0,"div",14),C()),t&2&&(d(2),fe("aria-expanded",i.branchesOpen()),d(2),M(i.branchesOpen()?4:5),d(5),O(i.branches().length),d(),M(i.branchesOpen()?10:-1),d(2),fe("aria-expanded",i.tagsOpen()),d(2),M(i.tagsOpen()?14:15),d(5),O(i.tags().length),d(),M(i.tagsOpen()?20:-1),d(2),fe("aria-expanded",i.stashesOpen()),d(2),M(i.stashesOpen()?24:25),d(5),O(i.stashes().length),d(),M(i.stashesOpen()?30:-1),d(3),fe("aria-expanded",i.worktreesOpen()),d(2),M(i.worktreesOpen()?35:36),d(5),O(i.worktrees().length),d(5),M(i.worktreesOpen()?45:-1),d(),M(i.azureEnabled()?46:-1),d(),M(i.loading()?47:-1))},styles:["[_nghost-%COMP%]{display:block;width:260px;flex:none;min-height:0;overflow-y:auto;background:var(--bg-alt);border-right:1px solid var(--border)}.side-panel[_ngcontent-%COMP%]{min-height:100%}.tree[_ngcontent-%COMP%]{border-bottom:1px solid var(--border)}.tree-head[_ngcontent-%COMP%]{display:flex;align-items:center;gap:4px;width:100%;height:26px;padding:0 6px;border:none;background:transparent;color:var(--text-bright);font-size:11px;font-weight:700;letter-spacing:.5px;text-transform:uppercase;cursor:pointer;-webkit-user-select:none;user-select:none}.tree-head[_ngcontent-%COMP%]:hover{background:var(--bg-hover)}.chevron[_ngcontent-%COMP%]{width:14px;height:14px;fill:none;stroke:var(--text-dim);stroke-width:2;stroke-linecap:round;stroke-linejoin:round;flex:none}.tree-title[_ngcontent-%COMP%]{flex:1;text-align:left}.tree-count[_ngcontent-%COMP%]{color:var(--text-dim);font-weight:400}.tree-body[_ngcontent-%COMP%]{padding:0 4px 6px}.group-label[_ngcontent-%COMP%]{padding:6px 6px 2px 22px;color:var(--text-dim);font-size:10px;font-weight:600;letter-spacing:.5px;text-transform:uppercase;-webkit-user-select:none;user-select:none}.row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px;width:100%;height:24px;padding:0 6px 0 8px;border:none;border-left:2px solid transparent;border-radius:3px;background:transparent;color:var(--text);font-size:12px;text-align:left;cursor:pointer;min-width:0}.row[_ngcontent-%COMP%]:hover{background:var(--bg-hover)}.row[_ngcontent-%COMP%]:focus-visible{outline:1px solid var(--accent)}.row.selected[_ngcontent-%COMP%]{border-left-color:var(--accent);background:#3794ff1f;color:var(--text-bright)}.row-icon[_ngcontent-%COMP%]{width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;flex:none;opacity:.85}.row-label[_ngcontent-%COMP%]{flex:none;max-width:65%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.row-tag[_ngcontent-%COMP%]{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--text-dim);font-size:11px}.row-tag.stash-message[_ngcontent-%COMP%]{direction:rtl;text-align:right}.empty[_ngcontent-%COMP%]{padding:4px 8px 2px 24px;color:var(--text-dim);font-size:12px;font-style:italic}.panel-loading[_ngcontent-%COMP%]{padding:8px;color:var(--text-dim);font-size:12px;-webkit-user-select:none;user-select:none}.tree-head-row[_ngcontent-%COMP%]{display:flex;align-items:center}.tree-head-row[_ngcontent-%COMP%] .tree-head[_ngcontent-%COMP%]{flex:1;min-width:0}.head-action[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:22px;height:22px;margin-right:4px;border:none;border-radius:3px;background:transparent;color:var(--text-dim);cursor:pointer;flex:none}.head-action[_ngcontent-%COMP%]:hover{background:var(--bg-hover);color:var(--text-bright)}.head-action[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:12px;height:12px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.pr-row[_ngcontent-%COMP%]{height:auto;min-height:40px;align-items:flex-start;padding:5px 6px 5px 8px}.vote-icon[_ngcontent-%COMP%]{margin-top:2px;opacity:1}.vote-icon.vote-approve[_ngcontent-%COMP%], .vote-icon.vote-suggestions[_ngcontent-%COMP%]{stroke:#89d185}.vote-icon.vote-suggestions[_ngcontent-%COMP%] line[_ngcontent-%COMP%]{stroke-width:2.5}.vote-icon.vote-waiting[_ngcontent-%COMP%]{stroke:#dcb67a}.vote-icon.vote-reject[_ngcontent-%COMP%]{stroke:#f48771}.vote-icon.vote-none[_ngcontent-%COMP%]{stroke:var(--text-dim)}.pr-main[_ngcontent-%COMP%]{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}.pr-line[_ngcontent-%COMP%]{display:flex;align-items:center;gap:5px;min-width:0}.pr-title[_ngcontent-%COMP%]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--text)}.pr-row[_ngcontent-%COMP%]:hover .pr-title[_ngcontent-%COMP%]{color:var(--text-bright)}.pr-badge[_ngcontent-%COMP%]{flex:none;border-radius:3px;font-size:10px;font-weight:600;letter-spacing:.3px;padding:1px 4px;text-transform:uppercase}.pr-badge.draft[_ngcontent-%COMP%]{border:1px solid var(--border);color:var(--text-dim)}.pr-badge.required[_ngcontent-%COMP%]{background:#dcb67a2e;border:1px solid rgba(220,182,122,.5);color:#dcb67a}.pr-meta[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--text-dim);font-size:11px}.pr-error[_ngcontent-%COMP%]{margin:2px 6px 4px 10px;color:var(--red);font-size:11px;line-height:1.4;word-break:break-word}"],changeDetection:0})};var wR=(n,e)=>e.path;function ER(n,e){if(n&1&&(p(0,"div",4),U(1,"span",17),f(2),m()),n&2){let t=u();d(2),O(t.statusLoading()?"Refreshing changes\u2026":"Updating repository\u2026")}}function DR(n,e){if(n&1){let t=A();p(0,"app-error-banner",18),S("retry",function(){y(t);let r=u();return b(r.retry.emit())}),m()}if(n&2){let t=u();I("message",t.statusError())("busy",t.statusLoading())}}function SR(n,e){if(n&1){let t=A();p(0,"button",23),S("click",function(){y(t);let r=u(2);return b(r.discardSelected())}),f(1,"Discard selected"),m(),p(2,"button",23),S("click",function(){y(t);let r=u(2);return b(r.discardAll())}),f(3,"Discard all"),m()}if(n&2){let t=u().$implicit,i=u();I("disabled",i.disabled()||!i.selected()[t].size),d(2),I("disabled",i.disabled()||!i.files(t).length)}}function TR(n,e){n&1&&(F(),U(0,"polyline",28))}function MR(n,e){n&1&&(F(),U(0,"polyline",29))}function IR(n,e){if(n&1){let t=A();p(0,"button",26),S("click",function(){y(t);let r=u().$implicit,o=u(2);return b(o.toggleDir(r.path))}),F(),p(1,"svg",27),T(2,TR,1,0,":svg:polyline",28)(3,MR,1,0,":svg:polyline",29),m(),he(),p(4,"span",30),f(5),m(),p(6,"span",31)(7,"span",32),f(8),m(),p(9,"span",33),f(10),m()()()}if(n&2){let t=u().$implicit;pe("padding-left",t.depth*14+8,"px"),I("title",t.path),fe("aria-expanded",!t.collapsed)("aria-label","Directory "+t.path),d(2),M(t.collapsed?2:3),d(3),O(t.name),d(3),Q("+",t.additions),d(2),Q("\u2212",t.deletions)}}function kR(n,e){if(n&1){let t=A();p(0,"div",34),S("click",function(r){y(t);let o=u().$implicit,s=u().$implicit,a=u();return b(a.select(s,o.file.path,r))})("dblclick",function(){y(t);let r=u().$implicit,o=u().$implicit,s=u();return b(s.openDiff(o,r.file))})("contextmenu",function(r){y(t);let o=u().$implicit,s=u().$implicit,a=u();return b(a.openContextMenu(r,s,o.file))})("keydown",function(r){y(t);let o=u().$implicit,s=u().$implicit,a=u();return b(a.keySelect(s,o.file.path,r))}),p(1,"span",35),f(2),m(),p(3,"span",36),f(4),m(),p(5,"span",31)(6,"span",32),f(7),m(),p(8,"span",33),f(9),m()()()}if(n&2){let t=u().$implicit,i=u().$implicit,r=u();pe("padding-left",t.depth*14+4,"px"),ge("selected",r.selected()[i].has(t.file.path)),fe("role",r.fileListView()==="tree"?"treeitem":"option")("aria-selected",r.selected()[i].has(t.file.path))("aria-label",t.file.path),d(),I("title",t.file.status),d(),O(t.file.status.slice(0,1).toUpperCase()),d(),I("title",t.file.oldPath&&t.file.oldPath!==t.file.path?t.file.oldPath+" \u2192 "+t.file.path:t.file.path),d(),O(t.name),d(3),Q("+",t.file.additions),d(2),Q("\u2212",t.file.deletions)}}function PR(n,e){if(n&1&&T(0,IR,11,9,"button",24)(1,kR,10,13,"div",25),n&2){let t=e.$implicit;M(t.kind==="dir"?0:1)}}function OR(n,e){if(n&1&&(p(0,"p",22),f(1),m()),n&2){let t=u().$implicit;d(),O(t==="staged"?"No staged changes.":"No unstaged changes.")}}function RR(n,e){if(n&1){let t=A();p(0,"section")(1,"h3"),f(2),m(),p(3,"div",19)(4,"span",20),f(5),m(),p(6,"button",3),S("click",function(){let r=y(t).$implicit,o=u();return b(o.moveSelected(r))}),f(7),m(),p(8,"button",3),S("click",function(){let r=y(t).$implicit,o=u();return b(o.moveAll(r))}),f(9),m(),T(10,SR,4,2),m(),p(11,"div",21),X(12,PR,2,1,null,null,wR,!1,OR,2,1,"p",22),m()()}if(n&2){let t=e.$implicit,i=u();fe("aria-label",t==="staged"?"Staged changes":"Unstaged changes"),d(2),pi("",t==="staged"?"Staged changes":"Unstaged changes"," (",i.files(t).length,")"),d(3),Q("",i.selected()[t].size," selected"),d(),I("disabled",i.disabled()||!i.selected()[t].size),d(),O(t==="staged"?"Unstage selected":"Stage selected"),d(),I("disabled",i.disabled()||!i.files(t).length),d(),O(t==="staged"?"Unstage all":"Stage all"),d(),M(t==="unstaged"?10:-1),d(),fe("role",i.fileListView()==="tree"?"tree":"listbox")("aria-label",t+" files"),d(),J(i.rows(t))}}function NR(n,e){n&1&&(p(0,"p",8),f(1,"Resolve conflicts before committing."),m())}function AR(n,e){if(n&1){let t=A();p(0,"app-diff-dialog",37),S("closed",function(){y(t);let r=u();return b(r.dialog.set(null))}),m()}if(n&2){let t=e;I("file",t.file)("originalRef",t.group==="staged"?"HEAD":"INDEX")("modifiedRef",t.group==="staged"?"INDEX":"WORKING")}}var rd=class n{vscode=k(In);changes=N(null);busy=N(!1);statusLoading=N(!1);statusError=N("");subject=N("");description=N("");fileListView=N("flat");subjectChange=W();descriptionChange=W();stageChange=W();stashChange=W();discardRequest=W();commitRequested=W();retry=W();closed=W();groups=["staged","unstaged"];selected=x({staged:new Set,unstaged:new Set});anchors={staged:null,unstaged:null};dialog=x(null);contextMenu=x(null);contextMenuTarget=null;collapsed=x(new Set);disabled=H(()=>this.busy()||!!this.statusError()||!this.changes());canCommit=H(()=>!this.disabled()&&!!this.subject().trim()&&!!this.changes()?.staged.length&&!this.changes()?.conflicted.length);constructor(){xe(()=>{let e=this.changes();this.selected.update(t=>{let i=G({},t);for(let r of this.groups){let o=new Set((r==="staged"?e?.stagedFiles:e?.unstagedFiles)?.map(s=>s.path));i[r]=new Set([...t[r]].filter(s=>o.has(s))),this.anchors[r]&&!o.has(this.anchors[r])&&(this.anchors[r]=null)}return i}),this.dialog.set(null),this.closeContextMenu()})}files(e){return(e==="staged"?this.changes()?.stagedFiles:this.changes()?.unstagedFiles)??[]}rows(e){let t=this.files(e);return this.fileListView()!=="tree"?t.map(i=>({kind:"file",path:i.path,name:i.path,depth:0,file:i})):kc(t,this.collapsed())}orderedPaths(e){return this.rows(e).filter(t=>t.kind==="file").map(t=>t.path)}toggleDir(e){this.collapsed.update(t=>{let i=new Set(t);return i.has(e)?i.delete(e):i.add(e),i})}openDiff(e,t){if(this.busy())return;let i=e==="staged"?"HEAD":"INDEX",r=e==="staged"?"INDEX":"WORKING";this.vscode.openDiff(t,i,r)||this.dialog.set({file:t,group:e})}openContextMenu(e,t,i){e.preventDefault(),this.contextMenuTarget={file:i,group:t},this.contextMenu.set({x:e.clientX,y:e.clientY,items:[{label:"Open Diff",action:"open-diff",disabled:this.busy()},{label:"Open File",action:"open-file",disabled:!this.vscode.canOpenFile()},{label:"Copy File Path",action:"copy-file-path"}]})}runContextAction(e){let t=this.contextMenuTarget;t&&(e==="open-diff"?this.openDiff(t.group,t.file):e==="open-file"?this.vscode.openFile(t.file.path):e==="copy-file-path"&&navigator.clipboard?.writeText(t.file.path))}closeContextMenu(){this.contextMenu.set(null),this.contextMenuTarget=null}select(e,t,i){let r=i.ctrlKey||i.metaKey,o=this.orderedPaths(e),s=this.anchors[e],a=i.shiftKey&&s!==null&&o.includes(s),l=r?new Set(this.selected()[e]):new Set;if(a){let c=o.indexOf(s),h=o.indexOf(t);for(let _ of o.slice(Math.min(c,h),Math.max(c,h)+1))l.add(_)}else r&&l.has(t)?l.delete(t):l.add(t),this.anchors[e]=t;this.selected.update(c=>le(G({},c),{[e]:l}))}keySelect(e,t,i){if((i.key===" "||i.key==="Enter")&&(i.preventDefault(),this.select(e,t,i)),i.key==="ArrowDown"||i.key==="ArrowUp"){i.preventDefault();let r=Array.from(i.currentTarget.closest(".file-list").querySelectorAll(".file-row")),o=r.indexOf(i.currentTarget),s=Math.max(0,Math.min(r.length-1,o+(i.key==="ArrowDown"?1:-1)));r[s]?.focus(),i.shiftKey&&this.select(e,this.orderedPaths(e)[s],i)}}move(e,t){this.disabled()||!t.length||this.stageChange.emit({staged:e==="staged",files:t})}moveSelected(e){this.move(e,[...this.selected()[e]])}moveAll(e){this.move(e,this.files(e).map(t=>t.path))}stash(e){this.disabled()||this.stashChange.emit(e)}discard(e){this.disabled()||!e.length||this.discardRequest.emit(e)}discardSelected(){this.discard([...this.selected().unstaged])}discardAll(){this.discard(this.files("unstaged").map(e=>e.path))}updateSubject(e){this.subjectChange.emit(e.target.value)}updateDescription(e){this.descriptionChange.emit(e.target.value)}commit(e){e.preventDefault(),this.canCommit()&&this.commitRequested.emit()}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=ce({type:n,selectors:[["app-working-panel"]],inputs:{changes:[1,"changes"],busy:[1,"busy"],statusLoading:[1,"statusLoading"],statusError:[1,"statusError"],subject:[1,"subject"],description:[1,"description"],fileListView:[1,"fileListView"]},outputs:{subjectChange:"subjectChange",descriptionChange:"descriptionChange",stageChange:"stageChange",stashChange:"stashChange",discardRequest:"discardRequest",commitRequested:"commitRequested",retry:"retry",closed:"closed"},decls:32,vars:13,consts:[["aria-label","Uncommitted changes",1,"detail"],["type","button","aria-label","Close changes",3,"click"],["role","group","aria-label","Stash changes",1,"stash-actions"],["type","button",3,"click","disabled"],["role","status",1,"state"],["retryLabel","Retry status",3,"message","busy"],[1,"changes"],[3,"submit"],[1,"error"],["for","commit-subject"],["id","commit-subject","placeholder","Summary of your changes","required","",3,"input","value","disabled"],["for","commit-description"],[1,"optional"],["id","commit-description","rows","3",3,"input","value","disabled"],["type","submit",1,"commit-button",3,"disabled"],[3,"file","originalRef","modifiedRef"],[3,"select","closed","menu"],[1,"spinner"],["retryLabel","Retry status",3,"retry","message","busy"],[1,"actions"],["aria-live","polite",1,"selection-count"],["aria-multiselectable","true",1,"file-list"],[1,"empty"],["type","button",1,"danger",3,"click","disabled"],["type","button","role","treeitem",1,"dir-row",3,"title","paddingLeft"],["tabindex","0",1,"file-row",3,"selected","paddingLeft"],["type","button","role","treeitem",1,"dir-row",3,"click","title"],["viewBox","0 0 24 24","aria-hidden","true",1,"chevron"],["points","9 6 15 12 9 18"],["points","6 9 12 15 18 9"],[1,"dir-name"],[1,"counts"],[1,"additions"],[1,"deletions"],["tabindex","0",1,"file-row",3,"click","dblclick","contextmenu","keydown"],[1,"file-status",3,"title"],[1,"file-path",3,"title"],[3,"closed","file","originalRef","modifiedRef"]],template:function(t,i){if(t&1&&(p(0,"aside",0)(1,"header")(2,"h2"),f(3,"Uncommitted changes"),m(),p(4,"button",1),S("click",function(){return i.closed.emit()}),f(5,"\xD7"),m()(),p(6,"div",2)(7,"button",3),S("click",function(){return i.stash("all")}),f(8,"Stash all"),m(),p(9,"button",3),S("click",function(){return i.stash("staged")}),f(10,"Stash staged"),m(),p(11,"button",3),S("click",function(){return i.stash("unstaged")}),f(12,"Stash unstaged"),m()(),T(13,ER,3,1,"div",4),T(14,DR,1,2,"app-error-banner",5),p(15,"div",6),X(16,RR,15,12,"section",null,Sn),m(),p(18,"form",7),S("submit",function(o){return i.commit(o)}),T(19,NR,2,0,"p",8),p(20,"label",9),f(21,"Commit message"),m(),p(22,"input",10),S("input",function(o){return i.updateSubject(o)}),m(),p(23,"label",11),f(24,"Description "),p(25,"span",12),f(26,"(optional)"),m()(),p(27,"textarea",13),S("input",function(o){return i.updateDescription(o)}),m(),p(28,"button",14),f(29,"Commit staged changes"),m()()(),T(30,AR,1,3,"app-diff-dialog",15),p(31,"app-context-menu",16),S("select",function(o){return i.runContextAction(o)})("closed",function(){return i.closeContextMenu()}),m()),t&2){let r,o;d(7),I("disabled",i.disabled()||!i.files("staged").length&&!i.files("unstaged").length),d(2),I("disabled",i.disabled()||!i.files("staged").length),d(2),I("disabled",i.disabled()||!i.files("unstaged").length),d(2),M(i.busy()?13:-1),d(),M(i.statusError()?14:-1),d(2),J(i.groups),d(3),M(!((r=i.changes())==null||r.conflicted==null)&&r.conflicted.length?19:-1),d(3),I("value",i.subject())("disabled",i.busy()),d(5),I("value",i.description())("disabled",i.busy()),d(),I("disabled",!i.canCommit()),d(2),M((o=i.dialog())?30:-1,o),d(),I("menu",i.contextMenu())}},dependencies:[kt,ao,oo],styles:["[_nghost-%COMP%]{display:flex;flex:none;width:min(480px,60vw);min-width:320px;min-height:0}.detail[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;min-height:0;background:var(--bg-alt);border-left:1px solid var(--border);color:var(--text)}header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:12px;gap:12px}h2[_ngcontent-%COMP%]{font-size:15px;margin:0}h3[_ngcontent-%COMP%]{font-size:13px;margin:0 0 8px}.stash-actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:5px;padding:0 12px 10px;flex-wrap:wrap;font-size:11px}button[_ngcontent-%COMP%], input[_ngcontent-%COMP%], textarea[_ngcontent-%COMP%]{font:inherit;color:var(--text);border:1px solid var(--border);border-radius:3px;background:var(--bg)}button[_ngcontent-%COMP%]{cursor:pointer;padding:4px 7px;white-space:nowrap}button[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--bg-hover)}button.danger[_ngcontent-%COMP%]{color:#f48771}button.danger[_ngcontent-%COMP%]:hover:not(:disabled){background:#5a1d1d}button[_ngcontent-%COMP%]:disabled{opacity:.45;cursor:default}button[_ngcontent-%COMP%]:focus-visible, input[_ngcontent-%COMP%]:focus-visible, textarea[_ngcontent-%COMP%]:focus-visible, .file-row[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}.changes[_ngcontent-%COMP%]{overflow-y:auto;flex:1;min-height:80px}section[_ngcontent-%COMP%]{padding:10px;border-top:1px solid var(--border)}.actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:5px;margin-bottom:6px;flex-wrap:wrap;font-size:11px}.selection-count[_ngcontent-%COMP%]{margin-right:auto;color:var(--text-dim)}.file-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2px}.dir-row[_ngcontent-%COMP%]{display:flex;align-items:center;flex:1;min-width:0;gap:7px;width:100%;padding:7px 8px;border:none;background:transparent;font-size:12px;text-align:left}.dir-row[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--bg-hover)}.dir-row[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}.dir-row[_ngcontent-%COMP%] .chevron[_ngcontent-%COMP%]{width:9px;height:9px;flex:none;fill:none;stroke:var(--text-dim);stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}.dir-name[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1;font-weight:600}.file-row[_ngcontent-%COMP%]{display:flex;align-items:center;flex:1;min-width:0;gap:7px;padding:7px 4px;cursor:pointer;-webkit-user-select:none;user-select:none;font-size:12px}.file-row[_ngcontent-%COMP%]:hover{background:var(--bg-hover)}.file-row.selected[_ngcontent-%COMP%]{background:#04395e}.file-status[_ngcontent-%COMP%]{color:var(--accent);width:12px;flex:none}.file-path[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1}.counts[_ngcontent-%COMP%]{white-space:nowrap;font-size:11px}.additions[_ngcontent-%COMP%]{color:#89d185}.deletions[_ngcontent-%COMP%], .error[_ngcontent-%COMP%]{color:#f48771}.empty[_ngcontent-%COMP%], .optional[_ngcontent-%COMP%]{color:var(--text-dim);font-size:12px}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:6px;padding:12px;border-top:1px solid var(--border);max-height:50%;overflow-y:auto}label[_ngcontent-%COMP%]{font-size:12px}input[_ngcontent-%COMP%], textarea[_ngcontent-%COMP%]{padding:7px;width:100%;box-sizing:border-box}textarea[_ngcontent-%COMP%]{resize:vertical;min-height:50px}.commit-button[_ngcontent-%COMP%]{background:var(--accent);color:#fff;padding:8px;margin-top:4px}.state[_ngcontent-%COMP%], .error[_ngcontent-%COMP%]{padding:8px 12px;font-size:12px}.state[_ngcontent-%COMP%]{display:flex;gap:8px;align-items:center}.spinner[_ngcontent-%COMP%]{width:12px;height:12px;border:2px solid var(--border);border-top-color:var(--accent);border-radius:50%;animation:_ngcontent-%COMP%_spin .8s linear infinite}@keyframes _ngcontent-%COMP%_spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.spinner[_ngcontent-%COMP%]{animation:none}}"],changeDetection:0})};var LR=(n,e)=>e.name;function FR(n,e){if(n&1&&(v(0,"option",10),f(1),C()),n&2){let t=e.$implicit;Z("value",t.name),d(),O(t.name)}}function VR(n,e){n&1&&(v(0,"p",11),f(1,"Every local branch is already checked out in a worktree."),C())}function BR(n,e){if(n&1&&(v(0,"p",12),f(1),C()),n&2){let t=u();d(),O(t.error())}}var od=class n{vscode=k(In);branches=N.required();worktrees=N.required();busy=N(!1);error=N("");created=W();closed=W();path=x("");branch=x("");canBrowse=this.vscode.canPickFolder;availableBranches=H(()=>{let e=new Set(this.worktrees().map(t=>t.branch).filter(Boolean));return this.branches().filter(t=>!t.remote&&!e.has(t.name))});constructor(){xe(()=>{let e=this.availableBranches();e.some(t=>t.name===this.branch())||this.branch.set(e[0]?.name??"")})}onEscape(){this.busy()||this.closed.emit()}onPath(e){this.path.set(e.target.value)}onBranch(e){this.branch.set(e.target.value)}browse(){return Wn(this,null,function*(){let e=yield this.vscode.pickFolder();e&&this.path.set(e)})}submit(){let e=this.path().trim(),t=this.branch();e&&t&&!this.busy()&&this.created.emit({path:e,branch:t})}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=ce({type:n,selectors:[["app-worktree-dialog"]],hostBindings:function(t,i){t&1&&S("keydown.escape",function(){return i.onEscape()},Ze)},inputs:{branches:[1,"branches"],worktrees:[1,"worktrees"],busy:[1,"busy"],error:[1,"error"]},outputs:{created:"created",closed:"closed"},decls:24,vars:11,consts:[[1,"backdrop",3,"click"],["role","dialog","aria-modal","true","aria-labelledby","worktree-title",1,"dialog",3,"submit"],["id","worktree-title",1,"title"],[1,"description"],["for","worktree-folder",1,"field-label"],[1,"folder-row"],["id","worktree-folder","type","text","autocomplete","off","placeholder","Absolute path to an empty or new folder",1,"input",3,"input","value","disabled"],["type","button",1,"btn",3,"click","disabled","title"],["for","worktree-branch",1,"field-label"],["id","worktree-branch",1,"input","select",3,"change","value","disabled"],[3,"value"],[1,"notice"],["role","alert",1,"error"],[1,"actions"],["type","button",1,"btn",3,"click","disabled"],["type","submit",1,"btn","btn-primary",3,"disabled"]],template:function(t,i){t&1&&(v(0,"div",0),j("click",function(){return i.closed.emit()}),C(),v(1,"form",1),j("submit",function(o){return o.preventDefault(),i.submit()}),v(2,"h3",2),f(3,"Create Worktree"),C(),v(4,"p",3),f(5,"Create a linked working folder from an available local branch."),C(),v(6,"label",4),f(7,"Folder"),C(),v(8,"div",5)(9,"input",6),j("input",function(o){return i.onPath(o)}),C(),v(10,"button",7),j("click",function(){return i.browse()}),f(11,"Browse..."),C()(),v(12,"label",8),f(13,"Branch"),C(),v(14,"select",9),j("change",function(o){return i.onBranch(o)}),X(15,FR,2,2,"option",10,LR),C(),T(17,VR,2,0,"p",11),T(18,BR,2,1,"p",12),v(19,"div",13)(20,"button",14),j("click",function(){return i.closed.emit()}),f(21,"Cancel"),C(),v(22,"button",15),f(23),C()()()),t&2&&(d(9),Z("value",i.path())("disabled",i.busy()),d(),Z("disabled",i.busy()||!i.canBrowse)("title",i.canBrowse?"Browse for a folder":"Folder browsing is available in the VS Code extension"),d(4),Z("value",i.branch())("disabled",i.busy()),d(),J(i.availableBranches()),d(2),M(i.availableBranches().length===0?17:-1),d(),M(i.error()?18:-1),d(2),Z("disabled",i.busy()),d(2),Z("disabled",i.busy()||!i.path().trim()||!i.branch()),d(),Q(" ",i.busy()?"Creating...":"Create Worktree"," "))},styles:[".backdrop[_ngcontent-%COMP%]{position:fixed;inset:0;z-index:400;background:#00000080}.dialog[_ngcontent-%COMP%]{position:fixed;top:50%;left:50%;z-index:401;width:min(500px,calc(100vw - 48px));transform:translate(-50%,-50%);display:flex;flex-direction:column;gap:9px;padding:18px;border:1px solid var(--border);border-radius:8px;background:var(--bg-alt);box-shadow:0 10px 36px #0009}.title[_ngcontent-%COMP%]{margin:0;color:var(--text-bright);font-size:14px;font-weight:600}.description[_ngcontent-%COMP%], .notice[_ngcontent-%COMP%]{margin:0 0 4px;color:var(--text-dim);font-size:12px}.notice[_ngcontent-%COMP%]{color:#dcb67a}.error[_ngcontent-%COMP%]{margin:0;color:var(--red);font-size:12px;line-height:1.4}.field-label[_ngcontent-%COMP%]{color:var(--text);font-size:12px;font-weight:600}.folder-row[_ngcontent-%COMP%]{display:flex;gap:8px}.input[_ngcontent-%COMP%]{min-width:0;padding:7px 10px;border:1px solid var(--border);border-radius:4px;outline:none;background:var(--bg);color:var(--text);font:13px inherit}.folder-row[_ngcontent-%COMP%] .input[_ngcontent-%COMP%]{flex:1}.input[_ngcontent-%COMP%]:focus{border-color:var(--accent)}.select[_ngcontent-%COMP%]{width:100%}.actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:8px;margin-top:7px}.btn[_ngcontent-%COMP%]{padding:6px 14px;border:1px solid var(--border);border-radius:4px;background:transparent;color:var(--text);font:12px inherit;cursor:pointer}.btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--bg-hover);color:var(--text-bright)}.btn-primary[_ngcontent-%COMP%]{border-color:var(--accent);background:var(--accent);color:#fff}.btn-primary[_ngcontent-%COMP%]:hover:not(:disabled){background:#2b7cd3}.btn[_ngcontent-%COMP%]:disabled, .input[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:default}"],changeDetection:0})};var jR=["searchInput"];function $R(n,e){if(n&1){let t=A();v(0,"button",10),j("click",function(){y(t);let r=u(2);return b(r.searchNavigate.emit("prev"))}),F(),v(1,"svg",2),se(2,"polyline",11),C()(),he(),v(3,"button",12),j("click",function(){y(t);let r=u(2);return b(r.searchNavigate.emit("next"))}),F(),v(4,"svg",2),se(5,"polyline",13),C()()}if(n&2){let t=u(2);Z("disabled",t.matchCount()===0),d(3),Z("disabled",t.matchCount()===0)}}function HR(n,e){if(n&1){let t=A();T(0,$R,6,2),v(1,"button",6),j("click",function(){y(t);let r=u();return b(r.clearSearch())}),F(),v(2,"svg",2),se(3,"line",7)(4,"line",8),C()(),he(),v(5,"span",9),f(6),C()}if(n&2){let t=u();M(t.filterMode()?-1:0),d(6),O(t.badgeText())}}var UR=300,sd=class n{matchIndex=N(-1);matchCount=N(0);filterMode=N(!1);searchChange=W();searchNavigate=W();searchValue=x("");badgeText=H(()=>{let e=this.matchCount(),t=e>99?"99+":String(e);return!this.filterMode()&&this.matchIndex()>=0?`${this.matchIndex()+1}/${t}`:t});searchInput=Vn("searchInput");constructor(){lo(this.searchValue).pipe(Qd(UR),Oo(),kn()).subscribe(e=>this.searchChange.emit(e))}onSearch(e){this.searchValue.set(e.target.value)}onSearchKeydown(e){e.key==="Enter"&&!this.filterMode()&&(e.preventDefault(),this.searchNavigate.emit(e.shiftKey?"prev":"next"))}clearSearch(){this.searchValue.set(""),this.searchInput()?.nativeElement.focus()}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=ce({type:n,selectors:[["app-search-box"]],viewQuery:function(t,i){t&1&&Tn(i.searchInput,jR,5),t&2&&Fn()},inputs:{matchIndex:[1,"matchIndex"],matchCount:[1,"matchCount"],filterMode:[1,"filterMode"]},outputs:{searchChange:"searchChange",searchNavigate:"searchNavigate"},decls:7,vars:2,consts:[["searchInput",""],[1,"search"],["viewBox","0 0 24 24","aria-hidden","true"],["cx","11","cy","11","r","8"],["x1","21","y1","21","x2","16.65","y2","16.65"],["type","text","placeholder","Search commits",3,"input","keydown","value"],["type","button","title","Clear search","aria-label","Clear search",1,"clear-btn",3,"click"],["x1","18","y1","6","x2","6","y2","18"],["x1","6","y1","6","x2","18","y2","18"],[1,"count-badge"],["type","button","title","Previous match (Shift+Enter)","aria-label","Previous match",1,"nav-btn",3,"click","disabled"],["points","18 15 12 9 6 15"],["type","button","title","Next match (Enter)","aria-label","Next match",1,"nav-btn",3,"click","disabled"],["points","6 9 12 15 18 9"]],template:function(t,i){if(t&1){let r=A();v(0,"div",1),F(),v(1,"svg",2),se(2,"circle",3)(3,"line",4),C(),he(),v(4,"input",5,0),j("input",function(s){return y(r),b(i.onSearch(s))})("keydown",function(s){return y(r),b(i.onSearchKeydown(s))}),C(),T(6,HR,7,2),C()}t&2&&(d(4),Z("value",i.searchValue()),d(2),M(i.searchValue()?6:-1))},styles:["[_nghost-%COMP%]{display:flex;align-items:center;gap:8px}.search[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;gap:6px;height:26px;padding:0 8px;border:1px solid var(--border);border-radius:4px;background:#2d2d2d;color:var(--text-dim)}.search[_ngcontent-%COMP%]:focus-within{border-color:var(--accent)}.search[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;flex:none}.search[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:170px;border:none;outline:none;background:transparent;color:var(--text);font-size:12px}.search[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::placeholder{color:#777}@media(max-width:720px){.search[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:100px}}.clear-btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;padding:0;border:none;border-radius:3px;background:transparent;color:var(--text-dim);cursor:pointer;flex:none}.clear-btn[_ngcontent-%COMP%]:hover{color:var(--text);background:#3a3a3a}.clear-btn[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:11px;height:11px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}.count-badge[_ngcontent-%COMP%]{position:absolute;z-index:1;top:-8px;right:-8px;min-width:14px;padding:1px 5px;border:1px solid color-mix(in srgb,var(--accent) 55%,var(--border));border-radius:999px;background:color-mix(in srgb,var(--accent) 25%,var(--bg-alt));color:var(--text-bright);font-size:10px;line-height:14px;text-align:center;white-space:nowrap;pointer-events:none;-webkit-user-select:none;user-select:none}.nav-btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;padding:0;border:none;border-radius:3px;background:transparent;color:var(--text-dim);cursor:pointer;flex:none}.nav-btn[_ngcontent-%COMP%]:hover:not(:disabled){color:var(--text-bright);background:#3a3a3a}.nav-btn[_ngcontent-%COMP%]:disabled{opacity:.4;cursor:default}.nav-btn[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}"],changeDetection:0})};function zR(n,e){if(n&1){let t=A();p(0,"div",13)(1,"button",34),S("click",function(){y(t);let r=u();return b(r.chooseRemoteAction("fetch"))}),f(2,"Fetch"),m(),p(3,"button",34),S("click",function(){y(t);let r=u();return b(r.chooseRemoteAction("fetch-prune"))}),f(4," Fetch (prune) "),m()()}}function GR(n,e){if(n&1){let t=A();p(0,"div",13)(1,"button",34),S("click",function(){y(t);let r=u();return b(r.chooseRemoteAction("pull"))}),f(2,"Pull"),m(),p(3,"button",34),S("click",function(){y(t);let r=u();return b(r.chooseRemoteAction("pull-rebase"))}),f(4,"Pull (rebase)"),m(),p(5,"button",34),S("click",function(){y(t);let r=u();return b(r.chooseRemoteAction("rebase-from"))}),f(6,"Rebase (from)..."),m()()}}function WR(n,e){if(n&1){let t=A();p(0,"button",34),S("click",function(){y(t);let r=u(2);return b(r.chooseRemoteAction("create-pr"))}),f(1," Create Pull Request... "),m()}}function qR(n,e){if(n&1){let t=A();p(0,"div",13)(1,"button",34),S("click",function(){y(t);let r=u();return b(r.chooseRemoteAction("push"))}),f(2,"Push"),m(),p(3,"button",35),S("click",function(){y(t);let r=u();return b(r.chooseRemoteAction("push-force"))}),f(4," Push (force) "),m(),p(5,"button",34),S("click",function(){y(t);let r=u();return b(r.chooseRemoteAction("sync"))}),f(6,"Sync"),m(),T(7,WR,2,0,"button",36),m()}if(n&2){let t=u();d(7),M(t.prEnabled()?7:-1)}}function ZR(n,e){if(n&1){let t=A();p(0,"button",34),S("click",function(){y(t);let r=u(2);return b(r.chooseRemoteAction("create-pr"))}),f(1," Create Pull Request... "),m()}}function YR(n,e){if(n&1){let t=A();p(0,"div",33)(1,"button",34),S("click",function(){y(t);let r=u();return b(r.chooseRemoteAction("fetch"))}),f(2,"Fetch"),m(),p(3,"button",34),S("click",function(){y(t);let r=u();return b(r.chooseRemoteAction("fetch-prune"))}),f(4," Fetch (prune) "),m(),U(5,"div",37),p(6,"button",34),S("click",function(){y(t);let r=u();return b(r.chooseRemoteAction("pull"))}),f(7,"Pull"),m(),p(8,"button",34),S("click",function(){y(t);let r=u();return b(r.chooseRemoteAction("pull-rebase"))}),f(9," Pull (rebase) "),m(),p(10,"button",34),S("click",function(){y(t);let r=u();return b(r.chooseRemoteAction("rebase-from"))}),f(11," Rebase (from)... "),m(),U(12,"div",37),p(13,"button",34),S("click",function(){y(t);let r=u();return b(r.chooseRemoteAction("push"))}),f(14,"Push"),m(),p(15,"button",35),S("click",function(){y(t);let r=u();return b(r.chooseRemoteAction("push-force"))}),f(16," Push (force) "),m(),p(17,"button",34),S("click",function(){y(t);let r=u();return b(r.chooseRemoteAction("sync"))}),f(18,"Sync"),m(),T(19,ZR,2,0,"button",36),U(20,"div",37),p(21,"button",34),S("click",function(){y(t);let r=u();return b(r.chooseRefresh())}),f(22,"Refresh"),m(),U(23,"div",37),p(24,"button",34),S("click",function(){y(t);let r=u();return b(r.chooseSettings())}),f(25,"Settings..."),m()()}if(n&2){let t=u();d(19),M(t.prEnabled()?19:-1)}}var ad=class n{busy=N.required();prEnabled=N(!1);panelOpen=N(!1);matchIndex=N(-1);matchCount=N(0);filterMode=N(!1);menuToggle=W();refresh=W();remoteAction=W();settingsClick=W();searchChange=W();searchNavigate=W();openMenu=x(null);toggleMenu(e,t){t.stopPropagation(),this.openMenu.update(i=>i===e?null:e)}chooseRemoteAction(e){this.openMenu.set(null),this.remoteAction.emit(e)}chooseRefresh(){this.openMenu.set(null),this.refresh.emit()}chooseSettings(){this.openMenu.set(null),this.settingsClick.emit()}closeMenu(){this.openMenu.set(null)}closeMenuOnEscape(){this.openMenu.set(null)}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=ce({type:n,selectors:[["app-toolbar"]],hostBindings:function(t,i){t&1&&S("click",function(){return i.closeMenu()},Ze)("keydown.escape",function(){return i.closeMenuOnEscape()},Ze)},inputs:{busy:[1,"busy"],prEnabled:[1,"prEnabled"],panelOpen:[1,"panelOpen"],matchIndex:[1,"matchIndex"],matchCount:[1,"matchCount"],filterMode:[1,"filterMode"]},outputs:{menuToggle:"menuToggle",refresh:"refresh",remoteAction:"remoteAction",settingsClick:"settingsClick",searchChange:"searchChange",searchNavigate:"searchNavigate"},decls:46,vars:15,consts:[[1,"toolbar"],[1,"group"],["type","button","title","Toggle Branches, Stashes and Worktrees panel","aria-label","Toggle repository panel",1,"icon-btn",3,"click"],["viewBox","0 0 24 24","aria-hidden","true"],["x1","3","y1","6","x2","21","y2","6"],["x1","3","y1","12","x2","21","y2","12"],["x1","3","y1","18","x2","21","y2","18"],[1,"app-title"],[1,"group","actions"],[3,"searchChange","searchNavigate","matchIndex","matchCount","filterMode"],[1,"action-menu"],["title","Fetch",1,"icon-btn",3,"click","disabled"],["d","M18 10h-1.26A8 8 0 1 0 9 20h9a5 5 0 0 0 0-10z"],["role","menu",1,"remote-menu"],["title","Pull",1,"icon-btn",3,"click","disabled"],["cx","12","cy","12","r","10"],["points","8 12 12 16 16 12"],["x1","12","y1","8","x2","12","y2","16"],["title","Push",1,"icon-btn",3,"click","disabled"],["points","16 12 12 8 8 12"],["x1","12","y1","16","x2","12","y2","8"],["title","Refresh",1,"icon-btn",3,"click"],["points","23 4 23 10 17 10"],["points","1 20 1 14 7 14"],["d","M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"],["title","Settings","aria-label","Settings",1,"icon-btn",3,"click"],["cx","12","cy","12","r","3"],["d","M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 2.83-2.83l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z"],[1,"overflow-anchor"],["type","button","title","More actions","aria-label","More actions","aria-haspopup","menu",1,"icon-btn","overflow-btn",3,"click"],["cx","5","cy","12","r","2.1"],["cx","12","cy","12","r","2.1"],["cx","19","cy","12","r","2.1"],["role","menu",1,"remote-menu","overflow-menu"],["type","button","role","menuitem",3,"click"],["type","button","role","menuitem",1,"danger",3,"click"],["type","button","role","menuitem"],[1,"menu-sep"]],template:function(t,i){t&1&&(p(0,"div",0)(1,"div",1)(2,"button",2),S("click",function(){return i.menuToggle.emit()}),F(),p(3,"svg",3),U(4,"line",4)(5,"line",5)(6,"line",6),m()(),he(),p(7,"span",7),f(8,"Guito"),m()(),p(9,"div",8)(10,"app-search-box",9),S("searchChange",function(o){return i.searchChange.emit(o)})("searchNavigate",function(o){return i.searchNavigate.emit(o)}),m(),p(11,"div",10)(12,"button",11),S("click",function(o){return i.toggleMenu("fetch",o)}),F(),p(13,"svg",3),U(14,"path",12),m()(),T(15,zR,5,0,"div",13),m(),he(),p(16,"div",10)(17,"button",14),S("click",function(o){return i.toggleMenu("pull",o)}),F(),p(18,"svg",3),U(19,"circle",15)(20,"polyline",16)(21,"line",17),m()(),T(22,GR,7,0,"div",13),m(),he(),p(23,"div",10)(24,"button",18),S("click",function(o){return i.toggleMenu("push",o)}),F(),p(25,"svg",3),U(26,"circle",15)(27,"polyline",19)(28,"line",20),m()(),T(29,qR,8,1,"div",13),m(),he(),p(30,"button",21),S("click",function(){return i.refresh.emit()}),F(),p(31,"svg",3),U(32,"polyline",22)(33,"polyline",23)(34,"path",24),m()(),he(),p(35,"button",25),S("click",function(){return i.settingsClick.emit()}),F(),p(36,"svg",3),U(37,"circle",26)(38,"path",27),m()(),he(),p(39,"div",28)(40,"button",29),S("click",function(o){return i.toggleMenu("overflow",o)}),F(),p(41,"svg",3),U(42,"circle",30)(43,"circle",31)(44,"circle",32),m()(),T(45,YR,26,1,"div",33),m()()()),t&2&&(d(2),fe("aria-expanded",i.panelOpen()),d(8),I("matchIndex",i.matchIndex())("matchCount",i.matchCount())("filterMode",i.filterMode()),d(2),I("disabled",i.busy()),fe("aria-expanded",i.openMenu()==="fetch"),d(3),M(i.openMenu()==="fetch"?15:-1),d(2),I("disabled",i.busy()),fe("aria-expanded",i.openMenu()==="pull"),d(5),M(i.openMenu()==="pull"?22:-1),d(2),I("disabled",i.busy()),fe("aria-expanded",i.openMenu()==="push"),d(5),M(i.openMenu()==="push"?29:-1),d(11),fe("aria-expanded",i.openMenu()==="overflow"),d(5),M(i.openMenu()==="overflow"?45:-1))},dependencies:[sd],styles:[".toolbar[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:16px;flex:none;height:42px;padding:0 12px;background:var(--bg-alt);border-bottom:1px solid var(--border)}.group[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px;min-width:0}.icon-btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border:none;border-radius:4px;background:transparent;color:var(--text);cursor:pointer;flex:none}.action-menu[_ngcontent-%COMP%]{position:relative;display:inline-flex}.remote-menu[_ngcontent-%COMP%]{position:absolute;top:calc(100% + 4px);right:0;z-index:20;min-width:132px;padding:4px;background:var(--bg-alt);border:1px solid var(--border);border-radius:4px;box-shadow:0 6px 18px #00000073}.remote-menu[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{display:block;width:100%;padding:6px 10px;border:none;border-radius:3px;background:transparent;color:var(--text);font:inherit;text-align:left;white-space:nowrap;cursor:pointer}.remote-menu[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover{background:var(--bg-hover);color:var(--text-bright)}.remote-menu[_ngcontent-%COMP%] button.danger[_ngcontent-%COMP%]{color:var(--red)}.remote-menu[_ngcontent-%COMP%] button.danger[_ngcontent-%COMP%]:hover{background:#f487711f;color:#f48771}.icon-btn[_ngcontent-%COMP%]:hover{background:var(--bg-hover);color:var(--text-bright)}.icon-btn[_ngcontent-%COMP%]:disabled{opacity:.45;cursor:default}.icon-btn[aria-expanded=true][_ngcontent-%COMP%]{background:var(--bg-hover);color:var(--text-bright)}.icon-btn[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.app-title[_ngcontent-%COMP%]{font-size:15px;font-weight:600;color:var(--text-bright);letter-spacing:.2px;-webkit-user-select:none;user-select:none}.overflow-anchor[_ngcontent-%COMP%]{position:relative;display:inline-flex}.overflow-btn[_ngcontent-%COMP%]{display:none}.overflow-btn[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] circle[_ngcontent-%COMP%]{fill:currentColor;stroke:none}.menu-sep[_ngcontent-%COMP%]{height:1px;margin:4px 0;background:var(--border)}.overflow-menu[_ngcontent-%COMP%]{max-height:min(60vh,420px);overflow-y:auto}@media(max-width:640px){.actions[_ngcontent-%COMP%] > .action-menu[_ngcontent-%COMP%], .actions[_ngcontent-%COMP%] > button.icon-btn[_ngcontent-%COMP%]{display:none}.overflow-btn[_ngcontent-%COMP%]{display:inline-flex}}"],changeDetection:0})};function QR(n,e){if(n&1){let t=A();p(0,"app-error-banner",14),S("retry",function(){y(t);let r=u();return b(r.refresh())}),m()}if(n&2){let t=u();I("message",t.error())("busy",t.loading())}}function KR(n,e){if(n&1){let t=A();p(0,"app-error-banner",15),S("retry",function(){y(t);let r=u();return b(r.refreshWorking())}),m()}if(n&2){let t=u();I("message",t.statusError())("busy",t.statusLoading())}}function XR(n,e){if(n&1){let t=A();p(0,"app-side-panel",16),S("branchChange",function(r){y(t);let o=u();return b(o.selectedBranch.set(r))})("tagSelect",function(r){y(t);let o=u();return b(o.selectTag(r))})("contextMenu",function(r){y(t);let o=u();return b(o.onContextMenu(r))})("worktreeCreate",function(){y(t);let r=u();return b(r.openWorktreeDialog())})("prSelect",function(r){y(t);let o=u();return b(o.openPrDetail(r))})("prRefresh",function(){y(t);let r=u();return b(r.loadPullRequests())}),m()}if(n&2){let t,i=u();I("branches",i.branches())("selectedBranch",i.selectedBranch())("showRemote",i.showRemote())("stashes",i.stashes())("worktrees",i.worktrees())("tags",i.tags())("selectedCommitHash",((t=i.selectedCommit())==null?null:t.hash)??"")("loading",i.panelLoading())("azureEnabled",i.hasAzureUrl())("pullRequests",i.pullRequests())("prError",i.pullRequestsError())}}function JR(n,e){if(n&1){let t=A();p(0,"app-working-panel",19),S("subjectChange",function(r){y(t);let o=u(2);return b(o.commitSubject.set(r))})("descriptionChange",function(r){y(t);let o=u(2);return b(o.commitDescription.set(r))})("stageChange",function(r){y(t);let o=u(2);return b(o.changeStage(r))})("stashChange",function(r){y(t);let o=u(2);return b(o.stashChanges(r))})("discardRequest",function(r){y(t);let o=u(2);return b(o.discardUnstaged(r))})("commitRequested",function(){y(t);let r=u(2);return b(r.commitChanges())})("retry",function(){y(t);let r=u(2);return b(r.refreshWorking())})("closed",function(){y(t);let r=u(2);return b(r.selectedCommit.set(null))}),m()}if(n&2){let t=u(2);I("changes",t.workingChanges())("busy",t.busy()||t.mutationBusy()||t.statusLoading())("statusLoading",t.statusLoading())("statusError",t.statusError())("subject",t.commitSubject())("description",t.commitDescription())("fileListView",t.fileListView())}}function eN(n,e){if(n&1){let t=A();p(0,"app-commit-detail",20),S("closed",function(){y(t);let r=u(2);return b(r.selectedCommit.set(null))}),m()}if(n&2){let t=u(),i=u();I("commit",t)("fileListView",i.fileListView())("issueLinking",i.issueLinking())}}function tN(n,e){if(n&1&&T(0,JR,1,7,"app-working-panel",17)(1,eN,1,3,"app-commit-detail",18),n&2){let t=u();M(e.hash===t.workingHash?0:1)}}function nN(n,e){if(n&1){let t=A();p(0,"app-worktree-dialog",21),S("created",function(r){y(t);let o=u();return b(o.createWorktree(r))})("closed",function(){y(t);let r=u();return b(r.worktreeDialogOpen.set(!1))}),m()}if(n&2){let t=u();I("branches",t.branches())("worktrees",t.worktrees())("busy",t.mutationBusy())("error",t.worktreeDialogError())}}function iN(n,e){if(n&1){let t=A();p(0,"app-create-pr-dialog",22),S("closed",function(){y(t);let r=u();return b(r.prDialogOpen.set(!1))})("created",function(){y(t);let r=u();return b(r.onPrCreated())}),m()}if(n&2){let t=u();I("branches",t.branches())}}function rN(n,e){if(n&1){let t=A();p(0,"app-pr-dialog",23),S("changed",function(){y(t);let r=u();return b(r.loadPullRequests())})("closed",function(){y(t);let r=u();return b(r.closePrDetail())}),m()}n&2&&I("prId",e)}function oN(n,e){if(n&1){let t=A();p(0,"app-settings-dialog",24),S("saved",function(r){y(t);let o=u();return b(o.saveSettings(r))})("settingsUpdated",function(r){y(t);let o=u();return o.azureSettings.set(r),b(o.showRemote.set(r.showRemoteBranches!==!1))})("identityChanged",function(r){y(t);let o=u();return b(o.identity.set(r))})("repositoryChanged",function(){y(t);let r=u();return b(r.refresh())})("closed",function(){y(t);let r=u();return b(r.settingsDialogOpen.set(!1))}),m()}if(n&2){let t=u();I("settings",e)("identity",t.identity())("saving",t.settingsSaving())}}var Ks=500,Xb="guito.commitDraft";function sN(){let n=jc(Xb,{});return{subject:typeof n.subject=="string"?n.subject:"",description:typeof n.description=="string"?n.description:""}}var ld=class n{git=k(mt);vscode=k(In);workingHash=pn;mutationBusy=this.git.mutating;statusLoading=x(!1);statusError=x("");commitDraft=sN();commitSubject=x(this.commitDraft.subject);commitDescription=x(this.commitDraft.description);displayedCommits=x([]);searchLoading=x(!1);historyGeneration=x(0);filterFailed=x(!1);tableLoading=H(()=>this.loading()?"Refreshing commits...":this.searchLoading()||this.search().trim()&&this.historyLoading()?"Searching commits...":this.historyLoading()?"Loading history...":"");commits=x([]);branches=x([]);selectedBranch=x("");showRemote=x(!0);search=x("");selectedCommit=x(null);loading=x(!1);busy=x(!1);error=x("");repoName=x("");identity=x({name:"",email:""});lastRepositoryState=null;stateSub=null;refreshTimer=window.setInterval(()=>this.checkRepository(),3e3);workingChanges=x(null);totalCommits=x(0);historyLoading=x(!1);contextMenuState=x(null);contextMenuTarget=x(null);promptState=x(null);azureSettings=x(null);hasAzureUrl=H(()=>!!this.azureSettings()?.azureDevOpsUrl);autoReload=H(()=>this.azureSettings()?.autoReload!==!1);showGraph=H(()=>this.azureSettings()?.showGraph!==!1);showStashes=H(()=>this.azureSettings()?.showStashes!==!1);showTags=H(()=>this.azureSettings()?.showTags!==!1);issueLinking=H(()=>this.azureSettings()?.issueLinking??null);fileListView=H(()=>this.azureSettings()?.fileListView==="tree"?"tree":"flat");filterSearch=H(()=>this.azureSettings()?.searchMode==="filter");searchCaseSensitive=H(()=>this.azureSettings()?.searchCaseSensitive===!0);prDialogOpen=x(!1);settingsDialogOpen=x(!1);settingsSaving=x(!1);pendingDiscard=x(null);panelOpen=x(!1);panelLoading=x(!1);stashes=x([]);worktrees=x([]);worktreeDialogOpen=x(!1);worktreeDialogError=x("");tags=x([]);pullRequests=x(null);pullRequestsError=x("");prDetailId=x(null);searchFocusHash=x("");pendingSearchHash=x("");scrollRequest=x(null);scrollRequestCounter=0;bodyMatches=x([]);searchHistoryIndices=x({});refreshSub=null;historySub=null;workingSub=null;searchSub=null;panelSub=null;prListSub=null;unloadedCommits=H(()=>Math.max(0,this.totalCommits()-this.commits().length));commitIndex=H(()=>{let e=new Map;for(let t of this.commits())e.set(t.hash,t);return e});filteredCommits=H(()=>{let e=this.commits(),t=this.selectedBranch(),i=this.branches().filter(o=>this.showRemote()||!o.remote),r=t?i.filter(o=>o.name===t):i;if(r.length>0){let o=new Set;for(let s of r)for(let a of this.ancestorsOf(s.commit))o.add(a);e=e.filter(s=>o.has(s.hash))}else e=[];return e});searchMatches=H(()=>{let e=this.search().trim(),t=this.searchCaseSensitive(),i=t?e:e.toLowerCase();if(!i)return[];let r=new Set(this.bodyMatches()),o=this.filteredCommits().filter(l=>(t?l.message:l.message.toLowerCase()).includes(i)||(t?l.author_name:l.author_name.toLowerCase()).includes(i)||(t?l.hash:l.hash.toLowerCase()).startsWith(i)||r.has(l.hash)).map(l=>l.hash),s=new Set(o),a=this.bodyMatches().filter(l=>!s.has(l));return[...o,...a]});searchIndex=H(()=>{let e=this.searchFocusHash();return e?this.searchMatches().indexOf(e):-1});constructor(){this.refresh(),xe(()=>{let e=this.search().trim();this.selectedBranch(),this.historyGeneration(),this.filterSearch();let t=this.searchCaseSensitive();et(()=>{this.searchSub?.unsubscribe(),this.searchLoading.set(!1),this.bodyMatches.set([]),this.searchHistoryIndices.set({}),this.filterFailed.set(!1),this.error.set(""),this.searchFocusHash.set(""),this.pendingSearchHash.set(""),!this.loading()&&((this.selectedBranch()||e&&this.filterSearch())&&this.unloadedCommits()>0&&this.loadAllCommits(),e&&this.fetchBodyMatches(e,t))})}),xe(()=>{if(!this.loading()&&!this.searchLoading()&&!this.historyLoading()&&!this.filterFailed()){let e=new Set(this.searchMatches());this.displayedCommits.set(this.filterSearch()&&this.search().trim()?this.filteredCommits().filter(t=>e.has(t.hash)):this.filteredCommits())}}),xe(()=>{let e=this.pendingSearchHash();if(!e||this.filterFailed())return;let t=this.displayedCommits().find(i=>i.hash===e);if(t)et(()=>{this.selectedCommit.set(t),this.scrollRequestCounter+=1,this.scrollRequest.set({hash:e,id:this.scrollRequestCounter}),this.pendingSearchHash.set("")});else if(this.unloadedCommits()>0&&!this.historyLoading()&&!this.loading()){let i=this.searchHistoryIndices()[e],r=this.commits().length;if(i!==void 0&&i<r){this.pendingSearchHash.set("");return}let o=i===void 0?void 0:Math.ceil((i+1-r)/Ks)*Ks;et(()=>this.loadHistory(this.git.getCommits(o,r)))}else!this.historyLoading()&&!this.loading()&&this.pendingSearchHash.set("")}),xe(()=>{$c(Xb,{subject:this.commitSubject(),description:this.commitDescription()})}),xe(()=>{this.vscode.settingsVersion()!==0&&et(()=>{this.git.getSettings().subscribe({next:e=>{this.azureSettings.set(e),this.showRemote.set(e.showRemoteBranches!==!1)},error:e=>this.error.set(this.errorMessage(e))})})})}ngOnDestroy(){window.clearInterval(this.refreshTimer),this.stateSub?.unsubscribe(),this.refreshSub?.unsubscribe(),this.historySub?.unsubscribe(),this.workingSub?.unsubscribe(),this.searchSub?.unsubscribe(),this.panelSub?.unsubscribe(),this.prListSub?.unsubscribe()}checkRepository(){!this.autoReload()||document.hidden||this.loading()||this.historyLoading()||this.statusLoading()||this.busy()||this.mutationBusy()||this.stateSub&&!this.stateSub.closed||(this.stateSub=this.git.getRepositoryState().subscribe({next:e=>{if(this.loading()||this.historyLoading()||this.statusLoading()||this.busy()||this.mutationBusy())return;let t=this.lastRepositoryState;this.lastRepositoryState=e,!t||t.history!==e.history?this.refresh(!0):t.working!==e.working&&this.refreshWorking()},error:()=>{}}))}toggleSidePanel(){this.panelOpen.update(e=>!e),this.panelOpen()&&this.loadSidePanelData()}loadSidePanelData(){this.panelSub?.unsubscribe(),this.panelLoading.set(!0),this.panelSub=Ga({stashes:this.git.getStashes(),worktrees:this.git.getWorktrees(),tags:this.git.getTags().pipe(rt(()=>De([])))}).subscribe({next:({stashes:e,worktrees:t,tags:i})=>{this.stashes.set(e),this.worktrees.set(t),this.tags.set(i),this.panelLoading.set(!1)},error:e=>{this.panelLoading.set(!1),this.error.set(this.errorMessage(e))}}),this.loadPullRequests()}loadPullRequests(){if(!this.hasAzureUrl()){this.pullRequests.set(null),this.pullRequestsError.set("");return}this.prListSub?.unsubscribe(),this.prListSub=this.git.getMyPullRequests().subscribe({next:e=>{this.pullRequests.set(e),this.pullRequestsError.set("")},error:e=>{this.pullRequests()===null&&this.pullRequests.set([]),this.pullRequestsError.set(this.errorMessage(e))}})}openPrDetail(e){this.prDetailId.set(e)}closePrDetail(){this.prDetailId.set(null),this.loadPullRequests()}refresh(e=!1){this.historySub?.unsubscribe(),this.workingSub?.unsubscribe(),this.searchSub?.unsubscribe(),this.searchLoading.set(!1),this.filterFailed.set(!1),this.statusLoading.set(!0),this.historyLoading.set(!1),this.loading.set(!0),this.error.set(""),this.refreshSub?.unsubscribe(),this.refreshSub=Ga({history:this.git.getCommits(e?Math.max(Ks,this.commits().length):Ks),repositoryState:this.git.getRepositoryState().pipe(rt(()=>De(null))),branches:this.git.getAllBranches(),repo:this.git.getRepoInfo(),settings:this.git.getSettings().pipe(rt(()=>De(null))),stashes:this.git.getStashes().pipe(rt(()=>De([]))),working:this.git.getWorkingChanges().pipe(rt(t=>(this.lastRepositoryState=null,this.statusError.set(this.errorMessage(t)),De(null))))}).subscribe({next:({history:t,repositoryState:i,branches:r,repo:o,settings:s,stashes:a,working:l})=>{this.commits.set(t.commits),this.totalCommits.set(Math.max(t.total,t.commits.length)),i&&(this.lastRepositoryState=i),this.branches.set(r),this.repoName.set(o.name),this.identity.set(o.identity??{name:"",email:""}),this.stashes.set(a),this.selectedBranch()&&!r.some(h=>h.name===this.selectedBranch())&&this.selectedBranch.set("");let c=this.selectedCommit();if(c&&c.hash!==pn){let h=t.commits.find(_=>_.hash===c.hash);h&&this.selectedCommit.set(G(G({},c),h))}s&&(this.azureSettings.set(s),this.showRemote.set(s.showRemoteBranches!==!1)),l&&(this.workingChanges.set(l),this.statusError.set("")),this.statusLoading.set(!1),this.loading.set(!1),this.historyGeneration.update(h=>h+1),this.panelOpen()&&this.loadSidePanelData()},error:t=>{this.lastRepositoryState=null,this.error.set(this.errorMessage(t)),this.filterFailed.set(!0),this.statusError.set(this.errorMessage(t)),this.statusLoading.set(!1),this.loading.set(!1)}})}refreshWorking(){this.workingSub?.unsubscribe(),this.statusLoading.set(!0),this.workingSub=this.git.getWorkingChanges().subscribe({next:e=>{this.workingChanges.set(e),this.statusError.set(""),this.statusLoading.set(!1)},error:e=>{this.lastRepositoryState=null,this.statusError.set(this.errorMessage(e)),this.statusLoading.set(!1)}})}changeStage(e){this.busy()||this.mutationBusy()||this.statusLoading()||this.statusError()||(this.busy.set(!0),this.error.set(""),(e.staged?this.git.unstage(e.files):this.git.stage(e.files)).subscribe({next:()=>{this.refreshWorking(),this.busy.set(!1)},error:t=>{this.error.set(this.errorMessage(t)),this.refreshWorking(),this.busy.set(!1)}}))}stashChanges(e){this.busy()||this.mutationBusy()||this.statusLoading()||this.statusError()||this.git.stashSave(void 0,e).subscribe({next:()=>this.refresh(),error:t=>this.error.set(this.errorMessage(t))})}discardUnstaged(e){this.busy()||this.mutationBusy()||this.statusLoading()||this.statusError()||e.length&&(this.pendingDiscard.set(e),this.promptState.set({title:"Discard unstaged changes?",label:e.length===1?`${e[0]} will be discarded. This cannot be undone.`:`${e.length} files will be discarded. This cannot be undone.`,confirmOnly:!0,okLabel:"Discard",danger:!0}))}onPromptCancel(){this.pendingDiscard.set(null),this.promptState.set(null)}commitChanges(){this.busy()||this.mutationBusy()||this.statusLoading()||this.statusError()||!this.commitSubject().trim()||!this.workingChanges()?.staged.length||this.workingChanges()?.conflicted.length||(this.busy.set(!0),this.error.set(""),this.git.commit(this.commitSubject(),this.commitDescription()).subscribe({next:()=>{this.commitSubject.set(""),this.commitDescription.set(""),this.refresh(),this.busy.set(!1)},error:e=>{this.error.set(this.errorMessage(e)),this.refreshWorking(),this.busy.set(!1)}}))}loadMoreCommits(){this.loadHistory(this.git.getCommits(Ks,this.commits().length))}loadAllCommits(){this.loadHistory(this.git.getCommits(void 0,this.commits().length))}loadHistory(e){if(this.historyLoading()||this.loading())return;let t=this.commits().length;this.filterFailed.set(!1),this.historyLoading.set(!0),this.historySub?.unsubscribe(),this.historySub=e.subscribe({next:({commits:i,total:r})=>{this.commits().length===t&&(this.commits.update(o=>[...o,...i]),this.totalCommits.set(i.length>0?Math.max(r,this.commits().length):this.commits().length)),this.historyLoading.set(!1)},error:i=>{this.error.set(this.errorMessage(i)),this.filterFailed.set(!0),this.historyLoading.set(!1)}})}fetchBodyMatches(e,t){this.searchSub?.unsubscribe(),this.searchLoading.set(!0),this.searchSub=this.git.searchCommits(e,t).subscribe({next:i=>{this.bodyMatches.set(i.hashes),this.searchHistoryIndices.set(i.indices??{}),this.searchLoading.set(!1)},error:i=>{this.filterFailed.set(!0),this.error.set(this.errorMessage(i)),this.searchLoading.set(!1)}})}navigateSearch(e){let t=this.searchMatches();if(t.length===0)return;let i=this.searchIndex(),r=i<0?e==="next"?0:t.length-1:e==="next"?(i+1)%t.length:(i-1+t.length)%t.length,o=t[r];this.searchFocusHash.set(o),this.pendingSearchHash.set(o)}runRemoteAction(e){if(this.busy()||this.mutationBusy()||this.statusLoading())return;if(e==="rebase-from"){this.openRebaseFromDialog();return}if(e==="create-pr"){this.prDialogOpen.set(!0);return}if(e==="push-force"){this.promptState.set({title:"Force push?",label:"This will overwrite the remote branch with your local history. Remote commits missing locally may be lost.",confirmOnly:!0,okLabel:"Force Push",danger:!0});return}this.busy.set(!0),this.error.set(""),(e==="fetch"||e==="fetch-prune"?this.git.fetch(e==="fetch-prune"):e==="pull"?this.git.pull():e==="pull-rebase"?this.git.pull(!0):e==="push"?this.git.push():this.git.sync()).subscribe({next:()=>{this.busy.set(!1),this.refresh()},error:i=>{this.busy.set(!1),this.error.set(this.errorMessage(i))}})}openRebaseFromDialog(){let e=new Set(this.branches().map(r=>r.name)),t=["origin/main","origin/master"].filter(r=>e.has(r));t.forEach(r=>e.delete(r));let i=[...t,...e];i.length===0&&i.push("origin/main","origin/master"),this.promptState.set({title:"Rebase from branch",label:"Rebase the current branch onto:",options:i.map(r=>({value:r,label:r})),okLabel:"Rebase",searchable:!0})}openSettings(){this.vscode.openSettings()||this.settingsDialogOpen.set(!0)}saveSettings(e){this.settingsSaving.set(!0),this.git.saveSettings(e).subscribe({next:t=>{this.azureSettings.set(t),this.showRemote.set(t.showRemoteBranches!==!1),this.settingsSaving.set(!1),this.settingsDialogOpen.set(!1)},error:t=>{this.settingsSaving.set(!1),this.error.set(this.errorMessage(t))}})}onPrCreated(){this.refresh()}onContextMenu(e){if(e.target.kind==="tag"&&!e.target.commit){let i=this.taggedCommit(e.target.branch?.name??"");i&&(e.target=le(G({},e.target),{commit:i}))}let t=[];if(e.target.kind==="commit")t.push({label:"Add Tag...",action:"add-tag"}),t.push({label:"Create Branch...",action:"create-branch"}),t.push({separator:!0}),t.push({label:"Checkout...",action:"checkout-commit"}),t.push({label:"Cherry Pick...",action:"cherry-pick"}),t.push({label:"Revert...",action:"revert-commit",danger:!0}),t.push({label:"Drop...",action:"drop-commit",danger:!0}),t.push({separator:!0}),t.push({label:"Merge into current branch...",action:"merge-commit"}),t.push({label:"Rebase current branch on this Commit...",action:"rebase-commit"}),t.push({label:"Reset current branch to this Commit...",action:"reset-commit",danger:!0}),t.push({separator:!0}),t.push({label:"Copy Commit Hash to Clipboard",action:"copy-hash"}),t.push({label:"Copy Commit Subject to Clipboard",action:"copy-subject"});else if(e.target.kind==="tag")t.push({label:"View Details",action:"tag-details"}),t.push({separator:!0}),t.push({label:"Delete Tag...",action:"tag-delete",danger:!0}),t.push({label:"Push Tag...",action:"tag-push"}),t.push({separator:!0}),t.push({label:"Create Archive",action:"create-archive"}),t.push({label:"Copy Tag Name to Clipboard",action:"copy-tag-name"});else if(e.target.kind==="branch"){let i=e.target.branch.type,r=i==="head"||i==="local";t.push({label:"Checkout Branch...",action:"checkout-branch"}),r&&(t.push({label:"Rename Branch...",action:"rename-branch"}),t.push({label:"Delete Branch...",action:"delete-branch",danger:!0,disabled:i==="head"})),t.push({label:"Delete Remote Branch...",action:"delete-remote-branch",danger:!0}),t.push({label:"Merge into current branch...",action:"merge-branch"}),t.push({label:"Pull into current branch...",action:"pull-branch"}),t.push({separator:!0}),t.push({label:"Create Archive",action:"create-archive"}),t.push({label:"Unselect in Branches Dropdown",action:"unselect-branch"}),t.push({separator:!0}),t.push({label:"Copy Branch Name to Clipboard",action:"copy-branch-name"})}else e.target.kind==="stash"?(t.push({label:"Apply Stash",action:"stash-apply"}),t.push({label:"Pop Stash",action:"stash-pop"}),t.push({separator:!0}),t.push({label:"Drop Stash...",action:"stash-drop",danger:!0}),t.push({separator:!0}),t.push({label:"Copy Stash Name to Clipboard",action:"copy-stash-name"})):e.target.kind==="worktree"?(t.push({label:"Delete Worktree...",action:"delete-worktree",danger:!0,disabled:e.target.worktree?.current||e.target.worktree?.bare}),t.push({separator:!0}),t.push({label:"Copy Worktree Path to Clipboard",action:"copy-worktree-path"})):(t.push({label:"Stash uncommitted changes...",action:"stash-working"}),t.push({label:"Reset uncommitted changes...",action:"reset-working",danger:!0}),t.push({label:"Clean untracked files...",action:"clean-untracked",danger:!0}),t.push({separator:!0}),t.push({label:"Open Source Control View",action:"open-source-control"}));this.contextMenuTarget.set(e.target),this.contextMenuState.set({x:e.x,y:e.y,items:t})}taggedCommit(e){if(!e)return;let t=this.tags().find(i=>i.name===e);return t?this.commitIndex().get(t.hash):void 0}selectTag(e){this.pendingSearchHash.set(e.hash)}openWorktreeDialog(){this.worktreeDialogError.set(""),this.worktreeDialogOpen.set(!0)}createWorktree(e){this.busy()||this.mutationBusy()||this.statusLoading()||(this.worktreeDialogError.set(""),this.git.createWorktree(e.path,e.branch).subscribe({next:()=>{this.worktreeDialogOpen.set(!1),this.loadSidePanelData()},error:t=>this.worktreeDialogError.set(this.errorMessage(t))}))}onContextAction(e){if(this.busy()||this.mutationBusy()||this.statusLoading())return;let t=this.contextMenuTarget()?.commit??this.selectedCommit();switch(e){case"add-tag":this.promptState.set({title:"Add Tag",label:"Tag name",placeholder:"v1.0.0",okLabel:"Add Tag"});break;case"create-branch":this.promptState.set({title:"Create Branch",label:"Branch name",placeholder:"feature/my-branch",okLabel:"Create Branch"});break;case"checkout-commit":t&&this.git.checkout(t.hash).subscribe({next:()=>this.refresh(),error:i=>this.error.set(this.errorMessage(i))});break;case"cherry-pick":t&&this.git.cherryPick(t.hash).subscribe({next:()=>this.refresh(),error:i=>this.error.set(this.errorMessage(i))});break;case"open-commit":this.selectedCommit()===null&&this.selectedCommit.set(this.commits()[0]??null);break;case"copy-hash":t&&navigator.clipboard?.writeText(t.hash);break;case"copy-subject":t&&navigator.clipboard?.writeText(t.message);break;case"view-commit-diff":t&&this.selectedCommit.set(t);break;case"revert-commit":t&&this.git.revert(t.hash).subscribe({next:()=>this.refresh(),error:i=>this.error.set(this.errorMessage(i))});break;case"drop-commit":this.promptState.set({title:"Drop commit?",label:"This will reset the current branch to the commit before it.",confirmOnly:!0,okLabel:"Drop",danger:!0});break;case"merge-commit":t&&this.git.merge(t.hash).subscribe({next:()=>this.refresh(),error:i=>this.error.set(this.errorMessage(i))});break;case"rebase-commit":t&&this.git.rebase(t.hash).subscribe({next:()=>this.refresh(),error:i=>this.error.set(this.errorMessage(i))});break;case"reset-commit":this.promptState.set({title:"Reset current branch to this commit?",label:"Choose the reset type:",options:[{value:"soft",label:"Soft",description:"Keep all changes staged"},{value:"mixed",label:"Mixed",description:"Keep changes, but unstage them"},{value:"hard",label:"Hard",description:"Discard all changes",danger:!0}],okLabel:"Reset",danger:!0});break;case"checkout-branch":this.contextMenuTarget()?.branch?.name&&this.git.checkout(this.contextMenuTarget().branch.name).subscribe({next:()=>this.refresh(),error:i=>this.error.set(this.errorMessage(i))});break;case"delete-remote-branch":{let i=this.contextMenuTarget()?.branch?.name??"",r=i.indexOf("/");r>0&&this.git.deleteRemoteBranch(i.slice(0,r),i.slice(r+1)).subscribe({next:()=>this.refresh(),error:o=>this.error.set(this.errorMessage(o))});break}case"merge-branch":this.contextMenuTarget()?.branch?.name&&this.git.merge(this.contextMenuTarget().branch.name).subscribe({next:()=>this.refresh(),error:i=>this.error.set(this.errorMessage(i))});break;case"pull-branch":this.git.pull().subscribe({next:()=>this.refresh(),error:i=>this.error.set(this.errorMessage(i))});break;case"create-archive":{let i=this.contextMenuTarget(),r=i?.kind==="tag"?i.branch?.name:i?.commit?.hash;r&&window.open(Uy(`/api/archive?ref=${encodeURIComponent(r)}`),"_blank");break}case"tag-details":this.contextMenuTarget()?.commit&&this.selectedCommit.set(this.contextMenuTarget().commit);break;case"tag-delete":{let i=this.contextMenuTarget()?.branch?.name??"";this.promptState.set({title:"Delete tag?",label:`This will delete the tag "${i}".`,confirmOnly:!0,okLabel:"Delete",danger:!0});break}case"tag-push":{let i=this.contextMenuTarget()?.branch?.name??"";this.promptState.set({title:"Push tag?",label:`This will push the tag "${i}" to the remote.`,confirmOnly:!0,okLabel:"Push"});break}case"copy-tag-name":this.contextMenuTarget()?.branch?.name&&navigator.clipboard?.writeText(this.contextMenuTarget().branch.name);break;case"unselect-branch":this.selectedBranch.set("");break;case"stash-apply":{let i=this.contextMenuTarget()?.stash?.index;i!==void 0&&this.git.stashApply(i).subscribe({next:()=>this.refresh(),error:r=>this.error.set(this.errorMessage(r))});break}case"stash-pop":{let i=this.contextMenuTarget()?.stash?.index;i!==void 0&&this.git.stashPop(i).subscribe({next:()=>this.refresh(),error:r=>this.error.set(this.errorMessage(r))});break}case"stash-drop":{let i=this.contextMenuTarget()?.stash;i&&this.promptState.set({title:"Drop stash?",label:`This will permanently drop stash@{${i.index}}.`,confirmOnly:!0,okLabel:"Drop",danger:!0});break}case"copy-stash-name":{let i=this.contextMenuTarget()?.stash;i&&navigator.clipboard?.writeText(`stash@{${i.index}}`);break}case"copy-worktree-path":{let i=this.contextMenuTarget()?.worktree?.path;i&&navigator.clipboard?.writeText(i);break}case"delete-worktree":{let i=this.contextMenuTarget()?.worktree;i&&!i.current&&!i.bare&&this.promptState.set({title:"Delete worktree?",label:`This will remove the worktree folder "${i.path}". Git will refuse if it contains uncommitted changes.`,confirmOnly:!0,okLabel:"Delete",danger:!0});break}case"copy-branch-name":this.contextMenuTarget()?.branch?.name&&navigator.clipboard?.writeText(this.contextMenuTarget().branch.name);break;case"rename-branch":this.promptState.set({title:"Rename branch",label:"New branch name",placeholder:"feature/my-branch",value:this.contextMenuTarget()?.branch?.name,okLabel:"Rename"});break;case"delete-branch":this.promptState.set({title:"Delete branch?",label:"This will delete the local branch.",confirmOnly:!0,okLabel:"Delete",danger:!0});break;case"open-working":this.selectedCommit.set({hash:pn,date:new Date().toISOString(),message:"Uncommitted changes",refs:"",body:"",author_name:this.identity().name||"You",author_email:this.identity().email,parents:[]});break;case"stash-working":this.promptState.set({title:"Stash uncommitted changes",label:"Stash message (optional)",placeholder:"WIP",allowEmpty:!0,okLabel:"Stash"});break;case"reset-working":this.promptState.set({title:"Reset uncommitted changes?",label:"Tracked changes will be discarded. Untracked files will remain.",confirmOnly:!0,okLabel:"Reset",danger:!0});break;case"clean-untracked":this.promptState.set({title:"Clean untracked files?",label:"Untracked files will be permanently deleted.",confirmOnly:!0,okLabel:"Clean",danger:!0});break;case"discard-working":this.git.getWorkingChanges().subscribe({next:i=>{let r=[...i.files.map(o=>o.path),...i.untracked];r.length>0&&this.git.discard(r).subscribe({next:()=>this.refreshWorking(),error:o=>this.error.set(this.errorMessage(o))})},error:i=>this.error.set(this.errorMessage(i))});break;case"refresh-status":this.refresh();break;case"open-source-control":window.open("vscode://command/workbench.view.scm","_blank");break;default:break}this.contextMenuState.set(null)}onPromptConfirm(e){if(this.busy()||this.mutationBusy()||this.statusLoading())return;let t=this.promptState();if(!t)return;this.promptState.set(null);let i=this.contextMenuTarget()?.commit;if(t.title==="Add Tag"&&i){this.git.createTag(e,i.hash).subscribe({next:()=>this.refresh(),error:r=>this.error.set(this.errorMessage(r))});return}if(t.title==="Create Branch"&&i){this.git.createBranch(e,i.hash).subscribe({next:()=>this.refresh(),error:r=>this.error.set(this.errorMessage(r))});return}if(t.title==="Drop commit?"&&i){this.git.dropCommit(i.hash).subscribe({next:()=>this.refresh(),error:r=>this.error.set(this.errorMessage(r))});return}if(t.title==="Reset current branch to this commit?"&&i){let r=e==="soft"||e==="mixed"?e:"hard";this.git.resetToCommit(i.hash,r).subscribe({next:()=>this.refresh(),error:o=>this.error.set(this.errorMessage(o))});return}if(t.title==="Delete tag?"){let r=this.contextMenuTarget()?.branch?.name;r&&this.git.deleteTag(r).subscribe({next:()=>this.refresh(),error:o=>this.error.set(this.errorMessage(o))});return}if(t.title==="Delete worktree?"){let r=this.contextMenuTarget()?.worktree;r&&!r.current&&!r.bare&&this.git.removeWorktree(r.path).subscribe({next:()=>this.loadSidePanelData(),error:o=>this.error.set(this.errorMessage(o))});return}if(t.title==="Push tag?"){let r=this.contextMenuTarget()?.branch?.name;r&&this.git.pushTag(r).subscribe({next:()=>this.refresh(),error:o=>this.error.set(this.errorMessage(o))});return}if(t.title==="Force push?"){this.git.push(!0).subscribe({next:()=>this.refresh(),error:r=>this.error.set(this.errorMessage(r))});return}if(t.title==="Discard unstaged changes?"){let r=this.pendingDiscard();this.pendingDiscard.set(null),r?.length&&this.git.discard(r,"unstaged").subscribe({next:()=>this.refreshWorking(),error:o=>this.error.set(this.errorMessage(o))});return}if(t.title==="Stash uncommitted changes"){this.git.stashSave(e||void 0).subscribe({next:()=>this.refresh(),error:r=>this.error.set(this.errorMessage(r))});return}if(t.title==="Reset uncommitted changes?"){this.git.resetWorking().subscribe({next:()=>this.refreshWorking(),error:r=>this.error.set(this.errorMessage(r))});return}if(t.title==="Clean untracked files?"){this.git.cleanUntracked().subscribe({next:()=>this.refreshWorking(),error:r=>this.error.set(this.errorMessage(r))});return}if(t.title==="Rename branch"){let r=this.contextMenuTarget()?.branch?.name,o=e.trim();r&&o&&o!==r&&this.git.renameBranch(r,o).subscribe({next:()=>{this.selectedBranch()===r&&this.selectedBranch.set(o),this.refresh()},error:s=>this.error.set(this.errorMessage(s))});return}if(t.title==="Delete branch?"){let r=this.contextMenuTarget()?.branch?.name;r&&this.git.deleteBranch(r).subscribe({next:()=>{this.selectedBranch()===r&&this.selectedBranch.set(""),this.refresh()},error:o=>this.error.set(this.errorMessage(o))});return}if(t.title==="Drop stash?"){let r=this.contextMenuTarget()?.stash?.index;r!==void 0&&this.git.stashDrop(r).subscribe({next:()=>this.refresh(),error:o=>this.error.set(this.errorMessage(o))});return}if(t.title==="Rebase from branch"){let r=e.trim();r&&this.git.rebase(r).subscribe({next:()=>this.refresh(),error:o=>this.error.set(this.errorMessage(o))});return}}ancestorsOf(e){let t=this.commitIndex(),i=new Set,r=[e];for(;r.length;){let o=r.pop();if(i.has(o))continue;i.add(o);let s=t.get(o);s&&r.push(...s.parents)}return i}errorMessage(e){let t=e;return t?.status===400&&t.error?.error?t.error.error:"Failed to communicate with the Guito server."}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=ce({type:n,selectors:[["app-root"]],hostBindings:function(t,i){t&1&&S("focus",function(){return i.checkRepository()},ep)("visibilitychange",function(){return i.checkRepository()},Ze)},decls:15,vars:32,consts:[[1,"app"],[3,"menuToggle","refresh","remoteAction","settingsClick","searchChange","searchNavigate","busy","prEnabled","panelOpen","matchIndex","matchCount","filterMode"],["retryLabel","Retry",3,"message","busy"],["retryLabel","Retry status",3,"message","busy"],[1,"content-row"],[3,"branches","selectedBranch","showRemote","stashes","worktrees","tags","selectedCommitHash","loading","azureEnabled","pullRequests","prError"],[1,"content"],[3,"commitClick","contextMenu","loadMoreRequested","loadAllRequested","identity","commits","loadingLabel","selectedHash","search","showGraph","selectedBranch","showRemote","workingChanges","stashes","showStashes","showTags","issueLinking","unloaded","historyLoading","scrollToHash"],[3,"select","closed","menu"],[3,"confirmed","cancelled","state"],[3,"branches","worktrees","busy","error"],[3,"branches"],[3,"prId"],[3,"settings","identity","saving"],["retryLabel","Retry",3,"retry","message","busy"],["retryLabel","Retry status",3,"retry","message","busy"],[3,"branchChange","tagSelect","contextMenu","worktreeCreate","prSelect","prRefresh","branches","selectedBranch","showRemote","stashes","worktrees","tags","selectedCommitHash","loading","azureEnabled","pullRequests","prError"],[3,"changes","busy","statusLoading","statusError","subject","description","fileListView"],[3,"commit","fileListView","issueLinking"],[3,"subjectChange","descriptionChange","stageChange","stashChange","discardRequest","commitRequested","retry","closed","changes","busy","statusLoading","statusError","subject","description","fileListView"],[3,"closed","commit","fileListView","issueLinking"],[3,"created","closed","branches","worktrees","busy","error"],[3,"closed","created","branches"],[3,"changed","closed","prId"],[3,"saved","settingsUpdated","identityChanged","repositoryChanged","closed","settings","identity","saving"]],template:function(t,i){if(t&1&&(p(0,"div",0)(1,"app-toolbar",1),S("menuToggle",function(){return i.toggleSidePanel()})("refresh",function(){return i.refresh()})("remoteAction",function(o){return i.runRemoteAction(o)})("settingsClick",function(){return i.openSettings()})("searchChange",function(o){return i.search.set(o)})("searchNavigate",function(o){return i.navigateSearch(o)}),m(),T(2,QR,1,2,"app-error-banner",2),T(3,KR,1,2,"app-error-banner",3),p(4,"div",4),T(5,XR,1,11,"app-side-panel",5),p(6,"main",6)(7,"app-commit-table",7),S("commitClick",function(o){return i.selectedCommit.set(o)})("contextMenu",function(o){return i.onContextMenu(o)})("loadMoreRequested",function(){return i.loadMoreCommits()})("loadAllRequested",function(){return i.loadAllCommits()}),m(),T(8,tN,2,1),m()(),p(9,"app-context-menu",8),S("select",function(o){return i.onContextAction(o)})("closed",function(){return i.contextMenuState.set(null)}),m(),p(10,"app-prompt-dialog",9),S("confirmed",function(o){return i.onPromptConfirm(o)})("cancelled",function(){return i.onPromptCancel()}),m(),T(11,nN,1,4,"app-worktree-dialog",10),T(12,iN,1,1,"app-create-pr-dialog",11),T(13,rN,1,1,"app-pr-dialog",12),T(14,oN,1,3,"app-settings-dialog",13),m()),t&2){let r,o,s,a,l;d(),I("busy",i.busy()||i.mutationBusy()||i.statusLoading())("prEnabled",i.hasAzureUrl())("panelOpen",i.panelOpen())("matchIndex",i.searchIndex())("matchCount",i.searchMatches().length)("filterMode",i.filterSearch()),d(),M(i.error()?2:-1),d(),M(i.statusError()&&((r=i.selectedCommit())==null?null:r.hash)!==i.workingHash?3:-1),d(2),M(i.panelOpen()?5:-1),d(2),I("identity",i.identity())("commits",i.displayedCommits())("loadingLabel",i.tableLoading())("selectedHash",((o=i.selectedCommit())==null?null:o.hash)??"")("search",i.search())("showGraph",i.showGraph()&&!i.filterSearch())("selectedBranch",i.selectedBranch())("showRemote",i.showRemote())("workingChanges",i.workingChanges())("stashes",i.stashes())("showStashes",i.showStashes())("showTags",i.showTags())("issueLinking",i.issueLinking())("unloaded",i.unloadedCommits())("historyLoading",i.historyLoading())("scrollToHash",i.scrollRequest()),d(),M((s=i.selectedCommit())?8:-1,s),d(),I("menu",i.contextMenuState()),d(),I("state",i.promptState()),d(),M(i.worktreeDialogOpen()?11:-1),d(),M(i.prDialogOpen()?12:-1),d(),M((a=i.prDetailId())?13:-1,a),d(),M((l=i.settingsDialogOpen()&&i.azureSettings())?14:-1,l)}},dependencies:[kt,ad,id,Hc,Oc,ao,Gc,rd,Uc,zc,td,od],styles:[".app[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100vh;overflow:hidden}.content-row[_ngcontent-%COMP%]{display:flex;flex:1;min-height:0}.content[_ngcontent-%COMP%]{display:flex;flex:1;min-width:0;min-height:0}.loading-overlay[_ngcontent-%COMP%]{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;background:#1e1e1e8c;z-index:100}.spinner[_ngcontent-%COMP%]{width:28px;height:28px;border:3px solid rgba(255,255,255,.15);border-top-color:var(--accent);border-radius:50%;animation:_ngcontent-%COMP%_spin .8s linear infinite}@keyframes _ngcontent-%COMP%_spin{to{transform:rotate(360deg)}}"],changeDetection:0})};hh(ld,zy).catch(n=>console.error(n));